https - TLSv1.2 protocol on android 4.* < -


i'm using okhttp v 2.4.0 retrofit v1.9.0 make https request server uses protocol tlsv1.2 only, , i'm getting error:

javax.net.ssl.sslhandshakeexception: javax.net.ssl.sslprotocolexception: ssl handshake aborted: ssl=0xb8e6cf68: failure in ssl library, protocol error error:14077410:ssl routines:ssl23_get_server_hello:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x971fb990:0x00000000)   @ com.android.org.conscrypt.opensslsocketimpl.starthandshake(opensslsocketimpl.java:448)   @ com.squareup.okhttp.internal.http.socketconnector.connecttls(socketconnector.java:103)   @ com.squareup.okhttp.connection.connect(connection.java:143)   @ com.squareup.okhttp.connection.connectandsetowner(connection.java:185)   @ com.squareup.okhttp.okhttpclient$1.connectandsetowner(okhttpclient.java:128)   @ com.squareup.okhttp.internal.http.httpengine.nextconnection(httpengine.java:341)   @ com.squareup.okhttp.internal.http.httpengine.connect(httpengine.java:330)   @ com.squareup.okhttp.internal.http.httpengine.sendrequest(httpengine.java:248)   @ com.squareup.okhttp.call.getresponse(call.java:273)   @ com.squareup.okhttp.call$applicationinterceptorchain.proceed(call.java:230)   @ com.squareup.okhttp.call.getresponsewithinterceptorchain(call.java:201)   @ com.squareup.okhttp.call.execute(call.java:81)   @ retrofit.client.okclient.execute(okclient.java:53)   @ retrofit.restadapter$resthandler.invokerequest(restadapter.java:326)   @ retrofit.restadapter$resthandler.access$100(restadapter.java:220)   @ retrofit.restadapter$resthandler$2.obtainresponse(restadapter.java:278)   @ retrofit.callbackrunnable.run(callbackrunnable.java:42)   @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1112)   @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:587)   @ retrofit.platform$android$2$1.run(platform.java:142)   @ java.lang.thread.run(thread.java:841) caused by: javax.net.ssl.sslprotocolexception: ssl handshake aborted: ssl=0xb8e6cf68: failure in ssl library, protocol error error:14077410:ssl routines:ssl23_get_server_hello:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x971fb990:0x00000000)   @ com.android.org.conscrypt.nativecrypto.ssl_do_handshake(native method)   @ com.android.org.conscrypt.opensslsocketimpl.starthandshake(opensslsocketimpl.java:405) 

i tried lot of things here, nothing works, try set protocol socketfactory showed here: https://blog.dev-area.net/2015/08/13/android-4-1-enable-tls-1-1-and-tls-1-2/

it worked when server supported tlsv1, tlsv1.1, tlsv1.2, sslv3, when removed , let tlsv1.2 stop working, try use class nosslv3factory sad in many answer here in stackoverflow, no success either, nosslv3 approach used one: how disable sslv3 in android httpsurlconnection?

the thing can't undestand why keep getting sslv3 error if server doesn't use protocol anymore , i'm removing okhttp client, , why doesn't work on android 4.4.2 if site: https://www.ssllabs.com/ssltest says same 4.4.2+ shown on image

enter image description here

if have idea, use on that


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -