JDK TLS compatibility issue with Google & Youtube server TLS implementation.
Problematic Protocol: TLSv1.3
Host: www.google.com, www.youtube.com
Cipher Suites - TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384
Regression Details : Test case works fine with JDK8u TLS1.3 EA build JDK8u261 b90, but doesn't work with JDK8u261 b91. So it's regression from b91 onwards. This issue is not reproducible in JDK11.0.8(personal build) and JDK15(build 15)
Attached the test case TestHttpsClient.java and failed(JDK8u261 b91) & passed(JDK8u261 b90) debug logs.
From log we can see, it fails with "Received fatal alert: protocol_version" just after ClientHello.
Stack trace(attached the full logs):
javax.net.ssl|SEVERE|01|main|2020-03-20 18:31:52.106 IST|TransportContext.java:319|Fatal (PROTOCOL_VERSION): Received fatal alert: protocol_version (
"throwable" : {
javax.net.ssl.SSLHandshakeException: Received fatal alert: protocol_version
at sun.security.ssl.Alert.createSSLException(Alert.java:131)
at sun.security.ssl.Alert.createSSLException(Alert.java:117)
at sun.security.ssl.TransportContext.fatal(TransportContext.java:314)
at sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:293)
at sun.security.ssl.TransportContext.dispatch(TransportContext.java:187)
at sun.security.ssl.SSLTransport.decode(SSLTransport.java:150)
at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1177)
at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1088)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:396)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:352)
at TestHttpsClient.testIt(TestHttpsClient.java:43)
at TestHttpsClient.main(TestHttpsClient.java:17)}