Skip to content

Commit 9cafc73

Browse files
committed
Restore struct in handwritten, memory-unsafe bindings
1 parent 25606f0 commit 9cafc73

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: openssl-sys/src/handwritten/x509.rs

+11-1
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,17 @@ extern "C" {
687687
pub fn X509_REQ_print(bio: *mut BIO, req: *mut X509_REQ) -> c_int;
688688
}
689689

690-
pub enum X509_PURPOSE {}
690+
#[repr(C)]
691+
pub struct X509_PURPOSE {
692+
pub purpose: c_int,
693+
pub trust: c_int, // Default trust ID
694+
pub flags: c_int,
695+
pub check_purpose:
696+
Option<unsafe extern "C" fn(*const X509_PURPOSE, *const X509, c_int) -> c_int>,
697+
pub name: *mut c_char,
698+
pub sname: *mut c_char,
699+
pub usr_data: *mut c_void,
700+
}
691701

692702
const_ptr_api! {
693703
extern "C" {

0 commit comments

Comments
 (0)