SSL Certificate add failed, Error: 1312

I can’t get SSL to work.
When I try to access https://192.168.1.82:9898/ on Chrome I get ERR_CONNECTION_RESET
I am using Windows 7.
Sonarr version: 2.0.0.3357
Branch: master

Log:
http://pastebin.com/RKgwVPSe

I converted the crt and key file I use for couch potato into a pfx file using openssl.
openssl pkcs12 -export -out temp.pfx -inkey host.key -in host.crt

I then installed this pfx file into the Personal store using the windows wizard all settings default apart from I marked the key as portable.

Next I enabled SSL in Sonarr and pasted in the hash / thumbprint making sure there weren’t any phantom characters.

Finally I restarted Sonarr.

Do you get the same error if you run the command from an elevated command prompt?

netsh.exe http add sslcert ipport=0.0.0.0:9898 certhash=69d107726c5c6fbfe26697cf5d30869629b684f2 appid={C2172AF4-F9A6-4D91-BAEE-C2E4EE680613}

Yes yes yes

It may be a problem with the cert: https://social.technet.microsoft.com/forums/windowsserver/en-US/68452008-a89b-40ba-9927-472efcfafc99/ssl-certificate-add-failed-error-1312

Woot I fixed it.

When I open certmgr.msc it only shows certificates for the current user. The problem is the certificate must be in the local machine store to be successfully binded with the port. In order to access the local machine store I had to create a new windows management console.

Start → Run: mmc.exe
Menu: File → Add/Remove Snap-in…
Under Available snap-ins, select Certificates and press Add.
Select Computer Account for the certificates to manage. Press Next.
Select Local Computer and press Finish.
Press OK to return to the management console.

Importing the pfx file into the personal store there fixed it.

Sources:
http://www.mrboingo.com/index.php/archives/240

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.