Loading openssl-sys/src/evp.rs +0 −6 Original line number Diff line number Diff line Loading @@ -92,11 +92,6 @@ cfg_if! { pub unsafe fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> c_int { EVP_CIPHER_CTX_get_iv_length(ctx) } #[inline] pub unsafe fn EVP_CIPHER_CTX_tag_length(ctx: *const EVP_CIPHER_CTX) -> c_int { EVP_CIPHER_CTX_get_tag_length(ctx) } } else { extern "C" { pub fn EVP_MD_size(md: *const EVP_MD) -> c_int; Loading @@ -111,7 +106,6 @@ cfg_if! { pub fn EVP_CIPHER_CTX_block_size(ctx: *const EVP_CIPHER_CTX) -> c_int; pub fn EVP_CIPHER_CTX_key_length(ctx: *const EVP_CIPHER_CTX) -> c_int; pub fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> c_int; pub fn EVP_CIPHER_CTX_tag_length(ctx: *const EVP_CIPHER_CTX) -> c_int; } } } Loading openssl/src/cipher_ctx.rs +5 −2 Original line number Diff line number Diff line Loading @@ -411,7 +411,7 @@ impl CipherCtxRef { Ok(()) } /// Returns the length of the authenticationt tag expected by this context. /// Returns the length of the authentication tag expected by this context. /// /// Returns 0 if the cipher is not authenticated. /// Loading @@ -421,11 +421,14 @@ impl CipherCtxRef { /// /// This corresponds to [`EVP_CIPHER_CTX_tag_length`]. /// /// Requires OpenSSL 3.0.0 or newer. /// /// [`EVP_CIPHER_CTX_tag_length`]: https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_tag_length.html #[cfg(ossl300)] pub fn tag_length(&self) -> usize { self.assert_cipher(); unsafe { ffi::EVP_CIPHER_CTX_tag_length(self.as_ptr()) as usize } unsafe { ffi::EVP_CIPHER_CTX_get_tag_length(self.as_ptr()) as usize } } /// Retrieves the calculated authentication tag from the context. Loading Loading
openssl-sys/src/evp.rs +0 −6 Original line number Diff line number Diff line Loading @@ -92,11 +92,6 @@ cfg_if! { pub unsafe fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> c_int { EVP_CIPHER_CTX_get_iv_length(ctx) } #[inline] pub unsafe fn EVP_CIPHER_CTX_tag_length(ctx: *const EVP_CIPHER_CTX) -> c_int { EVP_CIPHER_CTX_get_tag_length(ctx) } } else { extern "C" { pub fn EVP_MD_size(md: *const EVP_MD) -> c_int; Loading @@ -111,7 +106,6 @@ cfg_if! { pub fn EVP_CIPHER_CTX_block_size(ctx: *const EVP_CIPHER_CTX) -> c_int; pub fn EVP_CIPHER_CTX_key_length(ctx: *const EVP_CIPHER_CTX) -> c_int; pub fn EVP_CIPHER_CTX_iv_length(ctx: *const EVP_CIPHER_CTX) -> c_int; pub fn EVP_CIPHER_CTX_tag_length(ctx: *const EVP_CIPHER_CTX) -> c_int; } } } Loading
openssl/src/cipher_ctx.rs +5 −2 Original line number Diff line number Diff line Loading @@ -411,7 +411,7 @@ impl CipherCtxRef { Ok(()) } /// Returns the length of the authenticationt tag expected by this context. /// Returns the length of the authentication tag expected by this context. /// /// Returns 0 if the cipher is not authenticated. /// Loading @@ -421,11 +421,14 @@ impl CipherCtxRef { /// /// This corresponds to [`EVP_CIPHER_CTX_tag_length`]. /// /// Requires OpenSSL 3.0.0 or newer. /// /// [`EVP_CIPHER_CTX_tag_length`]: https://www.openssl.org/docs/manmaster/man3/EVP_CIPHER_CTX_tag_length.html #[cfg(ossl300)] pub fn tag_length(&self) -> usize { self.assert_cipher(); unsafe { ffi::EVP_CIPHER_CTX_tag_length(self.as_ptr()) as usize } unsafe { ffi::EVP_CIPHER_CTX_get_tag_length(self.as_ptr()) as usize } } /// Retrieves the calculated authentication tag from the context. Loading