无法连接到 api-ssl.bitly.com:443
Can't connect to api-ssl.bitly.com:443
这两天我不能生成bitly url。这是我遇到的错误:
$VAR1 = bless( {
'_content' => 'Can\'t connect to api-ssl.bitly.com:443
LWP::Protocol::https::Socket: SSL connect attempt failed with unknown error error:0D0C50A1:asn1 encoding routines:ASN1_item_verify:unknown message digest algorithm at /usr/local/share/perl/5.10.1/LWP/Protocol/http.pm line 51.
', '_rc' => 500,
'_headers' => bless( {
'client-warning' => 'Internal response',
'client-date' => 'Wed, 15 Apr 2015 18:08:08 GMT',
'content-type' => 'text/plain'
}, 'HTTP::Headers' ),
'_msg' => 'Can\'t connect to api-ssl.bitly.com:443',
'_request' => bless( {
'_content' => '',
'_uri' => bless( do{\(my $o = 'https://api-ssl.bitly.com/v3/shorten?login=LOGIN&apiKey=API_KEY&longurl=LONG_URL')}, 'URI::https' ),
'_headers' => bless( {
'user-agent' => 'libwww-perl/6.04'
}, 'HTTP::Headers' ),
'_method' => 'GET'
}, 'HTTP::Request' )
}, 'HTTP::Response' );
任何见解表示赞赏。
更新
cat /etc/issue.net
Ubuntu 10.04.4 LTS
openssl version -a
OpenSSL 0.9.8k 25 Mar 2009
built on: Mon Aug 18 16:08:20 UTC 2014
platform: debian-amd64
options: bn(64,64) md2(int) rc4(ptr,char) des(idx,cisc,16,int) blowfish(ptr2)
compiler: cc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DMD32_REG_T=int -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM
apt-cache policy openssl
openssl:
Installed: 0.9.8k-7ubuntu8.21
Candidate: 0.9.8k-7ubuntu8.27
Version table:
0.9.8k-7ubuntu8.27 0
500 http://archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
500 http://security.ubuntu.com/ubuntu/ lucid-security/main Packages
*** 0.9.8k-7ubuntu8.21 0
100 /var/lib/dpkg/status
0.9.8k-7ubuntu8 0
500 http://archive.ubuntu.com/ubuntu/ lucid/main Packages
这是我所有的,如果您需要更多,请告诉我。
$ perl -MIO::Socket::SSL -e 'print $IO::Socket::SSL::VERSION'
1.74
$ perl -MIO::Socket::SSL -e 'print $Net::SSLeay::VERSION'
1.48
$ perl -MIO::Socket::SSL -e 'print $LWP::Protocol::https::VERSION'
$ perl -MLWP -le "print(LWP->VERSION)"
6.04
$ perl -MIO::Socket::SSL -e 'print Net::SSLeay::OPENSSL_VERSION_NUMBER()'
9470143
更新
这可能是时间问题吗?
基于 this link 我假设您的 OpenSSL 太旧以至于不理解证书的 SHA256 算法。您需要将 OpenSSL 升级到至少 0.9.8o。
这两天我不能生成bitly url。这是我遇到的错误:
$VAR1 = bless( {
'_content' => 'Can\'t connect to api-ssl.bitly.com:443
LWP::Protocol::https::Socket: SSL connect attempt failed with unknown error error:0D0C50A1:asn1 encoding routines:ASN1_item_verify:unknown message digest algorithm at /usr/local/share/perl/5.10.1/LWP/Protocol/http.pm line 51.
', '_rc' => 500,
'_headers' => bless( {
'client-warning' => 'Internal response',
'client-date' => 'Wed, 15 Apr 2015 18:08:08 GMT',
'content-type' => 'text/plain'
}, 'HTTP::Headers' ),
'_msg' => 'Can\'t connect to api-ssl.bitly.com:443',
'_request' => bless( {
'_content' => '',
'_uri' => bless( do{\(my $o = 'https://api-ssl.bitly.com/v3/shorten?login=LOGIN&apiKey=API_KEY&longurl=LONG_URL')}, 'URI::https' ),
'_headers' => bless( {
'user-agent' => 'libwww-perl/6.04'
}, 'HTTP::Headers' ),
'_method' => 'GET'
}, 'HTTP::Request' )
}, 'HTTP::Response' );
任何见解表示赞赏。
更新
cat /etc/issue.net Ubuntu 10.04.4 LTS openssl version -a OpenSSL 0.9.8k 25 Mar 2009 built on: Mon Aug 18 16:08:20 UTC 2014 platform: debian-amd64 options: bn(64,64) md2(int) rc4(ptr,char) des(idx,cisc,16,int) blowfish(ptr2) compiler: cc -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -m64 -DL_ENDIAN -DTERMIO -O3 -Wa,--noexecstack -g -Wall -DMD32_REG_T=int -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM apt-cache policy openssl openssl: Installed: 0.9.8k-7ubuntu8.21 Candidate: 0.9.8k-7ubuntu8.27 Version table: 0.9.8k-7ubuntu8.27 0 500 http://archive.ubuntu.com/ubuntu/ lucid-updates/main Packages 500 http://security.ubuntu.com/ubuntu/ lucid-security/main Packages *** 0.9.8k-7ubuntu8.21 0 100 /var/lib/dpkg/status 0.9.8k-7ubuntu8 0 500 http://archive.ubuntu.com/ubuntu/ lucid/main Packages
这是我所有的,如果您需要更多,请告诉我。
$ perl -MIO::Socket::SSL -e 'print $IO::Socket::SSL::VERSION'
1.74
$ perl -MIO::Socket::SSL -e 'print $Net::SSLeay::VERSION'
1.48
$ perl -MIO::Socket::SSL -e 'print $LWP::Protocol::https::VERSION'
$ perl -MLWP -le "print(LWP->VERSION)"
6.04
$ perl -MIO::Socket::SSL -e 'print Net::SSLeay::OPENSSL_VERSION_NUMBER()'
9470143
更新
这可能是时间问题吗?
基于 this link 我假设您的 OpenSSL 太旧以至于不理解证书的 SHA256 算法。您需要将 OpenSSL 升级到至少 0.9.8o。