Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android 2.3.4 SSL problem

Tags:

java

android

ssl

After upgrading to Android 2.3.4, I am getting following exception:

javax.net.ssl.SSLException: Read error: ssl=0x*: I/O error during system call, Connection timed out
 at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_read(Native Method)
 at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:788)

Previous versions of Android were working OK. Any hints?

like image 313
TN. Avatar asked May 06 '11 09:05

TN.


People also ask

How do I enable SSL on my Android?

From Credential Storage Tab, click on Install from Phone Storage/Install from SD Card. A new file storage manager will appear. Now find the SSL certificate from your device. If it asks to enter the PKCS#12 password, add that password which was generated during SSL download process.

Why is my SSL not working on mobile?

Mobile devices and the micro browsers that are installed on them support our SSL certificates if the server-side installation has been performed correct. The usual reason for lack of mobile support is the non-installation of the intermediate certificate, which is critical to completing the chain of trust.


1 Answers

I have specified SSL timeout explicitly and everything is working again:

val schemeRegistry = client.getConnectionManager.getSchemeRegistry
schemeRegistry.register(new Scheme("https", SSLCertificateSocketFactory.getHttpSocketFactory(timeout,
      new SSLSessionCache(context)), 443))
like image 197
TN. Avatar answered Oct 22 '22 05:10

TN.