public class

X509v2CRLBuilder

extends Object
java.lang.Object
   ↳ org.bouncycastle.cert.X509v2CRLBuilder
Known Direct Subclasses

Class Overview

class to produce an X.509 Version 2 CRL.

Summary

Public Constructors
X509v2CRLBuilder(X500Name issuer, Date thisUpdate)
Basic constructor.
Public Methods
X509v2CRLBuilder addCRL(X509CRLHolder other)
Add the CRLEntry objects contained in a previous CRL.
X509v2CRLBuilder addCRLEntry(BigInteger userCertificateSerial, Date revocationDate, int reason)
Add a CRL entry with the just reasonCode extension.
X509v2CRLBuilder addCRLEntry(BigInteger userCertificateSerial, Date revocationDate, X509Extensions extensions)
Add a CRL entry with extensions.
X509v2CRLBuilder addCRLEntry(BigInteger userCertificateSerial, Date revocationDate, int reason, Date invalidityDate)
Add a CRL entry with an invalidityDate extension as well as a reasonCode extension.
X509v2CRLBuilder addExtension(ASN1ObjectIdentifier oid, boolean isCritical, ASN1Encodable value)
Add a given extension field for the standard extensions tag (tag 3)
X509CRLHolder build(ContentSigner signer)
Generate an X.509 CRL, based on the current issuer and subject using the passed in signer.
X509v2CRLBuilder setNextUpdate(Date date)
Set the date by which the next CRL will become available.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public X509v2CRLBuilder (X500Name issuer, Date thisUpdate)

Basic constructor.

Parameters
issuer the issuer this CRL is associated with.
thisUpdate the date of this update.

Public Methods

public X509v2CRLBuilder addCRL (X509CRLHolder other)

Add the CRLEntry objects contained in a previous CRL.

Parameters
other the X509CRLHolder to source the other entries from.
Returns
  • the current builder.

public X509v2CRLBuilder addCRLEntry (BigInteger userCertificateSerial, Date revocationDate, int reason)

Add a CRL entry with the just reasonCode extension.

Parameters
userCertificateSerial serial number of revoked certificate.
revocationDate date of certificate revocation.
reason the reason code, as indicated in CRLReason, i.e CRLReason.keyCompromise, or 0 if not to be used.
Returns
  • the current builder.

public X509v2CRLBuilder addCRLEntry (BigInteger userCertificateSerial, Date revocationDate, X509Extensions extensions)

Add a CRL entry with extensions.

Parameters
userCertificateSerial serial number of revoked certificate.
revocationDate date of certificate revocation.
extensions extension set to be associated with this CRLEntry.
Returns
  • the current builder.

public X509v2CRLBuilder addCRLEntry (BigInteger userCertificateSerial, Date revocationDate, int reason, Date invalidityDate)

Add a CRL entry with an invalidityDate extension as well as a reasonCode extension. This is used where the date of revocation might be after issues with the certificate may have occurred.

Parameters
userCertificateSerial serial number of revoked certificate.
revocationDate date of certificate revocation.
reason the reason code, as indicated in CRLReason, i.e CRLReason.keyCompromise, or 0 if not to be used.
invalidityDate the date on which the private key for the certificate became compromised or the certificate otherwise became invalid.
Returns
  • the current builder.

public X509v2CRLBuilder addExtension (ASN1ObjectIdentifier oid, boolean isCritical, ASN1Encodable value)

Add a given extension field for the standard extensions tag (tag 3)

Parameters
oid the OID defining the extension type.
isCritical true if the extension is critical, false otherwise.
value the ASN.1 structure that forms the extension's value.
Returns
  • this builder object.

public X509CRLHolder build (ContentSigner signer)

Generate an X.509 CRL, based on the current issuer and subject using the passed in signer.

Parameters
signer the content signer to be used to generate the signature validating the certificate.
Returns
  • a holder containing the resulting signed certificate.

public X509v2CRLBuilder setNextUpdate (Date date)

Set the date by which the next CRL will become available.

Parameters
date date of next CRL update.
Returns
  • the current builder.