Skip to main content

Posts

Showing posts with the label SSL

Retrieve SSL certificate expiration date

There are several ways to extract the expiration date from the certificate file. Here is one of the easiest way if you have the file locally: # openssl x509 –noout –in < cert_file >  -dates [root@mysystem][/opt/certificates ]> openssl x509 -noout -in private_key -dates notBefore=Jul 14 16:23:57 2010 GMT notAfter=Jul 14 16:23:57 2012 GMT

Code to check SSL Client Certificate ...

Code to check SSL Client Certificate Expiration remotely Language: C# (C Sharp) using MS Visual Studio Express 2010 Reference:  System.Net.ServicePointManager , another sample code from stackOverflow Code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using System.Diagnostics; namespace CertCheck {     class Program     {         static void Main(string[] args)         {             //Get URL from command line to check             if (args.Length==0)             {                 Console.WriteLine("Usage: CertCheck <https://url> [-v]");                 Console.WriteLine("Enter an url with https prefix");          ...