diff --git a/templates/pkslookup.html.ep b/templates/pkslookup.html.ep index 10cb2c7..c0b6fcc 100644 --- a/templates/pkslookup.html.ep +++ b/templates/pkslookup.html.ep @@ -9,6 +9,17 @@ % my @row = split /\n/, $item;
<% + my %sigcls = ( + '10x' => 'self sig', + '11x' => 'self sig', + '12x' => 'self sig', + '13x' => 'self sig', + '18x' => 'subkey bind', + '19x' => 'primary key bind', + '20x' => 'revocation sig', + '28x' => 'subkey revocation sig', + '30x' => 'cert revocation sig', + ) for my $row (@row) { my @data = split /:/, $row; my $record = $data[0]; @@ -45,13 +56,21 @@ $string .= "\n$safe\n" if $safe; } elsif ($record eq 'sig') { - $string .= "signature: $keyid | " . gmtime($create) . " -> ". ( $expire ? gmtime($expire) : 'n/a' ) . " | $signatureclass\n"; + $string .= "signature: $keyid | " . gmtime($create) . " -> ". ( $expire ? gmtime($expire) : 'n/a' ) . " | "; + (exists $sigcls{$signatureclass}) + ? ($string .= $sigcls{$signatureclass}) + : ($string .= $signatureclass); + $string .= "\n"; } elsif ($record eq 'sub') { $string .= "\nsub key: " . gmtime($create) . " -> " . ( $expire ? gmtime($expire) : 'n/a' ) . " | flags: $flag\n" } elsif ($record eq 'rev') { - $string .= "revocation: $keyid | " . gmtime($create) . " | $signatureclass \n"; + $string .= "revocation: $keyid | " . gmtime($create) . " | " + (exists $sigcls{$signatureclass}) + ? ($string .= $sigcls{$signatureclass}) + : ($string .= $signatureclass); + $string .= "\n"; } } %>