X509SubjectKeyIdentifierClause.TryCreateFrom Method (X509Certificate2, X509SubjectKeyIdentifierClause)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates a key identifier clause using the specified X.509 certificate.

Namespace:   System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public static bool TryCreateFrom(
	X509Certificate2 certificate,
	out X509SubjectKeyIdentifierClause keyIdentifierClause


Type: System.Security.Cryptography.X509Certificates.X509Certificate2

An X509Certificate2 to create the key identifier clause for.

Type: System.IdentityModel.Tokens.X509SubjectKeyIdentifierClause

When this method returns, contains a X509SubjectKeyIdentifierClause that represents the key identifier clause. This parameter is passed uninitialized.

Return Value

Type: System.Boolean

true when a key identifier clause can be created for the specified X.509 certificate; otherwise, false.

Exception Condition

certificate is null.

A X509SubjectKeyIdentifierClause key identifier clause can be created for the X.509 certificate when it contains a subject key identifier.

.NET Framework
Available since 3.0
Return to top