Skip to content

Commit

Permalink
chore: fix sync TLS authentication for EC keys
Browse files Browse the repository at this point in the history
  • Loading branch information
sp-angel authored and Jarema committed Oct 12, 2023
1 parent 062390b commit 28dfa80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nats/src/auth_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pub(crate) fn load_key(path: &Path) -> io::Result<PrivateKey> {
loop {
let cert = rustls_pemfile::read_one(&mut reader)?;
match cert {
Some(rustls_pemfile::Item::RSAKey(key)) | Some(rustls_pemfile::Item::PKCS8Key(key)) => {
Some(rustls_pemfile::Item::RSAKey(key)) | Some(rustls_pemfile::Item::PKCS8Key(key)) | Some(rustls_pemfile::Item::ECKey(key)) => {
return Ok(PrivateKey(key))
}
// if public key is found, don't error, just skip it and hope to find client key next.
Expand Down

0 comments on commit 28dfa80

Please sign in to comment.