Less unwraps for certificates
Oops missed a few. Should print real errors now
This commit is contained in:
+9
-2
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user