1
0

suppress errors in native certificates

This commit is contained in:
EAimTY 2023-05-25 22:03:27 +09:00
parent f0e931d7bd
commit 079e724948
2 changed files with 4 additions and 2 deletions

View File

@ -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")]

View File

@ -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));
} }
} }