1

I need private key listing to show the revocation status I tried these two commands

  1. gpg -K
  2. gpg --with-colons -K

But neither listing says which keys has been revoked

Is there a list command that show the revocation?

0

Is there a command that shows 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.

Source Checking OpenPGP Key and Signature Revocations

  • Thank you for your reply. 1, I tried gpg --list-options show-unusable-subkeys at command line, but it did not work. 2.I need a command that I can run each time, not just place in the option file. 3. I am not asking to just include the revoked keys in the listing, in my case they are included, the problem is that they are not marked in any way to show that they are revoked. They look just like the other keys. – Vivarto Aug 12 '18 at 10:35
  • @Vivarto Answer updated – DavidPostill Aug 12 '18 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.