% layout 'default'; % title 'Lookup';
<% 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]; my $flag = $data[1]; my $keylen = $data[2]; my $algo = $data[3]; my $keyid = $data[4]; my $create = $data[5]; my $expire = $data[6]; my $userid = $data[9]; my $signatureclass = $data[10]; if ($record eq 'pub') { if ($expire) { $string .= "public key: " . gmtime($create) . " -> " . ( $expire ? gmtime($expire) : 'n/a' ) . " | flags: $flag\n" } else { $string .= "public key: " . gmtime($create) . " -> " . ( $expire ? gmtime($expire) : 'n/a' ) . " | flags: $flag\n" } } elsif ($record eq 'fpr') { if (not $pubkey_fpr) { $string .= "fingerprint: $userid\n"; $pubkey_fpr = 1; } else { $string .= "fingerprint: $userid\n"; } } elsif ($record eq 'uid') { my $safe = $userid; $safe =~ s/>/>/g if $safe; $safe =~ s/</g if $safe; $string .= "\n$safe\n" if $safe; } elsif ($record eq 'sig') { $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) . " | " (exists $sigcls{$signatureclass}) ? ($string .= $sigcls{$signatureclass}) : ($string .= $signatureclass); $string .= "\n"; } } %> %== $string<% } #rev:::1:95660BB822BAC934:1388248001:::::[selfsig]::20x: #pub:u:255:22:9904E01052985080:1730221618:1856365618::u:,4 #fpr:::::::::50B750CC829A462D016AD9679904E01052985080: #uid:::::::::Jake Thoughts (jjakke)