Create self-signed HTTPS certificates

This commit is contained in:
JonnyWong16 2016-02-13 16:08:43 -08:00
parent 0bd40405b5
commit 9d780701f5
6 changed files with 112 additions and 40 deletions

View file

@ -32,8 +32,7 @@ def initialize(options):
https_key = options['https_key']
if enable_https:
# If either the HTTPS certificate or key do not exist, try to make
# self-signed ones.
# If either the HTTPS certificate or key do not exist, try to make self-signed ones.
if not (https_cert and os.path.exists(https_cert)) or not (https_key and os.path.exists(https_key)):
if not create_https_certificates(https_cert, https_key):
logger.warn("Unable to create certificate and key. Disabling HTTPS")