当前位置: 首页 > 知识库问答 >
问题:

cURL:(60)SSL证书问题:无法获取本地颁发者证书

白丁雨
2023-03-14
root@sclrdev:/home/sclr/certs/FreshCerts# curl --ftp-ssl --verbose ftp://{abc}/ -u trup:trup --cacert /etc/ssl/certs/ca-certificates.crt
* About to connect() to {abc} port 21 (#0)
*   Trying {abc}...
* Connected to {abc} ({abc}) port 21 (#0)
< 220-Cerberus FTP Server - Home Edition
< 220-This is the UNLICENSED Home Edition and may be used for home, personal use only
< 220-Welcome to Cerberus FTP Server
< 220 Created by Cerberus, LLC
> AUTH SSL
< 234 Authentication method accepted
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  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
* Closing connection 0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

共有1个答案

鲜于阳
2023-03-14

与“SSL证书问题:无法获取本地颁发者证书”相关的错误。需要注意的是,这适用于发送CURL请求的系统,而不是接收请求服务器

>

  • 从https://curl.haxx.se/ca/cacert.pem下载最新的cacert.pem

    将以下行添加到php.ini中:(如果这是共享宿主,并且您没有访问php.ini的权限,那么您可以将其添加到public_html中的.user.ini中)。

    默认情况下,FastCGI进程将每300秒解析一次新文件(如果需要,您可以按照https://ss88.uk/blog/fast-cgi-and-user-ini-files-the-new-htaccess/的建议添加几个文件来更改频率)。

  •  类似资料:
    • 问题内容: 我在本地开发环境上使用WAMP,并尝试从信用卡中扣款,但收到错误消息: cURL错误60:SSL证书问题:无法获取本地颁发者证书 我在Google上进行了很多搜索,很多人建议我下载此文件:cacert.pem,将其放在某个位置,然后在php.ini中引用它。这是我的php.ini中的部分: 但是,即使多次重新启动服务器并更改了路径后,我仍然收到相同的错误消息。 我使用来自Apache模

    • 我在Google上搜索了很多,很多人建议我下载这个文件:cacert.pem,把它放在某个地方,并在我的php.ini中引用它。这是我的php.ini中的部分: 然而,即使在重新启动服务器几次并更改路径后,我也会得到相同的错误消息。 我使用Apache模块中的WAMP并启用ssl_module。在PGP扩展中,我启用了php_curl。 这是我正在运行的代码:

    • 我正在尝试使用< code>Amazon SDK for php,从运行< code>AppServ 2.5.10(包括< code>Apache 2.2.8 、< code>php 5.2.6 、< code>mysql 5.0.51b和< code>phpMyAdmin 2.10.3)的(localhost) Windows 8机器上连接亚马逊的S3文件。 为了兼容< code>Amazon

    • 我已经在stackoverflow上尝试了很多解决这个问题的方法,不幸的是,到目前为止,没有任何方法对我有效。 它始于作曲家安装。我的env详细信息如下所示: > 操作系统:Windows 7 PHP V 7.1.10,XAMPP版本 我正在运行MINGW64(它是与git v2.1.5一起安装的) 卷曲--版本 curl 7.56.1(x86_64-w64-mingw32)libcurl/7.5

    • 在PC重新配置后,我无法正确使用Docker,因为一些curl命令由于SSL/TLS问题而被拒绝。 仅在一个示例 返回以下错误: 经过一些挖掘,我现在知道这个问题也发生在我的WSL映像中,但不在主机Windows操作系统上。因此,我认为这一定是源于我的WSL设置的问题,而不是Docker本身造成的(?)。 在StackOverflow上有很多相关的问题,但是我没有找到真正适用于这种情况的解决方案(

    • 我使用MAMP作为本地开发环境。我想实现一个谷歌认证-但不断得到这个SSL错误。 < li >正如其他SO主题所建议的,我已经在我的PHP.ini文件中添加了这行代码: 知道如何在我的本地环境中传递这个SSL错误吗? 这是代码: