Skip to content

Commit da636e7

Browse files
authored
k256/p256: have std activate ecdsa-core/std (#273)
Closes #271 This is needed to define a `std::error::Error` impl on errors arising from the `ecdsa` crate. Unfortunately without weak activation this means the `ecdsa` crate gets pulled in by default, but we can circle back on that later.
1 parent 3892580 commit da636e7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

k256/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pem = ["elliptic-curve/pem", "pkcs8"]
4747
pkcs8 = ["elliptic-curve/pkcs8", "zeroize"]
4848
sha256 = ["digest", "sha2"]
4949
test-vectors = ["hex-literal"]
50-
std = ["elliptic-curve/std"]
50+
std = ["ecdsa-core/std", "elliptic-curve/std"] # TODO: use weak activation for `ecdsa-core/std` when available
5151
zeroize = ["elliptic-curve/zeroize"]
5252

5353
[package.metadata.docs.rs]

k256/src/ecdsa.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub type Signature = ecdsa_core::Signature<Secp256k1>;
9494
/// ECDSA/secp256k1 signature (ASN.1 DER encoded)
9595
pub type Asn1Signature = ecdsa_core::asn1::Signature<Secp256k1>;
9696

97-
#[cfg(not(feature = "ecdsa"))]
97+
#[cfg(not(feature = "arithmetic"))]
9898
impl ecdsa_core::CheckSignatureBytes for Secp256k1 {}
9999

100100
#[cfg(all(feature = "ecdsa", feature = "sha256"))]

p256/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pem = ["elliptic-curve/pem", "pkcs8"]
3737
pkcs8 = ["elliptic-curve/pkcs8", "zeroize"]
3838
sha256 = ["digest", "ecdsa-core/hazmat", "sha2"]
3939
test-vectors = ["hex-literal"]
40-
std = ["elliptic-curve/std"]
40+
std = ["ecdsa-core/std", "elliptic-curve/std"] # TODO: use weak activation for `ecdsa-core/std` when available
4141
zeroize = ["elliptic-curve/zeroize"]
4242

4343
[package.metadata.docs.rs]

p256/src/ecdsa.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub type SigningKey = ecdsa_core::SigningKey<NistP256>;
6767
#[cfg_attr(docsrs, doc(cfg(feature = "ecdsa")))]
6868
pub type VerifyingKey = ecdsa_core::VerifyingKey<NistP256>;
6969

70-
#[cfg(not(feature = "ecdsa"))]
70+
#[cfg(not(feature = "arithmetic"))]
7171
impl ecdsa_core::CheckSignatureBytes for NistP256 {}
7272

7373
#[cfg(all(feature = "ecdsa", feature = "sha256"))]

0 commit comments

Comments
 (0)