in reply to Re: LWP UserAgent - Sending Client Certificate connect to remote host
in thread LWP UserAgent - Sending Client Certificate connect to remote host

That's weird, could you pls reply and paste your code again (after you added ssl_opts) ?
  • Comment on Re^2: LWP UserAgent - Sending Client Certificate connect to remote host

Replies are listed 'Best First'.
Re^3: LWP UserAgent - Sending Client Certificate connect to remote host
by kabachaa (Novice) on May 14, 2013 at 14:32 UTC
    I have 5.8.8 perl installed on our machine. Thanks
    #!/usr/bin/perl -l use strict; use warnings; use HTTP::Headers; use HTTP::Request; use LWP::UserAgent; my $UPDATE_SERVER = "https://something.com"; my $ua = LWP::UserAgent->new; ssl_opts => { verify_hostname => 0, SSL_ca_file => 'ops-cert-O.crt', }; $ua->timeout(10); #$ua->agent(""); my $req = HTTP::Request->new( GET => $UPDATE_SERVER ); my $res = $ua->request($req); print "header ----" . $res->headers_as_string; print "response ---" . $res->as_string;
      I mean code like this:
      #!/usr/bin/perl -l use strict; use warnings; use HTTP::Headers; use HTTP::Request; use LWP::UserAgent; my $UPDATE_SERVER = "https://something.com"; my $ua = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0, SSL_ca_file => 'ops-cert-O.crt', }); $ua->timeout(10); #$ua->agent(""); my $req = HTTP::Request->new( GET => $UPDATE_SERVER ); my $res = $ua->request($req); print "header ----" . $res->headers_as_string; print "response ---" . $res->as_string;
      Try my $ua = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0, SSL_ca_file => 'ops-cert-O.crt', } );