Skip to content

Commit

Permalink
Accept EC PRIVATE KEY items in PEM files. (#921)
Browse files Browse the repository at this point in the history
This PR adds support for private keys marked as “EC PRIVATE KEY“ in the PEM files for TLS server configuration.
  • Loading branch information
partim authored Jan 16, 2024
1 parent f0dee76 commit 17a48b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ rand = "0.8.1"
reqwest = { version = "0.11.0", default-features = false, features = ["blocking", "rustls-tls" ] }
ring = "0.16.12"
rpki = { version = "0.17.2", features = [ "repository", "rrdp", "rtr", "serde", "slurm" ] }
rustls-pemfile = "1"
rustls-pemfile = "1.0.2"
serde = { version = "1.0.95", features = [ "derive" ] }
serde_json = "1.0.57"
tempfile = "3.1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/utils/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fn read_key(key_path: &Path) -> Result<PrivateKey, ExitError> {
})?;

let bits = match item {
RSAKey(bits) | PKCS8Key(bits) => bits,
RSAKey(bits) | PKCS8Key(bits) | ECKey(bits) => bits,
_ => continue
};
if key.is_some() {
Expand Down

0 comments on commit 17a48b1

Please sign in to comment.