Dear Monks
I am trying to connect to https web site (actually it is collabnet site, we have project tracker in it) and trying to download some content.
Since it is password protected page, I used WWW::Mechanize module. (Activeperl 5.14, x64, windows 7). I do have Crypt::SSLeay comes with ActivePerl 5.14
When I tried to get the content from web site using below code, I get Error GETing https://www.collabnet.com/: Can't connect to www.collabnet.com:443 (certificate verify failed) Error
What I know is, I need to set HTTPS_CA_DIR path but i do not know where should I point this in windows os. This https://www.collabnet.com/ is perfectly working using internet explorer.
Here is my code, Please help me to solve this problem. Thanks in Advance
use strict; use warnings; use WWW::Mechanize; use Crypt::SSLeay; #Globals my $browser; my $url; #Down load the CCB search queries $browser=WWW::Mechanize->new(agent=>'Windows IE 6',cookie_jar => {},no +proxy =>1); #$url=http://www.google.com - works $url='https://www.collabnet.com/'; $browser->get($url); print $browser->content(format=>'text');
UPDATE: Solved :)
Hi Monks,
I have solved this problem. I do not want my perl application to verify host certificate, so I exported following environment variable ,
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME}=0;
Everything works well :)
Learning: Need to read LWP doc properly
In reply to "certificate verify failed" error while trying to connect to https:// site using use WWW::Mechanize by sam_bakki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |