mirror of
https://github.com/warp-tech/warpgate.git
synced 2024-09-20 06:46:17 +08:00
lint
This commit is contained in:
parent
6e4835739c
commit
9d314988c0
|
@ -5,10 +5,7 @@ use std::time::SystemTime;
|
|||
use rustls::client::{ServerCertVerified, ServerCertVerifier, WebPkiVerifier};
|
||||
use rustls::server::{ClientHello, NoClientAuth, ResolvesServerCert};
|
||||
use rustls::sign::CertifiedKey;
|
||||
use rustls::{
|
||||
Certificate, ClientConfig, Error as TlsError, PrivateKey,
|
||||
ServerConfig, ServerName,
|
||||
};
|
||||
use rustls::{Certificate, ClientConfig, Error as TlsError, PrivateKey, ServerConfig, ServerName};
|
||||
|
||||
use super::ROOT_CERT_STORE;
|
||||
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
use once_cell::sync::Lazy;
|
||||
use rustls::RootCertStore;
|
||||
|
||||
#[allow(clippy::expect_used)]
|
||||
pub static ROOT_CERT_STORE: Lazy<RootCertStore> = Lazy::new(|| {
|
||||
let mut roots = RootCertStore::empty();
|
||||
for cert in rustls_native_certs::load_native_certs().expect("could not load root TLS certificates") {
|
||||
roots.add(&rustls::Certificate(cert.0)).unwrap();
|
||||
for cert in
|
||||
rustls_native_certs::load_native_certs().expect("could not load root TLS certificates")
|
||||
{
|
||||
roots.add(&rustls::Certificate(cert.0)).expect("could not add root TLS certificate");
|
||||
}
|
||||
return roots;
|
||||
roots
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue