Skip to content

Commit

Permalink
hack around evp_pkey_st
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Dec 6, 2021
1 parent eb21848 commit 6371018
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions openssl-sys/build/run_bindgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub fn run(include_dirs: &[PathBuf]) {
.rust_target(RustTarget::Stable_1_47)
.ctypes_prefix("::libc")
.raw_line("use libc::*;")
.raw_line("type evp_pkey_st = EVP_PKEY;")
.allowlist_file(".*/openssl/[^/]+\\.h")
.allowlist_recursively(false)
// libc is missing pthread_once_t on macOS
Expand Down
1 change: 1 addition & 0 deletions openssl-sys/src/handwritten/ssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ extern "C" {
) -> c_int;
pub fn SSL_ctrl(ssl: *mut SSL, cmd: c_int, larg: c_long, parg: *mut c_void) -> c_long;
pub fn SSL_CTX_ctrl(ctx: *mut SSL_CTX, cmd: c_int, larg: c_long, parg: *mut c_void) -> c_long;
#[link_name = "SSL_CTX_callback_ctrl"]
pub fn SSL_CTX_callback_ctrl__fixed_rust(
ctx: *mut SSL_CTX,
cmd: c_int,
Expand Down
3 changes: 1 addition & 2 deletions openssl-sys/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ use *;

cfg_if! {
if #[cfg(any(ossl110, libressl280))] {
pub type EVP_PKEY = evp_pkey_st;
pub enum evp_pkey_st {}
pub enum EVP_PKEY {}
} else {
#[repr(C)]
pub struct EVP_PKEY {
Expand Down

0 comments on commit 6371018

Please sign in to comment.