Unverified Commit c249062f authored by Steven Fackler's avatar Steven Fackler Committed by GitHub
Browse files

Merge pull request #1553 from sfackler/providers

Expose providers
parents b3dde76e c4d4c659
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -154,10 +154,10 @@ jobs:
            - name: openssl
              version: vendored
            - name: openssl
              version: 3.0.0
              version: 3.0.1
              dl-path: /
            - name: openssl
              version: 1.1.1l
              version: 1.1.1m
              dl-path: /
            - name: openssl
              version: 1.1.0l
+5 −1
Original line number Diff line number Diff line
@@ -39,9 +39,13 @@ const INCLUDES: &str = "
#include <openssl/cms.h>
#endif

#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x010100000
#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000
#include <openssl/kdf.h>
#endif

#if OPENSSL_VERSION_NUMBER >= 0x30000000
#include <openssl/provider.h>
#endif
";

pub fn run(include_dirs: &[PathBuf]) {
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ pub use handwritten::ocsp::*;
pub use handwritten::pem::*;
pub use handwritten::pkcs12::*;
pub use handwritten::pkcs7::*;
pub use handwritten::provider::*;
pub use handwritten::rand::*;
pub use handwritten::rsa::*;
pub use handwritten::safestack::*;
@@ -49,6 +50,7 @@ mod ocsp;
mod pem;
mod pkcs12;
mod pkcs7;
mod provider;
mod rand;
mod rsa;
mod safestack;
+15 −0
Original line number Diff line number Diff line
use libc::*;
use *;

extern "C" {
    #[cfg(ossl300)]
    pub fn OSSL_PROVIDER_load(ctx: *mut OSSL_LIB_CTX, name: *const c_char) -> *mut OSSL_PROVIDER;
    #[cfg(ossl300)]
    pub fn OSSL_PROVIDER_try_load(
        ctx: *mut OSSL_LIB_CTX,
        name: *const c_char,
        retain_fallbacks: c_int,
    ) -> *mut OSSL_PROVIDER;
    #[cfg(ossl300)]
    pub fn OSSL_PROVIDER_unload(prov: *mut OSSL_PROVIDER) -> c_int;
}
+3 −0
Original line number Diff line number Diff line
@@ -1071,5 +1071,8 @@ cfg_if! {

pub enum OCSP_RESPONSE {}

#[cfg(ossl300)]
pub enum OSSL_PROVIDER {}

#[cfg(ossl300)]
pub enum OSSL_LIB_CTX {}
Loading