Skip to content

Commit

Permalink
Merge pull request #2070 from GuyLewin/master
Browse files Browse the repository at this point in the history
Respect OPENSSL_NO_OCB on AES functions
  • Loading branch information
sfackler committed Oct 23, 2023
2 parents 1c7fd30 + 5e0a6ff commit 2fb393e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openssl/src/cipher.rs
Expand Up @@ -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 _) }
}
Expand Down Expand Up @@ -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 _) }
}
Expand Down Expand Up @@ -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 _) }
}
Expand Down

0 comments on commit 2fb393e

Please sign in to comment.