Recipe 20.16 Fetching https:// Web Pages

20.16.1 Problem

You want to work with a web server over a secure (SSL) connection. For example, you want to automate ordering supplies for your company from an online store, and the online store wisely protects its transactions with SSL.

20.16.2 Solution

Install Crypt::SSLeay and https: URLs automatically work with LWP. You do not need to reinstall LWP.

20.16.3 Discussion

When LWP sends a request to an https server, it checks whether there is a module installed to do SSL. The two modules that LWP can use are, in order of preference, Crypt::SSLeay and IO::Socket::SSL. Of the two, Crypt::SSLeay is the more fully featured, but requires the OpenSSL libraries from http://www.openssl.org.

20.16.4 See Also

The documentation for the CPAN module Crypt::SSLeay; the README.SSL file in the libwww-perl distribution