【发布时间】:2019-07-30 12:47:59
【问题描述】:
我需要使用 SSL 身份验证调用支付解决方案提供商 REST API 端点。
供应商给了我这些文件:
- merchantCA.crt
- rootCA.crt
- client.crt
- client.key
- client.pfx
- 密码短语
API 文档说明 rootCA.crt 是证书颁发机构,它签署了证书提供商服务器在连接到商家时用来进行身份验证的证书。
merchantCA.crt 是签署商家证书的证书颁发机构
这是我的 CURL 调用:
curl --cacert rootCA.crt --cert client.crt:passphrase --key client.key -X GET -H 'Content-Type: application/json' "https://provider_website/api/desired_endpoint"
但是我收到了这个错误
curl: (58) could not load PEM client certificate, OpenSSL error error:140AB18E:SSL routines:SSL_CTX_use_certificate:ca md too weak, (no key found, wrong pass phrase, or wrong file format?)
不知道发生了什么。
【问题讨论】: