summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2023-12-15 18:52:07 +0100
committerJustus Winter <justus@sequoia-pgp.org>2024-01-02 11:49:16 +0100
commit36b89b5d4c528ee5b995a49c0dc37d52e491dc65 (patch)
tree4d806437e1d5f9c8b76611fb66b78b9650de88d4
parent5a36bf159a13ce3a9504a2016cf4ff55a1545e52 (diff)
openpgp: Require the rand crate only for tests and RustCrypto.
- Also, disable the default features and enable only what we need.
-rw-r--r--openpgp/Cargo.toml7
1 files changed, 4 insertions, 3 deletions
diff --git a/openpgp/Cargo.toml b/openpgp/Cargo.toml
index 870814cb..de75a852 100644
--- a/openpgp/Cargo.toml
+++ b/openpgp/Cargo.toml
@@ -45,7 +45,6 @@ regex-syntax = "0.8"
sha1collisiondetection = { version = "0.3.1", default-features = false, features = ["std"] }
thiserror = "1.0.2"
xxhash-rust = { version = "0.8", features = ["xxh3"] }
-rand = { version = "0.8" }
# At least 0.10.55 is needed due `no-ocb` check:
# https://github.com/sfackler/rust-openssl/blob/master/openssl/CHANGELOG.md
@@ -82,6 +81,7 @@ idea = { version = "0.5", optional = true, features = ["zeroize"] }
md-5 = { version = "0.10", features = ["oid"], optional = true }
num-bigint-dig = { version = "0.8", default-features = false, optional = true }
p256 = { version = "0.13", optional = true, features = ["ecdh", "ecdsa"] }
+rand = { version = "0.8", optional = true, default-features = false }
rand_core = { version = "0.6", optional = true }
ripemd = { version = "0.1", features = ["oid"], optional = true }
rsa = { version = "0.9.0", optional = true }
@@ -103,6 +103,7 @@ lalrpop = { version = "0.20", default-features = false }
[dev-dependencies]
quickcheck = { version = "1", default-features = false }
+rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] }
rpassword = "7.0"
criterion = { version = "0.5", features = ["html_reports"] }
@@ -117,8 +118,8 @@ crypto-rust = [
"dep:md-5", "dep:num-bigint-dig", "dep:ripemd", "dep:rsa", "dep:sha2",
"sha1collisiondetection/digest-trait", "sha1collisiondetection/oid",
"dep:twofish", "dep:typenum", "dep:x25519-dalek", "dep:p256",
- "dep:rand_core", "rand_core?/getrandom", "dep:ecdsa", "dep:aes-gcm",
- "dep:dsa"
+ "dep:rand", "rand?/getrandom", "dep:rand_core", "rand_core?/getrandom",
+ "dep:ecdsa", "dep:aes-gcm", "dep:dsa"
]
crypto-cng = [
"dep:cipher", "dep:eax", "dep:winapi", "dep:win-crypto-ng",