javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0x60d46c90: Failure in SSL library, usually a protocol error error:1409443E:SSL routines:SSL3_READ_BYTES:tlsv1 alert inappropriate fallback (external/openssl/ssl/s3_pkt.c:1256 0x60d57f40:0x00000003) the code that makes this request: private <T> void send(final String url, final Map<String, String> args, final RequestCallback<T> callback, final Parser<T> pParser, final Context pContext, final HTTP_METHOD method, final Map<String, String> headers, final BODY_TYPE bodyType) { final Request.Builder builder = getBuilder(url); populateHeaders(builder, headers); final RequestBody body = getBody(args, bodyType); if(method==HTTP_METHOD.POST) { builder.post(body); } else if(method==HTTP_METHOD.GET) { builder.get(); } else if(method==HTTP_METHOD.PUT) { builder.put(body); } else if(method==HTTP_METHOD.PATCH) { builder.patch(body); } else { throw new RuntimeException("Please specify correct method name!"); } Request request = builder.build(); debugRequest(request, whoCalledThisMethod()); call = client.newCall(request); call.enqueue(new StandardRequestCallback(pContext, callback, pParser)); } I've found that if my app gets this exception, force-closing it, followed by re-launching it, can successfully complete the request... however, a short while later, it fails again with this SSL Exception. What could be wrong ? UPDATE I made a very small test app that uses code from the okHttp recipes page https://github.com/square/okhttp/wiki/Recipes and I've repro'd the SSL Handshake Exception !! 06-27 13:59:08.068 30006-32692/a.b.ssltestapp W/System.err: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0x60068d10: Failure in SSL library, usually a protocol error 06-27 13:59:08.068 30006-32692/a.b.ssltestapp W/System.err: error:1409443E:SSL routines:SSL3_READ_BYTES:tlsv1 alert inappropriate fallback (external/openssl/ssl/s3_pkt.c:1256 0x6006e6b0:0x00000003) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:568) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at okhttp3.internal.io.RealConnection.connectTls(RealConnection.java:188) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at okhttp3.internal.io.RealConnection.connectSocket(RealConnection.java:145) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at okhttp3.internal.io.RealConnection.connect(RealConnection.java:108) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at okhttp3.internal.http.StreamAllocation.findConnection(StreamAllocation.java:188)

  1. 0

    OKhttp : SSLProtocolException: SSL handshake terminated

    Stack Overflow | 6 months ago | Someone Somewhere
    javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0x60d46c90: Failure in SSL library, usually a protocol error error:1409443E:SSL routines:SSL3_READ_BYTES:tlsv1 alert inappropriate fallback (external/openssl/ssl/s3_pkt.c:1256 0x60d57f40:0x00000003) the code that makes this request: private <T> void send(final String url, final Map<String, String> args, final RequestCallback<T> callback, final Parser<T> pParser, final Context pContext, final HTTP_METHOD method, final Map<String, String> headers, final BODY_TYPE bodyType) { final Request.Builder builder = getBuilder(url); populateHeaders(builder, headers); final RequestBody body = getBody(args, bodyType); if(method==HTTP_METHOD.POST) { builder.post(body); } else if(method==HTTP_METHOD.GET) { builder.get(); } else if(method==HTTP_METHOD.PUT) { builder.put(body); } else if(method==HTTP_METHOD.PATCH) { builder.patch(body); } else { throw new RuntimeException("Please specify correct method name!"); } Request request = builder.build(); debugRequest(request, whoCalledThisMethod()); call = client.newCall(request); call.enqueue(new StandardRequestCallback(pContext, callback, pParser)); } I've found that if my app gets this exception, force-closing it, followed by re-launching it, can successfully complete the request... however, a short while later, it fails again with this SSL Exception. What could be wrong ? UPDATE I made a very small test app that uses code from the okHttp recipes page https://github.com/square/okhttp/wiki/Recipes and I've repro'd the SSL Handshake Exception !! 06-27 13:59:08.068 30006-32692/a.b.ssltestapp W/System.err: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0x60068d10: Failure in SSL library, usually a protocol error 06-27 13:59:08.068 30006-32692/a.b.ssltestapp W/System.err: error:1409443E:SSL routines:SSL3_READ_BYTES:tlsv1 alert inappropriate fallback (external/openssl/ssl/s3_pkt.c:1256 0x6006e6b0:0x00000003) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:568) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at okhttp3.internal.io.RealConnection.connectTls(RealConnection.java:188) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at okhttp3.internal.io.RealConnection.connectSocket(RealConnection.java:145) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at okhttp3.internal.io.RealConnection.connect(RealConnection.java:108) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at okhttp3.internal.http.StreamAllocation.findConnection(StreamAllocation.java:188)
  2. 0

    Upload/SSL: inapproriate fallback

    GitHub | 7 months ago | daniele-athome
    javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0x6255ec08: Failure in SSL library, usually a protocol error error:1409443E:SSL routines:SSL3_READ_BYTES:tlsv1 alert inappropriate fallback (external/openssl/ssl/s3_pkt.c:1256 0x61745f08:0x00000003)
  3. 0

    SSL handshake terminated

    aqua-mail.com | 1 year ago
    javax.net.ssl.SSLHandshakeException: Handshake failed
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    SSL handshake terminated

    aqua-mail.com | 1 year ago
    javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0xb9684b58: Failure in SSL library, usually a protocol error error:1409443E:SSL routines:SSL3_READ_BYTES:tlsv1 alert inappropriate fallback (external/openssl/ssl/s3_pkt.c:1303 0xb93acfe8:0x00000003)
  6. 0

    How can I tell the worklight hybrid client to used a specific certificate that was downloaded to the device?

    Stack Overflow | 2 years ago | David Jenkins
    javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0x784e3468: Failure in SSL library, usually a protocol error error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure (external/openssl/ssl/s3_pkt.c:1256 0x7849ae90:0x00000003)

    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.SSLProtocolException

      SSL handshake terminated: ssl=0x60d46c90: Failure in SSL library, usually a protocol error error:1409443E:SSL routines:SSL3_READ_BYTES:tlsv1 alert inappropriate fallback (external/openssl/ssl/s3_pkt.c:1256 0x60d57f40:0x00000003) the code that makes this request: private <T> void send(final String url, final Map<String, String> args, final RequestCallback<T> callback, final Parser<T> pParser, final Context pContext, final HTTP_METHOD method, final Map<String, String> headers, final BODY_TYPE bodyType) { final Request.Builder builder = getBuilder(url); populateHeaders(builder, headers); final RequestBody body = getBody(args, bodyType); if(method==HTTP_METHOD.POST) { builder.post(body); } else if(method==HTTP_METHOD.GET) { builder.get(); } else if(method==HTTP_METHOD.PUT) { builder.put(body); } else if(method==HTTP_METHOD.PATCH) { builder.patch(body); } else { throw new RuntimeException("Please specify correct method name!"); } Request request = builder.build(); debugRequest(request, whoCalledThisMethod()); call = client.newCall(request); call.enqueue(new StandardRequestCallback(pContext, callback, pParser)); } I've found that if my app gets this exception, force-closing it, followed by re-launching it, can successfully complete the request... however, a short while later, it fails again with this SSL Exception. What could be wrong ? UPDATE I made a very small test app that uses code from the okHttp recipes page https://github.com/square/okhttp/wiki/Recipes and I've repro'd the SSL Handshake Exception !! 06-27 13:59:08.068 30006-32692/a.b.ssltestapp W/System.err: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0x60068d10: Failure in SSL library, usually a protocol error 06-27 13:59:08.068 30006-32692/a.b.ssltestapp W/System.err: error:1409443E:SSL routines:SSL3_READ_BYTES:tlsv1 alert inappropriate fallback (external/openssl/ssl/s3_pkt.c:1256 0x6006e6b0:0x00000003) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:568) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at okhttp3.internal.io.RealConnection.connectTls(RealConnection.java:188) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at okhttp3.internal.io.RealConnection.connectSocket(RealConnection.java:145) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at okhttp3.internal.io.RealConnection.connect(RealConnection.java:108) 06-27 13:59:08.078 30006-32692/a.b.ssltestapp W/System.err: at okhttp3.internal.http.StreamAllocation.findConnection(StreamAllocation.java:188)

      at okhttp3.internal.http.StreamAllocation.findHealthyConnection()
    2. okhttp3.internal.http
      HttpEngine.sendRequest
      1. okhttp3.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:127)
      2. okhttp3.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)
      3. okhttp3.internal.http.HttpEngine.connect(HttpEngine.java:289)
      4. okhttp3.internal.http.HttpEngine.sendRequest(HttpEngine.java:241)
      4 frames
    3. okhttp3
      RealCall.getResponseWithInterceptorChain
      1. okhttp3.RealCall.getResponse(RealCall.java:240)
      2. okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:198)
      3. okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:160)
      3 frames