forked from MirrorHub/synapse
Add a comment about SSLv23_METHOD (#8043)
This commit is contained in:
parent
2f9fd5ab00
commit
de6f892065
2 changed files with 9 additions and 0 deletions
1
changelog.d/8043.misc
Normal file
1
changelog.d/8043.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Add a comment to `ServerContextFactory` about the use of `SSLv23_METHOD`.
|
|
@ -48,6 +48,14 @@ class ServerContextFactory(ContextFactory):
|
||||||
connections."""
|
connections."""
|
||||||
|
|
||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
|
# TODO: once pyOpenSSL exposes TLS_METHOD and SSL_CTX_set_min_proto_version,
|
||||||
|
# switch to those (see https://github.com/pyca/cryptography/issues/5379).
|
||||||
|
#
|
||||||
|
# note that, despite the confusing name, SSLv23_METHOD does *not* enforce SSLv2
|
||||||
|
# or v3, but is a synonym for TLS_METHOD, which allows the client and server
|
||||||
|
# to negotiate an appropriate version of TLS constrained by the version options
|
||||||
|
# set with context.set_options.
|
||||||
|
#
|
||||||
self._context = SSL.Context(SSL.SSLv23_METHOD)
|
self._context = SSL.Context(SSL.SSLv23_METHOD)
|
||||||
self.configure_context(self._context, config)
|
self.configure_context(self._context, config)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue