wget ssl警报握手失败 [英] wget ssl alert handshake failure

查看:145
本文介绍了wget ssl警报握手失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从https网站下载文件并继续收到以下错误:

I am trying to download files from an https site and keep getting the following error:

OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
Unable to establish SSL connection.

从网上阅读博客我收集到必须提供服务器证书和客户端证书。我找到了如何下载服务器证书而不是客户端证书的步骤。有没有人有一套完整的步骤来使用wget与SSL?我也尝试了--no-check-certificate选项,但是没有用。

From reading blogs online I gather I have to provide the server cert and the client cert. I have found steps on how to download the server cert but not the client cert. Does anyone have a complete set of steps to use wget with SSL? I also tried the --no-check-certificate option but that did not work.

wget版本:wget-1.13.4
openssl版本:OpenSSL 1.0 .1f 2014年1月6日

wget version: wget-1.13.4 openssl version: OpenSSL 1.0.1f 6 Jan 2014

尝试从coursera.org上的课程网页下载所有讲座资源。因此,URL看起来像这样: https://class.coursera.org/matrix-002 /讲座

trying to download all lecture resources from a course's webpage on coursera.org. So, the URL would look something like this: https://class.coursera.org/matrix-002/lecture

在线访问此网页需要表单身份验证,不确定是否导致失败。

Accessing this webpage online requires form authentication, not sure if that is causing the failure.

推荐答案

它可以在这里使用相同的OpenSSL版本,但更新版本的wget(1.15)。查看更改日志,您的问题有以下重大变化:

It works from here with same OpenSSL version, but a newer version of wget (1.15). Looking at the Changelog there is the following significant change regarding your problem:


1.14:添加对TLS服务器名称指示的支持。

1.14: Add support for TLS Server Name Indication.

请注意,此网站不需要SNI。但 www.coursera.org 需要它。
如果您使用 -v --debug 调用wget(正如我在评论中明确建议的那样),您将看到:

Note that this site does not require SNI. But www.coursera.org requires it. And if you would call wget with -v --debug (as I've explicitly recommended in my comment!) you will see:

$ wget https://class.coursera.org
...
HTTP request sent, awaiting response...
  HTTP/1.1 302 Found
...
Location: https://www.coursera.org/ [following]
...
Connecting to www.coursera.org (www.coursera.org)|54.230.46.78|:443... connected.
OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
Unable to establish SSL connection.

所以错误确实发生在 www.coursera.org ,原因是缺少对SNI的支持。您需要升级您的wget版本。

So the error actually happens with www.coursera.org and the reason is missing support for SNI. You need to upgrade your version of wget.

这篇关于wget ssl警报握手失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆