note 119392 added to function.openssl-csr-get-subject

From: Date: Fri, 27 May 2016 12:51:05 +0000
Subject: note 119392 added to function.openssl-csr-get-subject
Groups: php.notes 
Request: Send a blank email to php-notes+get-205593@lists.php.net to get a copy of this message
This function may not return name fields in the order they appear in the certificate. For example, this CSR: -----BEGIN CERTIFICATE REQUEST----- MIHsMIGUAgEAMDIxEDAOBgNVBAsMB3VuaXQgIzExDDAKBgNVBAoMA29yZzEQMA4G A1UECwwHdW5pdCAjMjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABGvZnFxGuVzJ hOKPs5RNxZBS4vY6ERaqm5tKMGOhxLSfv/dpjDtNNdSHkIGNjYxclHYhxG0ku7BY PA5uPIjng1SgADAKBggqhkjOPQQDAgNHADBEAiB4GXhhbEU1UFTCe0dwJnKHTQuI xzYL5FnyhmKdixN/0gIgBXSm9S8L/oJ6rBxemin/V/xKv5jy4TEZuz84nnshxQQ= -----END CERTIFICATE REQUEST----- When processed by 'openssl -noout -subject' gives this: subject=/OU=unit #1/O=org/OU=unit #2 On the other hand, 'var_dump( openssl_csr_get_subject( "..." ) )' will produce this: csr = array(2) { ["OU"]=> array(2) { [0]=> string(7) "unit #1" [1]=> string(7) "unit #2" } ["O"]=> string(3) "org" } As you can see, ordering information (which may be important for some applications) is lost. ---- Server IP: 72.52.91.14 Probable Submitter: 192.86.3.5 ---- Manual Page -- http://php.net/manual/en/function.openssl-csr-get-subject.php Edit -- https://master.php.net/note/edit/119392 Del: integrated -- https://master.php.net/note/delete/119392/integrated Del: useless -- https://master.php.net/note/delete/119392/useless Del: bad code -- https://master.php.net/note/delete/119392/bad+code Del: spam -- https://master.php.net/note/delete/119392/spam Del: non-english -- https://master.php.net/note/delete/119392/non-english Del: in docs -- https://master.php.net/note/delete/119392/in+docs Del: other reasons-- https://master.php.net/note/delete/119392 Reject -- https://master.php.net/note/reject/119392 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#205593) next »