From 64c853113d499b6321093577faf0a9f62f02739a Mon Sep 17 00:00:00 2001 From: Andrew Hopkins Date: Thu, 14 Mar 2024 15:51:45 -0700 Subject: [PATCH] Add back fips 2021 testing, also fix the old check for SHA3 and AWS-LC versions --- tests/ci/run_benchmark_build_tests.sh | 19 +++++++++---------- tool/speed.cc | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/tests/ci/run_benchmark_build_tests.sh b/tests/ci/run_benchmark_build_tests.sh index a2e1d371ca..963e2e655a 100755 --- a/tests/ci/run_benchmark_build_tests.sh +++ b/tests/ci/run_benchmark_build_tests.sh @@ -40,8 +40,7 @@ function build_aws_lc_branch { -DFIPS=1 \ -DENABLE_DILITHIUM=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DBUILD_SHARED_LIBS=1 \ - -DBUILD_TESTING=OFF + -DBUILD_SHARED_LIBS=1 ninja install popd rm -rf "${scratch_folder}/aws-lc-${branch}" @@ -98,14 +97,14 @@ open31:${install_dir}/openssl-${openssl_3_1_branch};\ open32:${install_dir}/openssl-${openssl_3_2_branch};\ openmaster:${install_dir}/openssl-${openssl_master_branch};\ boringssl:${install_dir}/boringssl;" -"${BUILD_ROOT}/tool/aws-lc-fips-2021" -timeout_ms 10 -"${BUILD_ROOT}/tool/aws-lc-fips-2022" -timeout_ms 10 -"${BUILD_ROOT}/tool/open102" -timeout_ms 10 -"${BUILD_ROOT}/tool/open111" -timeout_ms 10 -"${BUILD_ROOT}/tool/open31" -timeout_ms 10 -"${BUILD_ROOT}/tool/open32" -timeout_ms 10 -"${BUILD_ROOT}/tool/openmaster" -timeout_ms 10 -"${BUILD_ROOT}/tool/boringssl" -timeout_ms 10 +LD_LIBRARY_PATH="${install_dir}/aws-lc-fips-2021-10-20/lib" "${BUILD_ROOT}/tool/aws-lc-fips-2021" -timeout_ms 10 +LD_LIBRARY_PATH="${install_dir}/aws-lc-fips-2022/lib" "${BUILD_ROOT}/tool/aws-lc-fips-2022" -timeout_ms 10 +LD_LIBRARY_PATH="${install_dir}/openssl-${openssl_1_0_2_branch}/lib" "${BUILD_ROOT}/tool/open102" -timeout_ms 10 +LD_LIBRARY_PATH="${install_dir}/openssl-${openssl_1_1_1_branch}/lib" "${BUILD_ROOT}/tool/open111" -timeout_ms 10 +LD_LIBRARY_PATH="${install_dir}/openssl-${openssl_3_1_branch}/lib" "${BUILD_ROOT}/tool/open31" -timeout_ms 10 +LD_LIBRARY_PATH="${install_dir}/openssl-${openssl_3_2_branch}/lib" "${BUILD_ROOT}/tool/open32" -timeout_ms 10 +LD_LIBRARY_PATH="${install_dir}/openssl-${openssl_master_branch}/lib" "${BUILD_ROOT}/tool/openmaster" -timeout_ms 10 +LD_LIBRARY_PATH="${install_dir}/boringssl" "${BUILD_ROOT}/tool/boringssl/lib" -timeout_ms 10 echo "Testing ossl_bm with OpenSSL 1.0 with the legacy build option" run_build -DOPENSSL_1_0_INSTALL_DIR="${install_dir}/openssl-${openssl_1_0_2_branch}" -DASAN=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo diff --git a/tool/speed.cc b/tool/speed.cc index 2a61eda680..81f7483482 100644 --- a/tool/speed.cc +++ b/tool/speed.cc @@ -2668,7 +2668,7 @@ bool Speed(const std::vector &args) { !SpeedHash(EVP_sha384(), "SHA-384", selected) || !SpeedHash(EVP_sha512(), "SHA-512", selected) || // OpenSSL 1.0 and BoringSSL don't support SHA3. -#if (!defined(OPENSSL_1_0_BENCHMARK) && !defined(BORINGSSL_BENCHMARK)) || AWSLC_API_VERSION > 16 +#if (!defined(OPENSSL_1_0_BENCHMARK) && !defined(BORINGSSL_BENCHMARK) && !defined(OPENSSL_IS_AWSLC)) || AWSLC_API_VERSION > 16 !SpeedHash(EVP_sha3_224(), "SHA3-224", selected) || !SpeedHash(EVP_sha3_256(), "SHA3-256", selected) || !SpeedHash(EVP_sha3_384(), "SHA3-384", selected) ||