From: php at divinehawk dot com Operating system: PHP version: 5.2.9 PHP Bug Type: OpenSSL related Bug description: openssl_csr_new does not allow multiple values/field in dn
Description: ------------ With the latest 5.2 (and trunk), you can't have multiple fields with the same name in the DN. E.g. it's impossible to produce CN=server, OU= Company, OU=Division, OU=Sector, O=Organization Reproduce code: --------------- $dn = array("commonName" => "server", "organizationalUnitName" => array("Company", "Division", "Section"), "organizationName" => "Organization", ); $privkey = openssl_pkey_new(); $csr = openssl_csr_new($dn, $privkey); openssl_csr_export($csr, $csrout); file_put_contents("test.csr", $csrout); Expected result: ---------------- openssl req -in test.csr -noout -subject subject=/CN=server/OU=Company/OU=Division/OU=Section/O=Organization Actual result: -------------- PHP Notice: Array to string conversion in /var/www/html/bug/cert.php on line 9 Then: openssl req -in test.csr -noout -subject subject=/CN=server/OU=Array/O=Organization -- Edit bug report at http://bugs.php.net/?id=48520&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48520&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48520&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48520&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48520&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48520&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48520&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48520&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48520&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48520&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48520&r=support Expected behavior: http://bugs.php.net/fix.php?id=48520&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48520&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48520&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48520&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48520&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48520&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48520&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48520&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48520&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48520&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48520&r=mysqlcfg