note 81079 added to function.openssl-x509-parse

From: Date: Wed, 13 Feb 2008 14:43:42 +0000
Subject: note 81079 added to function.openssl-x509-parse
Groups: php.notes 
Request: Send a blank email to php-notes+get-136115@lists.php.net to get a copy of this message
To read an extension from a X.509 certificate, you can proceed like this if you know the OID //Read the certificate from file $cert = file_get_contents('test.crt'); $ssl = openssl_x509_parse($cert); $ext_value = $ssl['extensions']['1.2.3.4.5.6']; echo $ext_value -------------------------------- Because the $ssl array is not documented, you can easily see its contents like this: //To print out all the array! print_r(array_values($ssl)); print_r(array_keys($ssl)); ---- Server IP: 213.92.11.19 Probable Submitter: 160.80.81.106 ---- Manual Page -- http://www.php.net/manual/en/function.openssl-x509-parse.php Edit -- https://master.php.net/note/edit/81079 Del: integrated -- https://master.php.net/note/delete/81079/integrated Del: useless -- https://master.php.net/note/delete/81079/useless Del: bad code -- https://master.php.net/note/delete/81079/bad+code Del: spam -- https://master.php.net/note/delete/81079/spam Del: non-english -- https://master.php.net/note/delete/81079/non-english Del: in docs -- https://master.php.net/note/delete/81079/in+docs Del: other reasons-- https://master.php.net/note/delete/81079 Reject -- https://master.php.net/note/reject/81079 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#136115) next »