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

I have been developing a tool for testing my company's web application using HTML::TreeBuilder, URI::URL, HTTP::UserAgent, HTTP::Request, HTTP::Response, HTTP::Request::Common, HTTP::Request::Form, HTTP::Cookies, HTTP::Headers, and HTML::Form. Now I have to adapt this tool to work with https. I've been getting conflicting information about how to do this. Is there a transparent way? I'd like to make as few code changes as possible. Or am I going to have to rewrite all of my modules to use completely different functions? Ryan

Replies are listed 'Best First'.
Re: SSL challenge
by cheshirecat (Sexton) on Dec 18, 2001 at 20:54 UTC
    I believe what you are looking for is the Crypt::SSLeay
    by installing it, you automagically get HTTPS for all of the LWP :)
    Cheshire Cat
      So if I can install Crypt::SSLeay, what would I need to do to make my current scripts use it?
        Just use proper URIs in your scripts. That is instead of 'http://something' use 'https://something'. That's all.

        --
        Ilya Martynov (http://martynov.org/)

        just change
        $req = HTTP::Request->new(GET=>'http://www.apple.com');
        to
        $req = HTTP::Request->new(GET=>'https://www.apple.com');


        Cheshire Cat