如何在尝试访问HTTPS网址时使用cURL处理证书? [英] How do I deal with certificates using cURL while trying to access an HTTPS url?
本文介绍了如何在尝试访问HTTPS网址时使用cURL处理证书?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我收到以下错误使用curl:
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.
推荐答案
此错误与缺少的包相关: ca-
。安装它。
在Ubuntu Linux(和类似的发行版)中:
In Ubuntu Linux (and similar distro):
# apt-get install ca-certificates
在CygWin中通过 Apt-Cyg
In CygWin via Apt-Cyg
# apt-cyg install ca-certificates
在Arch Linux(Raspberry Pi)
In Arch Linux (Raspberry Pi)
# pacman -S ca-certificates
< hr>
文档说明:
The documentation tells:
此软件包包含CA证书的PEM文件,的应用程序来检查SSL连接的真实性。
This package includes PEM files of CA certificates to allow SSL-based applications to check for the authenticity of SSL connections.
这篇关于如何在尝试访问HTTPS网址时使用cURL处理证书?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文