Blog | G5 Cyber Security

Check Local Certificate Validity

TL;DR

You can check if a certificate is valid on your computer using built-in tools or command-line utilities. This guide shows you how to do it for different operating systems.

Checking Certificate Validity

  1. Understand the Basics
  • Windows
    1. Using Certificate Manager:
  • Using PowerShell:
  • Get-ChildItem Cert:LocalMachineMy | Where-Object {$_.Subject -eq "your_certificate_subject"}

    Replace your_certificate_subject with the certificate’s subject name.

  • macOS
    1. Using Keychain Access:
  • Using Terminal:
  • security find-certificate -i your_certificate_name

    Replace your_certificate_name with the certificate’s name or part of its subject.

  • Linux (using OpenSSL)
    1. Check Certificate Details:
    2. openssl x509 -in your_certificate.pem -text -noout

      Replace your_certificate.pem with the path to your certificate file.

  • Verify Certificate Chain:
  • openssl verify -CAfile /etc/ssl/certs/ca-certificates.crt your_certificate.pem

    This command verifies if the certificate is trusted by the system’s CA store.

  • Browser Checks
  • Exit mobile version