Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get fingerprints of OpenPGP keys

Tags:

gnupg

openpgp

pgp

I'm trying to get the fingerprints from the public OpenPGP keys of ActiveMQ. They are published at http://www.apache.org/dist/activemq/KEYS.

Unfortunately, not all the keys have fingerprints listed next to them. Do you have any idea how to proceed?

like image 317
Mazzy Avatar asked Oct 22 '17 22:10

Mazzy


2 Answers

The answer from Jens Erat does not seem to work any more (tested with gpg 2.2.12). It prints:

gpg: WARNING: no command supplied.  Trying to guess what you mean ...

Instead I used this command:

 gpg --show-keys file.pub
like image 78
Étienne Avatar answered Oct 25 '22 06:10

Étienne


gpg --show-keys --fingerprint <<EOT
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.1 (Darwin)

mQGiBEPspSsRBADdguKAxMQbA32vTQrCyONR6Zs/YGdvau2Zrr3SSSSR0Ge4FMjZ
4tzwpf6+32m4Bsf7YIwdLl0H5hI1CgT5gDl9kXvfaFUehFnwR+FDyiBRiyHjUpGF
4dgkQfWy9diYeWGtsvszsvWHXtED4SXb322StX4MfJj+YesA1iEdTiXK6wCg1QDa
RucfjC+kx4zPsJwkJOgYpyMEAMTiXtNwQcke6nIFb/lb5374NjwwVAuuMTrRWLyq
5HodugEIHaw3EitQWtnFfXNkXTJZzS6t2HAGv29UTfhiBzKdkydgCkOk2MLWISOV
fqcg0tNIp5ZJCmUHg3s+OFNSH4oUi65u+FyDseUid3OKtPI+ZhIk8N+DjOIg2Kvo
/UALA/9q+WfBd7re+W3iUtU7TutUcwbKsjP+jpaJeUHg2ChOBxVfQKt4YlPHVdrR
iCrfNi90Z8qbsZ0iAXuqexrfMq20pAPmpHRpe54mmP1CMT5m+Gq71eKIfkUrb3LC
/zv08dLG2vm9oghd242wbcifaX+t7AhNAIpe/WTvQsB0gpdO4LQmSGlyYW0gQ2hp
cmlubyA8aGlyYW1AaGlyYW1jaGlyaW5vLmNvbT6IWwQTEQIAGwUCQ+ylKwYLCQgH
AwIDFQIDAxYCAQIeAQIXgAAKCRCf8lmA9bp+T/G/AKDM1QDs7il/CJhTycgDvE3c
EOgUBwCfelsVK4sgBCooZptoaCCDgVtt71G5AQ0EQ+ylLhAEAJD25AWgwcNgBFKY
svExQaGIojIGJyn4Cf/5U30cui/K7fIU7JtyNhKcfZdCrh2hKx+x3H/dTF6e0SrR
hzKV7Dx0j76yhHHB1Ak25kjRxoU4Jk+CG0m+bRNTF9xz9k1ALSm3Y+A5RqNU10K6
e/5KsPuXMGSGoQgJ1H6g/i80Wf8PAAMFA/9mIxu7lMaqE1OE7EeAsHgLslNbi0h9
pjDUVNv8bc1Os2gBPaJD8B89EeheTHw6NMNIe75HVOpKk4UA0gvOBrxJqCr18yFJ
BM5sIlaEmuJwZOW4dDGOR1oS5qgE9NzpmyKhE+fu/S1wmy0coL667+1xZcnrPbUF
D4i7/aD1r8qJhohGBBgRAgAGBQJD7KUuAAoJEJ/yWYD1un5Pth0An0QEUs5cxpl8
zL5kZCj7c8MN8YZDAKDR9LTb6woveul50+uGtUl2fIH1uA==
=RBPl
-----END PGP PUBLIC KEY BLOCK-----
EOT
pub   dsa1024 2006-02-10 [SCA]
      E5B8 247A F8A6 19A2 8F90  FDFC 9FF2 5980 F5BA 7E4F
uid                      Hiram Chirino <[email protected]>
sub   elg1024 2006-02-10 [E]

From GPG manual -

       --show-keys
              This  commands  takes OpenPGP keys as input and prints information about them
              in the same way the command --list-keys does for locally stored key.  In  ad‐
              dition the list options show-unusable-uids, show-unusable-subkeys, show-nota‐
              tions and show-policy-urls are also enabled.  As usual for automated process‐
              ing, this command should be combined with the option --with-colons.

       --fingerprint
              List  all keys (or the specified ones) along with their fingerprints. This is
              the same output as --list-keys but with the additional output of a line  with
              the  fingerprint. May also be combined with --check-signatures.  If this com‐
              mand is given twice, the fingerprints of all secondary keys are  listed  too.
              This  command also forces pretty printing of fingerprints if the keyid format
              has been set to "none".

       --with-fingerprint
              Same  as  the command --fingerprint but changes only the format of the output
              and may be used together with another command.

My GnuPG version is 2.2.20

References -

https://unix.stackexchange.com/a/694646/356166

like image 30
Hrishikesh Kadam Avatar answered Oct 25 '22 06:10

Hrishikesh Kadam