如何使用CURL发送SSL证书?服务器说"错误:访问被拒绝。需要客户端SSL证书"

时间:2015-12-02 16:28:11

标签: ssl curl

服务器要求我随每个请求发送SSL证书。我尝试以下卷曲操作:

curl -H "Content-Type: application/json" --cert cert.p12:password -X POST -d 'jsonBody' https://api.server.com

但服务器回应我:

Error: Access is Denied. Client SSL Certificate Required.

为什么呢? :(

更新:

curl 7.43.0 (x86_64-apple-darwin14.0) libcurl/7.43.0 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets 

0 个答案:

没有答案