[SOAP] SOAP SSL Context : Could not connect to host
| From: | Mickael L | Date: | Mon, 17 Aug 2009 14:33:21 +0000 |
| Subject: | [SOAP] SOAP SSL Context : Could not connect to host | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-2979@lists.php.net to get a copy of this message | ||
Hi,
I have a problem when I try to perform my soap call over HTTPS, but without
client certificate authentication (local_cert).
The Server application does not manage private key, just a public
self-signed certificate.
So I just have the public certificate from the server application which is
encoded in PEM format.
I have tried to modify the SSL context without success.
Note: $cafile in the commented line refers to the public certificate file
that i recover from the WebServer with my Firefox navigator.
Is it a bug?
Can phpsoap work with only a server certificate?
Thanks a lot.
------------------------------------------------------------
Reproduce code:
$soapOptions['trace'] = true;
$soapOptions['soap_version'] = SOAP_1_1;
// SSL Configuration
if ($SSLcontext) {
$ctx = stream_context_create();
stream_context_set_option($ctx, 'ssl', 'allow_self_signed',true);
stream_context_set_option($ctx, 'ssl', 'verify_peer',true);
stream_context_set_option($ctx, 'ssl', 'allow_self_signed',true);
//stream_context_set_option($ctx, 'ssl', 'cafile',$cafile);
$soapOptions['stream_context'] = $ctx;
}
$soapClient = new SoapClient($wsdlFile, $soapOptions);
$soapClient->echoString('Hello World!');
-------------------------------------------------------------
Result:
If I dont modify the SSL context, i have the following error :
faultcode: soapenv:Server
faultstring: Policy Falsified
If I modify the SSL context, i have the following error :
faultcode: HTTP
faultstring: Could not connect to host
--
View this message in context: http://www.nabble.com/SOAP-SSL-Context-%3A-Could-not-connect-to-host-tp25007848p25007848.html
Sent from the Php - Soap mailing list archive at Nabble.com.