Skip to content

Commit

Permalink
Switch to add_parsable_certificates (#114)
Browse files Browse the repository at this point in the history
* added fallback to bundled webpki certs if adding root cert fails

* switch to using add_parsable_certs

* clippy

* add back platform check for webpki-roots dependency
  • Loading branch information
matthme authored Nov 12, 2024
1 parent 4e29340 commit d5285ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions crates/tx5-go-pion-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ impl Api {
}

// need to forget it every time, otherwise drop will run
Box::into_raw(closure);
let _ = Box::into_raw(closure);
return;
}
TY_PEER_CON_ON_ICE_CANDIDATE => Event::PeerConICECandidate {
Expand Down Expand Up @@ -356,7 +356,7 @@ impl Api {
closure(evt);

// need to forget it every time, otherwise drop will run
Box::into_raw(closure);
let _ = Box::into_raw(closure);
}

let cb: DynCb = Box::new(Arc::new(cb));
Expand Down
11 changes: 6 additions & 5 deletions crates/tx5-signal/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,13 @@ fn priv_system_tls() -> Arc<rustls::ClientConfig> {
target_os = "linux",
target_os = "macos"
))]
for cert in rustls_native_certs::load_native_certs()
.expect("failed to load system tls certs")
{
roots
.add(&rustls::Certificate(cert.0))
.expect("faild to add cert to root");
let certs = rustls_native_certs::load_native_certs()
.expect("failed to load system tls certs")
.into_iter()
.map(|c| c.0)
.collect::<Vec<Vec<u8>>>();
roots.add_parsable_certificates(certs.as_ref());
}

Arc::new(
Expand Down

0 comments on commit d5285ec

Please sign in to comment.