Skip to content

Commit

Permalink
chore: fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
sp-angel authored and Jarema committed Nov 3, 2023
1 parent 27fbab4 commit 27ad14a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nats/src/auth_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ 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::ECKey(key)) => {
return Ok(PrivateKey(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.
Some(rustls_pemfile::Item::X509Certificate(_)) | Some(_) => {}
None => break,
Expand Down

0 comments on commit 27ad14a

Please sign in to comment.