--TEST-- Bug #50293 (Several openssl functions ignore the VCWD) --SKIPIF-- --FILE-- "GB", "stateOrProvinceName" => "Berkshire", "localityName" => "Newbury", "organizationName" => "My Company Ltd", "commonName" => "Demo Cert", ]; $args = array( "digest_alg" => "sha256", "private_key_bits" => 2048, "private_key_type" => OPENSSL_KEYTYPE_RSA, "encrypt_key" => true, "config" => $config ); mkdir(__DIR__ . "/bug50293"); chdir(__DIR__ . "/bug50293"); $privkey = openssl_pkey_get_private('file://' . __DIR__ . '/private_ec.key'); $csr = openssl_csr_new($dn, $privkey, $args); $sscert = openssl_csr_sign($csr, null, $privkey, 365, $args); openssl_csr_export($csr, $csrout);; openssl_x509_export($sscert, $certout); openssl_x509_export_to_file($sscert , "bug50293.crt", false); openssl_pkey_export_to_file($privkey, "bug50293.pem", null, $args); var_dump( file_exists("bug50293.crt"), file_exists("bug50293.pem") ); ?> --CLEAN-- --EXPECT-- bool(true) bool(true)