note 96211 added to function.openssl-pkey-get-public

From: Date: Mon, 15 Feb 2010 15:50:07 +0000
Subject: note 96211 added to function.openssl-pkey-get-public
Groups: php.notes 
Request: Send a blank email to php-notes+get-165971@lists.php.net to get a copy of this message
Note this will read public keys from PEM formatted public keys as well: <? $key = <<<EOF -----BEGIN PUBLIC KEY----- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXX/MsKEBLcLeKA1d/i7ufG1qs qS97xFkIRSeX3TwmHic843AfVrzoh2pZUeOvK9ZLZQpHSM7DoHMYDGD1273+FvZX Ypf5LiFtecfxko/Cku16zy6WAeCYVFjjlveBhwPmPCIk+qDRYeiIW05QE2XK+CuD nJ7sxxXIJSSgD3Jo5wIDAQAB -----END PUBLIC KEY----- EOF; print $key; $res = openssl_pkey_get_public($key); print_r(openssl_pkey_get_details($res)); ?> Note that contrary to the documentation, openssl_pkey_get_details() will *not* read PEM directly, and you have to go through this step. ---- Server IP: 69.147.83.197 Probable Submitter: 82.68.4.230 ---- Manual Page -- http://www.php.net/manual/en/function.openssl-pkey-get-public.php Edit -- https://master.php.net/note/edit/96211 Del: integrated -- https://master.php.net/note/delete/96211/integrated Del: useless -- https://master.php.net/note/delete/96211/useless Del: bad code -- https://master.php.net/note/delete/96211/bad+code Del: spam -- https://master.php.net/note/delete/96211/spam Del: non-english -- https://master.php.net/note/delete/96211/non-english Del: in docs -- https://master.php.net/note/delete/96211/in+docs Del: other reasons-- https://master.php.net/note/delete/96211 Reject -- https://master.php.net/note/reject/96211 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#165971) next »