1 Reply Latest reply on Jun 1, 2017 1:50 PM by 928518

    While my java application is try to connect with thrid party application ussing https SSL connection it throwing SSL handshake excpetion

    anihazra

      javax.net.ssl.SSLHandshakeException: Could not generate secret

              at sun.security.ssl.DHCrypt.getAgreedSecret(DHCrypt.java:219)

              at sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:1015)

              at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:345)

              at sun.security.ssl.Handshaker.processLoop(Handshaker.java:961)

              at sun.security.ssl.Handshaker.process_record(Handshaker.java:897)

              at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1033)

              at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1342)

              at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1369)

              at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1353)

              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.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)

              at com.etsalat.adapter.sadad.PaymentLoadAdapter.run(PaymentLoadAdapter.java:117)

              at java.lang.Thread.run(Thread.java:745)

      Caused by: java.security.NoSuchAlgorithmException: TlsPremasterSecret SecretKeyFactory not available

              at javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:122)

              at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:160)

              at iaik.security.dh.DHKeyAgreement.engineGenerateSecret(Unknown Source)

              at javax.crypto.KeyAgreement.generateSecret(KeyAgreement.java:648)

              at sun.security.ssl.DHCrypt.getAgreedSecret(DHCrypt.java:217)