From 4aaa44c86a36704aaeccb8133b3d76536af3937f Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Thu, 4 Dec 2025 11:10:23 +0100 Subject: [PATCH] Remove ASN1_STRING_data for LibreSSL 4.3.0 --- openssl-sys/build/cfgs.rs | 3 +++ openssl-sys/build/main.rs | 1 + openssl-sys/src/handwritten/asn1.rs | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/openssl-sys/build/cfgs.rs b/openssl-sys/build/cfgs.rs index 14118b06b..2fe064cf9 100644 --- a/openssl-sys/build/cfgs.rs +++ b/openssl-sys/build/cfgs.rs @@ -47,6 +47,9 @@ pub fn get(openssl_version: Option, libressl_version: Option) -> Vec<& if libressl_version >= 0x4_02_00_00_0 { cfgs.push("libressl420"); } + if libressl_version >= 0x4_03_00_00_0 { + cfgs.push("libressl430"); + } } else { let openssl_version = openssl_version.unwrap(); cfgs.push("ossl101"); diff --git a/openssl-sys/build/main.rs b/openssl-sys/build/main.rs index cbbeb961d..e0ea9aa95 100644 --- a/openssl-sys/build/main.rs +++ b/openssl-sys/build/main.rs @@ -161,6 +161,7 @@ fn main() { println!("cargo:rustc-check-cfg=cfg(libressl400)"); println!("cargo:rustc-check-cfg=cfg(libressl410)"); println!("cargo:rustc-check-cfg=cfg(libressl420)"); + println!("cargo:rustc-check-cfg=cfg(libressl430)"); println!("cargo:rustc-check-cfg=cfg(ossl101)"); println!("cargo:rustc-check-cfg=cfg(ossl102)"); diff --git a/openssl-sys/src/handwritten/asn1.rs b/openssl-sys/src/handwritten/asn1.rs index 8e33b5c71..db4047cb1 100644 --- a/openssl-sys/src/handwritten/asn1.rs +++ b/openssl-sys/src/handwritten/asn1.rs @@ -49,7 +49,7 @@ extern "C" { pub fn ASN1_STRING_type_new(ty: c_int) -> *mut ASN1_STRING; #[cfg(any(ossl110, libressl))] pub fn ASN1_STRING_get0_data(x: *const ASN1_STRING) -> *const c_uchar; - #[cfg(any(all(ossl102, not(ossl110)), libressl))] + #[cfg(any(all(ossl102, not(ossl110)), all(libressl, not(libressl430))))] pub fn ASN1_STRING_data(x: *mut ASN1_STRING) -> *mut c_uchar; pub fn ASN1_STRING_new() -> *mut ASN1_STRING; pub fn ASN1_OCTET_STRING_new() -> *mut ASN1_OCTET_STRING;