Page 1 of 1

Error creating SSL key and certificate

Posted: January 7th, 2020, 9:03 am
by ptg
Hello,

Hoping to get some help i have been struggling with this for 2 days..

I am trying to enable HTTPS with sabnzbd generated cert and key and every attempt throws the error Error creating SSL key and certificate

I am on windows 7 using latest stable version with default directories. I am not sure what else to try in attempt to fix.

Reason i need to enable is that is appears sonarr is disabling TLS 1.2 on startup when it detects SABnzbd is running without certs and this is preventing successfully connecting to certain site APIs.

Here is the message from the log:
2020-01-07 07:40:37,365::ERROR::[misc:1462] Error creating SSL key and certificate
2020-01-07 07:40:37,365::INFO::[misc:1463] Traceback:
Traceback (most recent call last):
File "sabnzbd\misc.pyo", line 1458, in create_https_certificates
File "sabnzbd\utils\certgen.pyo", line 39, in generate_key
File "cryptography\hazmat\backends\__init__.pyo", line 15, in default_backend
File "cryptography\hazmat\backends\openssl\__init__.pyo", line 7, in <module>
File "cryptography\hazmat\backends\openssl\backend.pyo", line 25, in <module>
ImportError: cannot import name aead
2020-01-07 07:40:37,365::WARNING::[SABnzbd:1296] Disabled HTTPS because of missing CERT and KEY files


Help is greatly appreciated.

Thank you in advance,
Patrick

Re: Error creating SSL key and certificate

Posted: January 7th, 2020, 9:34 am
by safihre
Are you using SABnzbd 2.3.9? And you are using it with the regular installer from the Downloads page here?
Strange, on Win10 it works just fine.

You can also manually create certificates with OpenSSL like this: https://sabnzbd.org/wiki/advanced/https
And just put them in your admin-folder with the right name server.cert/server.key.

Re: Error creating SSL key and certificate

Posted: January 7th, 2020, 10:09 am
by ptg
safihre wrote: January 7th, 2020, 9:34 am Are you using SABnzbd 2.3.9? And you are using it with the regular installer from the Downloads page here?
Strange, on Win10 it works just fine.

You can also manually create certificates with OpenSSL like this:
And just put them in your admin-folder with the right name server.cert/server.key.
Thanks for the reply!
Yes using 2.3.9, regular installer downloaded from here.
I did see that about OpenSSL but was not really sure what installing it does to my system (new to that kind of software).

I tried putting in the full path and filename still get same error.
Tried creating dummy files to see if sabnzbd would over write them but sabnzbd would not start up.

Re: Error creating SSL key and certificate

Posted: January 8th, 2020, 4:39 am
by safihre
Could you try running SABnzbd as Administrator an see if that works?

Re: Error creating SSL key and certificate

Posted: January 13th, 2020, 8:04 am
by ptg
safihre wrote: January 8th, 2020, 4:39 am Could you try running SABnzbd as Administrator an see if that works?
Guessing that means execute with the "Run as Administrator" in windows?
If so, I can give that a try!

In the meantime i was able to stumble thru OpemSSL and get them generated and SABNzbd seems to accept them and work which has stopped the TLS 1.2 error in sonarr ... Woohoo!

I will try the run as admin soon as i get a chance!

Thanks soooooo much!!!
Patrick

Re: Error creating SSL key and certificate

Posted: January 16th, 2020, 2:20 am
by safihre
Great :)

Re: Error creating SSL key and certificate

Posted: January 16th, 2020, 9:14 am
by ptg
Well I tried the right click and run as administrator with no luck, still would not create the files and disables https.

Also, I started getting errors in sonarr about problems with the certificate (that I generated in OpenSSL) and again disabling TLS1.2.
So i used OpenSSL again and i used higher encryption, replaced the old files and now sonarr is working again and so far not complaining.