问题
I am looking at SSL for Jetty: http://wiki.eclipse.org/Jetty/Reference/SSL_Connectors
There are properties for both keyStorePassword and keyManagerPassword. I suppose the keyManagerPassword is used by a Javax KeyManager, and so is a password for recovering keys from the key store?
So do keyStorePassword and keyManagerPassword then generally have the same value?
回答1:
Keymanagerfactory does have a password.
hmmm it is a little history and evolution in these APIs and they could perhaps be made clearer.
The keyManagerPassword is passed as the password arg to KeyManagerFactory.init(...) If there is no keymanagerpassword, then the keystorepassword is used instead. If there is no trustmanager set, then the keystore is used as the trust store and the keystorepassword is used as the truststore password.
回答2:
keyManagerPassword
looks like a misfeature. It is the keystore that has the password, not the KeyManager. There's no reference to a key manager password in the Javadoc for the classes concerned.
来源:https://stackoverflow.com/questions/10847983/what-is-the-difference-between-keystorepassword-and-keymanagerpassword-in-jetty