Package org.bouncycastle.cert
Class X509CRLHolder
- java.lang.Object
-
- org.bouncycastle.cert.X509CRLHolder
-
- All Implemented Interfaces:
java.io.Serializable,org.bouncycastle.util.Encodable
- Direct Known Subclasses:
JcaX509CRLHolder
public class X509CRLHolder extends java.lang.Object implements org.bouncycastle.util.Encodable, java.io.SerializableHolding class for an X.509 CRL structure.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description X509CRLHolder(byte[] crlEncoding)Create a X509CRLHolder from the passed in bytes.X509CRLHolder(java.io.InputStream crlStream)Create a X509CRLHolder from the passed in InputStream.X509CRLHolder(org.bouncycastle.asn1.x509.CertificateList x509CRL)Create a X509CRLHolder from the passed in ASN.1 structure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.SetgetCriticalExtensionOIDs()Returns a set of ASN1ObjectIdentifier objects representing the OIDs of the critical extensions contained in this holder's CRL.byte[]getEncoded()Return the ASN.1 encoding of this holder's CRL.org.bouncycastle.asn1.x509.ExtensiongetExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)Look up the extension associated with the passed in OID.java.util.ListgetExtensionOIDs()Returns a list of ASN1ObjectIdentifier objects representing the OIDs of the extensions contained in this holder's CRL.org.bouncycastle.asn1.x509.ExtensionsgetExtensions()Return the extensions block associated with this CRL if there is one.org.bouncycastle.asn1.x500.X500NamegetIssuer()Return the issuer of this holder's CRL.java.util.DategetNextUpdate()java.util.SetgetNonCriticalExtensionOIDs()Returns a set of ASN1ObjectIdentifier objects representing the OIDs of the non-critical extensions contained in this holder's CRL.X509CRLEntryHoldergetRevokedCertificate(java.math.BigInteger serialNumber)java.util.CollectiongetRevokedCertificates()Return a collection of X509CRLEntryHolder objects, giving the details of the revoked certificates that appear on this CRL.java.util.DategetThisUpdate()booleanhasExtensions()Return whether or not the holder's CRL contains extensions.inthashCode()booleanisSignatureValid(ContentVerifierProvider verifierProvider)Validate the signature on the CRL.org.bouncycastle.asn1.x509.CertificateListtoASN1Structure()Return the underlying ASN.1 structure for the CRL in this holder.
-
-
-
Constructor Detail
-
X509CRLHolder
public X509CRLHolder(byte[] crlEncoding) throws java.io.IOExceptionCreate a X509CRLHolder from the passed in bytes.- Parameters:
crlEncoding- BER/DER encoding of the CRL- Throws:
java.io.IOException- in the event of corrupted data, or an incorrect structure.
-
X509CRLHolder
public X509CRLHolder(java.io.InputStream crlStream) throws java.io.IOExceptionCreate a X509CRLHolder from the passed in InputStream.- Parameters:
crlStream- BER/DER encoded InputStream of the CRL- Throws:
java.io.IOException- in the event of corrupted data, or an incorrect structure.
-
X509CRLHolder
public X509CRLHolder(org.bouncycastle.asn1.x509.CertificateList x509CRL)
Create a X509CRLHolder from the passed in ASN.1 structure.- Parameters:
x509CRL- an ASN.1 CertificateList structure.
-
-
Method Detail
-
getEncoded
public byte[] getEncoded() throws java.io.IOExceptionReturn the ASN.1 encoding of this holder's CRL.- Specified by:
getEncodedin interfaceorg.bouncycastle.util.Encodable- Returns:
- a DER encoded byte array.
- Throws:
java.io.IOException- if an encoding cannot be generated.
-
getIssuer
public org.bouncycastle.asn1.x500.X500Name getIssuer()
Return the issuer of this holder's CRL.- Returns:
- the CRL issuer.
-
getThisUpdate
public java.util.Date getThisUpdate()
-
getNextUpdate
public java.util.Date getNextUpdate()
-
getRevokedCertificate
public X509CRLEntryHolder getRevokedCertificate(java.math.BigInteger serialNumber)
-
getRevokedCertificates
public java.util.Collection getRevokedCertificates()
Return a collection of X509CRLEntryHolder objects, giving the details of the revoked certificates that appear on this CRL.- Returns:
- the revoked certificates as a collection of X509CRLEntryHolder objects.
-
hasExtensions
public boolean hasExtensions()
Return whether or not the holder's CRL contains extensions.- Returns:
- true if extension are present, false otherwise.
-
getExtension
public org.bouncycastle.asn1.x509.Extension getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
Look up the extension associated with the passed in OID.- Parameters:
oid- the OID of the extension of interest.- Returns:
- the extension if present, null otherwise.
-
getExtensions
public org.bouncycastle.asn1.x509.Extensions getExtensions()
Return the extensions block associated with this CRL if there is one.- Returns:
- the extensions block, null otherwise.
-
getExtensionOIDs
public java.util.List getExtensionOIDs()
Returns a list of ASN1ObjectIdentifier objects representing the OIDs of the extensions contained in this holder's CRL.- Returns:
- a list of extension OIDs.
-
getCriticalExtensionOIDs
public java.util.Set getCriticalExtensionOIDs()
Returns a set of ASN1ObjectIdentifier objects representing the OIDs of the critical extensions contained in this holder's CRL.- Returns:
- a set of critical extension OIDs.
-
getNonCriticalExtensionOIDs
public java.util.Set getNonCriticalExtensionOIDs()
Returns a set of ASN1ObjectIdentifier objects representing the OIDs of the non-critical extensions contained in this holder's CRL.- Returns:
- a set of non-critical extension OIDs.
-
toASN1Structure
public org.bouncycastle.asn1.x509.CertificateList toASN1Structure()
Return the underlying ASN.1 structure for the CRL in this holder.- Returns:
- a CertificateList object.
-
isSignatureValid
public boolean isSignatureValid(ContentVerifierProvider verifierProvider) throws CertException
Validate the signature on the CRL.- Parameters:
verifierProvider- a ContentVerifierProvider that can generate a verifier for the signature.- Returns:
- true if the signature is valid, false otherwise.
- Throws:
CertException- if the signature cannot be processed or is inappropriate.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-