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?
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*