Skip to content

Fixes for date getters, comments, KeyManager alias lookup, and buffer zeroing - #412

Open
cconlon wants to merge 5 commits into
wolfSSL:masterfrom
cconlon:fenrirSept1_2
Open

Fixes for date getters, comments, KeyManager alias lookup, and buffer zeroing#412
cconlon wants to merge 5 commits into
wolfSSL:masterfrom
cconlon:fenrirSept1_2

Conversation

@cconlon

@cconlon cconlon commented Sep 1, 2026

Copy link
Copy Markdown
Member

This PR includes five Fenrir fixes:

  • F-12683: Null-check ASN.1 time formatting result in the certificate and CRL date getters.
  • F-12689: Document the DTLS protocol versions in the cipher-list comment to match the Java enum.
  • F-12690: Correct the ALPN getter comment to describe the negotiated protocol for either role.
  • F-12694: Skip cert-less aliases in the cached KeyManager alias lookup, matching direct KeyStore access.
  • F-12695: Zero pooled direct ByteBuffers before reuse or discard, with the wipe kept outside the pool lock.

@cconlon cconlon self-assigned this Sep 1, 2026
Copilot AI lite review requested due to automatic review settings September 1, 2026 21:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/java/com/wolfssl/provider/jsse/WolfSSLKeyX509.java
Comment thread src/test/com/wolfssl/provider/jsse/test/WolfSSLKeyX509Test.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants