Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/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 lua https.request和证书_Ssl_Https_Lua_Request_Certificate - Fatal编程技术网

Ssl lua https.request和证书

Ssl lua https.request和证书,ssl,https,lua,request,certificate,Ssl,Https,Lua,Request,Certificate,我正试图用证书向lua提出请求 最近我收到了一封信 我在网上试过很多教程,但都没有用 我发现很有趣: 我无法在Linux/OpenWRT/lua5.1上执行请求 COMODO向我提供了以下文件: AddTrustExternalCARoot.crt my_domain_com.crt COMODORSAAddTrustCA.crt COMODORSADomainValidationSecureServerCA.crt 在这个博客中,他提到了这些文件: key=“/root/client.key”

我正试图用证书向lua提出请求

最近我收到了一封信

我在网上试过很多教程,但都没有用

我发现很有趣:

我无法在Linux/OpenWRT/lua5.1上执行请求

COMODO向我提供了以下文件:

  • AddTrustExternalCARoot.crt
  • my_domain_com.crt
  • COMODORSAAddTrustCA.crt
  • COMODORSADomainValidationSecureServerCA.crt
  • 在这个博客中,他提到了这些文件:

  • key=“/root/client.key”
  • certificate=“/root/client.crt”
  • cafile=“/root/ca.crt”
  • 如何将COMODO的.crt文件转换为博客中提到的文件

    Obs:我尝试使用curl和get下载,但没有成功。

    我已经描述了;基本上,您需要为
    ssl.wrap
    调用指定模式和证书文件:

    local params = {
      mode = "client",
      protocol = "tlsv1",
      cafile = "/path/to/downloaded/cacert.pem", --<-- added cafile parameters
      verify = "peer", --<-- changed "none" to "peer"
      options = "all",
    }
    
    本地参数={
    mode=“客户端”,
    protocol=“tlsv1”,
    cafile=“/path/to/download/cacert.pem”

    local params = {
      mode = "client",
      protocol = "tlsv1",
      cafile = "/path/to/downloaded/cacert.pem", --<-- added cafile parameters
      verify = "peer", --<-- changed "none" to "peer"
      options = "all",
    }
    
    本地参数={
    mode=“客户端”,
    protocol=“tlsv1”,
    cafile=“/path/to/download/cacert.pem”

    我用以下方法解决它:


    您正试图在客户端使用此证书,以向服务器验证自己?这似乎不寻常,因为这是一个服务器证书。谁控制您尝试连接的服务器?请填写有关拓扑的更多详细信息。您正试图在客户端使用此证书,以通过服务器?这似乎很不寻常,因为这是一个服务器证书。谁控制您试图连接到的服务器?请填写有关拓扑结构的更多详细信息。