From 9cafc739d2bc92ca3333504539e2c4d5787be810 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Sat, 2 Dec 2023 16:57:15 -0500 Subject: [PATCH] Restore struct in handwritten, memory-unsafe bindings --- openssl-sys/src/handwritten/x509.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/openssl-sys/src/handwritten/x509.rs b/openssl-sys/src/handwritten/x509.rs index 6fa5179abf..a93142cd2a 100644 --- a/openssl-sys/src/handwritten/x509.rs +++ b/openssl-sys/src/handwritten/x509.rs @@ -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 c_int>, + pub name: *mut c_char, + pub sname: *mut c_char, + pub usr_data: *mut c_void, +} const_ptr_api! { extern "C" {