Skip to content

Commit

Permalink
Merge pull request #2227 from botovq/x509_val
Browse files Browse the repository at this point in the history
Make X509_VAL opaque for LibreSSL 4.0.0
  • Loading branch information
alex committed Apr 28, 2024
2 parents 96e0f5e + 6162540 commit 9b90b7d
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 9b90b7d

Please sign in to comment.