Merge pull request #348 from paspo/pk-check

private key size check
This commit is contained in:
RustDesk 2024-01-30 18:24:04 +08:00 committed by GitHub
commit 42cdfb0885
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
}
}