Class X509CRLEntry
- All Implemented Interfaces:
X509Extension
public abstract class X509CRLEntry extends Object implements X509Extension
Abstract class for a revoked certificate in a CRL (Certificate Revocation List). The ASN.1 definition for revokedCertificates 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 }
- Since:
- 1.2
- See Also:
Constructor Summary
Constructor | Description |
---|---|
X509CRLEntry() |
Constructor for subclasses to call. |
Method Summary
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals |
Compares this CRL entry for equality with the given object. |
X500Principal |
getCertificateIssuer() |
Get the issuer of the X509Certificate described by this entry. |
abstract byte[] |
getEncoded() |
Returns the ASN.1 DER-encoded form of this CRL Entry, that is the inner SEQUENCE. |
abstract Date |
getRevocationDate() |
Gets the revocation date from this X509CRLEntry, the revocationDate. |
CRLReason |
getRevocationReason() |
Returns the reason the certificate has been revoked, as specified in the Reason Code extension of this CRL entry. |
abstract BigInteger |
getSerialNumber() |
Gets the serial number from this X509CRLEntry, the userCertificate. |
abstract boolean |
hasExtensions() |
Returns true if this CRL entry has extensions. |
int |
hashCode() |
Returns a hashcode value for this CRL entry from its encoded form. |
abstract String |
toString() |
Returns a string representation of this CRL entry. |
Methods declared in class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods declared in interface java.security.cert.X509Extension
getCriticalExtensionOIDs, getExtensionValue, getNonCriticalExtensionOIDs, hasUnsupportedCriticalExtension
Constructor Details
X509CRLEntry
public X509CRLEntry()
Method Details
equals
public boolean equals(Object other)
other
object is an instanceof
X509CRLEntry
, then its encoded form (the inner SEQUENCE) is retrieved and compared with the encoded form of this CRL entry.hashCode
public int hashCode()
getEncoded
public abstract byte[] getEncoded() throws CRLException
- Returns:
- the encoded form of this certificate
- Throws:
-
CRLException
- if an encoding error occurs.
getSerialNumber
public abstract BigInteger getSerialNumber()
- Returns:
- the serial number.
getCertificateIssuer
public X500Principal getCertificateIssuer()
This method is used with indirect CRLs. The default implementation always returns null. Subclasses that wish to support indirect CRLs should override it.
- Returns:
- the issuer of the X509Certificate described by this entry or null if it is issued by the CRL issuer.
- Since:
- 1.5
getRevocationDate
public abstract Date getRevocationDate()
- Returns:
- the revocation date.
hasExtensions
public abstract boolean hasExtensions()
- Returns:
- true if this entry has extensions, false otherwise.
toString
public abstract String toString()
getRevocationReason
public CRLReason getRevocationReason()
- Returns:
- the reason the certificate has been revoked, or
null
if this CRL entry does not have a Reason Code extension - Since:
- 1.7
© 1993, 2021, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/security/cert/X509CRLEntry.html