Control: retitle -1 gpglist chokes on direct-key signatures Control: tag -1 pending
Hi Giovanni,
On Mon, 04 Feb 2019 at 11:16:32 +0100, Giovanni Mascellani wrote:
> I am sorry I am not able to provide further information, because I
> have no idea what gpglist is not liking about my key.
It doesn't like the direct-keys signatures you have at the begining of
your key (type 0x1F, cf. RFC 4880 sec. 5.2.1), before the first UID:
$ gpg --list-options no-show-uid-validity --list-sigs
82D119A840C6EFCA6F5AF9459EDCC991D9AB457E | head -n 7
pub rsa4096 2010-02-24 [SC] [expires: 2020-04-22]
82D119A840C6EFCA6F5AF9459EDCC991D9AB457E
sig R 9EDCC991D9AB457E 2010-02-24 Giovanni Mascellani
<[email protected]>
sig R 9EDCC991D9AB457E 2010-02-24 Giovanni Mascellani
<[email protected]>
sig R 9EDCC991D9AB457E 2010-02-24 Giovanni Mascellani
<[email protected]>
sig R 9EDCC991D9AB457E 2010-02-24 Giovanni Mascellani
<[email protected]>
uid Giovanni Mascellani <[email protected]>
> Also, I would really like to use gpglist on my key! :-)
The attached patch should fix this. :-)
Cheers,
--
Guilhem.
gpglist: Don't choke on direct-key signatures (type 0x1F).
Closes: #921331.
--- a/gpglist
+++ b/gpglist
@@ -128,9 +128,10 @@ while (<$SIGS>) {
push @uids, $uid; # preserve the order
$uids{$uid} = $2;
}
- elsif (/^sig:(?:[^:]*:){3}([0-9A-F]{16}):(\d+):(\d*):(?:[^:]*:){2}([^:]+):(1[0-3][lx])(?::.*)?$/) {
+ elsif (/^sig:(?:[^:]*:){3}([0-9A-F]{16}):(\d+):(\d*):(?:[^:]*:){2}([^:]+):(1[0-3fF])[lx](?::.*)?$/) {
$id = $1;
next if $3 ne '' and $3 < $now; # expired
+ next if lc $5 eq '1f'; # direct-key signature
$ids{$id} = $4;
# keep only the most recent sig (a more recent sig might appear anywhere in the list)
$sigs{$id}->{$uid} = $2 unless defined $sigs{$id}->{$uid} and
signature.asc
Description: PGP signature

