better error message for incorrect keys

This commit is contained in:
Johann150 2021-02-10 22:39:42 +01:00
parent e91c99ddab
commit fb0a30e5fc
No known key found for this signature in database
GPG key ID: 9EE6577A2A06F8F1

View file

@ -186,6 +186,7 @@ fn acceptor() -> Result<TlsAcceptor> {
if ARGS.only_tls13 {
config.versions = vec![rustls::ProtocolVersion::TLSv1_3];
}
assert!(!keys.is_empty(), "no valid keys");
config.set_single_cert(certs, keys.remove(0))?;
Ok(TlsAcceptor::from(Arc::new(config)))
}