]> granicus.if.org Git - python/commitdiff
Try to fix buildbot failures with old OpenSSLs.
authorAntoine Pitrou <solipsis@pitrou.net>
Mon, 17 May 2010 10:30:00 +0000 (10:30 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Mon, 17 May 2010 10:30:00 +0000 (10:30 +0000)
Lib/test/test_ssl.py

index 5086cc3ad3b3ae49b4831539e772cf1a2a3e45a5..60b417e6dd01907c7ea2e8411f9fa1ccf4f9d045 100644 (file)
@@ -217,6 +217,7 @@ class ContextTests(unittest.TestCase):
         with self.assertRaisesRegexp(ssl.SSLError, "PEM lib"):
             ctx.load_cert_chain(EMPTYCERT)
         # Separate key and cert
+        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
         ctx.load_cert_chain(ONLYCERT, ONLYKEY)
         ctx.load_cert_chain(certfile=ONLYCERT, keyfile=ONLYKEY)
         ctx.load_cert_chain(certfile=BYTES_ONLYCERT, keyfile=BYTES_ONLYKEY)
@@ -227,6 +228,7 @@ class ContextTests(unittest.TestCase):
         with self.assertRaisesRegexp(ssl.SSLError, "PEM lib"):
             ctx.load_cert_chain(certfile=ONLYKEY, keyfile=ONLYCERT)
         # Mismatching key and cert
+        ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
         with self.assertRaisesRegexp(ssl.SSLError, "key values mismatch"):
             ctx.load_cert_chain(CERTFILE, ONLYKEY)