-
Notifications
You must be signed in to change notification settings - Fork 134
Add two new APIs to expose TLS 1.3 traffic secrets for kTLS #2506
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
Merged
+153
−0
Conversation
This file contains hidden or 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
53ee036
to
422af51
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2506 +/- ##
==========================================
+ Coverage 78.85% 78.87% +0.02%
==========================================
Files 640 640
Lines 109560 109604 +44
Branches 15520 15527 +7
==========================================
+ Hits 86389 86449 +60
+ Misses 22471 22457 -14
+ Partials 700 698 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
samuel40791765
previously approved these changes
Jun 25, 2025
torben-hansen
previously approved these changes
Jun 25, 2025
Co-authored-by: torben-hansen <50673096+torben-hansen@users.noreply.github.com>
5012b93
Co-authored-by: torben-hansen <50673096+torben-hansen@users.noreply.github.com>
samuel40791765
approved these changes
Jun 25, 2025
torben-hansen
approved these changes
Jun 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds two new APIs to expose TLS 1.3 traffic secrets:
SSL_get_read_traffic_secret
: Retrieves the read traffic secret for the current connection stateSSL_get_write_traffic_secret
: Retrieves the write traffic secret for the current connection statePurpose
These APIs allow applications to access the TLS 1.3 traffic secrets, similar to the previous protocol version
SSL_generate_key_block
.API Details
Both functions follow the same pattern:
Security Considerations
These APIs are intended for advanced use cases where applications need direct access to TLS 1.3 key material. Users should be aware that exposing these secrets allows for decryption of TLS 1.3 traffic, and appropriate security measures should be taken when handling this sensitive material.
Testing
The implementation includes comprehensive tests that verify:
Compatibility
These APIs are new additions and do not affect existing functionality.
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.