Extracts a certificate extension valid by name

Namespace: NHINDirect.Certificates
Assembly: nhinCommon (in nhinCommon.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public static X509Extension FindExtension(
	this X509Certificate2 cert,
	string friendlyName
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function FindExtension ( _
	cert As X509Certificate2, _
	friendlyName As String _
) As X509Extension
Visual C++
[ExtensionAttribute]
public:
static X509Extension^ FindExtension(
	X509Certificate2^ cert, 
	String^ friendlyName
)

Parameters

cert
Type: System.Security.Cryptography.X509Certificates..::..X509Certificate2
The certificate from which to extract the extension value.
friendlyName
Type: System..::..String
The extension name (see Oid) to test.

Return Value

The X509Extension value of the extension or null if none is found.

See Also