aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/common.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.rs')
-rw-r--r--src/common.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common.rs b/src/common.rs
index 977f8ed..c2c63ba 100644
--- a/src/common.rs
+++ b/src/common.rs
@@ -120,6 +120,9 @@ pub fn gen_sk(wait: u64) -> (String, Option<sign::SecretKey>) {
let pk = base64::encode(&tmp[sign::SECRETKEYBYTES / 2..]);
log::info!("Private key comes from {}", sk_file);
return (pk, Some(sign::SecretKey(tmp)));
+ } else {
+ log::error!("Malformed private key. You probably have a trailing newline in the secret key file.");
+ std::process::exit(1);
}
}
} else {