Skip to content

Commit

Permalink
Exclude unsupported algs from older library versions
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatnghiho committed Dec 13, 2024
1 parent e1125cd commit 83d916d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tool/speed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2816,7 +2816,6 @@ bool Speed(const std::vector<std::string> &args) {
#endif
!SpeedHash(EVP_md5(), "MD5", selected) ||
!SpeedHash(EVP_md5_sha1(), "MD5-SHA-1", selected) ||
!SpeedHash(EVP_ripemd160(), "RIPEMD-160", selected) ||
!SpeedHash(EVP_sha1(), "SHA-1", selected) ||
!SpeedHash(EVP_sha224(), "SHA-224", selected) ||
!SpeedHash(EVP_sha256(), "SHA-256", selected) ||
Expand All @@ -2828,8 +2827,15 @@ bool Speed(const std::vector<std::string> &args) {
!SpeedHash(EVP_sha3_256(), "SHA3-256", selected) ||
!SpeedHash(EVP_sha3_384(), "SHA3-384", selected) ||
!SpeedHash(EVP_sha3_512(), "SHA3-512", selected) ||
#endif
#if (!defined(BORINGSSL_BENCHMARK) && !defined(OPENSSL_IS_AWSLC)) || AWSLC_API_VERSION >= 31
// OpenSSL 1.0 and BoringSSL don't support SHAKE
!SpeedHash(EVP_shake128(), "SHAKE-128", selected) ||
!SpeedHash(EVP_shake256(), "SHAKE-256", selected) ||
#endif
#if (!defined(BORINGSSL_BENCHMARK) && !defined(OPENSSL_IS_AWSLC)) || AWSLC_API_VERSION >= 20
// BoringSSL doesn't support ripemd160
!SpeedHash(EVP_ripemd160(), "RIPEMD-160", selected) ||
#endif
!SpeedHmac(EVP_md5(), "HMAC-MD5", selected) ||
!SpeedHmac(EVP_sha1(), "HMAC-SHA1", selected) ||
Expand Down

0 comments on commit 83d916d

Please sign in to comment.