#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new(
agent => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4',
ssl_opts => { verify_hostname => 0 }
);
my $response = $ua->get('https://www.themoviedb.org');
給出錯誤信息:如何解決Perl LWP中的SSL錯誤?
Can't connect to www.themoviedb.org:443
SSL connect attempt failed error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure at /Library/Perl/5.18/LWP/Protocol/http.pm line 46.
我使用MacOS的塞拉利昂
LWP->VERSION 6.26
IO::Socket::SSL->VERSION 2.049
Net::SSLeay->VERSION 1.72
Net::SSLeay::OPENSSL_VERSION_NUMBER() 0x009081df
LWP::UserAgent->VERSION 6.26
LWP::Protocol::https->VERSION 6.04
如何解決呢?