diff --git a/confetti.toml.example b/confetti.toml.example index 063102d..d46de46 100644 --- a/confetti.toml.example +++ b/confetti.toml.example @@ -19,5 +19,5 @@ admins = [] url = "my.db.server" user = "confetti" password = "my_secret_password" -db = "confetti" +db_name = "confetti" num_connections = 8 diff --git a/src/main.rs b/src/main.rs index be53d43..fe348f9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -112,10 +112,23 @@ async fn main() -> ExitCode { // Read certificate file - let certs = CertificateDer::pem_file_iter(&config.certfile) - .unwrap() - .map(|cert| cert.unwrap()) - .collect(); + debug!("Reading certificate file"); + let certs = match CertificateDer::pem_file_iter(&config.certfile) { + Ok(certs) => match certs.collect::,_>>() { + Ok(k) => k, + Err(e) => { + error!("Could not read certificates."); + error!("{}",e); + return ExitCode::FAILURE + } + + }, + Err(e) => { + error!("Could not read certificates."); + error!("{}",e); + return ExitCode::FAILURE + } + }; let key = PrivateKeyDer::from_pem_file(&config.keyfile).unwrap(); let address = match IpAddr::from_str(&config.listen_address) {