The following code is currently failing with the exception below.
private X509Certificate getX509Certificate(String alias)
throws CertificateException {
// NOTE The default keystore password is "**********", as specified in the Sun KeyStore documentation
// NOTE For more information, read the Sun documentation at http://java.sun.com
X509Certificate cert = null;
String keystore = "keystore";
try {
cert = getX509Certificate(alias, keystore, "**********");
}
catch(KeyStoreException exception) {
// A keystore exception occurred in the call to getX509Certificate, which could be indicative of a
// bad installation
throw new CertificateException("A keystore exception occurred accessing the default keystore."
+ " Check your keystore installation, ensuring that the default keystore password"
+ " is the standard Java keystore password\r\n"
+ exception.getMessage());
}
+[04/12/07 15:02:57:827 GMT] 0000001f SystemErr R java.security.cert.CertificateException: A keystore exception occurred accessing the default keystore. Check your keystore installation, ensuring that the default keystore password is the standard Java keystore password+
A keystore exception occurred accessing the default keystore. Check your keystore installation, ensuring that the default keystore password is the standard Java keystore password
The provider 'SUN' has not been configured
no such provider: SUN
So it looks like my default keystore password is not the same as that in the code above (I've replaced it with ******). How do I set the default keystore to be the same as in the code above? Please note the exact same code works for another application - and so I would like to use the same class file rather than having to change the code above.