Fixes for CRL callback docs, session SNI copy, cert stack checks, CRL serial test - #413
Open
cconlon wants to merge 5 commits into
Open
Fixes for CRL callback docs, session SNI copy, cert stack checks, CRL serial test#413cconlon wants to merge 5 commits into
cconlon wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
There are a few correctness gaps in the new test coverage and a potential NULL-free risk in the native extension cleanup that should be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR applies a set of targeted fixes across the wolfSSL JNI/JSSE layers: clarifying CRL callback behavior, correcting SSLSession copy semantics for SNI, tightening native memory/NULL handling around certificate stacks and extension retrieval, and adding regression tests for CRL serial handling.
Changes:
- Document that missing-CRL callbacks are process-wide per registration level (session vs context) due to native callback limitations.
- Preserve stored SNI server names when copying
WolfSSLImplementSSLSession. - Harden native JNI paths for certificate stack handling and extension retrieval cleanup, and add a CRL revoked-serial decode test.
File summaries
| File | Description |
|---|---|
| src/test/com/wolfssl/test/WolfSSLCRLTest.java | Adds a CRL serial decode/round-trip regression test. |
| src/test/com/wolfssl/provider/jsse/test/WolfSSLSessionTest.java | Adds a regression test ensuring the SSLSession copy constructor preserves SNI server names. |
| src/java/com/wolfssl/WolfSSLSession.java | Expands Javadoc to clarify missing-CRL callback registration scope/behavior. |
| src/java/com/wolfssl/WolfSSLContext.java | Expands Javadoc to clarify missing-CRL callback registration scope/behavior. |
| src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java | Copies stored SNI server names in the session copy constructor. |
| native/com_wolfssl_WolfSSLX509StoreCtx.c | Adds NULL/empty-stack handling for certificate-stack retrieval in getDerCerts. |
| native/com_wolfssl_WolfSSLCertificate.c | Improves JNI error handling and frees extension objects/stacks on the pre-4.2.0 path. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
This PR includes five Fenrir fixes: