]> granicus.if.org Git - php/commitdiff
rely on bundle config, instead of system one
authorRemi Collet <remi@php.net>
Wed, 26 Apr 2017 12:41:40 +0000 (14:41 +0200)
committerRemi Collet <remi@php.net>
Wed, 26 Apr 2017 12:41:40 +0000 (14:41 +0200)
ext/openssl/tests/bug73833.phpt

index e6a298fdcc8ac5becc75221b0ff2b9823c2f224a..cf46092a4613b2b7f0242f7a3393117c1aba0ee5 100644 (file)
@@ -7,11 +7,12 @@ if (!extension_loaded("openssl")) die("skip openssl not loaded");
 --FILE--
 <?php
 $passwords = ["abc\x00defghijkl", "abcdefghikjl"];
+$conf = ['config' => __DIR__.'/openssl.cnf'];
 
 foreach($passwords as $password) {
-       $key = openssl_pkey_new();
+       $key = openssl_pkey_new($conf);
 
-       if (openssl_pkey_export($key, $privatePEM, $password) === false) {
+       if (openssl_pkey_export($key, $privatePEM, $password, $conf) === false) {
                echo "Failed to encrypt.\n";
        } else {
                echo "Encrypted!\n";