From 4d83202cb5a911c05e58aa1cc53d5556a3bd0c32 Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Sat, 9 Dec 2023 19:27:37 +0100 Subject: [PATCH] X509V3_EXT_add_alias() will be removed --- openssl-sys/src/handwritten/x509v3.rs | 1 + openssl/build.rs | 3 +++ openssl/src/x509/mod.rs | 1 + 3 files changed, 5 insertions(+) diff --git a/openssl-sys/src/handwritten/x509v3.rs b/openssl-sys/src/handwritten/x509v3.rs index 2f59bf6663..1a548c0e25 100644 --- a/openssl-sys/src/handwritten/x509v3.rs +++ b/openssl-sys/src/handwritten/x509v3.rs @@ -84,6 +84,7 @@ const_ptr_api! { } extern "C" { + #[cfg(not(libressl390))] pub fn X509V3_EXT_add_alias(nid_to: c_int, nid_from: c_int) -> c_int; pub fn X509V3_EXT_d2i(ext: *mut X509_EXTENSION) -> *mut c_void; pub fn X509V3_EXT_i2d(ext_nid: c_int, crit: c_int, ext: *mut c_void) -> *mut X509_EXTENSION; diff --git a/openssl/build.rs b/openssl/build.rs index 87a9fa06f5..7677abc086 100644 --- a/openssl/build.rs +++ b/openssl/build.rs @@ -72,6 +72,9 @@ fn main() { if version >= 0x3_08_02_00_0 { println!("cargo:rustc-cfg=libressl382"); } + if version >= 0x3_09_00_00_0 { + println!("cargo:rustc-cfg=libressl390"); + } } if let Ok(vars) = env::var("DEP_OPENSSL_CONF") { diff --git a/openssl/src/x509/mod.rs b/openssl/src/x509/mod.rs index c918fed667..115193ee05 100644 --- a/openssl/src/x509/mod.rs +++ b/openssl/src/x509/mod.rs @@ -1018,6 +1018,7 @@ impl X509Extension { /// # Safety /// /// This method modifies global state without locking and therefore is not thread safe + #[cfg(not(libressl390))] #[corresponds(X509V3_EXT_add_alias)] #[deprecated( note = "Use x509::extension types or new_from_der and then this is not necessary",