|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faceless.pdf2.viewer2.KeyStoreManager
public abstract class KeyStoreManager
This class deals with managing digital identities in a KeyStore. It's primary focus is to enable the following activities
loadKeyStore(), saveKeyStore(java.security.KeyStore) and friends methods.
| Field Summary | |
|---|---|
protected KeyStore |
keystore
|
protected Component |
parent
|
| Constructor Summary | |
|---|---|
protected |
KeyStoreManager(Component parent)
Create a new KeyStoreManager |
| Method Summary | |
|---|---|
static KeyStoreManager |
createDefaultKeyStoreManager(Component parent)
|
static KeyStoreManager |
createFixedKeyStoreManager(Component parent,
String filename,
char[] password,
String type,
String provider,
boolean create)
Create a new File-based KeyStoreManager. |
static KeyStoreManager |
createPromptKeyStoreManager(Component parent,
String filename,
char[] password,
String type,
String provider,
boolean create)
Create a new File-based KeyStoreManager. |
protected char[] |
getDefaultKeyPassword()
Return the default password to try when decrypting private keys. |
KeyStore |
getKeyStore()
Get the KeyStore. |
protected void |
initializeKeyStore(KeyStore keystore)
Initialize the keystore. |
protected abstract boolean |
isKeyStoreReloadable()
Return true if the user should have an option to reload the KeyStore |
protected abstract KeyStore |
loadKeyStore()
Load or initialise a KeyStore |
protected KeyStore |
reloadKeyStore()
Reload the keystore |
protected abstract boolean |
saveKeyStore(KeyStore keystore)
Save the KeyStore |
Map |
showDecryptionKeySelectionDialog(String alias,
char[] password,
Object extra)
Select and return a private key for decryption |
void |
showIdentityManagementDialog()
Show the "Identity Management" dialog, which allows keys and certificats to be created/imported, viewed, exported or deleted. |
Map |
showSigningKeySelectionDialog(String alias,
char[] password,
Object extra)
Select and return a private key for signing |
void |
trustCertificate(String alias,
X509Certificate cert)
Add the specified Certificate to the list of trusted root certificates and save the KeyStore. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected KeyStore keystore
protected final Component parent
| Constructor Detail |
|---|
protected KeyStoreManager(Component parent)
parent - the Component to use as a parent for any dialogs - may be null| Method Detail |
|---|
public final KeyStore getKeyStore()
protected abstract KeyStore loadKeyStore()
throws GeneralSecurityException,
IOException
GeneralSecurityException
IOExceptionprotected abstract boolean isKeyStoreReloadable()
protected KeyStore reloadKeyStore()
throws GeneralSecurityException,
IOException
GeneralSecurityException
IOException
protected void initializeKeyStore(KeyStore keystore)
throws GeneralSecurityException
GeneralSecurityException
protected abstract boolean saveKeyStore(KeyStore keystore)
throws GeneralSecurityException,
IOException
keystore - the KeyStore
GeneralSecurityException
IOExceptionprotected char[] getDefaultKeyPassword()
public void showIdentityManagementDialog()
public Map showDecryptionKeySelectionDialog(String alias,
char[] password,
Object extra)
alias - the alias to preselect, if appropriatepassword - the password to use on the aliasextra - additional information for the dialog
public Map showSigningKeySelectionDialog(String alias,
char[] password,
Object extra)
alias - the alias to preselect, if appropriatepassword - the password to use on the aliasextra - Additional information for the dialog. Currently, the only acceptable value is a Map containing "Name", "Reason" and "Location" keys mapping to Strings.
public void trustCertificate(String alias,
X509Certificate cert)
alias - the alias to store it under - may be nullcert - the X509 Certificate to store
public static KeyStoreManager createFixedKeyStoreManager(Component parent,
String filename,
char[] password,
String type,
String provider,
boolean create)
parent - the root Component for dialogsfilename - the Filepassword - the password to verify the KeyStore or nulltype - the type of KeyStore, or null to choose an appropriate typeprovider - the Provider, or null to use the default providercreate - whether to create the KeyStore if it doesn't exist
public static KeyStoreManager createPromptKeyStoreManager(Component parent,
String filename,
char[] password,
String type,
String provider,
boolean create)
parent - the root Component for dialogsfilename - the Filepassword - the password to verify the KeyStore or nulltype - the type of KeyStore, or null to choose an appropriate typeprovider - the Provider, or null to use the default providercreate - whether to create the KeyStore if it doesn't existpublic static KeyStoreManager createDefaultKeyStoreManager(Component parent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||