Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSLEngine fixes around HandshakeStatus, beginHandshake(), and alerts #197

Merged
merged 5 commits into from
Jun 6, 2024

Conversation

cconlon
Copy link
Member

@cconlon cconlon commented May 30, 2024

This PR includes a few various fixes for SSLEngine including:

  • Only set HandshakeStatus.FINISHED for session tickets being received after the handshake has completed. Otherwise this may put callers into an odd state when the handshake has not finished yet.
  • Calling beginHandshake() more than once can be done to instigate renegotiation. Since wolfJSSE SSLEngine implementation does not support renegotiation yet, we throw a SSLException to make it clear to callers that is the case. This matches behavior of some other providers that do not support renegotiation.
  • Correctly mark inbound and outbound closed when we receive fatal alerts on the client or server sides. This fix was made after running the SunJSSE EngineCloseOnAlert test against wolfJSSE.

This PR includes one change to the session resumption cache:

  • Only store (or return) sessions to/from the Java client cache if the native WOLFSSL_SESSION is resumable. This wraps the native API wolfSSL_SESSION_is_resumable() in WolfSSLSession.sessionIsResumable() and uses that to check. This will ensure we don't try to store or resume a session that native wolfSSL does not consider resumable.

@cconlon cconlon self-assigned this May 30, 2024
@cconlon cconlon assigned JacobBarthelmeh and unassigned cconlon Jun 6, 2024
@JacobBarthelmeh JacobBarthelmeh merged commit bbde8fa into wolfSSL:master Jun 6, 2024
35 checks passed
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.

2 participants