如何在尝试访问 HTTPS url 时使用 cURL 处理证书? [英] How do I deal with certificates using cURL while trying to access an HTTPS url?
问题描述
我在使用 curl 时遇到以下错误:
<前>curl: (77) 错误设置证书验证位置:CA文件:/etc/ssl/certs/ca-certificates.crtCApath:无如何设置此证书验证位置?
此错误与缺少包有关:ca-certificates
.安装它.
在 Ubuntu Linux(和类似的发行版)中:
# apt-get install ca-certificates
在 CygWin 中通过 Apt-Cyg
# apt-cyg install ca-certificates
在 Arch Linux(树莓派)中
# pacman -S ca-certificates
<小时>
文档说明:
<块引用>此软件包包含 CA 证书的 PEM 文件,以允许基于 SSL 的应用程序检查 SSL 连接的真实性.
见:Debian -- 压缩包 ca-certificates 的详细信息
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?
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.
As seen at: Debian -- Details of package ca-certificates in squeeze
这篇关于如何在尝试访问 HTTPS url 时使用 cURL 处理证书?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!