Creates an instance of TrustAnchor where the most-trusted CA is specified as an X500Principal and public key.

Namespace: Org.BouncyCastle.Pkix
Assembly: ITextSharp (in ITextSharp.dll) Version: 4.1.6.0

Syntax

C#
public TrustAnchor(
	X509Name caPrincipal,
	AsymmetricKeyParameter pubKey,
	byte[] nameConstraints
)
Visual Basic
Public Sub New ( _
	caPrincipal As X509Name, _
	pubKey As AsymmetricKeyParameter, _
	nameConstraints As Byte() _
)
Visual C++
public:
TrustAnchor(
	X509Name^ caPrincipal, 
	AsymmetricKeyParameter^ pubKey, 
	array<unsigned char>^ nameConstraints
)

Parameters

caPrincipal
Type: Org.BouncyCastle.Asn1.X509..::..X509Name
the name of the most-trusted CA as X509Name
pubKey
Type: Org.BouncyCastle.Crypto..::..AsymmetricKeyParameter
the public key of the most-trusted CA
nameConstraints
Type: array<System..::..Byte>[]()[][]
a byte array containing the ASN.1 DER encoding of a NameConstraints extension to be used for checking name constraints. Only the value of the extension is included, not the OID or criticality flag. Specify null to omit the parameter.

Remarks

Name constraints are an optional parameter, and are intended to be used as additional constraints when validating an X.509 certification path.

The name constraints are specified as a byte array. This byte array contains the DER encoded form of the name constraints, as they would appear in the NameConstraints structure defined in RFC 2459 and X.509. The ASN.1 notation for this structure is supplied in the documentation for the other constructors.

Note that the name constraints byte array supplied here is cloned to protect against subsequent modifications.

Exceptions

ExceptionCondition
System..::..ArgumentNullException if caPrincipal or pubKey is null

See Also