Tests if the supplied certificate is valid by date as of the supplied DateTime

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

Syntax

C#
public static bool HasValidDateRange(
	this X509Certificate2 cert,
	DateTime now
)
Visual Basic
<ExtensionAttribute> _
Public Shared Function HasValidDateRange ( _
	cert As X509Certificate2, _
	now As DateTime _
) As Boolean
Visual C++
[ExtensionAttribute]
public:
static bool HasValidDateRange(
	X509Certificate2^ cert, 
	DateTime now
)

Parameters

cert
Type: System.Security.Cryptography.X509Certificates..::..X509Certificate2
The certificate to test
now
Type: System..::..DateTime
The DateTime to test this certificate against.

Return Value

true if it is valid by date, false otherwise.

See Also