All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.certificate.dummy.DummyRegistration

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

public class DummyRegistration
extends Object
implements Registration
This class implements registrations as needed by DúmmyRCModule and according to the interface defined by Registration. A registration is made based on information received in a filled out template. See also the overview for information about the registrationi process.

See Also:
Registration, DummyTemplate, DummyCertificate, DummyRCModule

Constructor Index

 o DummyRegistration()
Create an empty Registration
 o DummyRegistration(DummyTemplate, String, CryptoKeyInfo)
Initialise a registration based on a filled out template.
 o DummyRegistration(String, String, String, String, CryptoKeyInfo, String, String, String, String, String, String, String, String, CryptoKeyInfo, long, byte[], String)
Create a registration.

Method Index

 o checkSign(CryptoKeyInfo, HashingAlgorithm)
Check whether this Registration is signed properly.
 o getCityName()
retrieve name of city user lives in
 o getCommonName()
retrieve users common name as registrated at CA
 o getCountry()
retrieve nam of country user lives in
 o getDN()
Retrieve users distinguished name as registrated at CA
 o getEmailAddr()
retrieve users email addres
 o getID()
retrieve users id-number (Passport-no, CPR-nr,etc)
 o getOrganisationName()
Retrieve users organisation
 o getPhoneNo()
retrieve users phone no
 o getPostalCode()
retrieve users postal code
 o getPublicKey()
retrieve Public Key wanted to be registrated with
 o getRADN()
retrieve Registration authorities distinguished name
 o getRAPkey()
retrieve RA's public key
 o getRASignature()
retrieve RA's signature for this registration
 o getSerialNo()
retrieve the serial no.
 o getStatus()
Get the status of the registration.
 o getStreetName()
retrieve Street name and house number
 o getType()
 o getUserName()
retrieve users name
 o setStatus(boolean)
Set the status of the registration.
 o setType(String)
 o sign(CryptoKeyInfo, HashingAlgorithm)
Sign this Registration with skey, which is RA's secret key used as a counterpart to the RA's public key as stored in the registration.

Constructors

 o DummyRegistration
 public DummyRegistration()
Create an empty Registration

 o DummyRegistration
 public DummyRegistration(String name,
                          String common,
                          String DN,
                          String organisation,
                          CryptoKeyInfo pubKey,
                          String street,
                          String city,
                          String pk,
                          String country,
                          String email,
                          String phone,
                          String idCard,
                          String raName,
                          CryptoKeyInfo raPKey,
                          long serialNo,
                          byte raSignature[],
                          String type)
Create a registration.

Parameters:
name - = Name of the user who wants to registration.
common - = User's common name (Family name).
DN - = Distinguished Name of the user in relation to CA.
pubKey - = User's public key which should be registered.
street - = Street user lives in (together with street no)
city - = City user lives in.
pk - = Users Postal Code.
country - = country user lives in.
email - = users email-address
phone - = Users phone number
idCard - = Number of ID card (passport, CPRnr or something equivalent)
raName - = RA's name.
raPkey - = RA's public key.
serialNo - = Serial number of current registration.
raSignature - = RA's digital signature.
type - type of registration
 o DummyRegistration
 public DummyRegistration(DummyTemplate dTempl,
                          String userDN,
                          CryptoKeyInfo caPK)
Initialise a registration based on a filled out template.

Parameters:
dTempl - = is the template based on which the registration is issued.
userDN - = is the distinguished name of the user
caPK - = is the public key of the CA

Methods

 o setStatus
 public void setStatus(boolean status)
Set the status of the registration. IF the status is set to true a certificate can be issued.

Parameters:
status - is the new status of the registration
 o getStatus
 public boolean getStatus()
Get the status of the registration. IF the status is set to true a certificate can be issued.

Returns:
the status of the registration
 o getUserName
 public String getUserName()
retrieve users name

 o getCommonName
 public String getCommonName()
retrieve users common name as registrated at CA

 o getDN
 public String getDN()
Retrieve users distinguished name as registrated at CA

 o getOrganisationName
 public String getOrganisationName()
Retrieve users organisation

 o getPublicKey
 public CryptoKeyInfo getPublicKey()
retrieve Public Key wanted to be registrated with

 o getStreetName
 public String getStreetName()
retrieve Street name and house number

 o getCityName
 public String getCityName()
retrieve name of city user lives in

 o getPostalCode
 public String getPostalCode()
retrieve users postal code

 o getCountry
 public String getCountry()
retrieve nam of country user lives in

 o getPhoneNo
 public String getPhoneNo()
retrieve users phone no

 o getID
 public String getID()
retrieve users id-number (Passport-no, CPR-nr,etc)

 o getEmailAddr
 public String getEmailAddr()
retrieve users email addres

 o getRADN
 public String getRADN()
retrieve Registration authorities distinguished name

 o getRASignature
 public byte[] getRASignature()
retrieve RA's signature for this registration

 o getRAPkey
 public CryptoKeyInfo getRAPkey()
retrieve RA's public key

 o getSerialNo
 public long getSerialNo()
retrieve the serial no. with which this registration is identified at the RA _raName.

 o getType
 public String getType()
 o setType
 public void setType(String type)
 o sign
 public void sign(CryptoKeyInfo skey,
                  HashingAlgorithm hashAlg) throws CertificateManException
Sign this Registration with skey, which is RA's secret key used as a counterpart to the RA's public key as stored in the registration.

Parameters:
skey: - RA's secret key
hashAlg: - the ID of the Algorithm used for hashing.
Throws: CertificateManException
if signature couldn't be generated by CryptoMan.
 o checkSign
 public boolean checkSign(CryptoKeyInfo pkey,
                          HashingAlgorithm hashAlg) throws CertificateManException
Check whether this Registration is signed properly.

Parameters:
pkey: - if pkey!=null, it is used instead of the public key stored in the registration. Otherwise this.getPublicKey() is used to check the registration.
hashAlg: - the ID of the Algorithm used for hashing.
Returns:
s boolean telling whether signature is ok or not.
Throws: CertificateManException
if check couldn't be done.

All Packages  Class Hierarchy  This Package  Previous  Next  Index