|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-01-06 19:27 UTC] requinix@php.net
-Status: Open
+Status: Feedback
[2019-01-06 19:27 UTC] requinix@php.net
[2019-01-06 21:09 UTC] joose dot vettenranta at kompassi dot fi
-Status: Feedback
+Status: Open
[2019-01-06 21:09 UTC] joose dot vettenranta at kompassi dot fi
[2019-01-06 21:12 UTC] joose dot vettenranta at kompassi dot fi
[2019-01-06 21:30 UTC] joose dot vettenranta at kompassi dot fi
[2019-12-01 19:39 UTC] bukka@php.net
[2019-12-01 19:39 UTC] bukka@php.net
-Status: Open
+Status: Wont fix
-Assigned To:
+Assigned To: bukka
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 00:00:01 2025 UTC |
Description: ------------ When creating new CSR, it will add "ST=Some-State, O=Internet Widgits Pty Ltd" to the subject if not defined in openssl_csr_new -function call. This has been a bug in PHP for a long time. Test script: --------------- <?php $config=array( "private_key_bits" => 2048, "private_key_type" => OPENSSL_KEYTYPE_RSA, ); $privkey = openssl_pkey_new($config); $csr = openssl_csr_new(array("C"=>"FI"), $privkey); openssl_csr_export($csr, $csrout); echo($csrout); /* using same system, but command line openssl command to generate csr works just fine. I have been using this code to do csr: $csr = shell_exec('openssl req -new -sha256 -key '.$tempDir.'/private.key -outform '.$format.' -subj "'.$subject.'"'); */ ?> $ php test.php > /tmp/foo3 $ openssl req -in /tmp/foo3 -noout -text Expected result: ---------------- Certificate Request: Data: Version: 0 (0x0) Subject: C=FI Actual result: -------------- Certificate Request: Data: Version: 0 (0x0) Subject: C=FI, ST=Some-State, O=Internet Widgits Pty Ltd