From d1509d9272f70fb6f747941e6332fc90d8f60636 Mon Sep 17 00:00:00 2001 From: philsmd Date: Mon, 6 Sep 2021 20:08:48 +0200 Subject: [PATCH] tests: fixes -m 26900 verify --- tools/test_modules/m26900.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/test_modules/m26900.pm b/tools/test_modules/m26900.pm index 89dbb4446..66c3f9a53 100644 --- a/tools/test_modules/m26900.pm +++ b/tools/test_modules/m26900.pm @@ -24,6 +24,8 @@ sub module_generate_hash my $pad_len = 34 - length ($engineID); + my $engineID_orig = $engineID; + $engineID = join '', $engineID, "0" x $pad_len; # make salt even if needed @@ -47,7 +49,7 @@ sub module_generate_hash $digest = substr ($digest, 0, 64); - my $hash = "\$SNMPv3\$5\$" . $pkt_num . "\$" . $salt . "\$" . $engineID . "\$" . $digest; + my $hash = "\$SNMPv3\$5\$" . $pkt_num . "\$" . $salt . "\$" . $engineID_orig . "\$" . $digest; return $hash; }