Fixes for date getters, comments, KeyManager alias lookup, and buffer zeroing - #412
Open
cconlon wants to merge 5 commits into
Open
Fixes for date getters, comments, KeyManager alias lookup, and buffer zeroing#412cconlon wants to merge 5 commits into
cconlon wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
This PR addresses several correctness and security hardening fixes across the JSSE provider, including alias selection consistency, safer ASN.1 time conversions, improved buffer hygiene, and comment accuracy.
Changes:
- Add coverage and fix behavior for cert-less KeyStore aliases in cached KeyManager alias lookup.
- Prevent null-dereference in native ASN.1 time-to-string conversions for cert/CRL date getters.
- Zero pooled direct
ByteBuffers before reuse/discard to avoid retaining plaintext, and update protocol-related comments (ALPN/TLS versions).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/com/wolfssl/provider/jsse/test/WolfSSLKeyX509Test.java | Adds a regression test ensuring cached/direct alias paths skip cert-less entries. |
| src/java/com/wolfssl/provider/jsse/WolfSSLKeyX509.java | Skips aliases without cached certificates to match direct KeyStore behavior. |
| src/java/com/wolfssl/WolfSSLSession.java | Introduces direct-buffer wiping and adjusts pooling synchronization to keep wiping outside the lock. |
| native/com_wolfssl_WolfSSLSession.c | Updates ALPN getter comment to reflect negotiated protocol semantics. |
| native/com_wolfssl_WolfSSLCertificate.c | Adds null-check around ASN.1 time formatting before creating Java strings. |
| native/com_wolfssl_WolfSSLCRL.c | Adds null-check around ASN.1 time formatting before creating Java strings. |
| native/com_wolfssl_WolfSSL.c | Updates cipher-list comment to include DTLS protocol versions consistent with Java enum. |
💡 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: