]> granicus.if.org Git - python/commitdiff
Backport disabling of SSLv3 in ssl._create_stdlib_context() (issue #22638).
authorAntoine Pitrou <solipsis@pitrou.net>
Fri, 17 Oct 2014 17:28:30 +0000 (19:28 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Fri, 17 Oct 2014 17:28:30 +0000 (19:28 +0200)
The backport currently doesn't achieve anything since the function isn't used (yet).

Lib/ssl.py

index dea893cf7737fec07456d8f350eb42336c18bf51..025aadeff4de68187d431b124c15af295f49bf85 100644 (file)
@@ -445,6 +445,9 @@ def _create_stdlib_context(protocol=PROTOCOL_SSLv23, cert_reqs=None,
     context = SSLContext(protocol)
     # SSLv2 considered harmful.
     context.options |= OP_NO_SSLv2
+    # SSLv3 has problematic security and is only required for really old
+    # clients such as IE6 on Windows XP
+    context.options |= OP_NO_SSLv3
 
     if cert_reqs is not None:
         context.verify_mode = cert_reqs