From 4d60a0ae93d1004e49bce0a4aca5a25cf4d9ccf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=A8Jeff?= <¨burdges@gnunet.org¨> Date: Tue, 21 Nov 2023 21:59:18 +0100 Subject: [PATCH] Fix CI: AEAD does not work without getrandom --- Cargo.toml | 4 ++-- src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c501726..73d4aaf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,7 +57,7 @@ asm = ["sha2/asm"] serde = ["serde_crate", "serde_bytes", "cfg-if"] # We cannot make getrandom a direct dependency because rand_core makes # getrandom a feature name, which requires forwarding. -getrandom = ["rand_core/getrandom"] +getrandom = ["rand_core/getrandom", "aead?/getrandom"] # We thus cannot forward the wasm-bindgen feature of getrandom, # but our consumers could depend upon getrandom and activate its # wasm-bindgen feature themselve, which works due to cargo features @@ -65,4 +65,4 @@ getrandom = ["rand_core/getrandom"] # wasm-bindgen = ["getrandom/wasm-bindgen"] # See https://github.com/rust-lang/cargo/issues/9210 # and https://github.com/w3f/schnorrkel/issues/65#issuecomment-786923588 -aead = ["dep:aead", "getrandom"] +aead = ["dep:aead"] diff --git a/src/lib.rs b/src/lib.rs index 13bb643..ecd5a47 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -274,7 +274,7 @@ pub mod derive; pub mod cert; pub mod errors; -#[cfg(feature = "aead")] +#[cfg(all(feature = "aead", feature = "getrandom"))] pub mod aead; #[cfg(feature = "alloc")]