To workaround this error you could deactivate the SSL certificate validation. But keep in mind, that this should only be done for test cases, because this makes your connection insecure!
You can pass a stream context when instantiating the SoapClient
like this:
<?php
$myClient = new SoapClient("https://smi.sp.f-secure.com/smi/5.1/services/EchoService?wsdl", [
'stream_context' => stream_context_create([
'ssl' => [
'verify_peer' => false,
'verify_peer_name' => false,
],
]),
]);
If you have a valid certificate but it is selfsigned, there is another solution (more secure):
<?php
$myClient = new SoapClient("https://smi.sp.f-secure.com/smi/5.1/services/EchoService?wsdl", [
'stream_context' => stream_context_create([
'ssl' => [
'allow_self_signed' => true,
],
]),
]);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…