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 Oct 7, 2023
1 parent 43e1b00 commit cff490f
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 cff490f

Please sign in to comment.