LWP / IO::Socket::SSL 失败并返回 SSL3_GET_SERVER_HELLO:wrong 密码
LWP / IO::Socket::SSL fails with SSL3_GET_SERVER_HELLO:wrong cipher returned
我发现很多问题和我的问题很相似,但都没有解决,所以我在这里请求你的帮助。
我正在尝试使用 Perl LWP 使用 https 从网页获取数据。
除了我真正需要使用的网站之外,我几乎可以从我尝试过的每个网站获取数据。
我在 Windows x64 下使用 Perl 版本 v5.18.2。
这是我的基本虚拟示例:
use strict;
use LWP::UserAgent;
use HTTP::Request;
use IO::Socket::SSL qw(debug3);
my $ua = LWP::UserAgent->new;
my $url = 'https://www.domainx.com:443';
my $req = HTTP::Request->new( GET => $url);
my $response = $ua->request($req);
print $response->status_line . "\n";
响应结果->status_line:
500 Can't connect to www.domainx.com:443
SSL 调试:
DEBUG: .../IO/Socket/SSL.pm:1890: new ctx 48125200
DEBUG: .../IO/Socket/SSL.pm:393: socket not yet connected
DEBUG: .../IO/Socket/SSL.pm:395: socket connected
DEBUG: .../IO/Socket/SSL.pm:413: ssl handshake not started
DEBUG: .../IO/Socket/SSL.pm:443: using SNI with hostname www.domainx.com
DEBUG: .../IO/Socket/SSL.pm:466: set socket to non-blocking to enforce timeout=180
DEBUG: .../IO/Socket/SSL.pm:479: Net::SSLeay::connect -> -1
DEBUG: .../IO/Socket/SSL.pm:489: ssl handshake in progress
DEBUG: .../IO/Socket/SSL.pm:499: waiting for fd to become ready: SSL wants a read first
DEBUG: .../IO/Socket/SSL.pm:519: socket ready, retrying connect
DEBUG: .../IO/Socket/SSL.pm:479: Net::SSLeay::connect -> -1
DEBUG: .../IO/Socket/SSL.pm:1359: SSL connect attempt failed with unknown error
DEBUG: .../IO/Socket/SSL.pm:485: fatal SSL error: SSL connect attempt failed with unknown error error:14092105:SSL routines:SSL3_GET_SERVER_HELLO:wrong cipher returned
DEBUG: .../IO/Socket/SSL.pm:1924: free ctx 48125200 open=48125200
DEBUG: .../IO/Socket/SSL.pm:1932: OK free ctx 48125200
通过查看之前的帖子,我尝试申请:ssl_opts => { verify_hostname => 0 },但这没有帮助。
如果我尝试使用浏览器(IE 或 Chrome)连接到同一个站点,它工作正常。
这是一些基于证书的错误还是这里出了什么问题?
The actual site is www.firstcard.fi
从 report by SSLLabs 中也可以看出服务器严重损坏。要连接到服务器,必须仅使用服务器提供的单一有效密码来解决这些问题:
my $ua = LWP::UserAgent->new;
$ua->ssl_opts(SSL_cipher_list => 'DES-CBC3-SHA');
有趣的是,这个密码包含在 IO::Socket::SSL 默认使用的密码列表中,但是服务器太坏了,无法正确处理正确的 ClientHello。
我发现很多问题和我的问题很相似,但都没有解决,所以我在这里请求你的帮助。
我正在尝试使用 Perl LWP 使用 https 从网页获取数据。 除了我真正需要使用的网站之外,我几乎可以从我尝试过的每个网站获取数据。 我在 Windows x64 下使用 Perl 版本 v5.18.2。 这是我的基本虚拟示例:
use strict;
use LWP::UserAgent;
use HTTP::Request;
use IO::Socket::SSL qw(debug3);
my $ua = LWP::UserAgent->new;
my $url = 'https://www.domainx.com:443';
my $req = HTTP::Request->new( GET => $url);
my $response = $ua->request($req);
print $response->status_line . "\n";
响应结果->status_line:
500 Can't connect to www.domainx.com:443
SSL 调试:
DEBUG: .../IO/Socket/SSL.pm:1890: new ctx 48125200
DEBUG: .../IO/Socket/SSL.pm:393: socket not yet connected
DEBUG: .../IO/Socket/SSL.pm:395: socket connected
DEBUG: .../IO/Socket/SSL.pm:413: ssl handshake not started
DEBUG: .../IO/Socket/SSL.pm:443: using SNI with hostname www.domainx.com
DEBUG: .../IO/Socket/SSL.pm:466: set socket to non-blocking to enforce timeout=180
DEBUG: .../IO/Socket/SSL.pm:479: Net::SSLeay::connect -> -1
DEBUG: .../IO/Socket/SSL.pm:489: ssl handshake in progress
DEBUG: .../IO/Socket/SSL.pm:499: waiting for fd to become ready: SSL wants a read first
DEBUG: .../IO/Socket/SSL.pm:519: socket ready, retrying connect
DEBUG: .../IO/Socket/SSL.pm:479: Net::SSLeay::connect -> -1
DEBUG: .../IO/Socket/SSL.pm:1359: SSL connect attempt failed with unknown error
DEBUG: .../IO/Socket/SSL.pm:485: fatal SSL error: SSL connect attempt failed with unknown error error:14092105:SSL routines:SSL3_GET_SERVER_HELLO:wrong cipher returned
DEBUG: .../IO/Socket/SSL.pm:1924: free ctx 48125200 open=48125200
DEBUG: .../IO/Socket/SSL.pm:1932: OK free ctx 48125200
通过查看之前的帖子,我尝试申请:ssl_opts => { verify_hostname => 0 },但这没有帮助。 如果我尝试使用浏览器(IE 或 Chrome)连接到同一个站点,它工作正常。
这是一些基于证书的错误还是这里出了什么问题?
The actual site is www.firstcard.fi
从 report by SSLLabs 中也可以看出服务器严重损坏。要连接到服务器,必须仅使用服务器提供的单一有效密码来解决这些问题:
my $ua = LWP::UserAgent->new;
$ua->ssl_opts(SSL_cipher_list => 'DES-CBC3-SHA');
有趣的是,这个密码包含在 IO::Socket::SSL 默认使用的密码列表中,但是服务器太坏了,无法正确处理正确的 ClientHello。