Skip to content

Commit 820701f

Browse files
authored
PYTHON-5038 Resolve certificate verify failed: Missing Authority Key Identifier (#2062)
1 parent f8bd891 commit 820701f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

test/asynchronous/test_encryption.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2884,6 +2884,8 @@ async def http_post(self, path, data=None):
28842884
# each request because the server is single threaded.
28852885
ctx = ssl.create_default_context(cafile=CA_PEM)
28862886
ctx.load_cert_chain(CLIENT_PEM)
2887+
ctx.check_hostname = False
2888+
ctx.verify_mode = ssl.CERT_NONE
28872889
conn = http.client.HTTPSConnection("127.0.0.1:9003", context=ctx)
28882890
try:
28892891
if data is not None:

test/test_encryption.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2866,6 +2866,8 @@ def http_post(self, path, data=None):
28662866
# each request because the server is single threaded.
28672867
ctx = ssl.create_default_context(cafile=CA_PEM)
28682868
ctx.load_cert_chain(CLIENT_PEM)
2869+
ctx.check_hostname = False
2870+
ctx.verify_mode = ssl.CERT_NONE
28692871
conn = http.client.HTTPSConnection("127.0.0.1:9003", context=ctx)
28702872
try:
28712873
if data is not None:

0 commit comments

Comments
 (0)