Since I’ve upgraded to PHP 5.4.6 (from 5.3), when I try to use openssl_csr_new :
$dn = array(
'localityName' => utf8_decode($localityName),
'stateOrProvinceName' => utf8_decode($stateOrProvinceName),
'countryName' => 'FR',
'organizationName' => utf8_decode($organizationName),
'commonName' => utf8_decode($commonName),
'emailAddress' => utf8_decode($emailAddress),
);
$privkey = openssl_pkey_new(
array(
'private_key_bits' => 1024,
'private_key_type' => OPENSSL_KEYTYPE_RSA
)
);
$csr = openssl_csr_new($dn, $privkey);
I get an error like this :
Warning: openssl_csr_new(): in /my_file.php on line 42
Not really easy to debug this since there is no message…
Somebody know a fix ?
I found out that if I remove all the utf8_decode which were used to render correctly the accented letters, it solve the problem.
Down side, the accented letters are not render correctly now. I hope this will be fix in the future releases of PHP.