From 35c8e90b76d0f7a0b4064a0299d2fc529f9707a3 Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Fri, 20 Oct 2023 01:33:10 +0200 Subject: [PATCH] Make X509_ALGOR opaque for LibreSSL The struct is still public because that is also the case in OpenSSL, but it should no longer be accessed directly. --- openssl-sys/build/cfgs.rs | 3 +++ openssl-sys/src/handwritten/types.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/openssl-sys/build/cfgs.rs b/openssl-sys/build/cfgs.rs index 8ee6f62373..ac7fe28596 100644 --- a/openssl-sys/build/cfgs.rs +++ b/openssl-sys/build/cfgs.rs @@ -56,6 +56,9 @@ pub fn get(openssl_version: Option, libressl_version: Option) -> Vec<& if libressl_version >= 0x3_08_01_00_0 { cfgs.push("libressl381"); } + if libressl_version >= 0x3_08_02_00_0 { + cfgs.push("libressl382"); + } } else { let openssl_version = openssl_version.unwrap(); diff --git a/openssl-sys/src/handwritten/types.rs b/openssl-sys/src/handwritten/types.rs index 06354728f2..a03a878305 100644 --- a/openssl-sys/src/handwritten/types.rs +++ b/openssl-sys/src/handwritten/types.rs @@ -329,7 +329,7 @@ cfg_if! { } } cfg_if! { - if #[cfg(ossl110)] { + if #[cfg(any(ossl110, libressl382))] { pub enum X509_ALGOR {} } else { #[repr(C)]