diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-08 23:06:24 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-08 23:06:24 (GMT) |
commit | 81564093a10d1bad6dc48d68e40e322731517b6e (patch) | |
tree | 5208a0893f984580c732eeb311e09a88b00d1d50 /Lib/test/test_ssl.py | |
parent | 7c0a2271ff4ee62f5cecef8f3d106cbda91cf40a (diff) | |
download | cpython-81564093a10d1bad6dc48d68e40e322731517b6e.zip cpython-81564093a10d1bad6dc48d68e40e322731517b6e.tar.gz cpython-81564093a10d1bad6dc48d68e40e322731517b6e.tar.bz2 |
Issue #1051: Add a script (Lib/test/make_ssl_certs.py) to generate the
custom certificate and private key files used by SSL-related certs.
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r-- | Lib/test/test_ssl.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 0b9e6b5..b4ec4d5 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -36,6 +36,11 @@ HOST = support.HOST data_file = lambda name: os.path.join(os.path.dirname(__file__), name) +# The custom key and certificate files used in test_ssl are generated +# using Lib/test/make_ssl_certs.py. +# Other certificates are simply fetched from the Internet servers they +# are meant to authenticate. + CERTFILE = data_file("keycert.pem") BYTES_CERTFILE = os.fsencode(CERTFILE) ONLYCERT = data_file("ssl_cert.pem") @@ -368,7 +373,7 @@ class ContextTests(unittest.TestCase): # Mismatching key and cert ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1) with self.assertRaisesRegexp(ssl.SSLError, "key values mismatch"): - ctx.load_cert_chain(CERTFILE, ONLYKEY) + ctx.load_cert_chain(SVN_PYTHON_ORG_ROOT_CERT, ONLYKEY) def test_load_verify_locations(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1) |