javax.net.ssl.SSLHandshakeException: Handshake failed on Android 5.0.0 when SSLv2 and SSlv3 are disabled (TLS only) (and greater)

后端 未结 4 675
太阳男子
太阳男子 2020-12-24 15:55

This is my first post and I\'m going to try to do my best to be as clear as possible (sorry for my english).

Here is my trouble, I\'m using retrofit:1.9.0 and okhttp

4条回答
  •  执念已碎
    2020-12-24 16:27

    If you are using OkHttpClient use

    OkHttpClient.Builder client = new OkHttpClient.Builder();
    client.connectionSpecs(Arrays.asList(ConnectionSpec.COMPATIBLE_TLS));
    

    And the do client.build() when setting your client.

提交回复
热议问题