summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/args/mod.rs20
1 files changed, 13 insertions, 7 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs
index afad0528c..0f6f050ef 100644
--- a/cli/args/mod.rs
+++ b/cli/args/mod.rs
@@ -640,8 +640,6 @@ pub enum RootCertStoreLoadError {
UnknownStore(String),
#[error("Unable to add pem file to certificate store: {0}")]
FailedAddPemFile(String),
- #[error("Unable to add system certificate to certificate store: {0}")]
- FailedAddSystemCert(String),
#[error("Failed opening CA file: {0}")]
CaFileOpenError(String),
}
@@ -675,11 +673,19 @@ pub fn get_root_cert_store(
"system" => {
let roots = load_native_certs().expect("could not load platform certs");
for root in roots {
- root_cert_store
- .add(rustls::pki_types::CertificateDer::from(root.0))
- .map_err(|e| {
- RootCertStoreLoadError::FailedAddSystemCert(e.to_string())
- })?;
+ if let Err(err) = root_cert_store
+ .add(rustls::pki_types::CertificateDer::from(root.0.clone()))
+ {
+ log::error!(
+ "{}",
+ colors::yellow(&format!(
+ "Unable to add system certificate to certificate store: {:?}",
+ err
+ ))
+ );
+ let hex_encoded_root = faster_hex::hex_string(&root.0);
+ log::error!("{}", colors::gray(&hex_encoded_root));
+ }
}
}
_ => {