Commit 49f8725
fix(ssl): Pass CA bundle env vars to curl on macOS (#3301)
On macOS, sentry-cli links system libcurl which uses SecureTransport as
its TLS backend. SecureTransport ignores SSL_CERT_FILE, so custom CA
bundles (e.g. corporate MITM proxies) don't work even though
openssl_probe sets the env var. This reads SSL_CERT_FILE (or
CURL_CA_BUNDLE) back and passes it via CURLOPT_CAINFO, which
SecureTransport does honor.
Previously we would get a TLS validation when running through our https
proxy, like this
```
error: API request failed
Caused by:
0: API request failed
1: [60] SSL peer certificate or SSH remote key was not OK (SSL certificate problem: unable to get local issuer certificate)
```
Let me know if I should approach this differently or open an issue first
to discuss this
---------
Co-authored-by: Daniel Szoke <daniel.szoke@sentry.io>1 parent 1d51919 commit 49f8725
2 files changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
4 | 10 | | |
5 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
247 | 253 | | |
248 | 254 | | |
249 | 255 | | |
| |||
0 commit comments