Bug #77787 [Nab]: OPENSSL PRIVATE KEY is missing
Edit report at https://bugs.php.net/bug.php?id=77787&edit=1
ID: 77787
Updated by: bukka@php.net
Reported by: xxalfa at gmail dot com
Summary: OPENSSL PRIVATE KEY is missing
Status: Not a bug
Type: Bug
Package: OpenSSL related
PHP Version: 7.3.11
Assigned To: bukka
Block user comment: N
Private report: N
New Comment:
Basically if you remove the main config, you have to always specify it for all functions that use
config, otherwise it fails because there is no default or specified config.
Is it difficult to set ENV var as suggested before on Windows? Or would it be maybe better if we
introduced INI options for default config?
Previous Comments:
------------------------------------------------------------------------
[2019-12-01 19:23:07] bukka@php.net
Ok I finally see the issue in your code. You don't pass options to each function so config is
not set. In this case it's missing in openssl_pkey_export. It works if you replace it with
openssl_pkey_export( $openssl_resource, $private_key, null, $options );
------------------------------------------------------------------------
[2019-11-18 00:05:39] xxalfa at gmail dot com
I have update all files to version 7.3.11. Not the content is the problem, but if
C:\usr\local\ssl\openssl.cnf does not exist, the key is not generated. It bothers me that I had to
create the path C:\usr\local\ssl\ myself.
------------------------------------------------------------------------
[2019-11-17 18:23:15] bukka@php.net
Could you actually share the content of C:\usr\local\ssl\openssl.cnf and
C:\php\extras\ssl\openssl.cnf . I think there might be issue in the actual config as it's
strange that it doesn't work for you.
------------------------------------------------------------------------
[2019-11-10 22:32:42] xxalfa at gmail dot com
An alternative file can be specified on page "https://www.php.net/manual/de/function.openssl-csr-new.php"
under config, but what do I have to do to use this file?
------------------------------------------------------------------------
[2019-11-10 19:10:22] bukka@php.net
Ah yeah this is expected and lots of code depends on it so we can't change this. Most of the
time it's what users want as it allows using system config.
The only thing that you can do is to change the location using environment variable OPENSSL_CONF (or
SSLEAY_CONF is also checked for legacy reasons). Have to close it as there is nothing we can do
about this.
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=77787
--
Edit this bug report at https://bugs.php.net/bug.php?id=77787&edit=1
Thread (10 messages)