Repository navigation
Fixes for wolfJSSE handshake/parsing and JNI buffer/length hardening - #419
Merged
Merged
Conversation
cconlon
requested review from
wolfSSL-Fenrir-bot
and
a lite review from Copilot
September 18, 2026 16:11
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #419
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.
There was a problem hiding this comment.
🟡 Changes recommended
Gate the RSA/ECC-dependent test on both corresponding capability checks.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR hardens wolfJSSE handshake handling, parsing, ECC callbacks, certificate chains, and JNI length validation.
Changes:
- Rejects mode changes after handshake start.
- Trims signature-scheme lists and improves ECC buffer ownership.
- Adds certificate-chain and JNI bounds checks.
File summaries
| File | Reviewed changes |
|---|---|
src/test/com/wolfssl/provider/jsse/test/WolfSSLEngineTest.java |
Adds handshake and signature-scheme regression tests. |
src/java/com/wolfssl/WolfSSLEccSharedSecretCallback.java |
Documents callback buffer ownership. |
src/java/com/wolfssl/provider/jsse/WolfSSLUtil.java |
Uses whitespace-aware comma parsing. |
src/java/com/wolfssl/provider/jsse/WolfSSLTrustX509.java |
Handles empty and single-certificate chains. |
src/java/com/wolfssl/provider/jsse/WolfSSLSocket.java |
Updates handshake mode documentation. |
src/java/com/wolfssl/provider/jsse/WolfSSLEngineHelper.java |
Tracks handshake start state. |
native/com_wolfssl_WolfSSLSession.c |
Bounds native array lengths. |
native/com_wolfssl_WolfSSLContext.c |
Copies server ECC DER data into heap memory. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
cconlon
force-pushed
the
fenrirSept17_4
branch
from
September 18, 2026 17:26
93efcdb to
61e283c
Compare
rlm2002
previously approved these changes
Sep 30, 2026
…hared-secret callback
…sessionFromDerNative
cconlon
force-pushed
the
fenrirSept17_4
branch
from
September 30, 2026 23:08
61e283c to
ab57ed5
Compare
rlm2002
approved these changes
Oct 1, 2026
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 5 Fenrir fixes:
setUseClientMode()once the handshake has begun, matchingSSLEngine/SSLSocketsemantics.jdk.tls.*.SignatureSchemesviasplitCommaListso whitespace after commas is trimmed and every scheme is honored.ByteBuffercopy of the peer public key DER.sortCertChainBySubjectIssuer.GetArrayLength()indtlsCidSet,sessionFromDerNative, anddtlsCidParseNative.