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

JSSE: adjust variable resets in Input/OutputStream.close(), more SSLSession tests and fixes #233

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

cconlon
Copy link
Member

@cconlon cconlon commented Nov 13, 2024

This PR includes fixes to WolfSSLSocket, WolfSSLImplementSSLSession, and related classes:

  • Removes setting this.ssl and this.socket to null in SSLSocket Input/OutputStream.close() methods, in case there is another thread blocked on select/poll() in Input/OutputStream.read/write(). Otherwise, this could result in a NullPointerException.
  • Adds JUnit tests to test getting the SSLSession (SSLSocket.getSession()) at various times throughout handshake process (before, after) and calling SSLSession methods. This will help prevent NullPointerExceptions in the future. Fixes are included to WolfSSLSocket based on the results of this test.

@cconlon cconlon self-assigned this Nov 13, 2024
…other thread is blocked in ssl.read/write() on select/poll()
@cconlon cconlon changed the title JSSE: skip setting ssl to null in Input/OutputStream.close() JSSE: adjust variable resets in Input/OutputStream.close(), more SSLSession tests and fixes Dec 5, 2024
@cconlon cconlon assigned JacobBarthelmeh and wolfSSL-Bot and unassigned cconlon Dec 5, 2024
@JacobBarthelmeh JacobBarthelmeh merged commit 87b6c6a into wolfSSL:master Dec 6, 2024
38 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.

3 participants