6
我尝试通过SoapClient建立连接。我需要这个证书。我收到了.pfx证书。我使用下面的命令来创建一个.pem文件。证书未被接受。无法设置私钥文件
openssl pkcs12 -in cert.pfx -out cert.pem -nodes
证书中有一个密码,所以我需要在获取cert.pem文件之前输入密码。我认为目前为止这么好。
现在我尝试连接到WSDL服务。
$url = "https://test.website.com/webservices/transfer.asmx?WSDL";
$cert = '/path/to/cert.pem';
$passphrase = "12345678";
$soapClient = new SoapClient($url, array('local_cert'=>$cert,'passphrase'=>$passphrase));
我得到以下错误:
(Warning) SoapClient::SoapClient(): Unable to set private key file `/var/www/vhosts/............./cert.pem'
我认为这个问题是该证书。我以正确的方式将.pfx转换为.pem的方式?
我仍然有问题这个。找到了这个。 注意:在这里包括“-nodes”标志将阻止使用密码来加密私钥。 白色或没有密码我得到相同的错误。 –
是证明公共还是私人的? –
你为什么使用'-nodes'而不是'-clcerts'? –