无法连接到某些HTTPS网址


0

我无法使用https连接到某些网站。wget和curl抱怨无法验证证书。我想这是因为我的NAS上缺少根证书。例如:

ReadyNAS:~# wget https://pypi.python.org/
--2016-04-12 20:08:51--  https://pypi.python.org/
Resolving pypi.python.org... 23.235.43.223
Connecting to pypi.python.org|23.235.43.223|:443... connected.
ERROR: cannot verify pypi.python.org's certificate, issued by `/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA':
  Unable to locally verify the issuer's authority.
ERROR: certificate common name `www.python.org' doesn't match requested host name `pypi.python.org'.
To connect to pypi.python.org insecurely, use `--no-check-certificate'.
Unable to establish SSL connection.

我已经手动将curl和wget编译并更新到相当新的版本(GNU Wget 1.11.4; libcurl / 7.45.0 GnuTLS / 3.3.18 zlib / 1.2.3.3),但是没有用。

背景资料: NAS上的linux发行版相当老(Debian Sid,Linux 2.6.37.6)。用于更新SSL存储的常规命令似乎无效。

我如何找到这些连接问题的原因并解决?

Answers:


0

有两个错误:

ERROR: cannot verify pypi.python.org's certificate, issued by `/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA': Unable to locally verify the issuer's authority.

这意味着DigiCert CA不在操作系统信任存储中。您应该能够通过下载CA crt(即从Firefox)添加它,然后添加它:

cp digicert.crt /usr/local/share/ca-certificates/digicert.crt

update-ca-certificates

(我对这些命令不是很确定,但是也应该在旧的Debian上工作...)

ERROR: certificate common name `www.python.org' doesn't match requested host name `pypi.python.org'.

这意味着该证书不是针对域pypi.python.org的证书,但是,使用firefox检查该证书,我可以看到pypi.python.org列在证书中。也许这是由于缺少CA引起的错误警报,请尝试对其进行修复。

[怀旧] Awww,一个不错的旧版2.6内核:D [/ nostalgic]

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.