]> git.sthu.org Git - pgp-tools.git/commitdiff
Note signature class in output
authorweasel <weasel@b513b33f-fedd-0310-b452-c3deb5f4c849>
Wed, 6 Jul 2005 11:37:05 +0000 (11:37 +0000)
committerweasel <weasel@b513b33f-fedd-0310-b452-c3deb5f4c849>
Wed, 6 Jul 2005 11:37:05 +0000 (11:37 +0000)
git-svn-id: svn://svn.debian.org/pgp-tools/trunk@114 b513b33f-fedd-0310-b452-c3deb5f4c849

gpgsigs/gpgsigs

index 38db0ec686b37ec134d90fe2c989d1594336d58c..0caf08f68f730bcd8246b4686bb9545468df93ff 100755 (executable)
@@ -182,9 +182,21 @@ while (<SIGS>) {
                $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;