|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tranche.users.MakeUserZipFileTool
public class MakeUserZipFileTool
This is a helper class that makes user files, i.e. X.509 certificates and assocated private keys. The information is saved in a password protected ZIP file.
| Constructor Summary | |
|---|---|
MakeUserZipFileTool()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getName()
Returns the CN value that will be used on the X.509 certificate. |
java.lang.String |
getPassphrase()
Returns the passphrase that was used when AES 256 bit encrypting the file. |
java.io.File |
getSaveFile()
Returns a File object representing the file on the local disk that contains the user information. |
java.security.cert.X509Certificate |
getSignerCertificate()
Gets the signer's certificates. |
java.security.PrivateKey |
getSignerPrivateKey()
Gets the signer's private key. |
long |
getValidDays()
Returns the number of days that the user's X.509 certificate should be considered valid. |
static void |
main(java.lang.String[] args)
|
UserZipFile |
makeCertificate()
Executes the creation of the UserZipFile. |
void |
setName(java.lang.String name)
Sets the CN value that will be used for the X.509 certificate. |
void |
setPassphrase(java.lang.String passphrase)
Sets the passphrase to use for AES 256 bit encryption. |
void |
setSaveFile(java.io.File saveFile)
A method to get the file that the user zip file will be saved to. |
void |
setSignerCertificate(java.security.cert.X509Certificate signerCertificate)
Sets the signer's certificate. |
void |
setSignerPrivateKey(java.security.PrivateKey signerPrivateKey)
Sets the signer's private key. |
void |
setValidDays(java.util.Date startDate,
long validDays)
Sets the number of days that ther user's X.509 certificate should be considered valid. |
void |
setValidDays(long validDays)
Sets the number of days that ther user's X.509 certificate should be considered valid. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MakeUserZipFileTool()
| Method Detail |
|---|
public UserZipFile makeCertificate()
throws java.lang.NullPointerException,
java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException,
java.security.SignatureException,
java.security.InvalidKeyException
Executes the creation of the UserZipFile.
java.lang.NullPointerException
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
java.security.SignatureException
java.security.InvalidKeyExceptionpublic java.lang.String getName()
Returns the CN value that will be used on the X.509 certificate.
public void setName(java.lang.String name)
Sets the CN value that will be used for the X.509 certificate.
name - The CN value to use for the X.509 certificate.public long getValidDays()
Returns the number of days that the user's X.509 certificate should be considered valid.
public void setValidDays(long validDays)
Sets the number of days that ther user's X.509 certificate should be considered valid.
validDays - The number of days that ther user's X.509 certificate should be considered valid.
public void setValidDays(java.util.Date startDate,
long validDays)
Sets the number of days that ther user's X.509 certificate should be considered valid.
startDate - The date the X.509 certificate begins being considered valid.validDays - The number of days that ther user's X.509 certificate should be considered valid.public java.lang.String getPassphrase()
Returns the passphrase that was used when AES 256 bit encrypting the file.
public void setPassphrase(java.lang.String passphrase)
Sets the passphrase to use for AES 256 bit encryption.
passphrase - The passphrase to use for AES 256 bit encryption.public java.io.File getSaveFile()
Returns a File object representing the file on the local disk that contains the user information. This file is normally a ZIP archive that has been AES 256 bit encrypted.
public void setSaveFile(java.io.File saveFile)
A method to get the file that the user zip file will be saved to. This can be any file on the local filesystem.
saveFile - public java.security.cert.X509Certificate getSignerCertificate()
Gets the signer's certificates.
public void setSignerCertificate(java.security.cert.X509Certificate signerCertificate)
Sets the signer's certificate.
signerCertificate - public java.security.PrivateKey getSignerPrivateKey()
Gets the signer's private key.
public void setSignerPrivateKey(java.security.PrivateKey signerPrivateKey)
Sets the signer's private key.
signerPrivateKey -
public static void main(java.lang.String[] args)
throws java.lang.Exception
args -
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||