summaryrefslogtreecommitdiff
path: root/cli/args/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/args/mod.rs')
-rw-r--r--cli/args/mod.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs
index 7ae003111..3d35d8c36 100644
--- a/cli/args/mod.rs
+++ b/cli/args/mod.rs
@@ -624,6 +624,8 @@ 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),
}
@@ -659,7 +661,9 @@ pub fn get_root_cert_store(
for root in roots {
root_cert_store
.add(rustls::pki_types::CertificateDer::from(root.0))
- .expect("Failed to add platform cert to root cert store");
+ .map_err(|e| {
+ RootCertStoreLoadError::FailedAddSystemCert(e.to_string())
+ })?;
}
}
_ => {