diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-03-17 22:32:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-17 21:32:25 +0000 |
commit | c37db0211e36cd298426ff8811e547b0acd10bf4 (patch) | |
tree | 4ca360ac774aa64c29a763d2394680da0afad498 /synapse/server.py | |
parent | Set charset to utf-8 when adding headers for certain text content types (#7044) (diff) | |
download | synapse-c37db0211e36cd298426ff8811e547b0acd10bf4.tar.xz |
Share SSL contexts for non-federation requests (#7094)
Extends #5794 etc to the SimpleHttpClient so that it also applies to non-federation requests. Fixes #7092.
Diffstat (limited to 'synapse/server.py')
-rw-r--r-- | synapse/server.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/server.py b/synapse/server.py index fd2f69e928..1b980371de 100644 --- a/synapse/server.py +++ b/synapse/server.py @@ -26,7 +26,6 @@ import logging import os from twisted.mail.smtp import sendmail -from twisted.web.client import BrowserLikePolicyForHTTPS from synapse.api.auth import Auth from synapse.api.filtering import Filtering @@ -35,6 +34,7 @@ from synapse.appservice.api import ApplicationServiceApi from synapse.appservice.scheduler import ApplicationServiceScheduler from synapse.config.homeserver import HomeServerConfig from synapse.crypto import context_factory +from synapse.crypto.context_factory import RegularPolicyForHTTPS from synapse.crypto.keyring import Keyring from synapse.events.builder import EventBuilderFactory from synapse.events.spamcheck import SpamChecker @@ -310,7 +310,7 @@ class HomeServer(object): return ( InsecureInterceptableContextFactory() if self.config.use_insecure_ssl_client_just_for_testing_do_not_use - else BrowserLikePolicyForHTTPS() + else RegularPolicyForHTTPS() ) def build_simple_http_client(self): @@ -420,7 +420,7 @@ class HomeServer(object): return PusherPool(self) def build_http_client(self): - tls_client_options_factory = context_factory.ClientTLSOptionsFactory( + tls_client_options_factory = context_factory.FederationPolicyForHTTPS( self.config ) return MatrixFederationHttpClient(self, tls_client_options_factory) |