Merge pull request #55 from ecobytes/master
update SSL logic to accomodate pregenerated certificates
This commit is contained in:
@@ -11,6 +11,7 @@ class CertificateBackend(object):
|
||||
def __init__(self, config):
|
||||
"""Set path to certificates."""
|
||||
self.config = config
|
||||
if not config.has_option("general", "tls_key_file"):
|
||||
for base_dir in ["/etc/pki/tls", "/etc/ssl"]:
|
||||
if os.path.exists(base_dir):
|
||||
self.config.set(
|
||||
@@ -21,6 +22,8 @@ class CertificateBackend(object):
|
||||
"{}/certs/%(hostname)s.cert".format(base_dir))
|
||||
return
|
||||
raise RuntimeError("Cannot find a directory to store certificate")
|
||||
else:
|
||||
return
|
||||
|
||||
|
||||
class SelfSignedCertificate(CertificateBackend):
|
||||
|
||||
Reference in New Issue
Block a user