Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.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
Ssl Curl:如何处理NSS错误-8156?_Ssl_Curl_Apache Nifi_Nss - Fatal编程技术网

Ssl Curl:如何处理NSS错误-8156?

Ssl Curl:如何处理NSS错误-8156?,ssl,curl,apache-nifi,nss,Ssl,Curl,Apache Nifi,Nss,我有一个安全的nifi,在其中我必须使用RESTAPI,同时像这样调用处理器的get请求:https://server_ip/nifi-api/processors/015d1364-f372-1e67-e201-a15d0erte56t。 但是,我得到了一个证书错误。所以,我决定检查是否可以从nifi连接服务器,-我使用了如下的CURL: curl --verbose https://server_ip/nifi-api/processors/015d1364-f372-1e67-e201-a

我有一个安全的nifi,在其中我必须使用RESTAPI,同时像这样调用处理器的get请求:
https://server_ip/nifi-api/processors/015d1364-f372-1e67-e201-a15d0erte56t
。 但是,我得到了一个证书错误。所以,我决定检查是否可以从nifi连接服务器,-我使用了如下的CURL:

curl --verbose https://server_ip/nifi-api/processors/015d1364-f372-1e67-e201-a15d0erte56t
答案是:

Initializing NSS with certpath: sql:/etc/pki/nssdb
 *   CAfile: /etc/pki/tls/certs/ca-bundle.crt   CApath: none
 * Issuer certificate is invalid: 
 * NSS error -8156
 * Closing connection #0
 * Peer certificate cannot be authenticated with known CA certificates 
curl: (60) Peer certificate cannot be authenticated with known CA
我想知道是否有任何方法可以在不更改CA证书的情况下消除此错误?


任何建议都会有帮助。

您的错误告诉我,您的
服务器ip
的证书不正确。您需要请负责该服务器的人员查看问题

从您的角度来看,您可以尝试使用开发人员工具通过浏览器获取证书,例如在Chrome中,您可以执行以下步骤:

  • 输入地址<代码>https://server_ip/nifi-api/processors/015d1364-f372-1e67-e201-a15d0erte56t然后按键盘上的Enter键
  • 按F12键打开开发人员工具
  • 导航到选项卡
    Security
  • 通过单击查看证书按钮获取当前证书的详细信息
  • 在第1步之后,您可以得到一个页面,上面有关于安全错误的解释——只要阅读它,您就会得到一个答案


    顺便说一句:从我的观点来看,使用带有ip地址的HTTPS不是一个好主意

    您的错误告诉我,您的
    服务器ip
    的证书不正确。您需要请负责该服务器的人员查看问题

    从您的角度来看,您可以尝试使用开发人员工具通过浏览器获取证书,例如在Chrome中,您可以执行以下步骤:

  • 输入地址
    https://server_ip/nifi-api/processors/015d1364-f372-1e67-e201-a15d0erte56t
    然后按键盘上的Enter键
  • 按F12键打开开发人员工具
  • 导航到选项卡
    Security
  • 通过单击查看证书按钮获取当前证书的详细信息
  • 在第1步之后,您可以得到一个页面,上面有关于安全错误的解释——只要阅读它,您就会得到一个答案

    顺便说一句:从我的观点来看,使用带有ip地址的HTTPS不是一个好主意