springboot wolfjsse fixes #310
Open
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.
wolfJSSE Compatibility Improvements for Spring Boot
Summary
These changes improve wolfJSSE compatibility with Spring Boot's SSL/TLS testing infrastructure, enabling 266 Spring Boot tests to pass. The updates align behavior with standard SunJSSE expectations, specifically regarding exception types and session state management.
Changes
WolfSSLEngine.java
SSLHandshakeExceptioninstead of a genericSSLExceptionwhen errors occur before handshake completion. Spring Boot tests check exception types to distinguish handshake failures from other SSL errors.WolfSSLEngineHelper.java
clientAuthRequestedflag to session whenneedClientAuthorwantClientAuthis set, enabling propergetPeerCertificates()behavior.WolfSSLImplementSSLSession.java
SSLPeerUnverifiedExceptionwhen called on server-side with no client auth requested (instead of returningnull). This matches SunJSSE behavior that Spring Boot expects.nullwhen no peer certificate is available.WolfSSLKeyX509.java
trustedCertEntry) that have no private key. Previously, this would return aliases for trust anchors that could not be used for client authentication.WolfSSLTrustManager.java
engineInit(ManagerFactoryParameters)to handleCertPathTrustManagerParameters, extracting trust anchors and creating aKeyStore. Used by Tomcat and Spring Boot for SSL configuration.KeyStoreBuilderParametersfor applications that use KeyStore builders.WolfSSLUtil.java
nullearly if protocols array isnull, preventingNullPointerException.