Skip to content

Commit c813a76

Browse files
committed
ecdsa: pkcs8 API changes
see RustCrypto/formats#1483
1 parent 0133af9 commit c813a76

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

Cargo.lock

+7-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+6
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@ members = [
1313

1414
[profile.dev]
1515
opt-level = 2
16+
17+
[patch.crates-io]
18+
sec1 = { git = "https://github.com/RustCrypto/formats.git" }
19+
pkcs8 = { git = "https://github.com/RustCrypto/formats.git" }
20+
# https://github.com/RustCrypto/traits/pull/1650
21+
elliptic-curve = { git = "https://github.com/baloo/traits.git", branch = "baloo/elliptic-curve/pkcs8-API-break" }

ecdsa/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ elliptic-curve = { version = "=0.14.0-pre.6", default-features = false, features
2121
signature = { version = "=2.3.0-pre.4", default-features = false, features = ["rand_core"] }
2222

2323
# optional dependencies
24-
der = { version = "0.8.0-rc.0", optional = true }
24+
der = { version = "0.8.0-rc.1", optional = true }
2525
digest = { version = "=0.11.0-pre.9", optional = true, default-features = false, features = ["oid"] }
2626
rfc6979 = { version = "=0.5.0-pre.4", optional = true, path = "../rfc6979" }
2727
serdect = { version = "0.2", optional = true, default-features = false, features = ["alloc"] }

ecdsa/src/signing.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ where
545545
}
546546

547547
#[cfg(feature = "pkcs8")]
548-
impl<C> TryFrom<pkcs8::PrivateKeyInfo<'_>> for SigningKey<C>
548+
impl<C> TryFrom<pkcs8::PrivateKeyInfoRef<'_>> for SigningKey<C>
549549
where
550550
C: EcdsaCurve + AssociatedOid + CurveArithmetic,
551551
AffinePoint<C>: FromEncodedPoint<C> + ToEncodedPoint<C>,
@@ -555,7 +555,7 @@ where
555555
{
556556
type Error = pkcs8::Error;
557557

558-
fn try_from(private_key_info: pkcs8::PrivateKeyInfo<'_>) -> pkcs8::Result<Self> {
558+
fn try_from(private_key_info: pkcs8::PrivateKeyInfoRef<'_>) -> pkcs8::Result<Self> {
559559
SecretKey::try_from(private_key_info).map(Into::into)
560560
}
561561
}

0 commit comments

Comments
 (0)