]> git.pld-linux.org Git - packages/php.git/commitdiff
Rel 8; use tls instead of ssl for fsockopen etc by default (backported from upstream... auto/th/php71-7.1.33-8
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 20 Jan 2022 15:11:34 +0000 (16:11 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 20 Jan 2022 15:11:34 +0000 (16:11 +0100)
openssl.patch
php.spec

index d69698071c0e9bce0b4eaeeee0359f6c84752b20..d6094331075f6c105483623c09eca097d9901cb7 100644 (file)
@@ -1,6 +1,7 @@
---- php-5.3.29/ext/openssl/openssl.c~  2021-10-23 19:18:21.000000000 +0200
-+++ php-5.3.29/ext/openssl/openssl.c   2021-10-23 19:19:01.483125024 +0200
-@@ -1044,7 +1044,9 @@ PHP_MINIT_FUNCTION(openssl)
+diff -urNp -x '*.orig' php-7.1.33.org/ext/openssl/openssl.c php-7.1.33/ext/openssl/openssl.c
+--- php-7.1.33.org/ext/openssl/openssl.c       2019-10-22 18:59:46.000000000 +0200
++++ php-7.1.33/ext/openssl/openssl.c   2022-01-20 15:55:08.279929919 +0100
+@@ -1471,7 +1471,9 @@ PHP_MINIT_FUNCTION(openssl)
        REGISTER_LONG_CONSTANT("PKCS7_NOSIGS", PKCS7_NOSIGS, CONST_CS|CONST_PERSISTENT);
  
        REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_PADDING", RSA_PKCS1_PADDING, CONST_CS|CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("OPENSSL_NO_PADDING", RSA_NO_PADDING, CONST_CS|CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("OPENSSL_PKCS1_OAEP_PADDING", RSA_PKCS1_OAEP_PADDING, CONST_CS|CONST_PERSISTENT);
  
+diff -urNp -x '*.orig' php-7.1.33.org/ext/openssl/xp_ssl.c php-7.1.33/ext/openssl/xp_ssl.c
+--- php-7.1.33.org/ext/openssl/xp_ssl.c        2019-10-22 18:59:46.000000000 +0200
++++ php-7.1.33/ext/openssl/xp_ssl.c    2022-01-20 15:55:08.283263252 +0100
+@@ -2571,7 +2571,7 @@ php_stream *php_openssl_ssl_socket_facto
+       if (strncmp(proto, "ssl", protolen) == 0) {
+               sslsock->enable_on_connect = 1;
+-              sslsock->method = get_crypto_method(context, STREAM_CRYPTO_METHOD_ANY_CLIENT);
++              sslsock->method = get_crypto_method(context, STREAM_CRYPTO_METHOD_TLS_ANY_CLIENT);
+       } else if (strncmp(proto, "sslv2", protolen) == 0) {
+               php_error_docref(NULL, E_WARNING, "SSLv2 unavailable in this PHP version");
+               php_stream_close(stream);
+@@ -2587,7 +2587,7 @@ php_stream *php_openssl_ssl_socket_facto
+ #endif
+       } else if (strncmp(proto, "tls", protolen) == 0) {
+               sslsock->enable_on_connect = 1;
+-              sslsock->method = get_crypto_method(context, STREAM_CRYPTO_METHOD_TLS_CLIENT);
++              sslsock->method = get_crypto_method(context, STREAM_CRYPTO_METHOD_TLS_ANY_CLIENT);
+       } else if (strncmp(proto, "tlsv1.0", protolen) == 0) {
+               sslsock->enable_on_connect = 1;
+               sslsock->method = STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT;
+diff -urNp -x '*.orig' php-7.1.33.org/main/streams/php_stream_transport.h php-7.1.33/main/streams/php_stream_transport.h
+--- php-7.1.33.org/main/streams/php_stream_transport.h 2019-10-22 19:00:03.000000000 +0200
++++ php-7.1.33/main/streams/php_stream_transport.h     2022-01-20 15:55:08.283263252 +0100
+@@ -172,8 +172,8 @@ typedef enum {
+       STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT = (1 << 3 | 1),
+       STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT = (1 << 4 | 1),
+       STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT = (1 << 5 | 1),
+-      /* tls now equates only to the specific TLSv1 method for BC with pre-5.6 */
+-      STREAM_CRYPTO_METHOD_TLS_CLIENT = (1 << 3 | 1),
++      /* TLS equates to TLS_ANY as of PHP 7.2 */
++      STREAM_CRYPTO_METHOD_TLS_CLIENT = ((1 << 3) | (1 << 4) | (1 << 5) | 1),
+       STREAM_CRYPTO_METHOD_TLS_ANY_CLIENT = ((1 << 3) | (1 << 4) | (1 << 5) | 1),
+       STREAM_CRYPTO_METHOD_ANY_CLIENT = ((1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5) | 1),
+       STREAM_CRYPTO_METHOD_SSLv2_SERVER = (1 << 1),
+@@ -183,8 +183,8 @@ typedef enum {
+       STREAM_CRYPTO_METHOD_TLSv1_0_SERVER = (1 << 3),
+       STREAM_CRYPTO_METHOD_TLSv1_1_SERVER = (1 << 4),
+       STREAM_CRYPTO_METHOD_TLSv1_2_SERVER = (1 << 5),
+-      /* tls equates only to the specific TLSv1 method for BC with pre-5.6 */
+-      STREAM_CRYPTO_METHOD_TLS_SERVER = (1 << 3),
++      /* TLS equates to TLS_ANY as of PHP 7.2 */
++      STREAM_CRYPTO_METHOD_TLS_SERVER = ((1 << 3) | (1 << 4) | (1 << 5)),
+       STREAM_CRYPTO_METHOD_TLS_ANY_SERVER = ((1 << 3) | (1 << 4) | (1 << 5)),
+       STREAM_CRYPTO_METHOD_ANY_SERVER = ((1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5))
+ } php_stream_xport_crypt_method_t;
index e3b77e5e0b5128e3073809534e697125f5972e5a..a1f6f9c7029d364a967ae1fd9cfbe98cdc2de5cf 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -151,7 +151,7 @@ Summary(ru.UTF-8):  PHP Версии 7 - язык препроцессирова
 Summary(uk.UTF-8):     PHP Версії 7 - мова препроцесування HTML-файлів, виконувана на сервері
 Name:          %{orgname}%{php_suffix}
 Version:       7.1.33
-Release:       7
+Release:       8
 Epoch:         4
 # All files licensed under PHP version 3.01, except
 # Zend is licensed under Zend
This page took 0.102617 seconds and 4 git commands to generate.