mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Followup on r81233: fix test_ssl with OpenSSL < 1.0.0.
This commit is contained in:
parent
152efa2ae2
commit
467f28de03
3 changed files with 59 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue