<PackageReference Include="BouncyCastle.Cryptography" Version="2.7.0" />

Org.BouncyCastle.X509.X509V2CrlGenerator

public class X509V2CrlGenerator
Generator for X.509 version 2 certificate revocation lists (CRLs) as defined in RFC 5280. Builds the TBSCertList structure, optional CRL extensions, and signs the result via Generate.
public IEnumerable<string> SignatureAlgNames { get; }

Allows enumeration of the signature names supported by the generator.

Creates an empty version 2 CRL generator.

public X509V2CrlGenerator(X509Crl template)

Creates a generator for a version 2 CRL, initialised from another CRL.

Creates a generator for a version 2 CRL, initialised from a parsed CertificateList structure.

public void AddCrl(X509Crl other)

Copies all revoked-certificate entries from another CRL into this generator.

public void AddCrlEntry(BigInteger userCertificate, DateTime revocationDate, int reason)

Adds a revoked-certificate entry with an optional CrlReason code.

public void AddCrlEntry(BigInteger userCertificate, DateTime revocationDate, int reason, DateTime invalidityDate)

Adds a revoked-certificate entry with CrlReason and an Invalidity Date extension.

public void AddCrlEntry(BigInteger userCertificate, DateTime revocationDate, X509Extensions extensions)

Adds a revoked-certificate entry with caller-supplied CRL entry extensions.

public void AddExtension(string oid, bool critical, Asn1Encodable extensionValue)

Adds a CRL extension identified by a dotted-decimal OID string.

public void AddExtension(DerObjectIdentifier oid, bool critical, Asn1Encodable extensionValue)

Adds a CRL extension.

public void AddExtension(string oid, bool critical, byte[] extensionValue)

Adds a CRL extension identified by a dotted-decimal OID string.

public void AddExtension(DerObjectIdentifier oid, bool critical, byte[] extensionValue)

Adds a CRL extension.

public X509Crl Generate(ISignatureFactory signatureFactory)

Generate a new X509Crl using the provided ISignatureFactory.

public X509Crl Generate(ISignatureFactory signatureFactory, bool isCritical, ISignatureFactory altSignatureFactory)

Generate a new X509Crl using the provided ISignatureFactory and containing altSignatureAlgorithm and altSignatureValue extensions based on the passed altSignatureFactory.

public void Reset()

Resets the generator to an empty CRL state, discarding issuer, dates, entries and extensions.

public void SetIssuerDN(X509Name issuer)

Sets the issuer distinguished name — the entity whose private key signs the CRL.

public void SetNextUpdate(DateTime date)

Sets the time by which the next CRL in the sequence is expected to be issued (nextUpdate in the TBSCertList).

public void SetThisUpdate(DateTime date)

Sets the time at which this CRL was issued (thisUpdate in the TBSCertList).