Skip to content

Commit

Permalink
Fixes Issue#1113: TLS: Ignore certs in pem file when loading private …
Browse files Browse the repository at this point in the history
…keys
  • Loading branch information
jdthomas committed Jan 23, 2025
1 parent 1cbf029 commit dd92373
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ impl TlsConfigBuilder {
rustls_pemfile::Item::Pkcs1Key(k) => key_opt = Some(k.into()),
rustls_pemfile::Item::Pkcs8Key(k) => key_opt = Some(k.into()),
rustls_pemfile::Item::Sec1Key(k) => key_opt = Some(k.into()),
// Ignore certs in the same pem file as private key
rustls_pemfile::Item::X509Certificate(_) => {}
_ => return Err(TlsConfigError::UnknownPrivateKeyFormat),
}
}
Expand Down

0 comments on commit dd92373

Please sign in to comment.