Loading .github/workflows/ci.yml +3 −1 Original line number Diff line number Diff line Loading @@ -265,7 +265,9 @@ jobs: make make install_sw if: matrix.library.version != 'vendored' && !steps.openssl-cache.outputs.cache-hit - run: echo "RUST_TEST_THREADS=1" >> $GITHUB_ENV - run: | echo "RUST_TEST_THREADS=1" >> $GITHUB_ENV echo BINDGEN_EXTRA_CLANG_ARGS="--sysroot /usr/arm-linux-gnueabi" >> $GITHUB_ENV if: matrix.target == 'arm-unknown-linux-gnueabihf' - uses: actions/cache@v1 with: Loading openssl-sys/build/run_bindgen.rs +2 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,8 @@ impl ParseCallbacks for OpensslCallbacks { | "BIO_meth_set_puts" | "BIO_meth_set_ctrl" | "BIO_meth_set_create" | "BIO_meth_set_destroy" => Some(format!("{}__fixed_rust", original_item_name)), | "BIO_meth_set_destroy" | "CRYPTO_set_locking_callback" => Some(format!("{}__fixed_rust", original_item_name)), _ => None, } } Loading openssl-sys/src/bio.rs +0 −40 Original line number Diff line number Diff line Loading @@ -65,43 +65,3 @@ extern "C" { destroy: unsafe extern "C" fn(*mut BIO) -> c_int, ) -> c_int; } #[allow(clashing_extern_declarations)] extern "C" { #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_write"] pub fn BIO_meth_set_write__fixed_rust( biom: *mut BIO_METHOD, write: Option<unsafe extern "C" fn(*mut BIO, *const c_char, c_int) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_read"] pub fn BIO_meth_set_read__fixed_rust( biom: *mut BIO_METHOD, read: Option<unsafe extern "C" fn(*mut BIO, *mut c_char, c_int) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_puts"] pub fn BIO_meth_set_puts__fixed_rust( biom: *mut BIO_METHOD, read: Option<unsafe extern "C" fn(*mut BIO, *const c_char) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_ctrl"] pub fn BIO_meth_set_ctrl__fixed_rust( biom: *mut BIO_METHOD, read: Option<unsafe extern "C" fn(*mut BIO, c_int, c_long, *mut c_void) -> c_long>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_create"] pub fn BIO_meth_set_create__fixed_rust( biom: *mut BIO_METHOD, create: Option<unsafe extern "C" fn(*mut BIO) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_destroy"] pub fn BIO_meth_set_destroy__fixed_rust( biom: *mut BIO_METHOD, destroy: Option<unsafe extern "C" fn(*mut BIO) -> c_int>, ) -> c_int; } openssl-sys/src/crypto.rs +7 −0 Original line number Diff line number Diff line use libc::*; use *; extern "C" { #[cfg(not(ossl110))] pub fn CRYPTO_set_locking_callback( func: unsafe extern "C" fn(mode: c_int, n: c_int, file: *const c_char, line: c_int), ); } cfg_if! { if #[cfg(ossl110)] { type CRYPTO_EX_new_ret = (); Loading openssl-sys/src/handwritten/bio.rs +40 −0 Original line number Diff line number Diff line Loading @@ -65,3 +65,43 @@ extern "C" { #[cfg(any(ossl110, libressl273))] pub fn BIO_meth_free(biom: *mut BIO_METHOD); } #[allow(clashing_extern_declarations)] extern "C" { #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_write"] pub fn BIO_meth_set_write__fixed_rust( biom: *mut BIO_METHOD, write: Option<unsafe extern "C" fn(*mut BIO, *const c_char, c_int) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_read"] pub fn BIO_meth_set_read__fixed_rust( biom: *mut BIO_METHOD, read: Option<unsafe extern "C" fn(*mut BIO, *mut c_char, c_int) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_puts"] pub fn BIO_meth_set_puts__fixed_rust( biom: *mut BIO_METHOD, read: Option<unsafe extern "C" fn(*mut BIO, *const c_char) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_ctrl"] pub fn BIO_meth_set_ctrl__fixed_rust( biom: *mut BIO_METHOD, read: Option<unsafe extern "C" fn(*mut BIO, c_int, c_long, *mut c_void) -> c_long>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_create"] pub fn BIO_meth_set_create__fixed_rust( biom: *mut BIO_METHOD, create: Option<unsafe extern "C" fn(*mut BIO) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_destroy"] pub fn BIO_meth_set_destroy__fixed_rust( biom: *mut BIO_METHOD, destroy: Option<unsafe extern "C" fn(*mut BIO) -> c_int>, ) -> c_int; } Loading
.github/workflows/ci.yml +3 −1 Original line number Diff line number Diff line Loading @@ -265,7 +265,9 @@ jobs: make make install_sw if: matrix.library.version != 'vendored' && !steps.openssl-cache.outputs.cache-hit - run: echo "RUST_TEST_THREADS=1" >> $GITHUB_ENV - run: | echo "RUST_TEST_THREADS=1" >> $GITHUB_ENV echo BINDGEN_EXTRA_CLANG_ARGS="--sysroot /usr/arm-linux-gnueabi" >> $GITHUB_ENV if: matrix.target == 'arm-unknown-linux-gnueabihf' - uses: actions/cache@v1 with: Loading
openssl-sys/build/run_bindgen.rs +2 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,8 @@ impl ParseCallbacks for OpensslCallbacks { | "BIO_meth_set_puts" | "BIO_meth_set_ctrl" | "BIO_meth_set_create" | "BIO_meth_set_destroy" => Some(format!("{}__fixed_rust", original_item_name)), | "BIO_meth_set_destroy" | "CRYPTO_set_locking_callback" => Some(format!("{}__fixed_rust", original_item_name)), _ => None, } } Loading
openssl-sys/src/bio.rs +0 −40 Original line number Diff line number Diff line Loading @@ -65,43 +65,3 @@ extern "C" { destroy: unsafe extern "C" fn(*mut BIO) -> c_int, ) -> c_int; } #[allow(clashing_extern_declarations)] extern "C" { #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_write"] pub fn BIO_meth_set_write__fixed_rust( biom: *mut BIO_METHOD, write: Option<unsafe extern "C" fn(*mut BIO, *const c_char, c_int) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_read"] pub fn BIO_meth_set_read__fixed_rust( biom: *mut BIO_METHOD, read: Option<unsafe extern "C" fn(*mut BIO, *mut c_char, c_int) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_puts"] pub fn BIO_meth_set_puts__fixed_rust( biom: *mut BIO_METHOD, read: Option<unsafe extern "C" fn(*mut BIO, *const c_char) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_ctrl"] pub fn BIO_meth_set_ctrl__fixed_rust( biom: *mut BIO_METHOD, read: Option<unsafe extern "C" fn(*mut BIO, c_int, c_long, *mut c_void) -> c_long>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_create"] pub fn BIO_meth_set_create__fixed_rust( biom: *mut BIO_METHOD, create: Option<unsafe extern "C" fn(*mut BIO) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_destroy"] pub fn BIO_meth_set_destroy__fixed_rust( biom: *mut BIO_METHOD, destroy: Option<unsafe extern "C" fn(*mut BIO) -> c_int>, ) -> c_int; }
openssl-sys/src/crypto.rs +7 −0 Original line number Diff line number Diff line use libc::*; use *; extern "C" { #[cfg(not(ossl110))] pub fn CRYPTO_set_locking_callback( func: unsafe extern "C" fn(mode: c_int, n: c_int, file: *const c_char, line: c_int), ); } cfg_if! { if #[cfg(ossl110)] { type CRYPTO_EX_new_ret = (); Loading
openssl-sys/src/handwritten/bio.rs +40 −0 Original line number Diff line number Diff line Loading @@ -65,3 +65,43 @@ extern "C" { #[cfg(any(ossl110, libressl273))] pub fn BIO_meth_free(biom: *mut BIO_METHOD); } #[allow(clashing_extern_declarations)] extern "C" { #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_write"] pub fn BIO_meth_set_write__fixed_rust( biom: *mut BIO_METHOD, write: Option<unsafe extern "C" fn(*mut BIO, *const c_char, c_int) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_read"] pub fn BIO_meth_set_read__fixed_rust( biom: *mut BIO_METHOD, read: Option<unsafe extern "C" fn(*mut BIO, *mut c_char, c_int) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_puts"] pub fn BIO_meth_set_puts__fixed_rust( biom: *mut BIO_METHOD, read: Option<unsafe extern "C" fn(*mut BIO, *const c_char) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_ctrl"] pub fn BIO_meth_set_ctrl__fixed_rust( biom: *mut BIO_METHOD, read: Option<unsafe extern "C" fn(*mut BIO, c_int, c_long, *mut c_void) -> c_long>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_create"] pub fn BIO_meth_set_create__fixed_rust( biom: *mut BIO_METHOD, create: Option<unsafe extern "C" fn(*mut BIO) -> c_int>, ) -> c_int; #[cfg(any(ossl110, libressl273))] #[link_name = "BIO_meth_set_destroy"] pub fn BIO_meth_set_destroy__fixed_rust( biom: *mut BIO_METHOD, destroy: Option<unsafe extern "C" fn(*mut BIO) -> c_int>, ) -> c_int; }