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.


Constructor Index

 o CertificateContext()
Empty constructor - Serializable.
 o CertificateContext(boolean, boolean)
Create a CertificateContext object.

Method Index

 o clone()
Making clone public
 o getEncCert()
Get the certificate to be used for encryption.
 o getEncryptionKeyPair()
Method for getting the key pair for encryption.
 o getName()
Retrieves the name in defined by the certificates in this context.
 o getSignatureKeyPair()
Method for getting the key pair for signing.
 o getSignCert()
Get the certificate to be used for signatures.
 o getStatus()
Indicates the kind of certificates contained in the CertificateContext
 o needEncryption()
Indicates if an encryption key is needed.
 o needSigning()
Indicates if a signature key is needed.
 o setEncCert(Certificate)
Set the certificate to be used for encryption.
 o setSignCert(Certificate)
Set the certificate to be used for signatures.
 o setStatus(ContextStatus)
Defines the kind of certificates contained in the CertificateContext
 o updateCertificates(Certificate, Certificate)
Updates certificates in context.

Constructors

 o CertificateContext
 public CertificateContext()
Empty constructor - Serializable.

 o 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

Methods

 o setStatus
 public void setStatus(ContextStatus status)
Defines the kind of certificates contained in the CertificateContext

Parameters:
Constant - defining the kind of certificates
 o getStatus
 public ContextStatus getStatus()
Indicates the kind of certificates contained in the CertificateContext

Returns:
Constant defining the kind of certificates
 o needSigning
 public boolean needSigning()
Indicates if a signature key is needed.

Returns:
true if this context specifies that signing is necessary
 o needEncryption
 public boolean needEncryption()
Indicates if an encryption key is needed.

Returns:
true if this context specifies that encryption is necessary
 o 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
 o 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
 o getSignCert
 public Certificate getSignCert()
Get the certificate to be used for signatures.

Returns:
the certificate to be used for signing
 o getEncCert
 public Certificate getEncCert()
Get the certificate to be used for encryption.

Returns:
the certificate to be used for encryption.
 o 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
 o 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
 o clone
 public synchronized Object clone()
Making clone public

Returns:
a clone of myself
Overrides:
clone in class Object
 o 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
 o 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