All Packages Class Hierarchy This Package Previous Next Index
Class semper.certificate.CertificateContext
java.lang.Object
|
+----semper.certificate.CertificateContext
- public class CertificateContext
- extends Object
- implements Serializable, Cloneable
This class contains the information needed to describe the context for the CertificateManager
of one party in a session.
It contains a PloicyId, and either describes which certificates are needed or the
selected certificates.
-
CertificateContext()
- Empty constructor - Serializable.
-
CertificateContext(boolean, boolean)
- Create a CertificateContext object.
-
clone()
- Making clone public
-
getEncCert()
- Get the certificate to be used for encryption.
-
getEncryptionKeyPair()
- Method for getting the key pair for encryption.
-
getName()
- Retrieves the name in defined by the certificates in this context.
-
getSignatureKeyPair()
- Method for getting the key pair for signing.
-
getSignCert()
- Get the certificate to be used for signatures.
-
getStatus()
- Indicates the kind of certificates contained in the CertificateContext
-
needEncryption()
- Indicates if an encryption key is needed.
-
needSigning()
- Indicates if a signature key is needed.
-
setEncCert(Certificate)
- Set the certificate to be used for encryption.
-
setSignCert(Certificate)
- Set the certificate to be used for signatures.
-
setStatus(ContextStatus)
- Defines the kind of certificates contained in the CertificateContext
-
updateCertificates(Certificate, Certificate)
- Updates certificates in context.
CertificateContext
public CertificateContext()
- Empty constructor - Serializable.
CertificateContext
public CertificateContext(boolean needSign,
boolean needEnc)
- Create a CertificateContext object. To be deprecated.
- Parameters:
- ba - is the name of the BA.
- needSign - must be true if certificate on signature key is needed
- needEnc - must be true if certificate on encryption key is needed
setStatus
public void setStatus(ContextStatus status)
- Defines the kind of certificates contained in the CertificateContext
- Parameters:
- Constant - defining the kind of certificates
getStatus
public ContextStatus getStatus()
- Indicates the kind of certificates contained in the CertificateContext
- Returns:
- Constant defining the kind of certificates
needSigning
public boolean needSigning()
- Indicates if a signature key is needed.
- Returns:
- true if this context specifies that signing is necessary
needEncryption
public boolean needEncryption()
- Indicates if an encryption key is needed.
- Returns:
- true if this context specifies that encryption is necessary
setEncCert
public void setEncCert(Certificate cert) throws CertificateManException
- Set the certificate to be used for encryption. Fails if the certificate does not certify a key
to be used for encryption.
- Parameters:
- cert - is the certificate to be used for encryption
setSignCert
public void setSignCert(Certificate cert) throws CertificateManException
- Set the certificate to be used for signatures. Fails if the certificate does not certify a key
to be used for signing.
- Parameters:
- cert - is the certificate to be used for signature
getSignCert
public Certificate getSignCert()
- Get the certificate to be used for signatures.
- Returns:
- the certificate to be used for signing
getEncCert
public Certificate getEncCert()
- Get the certificate to be used for encryption.
- Returns:
- the certificate to be used for encryption.
updateCertificates
public void updateCertificates(Certificate signCert,
Certificate encCert) throws CertificateManException
- Updates certificates in context.
- Parameters:
- signCert - is a certificate for signing;
- encCert - is a certificate for encryption
getName
public String getName() throws CertificateManException
- Retrieves the name in defined by the certificates in this context. If the two certificates
give different names an exception is thrown.
- Parameters:
- signCert - is a certificate for signing;
- encCert - is a certificate for encryption
- Throws: CertificateManException
- if the a required certificate is null or the certificates don't ahve proepr scope
clone
public synchronized Object clone()
- Making clone public
- Returns:
- a clone of myself
- Overrides:
- clone in class Object
getSignatureKeyPair
public CryptoKeyPair getSignatureKeyPair() throws CertificateManException
- Method for getting the key pair for signing.
- Returns:
- a the key pair used for signing
- Throws: CryptoManException
- if the certificates contains no pointers to a key
getEncryptionKeyPair
public CryptoKeyPair getEncryptionKeyPair() throws CertificateManException
- Method for getting the key pair for encryption.
- Returns:
- a the key pair used for signing
- Throws: CryptoManException
- if the certificates contains no pointers to a key
All Packages Class Hierarchy This Package Previous Next Index