India English
Kenya English
United Kingdom English
South Africa English
Nigeria English
United States English
United States Español
Indonesia English
Bangladesh English
Egypt العربية
Tanzania English
Ethiopia English
Uganda English
Congo - Kinshasa English
Ghana English
Côte d’Ivoire English
Zambia English
Cameroon English
Rwanda English
Germany Deutsch
France Français
Spain Català
Spain Español
Italy Italiano
Russia Русский
Japan English
Brazil Português
Brazil Português
Mexico Español
Philippines English
Pakistan English
Turkey Türkçe
Vietnam English
Thailand English
South Korea English
Australia English
China 中文
Somalia English
Canada English
Canada Français
Netherlands Nederlands

How to Check SSL Certificate Expiration Date in Windows Command Line

SSL/TLS certificates underpin secure web browsing and data transfers, but it’s crucial to keep track of their expiration dates. Windows offers a few ways to check this information directly from the command line. Here’s a breakdown of the methods:

1. Using the ‘certutil’ Command

The certutil command-line utility is designed for managing certificates in Windows. Here’s how to use it:

  1. Find the Certificate: If you have a local certificate file (.cer, .crt), locate it.
  2. Open Command Prompt: Type ‘cmd’ into the Windows search bar and open the Command Prompt.
  3. Run the command: Bashcertutil -verify -urlfetch certificate.cer Replace certificate.cer with the name of your certificate file.
  4. Locate “Not After”: The output contains a line indicating the expiration date (“Not After”).

2. Remote Website Certificate with OpenSSL

While not built-in to Windows, OpenSSL is a popular tool that can be downloaded and used for certificate checks.

  1. Download OpenSSL: If you don’t have it, download the Windows binary from a reputable source (e.g., https://slproweb.com/products/Win32OpenSSL.html)
  2. Open Command Prompt:
  3. Run the command: Bashopenssl s_client -connect www.example.com:443 < /dev/null | openssl x509 -noout -dates Replace www.example.com with the domain you want to check. Look for the “notAfter” field in the output.

Important Considerations

  • Local vs. Remote: The first method is geared toward locally stored certificate files, while the second inspects certificates on remote websites.
  • OpenSSL Installation: The OpenSSL method requires you to download and install OpenSSL for Windows.

Additional Tips

  • PowerShell: If you’re comfortable with PowerShell, it also offers ways to examine certificates.
  • Certificate Store You can view certificates installed in your Windows Certificate Store graphically using the Certificate Manager (certmgr.msc).

In Summary

Knowing how to check SSL certificate expiration dates in Windows command line aids with timely renewals, ensuring the security and smooth functionality of your systems.

Read also:

error

Enjoy this blog? Please spread the word :)