summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2019-04-02 11:49:10 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2019-04-02 11:49:10 +0100
commitcc149b11ea89d4d8962b5a5117fa2c747fcd96e5 (patch)
treebf94271e074fc3330cf1de54230728a6cd69e0ea
parentCheck for type instead of not None (diff)
downloadsynapse-cc149b11ea89d4d8962b5a5117fa2c747fcd96e5.tar.xz
Give MFA config access
-rw-r--r--synapse/http/federation/matrix_federation_agent.py5
-rw-r--r--synapse/http/matrixfederationclient.py1
2 files changed, 4 insertions, 2 deletions
diff --git a/synapse/http/federation/matrix_federation_agent.py b/synapse/http/federation/matrix_federation_agent.py
index 8985649227..7c5df38f5f 100644
--- a/synapse/http/federation/matrix_federation_agent.py
+++ b/synapse/http/federation/matrix_federation_agent.py
@@ -79,10 +79,11 @@ class MatrixFederationAgent(object):
 
     def __init__(
         self, reactor, tls_client_options_factory,
-        _well_known_tls_policy=None,
+        config, _well_known_tls_policy=None,
         _srv_resolver=None,
         _well_known_cache=well_known_cache,
     ):
+        self.config = config
         self._reactor = reactor
         self._clock = Clock(reactor)
 
@@ -149,7 +150,7 @@ class MatrixFederationAgent(object):
             tls_options = None
         else:
             tls_options = self._tls_client_options_factory.get_options(
-                res.tls_server_name.decode("ascii"), self.hs.config,
+                res.tls_server_name.decode("ascii"), self.config,
             )
 
         # make sure that the Host header is set correctly
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index ff63d0b2a8..cd17b48b71 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -177,6 +177,7 @@ class MatrixFederationHttpClient(object):
         self.agent = MatrixFederationAgent(
             hs.get_reactor(),
             tls_client_options_factory,
+            hs.config,
         )
         self.clock = hs.get_clock()
         self._store = hs.get_datastore()