Reputation: 401
First, I've already searched the internet and have been debugging for 3 days.
This is the exact error,
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)
Due to confidentiality reasons, I can't post the codes.
There's no caused by exception given by the StackTrace so i can't really diagnose the problem.
Here are some information I can share.
Any inputs will be appreciated.
Upvotes: 1
Views: 1757
Reputation: 401
The answer to my problem was that I commented the code for adding my generated private key to my key store so the SSL HandShake fails during client authentication.
I hope this answer can help somebody.
Upvotes: 0