10-06-2010 05:05 PM
i wanted to install a self-signed certificate (which acts as our CA) programmaticaly.
To do that i used the following code :
KeyStore deviceKeyStore= DeviceKeyStore.getInstance();
String subjectFriendlyName = certificate.getSubjectFriendlyName();
deviceKeyStore.set(null,subjectFriendlyName ,certificate,certificateStatus , deviceKeyStore.getTicket());
It works fine with the simulator (BB 9000).
The thing is that when the set is called on the deviceKeyStore a password is asked.
I read that it is not possible to get rid of this password. But at least my self-signed certificate is installed in the keystore. If i go to Security Options > Certificate : i can see it in the list.
Now when i tried with a real phone (my application is signed).
1) The CA (self-signed) certificate is never installed.
2) When my application connects to a server with a certificate signed with the CA certificate, it asks if i should trust it. I select trust but afterwards i get a warning window saying that my IT policy does not have sufficient privileges (or something like that). I have to manually trust the certificate going through the Security Options > Certificates and then click on the certificate and trust it.
Is it possible to install a self-signed certificate programmatically in the device keystore ? Have you been able to do this ? How can i get rid of the IT policy issue ?
Oh BTW, I am new to BB development
Thanks in advance,