Merge pull request #4531 from Quansight/change-default-ssl

Changed the default protocol
pull/4555/head
Thomas Kluyver 7 years ago committed by GitHub
commit 1a6fc8e5b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1420,8 +1420,13 @@ class NotebookApp(JupyterApp):
else:
# SSL may be missing, so only import it if it's to be used
import ssl
# Disable SSLv3 by default, since its use is discouraged.
ssl_options.setdefault('ssl_version', ssl.PROTOCOL_TLSv1)
# PROTOCOL_TLS selects the highest ssl/tls protocol version that both the client and
# server support. When PROTOCOL_TLS is not available use PROTOCOL_SSLv23.
# PROTOCOL_TLS is new in version 2.7.13, 3.5.3 and 3.6
ssl_options.setdefault(
'ssl_version',
getattr(ssl, 'PROTOCOL_TLS', ssl.PROTOCOL_SSLv23)
)
if ssl_options.get('ca_certs', False):
ssl_options.setdefault('cert_reqs', ssl.CERT_REQUIRED)

Loading…
Cancel
Save