I need private key listing to show the revocation status I tried these two commands
- gpg -K
- gpg --with-colons -K
But neither listing says which keys has been revoked
Is there a list command that show the revocation?
Use the following:
gpg --list-key ...
Now, to actually check the key, use
gpg --list-key
. This is what a non-revoked key will look like:0 nat@pigtown:~$ gpg --list-key $(gpg --with-colons --fingerprint "ssh://zimmermann.mayfirst.org" |grep fpr |cut -f10 -d ":") pub 2048R/860E8F9C 2008-10-29 [expires: 2014-09-25] uid ssh://zimmermann.mayfirst.org uid ssh://zimmerman.mayfirst.org 0 nat@pigtown:~$
And this is what a revoked key will look like:
0 nat@pigtown:~$ gpg --list-key $(gpg --with-colons --fingerprint "ssh://sontag.mayfirst.org" |grep fpr |cut -f10 -d ":") pub 2048R/AE2C8DE3 2010-09-10 [revoked: 2011-10-30] uid ssh://sontag.mayfirst.org 0 nat@pigtown:~$
Observe the "revoked" in the pub line there, compared to the expiration date in the example above. You can probably guess what that changes to when a key expires.