develooper Front page | perl.libwww | Postings from September 2001

Help with LWP and Crypt-SSLeay

Woodrow Brown
September 13, 2001 00:32
Help with LWP and Crypt-SSLeay
Message ID:

I just installed the latest verions of both LWP and Crypt-SSLeay and I 
can't get the SSL connections to work. I'm running Perl version 5.6.0 
and RedHat 7.1.

HTTP Posts work fine, when I try HTTPS it seems as if nothing happens 
and then the script times out. I'm sure that the script isn't connecting 
to the remote server because I'm watching the logs on that end.

I've turned on the debugging, but I don't see any out going connections. 
Is there a way to monitor what's going on better?

Here's some code:

#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
use LWP::Debug qw(+debug +trace +conns);

my ($ua, $req, $res, $r);

## Create a user agent object ##
$ua = new LWP::UserAgent;
$ua->agent("AgentName/0.1 " . $ua->agent);

## Create a request, either HTTP || HTTPS ##

## HTTPS ##
$req = new HTTP::Request POST => '';

## Set encoding ##

## Prepair data ##

# debug
print $req->as_string();

# Pass request to the user agent and get a response back
$res = $ua->request($req);

# debug
print $res->as_string();

# Check the outcome of the response
if ($res->is_success)
     print $res->content;
     print "Bad luck this time\n";
     print "Failed b/c: ", $res->status_line, "\n";
# end


Woodrow Brown	|
p 720.838.0919	| f 720.294.0933
web design	| linux hosting systems Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About