Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Cargo.lock

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

6 changes: 4 additions & 2 deletions elliptic-curve/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ keywords = ["crypto", "ecc", "elliptic", "weierstrass"]

[dependencies]
crypto-bigint = { version = "0.2.7", features = ["generic-array", "zeroize"] }
der = { version = "0.4.3", default-features = false, features = ["oid"] }
generic-array = { version = "0.14", default-features = false }
rand_core = { version = "0.6", default-features = false }
subtle = { version = ">=2, <2.5", default-features = false }
Expand All @@ -26,6 +27,7 @@ base64ct = { version = "1", optional = true, default-features = false }
ff = { version = "0.11", optional = true, default-features = false }
group = { version = "0.11", optional = true, default-features = false }
hex-literal = { version = "0.3", optional = true }
pem-rfc7468 = { version = "0.2", optional = true }
pkcs8 = { version = "0.7", optional = true }
serde = { version = "1", optional = true, default-features = false }
serde_json = { version = "1", optional = true, default-features = false, features = ["alloc"] }
Expand All @@ -35,14 +37,14 @@ hex-literal = "0.3"

[features]
default = ["arithmetic"]
alloc = [] # todo: activate `group/alloc` when weak feature activation is available
alloc = ["der/alloc", "zeroize/alloc"] # todo: activate `group/alloc` when weak feature activation is available
arithmetic = ["ff", "group"]
bits = ["arithmetic", "ff/bits"]
dev = ["arithmetic", "hex-literal", "pem"]
ecdh = ["arithmetic"]
hazmat = []
jwk = ["alloc", "base64ct/alloc", "serde", "serde_json", "zeroize/alloc"]
pem = ["alloc", "pkcs8/pem"]
pem = ["alloc", "arithmetic", "pem-rfc7468/alloc", "pkcs8/pem"]
std = ["alloc", "rand_core/std"]

[package.metadata.docs.rs]
Expand Down
6 changes: 3 additions & 3 deletions elliptic-curve/src/public_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ where
{
fn from_spki(spki: pkcs8::SubjectPublicKeyInfo<'_>) -> pkcs8::Result<Self> {
if spki.algorithm.oid != ALGORITHM_OID {
return Err(pkcs8::der::ErrorKind::UnknownOid {
return Err(der::ErrorKind::UnknownOid {
oid: spki.algorithm.oid,
}
.into());
Expand All @@ -332,11 +332,11 @@ where
let params_oid = spki.algorithm.parameters_oid()?;

if params_oid != C::OID {
return Err(pkcs8::der::ErrorKind::UnknownOid { oid: params_oid }.into());
return Err(der::ErrorKind::UnknownOid { oid: params_oid }.into());
}

Self::from_sec1_bytes(spki.subject_public_key)
.map_err(|_| pkcs8::der::Tag::BitString.value_error().into())
.map_err(|_| der::Tag::BitString.value_error().into())
}
}

Expand Down
Loading