okhttpSSL证书验证失败问题

lyyzms 2015-10-15 09:22:27
javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x78c63288: 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 0x7361fd74:0x00000000)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:449)
at com.squareup.okhttp.Connection.connectTls(Connection.java:235)
at com.squareup.okhttp.Connection.connectSocket(Connection.java:199)
at com.squareup.okhttp.Connection.connect(Connection.java:172)
at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:367)
at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:328)
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:245)
at com.squareup.okhttp.Call.getResponse(Call.java:267)
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:224)
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:195)
at com.squareup.okhttp.Call.execute(Call.java:79)
at com.forms.common.communication.FormsHttpsCommMachine.write(FormsHttpsCommMachine.java:139)
at com.forms.common.network.MyNetwork$BaseThread.doInBackground(MyNetwork.java:165)
at com.forms.common.network.MyNetwork$BaseThread.doInBackground(MyNetwork.java:1)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Suppressed: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x76caade8: Failure in SSL library, usually a protocol error 14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:744 0x7361fd74:0x00000000)
这个是握手的时候报的错误,请问有人遇到过吗?
...全文
7531 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
aolphn 2018-03-08
  • 打赏
  • 举报
回复
4.x 的Android上用okhttp有这个问题,然而我并没有解决,我还在找怎么解决,阿西吧,知道的大佬告知一下我:企鹅:981952745
小小乐宝 2017-03-15
  • 打赏
  • 举报
回复
我用httpclient 出现这个问题了用 okhttp 没有这个问题
帥酥 2016-12-29
  • 打赏
  • 举报
回复
可以参考这个Android HTTPS、TLS版本支持相关解决方案http://blog.csdn.net/s003603u/article/details/53907910
marktimes 2016-11-15
  • 打赏
  • 举报
回复
安卓5.0以下不支持 tls1.1以上,应该是服务测要求tls版本太高所致
burly 2016-10-28
  • 打赏
  • 举报
回复
这个应该是证书问题
  • 打赏
  • 举报
回复
哥 解决了么 怎么没有回复了
jadechen19910909 2016-03-08
  • 打赏
  • 举报
回复
解决了吗?我也遇到了
苏-苏 2015-10-19
  • 打赏
  • 举报
回复
不是回答了吗,1、确认服务端是否能ping 通,如果ping不通,请检查证书,id,appid等;如果ping的通,请参考如下网址 http://download.csdn.net/detail/a1070060198/6871077
lyyzms 2015-10-16
  • 打赏
  • 举报
回复
引用 2 楼 u012814480 的回复:
http和https的协议不一样,首先你确认服务端是否能ping 通,其次是要修改网络访问代码
有没有可能是因为证书本身有问题呢?Android对于证书有什么特殊要求吗?
苏-苏 2015-10-16
  • 打赏
  • 举报
回复
http和https的协议不一样,首先你确认服务端是否能ping 通,其次是要修改网络访问代码
lyyzms 2015-10-15
  • 打赏
  • 举报
回复
求解决啊,有人遇到过吗?

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧