Skip to content

Commit 5b4edd8

Browse files
authored
Merge pull request #2124 from botovq/libressl-390
Upcoming API changes in LibreSSL 3.9
2 parents ec2a8c4 + 4d83202 commit 5b4edd8

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

openssl-sys/build/cfgs.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ pub fn get(openssl_version: Option<u64>, libressl_version: Option<u64>) -> Vec<&
6262
if libressl_version >= 0x3_08_02_00_0 {
6363
cfgs.push("libressl382");
6464
}
65+
if libressl_version >= 0x3_09_00_00_0 {
66+
cfgs.push("libressl390");
67+
}
6568
} else {
6669
let openssl_version = openssl_version.unwrap();
6770

openssl-sys/src/handwritten/x509.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,11 +703,9 @@ const_ptr_api! {
703703
extern "C" {
704704
pub fn X509_PURPOSE_get_by_sname(sname: #[const_ptr_if(any(ossl110, libressl280))] c_char) -> c_int;
705705
pub fn X509_PURPOSE_get_id(purpose: #[const_ptr_if(any(ossl110, libressl280))] X509_PURPOSE) -> c_int;
706+
pub fn X509_PURPOSE_get0(idx: c_int) -> #[const_ptr_if(libressl390)] X509_PURPOSE;
706707
}
707708
}
708-
extern "C" {
709-
pub fn X509_PURPOSE_get0(idx: c_int) -> *mut X509_PURPOSE;
710-
}
711709

712710
extern "C" {
713711
pub fn X509_ATTRIBUTE_new() -> *mut X509_ATTRIBUTE;

openssl-sys/src/handwritten/x509v3.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ const_ptr_api! {
8484
}
8585

8686
extern "C" {
87+
#[cfg(not(libressl390))]
8788
pub fn X509V3_EXT_add_alias(nid_to: c_int, nid_from: c_int) -> c_int;
8889
pub fn X509V3_EXT_d2i(ext: *mut X509_EXTENSION) -> *mut c_void;
8990
pub fn X509V3_EXT_i2d(ext_nid: c_int, crit: c_int, ext: *mut c_void) -> *mut X509_EXTENSION;

openssl/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ fn main() {
7272
if version >= 0x3_08_02_00_0 {
7373
println!("cargo:rustc-cfg=libressl382");
7474
}
75+
if version >= 0x3_09_00_00_0 {
76+
println!("cargo:rustc-cfg=libressl390");
77+
}
7578
}
7679

7780
if let Ok(vars) = env::var("DEP_OPENSSL_CONF") {

openssl/src/x509/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,7 @@ impl X509Extension {
10181018
/// # Safety
10191019
///
10201020
/// This method modifies global state without locking and therefore is not thread safe
1021+
#[cfg(not(libressl390))]
10211022
#[corresponds(X509V3_EXT_add_alias)]
10221023
#[deprecated(
10231024
note = "Use x509::extension types or new_from_der and then this is not necessary",

0 commit comments

Comments
 (0)