summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ssl.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-05-16 19:22:44 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-05-16 19:22:44 (GMT)
commit467f28de03bea1c27c33d6c0eb214b56cc837557 (patch)
treee3d93cfc1374797eeef41183aabc65c6fb1aca6c /Lib/test/test_ssl.py
parent152efa2ae2532d29b03d449f245b2bd6895d3fcb (diff)
downloadcpython-467f28de03bea1c27c33d6c0eb214b56cc837557.zip
cpython-467f28de03bea1c27c33d6c0eb214b56cc837557.tar.gz
cpython-467f28de03bea1c27c33d6c0eb214b56cc837557.tar.bz2
Followup on r81233: fix test_ssl with OpenSSL < 1.0.0.
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r--Lib/test/test_ssl.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 80c586b..6cd3a5e 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -300,6 +300,10 @@ class NetworkedTests(unittest.TestCase):
def test_connect_capath(self):
# Verify server certificates using the `capath` argument
+ # NOTE: the subject hashing algorithm has been changed between
+ # OpenSSL 0.9.8n and 1.0.0, as a result the capath directory must
+ # contain both versions of each certificate (same content, different
+ # filename) for this test to be portable accross OpenSSL releases.
ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
ctx.verify_mode = ssl.CERT_REQUIRED
ctx.load_verify_locations(capath=CAPATH)