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

2024-04-01

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.

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

  1. 从以下位置下载最新的 cacert.pemhttps://curl.se/ca/cacert.pem https://curl.se/ca/cacert.pem

  2. 将“--cacert /path/to/cacert.pem”选项添加到curl命令中以告诉curl本地证书颁发机构文件的位置。

  3. (或)创建或添加以下行到“.curlrc”文件:cacert = /path/to/cacert.pem请参阅“man curl”,有关“-K, --config ”部分的部分,了解有关curl 在何处查找此文件的信息。

  4. (或者如果使用 php)将以下行添加到 php.ini:(如果这是共享托管并且您无权访问 php.ini,那么您可以将其添加到 public_html 中的 .user.ini)。

curl.cainfo="/path/to/downloaded/cacert.pem"

确保将路径用双引号括起来!

  1. (也许也适用于 php)默认情况下,FastCGI 进程将每 300 秒解析一次新文件(如果需要,您可以按照此处的建议添加几个文件来更改频率https://ss88.uk/blog/fast-cgi-and-user-ini-files-the-new-htaccess/ https://ss88.uk/blog/fast-cgi-and-user-ini-files-the-new-htaccess/).
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

curl: (60) SSL 证书问题:无法获取本地颁发者证书 的相关文章

随机推荐

  • stdin、stdout 和 stderr 是文件吗?

    有人告诉我 每当运行 C 程序时 都会打开三个文件 STDIN STDOUT 和 STDERR 他在支持中给出了此链接 http tldp org LDP abs html io redirection html http tldp org
  • 滤波器相关矩阵 R

    我在尝试从相关矩阵中提取数据时遇到了一些困难 我希望提取高于 0 8 且低于 0 99 的值 因为我想排除恰好为 1 的两只股票的相关性 这是我的代码 Test load the packages library corrr library
  • SQL Server 2008 中单个列上的多个外键约束

    我有两个表 TableA 和 TableB 现在 TableA 有 2 列 ID 和 Name TableB 有 3 列 ID Name 和 TableAID 现在有一个来自 TableA ID TableB TableAID 的外键约束
  • Apple 推送通知提供商的设备令牌

    如果我是 Apple 推送通知 提供商 multipleiOS 应用程序可以对多个应用程序使用相同的设备令牌吗 我知道每个应用程序都需要唯一的 SSL 证书 但是我对设备令牌感到困惑 Example 我有两个应用程序 A 和 B 我想为这两
  • 在使用 OpenSSL 的 EVP_PKEY_keygen 之前,我是否需要播种任何随机数生成器?

    在 OpenSSL Wiki 页面上称为EVP 密钥和参数生成 https wiki openssl org index php EVP Key and Parameter Generation它规定如下 由于这些函数使用随机数 因此您应该
  • NSURLCache 缓存响应问题

    我正在编写一个 iPhone 应用程序 其中一个选项卡是 twitter feed 我正在解析 twitter xml 并将其很好地放入表格视图中 如果没有互联网连接 我想显示上次有互联网连接和更新表时的缓存结果 我使用 NSURLCach
  • C# 此时无法启动异步操作。

    当我单击 asp web 表单中的提交按钮时 我尝试运行我的代码 我一点击按钮就出现错误有人知道原因吗 错误消息显示如下 应用程序中的服务器错误 此时无法启动异步操作 异步 操作只能在异步处理程序中启动 或者 模块或页面生命周期中的某些事件
  • 计算从现在到今天或明天指定时间的秒数[关闭]

    Closed 这个问题需要多问focused help closed questions 目前不接受答案 我以为这个问题已经有了答案 但似乎没有 在Python中 我想计算从 现在 到指定时间 今天 或 明天 的秒数 无论何时发生 例如 下
  • 通过 Facebook 图形 API 发布带有大图片的链接

    虽然过去链接只能包含小 90x90 图片 但现在看来链接可以在 Feed 中包含更大的图片 例如 400x208 如果您将具有大 og image 的链接粘贴到 Facebook UI 上的 更新状态 字段中 例如http allthing
  • 使用 RedirectStandardOutput 运行 ChkDsk

    Running ChkDsk不重定向StandardOutput工作时不会出现这样的错误 var processStartInfo new ProcessStartInfo chkdsk exe D processStartInfo Use
  • Perl Win32::API 和指针

    我正在尝试使用 Perl 的 Win32 API 模块来利用 Win32 API 函数 DsGetSiteName 根据Windows SDK DsGetSiteName的函数原型为 DWORD DsGetSiteName LPCTSTR
  • 对可能包含时间或距离的字符串进行排序

    我已经为自定义字符串实现了排序算法 该字符串表示田径赛事的时间或距离数据 下面是格式 10 03 00 十分三秒或 10 英尺三英寸 排序的结果是 对于野外事件 最长的投掷或跳跃将是第一个元素 而对于跑步事件 最快的时间将是第一个元素 下面
  • 如何固定Snackbar的高度和位置?

    On Android 支持库 24 1 1 Snackbar 工作正常 然后开始Android 支持库 24 2 0从那时起 Snackbar 开始表现如下 在图书馆修订记录 https developer android com topi
  • Pandas DataFrame 迭代行和总和

    我有这个熊猫数据框 recipe name ingredient group weight pudding milk 0 60 pudding 2 sugar 0 10 pudding 2 sugar 0 70 pudding 2 milk
  • 如何将 R 中的 SpatialPointsDataFrame 更改为 SpatialPolygonsDataFrame 以便在 ggplot2 中使用它?

    我使用 R 使用 ggplot2 中的大圆在世界地图上投影一些数据流 我还想在我的地图上投影以下城市地区 http www naturalearthdata com downloads http www naturalearthdata c
  • 在 Angular Firestore 查询中禁用缓存

    我正在运行 firestore 查询来获取数据 但该查询正在从之前的缓存数据查询返回数据 然后在来自服务器的第二次传递中返回其他数据 之前未查询到 有没有办法可以禁用 firestore 查询的缓存 以便每次查询某些内容时请求都会发送到数据
  • 在 Android 上的 PhoneGap 3.3 中打开系统浏览器中的链接

    我一直在寻找答案 但似乎我找到的大部分内容都是针对旧版本的 PhoneGap 这是我的链接代码 a href My Account a 这段代码完全没有任何作用 我点击链接但没有任何反应 是的 我在 HTML 页面上添加了phonegap
  • 如何在 Deno 中下载大文件?

    我试图下载一个 10GB 的文件 但只有 4GB 保存到磁盘上 而且内存增长了很多 const res await fetch https speed hetzner de 10GB bin const file await Deno op
  • Docker CentOS 映像不会自动启动 httpd

    我正在尝试使用 Apache 和 PHP 程序运行一个简单的 Docker 映像 如果我跑的话效果很好 docker run t i p 80 80 my httpd bin bash 然后手动启动Apache service httpd
  • curl: (60) SSL 证书问题:无法获取本地颁发者证书

    root sclrdev home sclr certs FreshCerts curl ftp ssl verbose ftp abc u trup trup cacert etc ssl certs ca certificates cr