mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2025-07-01 15:25:29 +00:00
parent
778c89efb1
commit
94ae51458c
@ -120,6 +120,9 @@ pub fn gen_sk(wait: u64) -> (String, Option<sign::SecretKey>) {
|
|||||||
let pk = base64::encode(&tmp[sign::SECRETKEYBYTES / 2..]);
|
let pk = base64::encode(&tmp[sign::SECRETKEYBYTES / 2..]);
|
||||||
log::info!("Private key comes from {}", sk_file);
|
log::info!("Private key comes from {}", sk_file);
|
||||||
return (pk, Some(sign::SecretKey(tmp)));
|
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 {
|
} else {
|
||||||
|
@ -1174,9 +1174,6 @@ impl RendezvousServer {
|
|||||||
let mut tmp = [0u8; sign::SECRETKEYBYTES];
|
let mut tmp = [0u8; sign::SECRETKEYBYTES];
|
||||||
tmp[..].copy_from_slice(&sk);
|
tmp[..].copy_from_slice(&sk);
|
||||||
out_sk = Some(sign::SecretKey(tmp));
|
out_sk = Some(sign::SecretKey(tmp));
|
||||||
} else {
|
|
||||||
log::error!("Malformed private key");
|
|
||||||
std::process::exit(1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user