fix bug where v4 signature doesnt have keyid but does have fingerprint issuer -> make it appear correctly

This commit is contained in:
jake 2024-11-16 01:54:07 -05:00
parent 7b66561573
commit 0a3fddec88
2 changed files with 4 additions and 2 deletions

View file

@ -13,7 +13,7 @@ use KeyData;
plugin Config => {file => $ARGV[1]}; 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 $config = app->config(); # hypnotoad -f ./keyserver ./keyserver.conf
my $start_time; my $start_time;

View file

@ -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) . # 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) { if ($keyid) {
$string .= $keyid $string .= $keyid
} elsif ($key_issuer) { } elsif ($key_issuer and $version == 6) {
$string .= substr($key_issuer,0,16) . "[trun]"; $string .= substr($key_issuer,0,16) . "[trun]";
} elsif ($key_issuer and $version == 4) {
$string .= "[trun]" . substr($key_issuer,-16);
} }
if ($expire and (int $expire)) { if ($expire and (int $expire)) {