From c6c87d2cb2ea9614a9062f67ee8954e9db8da8e0 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Sat, 12 Jul 2025 12:55:06 +0200 Subject: [PATCH] Unit tests: Updated install_modules.sh with Crypt::Passwd::XS, to test suite works also on Apple (ex: 1800) --- docs/changes.txt | 1 + tools/install_modules.sh | 1 + tools/test_modules/m01800.pm | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index f9c85e5e3..c5a5d8550 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -163,6 +163,7 @@ - Scrypt: Increase buffer sizes in module for hash mode 8900 to allow longer scrypt digests - Unicode: Update UTF-8 to UTF-16 conversion to match RFC 3629 - Unit tests: Updated install_modules.sh with Crypt::Argon2 +- Unit tests: Updated install_modules.sh with Crypt::Passwd::XS, to test suite works also on Apple (ex: 1800) - User Options: Added error message when mixing --username and --show to warn users of exponential delay - MetaMask: update extraction tool to support MetaMask Mobile wallets - SecureCRT MasterPassphrase v2: update module, pure kernels and test unit. Add optimized kernels. diff --git a/tools/install_modules.sh b/tools/install_modules.sh index 948856e34..a286ad864 100755 --- a/tools/install_modules.sh +++ b/tools/install_modules.sh @@ -37,6 +37,7 @@ cpan install Authen::Passphrase::LANManager \ Crypt::OpenSSH::ChachaPoly \ Crypt::OpenSSL::EC \ Crypt::OpenSSL::Bignum::CTX \ + Crypt::Passwd::XS \ Crypt::PBKDF2 \ Crypt::RC4 \ Crypt::Rijndael \ diff --git a/tools/test_modules/m01800.pm b/tools/test_modules/m01800.pm index a674d751c..0bfbc60db 100644 --- a/tools/test_modules/m01800.pm +++ b/tools/test_modules/m01800.pm @@ -7,6 +7,7 @@ use strict; use warnings; +use Crypt::Passwd::XS; sub module_constraints { [[0, 256], [0, 16], [0, 15], [0, 16], [-1, -1]] } @@ -20,11 +21,11 @@ sub module_generate_hash if (defined $iter) { - $hash_buf = crypt ($word, "\$6\$rounds=$iter\$$salt\$"); + $hash_buf = Crypt::Passwd::XS::unix_sha512_crypt ($word, "\$6\$rounds=$iter\$$salt\$"); } else { - $hash_buf = crypt ($word, "\$6\$$salt\$"); + $hash_buf = Crypt::Passwd::XS::unix_sha512_crypt ($word, "\$6\$$salt\$"); } my $hash = sprintf ("%s", $hash_buf);