JNI: Implement get/set session tickets#284
Merged
cconlon merged 2 commits intowolfSSL:masterfrom Aug 14, 2025
Merged
Conversation
4 tasks
12dbbf1 to
dd3401e
Compare
cconlon
requested changes
Aug 11, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR implements JNI wrapper functions for getting and setting session tickets in wolfSSL, enabling session resumption functionality for TLS 1.3 connections. The implementation provides backward compatibility with older wolfSSL versions.
- Adds
getSessionTicket()andsetSessionTicket()methods to WolfSSLSession class - Introduces
WOLFSSL_MAX_SESSION_TICKET_LENmacro with default value of 2048 bytes for buffer allocation - Implements comprehensive unit tests for session ticket functionality and TLS 1.3 session resumption
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| WolfSSLSession.java | Adds public API methods for getting and setting session tickets with proper synchronization and error handling |
| com_wolfssl_WolfSSLSession.h | Declares JNI function signatures for the new session ticket methods |
| com_wolfssl_WolfSSLSession.c | Implements native JNI wrapper functions with proper memory management and conditional compilation |
| WolfSSLSessionTest.java | Adds unit tests for session ticket operations and TLS 1.3 session resumption scenarios |
dd3401e to
75ee9da
Compare
modify getSessionTickets method
remove whitespace test changes from copilot
75ee9da to
321b350
Compare
Member
|
Overall looks good, waiting on final approval/merge until wolfSSL/wolfssl#9053 gets in. |
Member
|
Doing a quick re-run of CI tests after 9053 has merged. |
cconlon
approved these changes
Aug 14, 2025
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
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.
Adds wrapper and unit tests for get and set session tickets. Implementation of
getSessionTickets()andsetSessionTickets()is compatible with older versions of wolfSSL.Adds macro
WOLFSSL_MAX_SESSION_TICKET_LENwith default value 2048, which is used ingetSessionTickets()to generate a byte array to copy the ticket to before generating a correctly sized jbyteArray.Unit tests aim to check functionality of new functions and ability to resume TLS1.3 session with session tickets.