diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-09-01 19:56:22 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-09-01 19:56:22 +0100 |
commit | ff79437d9bceef3e6c824906a7588f3658e80e13 (patch) | |
tree | 5b3fea43683e68d8e7ea246e97b9958f4a41913e /synapse/http/client.py | |
parent | Follow API renaming. state -> presence. mtime_ago -> last_active_ago (diff) | |
parent | Fix SSL for federation http client (diff) | |
download | synapse-ff79437d9bceef3e6c824906a7588f3658e80e13.tar.xz |
Merge branch 'server2server_tls' into develop
Diffstat (limited to 'synapse/http/client.py')
-rw-r--r-- | synapse/http/client.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py index 36ba2c6591..093bdf0e3f 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py @@ -113,8 +113,9 @@ class TwistedHttpClient(HttpClient): requests. """ - def __init__(self): + def __init__(self, hs): self.agent = MatrixHttpAgent(reactor) + self.hs = hs @defer.inlineCallbacks def put_json(self, destination, path, data): @@ -177,7 +178,10 @@ class TwistedHttpClient(HttpClient): retries_left = 5 # TODO: setup and pass in an ssl_context to enable TLS - endpoint = matrix_endpoint(reactor, destination, timeout=10) + endpoint = matrix_endpoint( + reactor, destination, timeout=10, + ssl_context_factory=self.hs.tls_context_factory + ) while True: try: |