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
Apache 如何使mod_ssl接受自签名证书_Apache_Ssl_Curl_Ssl Certificate - Fatal编程技术网

Apache 如何使mod_ssl接受自签名证书

Apache 如何使mod_ssl接受自签名证书,apache,ssl,curl,ssl-certificate,Apache,Ssl,Curl,Ssl Certificate,我正在使用Apache mod_ssl模块的自签名证书,但我得到了 > curl_easy_perform() failed on: https://localhost/auth/example (SSL > certificate problem: self signed certificate) 它们是使ssl不失败的一种方法吗?我知道curl有一个选项--unsecure或-k,那么我可以向http ssl.conf添加类似的东西吗?mod_ssl将显示它配置为显示的任何证书

我正在使用Apache mod_ssl模块的自签名证书,但我得到了

> curl_easy_perform() failed on: https://localhost/auth/example (SSL
> certificate problem: self signed certificate)

它们是使ssl不失败的一种方法吗?我知道curl有一个选项--unsecure或-k,那么我可以向http ssl.conf添加类似的东西吗?

mod_ssl
将显示它配置为显示的任何证书。是否接受提交的证书是客户的决定;除了证书本身,您无法在
mod_ssl
中配置任何会影响客户端验证的内容

如果要接受服务器证书,可以:

  • 使用
    --unsecure
    /
    -k
    (如您所知)
  • 获取由公共可信证书颁发机构(CA)签名的证书
  • 使用自签名CA对服务器证书进行签名,并告诉Curl通过
    --cacert
    选项使用该CA验证服务器证书