com php-src: Use OPENSSL_RAW_DATA in raw data decry ption tests: ext/openssl/tests/openssl_decrypt_ccm. phpt
ext/openssl/tests/openssl_decrypt_gcm.phpt
| From: | Nikita Popov | Date: | Fri, 22 Jul 2016 16:30:30 +0000 |
| Subject: | com php-src: Use OPENSSL_RAW_DATA in raw data decry ption tests: ext/openssl/tests/openssl_decrypt_ccm. phpt ext/openssl/tests/openssl_decrypt_gcm.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93331@lists.php.net to get a copy of this message | ||
Commit: 40b312d4c2d129f2085af585566fa417b43419e8
Author: Nikita Popov <nikic@php.net> Fri, 22 Jul 2016 18:30:30 +0200
Parents: bb51da29dc73a5cb9c26e4926d9f0aa4d54f600b
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=40b312d4c2d129f2085af585566fa417b43419e8
Log:
Use OPENSSL_RAW_DATA in raw data decryption tests
Changed paths:
M ext/openssl/tests/openssl_decrypt_ccm.phpt
M ext/openssl/tests/openssl_decrypt_gcm.phpt
Diff:
diff --git a/ext/openssl/tests/openssl_decrypt_ccm.phpt b/ext/openssl/tests/openssl_decrypt_ccm.phpt
index 359ce42..2107fea 100644
--- a/ext/openssl/tests/openssl_decrypt_ccm.phpt
+++ b/ext/openssl/tests/openssl_decrypt_ccm.phpt
@@ -21,11 +21,14 @@ foreach ($tests as $idx => $test) {
}
// no IV
-var_dump(openssl_decrypt($test['ct'], $method, $test['key'], 0, NULL,
$test['tag'], $test['aad']));
+var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
+ NULL, $test['tag'], $test['aad']));
// failed because no AAD
-var_dump(openssl_decrypt($test['ct'], $method, $test['key'], 0,
$test['iv'], $test['tag']));
+var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
+ $test['iv'], $test['tag']));
// failed because wrong tag
-var_dump(openssl_decrypt($test['ct'], $method, $test['key'], 0,
$test['iv'], str_repeat('x', 10), $test['aad']));
+var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
+ $test['iv'], str_repeat('x', 10), $test['aad']));
?>
--EXPECTF--
diff --git a/ext/openssl/tests/openssl_decrypt_gcm.phpt b/ext/openssl/tests/openssl_decrypt_gcm.phpt
index 0202e64..d8c4643 100644
--- a/ext/openssl/tests/openssl_decrypt_gcm.phpt
+++ b/ext/openssl/tests/openssl_decrypt_gcm.phpt
@@ -21,11 +21,14 @@ foreach ($tests as $idx => $test) {
}
// no IV
-var_dump(openssl_decrypt($test['ct'], $method, $test['key'], 0, NULL,
$test['tag'], $test['aad']));
+var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
+ NULL, $test['tag'], $test['aad']));
// failed because no AAD
-var_dump(openssl_decrypt($test['ct'], $method, $test['key'], 0,
$test['iv'], $test['tag']));
+var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
+ $test['iv'], $test['tag']));
// failed because wrong tag
-var_dump(openssl_decrypt($test['ct'], $method, $test['key'], 0,
$test['iv'], str_repeat('x', 16), $test['aad']));
+var_dump(openssl_decrypt($test['ct'], $method, $test['key'], OPENSSL_RAW_DATA,
+ $test['iv'], str_repeat('x', 16), $test['aad']));
?>
--EXPECTF--