]> granicus.if.org Git - python/commitdiff
enable cert validation in test
authorBenjamin Peterson <benjamin@python.org>
Thu, 8 Jan 2015 04:12:43 +0000 (22:12 -0600)
committerBenjamin Peterson <benjamin@python.org>
Thu, 8 Jan 2015 04:12:43 +0000 (22:12 -0600)
Lib/test/test_ssl.py

index 3f1ba2fa0fcf246415db3819bfb2b277c7c2c715..b7504c63f07d9075eb1207c4a56a0e7019670041 100644 (file)
@@ -3164,7 +3164,10 @@ else:
 
         def test_shared_ciphers(self):
             server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
-            client_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
+            server_context.load_cert_chain(SIGNED_CERTFILE)
+            client_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
+            client_context.verify_mode = ssl.CERT_REQUIRED
+            client_context.load_verify_locations(SIGNING_CA)
             client_context.set_ciphers("RC4")
             server_context.set_ciphers("AES:RC4")
             stats = server_params_test(client_context, server_context)