X509BasicConstraintsExtension.CreateForCertificateAuthority Method

Definition

Creates an instance of X509BasicConstraintsExtension appropriate for a certificate authority, optionally including a path length constraint value.

public static System.Security.Cryptography.X509Certificates.X509BasicConstraintsExtension CreateForCertificateAuthority (int? pathLengthConstraint = default);
static member CreateForCertificateAuthority : Nullable<int> -> System.Security.Cryptography.X509Certificates.X509BasicConstraintsExtension
Public Shared Function CreateForCertificateAuthority (Optional pathLengthConstraint As Nullable(Of Integer) = Nothing) As X509BasicConstraintsExtension

Parameters

pathLengthConstraint
Nullable<Int32>

The longest valid length of a certificate chain between the certificate containing this extension and an end-entity certificate. The default is null, an unconstrained length.

Returns

The configured basic constraints extension.

Exceptions

pathLengthConstraint is a non-null value less than zero.

Remarks

Following the guidance from IETF RFC 3280, the extension returned from this method will have the Critical property set to true.

Applies to