in reply to LWP::UserAgent to ignore ssl certificate

To completely remove SSL Checks..
$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
    Hi t_rex_joe, This code is using framework library, and there are exmaples whihc dont have to change ssl module options,but still seem to work for others..not in my environment though. Ther was a typo in one of ssl options verify_hostname, now the script works if I use LWP user agent, but still doesnot work using framework utilities whihc also use LWP... Thanks so much your time!