--- /dev/null
+; 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);
+
%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}}
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/
%{?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