Skip to content

Commit a6ce8b0

Browse files
feat: introduce rustls-no-provider feature flag (#1103)
### Description Activating the `rustls` feature of `reqwest` pulls in `aws-lc-rs` by default as the crypto provider. To allow people to make their own decision about which crypto provider to use with `rustls`, we should depend on the `rustls-no-provider` feature flag instead. We add our own `rustls-no-provider` feature flag which allows users to opt out of `aws-lc-rs` being the default crypto provider of `reqwest` in a backwards-compatible way. #### Issues Resolves: #1102 #### Reminders - Add GH Issue ID _&_ Linear ID (if applicable) - Add an entry to CHANGELOG.md, following the format of existing entries - The PR title should use [Conventional Commits](https://develop.sentry.dev/engineering-practices/commit-messages/#type) style (`feat:`, `fix:`, `ref:`, `meta:`, etc.) - Useful links for external contributors: [Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord community](https://discord.gg/sentry)
1 parent df88275 commit a6ce8b0

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

sentry/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ ureq = ["dep:ureq", "httpdate"]
5858
# transport settings
5959
native-tls = ["dep:native-tls", "reqwest?/native-tls", "ureq?/native-tls"]
6060
rustls = ["dep:rustls", "reqwest?/rustls", "ureq?/rustls"]
61+
rustls-no-provider = ["dep:rustls", "reqwest?/rustls-no-provider", "ureq?/rustls"]
6162
embedded-svc-http = ["dep:embedded-svc", "dep:esp-idf-svc"]
6263

6364
[dependencies]

sentry/src/transports/ureq.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
use std::time::Duration;
22

33
use ureq::http::Response;
4-
#[cfg(any(feature = "rustls", feature = "native-tls"))]
4+
#[cfg(any(
5+
feature = "rustls",
6+
feature = "rustls-no-provider",
7+
feature = "native-tls"
8+
))]
59
use ureq::tls::{TlsConfig, TlsProvider};
610
use ureq::{Agent, Proxy};
711

@@ -43,7 +47,7 @@ impl UreqHttpTransport {
4347
.build(),
4448
);
4549
}
46-
#[cfg(feature = "rustls")]
50+
#[cfg(any(feature = "rustls", feature = "rustls-no-provider"))]
4751
{
4852
builder = builder.tls_config(
4953
TlsConfig::builder()

0 commit comments

Comments
 (0)