Skip to content

Fixes for cert issuer DN, locale date parsing, key types, trust store fallback, local certs - #416

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

cconlon wants to merge 5 commits into
wolfSSL:masterfrom
cconlon:fenrirSept17

Conversation

@cconlon

@cconlon cconlon commented Sep 17, 2026

Copy link
Copy Markdown
Member

This PR includes 6 Fenrir fixes:

  • F-13471: setIssuerName() uses the issuer cert's subject DN, and drops the unused issuer-name binding.
  • F-13475 / F-13476: Parse cert and CRL validity dates with Locale.US.
  • F-13478: getPublicKey() handles EdDSA and RSASSA-PSS key types.
  • F-13479: Fall back to cacerts on a missing system store, fail on a corrupt one, matching SunJSSE.
  • F-14005: getLocalPrincipal() no longer frees X509KeyManager-owned certificates.

@cconlon cconlon self-assigned this Sep 17, 2026
@cconlon
cconlon requested review from wolfSSL-Fenrir-bot and a lite review from Copilot September 17, 2026 17:26

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot 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.

Fenrir Automated Review — PR #416

Scan targets checked: wolfssljni-src, wolfssljni-bugs

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

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 implements several correctness fixes across certificate handling (issuer DN, validity date parsing), public key type support (EdDSA/RSASSA-PSS), trust store loading behavior, and JSSE session local-certificate ownership, with accompanying regression tests.

Changes:

  • Fix issuer DN selection during cert generation and ensure validity date parsing is locale-stable.
  • Extend getPublicKey() to support EdDSA and RSASSA-PSS, plus tests and fixture certs.
  • Align trust-store fallback/failure behavior with SunJSSE and prevent freeing KeyManager-owned cert chains.

Reviewed changes

Copilot reviewed 11 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/test/com/wolfssl/test/WolfSSLCertificateTest.java Adds issuer DN + locale parsing regression tests for certificates.
src/test/com/wolfssl/test/WolfSSLCRLTest.java Adds locale parsing regression test for CRL update dates.
src/test/com/wolfssl/provider/jsse/test/WolfSSLX509Test.java Adds EdDSA/RSASSA-PSS public key coverage test using DER fixtures.
src/test/com/wolfssl/provider/jsse/test/WolfSSLSessionTest.java Adds test coverage ensuring getLocalPrincipal() doesn’t free KeyManager-owned chains.
src/java/com/wolfssl/provider/jsse/WolfSSLX509.java Adds KeyFactory selection for EdDSA and RSASSA-PSS.
src/java/com/wolfssl/provider/jsse/WolfSSLTrustManager.java Changes system trust-store load semantics (fallback vs fatal corruption) and propagates errors.
src/java/com/wolfssl/provider/jsse/WolfSSLImplementSSLSession.java Stops freeing local certs inside getLocalPrincipal().
src/java/com/wolfssl/WolfSSLCertificate.java Fixes issuer DN pointer source and parses validity dates using Locale.US.
src/java/com/wolfssl/WolfSSLCRL.java Parses CRL update dates using Locale.US.
native/com_wolfssl_WolfSSLCertificate.c Uses CA subject as issuer DN source and renames JNI pointer accessor accordingly.
examples/certs/update-certs.sh Adds EdDSA/RSASSA-PSS DER certs to update list for tests.
Files not reviewed (1)
  • native/com_wolfssl_WolfSSLCertificate.h: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/test/com/wolfssl/provider/jsse/test/WolfSSLSessionTest.java
Comment thread src/java/com/wolfssl/provider/jsse/WolfSSLTrustManager.java
Comment thread src/test/com/wolfssl/provider/jsse/test/WolfSSLSessionTest.java
Comment thread src/test/com/wolfssl/test/WolfSSLCRLTest.java
Comment thread src/test/com/wolfssl/test/WolfSSLCertificateTest.java
@rlm2002

rlm2002 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Resolve merge conflicts please.

@rlm2002 rlm2002 assigned cconlon and unassigned rlm2002 Sep 17, 2026
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.

4 participants