Trying to use the SBLIM CIM client with a keystore.
The keystore was created with a password that is different from the password of the contained certificate.
This was thought to be the rather common setup but it was not possible to make it work with the SBLIM CIM client.
Looking at the SBLIM CIM client code it was found that it is only possible to have the keystore's password and the passwords of all contained certificates all the same.
org.sblim.cimclient.internal.http.HttpSocketFactory.loadKeystore()
final KeyStore keystore = KeyStore.getInstance\(keystoreType\);
keystore.load\(new FileInputStream\(keystorePath\), keystorePassword\);
final KeyManagerFactory keymanagerfactory = KeyManagerFactory.getInstance\(
keyManagerAlgorithm, pSecurityProvider\);
keymanagerfactory.init\(keystore, keystorePassword\);
keyManager = keymanagerfactory.getKeyManagers\(\);
If you want to support certificates with different passwords in a keystore you would need to use this init method
public final void init(ManagerFactoryParameters spec)
together with the class javax.net.ssl.KeyStoreBuilderParameters which implements ManagerFactoryParameters as well as class that extends public abstract static class KeyStore.Builder, so one can supply all the necessary data like e.g. alias, password aso.
For future consideration
Classic ID #2957985
Notes from Dave H:
Hi Dave,
I could not even remember that I had opened this bug until I was reading it.
Three years is a long time and to be honest I won't be much of a help on this bug any more.
You might want to reassign it to yourself if that is possible.
Cheers,
Boris
Hi Boris - The bug is currently assigned to "nobody" since development work isn't underway (the two Daves were merely discussing possible solutions), you are receiving notifications because you are the creator all those years ago (-: Thanks.