Skip to content

Commit

Permalink
fix boring-ssl build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocka Chidambaram committed Feb 18, 2025
1 parent 75b559b commit 75ed6aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ batch:
env:
type: LINUX_CONTAINER
privileged-mode: false
compute-type: BUILD_GENERAL1_SMALL
compute-type: BUILD_GENERAL1_MEDIUM
image: 620771051181.dkr.ecr.us-west-2.amazonaws.com/aws-lc-docker-images-linux-x86:ubuntu-22.04_gcc-12x_latest
variables:
AWS_LC_CI_TARGET: "tests/ci/integration/run_pq_tls_integration.sh"
Expand Down
12 changes: 6 additions & 6 deletions tests/ci/integration/run_pq_tls_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ for GROUP in X25519MLKEM768 SecP256r1MLKEM768; do
echo "TLS Handshake: aws-lc server (bssl) with s2n-tls client (s2nc) for group $GROUP"
"$AWS_LC_BUILD_FOLDER"/tool/bssl s_server -curves $GROUP -accept 45000 -debug \
&> "$AWS_LC_BUILD_FOLDER"/s_server_out &
sleep 2 # to allow for the server to startup in the background thread
sleep 5 # to allow for the server to startup in the background thread
S_PID=$!
# Relying on s2nc behavior that it exits after the first handshake
"$S2N_TLS_BUILD_FOLDER"/bin/s2nc -c default_pq -i localhost 45000 &> "$S2N_TLS_BUILD_FOLDER"/s2nc_out
Expand All @@ -53,7 +53,7 @@ for GROUP in X25519MLKEM768 SecP256r1MLKEM768; do

echo "TLS Handshake: s2n-tls server (s2nd) with aws-lc client (bssl) for group $GROUP"
"$S2N_TLS_BUILD_FOLDER"/bin/s2nd -c default_pq -i localhost 45000 &> "$S2N_TLS_BUILD_FOLDER"/s2nd_out &
sleep 2 # to allow for the server to startup in the background thread
sleep 5 # to allow for the server to startup in the background thread
S_PID=$!
# bssl s_client normally does not exit after a handshake, but when run as a background process
# seems to exit by closing the connection after the first handshake. Relying on that behavior here.
Expand All @@ -72,17 +72,17 @@ git clone --depth 1 --branch "$BSSL_BRANCH" "$BSSL_URL" "$BSSL_SRC_FOLDER"

echo "build boring-ssl with aws-lc"
cd "$BSSL_SRC_FOLDER"
# BoringSSL build fails with -DCMAKE_BUILD_TYPE=Release, when built in ubuntu-22.04_gcc-12x container
cmake . "-B$BSSL_BUILD_FOLDER" -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$AWS_LC_INSTALL_FOLDER"
-DCMAKE_BUILD_TYPE=RelWithDebInfo
ninja -C "$BSSL_BUILD_FOLDER" -j "$NUM_CPU_THREADS"

# BoringSSL supports only X25519MLKEM768 but not SecP256r1MLKEM768 for key exchange
for GROUP in X25519MLKEM768; do
echo "TLS Handshake: aws-lc server (bssl) with boring-ssl client (bssl) for group $GROUP"
"$AWS_LC_BUILD_FOLDER"/tool/bssl s_server -curves $GROUP -accept 45000 -debug \
&> "$AWS_LC_BUILD_FOLDER"/s_server_out &
sleep 2 # to allow for the server to startup in the background thread
sleep 5 # to allow for the server to startup in the background thread
S_PID=$!
"$BSSL_BUILD_FOLDER"/tool/bssl s_client -curves $GROUP -connect localhost:45000 -debug \
&> "$BSSL_BUILD_FOLDER"/s_client_out &
Expand All @@ -98,7 +98,7 @@ for GROUP in X25519MLKEM768; do
echo "TLS Handshake: boring-ssl server (bssl) with aws-lc client (bssl) for group $GROUP"
"$BSSL_BUILD_FOLDER"/tool/bssl s_server -curves $GROUP -accept 45000 -debug \
&> "$BSSL_BUILD_FOLDER"/s_server_out &
sleep 2 # to allow for the server to startup in the background thread
sleep 5 # to allow for the server to startup in the background thread
S_PID=$!
"$AWS_LC_BUILD_FOLDER"/tool/bssl s_client -curves $GROUP -connect localhost:45000 -debug \
&> "$AWS_LC_BUILD_FOLDER"/s_client_out &
Expand Down

0 comments on commit 75ed6aa

Please sign in to comment.