Class semper.certificate.DummyCertificate
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.certificate.DummyCertificate

java.lang.Object
   |
   +----semper.certificate.DummyCertificate

public class DummyCertificate
extends Object
implements Certificate

Constructor Index

 o DummyCertificate()
Create an empty certificate
 o DummyCertificate(DummyCertificate)
Create a Certificate containing the same info that the parameter-Certificate has
 o DummyCertificate(String, String, long, CryptoKeyInfo, int, int, Date, Date, int, int, byte[], int, int)
Create a certificate.

Method Index

 o changeCASign(String)
Set signature for this certificate, signed by the CA whose Distinguished Name is stored in the Certificate.
 o getCADN()
retrieve CA's name Certificate static structure means I can retrieve it myself.
 o getCAkey(String)
Get the secret key of the CA generated by generateCAkeys() in DummyRCModule.java.
 o getCASign()
retrieve CA's signature Certificate static structure means I can retrieve it myself.
 o getHashID()
Get the Algorithm ID (HASH_MD4, HASH_RIPEMD etc) of the function used by the CA to hash the signatuer of this certificate.
 o getNotValidAfter()
retrieve end of validity time Certificate static structure means I can retrieve it myself.
 o getNotValidBefore()
retrieve start of validity time Certificate static structure means I can retrieve it myself.
 o getPublicKey()
retrieve Public Key Certificate static structure means I can retrieve it myself.
 o getScope()
retrieve certificate scope Certificate static structure means I can retrieve it myself.
 o getSerialNr()
retrieve Serial number Certificate static structure means I can retrieve it myself.
 o getSignatureID()
Get the Algorithm ID (SIG_RSA, SIG_DSS etc) of the function used by the CA to sign this certificate.
 o getStatus()
retrieve status Certificate static structure means I can retrieve it myself.
 o getType()
retrieve certificate type Certificate static structure means I can retrieve it myself.
 o getUserDN()
retrieve users name Certificate static structure means I can retrieve it myself.
 o getWhyRevoked()
retrieve revokation reason Certificate static structure means I can retrieve it myself.
 o myStreamSize()
Finds the expected number of bytes needed to externalize the object to s.
 o readObject(StreamInputInterface)
Reads the object from an io stream (TargetStream).
 o setCADN(String)
Set the CA's name that issued this certificate.
 o setHashID(int)
Set the algorithm ID of the algorithm used to hash this Certificate with.
 o setNotValidAfter(Date)
Set the Date after which this certificate isn't valid.
 o setNotValidBefore(Date)
Set the Date before which this certificate isn't valid.
 o setPublicKey(CryptoKeyInfo)
Set the Public Key certified with this certificate.
 o setScope(int)
Set the scope for this Certificate.
 o setSerialNr(long)
Set this Certificates SerialNr, with which it is identified by the CA that issued this certificate.
 o setSignatureID(int)
Set the algorithm ID of the algorithm used to sign this Certificate with.
 o setStatus(int)
Set the status of the Certificate.
 o setType(int)
Set the type of Certificate.
 o setUserDN(String)
Set certificate owners name.
 o setWhyRevoked(int)
Set reason why this Certificate was revoked.
 o verifyCertificate()
Verify Certificates correctness.
 o writeObject(StreamOutputInterface)
Writes the object to an io stream (TargetStream).

Constructors

 o DummyCertificate
  public DummyCertificate(String ca,
                          String user,
                          long nr,
                          CryptoKeyInfo pubKey,
                          int scope,
                          int type,
                          Date validStart,
                          Date validEnd,
                          int state,
                          int reason,
                          byte signature[],
                          int signatureID,
                          int hashID)
Create a certificate.
Parameters:
ca - = Distinguished name of Certification Authority issuing this certificate
user - = Distinguished name of User to which certificate belongs.
nr - = Serial number for certificate within CA
pubKey - = The public key certified for this User by certificate.
scope - = Public keys scope (or application)
type - = Certificate Type
validStart - = Start of validity period
validEnd - = End of validity period
state - = _status of the certificate
reason - = Reason for revocation
signature - = CA's signature
 o DummyCertificate
  public DummyCertificate()
Create an empty certificate
 o DummyCertificate
  public DummyCertificate(DummyCertificate cert)
Create a Certificate containing the same info that the parameter-Certificate has
Parameters:
Certificate - cert is the certificate which shoiuld be copied.

Methods

 o getCADN
  public String getCADN()
retrieve CA's name Certificate static structure means I can retrieve it myself. If Certificate gets non-static has to call a function in the rc-module instead.
 o getUserDN
  public String getUserDN()
retrieve users name Certificate static structure means I can retrieve it myself. If Certificate gets non-static has to call a function in the rc-module instead.
 o getSerialNr
  public long getSerialNr()
retrieve Serial number Certificate static structure means I can retrieve it myself. If Certificate gets non-static has to call a function in the rc-module instead.
 o getPublicKey
  public CryptoKeyInfo getPublicKey()
retrieve Public Key Certificate static structure means I can retrieve it myself. If Certificate gets non-static has to call a function in the rc-module instead.
 o getScope
  public int getScope()
retrieve certificate scope Certificate static structure means I can retrieve it myself. If Certificate gets non-static has to call a function in the rc-module instead.
 o getType
  public int getType()
retrieve certificate type Certificate static structure means I can retrieve it myself. If Certificate gets non-static has to call a function in the rc-module instead.
 o getNotValidBefore
  public Date getNotValidBefore()
retrieve start of validity time Certificate static structure means I can retrieve it myself. If Certificate gets non-static has to call a function in the rc-module instead.
 o getNotValidAfter
  public Date getNotValidAfter()
retrieve end of validity time Certificate static structure means I can retrieve it myself. If Certificate gets non-static has to call a function in the rc-module instead.
 o getStatus
  public int getStatus()
retrieve status Certificate static structure means I can retrieve it myself. If Certificate gets non-static has to call a function in the rc-module instead.
 o getCASign
  public byte[] getCASign()
retrieve CA's signature Certificate static structure means I can retrieve it myself. If Certificate gets non-static has to call a function in the rc-module instead.
 o getWhyRevoked
  public int getWhyRevoked()
retrieve revokation reason Certificate static structure means I can retrieve it myself. If Certificate gets non-static has to call a function in the rc-module instead.
 o getSignatureID
  public int getSignatureID()
Get the Algorithm ID (SIG_RSA, SIG_DSS etc) of the function used by the CA to sign this certificate.
 o getHashID
  public int getHashID()
Get the Algorithm ID (HASH_MD4, HASH_RIPEMD etc) of the function used by the CA to hash the signatuer of this certificate.
 o setCADN
  public void setCADN(String name)
Set the CA's name that issued this certificate. This name is stored in the certificate.
Parameters:
: - CA's name.
 o setUserDN
  public void setUserDN(String name)
Set certificate owners name. This name is stored in the certificate.
Parameters:
: - users name.
 o setSerialNr
  public void setSerialNr(long serialNr)
Set this Certificates SerialNr, with which it is identified by the CA that issued this certificate. This SerialNr is stored in the certificate.
Parameters:
: - Certificate, new serialNr.
 o setPublicKey
  public void setPublicKey(CryptoKeyInfo newKey)
Set the Public Key certified with this certificate.
Parameters:
: - Certificate, new Key.
 o setScope
  public void setScope(int scope)
Set the scope for this Certificate. This might (for instance by SecuDEs X.509 v2 certificates) be an empty method.
Parameters:
: - Certificate, scope for the certificate.
 o setType
  public void setType(int type)
Set the type of Certificate. This might (for instance by SecuDEs X.509 v2 certificates) be an empty method.
Parameters:
: - Certificate, type of certificate.
 o setNotValidBefore
  public void setNotValidBefore(Date notValidBefore)
Set the Date before which this certificate isn't valid.
Parameters:
: - Certificate, start date of certificates validity period.
 o setNotValidAfter
  public void setNotValidAfter(Date notValidAfter)
Set the Date after which this certificate isn't valid.
Parameters:
: - Certificate, end date of certificates validity period.
 o setStatus
  public void setStatus(int status)
Set the status of the Certificate. If status isn't implemented, (like in SecuDE) might be an empty method. For future implementations of certificate-modules should definitely be implemented, as the current solution is born out of need, not desire.
Parameters:
: - Certificate, status of certificate.
 o changeCASign
  public void changeCASign(String myName) throws CertificateException
Set signature for this certificate, signed by the CA whose Distinguished Name is stored in the Certificate.
Parameters:
: - Certificate, CA's secret key with which to sign.
 o getCAkey
  public CryptoKeyInfo getCAkey(String myName) throws CertificateException
Get the secret key of the CA generated by generateCAkeys() in DummyRCModule.java.
Parameters:
myName - is CA's (my) name.
Returns:
s the generated keys for this CA.
Throws: CertificateException
if the keys couldn't be retrieved.
 o setWhyRevoked
  public void setWhyRevoked(int whyRevoked)
Set reason why this Certificate was revoked. Might change to a string later on.
Parameters:
: - Certificate, reason.
 o setSignatureID
  public void setSignatureID(int signatureID)
Set the algorithm ID of the algorithm used to sign this Certificate with. The types should correspond to the possible types defined in the CryptoConstants class (RSA, DSA etc.)
Parameters:
: - Certificate, signature algorithm ID.
 o setHashID
  public void setHashID(int hashID)
Set the algorithm ID of the algorithm used to hash this Certificate with. The types should correspond to the possible types defined in the CryptoConstants class (MD2C, MD4, RIPE_MD, SHA etc.)
Parameters:
: - Certificate which contains hashing ID.
 o verifyCertificate
  public boolean verifyCertificate() throws CertificateException
Verify Certificates correctness. Should verify, whether Certificates Signature is correct. The Certificate Manager will check whether Certificate is of correct type, not outdated, etc.
Parameters:
: - Certificate cert that is to be checked.
: - TrustedPK is the trusted public key of the CA against which the signature has to be checked.
Returns:
s: true if Certificate is signed correctly false if Signature doesn't match input.
 o writeObject
  public void writeObject(StreamOutputInterface s) throws StreamIOException
Writes the object to an io stream (TargetStream).
Parameters:
s - is the stream the object is written to
Returns:
void
Throws: StreamIOException
if write failed.
See Also:
readObject
 o readObject
  public void readObject(StreamInputInterface s) throws StreamIOException
Reads the object from an io stream (TargetStream).
Parameters:
s - is the stream the object is read from
Returns:
void
Throws: StreamIOException
if read failed.
See Also:
writeObject
 o myStreamSize
  public int myStreamSize() throws StreamIOException
Finds the expected number of bytes needed to externalize the object to s.
Parameters:
s - is the stream the key information is written to
Returns:
number of bytes required
Throws: StreamIOException
if TargetStream threw an ecxeption.
See Also:
writeObject

All Packages  Class Hierarchy  This Package  Previous  Next  Index