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