diff --git a/synapse/crypto/context_factory.py b/synapse/crypto/context_factory.py index bfd7910f30..3faca79200 100644 --- a/synapse/crypto/context_factory.py +++ b/synapse/crypto/context_factory.py @@ -21,12 +21,8 @@ from OpenSSL import SSL, crypto from twisted.internet._sslverify import _defaultCurveName from twisted.internet.abstract import isIPAddress, isIPv6Address from twisted.internet.interfaces import IOpenSSLClientConnectionCreator -from twisted.internet.ssl import ( - CertificateOptions, - ContextFactory, - OpenSSLCertificateAuthorities, - platformTrust, -) +from twisted.internet.ssl import CertificateOptions, ContextFactory, platformTrust +from twisted.internet._sslverify import OpenSSLCertificateAuthorities from twisted.python.failure import Failure logger = logging.getLogger(__name__)