diff options
author | Nikita Popov <nikic@php.net> | 2016-07-22 18:30:30 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2016-07-22 18:30:30 +0200 |
commit | 40b312d4c2d129f2085af585566fa417b43419e8 (patch) | |
tree | 3dc9c86681a7f4ab76099a863beb76d700864515 | |
parent | bb51da29dc73a5cb9c26e4926d9f0aa4d54f600b (diff) | |
download | php-git-40b312d4c2d129f2085af585566fa417b43419e8.tar.gz |
Use OPENSSL_RAW_DATA in raw data decryption tests
-rw-r--r-- | ext/openssl/tests/openssl_decrypt_ccm.phpt | 9 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_decrypt_gcm.phpt | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/ext/openssl/tests/openssl_decrypt_ccm.phpt b/ext/openssl/tests/openssl_decrypt_ccm.phpt index 359ce42ed9..2107fea1fb 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 0202e6430b..d8c464346a 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-- |