Commit 5c214017 authored by Harry Chen's avatar Harry Chen
Browse files

Specify libressl version requriement of SM3



Signed-off-by: default avatarHarry Chen <i@harrychen.xyz>
parent 44230aff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -243,7 +243,7 @@ extern "C" {
    #[cfg(ossl111)]
    pub fn EVP_shake256() -> *const EVP_MD;
    pub fn EVP_ripemd160() -> *const EVP_MD;
    #[cfg(all(ossl111, not(osslconf = "OPENSSL_NO_SM3")))]
    #[cfg(all(any(ossl111, libressl291), not(osslconf = "OPENSSL_NO_SM3")))]
    pub fn EVP_sm3() -> *const EVP_MD;
    pub fn EVP_des_ecb() -> *const EVP_CIPHER;
    pub fn EVP_des_ede3() -> *const EVP_CIPHER;
+2 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ impl MessageDigest {
        unsafe { MessageDigest(ffi::EVP_ripemd160()) }
    }

    #[cfg(all(ossl111, not(osslconf = "OPENSSL_NO_SM3")))]
    #[cfg(all(any(ossl111, libressl291), not(osslconf = "OPENSSL_NO_SM3")))]
    pub fn sm3() -> MessageDigest {
        unsafe { MessageDigest(ffi::EVP_sm3()) }
    }
@@ -631,6 +631,7 @@ mod tests {
        }
    }

    #[cfg(all(any(ossl111, libressl291), not(osslconf = "OPENSSL_NO_SM3")))]
    #[test]
    fn test_sm3() {
        let tests = [(