gov.lanl.KeyTools
Class KeystoreOperations

java.lang.Object
  |
  +--gov.lanl.KeyTools.KeystoreOperations

public class KeystoreOperations
extends java.lang.Object

Implements the keystore operation for TMKeyMgr

 

Constructor Summary
KeystoreOperations(gov.lanl.KeyTools.KeyAndCertInterface inKC)
          Constructor, remember the certificate/key interface
 
Method Summary
 void addCA(gov.lanl.Utility.InfoList inList)
          Add a certificate authority to the keystore, requires issuing certificate authority to be root of the keystore
 void changeAliasPassword(gov.lanl.Utility.InfoList inList)
          Change the password for the private key of an alias in the keystore
 void changeKeystorePassword(gov.lanl.Utility.InfoList inList)
          Change the password for a keystore
 void copyTrusted(gov.lanl.Utility.InfoList inList)
          Copies all of the trusted certificates in the source keystore to the target keystore
 void copyUser(gov.lanl.Utility.InfoList inList)
          Copies the user's private key and certificate from the source keystore to the target keystore.
 void createKeystore(gov.lanl.Utility.InfoList inList)
          Create a new keystore with one certificate authority
 void createUser(gov.lanl.Utility.InfoList inList)
          Create a new user with one specified certificate authority and create a private keystore.
 void deleteAlias(gov.lanl.Utility.InfoList inList)
          Delete an alias and the associated data from a keystore
 void exportPKCS(gov.lanl.Utility.InfoList inList)
          Exports a keystore entry to a PKCS file
 java.lang.String[] getValues(gov.lanl.Utility.InfoList inList, java.lang.String[] namesToGet)
          Get the values for the names from the InfoList.
 void importPKCS(gov.lanl.Utility.InfoList inList)
          Imports the contents of the PKCS into a keystore
 void setMsgArea(javax.swing.JTextArea inMsgArea)
          Set the message area for verbose output
 void setVerbose(boolean verbose)
          Set the verbose flag
 void setVerbose(java.lang.String verbose)
          Set the verbose flag
 void showKeystore(gov.lanl.Utility.InfoList inList)
          Displays the entries in the keystore; certificat chain only.
 void showPKCS(gov.lanl.Utility.InfoList inList)
          Displays the contents of the PKCS
 void showUser(gov.lanl.Utility.InfoList inList)
          Display the user's certificate/chain and private key, if appropriate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeystoreOperations

public KeystoreOperations(gov.lanl.KeyTools.KeyAndCertInterface inKC)
Constructor, remember the certificate/key interface

Parameters:
inKC - is the certificate interface to use
Method Detail

setVerbose

public void setVerbose(boolean verbose)
Set the verbose flag

Parameters:
verbose - is the new value

setVerbose

public void setVerbose(java.lang.String verbose)
Set the verbose flag

Parameters:
verbose - is the string representation for the boolean value

setMsgArea

public void setMsgArea(javax.swing.JTextArea inMsgArea)
Set the message area for verbose output

Parameters:
inMsgArea - is the text area to use for output

getValues

public java.lang.String[] getValues(gov.lanl.Utility.InfoList inList,
                                    java.lang.String[] namesToGet)
Get the values for the names from the InfoList.

Parameters:
inList - is the InfoList to use for the lookup
namesToGet - is the list of names to lookup
Returns:
the list of values corresponding to the names

createKeystore

public void createKeystore(gov.lanl.Utility.InfoList inList)
Create a new keystore with one certificate authority

Parameters:
inList - is the InfoList with all of the necessary data

copyUser

public void copyUser(gov.lanl.Utility.InfoList inList)
Copies the user's private key and certificate from the source keystore to the target keystore.

Parameters:
inList - is the InfoList with all of the necessary data

copyTrusted

public void copyTrusted(gov.lanl.Utility.InfoList inList)
Copies all of the trusted certificates in the source keystore to the target keystore

Parameters:
inList - is the InfoList with all of the necessary data

createUser

public void createUser(gov.lanl.Utility.InfoList inList)
Create a new user with one specified certificate authority and create a private keystore.

Parameters:
inList - is the InfoList with all of the necessary data

deleteAlias

public void deleteAlias(gov.lanl.Utility.InfoList inList)
Delete an alias and the associated data from a keystore

Parameters:
inList - is the InfoList with all of the necessary data

addCA

public void addCA(gov.lanl.Utility.InfoList inList)
Add a certificate authority to the keystore, requires issuing certificate authority to be root of the keystore

Parameters:
inList - is the InfoList with all of the necessary data

changeAliasPassword

public void changeAliasPassword(gov.lanl.Utility.InfoList inList)
Change the password for the private key of an alias in the keystore

Parameters:
inList - is the InfoList with all of the necessary data

changeKeystorePassword

public void changeKeystorePassword(gov.lanl.Utility.InfoList inList)
Change the password for a keystore

Parameters:
inList - is the InfoList with all of the necessary data

showKeystore

public void showKeystore(gov.lanl.Utility.InfoList inList)
Displays the entries in the keystore; certificat chain only.

Parameters:
inList - is the InfoList with all of the necessary data

showUser

public void showUser(gov.lanl.Utility.InfoList inList)
Display the user's certificate/chain and private key, if appropriate.

Parameters:
inList - is the InfoList with all of the necessary data

showPKCS

public void showPKCS(gov.lanl.Utility.InfoList inList)
Displays the contents of the PKCS

Parameters:
inList - is the InfoList with all of the necessary data

importPKCS

public void importPKCS(gov.lanl.Utility.InfoList inList)
Imports the contents of the PKCS into a keystore

Parameters:
inList - is the InfoList with all of the necessary data

exportPKCS

public void exportPKCS(gov.lanl.Utility.InfoList inList)
Exports a keystore entry to a PKCS file

Parameters:
inList - is the InfoList with all of the necessary data