Skip to content

Commit

Permalink
Restore struct in handwritten, memory-unsafe bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
davidben committed Dec 2, 2023
1 parent 25606f0 commit 9cafc73
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion openssl-sys/src/handwritten/x509.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,17 @@ extern "C" {
pub fn X509_REQ_print(bio: *mut BIO, req: *mut X509_REQ) -> c_int;
}

pub enum X509_PURPOSE {}
#[repr(C)]
pub struct X509_PURPOSE {
pub purpose: c_int,
pub trust: c_int, // Default trust ID
pub flags: c_int,
pub check_purpose:
Option<unsafe extern "C" fn(*const X509_PURPOSE, *const X509, c_int) -> c_int>,
pub name: *mut c_char,
pub sname: *mut c_char,
pub usr_data: *mut c_void,
}

const_ptr_api! {
extern "C" {
Expand Down

0 comments on commit 9cafc73

Please sign in to comment.