Edit report at https://bugs.php.net/bug.php?id=52913&edit=1
ID: 52913
Comment by: taneli at crasman dot fi
Reported by: terje dot gjerde at visma dot no
Summary: Incorrect SNI (Server name indicator) when using a
SoapClient through a proxy
Status: Open
Type: Bug
Package: OpenSSL related
Operating System: Windows Server 2008 r2
PHP Version: 5.3.3
Block user comment: N
Private report: N
New Comment:
You can workaround this option by specifying a SNI_server_name in a stream
context like this:
$wsdl = 'http://what.ever.host/service.wsdl';
$host = parse_url($wsdl, PHP_URL_HOST);
$opts = array('ssl' => array('SNI_server_name' => $host,
'SNI_enabled' => TRUE));
$context = stream_context_create($opts);
$soap = new \SoapClient($wsdl, array('proxy_host' => 'localhost', 'proxy_port'
=> 8080, 'stream_context' => $context));
Previous Comments:
------------------------------------------------------------------------
[2012-07-02 08:17:41] daniel dot buschke at nextiraone dot eu
We have reproduced this bug in PHP 5.3.10 on Linux (OpenWRT).
If you set an IP as proxy, PHP is shouting an internal IP address out to the
world. I think that is critical, isn't it?
regards
Daniel
------------------------------------------------------------------------
[2012-06-26 16:58:31] daniel dot buschke at nextiraone dot eu
Workaround:
Locallly override APACHESERVER with the IP of PROXY in hosts file and set
APACHESERVER as $config['proxy_host']. This is very ugly but works (for us).
cheers
Daniel
------------------------------------------------------------------------
[2010-09-23 16:23:51] terje dot gjerde at visma dot no
Description:
------------
When calling a url on apache server with name "APACHESERVER" through a proxy
with name "PROXY" the following error occurs:
Hostname PROXY provided via SNI and hostname APACHESERVER provided via HTTP are
different
ie calling url:
https://APACHESERVER/ws.php
with proxy at:
http://PROXY:8080/
Test script:
---------------
$config = array('location' => WEBSERVICE_LOCATION,
'classmap' => $wsclassmap,
'trace' => 1,
);
if (WEBSERVICE_PROXY_HOST && WEBSERVICE_PROXY_PORT) {
$config['proxy_host'] = WEBSERVICE_PROXY_HOST;
$config['proxy_port'] = WEBSERVICE_PROXY_PORT;
}
$ws_client = new SoapClient($wsdl,$config);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=52913&edit=1