public class X509CRLEntryImpl extends java.security.cert.X509CRLEntry implements java.lang.Comparable<X509CRLEntryImpl>
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(com.tencent.kona.sun.security.util.DerValue derValue)
Unmarshals a revoked certificate from its encoded form.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(X509CRLEntryImpl that) |
void |
encode(com.tencent.kona.sun.security.util.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(com.tencent.kona.sun.security.util.ObjectIdentifier oid)
get an extension
|
java.util.Map<java.lang.String,java.security.cert.Extension> |
getExtensions()
Returns all extensions for this entry in a map
|
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.security.cert.CRLReason |
getRevocationReason()
This method is the overridden implementation of the getRevocationReason
method in X509CRLEntry.
|
static java.security.cert.CRLReason |
getRevocationReason(java.security.cert.X509CRLEntry crlEntry)
This static method is the default implementation of the
getRevocationReason method in X509CRLEntry.
|
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(com.tencent.kona.sun.security.util.DerValue derValue)
throws java.security.cert.CRLException
derValue - 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(com.tencent.kona.sun.security.util.DerOutputStream outStrm)
outStrm - an output stream to which the encoded revoked
certificate is written.public byte[] getEncoded()
getEncoded in class java.security.cert.X509CRLEntrypublic 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.security.cert.CRLReason getRevocationReason()
getRevocationReason in class java.security.cert.X509CRLEntrypublic static java.security.cert.CRLReason getRevocationReason(java.security.cert.X509CRLEntry crlEntry)
public 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()
hasUnsupportedCriticalExtension in interface java.security.cert.X509Extensionpublic 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.public Extension getExtension(com.tencent.kona.sun.security.util.ObjectIdentifier oid)
oid - ObjectIdentifier of extension desired<extension> or null, if not foundpublic static X509CRLEntryImpl toImpl(java.security.cert.X509CRLEntry entry) throws java.security.cert.CRLException
java.security.cert.CRLExceptionpublic java.util.Map<java.lang.String,java.security.cert.Extension> getExtensions()
public int compareTo(X509CRLEntryImpl that)
compareTo in interface java.lang.Comparable<X509CRLEntryImpl>