mirror of
https://github.com/samsonjs/agate.git
synced 2026-03-25 09:05:50 +00:00
better error message for incorrect keys
This commit is contained in:
parent
e91c99ddab
commit
fb0a30e5fc
1 changed files with 1 additions and 0 deletions
|
|
@ -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)))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue