Skip to content

Commit

Permalink
fix: disable default root certificates in push service (#350)
Browse files Browse the repository at this point in the history
Explicitly disable built-in root certificates when creating HTTP client to
ensure only the provided certificate authority is used for TLS
verification.
  • Loading branch information
rubdos authored Jan 5, 2025
1 parent e6affcc commit dd43d93
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/push_service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ impl PushService {
) -> Self {
let cfg = cfg.into();
let client = reqwest::ClientBuilder::new()
.tls_built_in_root_certs(false)
.add_root_certificate(
reqwest::Certificate::from_pem(
cfg.certificate_authority.as_bytes(),
Expand Down

0 comments on commit dd43d93

Please sign in to comment.