cgiguy has asked for the wisdom of the Perl Monks concerning the following question:

Anyone know how to do a GET request to a secure URL? I need to call a secure CGI program from my CGI and parse the results. Thanks Monks!

Replies are listed 'Best First'.
RE: GET request
by symŽ (Acolyte) on Mar 23, 2000 at 21:56 UTC
    Yes ssleay is the way to go. I would do something like this:
    Compile openSSL
    Compile ssleay
    Then insert this code:
    use Net::SSLeay qw(get_https make_form);
    ($return_code, $result, %headers) = get_https('secure.url.com', 443, '/path/to/cgi', '', make_form('name'=>"$value", 'name2'=>"$value2"));

    $return code will be the result of the cgi you called to.

    symŽ

Re: GET request
by btrott (Parson) on Mar 23, 2000 at 02:38 UTC
    I believe LWP::UserAgent can do https requests if you have Net::SSL installed. Net::SSL is part of the Crypt::SSLeay package, which requires either OpenSSL or SSLeay.

    Here's the Crypt::SSLeay README.