Archived:SecureConnection with SSL connection string fails in Symbian^3 (Known Issue)
The article is believed to be still valid for the original topic scope.
Article Metadata
Tested with
Compatibility
Article
Description
A secure socket stream connection with SSL connection string fails with Java Runtime 2.1 for Symbian which was delivered in the first commercial firmware for Symbian^3 devices. For the affected devices, an attempt to make a SecureConnection with an SSL string results in throwing the exception javax.microedition.pki.CertificateException: Untrusted server.
How to reproduce
This issue can be reproduced by implementing a test MIDlet which uses the following string format for making a SocketConnection:
Connector.open("ssl://<host>:<hostport>")
Solution
The issue has been fixed and the fix will be made available in newer firmware releases for the affected Symbian^3 devices. The Java Runtime for Symbian version which has been verified to include the fix for the issue is 2.2.39; the version information can be acquired as system property of microedition.platform as described in Java Developer's Library.
For making a secure connection, HTTPS could be used instead of SSL whenever possible. As an example involving both HTTPS and SSL for making secure connections, the system property microedition.platform could be used for determining the Java Runtime versions, followed by an application logic to use HTTPS for the Java Runtime versions which are affected by the issue and SSL for the Java Runtime versions which are not affected by the issue or which include the fix.


(no comments yet)