mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 14:10:52 -07:00
Put import OpenSSL in try/except block for self-signed certificates
This commit is contained in:
parent
009971901b
commit
aac705f465
1 changed files with 5 additions and 1 deletions
|
@ -440,7 +440,11 @@ def create_https_certificates(ssl_cert, ssl_key):
|
||||||
|
|
||||||
This code is stolen from SickBeard (http://github.com/midgetspy/Sick-Beard).
|
This code is stolen from SickBeard (http://github.com/midgetspy/Sick-Beard).
|
||||||
"""
|
"""
|
||||||
from OpenSSL import crypto
|
try:
|
||||||
|
from OpenSSL import crypto
|
||||||
|
except ImportError:
|
||||||
|
logger.error("Unable to generate self-signed certificates: Missing OpenSSL module.")
|
||||||
|
return False
|
||||||
from certgen import createKeyPair, createSelfSignedCertificate, TYPE_RSA
|
from certgen import createKeyPair, createSelfSignedCertificate, TYPE_RSA
|
||||||
|
|
||||||
serial = int(time.time())
|
serial = int(time.time())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue