[Python-checkins] cpython: enable cert validation in test
benjamin.peterson
python-checkins at python.org
Thu Jan 8 05:12:47 CET 2015
https://hg.python.org/cpython/rev/b89c84a4426a
changeset: 94074:b89c84a4426a
user: Benjamin Peterson <benjamin at python.org>
date: Wed Jan 07 22:12:43 2015 -0600
summary:
enable cert validation in test
files:
Lib/test/test_ssl.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -3164,7 +3164,10 @@
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)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list