com.ibm.security12.sun.security.x509
Class X509CRLEntryImpl

java.lang.Object
  |
  +--com.ibm.security12.java.security.cert.X509CRLEntry
        |
        +--com.ibm.security12.sun.security.x509.X509CRLEntryImpl

public class X509CRLEntryImpl
extends X509CRLEntry

Abstract class for a revoked certificate in a CRL. This class is for each entry in the revokedCertificates, so it deals with the inner SEQUENCE. The ASN.1 definition for this is:

 revokedCertificates    SEQUENCE OF SEQUENCE  {
     userCertificate    CertificateSerialNumber,
     revocationDate     ChoiceOfTime,
     crlEntryExtensions Extensions OPTIONAL
                        -- if present, must be v2
 }  OPTIONAL

 CertificateSerialNumber  ::=  INTEGER

 Extensions  ::=  SEQUENCE SIZE (1..MAX) OF Extension

 Extension  ::=  SEQUENCE  {
     extnId        OBJECT IDENTIFIER,
     critical      BOOLEAN DEFAULT FALSE,
     extnValue     OCTET STRING
                   -- contains a DER encoding of a value
                   -- of the type registered for use with
                   -- the extnId object identifier value
 }
 

Version:
1.13 98/05/14
Author:
Hemma Prafullchandra

Constructor Summary
X509CRLEntryImpl(java.math.BigInteger num, Date date)
          Constructs a revoked certificate entry using the given serial number and revocation date.
X509CRLEntryImpl(java.math.BigInteger num, Date date, CRLExtensions crlEntryExts)
          Constructs a revoked certificate entry using the given serial number, revocation date and the entry extensions.
X509CRLEntryImpl(byte[] revokedCert)
          Unmarshals a revoked certificate from its encoded form.
X509CRLEntryImpl(DerValue derValue)
          Unmarshals a revoked certificate from its encoded form.
 
Method Summary
 void encode(DerOutputStream outStrm)
          Encodes the revoked certificate to an output stream.
 Set getCriticalExtensionOIDs()
          Gets a Set of the extension(s) marked CRITICAL in this X509CRLEntry.
 byte[] getEncoded()
          Returns the ASN.1 DER-encoded form of this CRL Entry, which corresponds to the inner SEQUENCE.
 byte[] getExtensionValue(String oid)
          Gets the DER encoded OCTET string for the extension value (extnValue) identified by the passed in oid String.
 Set getNonCriticalExtensionOIDs()
          Gets a Set of the extension(s) marked NON-CRITICAL in this X509CRLEntry.
 Date getRevocationDate()
          Gets the revocation date from this X509CRLEntry, the revocationDate.
 java.math.BigInteger getSerialNumber()
          Gets the serial number from this X509CRLEntry, i.e.
 boolean hasExtensions()
          Returns true if this revoked certificate entry has extensions, otherwise false.
 boolean hasUnsupportedCriticalExtension()
          Return true if a critical extension is found that is not supported, otherwise return false.
 String toString()
          Returns a printable string of this revoked certificate.
 
Methods inherited from class com.ibm.security12.java.security.cert.X509CRLEntry
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

X509CRLEntryImpl

public X509CRLEntryImpl(java.math.BigInteger num,
                        Date date)
Constructs a revoked certificate entry using the given serial number and revocation date.
Parameters:
num - the serial number of the revoked certificate.
date - the Date on which revocation took place.

X509CRLEntryImpl

public X509CRLEntryImpl(java.math.BigInteger num,
                        Date date,
                        CRLExtensions crlEntryExts)
Constructs a revoked certificate entry using the given serial number, revocation date and the entry extensions.
Parameters:
num - the serial number of the revoked certificate.
date - the Date on which revocation took place.
crlEntryExts - the extensions for this entry.

X509CRLEntryImpl

public X509CRLEntryImpl(byte[] revokedCert)
                 throws CRLException
Unmarshals a revoked certificate from its encoded form.
Parameters:
revokedCert - the encoded bytes.
Throws:
CRLException - on parsing errors.

X509CRLEntryImpl

public X509CRLEntryImpl(DerValue derValue)
                 throws CRLException
Unmarshals a revoked certificate from its encoded form.
Parameters:
derVal - the DER value containing the revoked certificate.
Throws:
CRLException - on parsing errors.
Method Detail

hasExtensions

public boolean hasExtensions()
Returns true if this revoked certificate entry has extensions, otherwise false.
Returns:
true if this CRL entry has extensions, otherwise false.
Overrides:
hasExtensions in class X509CRLEntry

encode

public void encode(DerOutputStream outStrm)
            throws CRLException
Encodes the revoked certificate to an output stream.
Parameters:
outStrm - an output stream to which the encoded revoked certificate is written.
Throws:
CRLException - on encoding errors.

getEncoded

public byte[] getEncoded()
                  throws CRLException
Returns the ASN.1 DER-encoded form of this CRL Entry, which corresponds to the inner SEQUENCE.
Throws:
CRLException - if an encoding error occurs.
Overrides:
getEncoded in class X509CRLEntry

getSerialNumber

public java.math.BigInteger getSerialNumber()
Gets the serial number from this X509CRLEntry, i.e. the userCertificate.
Returns:
the serial number.
Overrides:
getSerialNumber in class X509CRLEntry

getRevocationDate

public Date getRevocationDate()
Gets the revocation date from this X509CRLEntry, the revocationDate.
Returns:
the revocation date.
Overrides:
getRevocationDate in class X509CRLEntry

toString

public String toString()
Returns a printable string of this revoked certificate.
Returns:
value of this revoked certificate in a printable form.
Overrides:
toString in class X509CRLEntry

hasUnsupportedCriticalExtension

public boolean hasUnsupportedCriticalExtension()
Return true if a critical extension is found that is not supported, otherwise return false.

getCriticalExtensionOIDs

public Set getCriticalExtensionOIDs()
Gets a Set of the extension(s) marked CRITICAL in this X509CRLEntry. In the returned set, each extension is represented by its OID string.
Returns:
a set of the extension oid strings in the Object that are marked critical.

getNonCriticalExtensionOIDs

public Set getNonCriticalExtensionOIDs()
Gets a Set of the extension(s) marked NON-CRITICAL in this X509CRLEntry. In the returned set, each extension is represented by its OID string.
Returns:
a set of the extension oid strings in the Object that are marked critical.

getExtensionValue

public byte[] getExtensionValue(String oid)
Gets the DER encoded OCTET string for the extension value (extnValue) identified by the passed in oid String. The oid string is represented by a set of positive whole number separated by ".", that means,
<positive whole number>.<positive whole number>.<positive whole number>.<...>
Parameters:
oid - the Object Identifier value for the extension.
Returns:
the DER encoded octet string of the extension value.