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

X509ExtensionsGenerator

public bool IsEmpty { get; }

Return true if there are no extension present in this generator.

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

Add an extension with the given oid and the passed in value to be included in the OCTET STRING associated with the extension.

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

Add an extension with the given oid and the passed in byte array to be wrapped in the OCTET STRING associated with the extension.

public void AddExtensions(X509Extensions extensions)

Generate an X509Extensions object based on the current state of the generator.

public void Reset()

Reset the generator