Skip to content

Commit

Permalink
Merge pull request #2067 from botovq/evp_md_ctx_new
Browse files Browse the repository at this point in the history
Use EVP_MD_CTX_{new,free}() in LibreSSL 3.8.2
  • Loading branch information
alex committed Oct 21, 2023
2 parents 04ffe96 + ae74dec commit a79c590
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion openssl-sys/src/handwritten/evp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ cfg_if! {
}

cfg_if! {
if #[cfg(ossl110)] {
if #[cfg(any(ossl110, libressl382))] {
extern "C" {
pub fn EVP_MD_CTX_new() -> *mut EVP_MD_CTX;
pub fn EVP_MD_CTX_free(ctx: *mut EVP_MD_CTX);
Expand Down
2 changes: 1 addition & 1 deletion openssl/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ use crate::nid::Nid;
use crate::{cvt, cvt_p};

cfg_if! {
if #[cfg(any(ossl110, boringssl))] {
if #[cfg(any(ossl110, boringssl, libressl382))] {
use ffi::{EVP_MD_CTX_free, EVP_MD_CTX_new};
} else {
use ffi::{EVP_MD_CTX_create as EVP_MD_CTX_new, EVP_MD_CTX_destroy as EVP_MD_CTX_free};
Expand Down
2 changes: 1 addition & 1 deletion openssl/src/md_ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ use std::convert::TryFrom;
use std::ptr;

cfg_if! {
if #[cfg(any(ossl110, boringssl))] {
if #[cfg(any(ossl110, boringssl, libressl382))] {
use ffi::{EVP_MD_CTX_free, EVP_MD_CTX_new};
} else {
use ffi::{EVP_MD_CTX_create as EVP_MD_CTX_new, EVP_MD_CTX_destroy as EVP_MD_CTX_free};
Expand Down
2 changes: 1 addition & 1 deletion openssl/src/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ use crate::rsa::Padding;
use crate::{cvt, cvt_p};

cfg_if! {
if #[cfg(ossl110)] {
if #[cfg(any(ossl110, libressl382))] {
use ffi::{EVP_MD_CTX_free, EVP_MD_CTX_new};
} else {
use ffi::{EVP_MD_CTX_create as EVP_MD_CTX_new, EVP_MD_CTX_destroy as EVP_MD_CTX_free};
Expand Down

0 comments on commit a79c590

Please sign in to comment.