|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jsslutils.keystores.KeyStoreLoader
public final class KeyStoreLoader
This class is a factory that provides methods for loading a KeyStore.
Constructor Summary | |
---|---|
KeyStoreLoader()
|
Method Summary | |
---|---|
protected KeyStoreLoader |
clone()
KeyStoreLoaders are likely to contain sensitive information; cloning is therefore not allowed. |
static KeyStoreLoader |
getKeyStoreDefaultLoader()
Builds a new KeyStoreLoader initialised with the values passed in the javax.net.ssl.keyStore, javax.net.ssl.keyStoreType, javax.net.ssl.keyStoreProvider and javax.net.ssl.keyStorePassword system properties, for using the KeyStore as a key store (as opposed to a trust store). |
static KeyStoreLoader |
getTrustStoreDefaultLoader()
Builds a new KeyStoreLoader initialised with the values passed in the javax.net.ssl.trustStore, javax.net.ssl.trustStoreType, javax.net.ssl.trustStoreProvider and javax.net.ssl.trustStorePassword system properties, for using the KeyStore as a trust store. |
java.security.KeyStore |
loadKeyStore()
Loads a KeyStore according to the parameters initialised using the setters. |
java.security.KeyStore |
loadKeyStore(char[] password)
Loads a KeyStore according to the parameters initialised using the setters. |
void |
setKeyStoreInputStream(java.io.InputStream keyStoreInputStream)
Sets the KeyStore InputStream. |
void |
setKeyStorePassword(char[] keyStorePassword)
Set the KeyStore password. |
void |
setKeyStorePassword(java.lang.String keyStorePassword)
Set the KeyStore password. |
void |
setKeyStorePasswordCallbackHandler(javax.security.auth.callback.CallbackHandler keyStorePasswordCallbackHandler)
Sets the KeyStore password CallbackHander (used to get the password if no password is provided). |
void |
setKeyStorePath(java.lang.String keyStorePath)
Sets the KeyStore path. |
void |
setKeyStoreProvider(java.lang.String keyStoreProvider)
Sets the KeyStore provider. |
void |
setKeyStoreProviderArgFile(java.lang.String keyStoreProviderArgFile)
Sets the KeyStore provider argument file name. |
void |
setKeyStoreProviderArgText(java.lang.String keyStoreProviderArgText)
Sets the KeyStore provider argument text content (UTF-8). |
void |
setKeyStoreProviderClass(java.lang.String keyStoreProviderClass)
Sets the KeyStore provider class name. |
void |
setKeyStoreType(java.lang.String keyStoreType)
Sets the KeyStore type. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeyStoreLoader()
Method Detail |
---|
public void setKeyStorePath(java.lang.String keyStorePath)
keyStorePath
- the KeyStore pathpublic void setKeyStoreInputStream(java.io.InputStream keyStoreInputStream)
loadKeyStore(char[])
.
keyStoreInputStream
- the KeyStore InputStreampublic void setKeyStoreType(java.lang.String keyStoreType)
keyStoreType
- the KeyStore typepublic void setKeyStoreProvider(java.lang.String keyStoreProvider)
keyStoreProvider
- the KeyStore providerpublic void setKeyStoreProviderClass(java.lang.String keyStoreProviderClass)
keyStoreProviderClass
- the KeyStore provider class namepublic void setKeyStoreProviderArgFile(java.lang.String keyStoreProviderArgFile)
keyStoreProviderArgFile
- the KeyStore provider argument file namepublic void setKeyStoreProviderArgText(java.lang.String keyStoreProviderArgText)
keyStoreProviderArgText
- the KeyStore provider argument text content (UTF-8)public void setKeyStorePassword(java.lang.String keyStorePassword)
keyStorePassword
- the KeyStore passwordpublic void setKeyStorePassword(char[] keyStorePassword)
loadKeyStore()
or set it to null.
keyStorePassword
- the KeyStore passwordpublic void setKeyStorePasswordCallbackHandler(javax.security.auth.callback.CallbackHandler keyStorePasswordCallbackHandler)
keyStorePasswordCallbackHandler
- the KeyStore password CallbackHandler.public java.security.KeyStore loadKeyStore(char[] password) throws java.security.KeyStoreException, java.security.NoSuchProviderException, java.io.IOException, java.security.NoSuchAlgorithmException, java.security.cert.CertificateException, javax.security.auth.callback.UnsupportedCallbackException, java.lang.SecurityException
password
- KeyStore password (will use password set with
setKeyStorePassword if this argument is null).
java.security.KeyStoreException
java.security.NoSuchProviderException
java.io.IOException
java.security.NoSuchAlgorithmException
java.security.cert.CertificateException
javax.security.auth.callback.UnsupportedCallbackException
java.lang.SecurityException
public java.security.KeyStore loadKeyStore() throws java.security.KeyStoreException, java.security.NoSuchProviderException, java.io.IOException, java.security.NoSuchAlgorithmException, java.security.cert.CertificateException, javax.security.auth.callback.UnsupportedCallbackException
java.security.KeyStoreException
java.security.NoSuchProviderException
java.io.IOException
java.security.NoSuchAlgorithmException
java.security.cert.CertificateException
javax.security.auth.callback.UnsupportedCallbackException
public static KeyStoreLoader getKeyStoreDefaultLoader()
public static KeyStoreLoader getTrustStoreDefaultLoader()
protected final KeyStoreLoader clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |