Skip to content

Commit

Permalink
Update pem to 3.0.2 (rustls#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 authored Aug 25, 2023
1 parent 75c853f commit 0aa6095
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 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 @@ -21,7 +21,7 @@ required-features = ["pem"]
[dependencies]
yasna = { version = "0.5.2", features = ["time", "std"] }
ring = "0.16"
pem = { version = "2.0.1", optional = true }
pem = { version = "3.0.2", optional = true }
time = { version = "0.3.6", default-features = false }
x509-parser = { version = "0.15", features = ["verify"], optional = true }
zeroize = { version = "1.2", optional = true }
Expand Down
9 changes: 6 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,12 @@ mod sign_algo;
// Uses ECDSA: https://crt.sh/?asn1=607203242

#[cfg(feature = "pem")]
const ENCODE_CONFIG: pem::EncodeConfig = match cfg!(target_family = "windows") {
true => pem::EncodeConfig { line_ending: pem::LineEnding::CRLF },
false => pem::EncodeConfig { line_ending: pem::LineEnding::LF },
const ENCODE_CONFIG: pem::EncodeConfig = {
let line_ending = match cfg!(target_family = "windows") {
true => pem::LineEnding::CRLF,
false => pem::LineEnding::LF,
};
pem::EncodeConfig::new().set_line_ending(line_ending)
};

#[derive(Debug, PartialEq, Eq, Hash, Clone)]
Expand Down

0 comments on commit 0aa6095

Please sign in to comment.