DigiStamp.com

dgs.tlkt
Class ESSCertID

java.lang.Object
  extended bydgs.tlkt.ESSCertID

public class ESSCertID
extends java.lang.Object

The data structure used to identify a specific x.509 certificate. Defined in IETF RFC 2634 Enhanced Security Services for S/MIME

 
       ESSCertID ::=  SEQUENCE {
       certHash                 Hash,
       issuerSerial             IssuerSerial OPTIONAL
       }
       Hash ::= OCTET STRING -- SHA1 hash of entire certificate
       IssuerSerial ::= SEQUENCE {
       issuer                   GeneralNames,
       serialNumber             CertificateSerialNumber
       }
  
 


Constructor Summary
ESSCertID(byte[] certHash, byte[] issuerNameEncoded, java.math.BigInteger serialNumber)
           
ESSCertID(java.security.cert.X509Certificate aCert)
          Given a certificate return its essCertID identifier.
 
Method Summary
static java.lang.String calcAnID(byte[] certHash)
          A convenience method to create an identifier that corresponds to the method
static java.lang.String calcAnID(java.security.cert.X509Certificate aCert)
          A convenience method to create an identifier that corresponds to the method
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 java.lang.String getAsID()
          Compress this structure into an arbritrary ID.
 byte[] getCertHash()
          Return the ESSCertID.certHash
 byte[] getIssuerNameEncoded()
          Return the DER encoded value of the issuer name in field: ESSCertID.issuerSerial.issuer
 java.math.BigInteger getSerialNumber()
          Return the ESSCertID.issuerSerial.serialNumber
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ESSCertID

public ESSCertID(byte[] certHash,
                 byte[] issuerNameEncoded,
                 java.math.BigInteger serialNumber)
          throws ExceptionDgsInvalidState
Parameters:
certHash - - SHA1 hash of encoded certificate
issuerNameEncoded - - issuer name encoded
serialNumber -
Throws:
ExceptionDgsInvalidState

ESSCertID

public ESSCertID(java.security.cert.X509Certificate aCert)
          throws java.io.IOException,
                 java.security.cert.CertificateEncodingException
Given a certificate return its essCertID identifier.

Method Detail

calcAnID

public static java.lang.String calcAnID(byte[] certHash)
A convenience method to create an identifier that corresponds to the method

Parameters:
certHash - - hash value of the x.509 certificate
See Also:
getAsID()

calcAnID

public static java.lang.String calcAnID(java.security.cert.X509Certificate aCert)
A convenience method to create an identifier that corresponds to the method

See Also:
getAsID()

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

getAsID

public java.lang.String getAsID()
Compress this structure into an arbritrary ID. This uses a method of encoding the essCertid and then expressing in base 64. We found that for developers that this was a convenient method to compare and find specific certificates. Convenient in the sense that we found string comparison operators useful for collections.


getCertHash

public byte[] getCertHash()
Return the ESSCertID.certHash


getIssuerNameEncoded

public byte[] getIssuerNameEncoded()
Return the DER encoded value of the issuer name in field: ESSCertID.issuerSerial.issuer


getSerialNumber

public java.math.BigInteger getSerialNumber()
Return the ESSCertID.issuerSerial.serialNumber


Copyright 2000-2008 DigiStamp, Inc.