|
||||||||||
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. |
KeyStore |
loadKeyStore()
Loads a KeyStore according to the parameters initialised using the setters. |
KeyStore |
loadKeyStore(char[] password)
Loads a KeyStore according to the parameters initialised using the setters. |
void |
setKeyStoreInputStream(InputStream keyStoreInputStream)
Sets the KeyStore InputStream. |
void |
setKeyStorePassword(char[] keyStorePassword)
Set the KeyStore password. |
void |
setKeyStorePassword(String keyStorePassword)
Set the KeyStore password. |
void |
setKeyStorePasswordCallbackHandler(CallbackHandler keyStorePasswordCallbackHandler)
Sets the KeyStore password CallbackHander (used to get the password if no password is provided). |
void |
setKeyStorePath(String keyStorePath)
Sets the KeyStore path. |
void |
setKeyStoreProvider(String keyStoreProvider)
Sets the KeyStore provider. |
void |
setKeyStoreProviderArgFile(String keyStoreProviderArgFile)
Sets the KeyStore provider argument file name. |
void |
setKeyStoreProviderArgText(String keyStoreProviderArgText)
Sets the KeyStore provider argument text content (UTF-8). |
void |
setKeyStoreProviderClass(String keyStoreProviderClass)
Sets the KeyStore provider class name. |
void |
setKeyStoreType(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(String keyStorePath)
keyStorePath
- the KeyStore pathpublic void setKeyStoreInputStream(InputStream keyStoreInputStream)
loadKeyStore(char[])
.
keyStoreInputStream
- the KeyStore InputStreampublic void setKeyStoreType(String keyStoreType)
keyStoreType
- the KeyStore typepublic void setKeyStoreProvider(String keyStoreProvider)
keyStoreProvider
- the KeyStore providerpublic void setKeyStoreProviderClass(String keyStoreProviderClass)
keyStoreProviderClass
- the KeyStore provider class namepublic void setKeyStoreProviderArgFile(String keyStoreProviderArgFile)
keyStoreProviderArgFile
- the KeyStore provider argument file namepublic void setKeyStoreProviderArgText(String keyStoreProviderArgText)
keyStoreProviderArgText
- the KeyStore provider argument text content (UTF-8)public void setKeyStorePassword(String keyStorePassword)
keyStorePassword
- the KeyStore passwordpublic void setKeyStorePassword(char[] keyStorePassword)
loadKeyStore()
or set it to null.
keyStorePassword
- the KeyStore passwordpublic void setKeyStorePasswordCallbackHandler(CallbackHandler keyStorePasswordCallbackHandler)
keyStorePasswordCallbackHandler
- the KeyStore password CallbackHandler.public KeyStore loadKeyStore(char[] password) throws KeyStoreException, NoSuchProviderException, IOException, NoSuchAlgorithmException, CertificateException, UnsupportedCallbackException, SecurityException
password
- KeyStore password (will use password set with
setKeyStorePassword if this argument is null).
KeyStoreException
NoSuchProviderException
IOException
NoSuchAlgorithmException
CertificateException
UnsupportedCallbackException
SecurityException
public KeyStore loadKeyStore() throws KeyStoreException, NoSuchProviderException, IOException, NoSuchAlgorithmException, CertificateException, UnsupportedCallbackException
KeyStoreException
NoSuchProviderException
IOException
NoSuchAlgorithmException
CertificateException
UnsupportedCallbackException
public static KeyStoreLoader getKeyStoreDefaultLoader()
public static KeyStoreLoader getTrustStoreDefaultLoader()
protected final KeyStoreLoader clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |