当前位置:   article > 正文

curl 无证书访问https,如何在尝试访问HTTPS网址时使用cURL处理证书?

error setting certificate verify locations: cafile: /etc/ssl/certs/ca-certif

I am getting the following error using curl:

curl: (77) error setting certificate verify locations:

CAfile: /etc/ssl/certs/ca-certificates.crt

CApath: none

How do I set this certificate verify locations? Thanks.

解决方案

This error is related to a missing package: ca-certificates. Install it.

In Ubuntu Linux (and similar distro):

# apt-get install ca-certificates

In CygWin via Apt-Cyg

# apt-cyg install ca-certificates

In Arch Linux (Raspberry Pi)

# pacman -S ca-certificates

The documentation tells:

This package includes PEM files of CA certificates to allow SSL-based applications to check for the authenticity of SSL connections.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/250231
推荐阅读
相关标签
  

闽ICP备14008679号