无法从github获取wget,sslv3握手错误

无法从github获取wget,sslv3握手错误

我们有一个从 github 下载 mod security 的脚本,最近开始失败。服务器运行 CentOS 6,但 RHEL 6 可能也有同样的问题。输出是:

# wget https://github.com/downloads/SpiderLabs/ModSecurity/modsecurity-apache_2.7.1.tar.gz
--2014-07-22 18:49:46--  https://github.com/downloads/SpiderLabs/ModSecurity/modsecurity-apache_2.7.1.tar.gz
Resolving github.com... 192.30.252.129
Connecting to github.com|192.30.252.129|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://cloud.github.com/downloads/SpiderLabs/ModSecurity/modsecurity-apache_2.7.1.tar.gz [following]
--2014-07-22 18:49:47--  https://cloud.github.com/downloads/SpiderLabs/ModSecurity/modsecurity-apache_2.7.1.tar.gz
Resolving cloud.github.com... 54.230.99.219, 205.251.219.190, 54.230.97.212, ...
Connecting to cloud.github.com|54.230.99.219|:443... connected.
OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
Unable to establish SSL connection.

关于如何解决或解决这个问题有什么想法吗?

答案1

您可以使用curl命令来下载它:

curl -LO https://github.com/downloads/SpiderLabs/ModSecurity/modsecurity-apache_2.7.1.tar.gz

答案2

由于SSLv3严重的安全问题,服务器端已禁用SSLv3加密握手。此外,您的 wget 客户端是过时的版本,并且仍然默认使用 SSLv3 加密。您有 2 个选择:

  • 在 wget 前面使用 --secure-protocol=TLSv1 标志。 wget --secure-protocol=TLSv1
  • 安装使用默认 TLSv1 协议的 wget 更新版本

答案3

你应该检查你的 wget 版本。

wget我在旧版本(< 1.15)中遇到了同样的问题。

答案4

至于解决方法,如果您信任主机,请尝试指定--no-check-certificate或添加:

check_certificate = off

进入你的~/.wgetrc(不推荐)。

在极少数情况下,这是由您的系统时间引起的,系统时间可能不同步,从而使之前有效的证书失效。

相关内容