From ef7076863adb3353c631c54e4af6942c5ea88f87 Mon Sep 17 00:00:00 2001 From: Jonas Maier <> Date: Thu, 29 Aug 2024 23:24:57 +0200 Subject: [PATCH] feature gate X509_ALGOR_set_md for openssl only --- openssl-sys/src/handwritten/x509.rs | 2 ++ openssl/src/lib.rs | 2 +- openssl/src/x509/mod.rs | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/openssl-sys/src/handwritten/x509.rs b/openssl-sys/src/handwritten/x509.rs index aba33d8fa..8b76c67c4 100644 --- a/openssl-sys/src/handwritten/x509.rs +++ b/openssl-sys/src/handwritten/x509.rs @@ -212,6 +212,8 @@ extern "C" { pub fn X509_ALGOR_new() -> *mut X509_ALGOR; pub fn X509_ALGOR_free(x: *mut X509_ALGOR); + + #[cfg(ossl110)] pub fn X509_ALGOR_set_md(alg: *mut X509_ALGOR, md: *const EVP_MD); pub fn X509_ALGOR_cmp(alg0: *const X509_ALGOR, alg1: *const X509_ALGOR) -> c_int; diff --git a/openssl/src/lib.rs b/openssl/src/lib.rs index 9b837e460..6d74569c5 100644 --- a/openssl/src/lib.rs +++ b/openssl/src/lib.rs @@ -193,7 +193,7 @@ pub mod ssl; pub mod stack; pub mod string; pub mod symm; -#[cfg(not(boringssl))] +#[cfg(all(not(boringssl), not(libressl)))] pub mod ts; pub mod version; pub mod x509; diff --git a/openssl/src/x509/mod.rs b/openssl/src/x509/mod.rs index 858052c65..871f5a722 100644 --- a/openssl/src/x509/mod.rs +++ b/openssl/src/x509/mod.rs @@ -2291,6 +2291,7 @@ impl X509AlgorithmRef { } } + #[cfg(ossl110)] #[corresponds(X509_ALGOR_set_md)] pub fn set_md(&mut self, md: MessageDigest) { unsafe {