|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSOMA.security.infrastructure.ProfileManager
This class is at a more higher level than the Entrust Java Toolkit. It will give the basic functionality for managing one's profile.
Field Summary | |
protected int |
cont
|
static int |
CREATE_PROFILE
|
protected java.lang.String |
extension
|
protected java.lang.String |
pkcs7FileName
|
(package private) Infrastructure |
pki
|
(package private) EntrustProfile |
profile
|
static int |
RECOVER_PROFILE
|
static java.lang.String |
SearchExpression
|
Constructor Summary | |
ProfileManager()
To create the profile as a bean. |
|
ProfileManager(Infrastructure pki)
To create a new profile manager you need an EntrustInfrastructure object. |
Method Summary | |
void |
createProfile(java.lang.String refnum,
java.lang.String authcode,
java.lang.String password,
java.lang.String filename)
This method is used to create a new profile from scratch. |
X509Certificate[] |
decryptAndVerifyData(java.io.InputStream in,
java.io.OutputStream out)
Decrypts and verify data. |
void |
decryptData(java.io.InputStream in,
java.io.OutputStream out)
This method is used for encrypt message |
void |
encryptData(java.io.InputStream in,
java.io.OutputStream out,
X509Certificate certs)
This method is used for encrypt message |
protected java.lang.String |
getCurrentFileName()
|
java.lang.String |
getDistinguishName()
Return the the Distinguish Name |
Infrastructure |
getEntrustInfrastructure()
Gets the pki |
ETKCertificateVerifier |
getETKCertificateVerifier()
|
EntrustProfile |
getProfile()
Return current EntrustProfile value |
void |
logoffProfile()
This method is used for logoff the profile. |
void |
logonProfile(java.lang.String filename,
java.lang.String password)
Logs on an existing profile stored in a file. |
void |
logonProfile(java.lang.String filename,
java.lang.String password,
boolean onLineLogon)
|
void |
recoverProfile(java.lang.String refnum,
java.lang.String authcode,
java.lang.String password,
java.lang.String filename)
This method is used to recover a profile. |
void |
setEntrustInfrastructure(Infrastructure pki)
Sets the pki |
void |
setProfile(EntrustProfile profile)
|
void |
signAndEncryptData(java.io.InputStream in,
java.io.OutputStream out,
X509Certificate[] certs)
|
byte[] |
signedData(byte[] inData)
This method is used for signed message |
void |
signedData(java.io.InputStream inData,
java.io.OutputStream outData)
This method is used for signed message |
java.lang.String |
toString()
|
void |
update(ProfileManager profile)
|
boolean |
verifySignedData(byte[] in,
X509Certificate cert)
|
X509Certificate[] |
verifySignedData(java.io.InputStream in,
java.io.OutputStream out,
X509Certificate cert)
This method is used for verify signed message |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String pkcs7FileName
protected java.lang.String extension
protected int cont
Infrastructure pki
EntrustProfile profile
public static final int RECOVER_PROFILE
public static final int CREATE_PROFILE
public static final java.lang.String SearchExpression
Constructor Detail |
public ProfileManager()
public ProfileManager(Infrastructure pki)
pki
- is the pki the managed profile belongs to.Method Detail |
public void setProfile(EntrustProfile profile)
public void setEntrustInfrastructure(Infrastructure pki)
public Infrastructure getEntrustInfrastructure()
public EntrustProfile getProfile()
public void createProfile(java.lang.String refnum, java.lang.String authcode, java.lang.String password, java.lang.String filename) throws java.io.FileNotFoundException, com.entrust.security.exceptions.EntrustBaseException, ControlPasswordException
refnum
- is the reference number,authcode
- is the authentication code,password
- is the profile password,filename
- the file where the profile is being stored.
java.io.FileNotFoundException
com.entrust.security.exceptions.EntrustBaseException
ControlPasswordException
public void recoverProfile(java.lang.String refnum, java.lang.String authcode, java.lang.String password, java.lang.String filename) throws java.io.FileNotFoundException, com.entrust.security.exceptions.EntrustBaseException, ControlPasswordException
refnum
- is the reference number,authcode
- is the authentication code,password
- is the profile password,filename
- the file where the profile is being stored.
java.io.FileNotFoundException
com.entrust.security.exceptions.EntrustBaseException
ControlPasswordException
public void logonProfile(java.lang.String filename, java.lang.String password) throws java.io.FileNotFoundException, com.entrust.security.exceptions.EntrustBaseException
filename
- the file name,password
- the password.
java.io.FileNotFoundException
com.entrust.security.exceptions.EntrustBaseException
public void logonProfile(java.lang.String filename, java.lang.String password, boolean onLineLogon) throws java.io.FileNotFoundException, com.entrust.security.exceptions.EntrustBaseException
java.io.FileNotFoundException
com.entrust.security.exceptions.EntrustBaseException
public void logoffProfile()
public byte[] signedData(byte[] inData) throws java.security.NoSuchAlgorithmException, iaik.asn1.CodingException, com.entrust.security.exceptions.EntrustBaseException, iaik.pkcs.PKCSException, java.io.IOException
java.security.NoSuchAlgorithmException
iaik.asn1.CodingException
com.entrust.security.exceptions.EntrustBaseException
iaik.pkcs.PKCSException
java.io.IOException
public void signedData(java.io.InputStream inData, java.io.OutputStream outData) throws java.security.NoSuchAlgorithmException, iaik.asn1.CodingException, com.entrust.security.exceptions.EntrustBaseException, iaik.pkcs.PKCSException, java.io.IOException
java.security.NoSuchAlgorithmException
iaik.asn1.CodingException
com.entrust.security.exceptions.EntrustBaseException
iaik.pkcs.PKCSException
java.io.IOException
public boolean verifySignedData(byte[] in, X509Certificate cert) throws java.security.NoSuchAlgorithmException, iaik.asn1.CodingException, com.entrust.security.exceptions.EntrustBaseException, java.security.SignatureException, iaik.pkcs.PKCSException, java.io.IOException
java.security.NoSuchAlgorithmException
iaik.asn1.CodingException
com.entrust.security.exceptions.EntrustBaseException
java.security.SignatureException
iaik.pkcs.PKCSException
java.io.IOException
public X509Certificate[] verifySignedData(java.io.InputStream in, java.io.OutputStream out, X509Certificate cert) throws java.security.NoSuchAlgorithmException, iaik.asn1.CodingException, com.entrust.security.exceptions.EntrustBaseException, java.security.SignatureException, iaik.pkcs.PKCSException, java.io.IOException
java.security.NoSuchAlgorithmException
iaik.asn1.CodingException
com.entrust.security.exceptions.EntrustBaseException
java.security.SignatureException
iaik.pkcs.PKCSException
java.io.IOException
public void encryptData(java.io.InputStream in, java.io.OutputStream out, X509Certificate certs) throws java.security.NoSuchAlgorithmException, iaik.pkcs.PKCSException, java.io.IOException
java.security.NoSuchAlgorithmException
iaik.pkcs.PKCSException
java.io.IOException
public void decryptData(java.io.InputStream in, java.io.OutputStream out) throws java.security.NoSuchAlgorithmException, iaik.pkcs.PKCSException, java.security.InvalidKeyException, iaik.pkcs.PKCSException, java.io.IOException
java.security.NoSuchAlgorithmException
iaik.pkcs.PKCSException
java.security.InvalidKeyException
java.io.IOException
public void signAndEncryptData(java.io.InputStream in, java.io.OutputStream out, X509Certificate[] certs) throws java.security.NoSuchAlgorithmException, iaik.pkcs.PKCSException, java.io.IOException, iaik.asn1.CodingException, com.entrust.security.exceptions.EntrustBaseException
java.security.NoSuchAlgorithmException
iaik.pkcs.PKCSException
java.io.IOException
iaik.asn1.CodingException
com.entrust.security.exceptions.EntrustBaseException
public X509Certificate[] decryptAndVerifyData(java.io.InputStream in, java.io.OutputStream out) throws java.security.NoSuchAlgorithmException, iaik.pkcs.PKCSException, java.io.IOException, java.security.InvalidKeyException
in
- the input stream containing the DER encoded encrypted dataout
- the output stream where to put the encoded data
java.security.NoSuchAlgorithmException
iaik.pkcs.PKCSException
java.io.IOException
java.security.InvalidKeyException
public java.lang.String getDistinguishName() throws InfrastructureException
InfrastructureException
public ETKCertificateVerifier getETKCertificateVerifier() throws InfrastructureException
InfrastructureException
public java.lang.String toString()
public void update(ProfileManager profile)
protected java.lang.String getCurrentFileName()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |