Unverified Commit 16e41768 authored by Steven Fackler's avatar Steven Fackler
Browse files

fixes

parent 6654131d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -71,6 +71,9 @@ pub fn get(openssl_version: Option<u64>, libressl_version: Option<u64>) -> Vec<&
    } else {
        let openssl_version = openssl_version.unwrap();

        if openssl_version >= 0x3_04_00_00_0 {
            cfgs.push("ossl340");
        }
        if openssl_version >= 0x3_03_00_00_0 {
            cfgs.push("ossl330");
        }
+1 −0
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@ fn main() {
    println!("cargo:rustc-check-cfg=cfg(ossl310)");
    println!("cargo:rustc-check-cfg=cfg(ossl320)");
    println!("cargo:rustc-check-cfg=cfg(ossl330)");
    println!("cargo:rustc-check-cfg=cfg(ossl340)");

    check_ssl_kind();

+21 −5
Original line number Diff line number Diff line
@@ -184,12 +184,28 @@ cfg_if! {
        pub const EVP_PKEY_OP_DERIVE: c_int = 1 << 10;
    }
}
#[cfg(ossl340)]
pub const EVP_PKEY_OP_SIGNMSG: c_int = 1 << 14;
#[cfg(ossl340)]
pub const EVP_PKEY_OP_VERIFYMSG: c_int = 1 << 15;

cfg_if! {
    if #[cfg(ossl340)] {
        pub const EVP_PKEY_OP_TYPE_SIG: c_int = EVP_PKEY_OP_SIGN
            | EVP_PKEY_OP_SIGNMSG
            | EVP_PKEY_OP_VERIFY
            | EVP_PKEY_OP_VERIFYMSG
            | EVP_PKEY_OP_VERIFYRECOVER
            | EVP_PKEY_OP_SIGNCTX
            | EVP_PKEY_OP_VERIFYCTX;
    } else {
        pub const EVP_PKEY_OP_TYPE_SIG: c_int = EVP_PKEY_OP_SIGN
            | EVP_PKEY_OP_VERIFY
            | EVP_PKEY_OP_VERIFYRECOVER
            | EVP_PKEY_OP_SIGNCTX
            | EVP_PKEY_OP_VERIFYCTX;
    }
}

pub const EVP_PKEY_OP_TYPE_CRYPT: c_int = EVP_PKEY_OP_ENCRYPT | EVP_PKEY_OP_DECRYPT;

+7 −1
Original line number Diff line number Diff line
@@ -346,7 +346,6 @@ pub const NID_id_mod_cmp2000: c_int = 284;
pub const NID_info_access: c_int = 177;
pub const NID_biometricInfo: c_int = 285;
pub const NID_qcStatements: c_int = 286;
pub const NID_ac_auditEntity: c_int = 287;
pub const NID_ac_targeting: c_int = 288;
pub const NID_aaControls: c_int = 289;
pub const NID_sbgp_ipAddrBlock: c_int = 290;
@@ -1015,3 +1014,10 @@ pub const NID_shake256: c_int = 1101;
pub const NID_chacha20_poly1305: c_int = 1018;
#[cfg(libressl271)]
pub const NID_chacha20_poly1305: c_int = 967;
cfg_if! {
    if #[cfg(ossl340)] {
        pub const NID_ac_auditEntity: c_int = 1323;
    } else {
        pub const NID_ac_auditEntity: c_int = 287;
    }
}