Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: LWP UserAgent - Sending Client Certificate connect to remote host

by kabachaa (Novice)
on May 14, 2013 at 14:32 UTC ( #1033485=note: print w/ replies, xml ) Need Help??


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

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;


Comment on Re^3: LWP UserAgent - Sending Client Certificate connect to remote host
Download Code
Replies are listed 'Best First'.
Re^4: LWP UserAgent - Sending Client Certificate connect to remote host
by vsespb (Hermit) on May 14, 2013 at 15:20 UTC
    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;
Re^4: LWP UserAgent - Sending Client Certificate connect to remote host
by Anonymous Monk on Jun 09, 2015 at 21:46 UTC
    Try my $ua = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0, SSL_ca_file => 'ops-cert-O.crt', } );

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1033485]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2015-07-08 04:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls