adjust number for opengpg format length_of_length

This commit is contained in:
jake 2024-11-16 02:56:14 -05:00
parent 03e6ae523b
commit ee5e4b34e4
2 changed files with 2 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.2"; my $VERSION = "1.0.3";
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

@ -119,7 +119,7 @@ class KeyData {
$length_field = ((($first_octet - 192) << 8) + ($second_octet) + 192); # probably fine $length_field = ((($first_octet - 192) << 8) + ($second_octet) + 192); # probably fine
} }
if ($first_octet == 255) { if ($first_octet == 255) {
$length_of_length = 5; $length_of_length = 4;
#$subpacket_length = [4-octet scalar starting at 2nd_octet]; #$subpacket_length = [4-octet scalar starting at 2nd_octet];
$length_field = (unpack('N', substr $data, 1, 4)); # idk $length_field = (unpack('N', substr $data, 1, 4)); # idk
warn "Give me the key that caused this to be emited"; warn "Give me the key that caused this to be emited";