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() CertificateContext()
-   Empty constructor - Serializable.
  
-   CertificateContext(boolean, boolean) CertificateContext(boolean, boolean)
-   Create a CertificateContext object.
   
  -   clone() clone()
-   Making clone public
 
  
-   getEncCert() getEncCert()
-   Get the certificate to be used for encryption.
  
-   getEncryptionKeyPair() getEncryptionKeyPair()
-   Method for getting the key pair for encryption.
  
-   getName() getName()
-   Retrieves the name in defined by the certificates in this context.
  
-   getSignatureKeyPair() getSignatureKeyPair()
-   Method for getting the key pair for signing.
  
-   getSignCert() getSignCert()
-   Get the certificate to be used for signatures.
  
-   getStatus() getStatus()
-   Indicates the kind of certificates contained in the CertificateContext
 
  
-   needEncryption() needEncryption()
-   Indicates if an encryption key is needed.
  
-   needSigning() needSigning()
-   Indicates if a signature key is needed.
  
-   setEncCert(Certificate) setEncCert(Certificate)
-   Set the certificate to be used for encryption.
  
-   setSignCert(Certificate) setSignCert(Certificate)
-   Set the certificate to be used for signatures.
  
-   setStatus(ContextStatus) setStatus(ContextStatus)
-   Defines the kind of certificates contained in the CertificateContext
 
  
-   updateCertificates(Certificate, Certificate) updateCertificates(Certificate, Certificate)
-   Updates certificates in context.
   
 CertificateContext
CertificateContext
 public CertificateContext()
  -  Empty constructor - Serializable.
 
 CertificateContext
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
setStatus
 public void setStatus(ContextStatus status)
  -  Defines the kind of certificates contained in the CertificateContext
   
- 
    -  Parameters:
    
-  Constant - defining the kind of certificates
  
 
 getStatus
getStatus
 public ContextStatus getStatus()
  -  Indicates the kind of certificates contained in the CertificateContext
   
- 
    -  Returns:
    
-  Constant defining the kind of certificates
  
 
 needSigning
needSigning
 public boolean needSigning()
  -  Indicates if a signature key is needed.
   
- 
    -  Returns:
    
-  true if this context specifies that signing is necessary
  
 
 needEncryption
needEncryption
 public boolean needEncryption()
  -  Indicates if an encryption key is needed.
   
- 
    -  Returns:
    
-  true if this context specifies that encryption is necessary
  
 
 setEncCert
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
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
getSignCert
 public Certificate getSignCert()
  -  Get the certificate to be used for signatures.
   
- 
    -  Returns:
    
-  the certificate to be used for signing
  
 
 getEncCert
getEncCert
 public Certificate getEncCert()
  -  Get the certificate to be used for encryption.
   
- 
    -  Returns:
    
-  the certificate to be used for encryption.
  
 
 updateCertificates
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
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
clone
 public synchronized Object clone()
  -  Making clone public
   
- 
    -  Returns:
    
-  a clone of myself
    
-  Overrides:
    
-  clone in class Object
  
 
 getSignatureKeyPair
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
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