java.lang.Error: Error during hash calculation at sun.security.ssl.HandshakeHash.getFinishedHash(java.base@9-ea/HandshakeHash.java:358) at sun.security.ssl.HandshakeMessage$Finished.getFinished(java.base@9-ea/HandshakeMessage.java:2331) at sun.security.ssl.HandshakeMessage$Finished.<init>(java.base@9-ea/HandshakeMessage.java:2278) at sun.security.ssl.ClientHandshaker.sendChangeCipherAndFinish(java.base@9-ea/ClientHandshaker.java:1328) at sun.security.ssl.ClientHandshaker.serverHelloDone(java.base@9-ea/ClientHandshaker.java:1240) at sun.security.ssl.ClientHandshaker.processMessage(java.base@9-ea/ClientHandshaker.java:414) at sun.security.ssl.Handshaker.processLoop(java.base@9-ea/Handshaker.java:1061) at sun.security.ssl.Handshaker.processRecord(java.base@9-ea/Handshaker.java:995) at sun.security.ssl.SSLSocketImpl.processInputRecord(java.base@9-ea/SSLSocketImpl.java:1132) 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:968) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(java.base@9-ea/SSLSocketImpl.java:1395) at sun.security.ssl.SSLSocketImpl.startHandshake(java.base@9-ea/SSLSocketImpl.java:1422) at sun.security.ssl.SSLSocketImpl.startHandshake(java.base@9-ea/SSLSocketImpl.java:1406) at sun.net.www.protocol.https.HttpsClient.afterConnect(java.base@9-ea/HttpsClient.java:558) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(java.base@9-ea/AbstractDelegateHttpsURLConnection.java:185) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(java.base@9-ea/HttpURLConnection.java:1505) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(java.base@9-ea/HttpURLConnection.java:1433) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(java.base@9-ea/HttpsURLConnectionImpl.java:235)

JDK Bug System | Roger Calnan | 9 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    The attached application works with JDK 8, with JDK 9 latest build the following exception is seen: Exception in thread "main" java.lang.Error: Error during hash calculation at sun.security.ssl.HandshakeHash.getFinishedHash(java.base@9-ea/HandshakeHash.java:358) at sun.security.ssl.HandshakeMessage$Finished.getFinished(java.base@9-ea/HandshakeMessage.java:2331) at sun.security.ssl.HandshakeMessage$Finished.<init>(java.base@9-ea/HandshakeMessage.java:2278) at sun.security.ssl.ClientHandshaker.sendChangeCipherAndFinish(java.base@9-ea/ClientHandshaker.java:1328) at sun.security.ssl.ClientHandshaker.serverHelloDone(java.base@9-ea/ClientHandshaker.java:1240) at sun.security.ssl.ClientHandshaker.processMessage(java.base@9-ea/ClientHandshaker.java:414) at sun.security.ssl.Handshaker.processLoop(java.base@9-ea/Handshaker.java:1061) at sun.security.ssl.Handshaker.processRecord(java.base@9-ea/Handshaker.java:995) at sun.security.ssl.SSLSocketImpl.processInputRecord(java.base@9-ea/SSLSocketImpl.java:1132) 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:968) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(java.base@9-ea/SSLSocketImpl.java:1395) at sun.security.ssl.SSLSocketImpl.startHandshake(java.base@9-ea/SSLSocketImpl.java:1422) at sun.security.ssl.SSLSocketImpl.startHandshake(java.base@9-ea/SSLSocketImpl.java:1406) at sun.net.www.protocol.https.HttpsClient.afterConnect(java.base@9-ea/HttpsClient.java:558) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(java.base@9-ea/AbstractDelegateHttpsURLConnection.java:185) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(java.base@9-ea/HttpURLConnection.java:1505) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(java.base@9-ea/HttpURLConnection.java:1433) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(java.base@9-ea/HttpsURLConnectionImpl.java:235) at jdk9httpconnection.JDK9httpConnection.main(JDK9httpConnection.java:36) Caused by: java.lang.RuntimeException: Could not clone digest at sun.security.ssl.HandshakeHash.cloneDigest(java.base@9-ea/HandshakeHash.java:303) at sun.security.ssl.HandshakeHash.getFinishedHash(java.base@9-ea/HandshakeHash.java:356) ... 19 more Caused by: java.lang.CloneNotSupportedException: SHA-256 at sun.security.pkcs11.P11Digest.clone(jdk.crypto.pkcs11@9-ea/P11Digest.java:316) at java.security.MessageDigest$Delegate.clone(java.base@9-ea/MessageDigest.java:573) at sun.security.ssl.HandshakeHash.cloneDigest(java.base@9-ea/HandshakeHash.java:300) ... 20 more Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_STATE_UNSAVEABLE at sun.security.pkcs11.wrapper.PKCS11.C_GetOperationState(jdk.crypto.pkcs11@9-ea/Native Method) at sun.security.pkcs11.P11Digest.clone(jdk.crypto.pkcs11@9-ea/P11Digest.java:311) ... 22 more

    JDK Bug System | 9 months ago | Roger Calnan
    java.lang.Error: Error during hash calculation at sun.security.ssl.HandshakeHash.getFinishedHash(java.base@9-ea/HandshakeHash.java:358) at sun.security.ssl.HandshakeMessage$Finished.getFinished(java.base@9-ea/HandshakeMessage.java:2331) at sun.security.ssl.HandshakeMessage$Finished.<init>(java.base@9-ea/HandshakeMessage.java:2278) at sun.security.ssl.ClientHandshaker.sendChangeCipherAndFinish(java.base@9-ea/ClientHandshaker.java:1328) at sun.security.ssl.ClientHandshaker.serverHelloDone(java.base@9-ea/ClientHandshaker.java:1240) at sun.security.ssl.ClientHandshaker.processMessage(java.base@9-ea/ClientHandshaker.java:414) at sun.security.ssl.Handshaker.processLoop(java.base@9-ea/Handshaker.java:1061) at sun.security.ssl.Handshaker.processRecord(java.base@9-ea/Handshaker.java:995) at sun.security.ssl.SSLSocketImpl.processInputRecord(java.base@9-ea/SSLSocketImpl.java:1132) 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:968) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(java.base@9-ea/SSLSocketImpl.java:1395) at sun.security.ssl.SSLSocketImpl.startHandshake(java.base@9-ea/SSLSocketImpl.java:1422) at sun.security.ssl.SSLSocketImpl.startHandshake(java.base@9-ea/SSLSocketImpl.java:1406) at sun.net.www.protocol.https.HttpsClient.afterConnect(java.base@9-ea/HttpsClient.java:558) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(java.base@9-ea/AbstractDelegateHttpsURLConnection.java:185) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(java.base@9-ea/HttpURLConnection.java:1505) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(java.base@9-ea/HttpURLConnection.java:1433) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(java.base@9-ea/HttpsURLConnectionImpl.java:235)

    Root Cause Analysis

    1. java.lang.Error

      Error during hash calculation at sun.security.ssl.HandshakeHash.getFinishedHash(java.base@9-ea/HandshakeHash.java:358) at sun.security.ssl.HandshakeMessage$Finished.getFinished(java.base@9-ea/HandshakeMessage.java:2331) at sun.security.ssl.HandshakeMessage$Finished.<init>(java.base@9-ea/HandshakeMessage.java:2278) at sun.security.ssl.ClientHandshaker.sendChangeCipherAndFinish(java.base@9-ea/ClientHandshaker.java:1328) at sun.security.ssl.ClientHandshaker.serverHelloDone(java.base@9-ea/ClientHandshaker.java:1240) at sun.security.ssl.ClientHandshaker.processMessage(java.base@9-ea/ClientHandshaker.java:414) at sun.security.ssl.Handshaker.processLoop(java.base@9-ea/Handshaker.java:1061) at sun.security.ssl.Handshaker.processRecord(java.base@9-ea/Handshaker.java:995) at sun.security.ssl.SSLSocketImpl.processInputRecord(java.base@9-ea/SSLSocketImpl.java:1132) 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:968) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(java.base@9-ea/SSLSocketImpl.java:1395) at sun.security.ssl.SSLSocketImpl.startHandshake(java.base@9-ea/SSLSocketImpl.java:1422) at sun.security.ssl.SSLSocketImpl.startHandshake(java.base@9-ea/SSLSocketImpl.java:1406) at sun.net.www.protocol.https.HttpsClient.afterConnect(java.base@9-ea/HttpsClient.java:558) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(java.base@9-ea/AbstractDelegateHttpsURLConnection.java:185) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(java.base@9-ea/HttpURLConnection.java:1505) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(java.base@9-ea/HttpURLConnection.java:1433) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(java.base@9-ea/HttpsURLConnectionImpl.java:235)

      at jdk9httpconnection.JDK9httpConnection.main()
    2. jdk9httpconnection
      JDK9httpConnection.main
      1. jdk9httpconnection.JDK9httpConnection.main(JDK9httpConnection.java:36)
      1 frame