Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pq-tls interop test with BoringSSL #2199

Merged
merged 3 commits into from
Feb 19, 2025

Conversation

chockalingamc
Copy link
Contributor

Description of changes:

Adding cross library PQ TLS interop test with BoringSSL

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.

@chockalingamc chockalingamc requested a review from a team as a code owner February 17, 2025 19:30
@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.04%. Comparing base (154f998) to head (71ed17d).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2199      +/-   ##
==========================================
- Coverage   79.05%   79.04%   -0.01%     
==========================================
  Files         612      612              
  Lines      106159   106164       +5     
  Branches    15002    15004       +2     
==========================================
- Hits        83923    83921       -2     
- Misses      21582    21590       +8     
+ Partials      654      653       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 73 to 77
echo "build boring-ssl with aws-lc"
cd "$BSSL_SRC_FOLDER"
cmake . "-B$BSSL_BUILD_FOLDER" -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$AWS_LC_INSTALL_FOLDER"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why build BoringSSL with AWS-LC, shouldn't they be independent? This looks like you're trying to build BoringSSL with AWS-LC's headers/libraries which doesn't make sense.

Copy link
Contributor Author

@chockalingamc chockalingamc Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching. It was a copy over from s2n-tls build. Verified that CMAKE_PREFIX_PATH is a no-op for boring SSL builds as it doesn't have to find headers or libraries using that parameter like s2n-tls does. Will remove it.

Copy link
Contributor

@geedo0 geedo0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Some food for thought though. I checked the logs for this task and it's not debuggable in practice. CodeBuild truncates the logs at 10k lines in the UI. Those 10k lines are consumed by the LC and S2N builds. To get to the actual logs of this test, you have to figure out how to download the full logs and open it locally without crashing your text editor. Suggest looking into ways to silence some of this irrelevant logging.

cat "$AWS_LC_BUILD_FOLDER"/s_server_out
cat "$BSSL_BUILD_FOLDER"/s_client_out
grep "Connected" "$AWS_LC_BUILD_FOLDER"/s_server_out
grep "ECDHE group" "$AWS_LC_BUILD_FOLDER"/s_server_out | grep "$GROUP"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Why'd you switch to calling this an ECDHE group here? Earlier you used KEM groups. More generally, we should use the more generic "TLS group" terminology.

Copy link
Contributor Author

@chockalingamc chockalingamc Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is just validating what the tool prints in its server/client logs.
s2n-tls tool used the term KEM group. bssl tool uses ECDHE group. If either tool is updated to use the generic term, we need to update the test at that time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reg log output, we could perhaps not log the build output (suppress stdout while keeping stderr logs).
The current output is around 3K lines most of which is the lc/s2n/bssl build stdout logs.

@chockalingamc
Copy link
Contributor Author

Suppressing s2n-tls and boring-ssl build stdouts almost halved the log size.
Also moving from Release to Debug for all builds (after a build issue in Boring SSL with Release builds) dropped overall test runtime from ~12 to ~6 minutes.

@andrewhop andrewhop merged commit ead47e8 into aws:main Feb 19, 2025
114 of 119 checks passed
@chockalingamc chockalingamc deleted the pq_tls_bssl_test branch February 19, 2025 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants