All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.certificate.dummy.DummyRCModule

java.lang.Object
   |
   +----semper.certificate.dummy.DummyRCModule

public class DummyRCModule
extends Object
implements RCModuleInterface, ComPointConstants
DummyRCModule is an implementation of the RCModuleInterface providing methods for registration and handling of certificates in the initial SEMPER trials. It implements a registration method much along the lines described in the overview of the certificate block.


Constructor Index

 o DummyRCModule()

Method Index

 o clientCall(ComPointAddress, Vector, Message)
A clientCall can be used to setup a communication point with the CA server.
 o getCertificate(ComPointAddress, Vector, long, Certificate)
After registration I can get certificates from a CA that accepts my registration.
 o getKeyHashAlg()
Retrieves the algorithm for computing hash values of keys to be shown to the user.
 o getTrustedPK(ComPointAddress, Vector)
Method for retrieving the public key of the CA.
 o initRCmodule(boolean, String)
This function initialises the module, by reading the last serial number from archive.
 o retrieveCApkey(String)
Retrieve this CA's public key from storage.
 o sendFilledTemplate(ComPointAddress, Vector, Template, CryptoKeyInfo)
Method for sending a template (or registration form) to the CA.
 o storeCApkey(CryptoKeyInfo, String)
Store the public key of the CA.
 o storeCertificate(Certificate)
Store certificate in Archive.
 o templateRequest(ComPointAddress, Vector)
Method for getting a template (or registration form) from the CA.
 o verifyCertificate(boolean, Certificate, CryptoKeyInfo)
Verify Certificates correctness.

Constructors

 o DummyRCModule
 public DummyRCModule()

Methods

 o initRCmodule
 public void initRCmodule(boolean isCA,
                          String myDN) throws CertificateException
This function initialises the module, by reading the last serial number from archive. If this is the first time the module is used, keys for the module are generated. This module only does something during initialisation if it is a CA.

Parameters:
isCA - indicates if the modules is initialised for a CA.
myDN - is name of the CA/RA
Throws: CertificateException
if stored information could not be retrieved or the CA keys could not be generated (if necessary)
 o getKeyHashAlg
 public HashingAlgorithm getKeyHashAlg()
Retrieves the algorithm for computing hash values of keys to be shown to the user.

 o verifyCertificate
 public boolean verifyCertificate(boolean online,
                                  Certificate cert,
                                  CryptoKeyInfo trustedKey) throws CertificateException
Verify Certificates correctness. Verifies whether the signature is correct. The Certificate Manager will check whether Certificate is of correct type, not outdated, etc.

Parameters:
online - indicate if a CA (known to the module) should be asked. This is not supported by this module.
Certificate - cert that is to be checked.
if - trustedKey is not null the certificate should be verified against this key
Returns:
s true if Certificate is signed correctly false if Signature doesn't match input.
Throws: CertificateException
if verification couldn't be done.
 o retrieveCApkey
 public CryptoKeyInfo retrieveCApkey(String caName) throws CertificateException
Retrieve this CA's public key from storage. This is necessary in both client and CAserver whenever the public key should be used.

Parameters:
caName - is the DN of the CA (if null, caDN is used - this is not defined on client side)
Returns:
s my (the CA's) public key.
Throws: CertificateException
if the keys couldn't be retrieved.
 o storeCApkey
 public void storeCApkey(CryptoKeyInfo pkey,
                         String name) throws CertificateException
Store the public key of the CA. The public key is stored in Archive under a special access name which is unique for the CA and the module.

Parameters:
pkey: - the public key to be stored
name: - name of the CA using this public key.
Throws: CertificateException
if the public key couldn't get stored.
 o getTrustedPK
 public CryptoKeyInfo getTrustedPK(ComPointAddress serverAddr,
                                   Vector options) throws CertificateException
Method for retrieving the public key of the CA.

Parameters:
srvAddr - is the address of the server, where the key will be retrieved.
options - is a placeholder for special options for the communication
Returns:
the retrieved public key (null is returned if the key could not be retrieved)
Throws: CertificateException
in case of errors in the module
See Also:
sendTrustedPK
 o templateRequest
 public Template templateRequest(ComPointAddress srvAddr,
                                 Vector options) throws CertificateException
Method for getting a template (or registration form) from the CA.

Parameters:
srvAddr - is the address of the server, where the key will be retrieved.
options - is a placeholder for special options for the communication
Returns:
the retrieved template (null is returned if a template could not be retrieved)
Throws: CertificateException
in case of errors in the module
 o sendFilledTemplate
 public boolean sendFilledTemplate(ComPointAddress srvAddr,
                                   Vector options,
                                   Template templ,
                                   CryptoKeyInfo secKey) throws CertificateException
Method for sending a template (or registration form) to the CA. If necessary the secret key given as parameter can be used to form a proof that the user knows this key.

Parameters:
srvAddr - is the address of the server, where the key will be retrieved.
options - is a placeholder for special options for the communication
templ - is the filled out template
secKey - is the secret key corresponding to the public key to be registered
Returns:
true if the registration form was received.
Throws: CertificateException
in case of errors in the module
 o getCertificate
 public RegistrationStatus getCertificate(ComPointAddress caAddr,
                                          Vector options,
                                          long serialNo,
                                          Certificate cert) throws CertificateException
After registration I can get certificates from a CA that accepts my registration. This services can be used to get a certificate from a CA (either my own or that another party). If the certificate is not issued a status message is returned.

Parameters:
caAddr - ComPointAddress of the CA-server.
options - my contain additional options for the module
serialNo - of the certificate
certificate - contains the certificate returned from the CA (may be null)
return - a Message object describing the status of the registration
Throws: CertificateException
if an error happened during the communication.
 o clientCall
 public static ComPoint clientCall(ComPointAddress serverAddress,
                                   Vector options,
                                   Message msg) throws CertificateException
A clientCall can be used to setup a communication point with the CA server. This ComPoint is used for communication with the CA. The client sends a message to the server identifying the request.

Parameters:
serverAddress: - Address of server, for which to establish a ComPoint.
options: - options to be passed to communicationmodule in a call to Channel.openInitiator.
transferObject: - The Object to send to the server initially directly after establishing connection (should be an Integer indicating type of message)
Returns:
s the ComPoint established in this initial stage of one communication. Should be closed after usage.
Throws: CertificateException
if an error occurred during the communication.
 o storeCertificate
 public static void storeCertificate(Certificate cert) throws CertificateException
Store certificate in Archive. Can also be used by client.

Parameters:
cert: - Certificate to be stored.
Throws: CertificateManException
if store fails.

All Packages  Class Hierarchy  This Package  Previous  Next  Index