CryptoSys PKI examples VB6 to VB.NET

X509_CertIsValidNow

Verifies that an X.509 certificate is currently valid.

VB6/VBA

Debug.Print "Testing X509_CertIsValidNow ..."
Dim nRet As Long
Dim strCertName As String
 
strCertName = "myca.cer"
nRet = X509_CertIsValidNow(strCertName, 0)
Debug.Print "X509_CertIsValidNow returns " & nRet & " for " & strCertName

Output

Testing X509_CertIsValidNow ...
X509_CertIsValidNow returns 0 for myca.cer

VB.NET

Console.WriteLine("Testing X509_CertIsValidNow ...")
Dim isValid As Boolean
Dim strCertName As String

strCertName = "myca.cer"
isValid = X509.CertIsValidNow(strCertName)
Console.WriteLine("X509_CertIsValidNow returns " & isValid & " for " & strCertName)

[Contents]

[HOME]   [NEXT: X509_CertRequest...]

Copyright © 2010 D.I. Management Services Pty Ltd. All rights reserved.