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.
当前回答
以我为例,在我试图用cURL使用的服务上安装我的证书时出现了问题。我未能将中间证书和根证书捆绑/连接到我的域证书。一开始并没有明显的问题,因为Chrome解决了这个问题并接受了证书,尽管省略了中间证书和根证书。
在捆绑证书之后,一切都按预期工作。我捆扎成这样
$ cat intermediate.crt >> domain.crt
并对所有中间证书和根证书重复。
其他回答
没有一个答案提到,可能是连接到内部vpn的角色,我以前遇到过这个问题,并要求在专用网络上
是的,您还需要添加一个CA证书。在Node.js中添加一个代码片段以获得更清晰的视图。
var fs = require(fs)
var path = require('path')
var https = require('https')
var port = process.env.PORT || 8080;
var app = express();
https.createServer({
key: fs.readFileSync(path.join(__dirname, './path to your private key/privkey.pem')),
cert: fs.readFileSync(path.join(__dirname, './path to your certificate/cert.pem')),
ca: fs.readFileSync(path.join(__dirname, './path to your CA file/chain.pem'))}, app).listen(port)
关于“SSL证书问题:无法获得本地颁发者证书”错误。需要注意的是,这适用于发送CURL请求的系统,而不是接收请求的服务器。
Download the latest cacert.pem from https://curl.se/ca/cacert.pem Add the '--cacert /path/to/cacert.pem' option to the curl command to tell curl where the local Certificate Authority file is. (or) Create or add to a '.curlrc' file the line: cacert = /path/to/cacert.pem See 'man curl', the section about the '-K, --config <file>' section for information about where curl looks for this file. (or if using php) Add the following line to php.ini: (if this is shared hosting and you don't have access to php.ini then you could add this to .user.ini in public_html).
卷毛。cainfo = " - path / to / downloaded cacert pem。”
请确保将路径用双引号括起来!!
默认情况下,FastCGI进程将每300秒解析一次新文件(如果需要,您可以通过添加几个文件来改变频率https://ss88.uk/blog/fast-cgi-and-user-ini-files-the-new-htaccess/)。
尝试在Ubuntu中重新安装curl,并使用sudo update-ca-certificates—fresh更新我的CA证书
到目前为止,我看到这个问题在公司网络中发生,有两个原因,其中一个或两个都可能发生在你的情况中:
由于网络代理的工作方式,它们有自己的SSL证书,从而改变了curl看到的证书。许多或大多数企业网络强制您使用这些代理。 在客户端电脑上运行的一些防病毒程序也类似于HTTPS代理,这样它们就可以扫描你的网络流量。您的防病毒程序可能有禁用此功能的选项(假设您的管理员允许)。
作为旁注,上面的第2条可能会让您对被扫描的本应安全的TLS通信感到不安。这就是你的公司世界。
推荐文章
- Ruby Bundle Symbol not found: _SSLv2_client_method (LoadError)
- PHP中的cURL是什么?
- 错误:无法验证nodejs中的第一个证书
- 对bash脚本函数中定义的变量使用curl POST
- 没有为Android SSL连接找到信任锚
- 抓取:SSL: CERTIFICATE_VERIFY_FAILED错误http://en.wikipedia.org
- 使用curl POST multipart/form-data的正确方法是什么?
- 使用.htaccess和mod_rewrite强制SSL/https
- PHP -调试Curl
- (1) libcurl不支持或禁用https协议
- 在尝试访问HTTPS url时,如何使用cURL处理证书?
- 在Java客户端中接受服务器的自签名ssl证书
- 如何使用PHP 7安装ext-curl扩展?
- 如何通过JSON文件传递有效载荷卷曲?
- 编写器安装错误——当它实际启用时需要ext_curl