5

我的 Android 应用程序连接到我服务器上的 Web 服务。昨天一切正常,但今天我得到了错误。

我没有对 Web 服务和应用程序进行任何更改。我怀疑我的服务器有问题,但不知道从哪里开始。

我在 Android 5 和 Android 6 设备上都对其进行了测试。

这是错误:

HTTPClient: (TiHttpClient-3) [1136,1136] HTTP Error (javax.net.ssl.SSLHandshakeException): Handshake failed
[ERROR] :  TiHTTPClient: javax.net.ssl.SSLHandshakeException: Handshake failed
[ERROR] :  TiHTTPClient:    at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:396)
[ERROR] :  TiHTTPClient:    at com.android.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:103)
[ERROR] :  TiHTTPClient:    at com.android.okhttp.Connection.connect(Connection.java:143)
[ERROR] :  TiHTTPClient:    at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:185)
[ERROR] :  TiHTTPClient:    at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
[ERROR] :  TiHTTPClient:    at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
[ERROR] :  TiHTTPClient:    at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
[ERROR] :  TiHTTPClient:    at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
[ERROR] :  TiHTTPClient:    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:437)
[ERROR] :  TiHTTPClient:    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:388)
[ERROR] :  TiHTTPClient:    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getHeaders(HttpURLConnectionImpl.java:150)
[ERROR] :  TiHTTPClient:    at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getHeaderField(HttpURLConnectionImpl.java:194)
[ERROR] :  TiHTTPClient:    at java.net.URLConnection.getHeaderFieldInt(URLConnection.java:543)
[ERROR] :  TiHTTPClient:    at java.net.URLConnection.getContentLength(URLConnection.java:315)
[ERROR] :  TiHTTPClient:    at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getContentLength(DelegatingHttpsURLConnection.java:146)
[ERROR] :  TiHTTPClient:    at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getContentLength(HttpsURLConnectionImpl.java)
[ERROR] :  TiHTTPClient:    at ti.modules.titanium.network.TiHTTPClient.handleResponse(TiHTTPClient.java:159)
[ERROR] :  TiHTTPClient:    at ti.modules.titanium.network.TiHTTPClient.access$1200(TiHTTPClient.java:85)
[ERROR] :  TiHTTPClient:    at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1207)
[ERROR] :  TiHTTPClient:    at java.lang.Thread.run(Thread.java:818)
[ERROR] :  TiHTTPClient:    Suppressed: javax.net.ssl.SSLHandshakeException: Handshake failed
[ERROR] :  TiHTTPClient:        ... 20 more
[ERROR] :  TiHTTPClient:        Suppressed: javax.net.ssl.SSLHandshakeException: Handshake failed
[ERROR] :  TiHTTPClient:            ... 20 more
[ERROR] :  TiHTTPClient:        Caused by: javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0xaef13100: Failure in SSL library, usually a protocol error
[ERROR] :  TiHTTPClient: error:100c5410:SSL routines:ssl3_read_bytes:SSLV3_ALERT_HANDSHAKE_FAILURE (external/boringssl/src/ssl/s3_pkt.c:972 0x9defc240:0x00000001)
[ERROR] :  TiHTTPClient: error:100c009f:SSL routines:ssl3_get_server_hello:HANDSHAKE_FAILURE_ON_CLIENT_HELLO
[ERROR] :  TiHTTPClient:            at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
[ERROR] :  TiHTTPClient:            at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324)
[ERROR] :  TiHTTPClient:            ... 19 more
[ERROR] :  TiHTTPClient:    Caused by: javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0xaef13100: Failure in SSL library, usually a protocol error
[ERROR] :  TiHTTPClient: error:100c5410:SSL routines:ssl3_read_bytes:SSLV3_ALERT_HANDSHAKE_FAILURE (external/boringssl/src/ssl/s3_pkt.c:972 0x9defc240:0x00000001)
[ERROR] :  TiHTTPClient: error:100c009f:SSL routines:ssl3_get_server_hello:HANDSHAKE_FAILURE_ON_CLIENT_HELLO (external/boringssl/src/ssl/s3_clnt.c:750 0xab1e350f:0x00000000)
[ERROR] :  TiHTTPClient:        at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
[ERROR] :  TiHTTPClient:        at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324)
[ERROR] :  TiHTTPClient:        ... 19 more
[ERROR] :  TiHTTPClient: Caused by: javax.net.ssl.SSLProtocolException: SSL handshake terminated: ssl=0xaef13100: Failure in SSL library, usually a protocol error
[ERROR] :  TiHTTPClient: error:100c5410:SSL routines:ssl3_read_bytes:SSLV3_ALERT_HANDSHAKE_FAILURE (external/boringssl/src/ssl/s3_pkt.c:972 0x9defc240:0x00000001)
[ERROR] :  TiHTTPClient: error:100c009f:SSL routines:ssl3_get_server_hello:HANDSHAKE_FAILURE_ON_CLIENT_HELLO (external/boringssl/src/ssl/s3_clnt.c:750 0xab1e350f:0x00000000)
[ERROR] :  TiHTTPClient:    at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
[ERROR] :  TiHTTPClient:    at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324)
[ERROR] :  TiHTTPClient:    ... 19 more

非常感谢任何指针。谢谢。

4

1 回答 1

6

你应该检查你的证书是否有问题你可以在这里找到更多信息http://developer.android.com/training/articles/security-ssl.html#UnknownCa

在此处输入图像描述

于 2016-02-26T20:44:42.953 回答