note 42799 added to function.openssl-pkey-new
| From: | nospam dot alchaemist at hiperlinux dot com dot ar | Date: | Sun, 30 May 2004 02:49:12 +0000 |
| Subject: | note 42799 added to function.openssl-pkey-new | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-70290@lists.php.net to get a copy of this message | ||
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...
----
Manual Page -- http://www.php.net/manual/en/function.openssl-pkey-new.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42799
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42799&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42799&report=yes
Search -- http://master.php.net/manage/user-notes.php