public class X509v2CRLBuilder
extends java.lang.Object
Constructor and Description |
---|
X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name issuer,
java.util.Date thisUpdate)
Basic constructor.
|
X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name issuer,
java.util.Date thisUpdate,
java.util.Locale dateLocale)
Basic constructor with Locale.
|
X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name issuer,
org.bouncycastle.asn1.x509.Time thisUpdate)
Basic constructor.
|
X509v2CRLBuilder(X509CRLHolder template)
Create a builder for a version 2 CRL, initialised with another CRL.
|
Modifier and Type | Method and Description |
---|---|
X509v2CRLBuilder |
addCRL(X509CRLHolder other)
Add the CRLEntry objects contained in a previous CRL.
|
X509v2CRLBuilder |
addCRLEntry(java.math.BigInteger userCertificateSerial,
java.util.Date revocationDate,
org.bouncycastle.asn1.x509.Extensions extensions)
Add a CRL entry with extensions.
|
X509v2CRLBuilder |
addCRLEntry(java.math.BigInteger userCertificateSerial,
java.util.Date revocationDate,
int reason)
Add a CRL entry with the just reasonCode extension.
|
X509v2CRLBuilder |
addCRLEntry(java.math.BigInteger userCertificateSerial,
java.util.Date revocationDate,
int reason,
java.util.Date invalidityDate)
Add a CRL entry with an invalidityDate extension as well as a reasonCode extension.
|
X509v2CRLBuilder |
addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
boolean isCritical,
org.bouncycastle.asn1.ASN1Encodable value)
Add a given extension field for the standard extensions tag (tag 3)
|
X509v2CRLBuilder |
addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
boolean isCritical,
byte[] encodedValue)
Add a given extension field for the standard extensions tag (tag 3) using a byte encoding of the
extension value.
|
X509v2CRLBuilder |
addExtension(org.bouncycastle.asn1.x509.Extension extension)
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.
|
org.bouncycastle.asn1.x509.Extension |
getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
Return the current value of the extension for OID.
|
boolean |
hasExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
Return if the extension indicated by OID is present.
|
X509v2CRLBuilder |
removeExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
Remove the extension indicated by OID.
|
X509v2CRLBuilder |
replaceExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
boolean isCritical,
org.bouncycastle.asn1.ASN1Encodable value)
Replace the extension field for the passed in extension's extension ID
with a new version.
|
X509v2CRLBuilder |
replaceExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid,
boolean isCritical,
byte[] encodedValue)
Replace a given extension field for the standard extensions tag (tag 3) with the passed in
byte encoded extension value.
|
X509v2CRLBuilder |
replaceExtension(org.bouncycastle.asn1.x509.Extension extension)
Replace the extension field for the passed in extension's extension ID
with a new version.
|
X509v2CRLBuilder |
setNextUpdate(java.util.Date date)
Set the date by which the next CRL will become available.
|
X509v2CRLBuilder |
setNextUpdate(java.util.Date date,
java.util.Locale dateLocale)
Set the date by which the next CRL will become available.
|
X509v2CRLBuilder |
setNextUpdate(org.bouncycastle.asn1.x509.Time date)
Set the date by which the next CRL will become available.
|
public X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name issuer, java.util.Date thisUpdate)
issuer
- the issuer this CRL is associated with.thisUpdate
- the date of this update.public X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name issuer, java.util.Date thisUpdate, java.util.Locale dateLocale)
issuer
- the issuer this CRL is associated with.thisUpdate
- the date of this update.dateLocale
- locale to be used for date interpretation.public X509v2CRLBuilder(org.bouncycastle.asn1.x500.X500Name issuer, org.bouncycastle.asn1.x509.Time thisUpdate)
issuer
- the issuer this CRL is associated with.thisUpdate
- the Time of this update.public X509v2CRLBuilder(X509CRLHolder template)
template
- template CRL to base the new one on.public boolean hasExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
oid
- the OID for the extension of interest.public org.bouncycastle.asn1.x509.Extension getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
oid
- the OID for the extension we want to fetch.public X509v2CRLBuilder setNextUpdate(java.util.Date date)
date
- date of next CRL update.public X509v2CRLBuilder setNextUpdate(java.util.Date date, java.util.Locale dateLocale)
date
- date of next CRL update.dateLocale
- locale to be used for date interpretation.public X509v2CRLBuilder setNextUpdate(org.bouncycastle.asn1.x509.Time date)
date
- date of next CRL update.public X509v2CRLBuilder addCRLEntry(java.math.BigInteger userCertificateSerial, java.util.Date revocationDate, int reason)
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.public X509v2CRLBuilder addCRLEntry(java.math.BigInteger userCertificateSerial, java.util.Date revocationDate, int reason, java.util.Date invalidityDate)
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.public X509v2CRLBuilder addCRLEntry(java.math.BigInteger userCertificateSerial, java.util.Date revocationDate, org.bouncycastle.asn1.x509.Extensions extensions)
userCertificateSerial
- serial number of revoked certificate.revocationDate
- date of certificate revocation.extensions
- extension set to be associated with this CRLEntry.public X509v2CRLBuilder addCRL(X509CRLHolder other)
other
- the X509CRLHolder to source the other entries from.public X509v2CRLBuilder addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, org.bouncycastle.asn1.ASN1Encodable value) throws CertIOException
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.CertIOException
public X509v2CRLBuilder addExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, byte[] encodedValue) throws CertIOException
oid
- the OID defining the extension type.isCritical
- true if the extension is critical, false otherwise.encodedValue
- a byte array representing the encoding of the extension value.CertIOException
public X509v2CRLBuilder addExtension(org.bouncycastle.asn1.x509.Extension extension) throws CertIOException
extension
- the full extension value.CertIOException
public X509v2CRLBuilder replaceExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, org.bouncycastle.asn1.ASN1Encodable value) throws CertIOException
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.CertIOException
- if there is an issue with the new extension value.java.lang.IllegalArgumentException
- if the extension to be replaced is not present.public X509v2CRLBuilder replaceExtension(org.bouncycastle.asn1.x509.Extension extension) throws CertIOException
extension
- the full extension value.CertIOException
- if there is an issue with the new extension value.java.lang.IllegalArgumentException
- if the extension to be replaced is not present.public X509v2CRLBuilder replaceExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid, boolean isCritical, byte[] encodedValue) throws CertIOException
oid
- the OID defining the extension type.isCritical
- true if the extension is critical, false otherwise.encodedValue
- a byte array representing the encoding of the extension value.CertIOException
- if there is an issue with the new extension value.java.lang.IllegalArgumentException
- if the extension to be replaced is not present.public X509v2CRLBuilder removeExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
oid
- the OID of the extension to be removed.java.lang.IllegalArgumentException
- if the extension to be removed is not present.public X509CRLHolder build(ContentSigner signer)
signer
- the content signer to be used to generate the signature validating the certificate.