From 358de5e93e85b2ee9f48c25f981bd5938bd8d1f7 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Mon, 15 Oct 2018 15:27:47 -0400 Subject: Port seed error handling --- src/server.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/server.rs b/src/server.rs index 3739b6f..0fd5f1a 100644 --- a/src/server.rs +++ b/src/server.rs @@ -16,6 +16,7 @@ use hex; use std::io::ErrorKind; use std::net::SocketAddr; +use std::process; use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; use std::sync::Arc; use std::time::Duration; @@ -81,7 +82,13 @@ impl Server { let public_key: String; let cert_bytes = { - let seed = kms::load_seed(&config).unwrap(); + let seed = match kms::load_seed(&config) { + Ok(seed) => seed, + Err(e) => { + error!("Failed to load seed: {:#?}", e); + process::exit(1); + } + }; let mut long_term_key = LongTermKey::new(&seed); public_key = hex::encode(long_term_key.public_key()); -- cgit v1.2.3