suppress errors in native certificates
This commit is contained in:
parent
f0e931d7bd
commit
079e724948
@ -64,6 +64,8 @@ pub enum Error {
|
|||||||
Connection(#[from] ConnectionError),
|
Connection(#[from] ConnectionError),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Model(#[from] ModelError),
|
Model(#[from] ModelError),
|
||||||
|
#[error("load native certificates error: {0}")]
|
||||||
|
LoadNativeCerts(IoError),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Rustls(#[from] RustlsError),
|
Rustls(#[from] RustlsError),
|
||||||
#[error("timeout establishing connection")]
|
#[error("timeout establishing connection")]
|
||||||
|
@ -30,8 +30,8 @@ pub fn load_certs(paths: Vec<PathBuf>, disable_native: bool) -> Result<RootCertS
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !disable_native {
|
if !disable_native {
|
||||||
for cert in rustls_native_certs::load_native_certs()? {
|
for cert in rustls_native_certs::load_native_certs().map_err(Error::LoadNativeCerts)? {
|
||||||
certs.add(&Certificate(cert.0))?;
|
let _ = certs.add(&Certificate(cert.0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user