On Thu, Apr 04, 2013 at 05:36:46PM -0400, [email protected] wrote: > Daniel Kahn Gillmor dkg at fifthhorseman.net > wrote on Thu Apr 4 22:56:50 CEST 2013 : > > >gpg will emit the fingerprints for the subkeys if you supply the > --fingerprint argument twice. So you might try parsing the output of: > > gpg --list-keys --with-colons --fingerprint --fingerprint > --fixed-list-mode $PGPID > > ----- > > It's even enough to just do: > > gpg --fingerprint --fingerprint > > and gnupg will list the keys and subkeys each with their short id followed by > a line > Key fingerprint with the fingerprint
If *you* want to see the fingerprint, that's fine. If you want to write a *program* that needs the fingerprint, then --with-colons is pretty much mandatory, since it avoids all the issues of changing messages, localized messages, weird characters that might be mistaken for parts of messages, etc. Of course, for writing programs that interface with GnuPG, it's best to go all the way and use GPGME, but for some simple tasks the output of --with-colons is exactly right. I didn't know about --fixed-list-mode; thanks! G'luck, Peter -- Peter Pentchev [email protected] [email protected] [email protected] PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 If wishes were fishes, the antecedent of this conditional would be true.
signature.asc
Description: Digital signature
_______________________________________________ Gnupg-users mailing list [email protected] http://lists.gnupg.org/mailman/listinfo/gnupg-users
