Tuesday, April 28, 2009

Java ME SDK and SSL

I have been struggling a few days with getting Https communication to work in Java ME SDK 3.0, but with little success so far. To be able to create a Https connection I need to get the SDK to accept the (self-signed) certificate on my test server. The SDK does not however use the Java SE keystore but has its own (actually it has a lot of keystore's) with its own tool to update it. So far I have not managed to get my certificate into the right keystore. Tried asking on Sun's forum, but they don't seem to be interested in the problem at all.

So instead I used Nokia's S60 emulator, which gives me the option to accept the server certificate even though it can not be verified. Perhaps I should give up on the SDK for now, specially since the support and documentation is not really good enough.

2 comments:

Iivo said...

So did you solve this somehow? I'm having the same problem, except our server certificate is from Thawte.

Erik said...

No, I did not sole it in Java ME SDK 3.0. Instead I used Nokia S60 to test https communication. This gives me the option to accept the certificate, even though it can not be verified.