我最近在我们的一个 nginx 网络服务器上安装了一个自签名 SSL 证书。如果我尝试 wget 一个文件,--no-check-certificate我会收到以下错误。您可以使用浏览器访问该站点,浏览器会识别出它是自签名的,并且证书会显示所有正确的信息。似乎基于我应该找到一种方法在本地信任证书的消息,但这不会破坏--no-check-certificate的目的吗?
$ 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.
Run Code Online (Sandbox Code Playgroud)
任何想法将不胜感激。