From d90154fd1046ab7aaf6cb3d3c316e857887a0ade Mon Sep 17 00:00:00 2001 From: weasel Date: Wed, 6 Jul 2005 11:37:05 +0000 Subject: [PATCH] Note signature class in output git-svn-id: svn://svn.debian.org/pgp-tools/trunk@114 b513b33f-fedd-0310-b452-c3deb5f4c849 --- gpgsigs/gpgsigs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/gpgsigs/gpgsigs b/gpgsigs/gpgsigs index 38db0ec..0caf08f 100755 --- a/gpgsigs/gpgsigs +++ b/gpgsigs/gpgsigs @@ -182,9 +182,21 @@ while () { $uid = myrecode($1); next; } - if ( m/^sig:(?:.*?:){3,3}([0-9A-F]{8})([0-9A-F]{8}):(?:.*?:){3,3}(.*):.*?:/ ) { - $sigs->{$key}->{$uid}->{$1.$2} = $3; - $sigs->{$key}->{$uid}->{$2} = $3; + if ( m/^sig:(?:.*?:){3,3}([0-9A-F]{8})([0-9A-F]{8}):(?:.*?:){5,5}(.*?):/ ) { + my $class = $3; + if ($class eq '10x') { + $class = 'S'; + } elsif ($class eq '11x') { + $class = '1'; + } elsif ($class eq '12x') { + $class = '2'; + } elsif ($class eq '13x') { + $class = '3'; + } else { + $class = 's'; + }; + $sigs->{$key}->{$uid}->{$1.$2} = $class; + $sigs->{$key}->{$uid}->{$2} = $class; next; } if ( m/^uat:/ ) { @@ -229,7 +241,7 @@ sub print_tag } my $r = '('; foreach my $mykey (@mykeys) { - $r .= defined $sigs->{$key}->{$uid}->{$mykey} ? "S" : " "; + $r .= defined $sigs->{$key}->{$uid}->{$mykey} ? $sigs->{$key}->{$uid}->{$mykey} : ' '; } $r .= ')'; return $r; -- 2.39.5