From 598f7db2e7efaff2f22d581acc4e9447abce2cea Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Wed, 29 Sep 2021 21:27:28 +0100 Subject: [PATCH] skip ARGON2ID* things if using an old PHP variant --- tests/PacryptTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/PacryptTest.php b/tests/PacryptTest.php index 8ae730b2..cf92417d 100644 --- a/tests/PacryptTest.php +++ b/tests/PacryptTest.php @@ -293,6 +293,9 @@ class PaCryptTest extends \PHPUnit\Framework\TestCase public function testWeSupportWhatWeSayWeDo() { foreach (PFACrypt::DOVECOT_NATIVE as $algorithm) { + if (phpversion() < 7.3 && ($algorithm == 'ARGON2ID' || $algorithm == 'ARGON2ID.B64')) { + continue; // needs PHP7.3+ + } $c = new PFACrypt($algorithm); $hash1 = $c->pacrypt('test123'); @@ -317,7 +320,7 @@ class PaCryptTest extends \PHPUnit\Framework\TestCase 'php_crypt:SHA256' => '$5$UaZs6ZuaLkVPx3bM$4JwAqdphXVutFYw7COgAkp/vj09S1DfjIftxtjqDrr/', 'sha512.b64' => '{SHA512-CRYPT.B64}JDYkMDBpOFJXQ0JwMlFMMDlobCRFMVFWLzJjbENPbEo4OTg0SjJyY1oxeXNTaFJIYVhJeVdFTDdHRGl3aHliYkhQUHBUQjZTM0lFMlYya2ZXczZWbHY0aDVNa3N0anpud0xuRTBWZVRELw==', ]; - + foreach ($mechs as $mech => $example_hash) { if ($mech == 'mysql_encrypt' && Config::read_string('database_type') != 'mysql') { continue;