You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sane defaults for SSLContext options and ciphers #72230
I like to introduce sane defaults for SSLContext options and ciphers:
Changed in version 3.6: The context is created with more secure default values. PROTOCOL_TLS is the default protocol. The options OP_NO_COMPRESSION, OP_CIPHER_SERVER_PREFERENCE, OP_SINGLE_DH_USE, OP_SINGLE_ECDH_USE, OP_NO_SSLv2 (except for PROTOCOL_SSLv2), and OP_NO_SSLv3 (except for PROTOCOL_SSLv3) are set by default. The initial cipher suite list contains only HIGH ciphers, no NULL ciphers and MD5 ciphers (except for PROTOCOL_SSLv2).
+1 from me for a model where ssl.get_default_context() can change in maintenance releases, while the ssl.SSLContext defaults get updated for feature releases.
Activity
tiran commentedon Sep 9, 2016
I like to introduce sane defaults for SSLContext options and ciphers:
Changed in version 3.6: The context is created with more secure default values. PROTOCOL_TLS is the default protocol. The options OP_NO_COMPRESSION, OP_CIPHER_SERVER_PREFERENCE, OP_SINGLE_DH_USE, OP_SINGLE_ECDH_USE, OP_NO_SSLv2 (except for PROTOCOL_SSLv2), and OP_NO_SSLv3 (except for PROTOCOL_SSLv3) are set by default. The initial cipher suite list contains only HIGH ciphers, no NULL ciphers and MD5 ciphers (except for PROTOCOL_SSLv2).
ncoghlan commentedon Sep 10, 2016
+1 from me for a model where ssl.get_default_context() can change in maintenance releases, while the ssl.SSLContext defaults get updated for feature releases.
tiran commentedon Sep 10, 2016
I'm planning to remove PROTOCOL_TLS again and replace it with something more sensible.
python-dev commentedon Sep 10, 2016
New changeset 1b4c5d06c028 by Christian Heimes in branch 'default':
bpo-28043: SSLContext has improved default settings
https://hg.python.org/cpython/rev/1b4c5d06c028
tiran commentedon Sep 6, 2017
3.6 and master are looking good. Should I backport the fix to 2.7, too?
vstinner commentedon Feb 15, 2019
New changeset b8eaec6 by Victor Stinner (stratakis) in branch '2.7':
[2.7] bpo-28043: improved default settings for SSLContext (GH-10608)
b8eaec6