cpython: 56f64ec9259f (original) (raw)

--- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -674,11 +674,11 @@ class ContextTests(unittest.TestCase): @skip_if_broken_ubuntu_ssl def test_options(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)

@@ -2172,17 +2172,17 @@ else: " SSL2 client to SSL23 server test unexpectedly failed:\n %s\n" % str(x)) if hasattr(ssl, 'PROTOCOL_SSLv3'):

if hasattr(ssl, 'PROTOCOL_SSLv3'):

if hasattr(ssl, 'PROTOCOL_SSLv3'):

@@ -2214,8 +2214,8 @@ else: try_protocol_combo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_TLSv1, False) if no_sslv2_implies_sslv3_hello(): # No SSLv2 => client will use an SSLv3 hello on recent OpenSSLs

@skip_if_broken_ubuntu_ssl def test_protocol_tlsv1(self):

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -107,6 +107,9 @@ Library at the end if the FileInput was opened with binary mode. Patch by Ryosuke Ito. +- Issue #25530: Disable the vulnerable SSLv3 protocol by default when creating

--- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -2037,6 +2037,8 @@ context_new(PyTypeObject *type, PyObject options = SSL_OP_ALL & ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS; if (proto_version != PY_SSL_VERSION_SSL2) options |= SSL_OP_NO_SSLv2;

#ifndef OPENSSL_NO_ECDH