|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.ssl.KeyStoreUtils
public final class KeyStoreUtils
Provides utility methods for using a KeyStore.
| Method Summary | |
|---|---|
static KeyStore.Entry |
getEntry(String alias,
KeyStore keystore,
char[] password)
Returns a keystore entry from the supplied keystore. |
static KeyStore |
newInstance()
Creates a new KeyStore with the default keystore type and
initializes it. |
static KeyStore |
newInstance(char[] password)
Creates a new KeyStore with the default keystore type and
initializes it. |
static KeyStore |
newInstance(String type)
Creates a new KeyStore and initializes it. |
static KeyStore |
newInstance(String type,
char[] password)
Creates a new KeyStore and initializes it. |
static void |
setCertificateEntry(String alias,
KeyStore keystore,
Certificate... certs)
Sets certificate entries on the supplied keystore. |
static void |
setEntry(String alias,
KeyStore.Entry entry,
KeyStore keystore,
char[] password)
Sets a keystore entry on the supplied keystore. |
static void |
setKeyEntry(String alias,
KeyStore keystore,
char[] password,
Key key,
Certificate... certs)
Sets a key entry on the supplied keystore. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static KeyStore newInstance()
throws GeneralSecurityException
KeyStore with the default keystore type and
initializes it.
GeneralSecurityException - if the keystore cannot be initialized
public static KeyStore newInstance(char[] password)
throws GeneralSecurityException
KeyStore with the default keystore type and
initializes it.
password - to protect the keystore
GeneralSecurityException - if the keystore cannot be initialized
public static KeyStore newInstance(String type)
throws GeneralSecurityException
KeyStore and initializes it.
type - of keystore instance
GeneralSecurityException - if the keystore cannot be initialized
public static KeyStore newInstance(String type,
char[] password)
throws GeneralSecurityException
KeyStore and initializes it.
type - of keystore instancepassword - to protect the keystore
GeneralSecurityException - if the keystore cannot be initialized
public static KeyStore.Entry getEntry(String alias,
KeyStore keystore,
char[] password)
throws GeneralSecurityException
alias - of the entry to returnkeystore - to read the entry frompassword - to access the keystore
GeneralSecurityException - if the keystore cannot be read
IllegalArgumentException - if the alias does not exist
public static void setEntry(String alias,
KeyStore.Entry entry,
KeyStore keystore,
char[] password)
throws GeneralSecurityException
alias - of the supplied entryentry - to setkeystore - to set the entry onpassword - to protect the entry
GeneralSecurityException - if the keystore cannot be modified
public static void setKeyEntry(String alias,
KeyStore keystore,
char[] password,
Key key,
Certificate... certs)
throws GeneralSecurityException
alias - of the supplied keykeystore - to set the key onpassword - to protect the keykey - to setcerts - associated with the key
GeneralSecurityException - if the keystore cannot be modified
public static void setCertificateEntry(String alias,
KeyStore keystore,
Certificate... certs)
throws GeneralSecurityException
alias - of the supplied certificate(s)keystore - to set the cert(s) oncerts - to set
GeneralSecurityException - if the keystore cannot be modified
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||