Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 在rails中获取SSLCatartificateError_Ruby On Rails_Ruby - Fatal编程技术网

Ruby on rails 在rails中获取SSLCatartificateError

Ruby on rails 在rails中获取SSLCatartificateError,ruby-on-rails,ruby,Ruby On Rails,Ruby,我在rails中有以下单行代码: Curl::Easy.new("https://www.uts.edu.au/" ).perform 运行此命令会出现以下错误: Curl::Err::SSLCACertificateError: Peer certificate cannot be authenticated with given CA certificates 有谁能建议如何修理它吗 如需进一步帮助: curl -v https://www.uts.edu.au/ * Adding h

我在rails中有以下单行代码:

Curl::Easy.new("https://www.uts.edu.au/" ).perform
运行此命令会出现以下错误:

Curl::Err::SSLCACertificateError: Peer certificate cannot be authenticated with given CA certificates
有谁能建议如何修理它吗

如需进一步帮助:

 curl -v https://www.uts.edu.au/
* Adding handle: conn: 0x16a3a40
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x16a3a40) send_pipe: 1, recv_pipe: 0
* About to connect() to www.uts.edu.au port 443 (#0)
*   Trying 54.79.20.73...
* Connected to www.uts.edu.au (54.79.20.73) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* 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无法使用受信任的ca。你是在没有CAs的Docker容器中运行的吗

请提供curl-v的输出https://www.uts.edu.au/

更新: 您发出请求的主机的证书链似乎有问题

证书可能缺少必要的元数据或其证书 权威机构可能出现故障


谢谢补充。不,我们没有在Docker容器中运行它。您在输出SSL证书上遇到问题:无法获取本地颁发者证书您使用的是什么操作系统?更新:发现www.uts.edu.auThanks提供的链存在问题很多,非常有用!