Allow configuration to ignore invalid SSL certs

This will be useful for sytest, and sytest only, hence the aggressive
config key name.
This commit is contained in:
Daniel Wagner-Hall 2015-09-09 12:02:07 +01:00
parent bdf2e5865a
commit 81a93ddcc8
7 changed files with 50 additions and 12 deletions

View file

@ -57,14 +57,14 @@ incoming_responses_counter = metrics.register_counter(
class MatrixFederationEndpointFactory(object):
def __init__(self, hs):
self.tls_context_factory = hs.tls_context_factory
self.tls_server_context_factory = hs.tls_server_context_factory
def endpointForURI(self, uri):
destination = uri.netloc
return matrix_federation_endpoint(
reactor, destination, timeout=10,
ssl_context_factory=self.tls_context_factory
ssl_context_factory=self.tls_server_context_factory
)