i am trying to develop an app which tries to call a https(godaddy ssl) url. i have successfully installed certificate in key store using this code.
public void addCertToDeviceKeyStore(Certificate certificate) {
KeyStore keyStore = DeviceKeyStore.getInstance();
// check if certificate is not already in the DeviceKeyStore
if (!keyStore.isMember(certificate)) {
try {
String SFN = certificate.getSubjectFriendlyName();
CertificateStatus CS = certificate.getStatus();
keyStore.set(null, SFN, certificate, CS, keyStore.getTicket());
} catch (Exception e) {
}
}
}
after adding certificate also why i am getting security prompt for keystore password and for trusting the connection?
is there any way to avoid these security prompts?
You can avoid this by making your device find the root certificate. There is a problem with godaddy certificate where the BlackBerry can't find the root.
You need to edit the .htaccess file to point to the root certificate.
http://help.godaddy.com/topic/742/article/5238
Here is an example of solution, with the same kind of problem but on another platform.
http://blog.boxedice.com/2009/05/11/godaddy-ssl-certificates-and-cannot-verify-identity-on-macsafari/