JDK-8199645 : javax/net/ssl/SSLSession/TestEnabledProtocols.java failed with Connection reset
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.net.ssl
  • Affected Version: 11
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-03-15
  • Updated: 2021-04-22
  • Resolved: 2018-07-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12 JDK 8 Other
11 b22Fixed 12Fixed 8u261Fixed openjdk8u272Resolved
Related Reports
Relates :  
Description
Test name: javax/net/ssl/SSLSession/TestEnabledProtocols.java
This happened in recent Mach5 job jdk-jdk.7805.

This is a part of the output: 

----------System.out:(499/33866)----------
=== Starting new test run ===
Enabled protocols on the server are: [TLSv1]
Enabled protocols on the client are: [TLSv1]
Protocol name after getSession is TLSv1
** Success **
=== Starting new test run ===
Enabled protocols on the server are: [TLSv1]
Enabled protocols on the client are: [TLSv1, SSLv2Hello]
Server SSLHandshakeException:
Client got expected SSLHandshakeException:
javax.net.ssl.SSLHandshakeException: SSLv2Hello is not enabled
	at java.base/sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(SSLSocketInputRecord.java:335)
	at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:173)
	at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1031)
	at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
	at java.base/sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1402)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1429)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
	at TestEnabledProtocols$startServer.run(TestEnabledProtocols.java:213)
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
	at java.base/sun.security.ssl.Alerts.getSSLException(Alerts.java:198)
	at java.base/sun.security.ssl.Alerts.getSSLException(Alerts.java:159)
	at java.base/sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2046)
	at java.base/sun.security.ssl.SSLSocketImpl.processInputRecord(SSLSocketImpl.java:1207)
	at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1074)
	at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
	at java.base/sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1402)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1429)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
	at TestEnabledProtocols$startClient.run(TestEnabledProtocols.java:295)
** Success **
=== Starting new test run ===
Enabled protocols on the server are: [TLSv1]
Enabled protocols on the client are: [TLSv1, SSLv3]
Protocol name after getSession is TLSv1
** Success **
=== Starting new test run ===
Enabled protocols on the server are: [TLSv1]
Enabled protocols on the client are: [SSLv3, SSLv2Hello]
Server SSLHandshakeException:
javax.net.ssl.SSLHandshakeException: SSLv2Hello is not enabled
	at java.base/sun.security.ssl.SSLSocketInputRecord.handleUnknownRecord(SSLSocketInputRecord.java:335)
	at java.base/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:173)
	at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1031)
	at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
	at java.base/sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1402)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1429)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
	at TestEnabledProtocols$startServer.run(TestEnabledProtocols.java:213)
Client got expected SSLHandshakeException:
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
	at java.base/sun.security.ssl.Alerts.getSSLException(Alerts.java:198)
	at java.base/sun.security.ssl.Alerts.getSSLException(Alerts.java:159)
	at java.base/sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2046)
	at java.base/sun.security.ssl.SSLSocketImpl.processInputRecord(SSLSocketImpl.java:1207)
	at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1074)
	at java.base/sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
	at java.base/sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1402)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1429)
	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
	at TestEnabledProtocols$startClient.run(TestEnabledProtocols.java:295)
Comments
Verified by running tests javax/net/ssl/SSLSession/TestEnabledProtocols.java with JDK 11 build 22 on macosx-64.
16-07-2018

It would be better to refactor this test with SSLSocketTemplate.java
10-07-2018

In what way is this issue "Fixed"? There is no changeset associated with it AFAICS. If it is "fixed" by a different issue then it should be closed as a duplicate so we can see where it is actually fixed. This problem continues to appear in JDK 11 CI.
10-07-2018

This test should be fixed together with JDK-8196584.
28-06-2018