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