Search code examples
certificatecode-signing-certificate

How to automate to check when a code signing certificate expired


I have a desktop application created with signed binaries and a code signing certificate that expires in a year, just as a reminder I want to keep checking when the certificate expires. Is there a way I can automate this?


Solution

  • You can run openssl command line utility to print the expiration time of the certificate:

    openssl x509 -enddate -noout -in <your certificate file>
    

    The output is something line this:

    notAfter=Feb 10 12:05:45 2023 GMT
    

    Then you can create a script that will run periodically and will check this value