Skip to content

Commit ecd32e3

Browse files
authored
Use pkcs8::KeyError (#687)
Companion PR to RustCrypto/formats#2305 Bumps `pkcs8` to v0.11.0-rc.12
1 parent 6ca073e commit ecd32e3

3 files changed

Lines changed: 10 additions & 80 deletions

File tree

Cargo.lock

Lines changed: 8 additions & 78 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ zeroize = { version = "1.8", features = ["alloc"] }
2525
# optional dependencies
2626
crypto-common = { version = "0.2", optional = true, features = ["getrandom"] }
2727
pkcs1 = { version = "0.8.0-rc.4", optional = true, default-features = false, features = ["alloc", "pem"] }
28-
pkcs8 = { version = "0.11.0-rc.10", optional = true, default-features = false, features = ["alloc", "pem"] }
28+
pkcs8 = { version = "0.11.0-rc.12", optional = true, default-features = false, features = ["alloc", "pem"] }
2929
serdect = { version = "0.4", optional = true }
3030
sha1 = { version = "0.11", optional = true, default-features = false, features = ["oid"] }
3131
sha2 = { version = "0.11", optional = true, default-features = false, features = ["oid"] }

src/encoding.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ impl EncodePublicKey for RsaPublicKey {
227227
fn pkcs1_error_to_pkcs8(error: pkcs1::Error) -> pkcs8::Error {
228228
match error {
229229
pkcs1::Error::Asn1(e) => pkcs8::Error::Asn1(e),
230-
_ => pkcs8::Error::KeyMalformed,
230+
_ => pkcs8::KeyError::Invalid.into(),
231231
}
232232
}
233233

0 commit comments

Comments
 (0)