Skip to content

Commit

Permalink
fixed #1096 - SEC1 EC private key file support for TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Oct 24, 2024
1 parent ebc0313 commit 38dbb3b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions warpgate-common/src/tls/cert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ impl TlsPrivateKey {
.next()
.and_then(|x| PrivateKeyDer::try_from(x).ok());

if key.is_none() {
key = rustls_pemfile::ec_private_keys(&mut bytes.as_slice())?
.drain(..)
.next()
.and_then(|x| PrivateKeyDer::try_from(x).ok());
}

if key.is_none() {
key = rustls_pemfile::rsa_private_keys(&mut bytes.as_slice())?
.drain(..)
Expand Down

0 comments on commit 38dbb3b

Please sign in to comment.