8000 Beta: fix ssl for AIOHTTP client (#1262) · stripe/stripe-python@42edb39 · GitHub
[go: up one dir, main page]

Skip to content

Commit 42edb39

Browse files
Beta: fix ssl for AIOHTTP client (#1262)
1 parent 860adb4 commit 42edb39

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stripe/_http_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1399,9 +1399,11 @@ def __init__(
13991399
kwargs = {}
14001400
if self._verify_ssl_certs:
14011401
ssl_context = ssl.create_default_context(
1402-
capath=stripe.ca_bundle_path
1402+
cafile=stripe.ca_bundle_path
14031403
)
14041404
kwargs["connector"] = TCPConnector(ssl=ssl_context)
1405+
else:
1406+
kwargs["connector"] = TCPConnector(verify_ssl=False)
14051407

14061408
self._session = aiohttp.ClientSession(**kwargs)
14071409
self._timeout = timeout

0 commit comments

Comments
 (0)
0