RFR: 8274524: SSLSocket.close() hangs if it is called during the ssl handshake

Clive Verghese cverghese at openjdk.java.net
Thu Sep 30 23:07:30 UTC 2021


On Wed, 29 Sep 2021 19:31:53 GMT, Alexey Bakhtin <abakhtin at openjdk.org> wrote:

> Please review the patch for JDK-8274524
> 
> The fix just adds locks around InputStream read and skip operations to prevent concurrent read from socket.
> sun/security/ssl jtreg tests passed
> api/javax_net/ssl/SSLSocket/setUseClientMode jck test passed

Hi @alexeybakhtin, 

Thank you for the PR. 

I have a question regarding the lock, Would adding a `appInput.readLock.lock()` in `SSLSocketImpl:decode(ByteBuffer)` resolve this issue?

-------------

PR: https://git.openjdk.java.net/jdk/pull/5760



More information about the security-dev mailing list