diff --git a/src/main.rs b/src/main.rs index fe348f9..87cc9e5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -117,7 +117,7 @@ async fn main() -> ExitCode { Ok(certs) => match certs.collect::,_>>() { 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,