javax.net.ssl.SSLHandshakeException: Leaf certificate could not be verified with provided public key

Appcelerator JIRA | Aminul Islam | 1 year 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

    Hi, when we run our app with "Appcelerator HTTPS Module" in Android (Android 5.0.2) throwing errors. Error Log : {code} [ERROR] : TiHTTPClient: (TiHttpClient-2) [11862,19699] HTTP Error (javax.net.ssl.SSLHandshakeException): Leaf certificate could not be verified with provided public key [ERROR] : TiHTTPClient: javax.net.ssl.SSLHandshakeException: Leaf certificate could not be verified with provided public key [ERROR] : TiHTTPClient: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:322) [ERROR] : TiHTTPClient: at com.android.okhttp.Connection.upgradeToTls(Connection.java:1257) [ERROR] : TiHTTPClient: at com.android.okhttp.Connection.connect(Connection.java:1188) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:395) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:298) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:399) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:349) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getHeaderField(HttpURLConnectionImpl.java:165) [ERROR] : TiHTTPClient: at java.net.URLConnection.getHeaderFieldInt(URLConnection.java:543) [ERROR] : TiHTTPClient: at java.net.URLConnection.getContentLength(URLConnection.java:315) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getContentLength(DelegatingHttpsURLConnection.java:146) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:25) [ERROR] : TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient.handleResponse(TiHTTPClient.java:159) [ERROR] : TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient.access$1200(TiHTTPClient.java:85) [ERROR] : TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1207) [ERROR] : TiHTTPClient: at java.lang.Thread.run(Thread.java:818) [ERROR] : TiHTTPClient: at appcelerator.https.PinningTrustManager.checkServerTrusted(PinningTrustManager.java:84) [ERROR] : TiHTTPClient: at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:116) [ERROR] : TiHTTPClient: at com.android.org.conscrypt.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:550) [ERROR] : TiHTTPClient: at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) [ERROR] : TiHTTPClient: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:318) {code}

    Appcelerator JIRA | 1 year ago | Aminul Islam
    javax.net.ssl.SSLHandshakeException: Leaf certificate could not be verified with provided public key
  2. 0

    Hi, when we run our app with "Appcelerator HTTPS Module" in Android (Android 5.0.2) throwing errors. Error Log : {code} [ERROR] : TiHTTPClient: (TiHttpClient-2) [11862,19699] HTTP Error (javax.net.ssl.SSLHandshakeException): Leaf certificate could not be verified with provided public key [ERROR] : TiHTTPClient: javax.net.ssl.SSLHandshakeException: Leaf certificate could not be verified with provided public key [ERROR] : TiHTTPClient: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:322) [ERROR] : TiHTTPClient: at com.android.okhttp.Connection.upgradeToTls(Connection.java:1257) [ERROR] : TiHTTPClient: at com.android.okhttp.Connection.connect(Connection.java:1188) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:395) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:298) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:399) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:349) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getHeaderField(HttpURLConnectionImpl.java:165) [ERROR] : TiHTTPClient: at java.net.URLConnection.getHeaderFieldInt(URLConnection.java:543) [ERROR] : TiHTTPClient: at java.net.URLConnection.getContentLength(URLConnection.java:315) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getContentLength(DelegatingHttpsURLConnection.java:146) [ERROR] : TiHTTPClient: at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:25) [ERROR] : TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient.handleResponse(TiHTTPClient.java:159) [ERROR] : TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient.access$1200(TiHTTPClient.java:85) [ERROR] : TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1207) [ERROR] : TiHTTPClient: at java.lang.Thread.run(Thread.java:818) [ERROR] : TiHTTPClient: at appcelerator.https.PinningTrustManager.checkServerTrusted(PinningTrustManager.java:84) [ERROR] : TiHTTPClient: at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:116) [ERROR] : TiHTTPClient: at com.android.org.conscrypt.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:550) [ERROR] : TiHTTPClient: at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) [ERROR] : TiHTTPClient: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:318) {code}

    Appcelerator JIRA | 1 year ago | Aminul Islam
    javax.net.ssl.SSLHandshakeException: Leaf certificate could not be verified with provided public key
  3. 0

    Ssl error while uploading huge file on Android using Titanium Appcelerator

    Stack Overflow | 1 year ago | Rodion Mamin
    javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x7b93c2a0: Failure in SSL library, usually a protocol error error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:744 0x743667e8:0x00000000)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Issue https://jira.appcelerator.org/browse/TIMOB-20061 is not fixed. Parameter *tlsVersion* (TLS_VERSION_1_2) is ignored on android < 5.0 *Sending a request ends with error:* TiHTTPClient: (TiHttpClient-10) [3509,3509] HTTP Error (javax.net.ssl.SSLHandshakeException): javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb7e3d2b8: Failure in SSL library, usually a protocol error [ERROR] TiHTTPClient: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x96f79926:0x00000000) [ERROR] TiHTTPClient: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb7e3d2b8: Failure in SSL library, usually a protocol error [ERROR] TiHTTPClient: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x96f79926:0x00000000) [ERROR] TiHTTPClient: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:448) [ERROR] TiHTTPClient: at com.android.okhttp.Connection.upgradeToTls(Connection.java:146) [ERROR] TiHTTPClient: at com.android.okhttp.Connection.connect(Connection.java:107) [ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:294) [ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255) [ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206) [ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345) [ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296) [ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getHeaderField(HttpURLConnectionImpl.java:143) [ERROR] TiHTTPClient: at java.net.URLConnection.getHeaderFieldInt(URLConnection.java:544) [ERROR] TiHTTPClient: at java.net.URLConnection.getContentLength(URLConnection.java:316) [ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:182) [ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient.handleResponse(TiHTTPClient.java:159) [ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient.access$1200(TiHTTPClient.java:85) [ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1207) [ERROR] TiHTTPClient: at java.lang.Thread.run(Thread.java:841) [ERROR] TiHTTPClient: Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb7e3d2b8: Failure in SSL library, usually a protocol error [ERROR] TiHTTPClient: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x96f79926:0x00000000) [ERROR] TiHTTPClient: at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) [ERROR] TiHTTPClient: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:405) [ERROR] TiHTTPClient: ... 15 more

    Appcelerator JIRA | 9 months ago | Michael Bahl
    javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb7e3d2b8: Failure in SSL library, usually a protocol error error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x96f79926:0x00000000)
  6. 0

    Issue https://jira.appcelerator.org/browse/TIMOB-20061 is not fixed. Parameter *tlsVersion* (TLS_VERSION_1_2) is ignored on android < 5.0 *Sending a request ends with error:* TiHTTPClient: (TiHttpClient-10) [3509,3509] HTTP Error (javax.net.ssl.SSLHandshakeException): javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb7e3d2b8: Failure in SSL library, usually a protocol error [ERROR] TiHTTPClient: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x96f79926:0x00000000) [ERROR] TiHTTPClient: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb7e3d2b8: Failure in SSL library, usually a protocol error [ERROR] TiHTTPClient: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x96f79926:0x00000000) [ERROR] TiHTTPClient: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:448) [ERROR] TiHTTPClient: at com.android.okhttp.Connection.upgradeToTls(Connection.java:146) [ERROR] TiHTTPClient: at com.android.okhttp.Connection.connect(Connection.java:107) [ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:294) [ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.sendSocketRequest(HttpEngine.java:255) [ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:206) [ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:345) [ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:296) [ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getHeaderField(HttpURLConnectionImpl.java:143) [ERROR] TiHTTPClient: at java.net.URLConnection.getHeaderFieldInt(URLConnection.java:544) [ERROR] TiHTTPClient: at java.net.URLConnection.getContentLength(URLConnection.java:316) [ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:182) [ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient.handleResponse(TiHTTPClient.java:159) [ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient.access$1200(TiHTTPClient.java:85) [ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1207) [ERROR] TiHTTPClient: at java.lang.Thread.run(Thread.java:841) [ERROR] TiHTTPClient: Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb7e3d2b8: Failure in SSL library, usually a protocol error [ERROR] TiHTTPClient: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x96f79926:0x00000000) [ERROR] TiHTTPClient: at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) [ERROR] TiHTTPClient: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:405) [ERROR] TiHTTPClient: ... 15 more

    Appcelerator JIRA | 9 months ago | Michael Bahl
    javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb7e3d2b8: Failure in SSL library, usually a protocol error TiHTTPClient: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x96f79926:0x00000000)

  1. filpgame 2 times, last 2 months ago
  2. poroszd 1 times, last 3 months ago
  3. gamebusterz 25 times, last 2 months ago
  4. Reich 1 times, last 3 months ago
  5. Indri Yunita 8 times, last 4 months ago
36 more registered users
17 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. javax.net.ssl.SSLHandshakeException

    Leaf certificate could not be verified with provided public key

    at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake()
  2. RoboVM
    OpenSSLSocketImpl.startHandshake
    1. com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:322)
    1 frame
  3. Android
    HttpURLConnectionImpl.getHeaderField
    1. com.android.okhttp.Connection.upgradeToTls(Connection.java:1257)
    2. com.android.okhttp.Connection.connect(Connection.java:1188)
    3. com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:395)
    4. com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:298)
    5. com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:399)
    6. com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:349)
    7. com.android.okhttp.internal.http.HttpURLConnectionImpl.getHeaderField(HttpURLConnectionImpl.java:165)
    7 frames
  4. Java RT
    URLConnection.getContentLength
    1. java.net.URLConnection.getHeaderFieldInt(URLConnection.java:543)
    2. java.net.URLConnection.getContentLength(URLConnection.java:315)
    2 frames
  5. Android
    HttpsURLConnectionImpl.getContentLength
    1. com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getContentLength(DelegatingHttpsURLConnection.java:146)
    2. com.android.okhttp.internal.http.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java:25)
    2 frames
  6. ti.modules.titanium
    TiHTTPClient$ClientRunnable.run
    1. ti.modules.titanium.network.TiHTTPClient.handleResponse(TiHTTPClient.java:159)
    2. ti.modules.titanium.network.TiHTTPClient.access$1200(TiHTTPClient.java:85)
    3. ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1207)
    3 frames
  7. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:818)
    1 frame
  8. appcelerator.https
    PinningTrustManager.checkServerTrusted
    1. appcelerator.https.PinningTrustManager.checkServerTrusted(PinningTrustManager.java:84)
    1 frame
  9. RoboVM
    OpenSSLSocketImpl.startHandshake
    1. com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:116)
    2. com.android.org.conscrypt.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:550)
    3. com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
    4. com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:318)
    4 frames