Skip to content

Commit

Permalink
Make X509_VAL opaque for LibreSSL 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
botovq committed Apr 28, 2024
1 parent 83b3186 commit af3028b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions openssl-sys/build/cfgs.rs
Expand Up @@ -65,6 +65,9 @@ pub fn get(openssl_version: Option<u64>, libressl_version: Option<u64>) -> Vec<&
if libressl_version >= 0x3_09_00_00_0 {
cfgs.push("libressl390");
}
if libressl_version >= 0x4_00_00_00_0 {
cfgs.push("libressl400");
}
} else {
let openssl_version = openssl_version.unwrap();

Expand Down
14 changes: 10 additions & 4 deletions openssl-sys/src/handwritten/x509.rs
@@ -1,10 +1,16 @@
use super::super::*;
use libc::*;

#[repr(C)]
pub struct X509_VAL {
pub notBefore: *mut ASN1_TIME,
pub notAfter: *mut ASN1_TIME,
cfg_if! {
if #[cfg(libressl400)] {
pub enum X509_VAL {}
} else {
#[repr(C)]
pub struct X509_VAL {
pub notBefore: *mut ASN1_TIME,
pub notAfter: *mut ASN1_TIME,
}
}
}

pub enum X509_NAME_ENTRY {}
Expand Down

0 comments on commit af3028b

Please sign in to comment.