Allow password to be passed to TLS context (#2719)
This commit is contained in:
@@ -159,7 +159,7 @@ class CertSimple(SanicSSLContext):
|
||||
# try common aliases, rename to cert/key
|
||||
certfile = kw["cert"] = kw.pop("certificate", None) or cert
|
||||
keyfile = kw["key"] = kw.pop("keyfile", None) or key
|
||||
password = kw.pop("password", None)
|
||||
password = kw.get("password", None)
|
||||
if not certfile or not keyfile:
|
||||
raise ValueError("SSL dict needs filenames for cert and key.")
|
||||
subject = {}
|
||||
|
||||
@@ -811,7 +811,7 @@ class StartupMixin(metaclass=SanicMeta):
|
||||
ssl = kwargs.get("ssl")
|
||||
|
||||
if isinstance(ssl, SanicSSLContext):
|
||||
kwargs["ssl"] = kwargs["ssl"].sanic
|
||||
kwargs["ssl"] = ssl.sanic
|
||||
|
||||
manager = WorkerManager(
|
||||
primary.state.workers,
|
||||
|
||||
Reference in New Issue
Block a user