Error:
javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x6b98b608: 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 0x6849cd18:0x00000000)at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:448).
Java Code:(Using OkHttpClient v2.4.0,Retrofit 1.9.0)
RestAdapter.Builder builder = new RestAdapter.Builder(); OkHttpClient client = new OkHttpClient(); builder.setClient(new OkClient(client)); builder.setEndpoint(baseUrl).setLogLevel(RestAdapter.LogLevel.FULL); RestAdapter adapter = builder.build(); ApiClient apiClient= adapter.create(serviceClass); apiClient.getMerchantPlanInfo(merchantId, getHeaderAuth(mContext));
I have also tried this with OkHttpClient object:
1)
SSLContext sslContext = SSLContext.getInstance(TlsVersion.TLS_1_2.javaName()); sslContext.init(null, null, null); setSslSocketFactory(sslContext.getSocketFactory()); // set with client object2) Using steps given at
https://clover.cloud.answerhub.com/questions/3191/...
https://github.com/square/okhttp/issues/2372 and https://stackoverflow.com/questions/29916962/javax...
Still not working, getting same error.
When I debug to check enabled protocol before execute request I got there are only two protocol (TLSv1 and SSLv3).
So how to fix this? Or this is issue in clover Mini device?