Installing Crypt::SSLeay 0.72 on Windows

This section provides a tutorial example on how to install Crypt::SSLeay 0.72 for ActiveState Perl on Windows systems.

If you want to write your own Perl program to communicate with an HTTPS Web server, you should install a Perl module to help you. Currently, the best Perl module for HTTPS communication is Crypt::SSLeay, originally developed by Gisle Aas.

Crypt::SSLeay works with the LWP::UserAgent module to allow you to perform GET, HEAD and POST requests with the HTTPS server.

Here what I did to install Crypt::SSLeay:

1. Make sure I have ActiveState Perl installed on my Windows system:

herong> perl -version

This is perl 5, version 26, subversion 1 (v5.26.1) built
   for MSWin32-x64-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2017, Larry Wall

Binary build 2601 [404865] provided by ActiveState
http://www.ActiveState.com
Built Dec 11 2017 12:23:25

2. Run Perl Package Manager "ppm" to download and install Crypt::SSLeay as shown in the picture below:

herong> ppm install crypt-ssleay

ppm install failed: Can't find any package that provides crypt-ssleay

Looks like Crypt::SSLeay is no longer available in the Perl package repository. It was there before.

So I have to install SOAP::Lite using the CPAN shell:

herong> perl -MCPAN -e shell

It looks like you don't have a C compiler and make utility installed.
Trying to install dmake and the MinGW gcc compiler using the Perl Package
Manager.
This may take a a few minutes...

Downloading MinGW-4.6.3...done
Downloading dmake-4.11.20080107...done
Unpacking MinGW-4.6.3...done
Unpacking dmake-4.11.20080107...done
Generating HTML for MinGW-4.6.3...done
Generating HTML for dmake-4.11.20080107...done
Updating files in site area...done
3697 files installed

Please use the 'dmake' program to run commands from a Makefile!

cpan shell -- CPAN exploration and modules installation (v2.18)
Enter 'h' for help.

cpan> install SOAP::Lite

Configuring N/NA/NANIS/Crypt-SSLeay-0.72.tar.gz with Makefile.PL

 *** THIS IS NOT AN ERROR, JUST A MESSAGE FOR YOUR INFORMATION ***

 Do you really need Crypt::SSLeay?

 Starting with version 6.02 of LWP, https support was unbundled into
 LWP::Protocol::https. This module specifies as one of its prerequisites
 IO::Socket::SSL which is automatically used by LWP::UserAgent unless
 this preference is overridden separately. IO::Socket::SSL is a more
 complete implementation, and, crucially, it allows hostname
 verification. Crypt::SSLeay does not support this. At this point,
 Crypt::SSLeay is maintained to support existing software that already
 depends on it.

 However, it is possible that your software does not really depend on
 Crypt::SSLeay, only on the ability of LWP::UserAgent class to
 communicate with sites over SSL/TLS.

 If are using version LWP 6.02 or later, and therefore have installed
 LWP::Protocol::https and its dependencies, and do not explicitly use
 Net::SSL before loading LWP::UserAgent, or override the default socket
 class, you are probably using IO::Socket::SSL and do not really need
 Crypt::SSLeay.

 Before installing Crypt::SSLeay, you may want to try specifying a
 dependency on LWP::Protocol::https.

openssl-version.c:2:30: fatal error: openssl/opensslv.h:
   No such file or directory
compilation terminated.
Failed to build and link a simple executable using OpenSSL
No 'Makefile' created  NANIS/Crypt-SSLeay-0.72.tar.gz
  C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NOT OK
Failed during this command:
 NANIS/Crypt-SSLeay-0.72.tar.gz: writemakefile NO -- No 'Makefile' created

cpan> exit

Too bad. The installation failed. But the Crypt::SSLeay 0.72 package displays a message saying It's not needed any more if I use version 6.02 of LWP.

Table of Contents

 About This Book

 Introduction of PKI (Public Key Infrastructure)

 Introduction of HTTPS (Hypertext Transfer Protocol Secure)

 Using HTTPS with Google Chrome

 Using HTTPS with Mozilla Firefox

 HTTPS with Microsoft Edge

 Using HTTPS with Apple Safari

 HTTPS with IE (Internet Explorer)

 Android and Server Certificate

 iPhone and Server Certificate

 Windows Certificate Stores and Console

 RDP (Remote Desktop Protocol) and Server Certificate

 macOS Certificate Stores and Keychain Access

Perl Scripts Communicating with HTTPS Servers

Installing Crypt::SSLeay 0.72 on Windows

 LWP Library Supports HTTPS

 LWP SSL verify_hostname Setting

 LWP SSL List of Root CA Certificates

 Crypt::SSLeay Test Perl Script

 HTTPS Request and Response Example

 Asking Crypt::SSLeay to Verify Server's Certificate

 Crypt::SSLeay Failing to Verify Server's Certificate

 Multiple CA Certificates in a Single File

 PHP Scripts Communicating with HTTPS Servers

 Java Programs Communicating with HTTPS Servers

 .NET Programs Communicating with HTTPS Servers

 CAcert.org - Root CA Offering Free Certificates

 PKI CA Administration - Issuing Certificates

 Comodo Free Personal Certificate

 Digital Signature - Microsoft Word

 Digital Signature - OpenOffice.org 3

 S/MIME and Email Security

 PKI (Public Key Infrastructure) Terminology

 Archived Tutorials

 References

 Full Version in PDF/EPUB