All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class netscape.security.x509.RevokedCertImpl

netscape.security.x509.RevokedCertImpl

public class RevokedCertImpl

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
 }
 


Constructor Index

 o RevokedCertImpl()
Default constructor.
 o RevokedCertImpl(BigInteger, Date)
Constructs a revoked certificate entry using the serial number and revocation date.
 o RevokedCertImpl(BigInteger, Date, CRLExtensions)
Constructs a revoked certificate entry using the serial number, revocation date and the entry extensions.
 o RevokedCertImpl(byte[])
Unmarshals a revoked certificate from its encoded form.
 o RevokedCertImpl(DerValue)
Unmarshals a revoked certificate from its encoded form.

Method Index

 o decode(InputStream)
Decode a revoked certificate from an input stream.
 o encode(DerOutputStream)
Encodes the revoked certificate to an output stream.
 o getCriticalExtensionOIDs()
Gets a Set of the extension(s) marked CRITICAL in the RevokedCertificate by OID strings.
 o getExtensions()
Returns extensions for this impl.
 o getExtensionValue(String)
Gets the DER encoded OCTET string for the extension value (extnValue) identified by the passed in oid String.
 o getNonCriticalExtensionOIDs()
Gets a Set of the extension(s) marked NON-CRITICAL in the RevokedCertificate by OID strings.
 o getRevocationDate()
Gets the revocation date for this RevokedCertificate, the revocationDate.
 o getSerialNumber()
Gets the serial number for this RevokedCertificate, the userCertificate.
 o hasExtensions()
Returns true if this revoked certificate entry has extensions, otherwise false.
 o setExtensions(CRLExtensions)
Sets extensions for this impl.
 o toString()
Returns a printable string of this revoked certificate.

Constructors

 o RevokedCertImpl
 public RevokedCertImpl()
Default constructor.

 o RevokedCertImpl
 public RevokedCertImpl(BigInteger num,
                        Date date)
Constructs a revoked certificate entry using the serial number and revocation date.

Parameters:
num - the serial number of the revoked certificate.
date - the Date on which revocation took place.
 o RevokedCertImpl
 public RevokedCertImpl(BigInteger num,
                        Date date,
                        CRLExtensions crlEntryExts)
Constructs a revoked certificate entry using the 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.
 o RevokedCertImpl
 public RevokedCertImpl(byte revokedCert[]) throws CRLException, X509ExtensionException
Unmarshals a revoked certificate from its encoded form.

Parameters:
revokedCert - the encoded bytes.
Throws: CRLException
on parsing errors.
Throws: X509ExtensionException
on extension handling errors.
 o RevokedCertImpl
 public RevokedCertImpl(DerValue derValue) throws CRLException, X509ExtensionException
Unmarshals a revoked certificate from its encoded form.

Parameters:
derVal - the DER value containing the revoked certificate.
Throws: CRLException
on parsing errors.
Throws: X509ExtensionException
on extension handling errors.

Methods

 o setExtensions
 public void setExtensions(CRLExtensions crlEntryExts)
Sets extensions for this impl.

Parameters:
extn - CRLExtensions
 o 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.
 o decode
 public void decode(InputStream inStrm) throws CRLException, X509ExtensionException
Decode a revoked certificate from an input stream.

Parameters:
inStrm - an input stream holding at least one revoked certificate
Throws: CRLException
on parsing errors.
Throws: X509ExtensionException
on extension handling errors.
 o encode
 public void encode(DerOutputStream outStrm) throws CRLException, X509ExtensionException
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.
Throws: X509ExtensionException
on extension handling errors.
 o getSerialNumber
 public BigInteger getSerialNumber()
Gets the serial number for this RevokedCertificate, the userCertificate.

Returns:
the serial number.
 o getRevocationDate
 public Date getRevocationDate()
Gets the revocation date for this RevokedCertificate, the revocationDate.

Returns:
the revocation date.
 o getExtensions
 public CRLExtensions getExtensions()
Returns extensions for this impl.

Parameters:
extn - CRLExtensions
 o toString
 public String toString()
Returns a printable string of this revoked certificate.

Returns:
value of this revoked certificate in a printable form.
 o getCriticalExtensionOIDs
 public Set getCriticalExtensionOIDs()
Gets a Set of the extension(s) marked CRITICAL in the RevokedCertificate by OID strings.

Returns:
a set of the extension oid strings in the Object that are marked critical.
 o getNonCriticalExtensionOIDs
 public Set getNonCriticalExtensionOIDs()
Gets a Set of the extension(s) marked NON-CRITICAL in the RevokedCertificate by OID strings.

Returns:
a set of the extension oid strings in the Object that are marked critical.
 o 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.

All Packages  Class Hierarchy  This Package  Previous  Next  Index