note 71601 added to function.openssl-x509-parse

From: Date: Thu, 07 Dec 2006 11:37:26 +0000
Subject: note 71601 added to function.openssl-x509-parse
Groups: php.notes 
Request: Send a blank email to php-notes+get-120368@lists.php.net to get a copy of this message
Since there is no function (yet) to parse CSRs, I used a simple workaround. <?php // make a temporary key $key = openssl_pkey_new(); // use the key to self-sign the csr $crt = openssl_csr_sign($csr,NULL,$key,1); // the resulting certificate can be parsed $ssl = openssl_x509_parse($crt); // dump the CSR subject information echo '<pre>'; echo var_dump($ssl['subject']); echo '</pre>'; $o =$ssl['subject']['O']; $c =$ssl['subject']['C']; $cn =$ssl['subject']['CN']; //... ?> ---- Server IP: 87.238.162.147 Probable Submitter: 134.58.253.114 (proxied: 1.1 Application and Content Networking System Software 5.5.1) ---- Manual Page -- http://www.php.net/manual/en/function.openssl-x509-parse.php Edit -- https://master.php.net/note/edit/71601 Del: integrated -- https://master.php.net/note/delete/71601/integrated Del: useless -- https://master.php.net/note/delete/71601/useless Del: bad code -- https://master.php.net/note/delete/71601/bad+code Del: spam -- https://master.php.net/note/delete/71601/spam Del: non-english -- https://master.php.net/note/delete/71601/non-english Del: in docs -- https://master.php.net/note/delete/71601/in+docs Del: other reasons-- https://master.php.net/note/delete/71601 Reject -- https://master.php.net/note/reject/71601 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120368) next »