Skip to content

Commit

Permalink
fix: fix webpki-roots build feature
Browse files Browse the repository at this point in the history
  • Loading branch information
junkurihara committed Jul 26, 2024
1 parent 8c77cb4 commit 6b3a4d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions rpxy-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ publish.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
# default = ["http3-s2n", "sticky-cookie", "cache", "rustls-backend", "acme"]
# default = ["http3-quinn", "sticky-cookie", "cache", "rustls-backend", "acme"]
http3-quinn = ["socket2", "quinn", "h3", "h3-quinn", "rpxy-certs/http3"]
http3-s2n = [
"s2n-quic",
Expand Down
12 changes: 6 additions & 6 deletions rpxy-lib/src/forwarder/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,18 @@ where
/// Build forwarder
pub async fn try_new(_globals: &Arc<Globals>) -> RpxyResult<Self> {
// build hyper client with rustls and webpki, only https is allowed
#[cfg(feature = "rustls-backend-webpki")]
#[cfg(feature = "webpki-roots")]
let builder = hyper_rustls::HttpsConnectorBuilder::new().with_webpki_roots();
#[cfg(feature = "rustls-backend-webpki")]
#[cfg(feature = "webpki-roots")]
let builder_h2 = hyper_rustls::HttpsConnectorBuilder::new().with_webpki_roots();
#[cfg(feature = "rustls-backend-webpki")]
#[cfg(feature = "webpki-roots")]
info!("Mozilla WebPKI root certs with rustls is used for the connection to backend applications");

#[cfg(not(feature = "rustls-backend-webpki"))]
#[cfg(not(feature = "webpki-roots"))]
let builder = hyper_rustls::HttpsConnectorBuilder::new().with_platform_verifier();
#[cfg(not(feature = "rustls-backend-webpki"))]
#[cfg(not(feature = "webpki-roots"))]
let builder_h2 = hyper_rustls::HttpsConnectorBuilder::new().with_platform_verifier();
#[cfg(not(feature = "rustls-backend-webpki"))]
#[cfg(not(feature = "webpki-roots"))]
info!("Platform verifier with rustls is used for the connection to backend applications");

let mut http = HttpConnector::new();
Expand Down

0 comments on commit 6b3a4d5

Please sign in to comment.