diff --git a/src/lib.rs b/src/lib.rs index 1d12b95..1a37f5c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -727,9 +727,9 @@ where } mod crypto { - #[cfg(feature = "aws-lc-rs")] + #[cfg(all(feature = "aws-lc-rs", not(feature = "ring")))] pub(crate) use aws_lc_rs as ring_like; - #[cfg(all(feature = "ring", not(feature = "aws-lc-rs")))] + #[cfg(feature = "ring")] pub(crate) use ring as ring_like; pub(crate) use ring_like::digest::{digest, Digest, SHA256}; @@ -739,7 +739,7 @@ mod crypto { pub(crate) use ring_like::signature::{KeyPair, Signature}; pub(crate) use ring_like::{hmac, pkcs8}; - #[cfg(feature = "aws-lc-rs")] + #[cfg(all(feature = "aws-lc-rs", not(feature = "ring")))] pub(crate) fn p256_key_pair_from_pkcs8( pkcs8: &[u8], _: &SystemRandom, @@ -747,7 +747,7 @@ mod crypto { EcdsaKeyPair::from_pkcs8(&ECDSA_P256_SHA256_FIXED_SIGNING, pkcs8) } - #[cfg(all(feature = "ring", not(feature = "aws-lc-rs")))] + #[cfg(feature = "ring")] pub(crate) fn p256_key_pair_from_pkcs8( pkcs8: &[u8], rng: &SystemRandom,