forked from aws/aws-lc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Description: Refactored existing x509 tests Added OpenSSL comparison tests and CI script By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license. --------- Co-authored-by: Samuel Chiang <[email protected]> (cherry picked from commit f723a0c)
- Loading branch information
1 parent
481bded
commit 805d238
Showing
6 changed files
with
350 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: OpenSSL CLI Comparison Tests | ||
on: | ||
push: | ||
branches: [ '*' ] | ||
pull_request: | ||
branches: [ '*' ] | ||
|
||
jobs: | ||
openssl_comparison_tests: | ||
if: github.repository_owner == 'aws' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install OS Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y --no-install-recommends install \ | ||
cmake gcc ninja-build golang make autoconf pkg-config openssl | ||
- name: Make the script executable | ||
run: chmod +x ./tests/ci/run_openssl_comparison_tests.sh | ||
|
||
- name: Build AWS-LC & OpenSSL and Run Comparison Tests | ||
run: | | ||
./tests/ci/run_openssl_comparison_tests.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env bash | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 OR ISC | ||
|
||
set -ex | ||
|
||
source tests/ci/common_posix_setup.sh | ||
|
||
scratch_folder=${SYS_ROOT}/"openssl-scratch" | ||
install_dir="${scratch_folder}/libcrypto_install_dir" | ||
openssl_url='https://github.com/openssl/openssl.git' | ||
openssl_1_1_1_branch='OpenSSL_1_1_1-stable' | ||
openssl_1_0_2_branch='OpenSSL_1_0_2-stable' | ||
openssl_3_1_branch='openssl-3.1' | ||
openssl_3_2_branch='openssl-3.2' | ||
openssl_master_branch='master' | ||
|
||
mkdir -p "${scratch_folder}" | ||
rm -rf "${scratch_folder:?}"/* | ||
|
||
build_openssl $openssl_1_0_2_branch | ||
build_openssl $openssl_1_1_1_branch | ||
build_openssl $openssl_3_1_branch | ||
build_openssl $openssl_3_2_branch | ||
build_openssl $openssl_master_branch | ||
|
||
run_build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_STANDARD=11 -DENABLE_DILITHIUM=ON | ||
|
||
# OpenSSL 3.1.0 on switches from lib folder to lib64 folder | ||
declare -A openssl_branches=( | ||
["$openssl_1_0_2_branch"]="lib" | ||
["$openssl_1_1_1_branch"]="lib" | ||
["$openssl_3_1_branch"]="lib64" | ||
["$openssl_3_2_branch"]="lib64" | ||
["$openssl_master_branch"]="lib64" | ||
) | ||
|
||
# Run X509 Comparison Tests against all OpenSSL branches | ||
export AWSLC_TOOL_PATH="${BUILD_ROOT}/tool-openssl/openssl" | ||
for branch in "${!openssl_branches[@]}"; do | ||
export OPENSSL_TOOL_PATH="${install_dir}/openssl-${branch}/bin/openssl" | ||
echo "Running X509ComparisonTests against OpenSSL ${branch}" | ||
LD_LIBRARY_PATH="${install_dir}/openssl-${branch}/${openssl_branches[$branch]}" "${BUILD_ROOT}/tool-openssl/tool_openssl_test" --gtest_filter=X509ComparisonTest.* | ||
done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.