diff options
Diffstat (limited to 'ext/openssl/tests/bug73833.phpt')
-rw-r--r-- | ext/openssl/tests/bug73833.phpt | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/openssl/tests/bug73833.phpt b/ext/openssl/tests/bug73833.phpt index 2ea5f9e411..ad4e0874a8 100644 --- a/ext/openssl/tests/bug73833.phpt +++ b/ext/openssl/tests/bug73833.phpt @@ -10,18 +10,18 @@ $passwords = ["abc\x00defghijkl", "abcdefghikjl"]; $conf = ['config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf']; foreach($passwords as $password) { - $key = openssl_pkey_new($conf); + $key = openssl_pkey_new($conf); - if (openssl_pkey_export($key, $privatePEM, $password, $conf) === false) { - echo "Failed to encrypt.\n"; - } else { - echo "Encrypted!\n"; - } - if (openssl_pkey_get_private($privatePEM, $password) === false) { - echo "Failed to decrypt.\n"; - } else { - echo "Decrypted!\n"; - } + if (openssl_pkey_export($key, $privatePEM, $password, $conf) === false) { + echo "Failed to encrypt.\n"; + } else { + echo "Encrypted!\n"; + } + if (openssl_pkey_get_private($privatePEM, $password) === false) { + echo "Failed to decrypt.\n"; + } else { + echo "Decrypted!\n"; + } } ?> --EXPECT-- |