Skip to content

Commit

Permalink
Respect OPENSSL_NO_OCB
Browse files Browse the repository at this point in the history
  • Loading branch information
Guy Lewin committed Oct 23, 2023
1 parent 1c7fd30 commit 5e0a6ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openssl/src/cipher.rs
Original file line number Diff line number Diff line change
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 5e0a6ff

Please sign in to comment.