SSLProtocolException makes https connection

I have an SSLProtocolException when I make an https connection to my web server. I have only this exception in Android 2.3 Gingebread; the same code works fine in all other versions of Android. Are there any problems with this version of Android?

I also opened a bug report on Google: http://code.google.com/p/android/issues/detail?id=16121&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

I have attached an exception:

WARN / System.err (6218): javax.net.ssl.SSLProtocolException: read error: ssl = 0x3c97e8: error in the SSL library, usually a protocol error WARN / System.err (6218): at org.apache.harmony. xnet.provider.jsse.NativeCrypto.SSL_read (native method) WARN / System.err (6218): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl $ SSLInputStream.read (OpenSSLSocketImpl.java:788) WARN / System .err (6218): at org.apache.harmony.luni.internal.net.www.protocol.http.FixedLengthInputStream.read (FixedLengthInputStream.java:44) WARN / System.err (6218): in java.io.BufferedInputStream .read (BufferedInputStream.javahaps19) WARN / System.err (6218): at android.os.Handler.dispatchMessage (Handler.java:99) WARN / System.err (6218): on android.os.Looper.loop (Looper.java:123) WARN / System.err (6218): at android.os.HandlerThread.run (HandlerThread.java:60)

+6
android ssl
source share
2 answers

Try using SSLSocketFactory to read directly from the socket. I posted a test file with comments here: SSLProtocolException while reading https responses on Android 2.3.3 devices

0
source

check if a server is needed for client authentication. In my case, in tomcat server.xml clientAuth = "true", so the error was changed like that, I change it to false.

0
source

All Articles