]> git.pld-linux.org Git - packages/php.git/commitdiff
- rel 2; obey default context options in mysqlnd auto/th/php56-5.6.12-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 10 Aug 2015 11:41:05 +0000 (13:41 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 10 Aug 2015 11:41:05 +0000 (13:41 +0200)
php-mysql-ssl-context.patch [new file with mode: 0644]
php.spec

diff --git a/php-mysql-ssl-context.patch b/php-mysql-ssl-context.patch
new file mode 100644 (file)
index 0000000..c8ff48d
--- /dev/null
@@ -0,0 +1,36 @@
+; obey default context options
+; https://bugs.php.net/bug.php?id=68344
+diff -urbB php-5.6.12/ext/mysqlnd/mysqlnd_net.c php-5.6.12/ext/mysqlnd/mysqlnd_net.c
+--- php-5.6.12/ext/mysqlnd/mysqlnd_net.c       2015-08-06 09:55:57.000000000 +0200
++++ php-5.6.12/ext/mysqlnd/mysqlnd_net.c       2015-08-10 13:25:30.187912101 +0200
+@@ -29,6 +29,7 @@
+ #include "mysqlnd_ext_plugin.h"
+ #include "php_network.h"
+ #include "zend_ini.h"
++#include "ext/standard/file.h"
+ #ifdef MYSQLND_COMPRESSION_ENABLED
+ #include <zlib.h>
+ #endif
+@@ -868,6 +868,21 @@ MYSQLND_METHOD(mysqlnd_net, enable_ssl)(
+               DBG_RETURN(FAIL);
+       }
++      if (FG(default_context)) {
++              zval **tmpzval = NULL;
++              int i = 0;
++              /* copy values from default stream settings */
++              char *opts[] = { "allow_self_signed", "cafile", "capath", "ciphers", "CN_match",
++                      "disable_compression", "local_cert", "local_pk", "no_ticket", "passphrase",
++                      "peer_fingerprint", "peer_name", "SNI_enabled", "SNI_server_certs", "SNI_server_name",
++                      "verify_depth", "verify_peer", "verify_peer_name", NULL };
++              while (opts[i]) {
++                      if (php_stream_context_get_option(FG(default_context), "ssl", opts[i], &tmpzval) == SUCCESS)
++                              php_stream_context_set_option(context, "ssl", opts[i], *tmpzval);
++                      i++;
++              }
++      }
++
+       if (net->data->options.ssl_key) {
+               zval key_zval;
+               ZVAL_STRING(&key_zval, net->data->options.ssl_key, 0);
+
index 9e8bfd2031bc5bee97c9a836381badc59f77967d..685672fc16095a3b159455860cdefbc290956ac2 100644 (file)
--- a/php.spec
+++ b/php.spec
@@ -153,7 +153,7 @@ ERROR: You need to select at least one Apache SAPI to build shared modules.
 %undefine      with_filter
 %endif
 
-%define                rel     1
+%define                rel     2
 %define                orgname php
 %define                ver_suffix 56
 %define                php_suffix %{!?with_default_php:%{ver_suffix}}
@@ -230,6 +230,8 @@ Patch62:    mcrypt-libs.patch
 Patch65:       system-libzip.patch
 Patch66:       php-db.patch
 Patch67:       mysql-lib-ver-mismatch.patch
+# https://bugs.php.net/bug.php?id=68344
+Patch68:       php-mysql-ssl-context.patch
 Patch69:       fpm-conf-split.patch
 Patch70:       mysqlnd-ssl.patch
 URL:           http://www.php.net/
@@ -2081,6 +2083,7 @@ exit 1
 %{?with_system_libzip:%patch65 -p1}
 %patch66 -p1
 %patch67 -p1
+%patch68 -p1
 %patch70 -p1
 
 sed -i -e '/PHP_ADD_LIBRARY_WITH_PATH/s#xmlrpc,#xmlrpc-epi,#' ext/xmlrpc/config.m4
This page took 0.046372 seconds and 4 git commands to generate.