JSSE: implement WolfSSLPrincipal.toString() inside WolfSSLX509#281
Merged
rlm2002 merged 1 commit intowolfSSL:masterfrom Jul 17, 2025
Merged
JSSE: implement WolfSSLPrincipal.toString() inside WolfSSLX509#281rlm2002 merged 1 commit intowolfSSL:masterfrom
rlm2002 merged 1 commit intowolfSSL:masterfrom
Conversation
ef6bf9d to
d8ed517
Compare
…Unit tests for Principal methods including default implies()
d8ed517 to
3c25229
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR adds a toString() override for WolfSSLPrincipal to return the same value as getName() and supplements it with JUnit tests verifying toString(), getName(), interface conformance, and the default implies() behavior.
- Added
toString()inWolfSSLX509principal implementation - Introduced common test setup and multiple new JUnit tests in
WolfSSLX509Test.java - Adjusted test output indentation in existing tests
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/java/com/wolfssl/provider/jsse/WolfSSLX509.java | Implemented toString() to delegate to getName() |
| src/test/com/wolfssl/provider/jsse/test/WolfSSLX509Test.java | Added @Before setup and tests for principal methods; tweaked indentation |
Comments suppressed due to low confidence (2)
src/test/com/wolfssl/provider/jsse/test/WolfSSLX509Test.java:410
- [nitpick] The indentation in these error/pass messages now uses three tabs, which differs from other tests—consider standardizing to a single tab for consistency.
error("\t\t\t... failed");
rlm2002
approved these changes
Jul 16, 2025
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 addresses #280, and implements the
toString()method insideWolfSSLPrincipal(implements java.security.Principal).Additional JUnit tests are added here to verify behavior correctness, as well as behavior of default
implies()method implementation fromjava.security.Principal. Since this default behavior works for us, there is no need to re-implement in WolfSSLPrincipal.