formatting changes for pep8
This commit is contained in:
parent
3d605853c8
commit
07b4f88de9
|
@ -47,7 +47,9 @@ class TlsConfig(Config):
|
||||||
|
|
||||||
self.tls_fingerprints = config["tls_fingerprints"]
|
self.tls_fingerprints = config["tls_fingerprints"]
|
||||||
|
|
||||||
self.tls_ignore_certificate_validation = config.get("tls_ignore_certificate_validation", False)
|
self.tls_ignore_certificate_validation = config.get(
|
||||||
|
"tls_ignore_certificate_validation", False
|
||||||
|
)
|
||||||
|
|
||||||
# Check that our own certificate is included in the list of fingerprints
|
# Check that our own certificate is included in the list of fingerprints
|
||||||
# and include it if it is not.
|
# and include it if it is not.
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
|
|
||||||
from twisted.internet import ssl
|
from twisted.internet import ssl
|
||||||
from OpenSSL import SSL, crypto
|
from OpenSSL import SSL, crypto
|
||||||
from twisted.internet._sslverify import _defaultCurveName, ClientTLSOptions, OpenSSLCertificateOptions, \
|
from twisted.internet._sslverify import _defaultCurveName, ClientTLSOptions, \
|
||||||
optionsForClientTLS
|
OpenSSLCertificateOptions, optionsForClientTLS
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,8 @@ def matrix_federation_endpoint(reactor, destination, tls_client_options_factory=
|
||||||
Args:
|
Args:
|
||||||
reactor: Twisted reactor.
|
reactor: Twisted reactor.
|
||||||
destination (bytes): The name of the server to connect to.
|
destination (bytes): The name of the server to connect to.
|
||||||
tls_client_options_factory (synapse.crypto.context_factory.ClientTLSOptionsFactory):
|
tls_client_options_factory
|
||||||
|
(synapse.crypto.context_factory.ClientTLSOptionsFactory):
|
||||||
Factory which generates TLS options for client connections.
|
Factory which generates TLS options for client connections.
|
||||||
timeout (int): connection timeout in seconds
|
timeout (int): connection timeout in seconds
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -69,7 +69,7 @@ class MatrixFederationEndpointFactory(object):
|
||||||
|
|
||||||
return matrix_federation_endpoint(
|
return matrix_federation_endpoint(
|
||||||
reactor, destination, timeout=10,
|
reactor, destination, timeout=10,
|
||||||
tls_client_options_factory = self.tls_client_options_factory
|
tls_client_options_factory=self.tls_client_options_factory
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue