Subject: | GnuPG::Interface should always use --fixed-list-mode [PATCH] |
Date: | Sat, 01 May 2010 14:57:17 -0400 |
To: | submit [...] bugs.debian.org, bug-GnuPG-Interface [...] rt.cpan.org |
From: | Daniel Kahn Gillmor <dkg [...] fifthhorseman.net> |
Package: libgnupg-interface-perl
the --fixed-list-mode option for gpg is designed for cleaner/simpler
machine-parseable output:
http://www.gnupg.org/documentation/manuals/gnupg-devel/GPG-Input-and-Output.html#index-fixed_002dlist_002dmode-178
Show quoted text
> Do not merge primary user ID and primary key in --with-colon listing
> mode and print all timestamps as seconds since 1970-01-01.
As of version 2.0.10 (Jan 2009), gpg2 uses --fixed-list-mode by default:
http://lists.gnupg.org/pipermail/gnupg-announce/2009q1/000284.html
As a consequence, using gpg2 with GnuPG::Interface produces an extra
GnuPG::UserID object on each key with an empty string and no signatures.
Worse, this empty User ID inherits the validity of the key itself,
which is the highest validity of any other User ID.
As a result, every key that has a fully-valid User ID appears to also
have a full-valid User ID (albeit one with no signatures) of "".
The attached patch enforces the use of --fixed-list-mode (so both gpg 1
and gpg 2 will behave in the same way) and cleans up the creation of the
mistaken initial empty User ID.
Thanks for GnuPG::Interface!
--dkg
Message body is not shown because sender requested not to inline it.
Message body not shown because it is not plain text.