public class X509CRLEntryImpl
extends java.security.cert.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
}
| Constructor and Description |
|---|
X509CRLEntryImpl(java.math.BigInteger num,
java.util.Date date)
Constructs a revoked certificate entry using the given
serial number and revocation date.
|
X509CRLEntryImpl(java.math.BigInteger num,
java.util.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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
encode(DerOutputStream outStrm)
Encodes the revoked certificate to an output stream.
|
javax.security.auth.x500.X500Principal |
getCertificateIssuer() |
java.util.Set<java.lang.String> |
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.
|
Extension |
getExtension(ObjectIdentifier oid)
get an extension
|
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 this
X509CRLEntry.
|
java.lang.Integer |
getReasonCode()
get Reason Code from CRL entry.
|
java.util.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.
|
static X509CRLEntryImpl |
toImpl(java.security.cert.X509CRLEntry entry)
Utility method to convert an arbitrary instance of X509CRLEntry
to a X509CRLEntryImpl.
|
java.lang.String |
toString()
Returns a printable string of this revoked certificate.
|
public X509CRLEntryImpl(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 X509CRLEntryImpl(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 X509CRLEntryImpl(byte[] revokedCert)
throws java.security.cert.CRLException
revokedCert - the encoded bytes.java.security.cert.CRLException - on parsing errors.public X509CRLEntryImpl(DerValue derValue) throws java.security.cert.CRLException
derVal - the DER value containing the revoked certificate.java.security.cert.CRLException - on parsing errors.public boolean hasExtensions()
hasExtensions in class java.security.cert.X509CRLEntrypublic void encode(DerOutputStream outStrm) throws java.security.cert.CRLException
outStrm - an output stream to which the encoded revoked
certificate is written.java.security.cert.CRLException - on encoding errors.public byte[] getEncoded()
throws java.security.cert.CRLException
getEncoded in class java.security.cert.X509CRLEntryjava.security.cert.CRLException - if an encoding error occurs.public javax.security.auth.x500.X500Principal getCertificateIssuer()
getCertificateIssuer in class java.security.cert.X509CRLEntrypublic java.math.BigInteger getSerialNumber()
getSerialNumber in class java.security.cert.X509CRLEntrypublic java.util.Date getRevocationDate()
getRevocationDate in class java.security.cert.X509CRLEntrypublic java.lang.Integer getReasonCode()
throws java.io.IOException
java.io.IOException - on errorpublic java.lang.String toString()
toString in class java.security.cert.X509CRLEntrypublic boolean hasUnsupportedCriticalExtension()
public java.util.Set<java.lang.String> getCriticalExtensionOIDs()
public java.util.Set<java.lang.String> getNonCriticalExtensionOIDs()
public byte[] getExtensionValue(java.lang.String oid)
oid string is
represented by a set of positive whole number separated
by ".", that means,oid - the Object Identifier value for the extension.public Extension getExtension(ObjectIdentifier oid)
oid - ObjectIdentifier of extension desiredpublic static X509CRLEntryImpl toImpl(java.security.cert.X509CRLEntry entry) throws java.security.cert.CRLException
java.security.cert.CRLExceptionCopyright © 2020. All Rights Reserved.