Blame SOURCES/00229-Expect-a-failure-when-trying-to-connect-with-SSLv2-c.patch

854cc6
From a1d7acf899fccd0eda10e011e2d11d1d81c2d9e6 Mon Sep 17 00:00:00 2001
854cc6
From: Robert Kuska <rkuska@redhat.com>
854cc6
Date: Wed, 9 Mar 2016 20:16:17 +0100
854cc6
Subject: [PATCH] Expect a failure when trying to connect with SSLv2 client to
854cc6
 SSLv23 server. Default value of options in tests enchanced to reflect SSLv2
854cc6
 being disabled
854cc6
854cc6
---
854cc6
 Lib/test/test_ssl.py | 4 ++--
854cc6
 1 file changed, 2 insertions(+), 2 deletions(-)
854cc6
854cc6
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
854cc6
index 11122db..b2ba186 100644
854cc6
--- a/Lib/test/test_ssl.py
854cc6
+++ b/Lib/test/test_ssl.py
854cc6
@@ -691,7 +691,7 @@ class ContextTests(unittest.TestCase):
854cc6
     @skip_if_broken_ubuntu_ssl
854cc6
     def test_options(self):
854cc6
         ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
854cc6
-        self.assertEqual(ssl.OP_ALL, ctx.options)
854cc6
+        self.assertEqual(ssl.OP_ALL | ssl.OP_NO_SSLv2, ctx.options)
854cc6
         ctx.options |= ssl.OP_NO_SSLv2
854cc6
         self.assertEqual(ssl.OP_ALL | ssl.OP_NO_SSLv2,
854cc6
                          ctx.options)
854cc6
@@ -2152,17 +2152,17 @@ else:
854cc6
             try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True)
854cc6
             try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True, ssl.CERT_OPTIONAL)
854cc6
             try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True, ssl.CERT_REQUIRED)
854cc6
-            try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, True)
854cc6
+            try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False)
854cc6
             try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv3, False)
854cc6
             try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_TLSv1, False)
854cc6
             # SSLv23 client with specific SSL options
854cc6
             if no_sslv2_implies_sslv3_hello():
854cc6
                 # No SSLv2 => client will use an SSLv3 hello on recent OpenSSLs
854cc6
                 try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False,
854cc6
                                    client_options=ssl.OP_NO_SSLv2)
854cc6
-            try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, True,
854cc6
+            try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False,
854cc6
                                client_options=ssl.OP_NO_SSLv3)
854cc6
-            try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, True,
854cc6
+            try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, False,
854cc6
                                client_options=ssl.OP_NO_TLSv1)
854cc6
 
854cc6
         @skip_if_broken_ubuntu_ssl
854cc6
-- 
854cc6
2.5.0
854cc6