From 0a3fddec88c7987fe516d29e1bc210bcda520fcd Mon Sep 17 00:00:00 2001 From: jake Date: Sat, 16 Nov 2024 01:54:07 -0500 Subject: [PATCH] fix bug where v4 signature doesnt have keyid but does have fingerprint issuer -> make it appear correctly --- keyserver | 2 +- templates/pkslookup.html.ep | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/keyserver b/keyserver index ea6dabf..e9e7278 100755 --- a/keyserver +++ b/keyserver @@ -13,7 +13,7 @@ use KeyData; plugin Config => {file => $ARGV[1]}; -my $VERSION = "1.0.0"; +my $VERSION = "1.0.1"; my $config = app->config(); # hypnotoad -f ./keyserver ./keyserver.conf my $start_time; diff --git a/templates/pkslookup.html.ep b/templates/pkslookup.html.ep index 7ae0c26..8c58ea0 100644 --- a/templates/pkslookup.html.ep +++ b/templates/pkslookup.html.ep @@ -77,8 +77,10 @@ # V6 keys 'MUST NOT' create keyids. However, they do have key issuer, which I will create a keyid from (high bits, not low bits like with V4) . if ($keyid) { $string .= $keyid - } elsif ($key_issuer) { + } elsif ($key_issuer and $version == 6) { $string .= substr($key_issuer,0,16) . "[trun]"; + } elsif ($key_issuer and $version == 4) { + $string .= "[trun]" . substr($key_issuer,-16); } if ($expire and (int $expire)) {