近期正在开发微信支付功能,用crul调用证书时提示类似错误
58 problem with the local client certificate.
经过查找手册和实验,参考php手册提供的以下方案可以解决,代码如下
If you want to connect to a server which requires that you identify yourself with a certificate, use following code. Your certificate and servers certificate are signed by an authority whose certificate is in ca.ctr. If your original certificate is in .pfx format, you have to convert it to .pem using following commands # openssl pkcs12 -in mycert.pfx -out mycert.key # openssl rsa -in mycert.key -out mycert.pem # openssl x509 -in mycert.key >> mycert.pem