note 42799 deleted from function.openssl-pkey-new by nlopess
| From: | nlopess@php.net | Date: | Sun, 30 May 2004 08:06:51 +0000 |
| Subject: | note 42799 deleted from function.openssl-pkey-new by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-70297@lists.php.net to get a copy of this message | ||
Note Submitter: nospam.alchaemist@hiperlinux.com.ar
----
Hi,
I was trying to generate a PriKey/PubKey pair, and besides not being able to, the warning said:
Warning: openssl_pkey_get_public(): Don't know how to get public key from this private key (the
documentation lied) in D:\www\keys.php on line 4
<?
$res = openssl_pkey_new();
$KeyPri = openssl_get_privatekey($res);
$KeyPub = openssl_pkey_get_public($KeyPri);
$KeyPubStr = '';
openssl_pkey_export($KeyPub,$KeyPubStr);
echo $KeyPubStr;
?>
I guess the "(the documentation lied)" reffers to this one...