in reply to LWP::UserAgent to ignore ssl certificate
$ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0; $ENV{HTTPS_DEBUG} = 1; IO::Socket::SSL::set_ctx_defaults( SSL_verifycn_scheme => 'www', SSL_verify_mode => 0, ); $server = "https\:\/\/127.0.0.1"; $user = "user"; $pass = "pass"; $uah = undef; $uah = LWP::UserAgent->new; if($debug == 1) { print "UAH: \"$uah\"\n"; } $post = undef; $post = [ login => $user, password => $pass ]; $req = undef; $req = POST "$server/login", $post; if($debug == 1) { print "REQ: \"$req\"\n"; } $ret = undef; $ret = $uah->request($req); if($debug == 1) { print "-- LINE: \"" . __LINE__ . "\" RET: \"$ret +\"\n"; } $str = undef; $str = $ret->content; #if($debug == 1) { print "-- LINE: \"" . __LINE__ . "\" STR AS CON +TENT: \"$str\"\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: LWP::UserAgent to ignore ssl certificate
by perlbaski (Sexton) on Mar 18, 2014 at 20:09 UTC |