Table of Contents

Class X509ExtensionsGenerator

Namespace
Org.BouncyCastle.Asn1.X509
Assembly
BouncyCastle.Cryptography.dll
public class X509ExtensionsGenerator
Inheritance
X509ExtensionsGenerator
Inherited Members

Remarks

Generator for X.509 extensions

Properties

IsEmpty

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

public bool IsEmpty { get; }

Property Value

bool

True if empty, false otherwise

Methods

AddExtension(DerObjectIdentifier, X509Extension)

public void AddExtension(DerObjectIdentifier oid, X509Extension x509Extension)

Parameters

oid DerObjectIdentifier
x509Extension X509Extension

AddExtension(DerObjectIdentifier, bool, Asn1Encodable)

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, Asn1Encodable extValue)

Parameters

oid DerObjectIdentifier

OID for the extension.

critical bool

True if critical, false otherwise.

extValue Asn1Encodable

The ASN.1 object to be included in the extension.

AddExtension(DerObjectIdentifier, bool, IAsn1Convertible)

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

Parameters

oid DerObjectIdentifier
critical bool
extValue IAsn1Convertible

AddExtension(DerObjectIdentifier, bool, byte[])

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 AddExtension(DerObjectIdentifier oid, bool critical, byte[] extValue)

Parameters

oid DerObjectIdentifier

OID for the extension.

critical bool

True if critical, false otherwise.

extValue byte[]

The byte array to be wrapped.

AddExtension(Extension)

public void AddExtension(Extension extension)

Parameters

extension Extension

AddExtensions(X509Extensions)

public void AddExtensions(X509Extensions extensions)

Parameters

extensions X509Extensions

Generate()

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

public X509Extensions Generate()

Returns

X509Extensions

An X509Extensions object

GetExtension(DerObjectIdentifier)

public X509Extension GetExtension(DerObjectIdentifier oid)

Parameters

oid DerObjectIdentifier

Returns

X509Extension

HasExtension(DerObjectIdentifier)

public bool HasExtension(DerObjectIdentifier oid)

Parameters

oid DerObjectIdentifier

Returns

bool

RemoveExtension(DerObjectIdentifier)

public void RemoveExtension(DerObjectIdentifier oid)

Parameters

oid DerObjectIdentifier

ReplaceExtension(DerObjectIdentifier, X509Extension)

public void ReplaceExtension(DerObjectIdentifier oid, X509Extension x509Extension)

Parameters

oid DerObjectIdentifier
x509Extension X509Extension

ReplaceExtension(DerObjectIdentifier, bool, Asn1Encodable)

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

Parameters

oid DerObjectIdentifier
critical bool
extValue Asn1Encodable

ReplaceExtension(DerObjectIdentifier, bool, IAsn1Convertible)

public void ReplaceExtension(DerObjectIdentifier oid, bool critical, IAsn1Convertible extValue)

Parameters

oid DerObjectIdentifier
critical bool
extValue IAsn1Convertible

ReplaceExtension(DerObjectIdentifier, bool, byte[])

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

Parameters

oid DerObjectIdentifier
critical bool
extValue byte[]

ReplaceExtension(Extension)

public void ReplaceExtension(Extension extension)

Parameters

extension Extension

Reset()

Reset the generator

public void Reset()