From 5e0a6ffec83afa4e210e8f422b83cfae9cf98e15 Mon Sep 17 00:00:00 2001 From: Guy Lewin Date: Mon, 23 Oct 2023 15:54:31 -0400 Subject: [PATCH] Respect OPENSSL_NO_OCB --- openssl/src/cipher.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openssl/src/cipher.rs b/openssl/src/cipher.rs index 088f393516..892cae1db7 100644 --- a/openssl/src/cipher.rs +++ b/openssl/src/cipher.rs @@ -201,7 +201,7 @@ impl Cipher { } /// Requires OpenSSL 1.1.0 or newer. - #[cfg(ossl110)] + #[cfg(all(ossl110, not(osslconf = "OPENSSL_NO_OCB")))] pub fn aes_128_ocb() -> &'static CipherRef { unsafe { CipherRef::from_ptr(ffi::EVP_aes_128_ocb() as *mut _) } } @@ -258,7 +258,7 @@ impl Cipher { } /// Requires OpenSSL 1.1.0 or newer. - #[cfg(ossl110)] + #[cfg(all(ossl110, not(osslconf = "OPENSSL_NO_OCB")))] pub fn aes_192_ocb() -> &'static CipherRef { unsafe { CipherRef::from_ptr(ffi::EVP_aes_192_ocb() as *mut _) } } @@ -315,7 +315,7 @@ impl Cipher { } /// Requires OpenSSL 1.1.0 or newer. - #[cfg(ossl110)] + #[cfg(all(ossl110, not(osslconf = "OPENSSL_NO_OCB")))] pub fn aes_256_ocb() -> &'static CipherRef { unsafe { CipherRef::from_ptr(ffi::EVP_aes_256_ocb() as *mut _) } }