aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRustDesk <[email protected]>2024-01-30 18:24:04 +0800
committerGitHub <[email protected]>2024-01-30 18:24:04 +0800
commit42cdfb0885d0c7e7a674603638a0fa9ddcbcc213 (patch)
treeaef40fed7b1af54e4d5af8ec3d2cf83906361a0b
parent0ebfc09f8b071f27429a33944e252b006b6a58e2 (diff)
parentcea8403dbceaaab62c5e35d569bf2843f08745d9 (diff)
downloadrustdesk-server-42cdfb0885d0c7e7a674603638a0fa9ddcbcc213.tar.gz
rustdesk-server-42cdfb0885d0c7e7a674603638a0fa9ddcbcc213.zip
Merge pull request #348 from paspo/pk-check
private key size check
-rw-r--r--src/rendezvous_server.rs3
1 files changed, 3 insertions, 0 deletions
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);
}
}