From 8743246641f5018474aa1165f93117cec9ba2003 Mon Sep 17 00:00:00 2001 From: philsmd Date: Sat, 19 Aug 2023 11:34:57 +0200 Subject: [PATCH] verify test fix for -m 13400/-m 29700 --- tools/test_modules/m13400.pm | 20 +++++++++++++++++++- tools/test_modules/m29700.pm | 20 +++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/tools/test_modules/m13400.pm b/tools/test_modules/m13400.pm index f4a641df5..a960eeb2e 100644 --- a/tools/test_modules/m13400.pm +++ b/tools/test_modules/m13400.pm @@ -239,14 +239,32 @@ sub module_generate_hash $final_algorithm = "Crypt::Rijndael"; } - my $cipher = Crypt::CBC->new ({ + my $cipher; + + if ($version == 1) + { + $cipher = Crypt::CBC->new ({ + key => $final_key, + cipher => $final_algorithm, + iv => $enc_iv, + literal_key => 1, + header => "none", + padding => "standard", + keysize => 32 + }); + } + else + { + $cipher = Crypt::CBC->new ({ key => $final_key, cipher => $final_algorithm, iv => $enc_iv, literal_key => 1, header => "none", + padding => "none", keysize => 32 }); + } my $hash; diff --git a/tools/test_modules/m29700.pm b/tools/test_modules/m29700.pm index 8b9c2a47a..a582c4948 100644 --- a/tools/test_modules/m29700.pm +++ b/tools/test_modules/m29700.pm @@ -243,14 +243,32 @@ sub module_generate_hash $final_algorithm = "Crypt::Rijndael"; } - my $cipher = Crypt::CBC->new ({ + my $cipher; + + if ($version == 1) + { + $cipher = Crypt::CBC->new ({ + key => $final_key, + cipher => $final_algorithm, + iv => $enc_iv, + literal_key => 1, + header => "none", + padding => "standard", + keysize => 32 + }); + } + else + { + $cipher = Crypt::CBC->new ({ key => $final_key, cipher => $final_algorithm, iv => $enc_iv, literal_key => 1, header => "none", + padding => "none", keysize => 32 }); + } my $hash;