From cea8403dbceaaab62c5e35d569bf2843f08745d9 Mon Sep 17 00:00:00 2001 From: paspo Date: Tue, 30 Jan 2024 11:18:43 +0100 Subject: [PATCH] private key size check --- src/rendezvous_server.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs index 0c0d107..ede0ede 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -1174,6 +1174,9 @@ impl RendezvousServer { let mut tmp = [0u8; sign::SECRETKEYBYTES]; tmp[..].copy_from_slice(&sk); out_sk = Some(sign::SecretKey(tmp)); + } else { + log::error!("Malformed private key"); + std::process::exit(1); } }