I use a standard piece of code
URL url = new URL(sb.toString()); conn = (HttpsURLConnection) url.openConnection(); InputStreamReader in = new InputStreamReader(conn.getInputStream());
To connect to the Google Places API from an Android client. However, I get this exception:
02-24 02:29:35.535: E/AdapterClass(3122): at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:374) 02-24 02:29:35.535: E/AdapterClass(3122): at com.android.okhttp.Connection.upgradeToTls(Connection.java:197) 02-24 02:29:35.535: E/AdapterClass(3122): Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xaf85c200: Failure in SSL library, usually a protocol error 02-24 02:29:35.535: E/AdapterClass(3122): error:1407743E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert inappropriate fallback (external/openssl/ssl/s23_clnt.c:765 0xac3f9e61:0x00000000)
Any ideas? I noticed that this only happens when I use OkHttp for requests, but not for this specific request, but in other parts of my application. So why play the role of okhttp here (as shown in stacktrace)?
source share