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 请求的系统,而不是接收请求的服务器。
-
从以下位置下载最新的 cacert.pemhttps://curl.se/ca/cacert.pem https://curl.se/ca/cacert.pem
-
将“--cacert /path/to/cacert.pem”选项添加到curl命令中以告诉curl本地证书颁发机构文件的位置。
-
(或)创建或添加以下行到“.curlrc”文件:cacert = /path/to/cacert.pem
请参阅“man curl”,有关“-K, --config ”部分的部分,了解有关curl 在何处查找此文件的信息。
-
(或者如果使用 php)将以下行添加到 php.ini:(如果这是共享托管并且您无权访问 php.ini,那么您可以将其添加到 public_html 中的 .user.ini)。
curl.cainfo="/path/to/downloaded/cacert.pem"
确保将路径用双引号括起来!
- (也许也适用于 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(使用前将#替换为@)