Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cli/args/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,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),
}
Expand Down Expand Up @@ -658,7 +660,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())
})?;
}
}
_ => {
Expand Down