public class RevokedCertImpl extends RevokedCertificate implements java.io.Serializable
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 and Description |
|---|
RevokedCertImpl()
Default constructor.
|
RevokedCertImpl(java.math.BigInteger num,
java.util.Date date)
Constructs a revoked certificate entry using the serial number and
revocation date.
|
RevokedCertImpl(java.math.BigInteger num,
java.util.Date date,
CRLExtensions crlEntryExts)
Constructs a revoked certificate entry using the serial number,
revocation date and the entry extensions.
|
RevokedCertImpl(byte[] revokedCert)
Unmarshals a revoked certificate from its encoded form.
|
RevokedCertImpl(DerValue derValue)
Unmarshals a revoked certificate from its encoded form.
|
| Modifier and Type | Method and Description |
|---|---|
void |
decode(java.io.InputStream inStrm)
Decode a revoked certificate from an input stream.
|
void |
encode(DerOutputStream outStrm)
Encodes the revoked certificate to an output stream.
|
java.util.Set<java.lang.String> |
getCriticalExtensionOIDs()
Gets a Set of the extension(s) marked CRITICAL in the
RevokedCertificate by OID strings.
|
byte[] |
getEncoded() |
CRLExtensions |
getExtensions()
Returns extensions for this impl.
|
byte[] |
getExtensionValue(java.lang.String oid)
Gets the DER encoded OCTET string for the extension value
(extnValue) identified by the passed in oid String.
|
java.util.Set<java.lang.String> |
getNonCriticalExtensionOIDs()
Gets a Set of the extension(s) marked NON-CRITICAL in the
RevokedCertificate by OID strings.
|
java.util.Date |
getRevocationDate()
Gets the revocation date for this RevokedCertificate, the revocationDate.
|
java.math.BigInteger |
getSerialNumber()
Gets the serial number for this RevokedCertificate, the userCertificate.
|
boolean |
hasExtensions()
Returns true if this revoked certificate entry has extensions, otherwise
false.
|
boolean |
hasUnsupportedCriticalExtension() |
void |
setExtensions(CRLExtensions crlEntryExts)
Sets extensions for this impl.
|
java.lang.String |
toString()
Returns a printable string of this revoked certificate.
|
public RevokedCertImpl()
public RevokedCertImpl(java.math.BigInteger num,
java.util.Date date)
num - the serial number of the revoked certificate.date - the Date on which revocation took place.public RevokedCertImpl(java.math.BigInteger num,
java.util.Date date,
CRLExtensions crlEntryExts)
num - the serial number of the revoked certificate.date - the Date on which revocation took place.crlEntryExts - the extensions for this entry.public RevokedCertImpl(byte[] revokedCert)
throws java.security.cert.CRLException,
X509ExtensionException
revokedCert - the encoded bytes.java.security.cert.CRLException - on parsing errors.X509ExtensionException - on extension handling errors.public RevokedCertImpl(DerValue derValue) throws java.security.cert.CRLException, X509ExtensionException
derValue - the DER value containing the revoked certificate.java.security.cert.CRLException - on parsing errors.X509ExtensionException - on extension handling errors.public byte[] getEncoded()
throws java.security.cert.CRLException
getEncoded in class java.security.cert.X509CRLEntryjava.security.cert.CRLExceptionpublic boolean hasUnsupportedCriticalExtension()
hasUnsupportedCriticalExtension in interface java.security.cert.X509Extensionpublic void setExtensions(CRLExtensions crlEntryExts)
crlEntryExts - CRLExtensionspublic boolean hasExtensions()
hasExtensions in class RevokedCertificatepublic void decode(java.io.InputStream inStrm)
throws java.security.cert.CRLException,
X509ExtensionException
inStrm - an input stream holding at least one revoked certificatejava.security.cert.CRLException - on parsing errors.X509ExtensionException - on extension handling errors.public void encode(DerOutputStream outStrm) throws java.security.cert.CRLException, X509ExtensionException
outStrm - an output stream to which the encoded revoked certificate is
written.java.security.cert.CRLException - on encoding errors.X509ExtensionException - on extension handling errors.public java.math.BigInteger getSerialNumber()
getSerialNumber in class RevokedCertificatepublic java.util.Date getRevocationDate()
getRevocationDate in class RevokedCertificatepublic CRLExtensions getExtensions()
getExtensions in class RevokedCertificatepublic java.lang.String toString()
toString in class RevokedCertificatepublic java.util.Set<java.lang.String> getCriticalExtensionOIDs()
getCriticalExtensionOIDs in interface java.security.cert.X509Extensionpublic java.util.Set<java.lang.String> getNonCriticalExtensionOIDs()
getNonCriticalExtensionOIDs in interface java.security.cert.X509Extensionpublic byte[] getExtensionValue(java.lang.String oid)
oid string is
represented by a set of positive whole number separated
by ".", that means,getExtensionValue in interface java.security.cert.X509Extensionoid - the Object Identifier value for the extension.