I'm using the 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 this only happens when I use OkHttp for requests, but not for this particular request but in other parts of my app. So why would okhttp play a role here (as shown in the stacktrace)?
This problem gets solved by switching to the latest version (2.2 as of now) of OkHttp (I was using 1.6 before).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With