Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion sentry_sdk/transport.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from abc import ABC, abstractmethod
import io
import os
import gzip
import socket
import time
Expand Down Expand Up @@ -457,7 +458,6 @@ def _get_pool_options(self, ca_certs):
options = {
"num_pools": self._num_pools,
"cert_reqs": "CERT_REQUIRED",
"ca_certs": ca_certs or certifi.where(),
}

socket_options = None # type: Optional[List[Tuple[int, int, int | bytes]]]
Expand All @@ -477,6 +477,13 @@ def _get_pool_options(self, ca_certs):
if socket_options is not None:
options["socket_options"] = socket_options

options["ca_certs"] = (
ca_certs # User-provided bundle from the SDK init
or os.environ.get("SSL_CERT_FILE")
or os.environ.get("REQUESTS_CA_BUNDLE")
or certifi.where()
)

return options

def _in_no_proxy(self, parsed_dsn):
Expand Down