Skip to content

Conversation

@JeremiahM37
Copy link
Contributor

Summary

Fix getPeerCertificateChain() to throw SSLPeerUnverifiedException when client auth not requested, matching SunJSSE behavior.

Problem

SSLSession.getPeerCertificateChain() returned null when the server didn't request client authentication. SunJSSE throws SSLPeerUnverifiedException in this case. This caused compatibility issues with Netty and other frameworks that catch the exception to detect "no peer certificate."

Changes

  • WolfSSLImplementSSLSession.java: Throw SSLPeerUnverifiedException instead of returning null when client auth not requested

Testing

  • Added testGetPeerCertificateChainNoClientAuth to verify exception is thrown when needClientAuth=false and wantClientAuth=false

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.

1 participant