RFR[9] JDK-8171900: javax/net/ssl/SSLSession/SessionTimeOutTests.java failed with "SSLHandshakeException: Remote host terminated the handshake"

John Jiang sha.jiang at oracle.com
Mon Jan 23 13:17:20 UTC 2017


Hi,
The patch takes some code patterns from SSLSocketTemplate.java to try to 
resolve the following issues:
JDK-8171900: javax/net/ssl/SSLSession/SessionTimeOutTests.java failed 
with "SSLHandshakeException: Remote host terminated the handshake"
JDK-8173142: javax/net/ssl/SSLSession/SessionTimeOutTests.java fails 
with SocketException: Address already in use

Besides the above issues, I also find two more problems.
1. It is too late to set property javax.net.debug. Since the debug flag 
is false, this problem is not exposed.

2. In theory, the test can take multiple clients to connect to one 
server, namely MAX_ACTIVE_CONNECTIONS [1] could be greater than PORTS 
[2].  But this test execution would hang for this case. Because the 
connections between the client side and server side possibly are not 
matched if MAX_ACTIVE_CONNECTIONS is not a multiple of PORTS.
For example, a client wants to connect to a specified server for 3 
times, however, the server can accept only 2 requests. And at the 
meantime, another server are waiting for 3 connections, but the client 
side send only 2 requests to it.
Since MAX_ACTIVE_CONNECTIONS is equal to PORTS, the problem also doesn't 
raise in practice, but that still be a bug in logic.

Webrev: http://cr.openjdk.java.net/~jjiang/8171900/webrev.00/

[1] 
http://hg.openjdk.java.net/jdk9/dev/jdk/file/57ef255b367b/test/javax/net/ssl/SSLSession/SessionTimeOutTests.java#l109
[2] 
http://hg.openjdk.java.net/jdk9/dev/jdk/file/57ef255b367b/test/javax/net/ssl/SSLSession/SessionTimeOutTests.java#l78

Best regards,
John Jiang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20170123/5a21b5fb/attachment.htm>


More information about the security-dev mailing list