anon.crypto
Class RevokedCertificate

java.lang.Object
  extended by anon.crypto.RevokedCertificate

public class RevokedCertificate
extends java.lang.Object

This Class implements a CRLEntry specified by RFC 5280

 revokedCertificates     SEQUENCE OF SEQUENCE  {
     userCertificate         CertificateSerialNumber,
     revocationDate          Time,
     crlEntryExtensions      Extensions OPTIONAL
                             -- if present, version MUST be v2
 }  OPTIONAL
 

Author:
Robert Hirschberger
See Also:
http://tools.ietf.org/html/rfc5280

Field Summary
static java.lang.Class[] CRL_ENTRY_EXTENSIONS
          allowed CRL Entry Extension
private  X509Extensions m_extensions
           
private  java.util.Date m_revocationDate
           
private  java.math.BigInteger m_serial
           
private static java.math.BigInteger ONE
           
private static java.math.BigInteger ZERO
           
 
Constructor Summary
  RevokedCertificate(JAPCertificate a_cert, java.util.Date a_revocationDate, X509Extensions a_extensions)
           
protected RevokedCertificate(org.bouncycastle.asn1.x509.TBSCertList.CRLEntry a_crlEntry)
           
 
Method Summary
private static java.math.BigInteger createPseudoSerial(byte[] a_rawCert)
          Creates a pseudo-serial for a cert from the SHA1-value of its raw data.
 X509DistinguishedName getCertificateIssuer()
          Checks if this RevokedCertificate contains a X509CertificateIssuer CRLEntry-Extension.
 X509Extensions getExtensions()
           
 java.util.Date getRevocationDate()
           
 java.math.BigInteger getSerialNumber()
           
protected static java.math.BigInteger getUniqueSerial(JAPCertificate a_cert)
          If the cert's serial is greater than 1 then the serial is returned, otherwise a pseudo-serial is created to uniquely identify the cert.
protected  org.bouncycastle.asn1.ASN1Sequence toASN1Sequence()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CRL_ENTRY_EXTENSIONS

public static final java.lang.Class[] CRL_ENTRY_EXTENSIONS
allowed CRL Entry Extension


ZERO

private static java.math.BigInteger ZERO

ONE

private static java.math.BigInteger ONE

m_serial

private java.math.BigInteger m_serial

m_revocationDate

private java.util.Date m_revocationDate

m_extensions

private X509Extensions m_extensions
Constructor Detail

RevokedCertificate

public RevokedCertificate(JAPCertificate a_cert,
                          java.util.Date a_revocationDate,
                          X509Extensions a_extensions)

RevokedCertificate

protected RevokedCertificate(org.bouncycastle.asn1.x509.TBSCertList.CRLEntry a_crlEntry)
Method Detail

getUniqueSerial

protected static java.math.BigInteger getUniqueSerial(JAPCertificate a_cert)
If the cert's serial is greater than 1 then the serial is returned, otherwise a pseudo-serial is created to uniquely identify the cert.

Parameters:
a_cert - the cert to get the unique serial
Returns:
the serial of the cert of a pseudo-serial

createPseudoSerial

private static java.math.BigInteger createPseudoSerial(byte[] a_rawCert)
Creates a pseudo-serial for a cert from the SHA1-value of its raw data.

Parameters:
a_rawCert -
Returns:
a pseudo-serial

toASN1Sequence

protected org.bouncycastle.asn1.ASN1Sequence toASN1Sequence()

getSerialNumber

public java.math.BigInteger getSerialNumber()

getCertificateIssuer

public X509DistinguishedName getCertificateIssuer()
Checks if this RevokedCertificate contains a X509CertificateIssuer CRLEntry-Extension. If so the contained distinguished name is returned, null otherwise

Returns:
the certificate's issuer or null if the cert's issuer is the same as the crl's issuer

getRevocationDate

public java.util.Date getRevocationDate()

getExtensions

public X509Extensions getExtensions()