summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2018-10-15 15:27:47 -0400
committerAaron Hill <aa1ronham@gmail.com>2018-10-17 21:21:05 -0400
commit358de5e93e85b2ee9f48c25f981bd5938bd8d1f7 (patch)
tree4bba44243589dbd3dbbd0b01217d6a65a763ab04
parent230d9a201276bbe2dd3e6fd0d44a9c77001f09e3 (diff)
downloadroughenough-358de5e93e85b2ee9f48c25f981bd5938bd8d1f7.zip
Port seed error handling
-rw-r--r--src/server.rs9
1 files changed, 8 insertions, 1 deletions
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());