Fixes for CRL callback docs, session SNI copy, cert stack checks, CRL serial test - #413
Fixes for CRL callback docs, session SNI copy, cert stack checks, CRL serial test#413cconlon 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.
|
Please resolve merge conflicts, thanks! |
This PR includes five Fenrir fixes: