mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
oops, context.tls_certificate_chain_file() expects a file, not a certificate.
This commit is contained in:
parent
19fa3731ae
commit
f26a3df1bf
@ -32,10 +32,7 @@ class TlsConfig(Config):
|
||||
tls_certificate_chain_path = config.get("tls_certificate_chain_path")
|
||||
|
||||
if tls_certificate_chain_path and os.path.exists(tls_certificate_chain_path):
|
||||
self.tls_certificate_chain = self.read_tls_certificate(
|
||||
config.get("tls_certificate_chain_path"),
|
||||
"tls_certificate_chain"
|
||||
)
|
||||
self.tls_certificate_chain_file = tls_certificate_chain_path
|
||||
else:
|
||||
self.tls_certificate_chain = None
|
||||
|
||||
|
@ -38,8 +38,8 @@ class ServerContextFactory(ssl.ContextFactory):
|
||||
logger.exception("Failed to enable elliptic curve for TLS")
|
||||
context.set_options(SSL.OP_NO_SSLv2 | SSL.OP_NO_SSLv3)
|
||||
context.use_certificate(config.tls_certificate)
|
||||
if config.tls_certificate_chain:
|
||||
context.use_certificate_chain_file(config.tls_certificate_chain)
|
||||
if config.tls_certificate_chain_file:
|
||||
context.use_certificate_chain_file(config.tls_certificate_chain_file)
|
||||
|
||||
if not config.no_tls:
|
||||
context.use_privatekey(config.tls_private_key)
|
||||
|
Loading…
Reference in New Issue
Block a user