Search code examples
macoscertificatecodesign

Get the certificate expiration date of an application using codesign on mac?


I'm trying to retrieve the certificate expiration date an application using the codesign command line tool, but I cannot seem to find the date that the certificate will expire. Any ideas?


Solution

  • Use codesign to extract the certificates to the current directory:

    codesign --display --extract-certificates /Applications/Example.app
    

    You can then use Quick Look to view them:

    qlmanage -c public.x509-certificate -p codesign*