php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #74059 openssl_error_string needs to be clearer / more verbose
Submitted: 2017-02-08 09:35 UTC Modified: 2017-02-08 11:14 UTC
From: lightnb at bellsouth dot net Assigned:
Status: Not a bug Package: OpenSSL related
PHP Version: 7.0.15 OS: Ubuntu 16.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lightnb at bellsouth dot net
New email:
PHP Version: OS:

 

 [2017-02-08 09:35 UTC] lightnb at bellsouth dot net
Description:
------------
openssl_error_string() produces useless error message like:

"error:0E06D06C:configuration file routines:NCONF_get_string:no value"

How about something more useful that includes the file (so I can be sure it's reading the right one) and the line number or property name? Like:

"error in configuration file /path/to/some/file.conf: The property "distinguished_name" in the "req" section cannot be empty. Line 106."



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-02-08 10:38 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2017-02-08 10:38 UTC] requinix@php.net
The error message comes from OpenSSL, not PHP. Requests should be filed on their GitHub project: https://github.com/openssl/openssl/issues
 [2017-02-08 10:56 UTC] lightnb at bellsouth dot net
I believe that OpenSSL has a verbose mode with more information, which is not coming through PHP. And since this error only occurs through PHP and not on the openssl CLI, there is no way to use that verbose flag.
 [2017-02-08 11:14 UTC] requinix@php.net
From the source, I don't see how the configuration file and line can get into an error message: in your example the only information saved is the library name (configuration file routines), function (NCONF_get_string), and reason (no value). There's also *source* file and line but that's not helpful here.

What command are you running that produces the sort of verbose error message you want PHP to return?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 13:01:28 2024 UTC