|  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
Avg. Score:4.9 ± 0.3
Reproduced:10 of 10 (100.0%)
Same Version:1 (10.0%)
Same OS:2 (20.0%)
From: Assigned:
Status: Wont fix Package: OpenSSL related
PHP Version: 5.4.17 OS: CentOS 2.6.18
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-07-17 18:56 UTC]
From manual page:
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);
$linux = '';
openssl_pkey_export($pkey, $linux);

    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.

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-09-12 18:20 UTC]
-Status: Open +Status: Wont fix
 [2016-09-12 18:20 UTC]
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: Wed Apr 24 19:01:31 2024 UTC