Valid to date in certificate

Valid to date in certificate

Forum member · Jun 4, 2009
Hi, How can I detect that a certificate has expired when using it for digital signatures. The Certificate class does not include any "valid to" properties?

Re: Valid to date in certificate

Support · Jun 4, 2009
Hello, Currently it is not possible to check if the certificate is expired or not using our product. We will add this feature to our wish list and we may add support to this in a future version of our product. There is a work around to find the date by using the X509Certificate2 class. Below is a sample code. System.Security.Cryptography.X509Certificates.X509Certificate2 certificate = new System.Security.Cryptography.X509Certificates.X509Certificate2("certificate"); DateTime date = certificate.NotAfter(); //This gives the expiry date. Thanks, ceTe Software Support Team.