summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2019-04-01 18:14:30 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2019-04-01 18:14:30 +0100
commit9d27f8e9e8a23067afbb3c48d174db8387433cda (patch)
tree5123bcdeb7967416699bd1e6df64b91b0565f37a /synapse
parentMerge branch 'develop' into anoa/msc_1711 (diff)
downloadsynapse-9d27f8e9e8a23067afbb3c48d174db8387433cda.tar.xz
Cache config
Diffstat (limited to 'synapse')
-rw-r--r--synapse/crypto/context_factory.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/crypto/context_factory.py b/synapse/crypto/context_factory.py

index bfdcd23959..41f23a3e1a 100644 --- a/synapse/crypto/context_factory.py +++ b/synapse/crypto/context_factory.py
@@ -127,18 +127,19 @@ class ClientTLSOptionsFactory(object): to remote servers for federation.""" def __init__(self, config): + self._config = config self._options_validate = CertificateOptions( # This option implies verify=True trustRoot=config.federation_custom_ca_list, ) self._options_novalidate = CertificateOptions(verify=False) - def get_options(self, host, config): + def get_options(self, host): # Use _makeContext so that we get a fresh OpenSSL CTX each time. # Check if certificate verification has been enabled if (config.federation_verify_certificates and - host not in config.federation_certificate_validation_whitelist): + host not in self._config.federation_certificate_validation_whitelist): # Require verification return ClientTLSOptions(host, self._options_validate._makeContext())