dandycheung / microemu

Automatically exported from code.google.com/p/microemu
0 stars 0 forks source link

java.security.NoSuchAlgorithmException: SSLContext SSL imple #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,
I try to run my app in microemu-android, using android_sdk1.6, in emulator.
My app makes https connections to a server, when it tries to connect the
followin exception it's thrown :

V/MicroEmulator( 758): java.security.NoSuchAlgorithmException: SSLContext
SSL implementation not found
V/MicroEmulator( 758): at
org.apache.harmony.security.fortress.Engine.getInstance(Engine.java:104)
V/MicroEmulator( 758): at
javax.net.ssl.SSLContext.getInstance(SSLContext.java:90)
V/MicroEmulator( 758): at
org.microemu.cldc.https.Connection.<init>(Connection.java:49)
V/MicroEmulator( 758): at java.lang.Class.newInstanceImpl(Native Method)
V/MicroEmulator( 758): at java.lang.Class.newInstance(Class.java:1472)
V/MicroEmulator( 758): at
org.microemu.microedition.io.ConnectorImpl.openSecure(ConnectorImpl.java:13
7)
V/MicroEmulator( 758): at
org.microemu.microedition.io.ConnectorImpl.access$200(ConnectorImpl.java:51
)
V/MicroEmulator( 758): at
org.microemu.microedition.io.ConnectorImpl$1.run(ConnectorImpl.java:81)
V/MicroEmulator( 758): at
java.security.AccessController.doPrivilegedImpl(AccessController.java:205)
V/MicroEmulator( 758): at
java.security.AccessController.doPrivileged(AccessController.java:178)
V/MicroEmulator( 758): at
org.microemu.microedition.io.ConnectorImpl.open(ConnectorImpl.java:76)
V/MicroEmulator( 758): at
org.microemu.microedition.io.ConnectorAdapter.open(ConnectorAdapter.java:50
)
V/MicroEmulator( 758): at
javax.microedition.io.Connector.open(Connector.java:49)

Microemu version is latest trunk .

Regards. Thanks

Original issue reported on code.google.com by bar...@gmail.com on 18 Nov 2009 at 11:45

GoogleCodeExporter commented 8 years ago
Changed SSLContext to use TLS protocol instead of SSL. It seems SSL protocol in
SSLContext is not implemented on Android platform.

Original comment by bar...@gmail.com on 8 Jan 2010 at 11:36

GoogleCodeExporter commented 8 years ago
Hi, How can I change SSLContext to use TLS protocol instead of SSL? Thanks

Original comment by fbarbe...@gmail.com on 20 Jan 2012 at 6:28

GoogleCodeExporter commented 8 years ago
So I've modified org.microemu.cldc.https.Connection in javase project:
sslContext = SSLContext.getInstance("TLS");
Now no error shows in logcat but still fail, after 3 request I got request 
timeout, no error shows me...But with http works fine! Any advice? Thanks

Original comment by fbarbe...@gmail.com on 20 Jan 2012 at 10:11

GoogleCodeExporter commented 8 years ago
This is related to the Android implementation of the SSL stack. I suggest 
checking Android forums and issue database for the answer.

Original comment by bar...@gmail.com on 31 Jan 2012 at 10:52