成功&错误:curl:(60)无法获得本地颁发者证书

时间:2017-07-25 11:10:35

标签: bash ssl curl https

我在我的网络应用程序上做了一些curl请求(也是在bash上),并且认识到了以下行为:

有时候我在做

 curl --header "ApiKey: an1ceke3y" https://test.host.com/api/endpoint

我得到以下内容:

 curl: (60) SSL certificate problem: unable to get local issuer certificate

但有时,即使在失败请求后的第二秒我也提出了成功请求。

我对6个请求做了一点测试:

1) Success
2) Error
3) Success
4) Success
5) Success
6) Error

不应该

unable to get local issuer certificate

总是发生? 有没有办法可以更好地调试问题?

其他信息:

API端点位于微软天蓝色负载均衡器

之后

成功申请(使用-v)

* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):

错误请求(使用-v)

* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS alert, Server hello (2):
* SSL certificate problem: unable to get local issuer certificate

谢谢!

0 个答案:

没有答案