Wget,自签名证书和 – 无检查证书不起作用

我最近在我们的一个nginxnetworking服务器上安装了一个自签名的SSL证书。 如果我尝试使用--no-check-certificate获取文件, --no-check-certificate收到以下错误消息。 您可以通过浏览器访问该站点,浏览器将识别出自己已经签名,并且证书显示所有正确的信息。 看来基于这个信息,我应该find一种方法来信任本地的证书,但是这并没有打破 – 没有检查证书的目的?

 $ wget https://www.example.com/index.html --no-check-certificate --2015-02-20 14:13:58-- https://www.example.com/index.html Resolving example.com... 192.0.2.1 Connecting to example.com|192.0.2.1|:443... connected. WARNING: cannot verify example.com's certificate, issued by “/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO RSA Domain Validation Secure Server CA”: Unable to locally verify the issuer's authority. WARNING: no certificate subject alternative name matches requested host name “example.com”. HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers. Retrying. 

任何想法将不胜感激。

看看wget的错误输出和命令行,这里的问题不是客户端证书validation。 看来服务器机器拒绝连接。 这可能是由于wget不向服务器提交所需的客户端证书(请检查您的其他浏览器是否拥有此证书),此特定用户代理被拒绝等。

我宁愿检查服务器的日志。

您可以尝试添加一些debugging:-S和-d服务器和客户端标题。

tcpdump是更好的,将提供完整的故事,但最好的事情是没有完整的数据包有效载荷的标题。

http://www.gnu.org/software/wget/manual/wget.html