]> granicus.if.org Git - php/commitdiff
Fixing failing tests for Argon2
authorCharles R. Portwood II <charlesportwoodii@erianna.com>
Mon, 11 Jul 2016 23:39:04 +0000 (18:39 -0500)
committerCharles R. Portwood II <charlesportwoodii@erianna.com>
Mon, 11 Jul 2016 23:39:04 +0000 (18:39 -0500)
- Added "Skipped:" flag so argon2 tests would be skipped when
  PHP is compiled without Argon2 support

ext/standard/tests/password/password_get_info_argon2.phpt
ext/standard/tests/password/password_hash_argon2.phpt
ext/standard/tests/password/password_hash_error_argon2.phpt
ext/standard/tests/password/password_needs_rehash_argon2.phpt
ext/standard/tests/password/password_verify_argon2.phpt

index c5743ae61f97a5cc0c20585793773cfe316782ed..d756977d7b85004ff29ca85b0ce66b2ea5eb60c3 100644 (file)
@@ -2,7 +2,8 @@
 Test normal operation of password_get_info() with Argon2
 --SKIPIF--
 <?php
-if (!defined(PASSWORD_ARGON2)) die('password_get_info not built with Argon2');
+if (!defined('PASSWORD_ARGON2')) die('Skipped: password_get_info not built with Argon2');
+?>
 --FILE--
 <?php
 // Test Argon2i
index af9e08e7f0a6ff0ab94ffb9cbdcdc37dc879fcf9..87e42d33964a55711d0d12258959195911fd4de5 100644 (file)
@@ -2,7 +2,7 @@
 Test normal operation of password_hash() with argon2
 --SKIPIF--
 <?php
-if (!defined(PASSWORD_ARGON2)) die('password_get_info not built with Argon2');
+if (!defined('PASSWORD_ARGON2')) die('Skipped: password_get_info not built with Argon2');
 --FILE--
 <?php
 
index 6b24ee9ef74fc77bf733bd2d653e20b563346308..60496447a26c0cae1c4c32eeb08d495a9dfc22d6 100644 (file)
@@ -2,7 +2,8 @@
 Test error operation of password_hash() with argon2
 --SKIPIF--
 <?php
-if (!defined(PASSWORD_ARGON2)) die('password_get_info not built with Argon2');
+if (!defined('PASSWORD_ARGON2')) die('Skipped: password_get_info not built with Argon2');
+?>
 --FILE--
 <?php
 var_dump(password_hash('test', PASSWORD_ARGON2, ['m_cost' => 0]));
index 6393cb7f3ebb87965f931f7e833dde4d7cfe4328..478f923f21ef84db2e36eb04d0d8355a61be1dea 100644 (file)
@@ -2,7 +2,8 @@
 Test normal operation of password_needs_rehash() with argon2
 --SKIPIF--
 <?php
-if (!defined(PASSWORD_ARGON2)) die('password_get_info not built with Argon2');
+if (!defined('PASSWORD_ARGON2')) die('Skipped: password_get_info not built with Argon2');
+?>
 --FILE--
 <?php
 var_dump(password_needs_rehash('$argon2i$v=19$m=65536,t=3,p=1$YkprUktYN0lHQTd2bWRFeA$79aA+6IvgclpDAJVoezProlqzIPy7do/P0sBDXS9Nn0', PASSWORD_ARGON2, ['m_cost' => 1<<17]));
index e5afce424caa813c764b1d10983f3ebfabe3dff4..ec174d3603cd31a42f12b014008604cfbadde557 100644 (file)
@@ -2,11 +2,11 @@
 Test normal operation of password_verify() with argon2
 --SKIPIF--
 <?php
-if (!defined(PASSWORD_ARGON2)) die('password_get_info not built with Argon2');
+if (!defined('PASSWORD_ARGON2')) die('Skipped: password_get_info not built with Argon2');
+?>
 --FILE--
 <?php
 
-
 var_dump(password_verify('test', '$argon2d$v=19$m=32768,t=2,p=1$YWpxd0VYRW9MLmp6VjFPZw$pWV5IsbBfjEK5c0bHzvAo0FsDNHUyM4p6j8vf2cxzb8'));
 
 var_dump(password_verify('argon2', '$argon2d$v=19$m=32768,t=2,p=1$YWpxd0VYRW9MLmp6VjFPZw$pWV5IsbBfjEK5c0bHzvAo0FsDNHUyM4p6j8vf2cxzb8'));