Skip to content

Commit

Permalink
feat(urllib): try to use certifi.where() if request.ca_certs are not …
Browse files Browse the repository at this point in the history
…provided
  • Loading branch information
spawn-guy committed Oct 8, 2024
1 parent e9e2be7 commit 0fd6ea1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kombu/asynchronous/http/urllib3_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ def get_pool(self, request: Request):
# CA Certificates
if request.ca_certs is not None:
_pool.connection_pool_kw['ca_certs'] = request.ca_certs
elif request.validate_cert is True:
try:
from certifi import where
_pool.connection_pool_kw['ca_certs'] = where()
except ImportError:
pass

# Client Certificates
if request.client_cert is not None:
Expand Down

0 comments on commit 0fd6ea1

Please sign in to comment.