Less unwraps for certificates

Oops missed a few. Should print real errors now
This commit is contained in:
2026-06-01 11:51:10 -07:00
parent 0f9f89cdd4
commit bcfd328c04
+9 -2
View File
@@ -117,7 +117,7 @@ async fn main() -> ExitCode {
Ok(certs) => match certs.collect::<Result<Vec<_>,_>>() {
Ok(k) => k,
Err(e) => {
error!("Could not read certificates.");
error!("Could not read certificates {}",&config.certfile);
error!("{}",e);
return ExitCode::FAILURE
}
@@ -129,7 +129,14 @@ async fn main() -> ExitCode {
return ExitCode::FAILURE
}
};
let key = PrivateKeyDer::from_pem_file(&config.keyfile).unwrap();
let key = match PrivateKeyDer::from_pem_file(&config.keyfile){
Ok(val) => val,
Err(e) => {
error!("Could not read key file {}",&config.keyfile);
error!("{}",e);
return ExitCode::FAILURE
}
};
let address = match IpAddr::from_str(&config.listen_address) {
Ok(val) => val,