diff options
author | Erik Johnston <erik@matrix.org> | 2015-03-06 11:45:22 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-03-06 11:45:22 +0000 |
commit | b1491dfd7cdfe1109b8bb7eac78ad96b69ffafca (patch) | |
tree | 90fa52927fe0be0850f6bb0ee4686626cc929a64 /synapse/crypto | |
parent | Merge pull request #102 from matrix-org/randomize_stream_timeout (diff) | |
parent | Unused import (diff) | |
download | synapse-b1491dfd7cdfe1109b8bb7eac78ad96b69ffafca.tar.xz |
Merge pull request #103 from matrix-org/no_tls_private_key
Don't look for a TLS private key if we have set --no-tls
Diffstat (limited to 'synapse/crypto')
-rw-r--r-- | synapse/crypto/context_factory.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/crypto/context_factory.py b/synapse/crypto/context_factory.py index 24d4abf3e9..2f8618a0df 100644 --- a/synapse/crypto/context_factory.py +++ b/synapse/crypto/context_factory.py @@ -38,7 +38,10 @@ class ServerContextFactory(ssl.ContextFactory): logger.exception("Failed to enable eliptic curve for TLS") context.set_options(SSL.OP_NO_SSLv2 | SSL.OP_NO_SSLv3) context.use_certificate(config.tls_certificate) - context.use_privatekey(config.tls_private_key) + + if not config.no_tls: + context.use_privatekey(config.tls_private_key) + context.load_tmp_dh(config.tls_dh_params_path) context.set_cipher_list("!ADH:HIGH+kEDH:!AECDH:HIGH+kEECDH") |