首先,我已经在互联网上搜索了3天。
这是确切的错误,
javax.net.ssl.SSLHandshakeException: Connection closed by peer
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:302)
at com.android.okhttp.Connection.upgradeToTls(Connection.java:197)
at com.android.okhttp.Connection.connect(Connection.java:151)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:106)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:208)
at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getOutputStream(DelegatingHttpsURLConnection.java:218)
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:25)
at com.aws.wiremo.common.CommonFunctions.sendRequestEx(CommonFunctions.java:618)
at com.aws.wiremo.common.CommonFunctions.sendRequest(CommonFunctions.java:556)
at com.aws.wiremo.screen.kdo.LoadingScreen$MakeRequest.doInBackground(LoadingScreen.java:146)
at com.aws.wiremo.screen.kdo.LoadingScreen$MakeRequest.doInBackground(LoadingScreen.java:125)
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:818)
由于保密原因,我无法发布代码。
没有由StackTrace给出的异常引起的,所以我无法真正诊断出问题。
以下是我可以分享的一些信息。
任何意见或帮助将不胜感激。
答案 0 :(得分:0)
我的问题的答案是我的自定义提供商的KeyPairGenerator生成的密钥在Android 7中不再有效,即使它在Android 5中工作。我尝试将我的KeyPairGenerator提供程序更改为BouncyCastle( BC)它再次起作用。
我试着在互联网上寻找原因,但我无法找到我想要的东西。
我希望这个答案可以帮助别人。