bump deps

This commit is contained in:
Σrebe - Romain GERARD 2024-09-26 14:32:14 +02:00
parent 731eadffe8
commit 38b3b18297
4 changed files with 129 additions and 133 deletions

View file

@ -112,8 +112,11 @@ pub fn tls_connector(
let mut root_store = rustls::RootCertStore::empty();
// Load system certificates and add them to the root store
let certs = rustls_native_certs::load_native_certs().with_context(|| "Cannot load system certificates")?;
for cert in certs {
let certs = rustls_native_certs::load_native_certs();
certs.errors.iter().for_each(|err| {
warn!("cannot load system some system certificates: {}", err);
});
for cert in certs.certs {
if let Err(err) = root_store.add(cert) {
warn!("cannot load a system certificate: {:?}", err);
continue;

View file

@ -194,10 +194,9 @@ impl WsServer {
let header = ppp::v2::Builder::with_addresses(
ppp::v2::Version::Two | ppp::v2::Command::Proxy,
ppp::v2::Protocol::Stream,
(client_address, tx.local_addr().unwrap()),
(client_address, tx.local_addr()?),
)
.build()
.unwrap();
.build()?;
let _ = tx.write_all(&header).await;
}