remove any from openssl110 cfgs

This commit is contained in:
Henrik Böving 2020-05-09 21:26:44 +02:00
parent f34e9b993d
commit 33f06b767f
1 changed files with 7 additions and 7 deletions

View File

@ -131,7 +131,7 @@ impl Cipher {
}
/// Requires OpenSSL 1.1.0 or newer.
#[cfg(any(ossl110))]
#[cfg(ossl110)]
pub fn aes_128_ocb() -> Cipher {
unsafe { Cipher(ffi::EVP_aes_128_ocb()) }
}
@ -173,7 +173,7 @@ impl Cipher {
}
/// Requires OpenSSL 1.1.0 or newer.
#[cfg(any(ossl110))]
#[cfg(ossl110)]
pub fn aes_192_ocb() -> Cipher {
unsafe { Cipher(ffi::EVP_aes_192_ocb()) }
}
@ -219,7 +219,7 @@ impl Cipher {
}
/// Requires OpenSSL 1.1.0 or newer.
#[cfg(any(ossl110))]
#[cfg(ossl110)]
pub fn aes_256_ocb() -> Cipher {
unsafe { Cipher(ffi::EVP_aes_256_ocb()) }
}
@ -318,14 +318,14 @@ impl Cipher {
}
/// Determines whether the cipher is using OCB mode
#[cfg(any(ossl110))]
#[cfg(ossl110)]
fn is_ocb(&self) -> bool {
*self == Cipher::aes_128_ocb() ||
*self == Cipher::aes_192_ocb() ||
*self == Cipher::aes_256_ocb()
}
#[cfg(not(any(ossl110)))]
#[cfg(not(ossl110))]
const fn is_ocb(&self) -> bool {
false
}
@ -1425,7 +1425,7 @@ mod tests {
}
#[test]
#[cfg(any(ossl110))]
#[cfg(ossl110)]
fn test_aes_128_ocb() {
let key = "000102030405060708090a0b0c0d0e0f";
let aad = "0001020304050607";
@ -1461,7 +1461,7 @@ mod tests {
}
#[test]
#[cfg(any(ossl110))]
#[cfg(ossl110)]
fn test_aes_128_ocb_fail() {
let key = "000102030405060708090a0b0c0d0e0f";
let aad = "0001020304050607";