I am trying to get the expiration date of a certificate by an application using the codeign command line tool, but I cannot find the expiration date of the certificate. Any ideas?
Use the code to extract the certificates to the current directory:
codesign --display --extract-certificates /Applications/Example.app
Then you can use Quick Look to view:
qlmanage -c public.x509-certificate -p codesign*