Question: 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?

Answer: 
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*

```
The selected answer did not quite work for me, but a slight variation found [here](https://github.com/hewigovens/hewigovens.github.com/wiki/codesign-extract-certificates) using `openssl` did the trick. In short,

```
codesign -dvvvv --extract-certificates /Applications/Example.app

openssl x509 -inform DER -in codesign0 -text

```