Php SoapClient stream_context option

后端 未结 2 1605
南笙
南笙 2020-12-12 02:26

I want to use a third party\'s web service. To use the web service I need to connect with HTTPS. My problem is that for the development process I have a test api with an inv

相关标签:
2条回答
  • 2020-12-12 02:39

    Maybe not the invalid Certificate is a Problem, more the SSLv2/3 Handshake; can you try manually specifing a Cipher like this:

    $stream_opts = array(
    //      'ssl'=>array('ciphers'=>"3DES" // also working
    //      further ciphers on http://www.openssl.org/docs/apps/ciphers.html
            'ssl'=>array('ciphers'=>"SHA1"
          )
    );
    
    $myStreamContext = stream_context_create($stream_opts);
    $soapOptions['stream_context'] = $stream_opts;
    $soapClient = new SoapAuthClient("https://...", $soapOptions);
    

    Good luck!

    0 讨论(0)
  • 2020-12-12 02:46

    It looks like you have hit this authentication plus SSL bug in SoapClient. You can either recompile php with the patch included in that link, or wait until they integrate it in the official build.

    0 讨论(0)
提交回复
热议问题