summaryrefslogtreecommitdiff
path: root/ext/soap/soap.c
diff options
context:
space:
mode:
authorKeith Smiley <ksmiley@salesforce.com>2016-06-20 14:23:49 -0400
committerKeith Smiley <ksmiley@salesforce.com>2016-10-03 14:02:34 -0400
commit31cbce341c4a5017eac3239c8ff1278cb9ff3900 (patch)
tree8603ab02d97755b365ab08c39c9b0dc42c488e30 /ext/soap/soap.c
parent8908df690f7bc29b606421c18eb06414154fa183 (diff)
downloadphp-git-31cbce341c4a5017eac3239c8ff1278cb9ff3900.tar.gz
soap #69137 - Fix SSL verify when using a proxy
Name verification was failing because the OpenSSL extension was picking the proxy server's address when guessing which name to compare to the SSL certificate. This scenario is already handled for stream wrappers in http_fopen_wrapper.c. This patch applies the same fix to the SOAP extension: when a proxy is used, set peer_name explicitly on the stream context.
Diffstat (limited to 'ext/soap/soap.c')
-rw-r--r--ext/soap/soap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 11c2d7caa6..344f2408bd 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -2368,6 +2368,8 @@ PHP_METHOD(SoapClient, SoapClient)
Z_TYPE_P(tmp) == IS_RESOURCE) {
context = php_stream_context_from_zval(tmp, 1);
Z_ADDREF_P(tmp);
+ } else {
+ context = php_stream_context_alloc();
}
if ((tmp = zend_hash_str_find(ht, "location", sizeof("location")-1)) != NULL &&