Req #54473 [Asn->Opn]: PATCH: openssl extension should also load engines
| From: | kalle@php.net | Date: | Tue, 24 Oct 2017 07:34:01 +0000 |
| Subject: | Req #54473 [Asn->Opn]: PATCH: openssl extension should also load engines | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-212109@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=54473&edit=1
ID: 54473
Updated by: kalle@php.net
Reported by: crrodriguez at opensuse dot org
Summary: PATCH: openssl extension should also load engines
-Status: Assigned
+Status: Open
Type: Feature/Change Request
Package: OpenSSL related
Operating System: all
PHP Version: 5.3SVN-2011-04-05 (SVN)
-Assigned To: pajoye
+Assigned To:
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2011-04-26 20:13:06] andrew at ei-grad dot ru
Hmm... Thats seems strange for me, why do you want to load ALL engines?? A right way to solve your
problem is to properly load OPENSSL config from openssl.cfg file (with a call of
OPENSSL_config(NULL) function, for example), where you can specify the required engine to be used
for all applications using OpenSSL.
man OPENSSL_config:
It is strongly recommended that all new applications call
OPENSSL_config() or the more sophisticated functions such as
CONF_modules_load() during initialization (that is before starting any
threads). By doing this an application does not need to keep track of
all configuration options and some new functionality can be supported
automatically.
Unfortunaly, for some reason, PHP openssl extension doesn't do this. That's a bug, IMHO.
------------------------------------------------------------------------
[2011-04-11 10:55:39] cataphract@php.net
Reading the docs, it would appear ENGINE_cleanup() should be called on shutdown.
------------------------------------------------------------------------
[2011-04-05 23:39:16] crrodriguez at opensuse dot org
Description:
------------
Currently openssl allows hardware engines to be used, which are usually much
faster than the library itself, but PHP does not currently load them if available
at Module init..
This is more important now that when openssl is used with new Intel CPUs, it can
use AES_NI instruction sets.
The attached patch fixes the problem.
Test script:
---------------
--------------
Expected result:
----------------
engines loaded at MINIT
Actual result:
--------------
Not currently loaded.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=54473&edit=1