php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65281 openssl_error_string populated when no errors
Submitted: 2013-07-17 18:56 UTC Modified: 2016-09-12 18:20 UTC
Votes:11
Avg. Score:4.9 ± 0.3
Reproduced:10 of 10 (100.0%)
Same Version:1 (10.0%)
Same OS:2 (20.0%)
From: rlynch@php.net Assigned:
Status: Wont fix Package: OpenSSL related
PHP Version: 5.4.17 OS: CentOS 2.6.18
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rlynch@php.net
New email:
PHP Version: OS:

 

 [2013-07-17 18:56 UTC] rlynch@php.net
Description:
------------
---
From manual page: http://www.php.net/function.openssl-error-string#refsect1-function.openssl-error-string-returnvalues
---
openssl_* functions can "work" (return TRUE for the bool ones, and return valid resources etc)

BUT, the openssl_error_string() function will still have been populated.



Test script:
---------------
// You'll have to provide your own private key...
$pkey = openssl_pkey_get_private($this->private_key);
$this->openssl_check();
$linux = '';
openssl_pkey_export($pkey, $linux);
$this->openssl_check();

    function openssl_check ()
    {
        // Xdebug isn't in production
        // And we don't want the logging in production
        // How conventient
        if (function_exists('xdebug_call_line'))
        {
            $errors = false;
            while ( ($s = openssl_error_string()) !== false )
            {
                if (!$errors)
                {
                    $errors = true;
                    error_log('openssl_errors in '.__FILE__.': '.xdebug_call_line());
                }
                error_log("    $s");
            }
            return $errors;
        }
    }


Expected result:
----------------
No output at all.

Or at least something akin to INFO|WARNING|ERROR so I can filter out whatever these mean.

PS
You know these messages are completely incomprehensible, right?
I know they come straight from openssl, but may a translation table, or URL to openssl bug codes or something...


Actual result:
--------------
A *lot* of each of these:
    error:0E06D06C:configuration file routines:NCONF_get_string:no value
    error:0906D06C:PEM routines:PEM_read_bio:no start line


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-09-12 18:20 UTC] bukka@php.net
-Status: Open +Status: Wont fix
 [2016-09-12 18:20 UTC] bukka@php.net
That would be a BC break. I have done some work on this and it works as expected. Also all tests added.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC