SOAP SSL Context : Could not connect to host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux