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
-
DummyRegistration()
- Create an empty Registration
-
DummyRegistration(DummyTemplate, String, CryptoKeyInfo)
- Initialise a registration based on a filled out template.
-
DummyRegistration(String, String, String, String, CryptoKeyInfo, String, String, String, String, String, String, String, String, CryptoKeyInfo, long, byte[], String)
- Create a registration.
-
checkSign(CryptoKeyInfo, HashingAlgorithm)
- Check whether this Registration is signed properly.
-
getCityName()
- retrieve name of city user lives in
-
getCommonName()
- retrieve users common name as registrated at CA
-
getCountry()
- retrieve nam of country user lives in
-
getDN()
- Retrieve users distinguished name as registrated at CA
-
getEmailAddr()
- retrieve users email addres
-
getID()
- retrieve users id-number (Passport-no, CPR-nr,etc)
-
getOrganisationName()
- Retrieve users organisation
-
getPhoneNo()
- retrieve users phone no
-
getPostalCode()
- retrieve users postal code
-
getPublicKey()
- retrieve Public Key wanted to be registrated with
-
getRADN()
- retrieve Registration authorities distinguished name
-
getRAPkey()
- retrieve RA's public key
-
getRASignature()
- retrieve RA's signature for this registration
-
getSerialNo()
- retrieve the serial no.
-
getStatus()
- Get the status of the registration.
-
getStreetName()
- retrieve Street name and house number
-
getType()
-
-
getUserName()
- retrieve users name
-
setStatus(boolean)
- Set the status of the registration.
-
setType(String)
-
-
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.
DummyRegistration
public DummyRegistration()
- Create an empty Registration
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
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
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
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
getUserName
public String getUserName()
- retrieve users name
getCommonName
public String getCommonName()
- retrieve users common name as registrated at CA
getDN
public String getDN()
- Retrieve users distinguished name as registrated at CA
getOrganisationName
public String getOrganisationName()
- Retrieve users organisation
getPublicKey
public CryptoKeyInfo getPublicKey()
- retrieve Public Key wanted to be registrated with
getStreetName
public String getStreetName()
- retrieve Street name and house number
getCityName
public String getCityName()
- retrieve name of city user lives in
getPostalCode
public String getPostalCode()
- retrieve users postal code
getCountry
public String getCountry()
- retrieve nam of country user lives in
getPhoneNo
public String getPhoneNo()
- retrieve users phone no
getID
public String getID()
- retrieve users id-number (Passport-no, CPR-nr,etc)
getEmailAddr
public String getEmailAddr()
- retrieve users email addres
getRADN
public String getRADN()
- retrieve Registration authorities distinguished name
getRASignature
public byte[] getRASignature()
- retrieve RA's signature for this registration
getRAPkey
public CryptoKeyInfo getRAPkey()
- retrieve RA's public key
getSerialNo
public long getSerialNo()
- retrieve the serial no. with which this registration is
identified at the RA _raName.
getType
public String getType()
setType
public void setType(String type)
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.
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