07-15-2009 09:05 PM
I am connecting to a server via (HttpsConnection)Connector.open("https://hostname;
Say, for example, that "hostname" has an invalid certificate (untrusted chain). How can I validate that, in my code? The closest I see is HttpsConnection.getSecurityInfo().getCertificate()
Developing using BlackBerry JDE 4.0.2, testing on JDE 188.8.131.52 BB 8800 simulator using MDS sim 4.1.4. Developing using MDS route, but expected to support BIS-B as well.
09-02-2012 07:22 PM
I would like to know the same thing: Looks ilke X509Certificate has the method I need (getPublicKey()), but there is no way to do the conversion.
Has anyone come up with a good solution?
09-03-2012 06:00 AM
Impossible to do with the current RIM APIs. You can use BouncyCastle Library to read the certificate information. It should provide you all the info you need from certificate including the chain of certificates.
09-03-2012 09:55 AM
Thanks for the reply! Do you have any suggestions on how I can go about using Bouncy Castle? I've seen it mentioned on other forum posts without any details on how I'm supposed to use it.
I have downloaded the J2ME from their downloads page and am looking for some API help.
09-03-2012 11:28 AM
Ok, I have everything compiling correctly using the BouncyCastle 'Certificate' object- but when I start the app I get this error:
Error starting ApplicationName: 'ApplicationName' may not contain classes in com.rim, net.rim, net.blackberry, java or javax packages
I'm guessing this has to do with me not doing any obfuscation (As mentioned in Q#3 of the Bouncy castle FAQ). Does anyone have any guidance on setting up obfuscation using the Blackberry plugin for Eclipse?