JDK-8168064 : sun/security/ssl/ServerHandshaker/AnonCipherWithWantClientAuth.java failed with "Received fatal alert: handshake_failure"
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.security
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-10-17
  • Updated: 2017-05-02
  • Resolved: 2016-10-27
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 9
9 b143Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
Test: sun/security/ssl/ServerHandshaker/AnonCipherWithWantClientAuth.java

Reproducible: Intermittent failure

Log:
Client died...
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
	at sun.security.ssl.Alerts.getSSLException(java.base@9-ea/Alerts.java:198)
	at sun.security.ssl.Alerts.getSSLException(java.base@9-ea/Alerts.java:159)
	at sun.security.ssl.SSLSocketImpl.recvAlert(java.base@9-ea/SSLSocketImpl.java:2034)
	at sun.security.ssl.SSLSocketImpl.processInputRecord(java.base@9-ea/SSLSocketImpl.java:1202)
	at sun.security.ssl.SSLSocketImpl.readRecord(java.base@9-ea/SSLSocketImpl.java:1069)
	at sun.security.ssl.SSLSocketImpl.readRecord(java.base@9-ea/SSLSocketImpl.java:959)
	at sun.security.ssl.AppInputStream.read(java.base@9-ea/AppInputStream.java:159)
	at sun.security.ssl.AppInputStream.read(java.base@9-ea/AppInputStream.java:84)
	at AnonCipherWithWantClientAuth.doServerSide(AnonCipherWithWantClientAuth.java:109)
	at AnonCipherWithWantClientAuth.startServer(AnonCipherWithWantClientAuth.java:245)
	at AnonCipherWithWantClientAuth.<init>(AnonCipherWithWantClientAuth.java:202)
	at AnonCipherWithWantClientAuth.main(AnonCipherWithWantClientAuth.java:185)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:535)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:110)
	at java.lang.Thread.run(java.base@9-ea/Thread.java:843)


Comments
Applying the approach from SSLSocketSample.java may help here.
17-10-2016