Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 296
Nick Bitzer Avatar asked Aug 19 '14 19:08

Nick Bitzer


People also ask

How do I know when my Mac certificate expires?

In Safari and Chrome on Mac OSIn the list of Keychains, click login. Click My Certificates under Category in the lower left-hand corner of the sidebar. There should be a certificate under your name listed. The expiration date should be listed to the right.


1 Answers

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*
like image 112
Matt Stevens Avatar answered Oct 19 '22 05:10

Matt Stevens