File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,8 @@ PHP NEWS
123
123
. Added X509_PURPOSE_OCSP_HELPER and X509_PURPOSE_TIMESTAMP_SIGN constants.
124
124
(Vincent Jardin)
125
125
. Bumped minimum required OpenSSL version to 1.1.1. (Ayesh Karunaratne)
126
+ . Added compile-time option --with-openssl-legacy-provider to enable legacy
127
+ provider. (Adam Saponara)
126
128
127
129
- Output:
128
130
. Clear output handler status flags during handler initialization. (haszi)
Original file line number Diff line number Diff line change @@ -10,6 +10,13 @@ PHP_ARG_WITH([system-ciphers],
10
10
[ no] ,
11
11
[ no] )
12
12
13
+ PHP_ARG_WITH([ openssl-legacy-provider] ,
14
+ [ whether to load legacy algorithm provider] ,
15
+ [ AS_HELP_STRING ( [ --with-openssl-legacy-provider] ,
16
+ [ OPENSSL: Load legacy algorithm provider in addition to default provider] ) ] ,
17
+ [ no] ,
18
+ [ no] )
19
+
13
20
if test "$PHP_OPENSSL" != "no"; then
14
21
PHP_NEW_EXTENSION(openssl, openssl.c xp_ssl.c, $ext_shared)
15
22
PHP_SUBST(OPENSSL_SHARED_LIBADD)
@@ -25,4 +32,8 @@ if test "$PHP_OPENSSL" != "no"; then
25
32
if test "$PHP_SYSTEM_CIPHERS" != "no"; then
26
33
AC_DEFINE ( USE_OPENSSL_SYSTEM_CIPHERS ,1 ,[ Use system default cipher list instead of hardcoded value ] )
27
34
fi
35
+
36
+ if test "$PHP_OPENSSL_LEGACY_PROVIDER" != "no"; then
37
+ AC_DEFINE ( LOAD_OPENSSL_LEGACY_PROVIDER ,1 ,[ Load legacy algorithm provider in addition to default provider ] )
38
+ fi
28
39
fi
Original file line number Diff line number Diff line change 59
59
#if PHP_OPENSSL_API_VERSION >= 0x30000
60
60
#include <openssl/core_names.h>
61
61
#include <openssl/param_build.h>
62
+ #include <openssl/provider.h>
62
63
#endif
63
64
64
65
#if defined(LIBRESSL_VERSION_NUMBER ) && !defined(OPENSSL_NO_ENGINE )
@@ -1277,6 +1278,10 @@ PHP_MINIT_FUNCTION(openssl)
1277
1278
OpenSSL_add_all_algorithms ();
1278
1279
SSL_load_error_strings ();
1279
1280
#else
1281
+ #if PHP_OPENSSL_API_VERSION >= 0x30000 && defined(LOAD_OPENSSL_LEGACY_PROVIDER )
1282
+ OSSL_PROVIDER_load (NULL , "legacy" );
1283
+ OSSL_PROVIDER_load (NULL , "default" );
1284
+ #endif
1280
1285
OPENSSL_init_ssl (OPENSSL_INIT_LOAD_CONFIG , NULL );
1281
1286
#endif
1282
1287
You can’t perform that action at this time.
0 commit comments