Top Description Inners Fields Constructors Methods
org.bouncycastle.x509

public Class X509V2CRLGenerator

extends Object
Class Inheritance
Imports
java.io.IOException, java.math.BigInteger, java.security.GeneralSecurityException, .InvalidKeyException, .NoSuchAlgorithmException, .NoSuchProviderException, .PrivateKey, .SecureRandom, .SignatureException, java.security.cert.CRLException, .X509CRL, .X509CRLEntry, java.util.Date, .Iterator, .Set, javax.security.auth.x500.X500Principal, org.bouncycastle.asn1.ASN1Encodable, .ASN1EncodableVector, .ASN1GeneralizedTime, .ASN1InputStream, .ASN1Integer, .ASN1ObjectIdentifier, .ASN1Sequence, .DERBitString, .DERSequence, org.bouncycastle.asn1.x509.AlgorithmIdentifier, .CertificateList, .Extensions, .TBSCertList, .Time, .V2TBSCertListGenerator, .X509Extensions, .X509ExtensionsGenerator, .X509Name, org.bouncycastle.jcajce.util.BCJcaJceHelper, .JcaJceHelper, org.bouncycastle.jce.X509Principal, org.bouncycastle.jce.provider.X509CRLObject

Deprecated

use org.bouncycastle.cert.X509v2CRLBuilder.

class to produce an X.509 Version 2 CRL.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final JcaJceHelper
private X509ExtensionsGenerator
extGenerator

Deprecated as a consequence of X509ExtensionsGenerator being deprecated.
private AlgorithmIdentifier
private String
private ASN1ObjectIdentifier
private V2TBSCertListGenerator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addCRL(X509CRL
the X509CRL to source the other entries from.
other
)

Add the CRLEntry objects contained in a previous CRL.

public void
addCRLEntry(BigInteger userCertificate, Date revocationDate, int reason)

Reason being as indicated by CRLReason, i.e. CRLReason.keyCompromise or 0 if CRLReason is not to be used

public void
addCRLEntry(BigInteger userCertificate, Date revocationDate, int reason, Date invalidityDate)

Add a CRL entry with an Invalidity Date extension as well as a CRLReason extension.

public void
addCRLEntry(BigInteger userCertificate, Date revocationDate, X509Extensions extensions)

Deprecated as a consequence of X509Extensions being deprecated.
Add a CRL entry with extensions.
public void
addExtension(String oid, boolean critical, ASN1Encodable value)

add a given extension field for the standard extensions tag (tag 0)

public void
addExtension(ASN1ObjectIdentifier oid, boolean critical, ASN1Encodable value)

add a given extension field for the standard extensions tag (tag 0)

public void
addExtension(String oid, boolean critical, byte[] value)

add a given extension field for the standard extensions tag (tag 0)

public void
addExtension(ASN1ObjectIdentifier oid, boolean critical, byte[] value)

add a given extension field for the standard extensions tag (tag 0)

public X509CRL
generate(PrivateKey key)

generate an X509 CRL, based on the current issuer and subject using the default provider.

public X509CRL
generate(PrivateKey key, SecureRandom random)

generate an X509 CRL, based on the current issuer and subject using the default provider and an user defined SecureRandom object as source of randomness.

public X509CRL
generate(PrivateKey key, String provider)

generate an X509 certificate, based on the current issuer and subject using the passed in provider for the signing.

public X509CRL
generate(PrivateKey key, String provider, SecureRandom random)

generate an X509 CRL, based on the current issuer and subject, using the passed in provider for the signing.

private TBSCertList
private X509CRL
generateJcaObject(TBSCertList tbsCrl, byte[] signature)

public X509CRL
generateX509CRL(PrivateKey key)

Deprecated use generate(key, "BC")
generate an X509 CRL, based on the current issuer and subject using the default provider "BC".
public X509CRL
generateX509CRL(PrivateKey key, SecureRandom random)

Deprecated use generate(key, random, "BC")
generate an X509 CRL, based on the current issuer and subject using the default provider "BC" and an user defined SecureRandom object as source of randomness.
public X509CRL
generateX509CRL(PrivateKey key, String provider)

Deprecated use generate()
generate an X509 certificate, based on the current issuer and subject using the passed in provider for the signing.
public X509CRL
generateX509CRL(PrivateKey key, String provider, SecureRandom random)

Deprecated use generate()
generate an X509 CRL, based on the current issuer and subject, using the passed in provider for the signing.
public Iterator<E>

Returns:

an iterator containing recognised names.
getSignatureAlgNames
()

Return an iterator of the signature names supported by the generator.

public void
reset()

reset the generator

public void
setIssuerDN(X500Principal issuer)

Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate.

public void
setIssuerDN(X509Name issuer)

Deprecated as a consequence of X509Name being deprecated.
Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate.
public void
public void
setSignatureAlgorithm(String
string representation of the algorithm name.
signatureAlgorithm
)

Set the signature algorithm.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bcHelperback to summary
private final JcaJceHelper bcHelper
extGeneratorback to summary
private X509ExtensionsGenerator extGenerator

Deprecated

as a consequence of X509ExtensionsGenerator being deprecated. See corresponding docs for further information.

sigAlgIdback to summary
private AlgorithmIdentifier sigAlgId
signatureAlgorithmback to summary
private String signatureAlgorithm
sigOIDback to summary
private ASN1ObjectIdentifier sigOID
tbsGenback to summary
private V2TBSCertListGenerator tbsGen

Constructor Detail

X509V2CRLGeneratorback to summary
public X509V2CRLGenerator()

Method Detail

addCRLback to summary
public void addCRL(X509CRL other) throws CRLException

Add the CRLEntry objects contained in a previous CRL.

Parameters
other:X509CRL

the X509CRL to source the other entries from.

addCRLEntryback to summary
public void addCRLEntry(BigInteger userCertificate, Date revocationDate, int reason)

Reason being as indicated by CRLReason, i.e. CRLReason.keyCompromise or 0 if CRLReason is not to be used

addCRLEntryback to summary
public void addCRLEntry(BigInteger userCertificate, Date revocationDate, int reason, Date invalidityDate)

Add a CRL entry with an Invalidity Date extension as well as a CRLReason extension. Reason being as indicated by CRLReason, i.e. CRLReason.keyCompromise or 0 if CRLReason is not to be used

addCRLEntryback to summary
public void addCRLEntry(BigInteger userCertificate, Date revocationDate, X509Extensions extensions)

Deprecated

as a consequence of X509Extensions being deprecated. See corresponding docs for further information.

Add a CRL entry with extensions.

addExtensionback to summary
public void addExtension(String oid, boolean critical, ASN1Encodable value)

add a given extension field for the standard extensions tag (tag 0)

addExtensionback to summary
public void addExtension(ASN1ObjectIdentifier oid, boolean critical, ASN1Encodable value)

add a given extension field for the standard extensions tag (tag 0)

addExtensionback to summary
public void addExtension(String oid, boolean critical, byte[] value)

add a given extension field for the standard extensions tag (tag 0)

addExtensionback to summary
public void addExtension(ASN1ObjectIdentifier oid, boolean critical, byte[] value)

add a given extension field for the standard extensions tag (tag 0)

generateback to summary
public X509CRL generate(PrivateKey key) throws CRLException, IllegalStateException, NoSuchAlgorithmException, SignatureException, InvalidKeyException

generate an X509 CRL, based on the current issuer and subject using the default provider.

Note

this differs from the deprecated method in that the default provider is used - not "BC".

generateback to summary
public X509CRL generate(PrivateKey key, SecureRandom random) throws CRLException, IllegalStateException, NoSuchAlgorithmException, SignatureException, InvalidKeyException

generate an X509 CRL, based on the current issuer and subject using the default provider and an user defined SecureRandom object as source of randomness.

Note

this differs from the deprecated method in that the default provider is used - not "BC".

generateback to summary
public X509CRL generate(PrivateKey key, String provider) throws CRLException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException, InvalidKeyException

generate an X509 certificate, based on the current issuer and subject using the passed in provider for the signing.

generateback to summary
public X509CRL generate(PrivateKey key, String provider, SecureRandom random) throws CRLException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException, InvalidKeyException

generate an X509 CRL, based on the current issuer and subject, using the passed in provider for the signing.

generateCertListback to summary
private TBSCertList generateCertList()
generateJcaObjectback to summary
private X509CRL generateJcaObject(TBSCertList tbsCrl, byte[] signature) throws CRLException
generateX509CRLback to summary
public X509CRL generateX509CRL(PrivateKey key) throws SecurityException, SignatureException, InvalidKeyException

Deprecated

use generate(key, "BC")

generate an X509 CRL, based on the current issuer and subject using the default provider "BC".

generateX509CRLback to summary
public X509CRL generateX509CRL(PrivateKey key, SecureRandom random) throws SecurityException, SignatureException, InvalidKeyException

Deprecated

use generate(key, random, "BC")

generate an X509 CRL, based on the current issuer and subject using the default provider "BC" and an user defined SecureRandom object as source of randomness.

generateX509CRLback to summary
public X509CRL generateX509CRL(PrivateKey key, String provider) throws NoSuchProviderException, SecurityException, SignatureException, InvalidKeyException

Deprecated

use generate()

generate an X509 certificate, based on the current issuer and subject using the passed in provider for the signing.

generateX509CRLback to summary
public X509CRL generateX509CRL(PrivateKey key, String provider, SecureRandom random) throws NoSuchProviderException, SecurityException, SignatureException, InvalidKeyException

Deprecated

use generate()

generate an X509 CRL, based on the current issuer and subject, using the passed in provider for the signing.

getSignatureAlgNamesback to summary
public Iterator<E> getSignatureAlgNames()

Return an iterator of the signature names supported by the generator.

Returns:Iterator<E>

an iterator containing recognised names.

resetback to summary
public void reset()

reset the generator

setIssuerDNback to summary
public void setIssuerDN(X500Principal issuer)

Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate.

setIssuerDNback to summary
public void setIssuerDN(X509Name issuer)

Deprecated

as a consequence of X509Name being deprecated. See corresponding docs for further information.

Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate.

setNextUpdateback to summary
public void setNextUpdate(Date date)
setSignatureAlgorithmback to summary
public void setSignatureAlgorithm(String signatureAlgorithm)

Set the signature algorithm. This can be either a name or an OID, names are treated as case insensitive.

Parameters
signatureAlgorithm:String

string representation of the algorithm name.

setThisUpdateback to summary
public void setThisUpdate(Date date)
org.bouncycastle.x509 back to summary

private Class X509V2CRLGenerator.ExtCRLException

extends CRLException
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv Throwable

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Throwable
getCause()

Overrides java.lang.Throwable.getCause.

Returns the cause of this throwable or null if the cause is nonexistent or unknown.

Field Detail

causeback to summary
pack-priv Throwable cause

Hides java.lang.Throwable.cause.

Constructor Detail

ExtCRLExceptionback to summary
pack-priv ExtCRLException(String message, Throwable cause)

Method Detail

getCauseback to summary
public Throwable getCause()

Overrides java.lang.Throwable.getCause.

Doc from java.lang.Throwable.getCause.

Returns the cause of this throwable or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)

This implementation returns the cause that was supplied via one of the constructors requiring a Throwable, or that was set after creation with the initCause(Throwable) method. While it is typically unnecessary to override this method, a subclass can override it to return a cause set by some other means. This is appropriate for a "legacy chained throwable" that predates the addition of chained exceptions to Throwable. Note that it is not necessary to override any of the PrintStackTrace methods, all of which invoke the getCause method to determine the cause of a throwable.

Returns:Throwable

the cause of this throwable or null if the cause is nonexistent or unknown.