Bug #68017 [Opn->Nab]: SoapServer fails to load local wsdl when using ssl

From: Date: Wed, 04 Mar 2015 21:13:27 +0000
Subject: Bug #68017 [Opn->Nab]: SoapServer fails to load local wsdl when using ssl
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191164@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68017&edit=1

 ID:                 68017
 Updated by:         rdlowrey@php.net
 Reported by:        dallas at ekkysoftware dot com
 Summary:            SoapServer fails to load local wsdl when using ssl
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            OpenSSL related
 Operating System:   CentOS
 PHP Version:        5.5.16
 Block user comment: N
 Private report:     N

 New Comment:

Your SSL context settings are totally wrong and demonstrate a blind "shot in the dark."
Unfortunately we can't help you with broken userland code support. If you can demonstrate a
reproducible problem with correct userland code I will be happy to look into it. In the meantime, I
recommend posting a question on stackoverflow.com to get help with how to correctly configure your
SSL context options.

I'm closing this until a valid reproducible test case is shown to fail.


Previous Comments:
------------------------------------------------------------------------
[2014-09-13 08:26:58] dallas at ekkysoftware dot com

Description:
------------
When connecting to a soapclient to a soapserver via ssl. Everything works correctly when over http,
but when moving to https it all fails. It was working when the ssl certificate/host was the default
and did not require a SNI. Additionally if we flip the wsdl on the server side to http, then the
client can connect sometimes - intermittent.

wget and curl are both able to access the wsdl via https and I can copy the wsdl to a local file and
the SoapServer will still not load from a local file.

Server is setup as a virtual host where the host is not the default. When it was the default, the
soap connection work correctly via https. Best guess is something is connection over ssl with ip
127.0.0.1, without an SNI and is getting the wrong certificate, preventing successful connection.



Test script:
---------------
I have tried all the options such as:
$context = stream_context_create(array(
		'ssl' => array('SNI_server_name' => parse_url($this->_wsdl,
PHP_URL_HOST),'SNI_enabled' => TRUE,
			'peer_name' => parse_url($this->_wsdl, PHP_URL_HOST),'verify_peer'
=> false, 'allow_self_signed' => true),
	));
$options['stream_context'] = $context;
$options['ssl'] = array('ciphers'=> "SHA1",'verify_peer'
=> false, 'allow_self_signed' => true,
		'peer_name' => parse_url($this->_wsdl,
PHP_URL_HOST),'curl_verify_ssl_peer'=>false,'curl_verify_ssl_host'  =>
false);
	$options['https'] = array('ciphers'=>
"SHA1",'verify_peer' => false, 'allow_self_signed' => true,
		'peer_name' => parse_url($this->_wsdl,
PHP_URL_HOST),'curl_verify_ssl_peer'=>false,'curl_verify_ssl_host'  =>
false);
			
	$server  = new SoapServer($this->_wsdl,$options);



Actual result:
--------------
[13-Sep-2014 07:47:57 UTC] PHP Warning:  SoapServer::SoapServer(): SSL: Success in
/home/plaza/public_html/lib/Zend/Soap/Server.php on line 826
[13-Sep-2014 07:47:57 UTC] PHP Warning:  SoapServer::SoapServer(): Failed to enable crypto in
/home/plaza/public_html/lib/Zend/Soap/Server.php on line 826
[13-Sep-2014 07:47:57 UTC] PHP Warning: 
SoapServer::SoapServer(https://www.plazapinger.com/index.php/api/soap/index/?wsdl=1): failed to open
stream: operation failed in /home/plaza/public_html/lib/Zend/Soap/Server.php on line 826
[13-Sep-2014 07:47:57 UTC] PHP Warning:  SoapServer::SoapServer(): I/O warning : failed to load
external entity "https://www.plazapinger.com/index.php/api/soap/index/?wsdl=1"
in /home/plaza/public_html/lib/Zend/Soap/Server.php on line 826
[13-Sep-2014 07:47:57 UTC] PHP Notice:  SoapServer::SoapServer(): failed to discard buffer. No
buffer to discard in /home/plaza/public_html/lib/Zend/Soap/Server.php on line 826
[13-Sep-2014 07:47:57 UTC] PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from
'https://www.plazapinger.com/index.php/api/soap/index/?wsdl=1'
: failed to load external entity "https://www.plazapinger.com/index.php/api/soap/index/?wsdl=1"
 in /home/plaza/public_html/lib/Zend/Soap/Server.php on line 826



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=68017&edit=1


Thread (4 messages)

« previous php.bugs (#191164) next »