public interface JavaTruststorePasswordProvider
Used by Credential Manager when trying to copy the trusted certificates from the Java's default truststore into the Credential Manageger's own Truststore. It will first try the default Java passwords and then if they do not work - it will loop through all the providers until one can provide the password. If none can, the certificates will not be copied.
A typical implementation of this class would pop up a dialog
and ask the user for the password. Such providers should check
GraphicsEnvironment#isHeadless()
before returning to avoid
attempts to pop up dialogues on server/headless installations.
It is safe to return null
if the provider does not have an
opinion.
CredentialManagerOld
Modifier and Type | Method and Description |
---|---|
String |
getJavaTruststorePassword()
Get the Java truststore password.
|
void |
setJavaTruststorePassword(String password)
Set the Java truststore password.
|
String getJavaTruststorePassword()
This method will only be called if the provider returned
true
from #canProvideJavaTruststorePassword()
.
This method will be called when initialising the Credential Manager for the first time, in the cases where the Java truststore password has been changed from the VM default. The Credential Manager will need this password to unlock the Java truststore and copy the trusted certificate into the Credential Managers's own Truststore.
Generally only advanced users would change this password.
null
if not
available (for instance if user action was cancelled).void setJavaTruststorePassword(String password)
password
- to setCopyright © 2015–2016 The Apache Software Foundation. All rights reserved.