• <bdo id='jGSSd'></bdo><ul id='jGSSd'></ul>

        <small id='jGSSd'></small><noframes id='jGSSd'>

        <tfoot id='jGSSd'></tfoot>
      1. <legend id='jGSSd'><style id='jGSSd'><dir id='jGSSd'><q id='jGSSd'></q></dir></style></legend>
        <i id='jGSSd'><tr id='jGSSd'><dt id='jGSSd'><q id='jGSSd'><span id='jGSSd'><b id='jGSSd'><form id='jGSSd'><ins id='jGSSd'></ins><ul id='jGSSd'></ul><sub id='jGSSd'></sub></form><legend id='jGSSd'></legend><bdo id='jGSSd'><pre id='jGSSd'><center id='jGSSd'></center></pre></bdo></b><th id='jGSSd'></th></span></q></dt></tr></i><div id='jGSSd'><tfoot id='jGSSd'></tfoot><dl id='jGSSd'><fieldset id='jGSSd'></fieldset></dl></div>

        带有 SSL 证书的 PHP SOAP 客户端

        时间:2023-05-22
          <tbody id='QQyae'></tbody>

        <small id='QQyae'></small><noframes id='QQyae'>

      2. <tfoot id='QQyae'></tfoot>
          <bdo id='QQyae'></bdo><ul id='QQyae'></ul>
        • <legend id='QQyae'><style id='QQyae'><dir id='QQyae'><q id='QQyae'></q></dir></style></legend>

                  <i id='QQyae'><tr id='QQyae'><dt id='QQyae'><q id='QQyae'><span id='QQyae'><b id='QQyae'><form id='QQyae'><ins id='QQyae'></ins><ul id='QQyae'></ul><sub id='QQyae'></sub></form><legend id='QQyae'></legend><bdo id='QQyae'><pre id='QQyae'><center id='QQyae'></center></pre></bdo></b><th id='QQyae'></th></span></q></dt></tr></i><div id='QQyae'><tfoot id='QQyae'></tfoot><dl id='QQyae'><fieldset id='QQyae'></fieldset></dl></div>

                  本文介绍了带有 SSL 证书的 PHP SOAP 客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我正在尝试使用以下代码设置 Soap 客户端:

                  I'm trying to set up a Soap client with the following code:

                  <?php
                  $wsdl           = 'https://domain.com/?wsdl';
                  $endpoint       = 'https://domain.com';
                  $certificate    = dirname(__FILE__) . '/CertWithKey.pem';
                  $password       = 'pwd';
                  
                  $options = array(
                      'location'      => $endpoint,
                      'keep_alive'    => true,
                      'trace'         => true,
                      'local_cert'    => $certificate,
                      'passphrase'    => $password,
                      'cache_wsdl'    => WSDL_CACHE_NONE
                  );
                  
                  try {
                      $soapClient = new SoapClient($wsdl, $options);
                  } catch(Exception $e) {
                      var_dump($e);
                  }
                  

                  我得到了一个带有 .crt 认证文件的 .p12 密钥文件.使用 openssl 我已将 .p12 文件转换为 .pem 文件,然后将其与 .crt 文件合并.CertWithKey.pem 看起来不错,文件中有两个证书块.

                  I was given a .p12 key-file with a .crt certification file. Using openssl I've converted the .p12-file to a .pem-file and then merged it with the .crt-file. The CertWithKey.pem looks good to me, two certificate-blocks are in the file.

                  无论我尝试做什么,我总是收到一个异常消息 SOAP-ERROR: Parsing WSDL: 无法从https://domain.com/?wsdl"加载:加载失败外部实体https://domain.com/?wsdl".

                  No matter what I try to do, I keep getting an exception with the message SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://domain.com/?wsdl' : failed to load external entity "https://domain.com/?wsdl".

                  在与远程方通话后,他们承认有请求进入,但他们记录了此错误:ssl 握手被系统中断 [提示:在浏览器中按下停止按钮?!].

                  After phoning with the remote party they acknowlegde that a request is coming in but they're logging this error: ssl handshake interrupted by system [hint: stop button pressed in browser?!].

                  由于目前我在网上没有找到任何有用的信息,所以我想请教大家对此事的一些见解.

                  Since I didn't find any useful information on the net so far I figured to ask you guys for some insight on the matter.

                  有什么建议可以尝试吗?我正在运行 PHP 5.3.8,并且服务器的 IP 地址在远程方的防火墙中被列入白名单.

                  Any suggestions what can be tried? I'm running PHP 5.3.8 and the server's IP-address is white listed in the firewall at the remote party.

                  推荐答案

                  我已经解决了这个问题.我认为,由于有关此问题的问题数量和不同解决方案的数量,其他人将从该解决方案中受益.这是:

                  I've fixed this problem. I think, due to the number of questions regarding this issue and number of different solutions, others will benefit from the solution. Here goes:

                  我使用 openssl CLI 程序将 .p12 密钥文件转换为 .pem 密钥文件.诀窍在于转换发生的方式.

                  I used the openssl CLI program to convert the .p12 key-file to a .pem key-file. The trick is the way the conversion takes place.

                  首先我用这个命令转换它,我遇到了问题中描述的问题:

                  First I converted it with this command and I had the issue as described in the question:

                  openssl pkcs12 -in key.p12 -out key.pem -nodes -clcerts

                  虽然下面的命令做了实际的技巧:

                  While the command below did the actual trick:

                  openssl pkcs12 -in key.p12 -out key.pem -clcerts

                  有关更多信息,请参阅我使用的来源:https://community.qualys.com/文档/DOC-3273

                  For more info please see the source I used: https://community.qualys.com/docs/DOC-3273

                  这篇关于带有 SSL 证书的 PHP SOAP 客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:PHP SOAP HTTP 请求 下一篇:将数组传递给 PHP 中的 SOAP 函数

                  相关文章

                  最新文章

                • <i id='AiTWn'><tr id='AiTWn'><dt id='AiTWn'><q id='AiTWn'><span id='AiTWn'><b id='AiTWn'><form id='AiTWn'><ins id='AiTWn'></ins><ul id='AiTWn'></ul><sub id='AiTWn'></sub></form><legend id='AiTWn'></legend><bdo id='AiTWn'><pre id='AiTWn'><center id='AiTWn'></center></pre></bdo></b><th id='AiTWn'></th></span></q></dt></tr></i><div id='AiTWn'><tfoot id='AiTWn'></tfoot><dl id='AiTWn'><fieldset id='AiTWn'></fieldset></dl></div>

                  1. <tfoot id='AiTWn'></tfoot>
                  2. <legend id='AiTWn'><style id='AiTWn'><dir id='AiTWn'><q id='AiTWn'></q></dir></style></legend>

                    1. <small id='AiTWn'></small><noframes id='AiTWn'>

                        <bdo id='AiTWn'></bdo><ul id='AiTWn'></ul>