summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ssl.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2015-01-08 04:12:43 (GMT)
committerBenjamin Peterson <benjamin@python.org>2015-01-08 04:12:43 (GMT)
commit15042921adf08c787bf856be02e07246e125550d (patch)
tree3c248eafa0ca61212c695123a2716bc07adda41c /Lib/test/test_ssl.py
parent23ef9fac16c61543ebe6261f2524fdb13a8e1d03 (diff)
downloadcpython-15042921adf08c787bf856be02e07246e125550d.zip
cpython-15042921adf08c787bf856be02e07246e125550d.tar.gz
cpython-15042921adf08c787bf856be02e07246e125550d.tar.bz2
enable cert validation in test
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r--Lib/test/test_ssl.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 3f1ba2f..b7504c6 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -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)