ID:               20705
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Feedback
 Bug Type:         OpenSSL related
 Operating System: Windows 2000 Professional
 PHP Version:      4.2.3
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip




Previous Comments:
------------------------------------------------------------------------

[2002-12-10 18:31:32] [EMAIL PROTECTED]

openssl_error_string() returns different messages when I reload the
page. I used the following test script:
----------
<?php 
$privkey = openssl_pkey_new(); 
if(empty($privkey))
{
        echo "error: no key was generated by openssl_pkey_new()";
}
else
{
        echo "a private key was generated by openssl_pkey_new()";
}
echo "<br>Error Message: ".openssl_error_string()."<br>";
exit;
?>
--------------------

These are the error messages openssl_error_string() returned:

1. request) error:02001003:system library:fopen:No such process
2. request) error:2006D002:BIO routines:BIO_new_file:system lib
3. request) error:02001003:system library:fopen:No such process


Thanks..

------------------------------------------------------------------------

[2002-12-10 13:30:05] [EMAIL PROTECTED]

And what error messages does openssl_error_string() return?

------------------------------------------------------------------------

[2002-12-10 11:27:12] [EMAIL PROTECTED]

Yes, you are right. But even with the correct variable and the latest
win32 snapshot (downloaded at 07/12/2002) it did not work for me.

The problem is the following:
<?php 
/** generate key */
$privkey = openssl_pkey_new(); 

if(empty($privkey))
{
        die("error: no key was generated by openssl_pkey_new()");
}
else
{
        echo "a private key was generated by openssl_pkey_new()";
}
?>

produces
"error: no key was generated by openssl_pkey_new()".

------------------------------------------------------------------------

[2002-12-10 04:36:57] [EMAIL PROTECTED]

Your test script is wrong:
/** read in key */ 
$loaded_key = openssl_pkey_get_private($key_content, $pass);

$pass is not set to anything; you meant $password, in which case this
works fine.
 

------------------------------------------------------------------------

[2002-12-07 01:17:40] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip



------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/20705

-- 
Edit this bug report at http://bugs.php.net/?id=20705&edit=1

Reply via email to