The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Building on Win 32 platforms
============================
31.7.1999, Sampo Kellomaki <sampo@iki..fi>
7.6.2002, reviewed and added comments, --Sampo
16.8.2002, added comments by Marcel Bucher --Sampo
10.7.2007. Complete rewrite to agree with latest version 1.31. References to
ancient versions and untested procedures removed --mikem
22.4.2010 Updated info for 64 bit versions --mikem

Notes: 

1. With some combinations of Windows, perl, compiler and compiler options, you
may see a runtime error "no OPENSSL_Applink", when calling
Net::SSLeay::P_PKCS12_load_file. This appears to be due to incompatible
compile options between the openssl libraries and Net::SSLeay. In particular
it has been observed with Shining Light OpenSSL See
https://www.openssl.org/support/faq.html for more details. Alas, the
apparently simple and receommended solution of adding applink.c to the SSLeay
library does not work, since applink.c need to be in the .exe file, not the
.dll for this to work. Best workaround is to build and install OpenSSL for
windows yourself.

$Id: README.Win32 434 2015-01-24 00:24:24Z mikem-guest $

1. Windows Server 2003
   ActivePerl 5.8.8.820
   VC++ 6.0
   Microsoft Platform SDK SVR2003R2
   Shining Light Win32 OpenSSL 0.9.7L
      http://www.shininglightpro.com/products/Win32OpenSSL.html
   Dynamic linking to SSL DLLs

Install all packages in the order listed above
Unpack and install the Net-SSLeay package
 cd Net-SSLeay-xxxx
 perl Makefile.PL
 nmake
 nmake test
 nmake install

Caution. There is an issue with Shining Light Win32 OpenSSL 0.9.7m and 0.9.8e
on Server 2003: These versions were built with VC 7.1 and the packages are
missing the 7.1 runtime DLL. This means that the openssl binaries from those
versions will not run on a standard Server 2003 platform, and this prevents
Net-SSLeay being built. Shining Light say this problem will be fixed in later
versions, where they will revert to the earlier build procedures.

2. Windows Server 2003
   ActivePerl 5.8.8.820
   VC++ 6.0
   Microsoft Platform SDK SVR2003R2
   OpenSSL 0.9.8e source openssl-0.9.8e.tar.gz
   Dynamic linking to SSL DLLs

Install all packages in the order listed above
Unpack and build OpenSSL:
  cd openssl-0.9.8e
  perl Configure VC-WIN32 --prefix=c:/OpenSSL
  ms\do_ms
  nmake -f ms\ntdll.mak
  nmake -f ms\ntdll.mak install
(if you have trouble getting to this stage, consult INSTALL.W32)
  copy c:\OpenSSL\bin\*.dll c:\windows\system32

Unpack and install the Net-SSLeay package
 cd Net-SSLeay-xxxx
 perl Makefile.PL
 nmake
 copy c:\OpenSSL\bin\*.dll blib\arch\auto\Net\SSLeay\
 nmake test
 nmake install

3. Windows XP SP2 CAUTION: this is not working yet
   ActivePerl 5.8.8.820
   Visual Studio Express 2005
   Microsoft Platform SDK SVR2003R2
   OpenSSL 0.9.8e source openssl-0.9.8e.tar.gz
   Dynamic linking to SSL DLLs

- Install all packages in the order listed above (make sure you follow the
   instructions on the download page about adding the appropriate paths to the
   Projects and Solutions section of the Options dialog box, and updating
   corewin_express.vsprops file)
- Start a build shell with Start->All Programs->Microsoft Windows SDK->CMD Shell
- cd openssl-0.9.8e
- perl Configure VC-WIN32 --prefix=c:/OpenSSL
- ms\do_masm
- nmake -f ms\ntdll.mak
- nmake -f ms\ntdll.mak install
   (if you have trouble getting to this stage, consult INSTALL.W32)
- cd Net-SSLeay-xxxx
- perl Makefile.PL
- nmake
- copy c:\OpenSSL\bin\*.dll blib\arch\auto\Net\SSLeay\
- nmake test
  CAUTION: nmake test fails at this stage. Any suggestions?? This may be
   relevant: http://www.itwriting.com/blog/?postid=261&replyto=2542
- nmake install

4. Windows XP SP2
   Strawberry Perl 5.8.8-alpha-2
   OpenSSL 0.9.8e source openssl-0.9.8e.tar.gz

- Install Strawberry Perl by running the installer
  (strawberry-perl-5.8.8-alpha-2.exe in this example)
- Unpack openssl-0.9.8e.tar.gz
- cd openssl-0.9.8e
- ms\mingw32
- cd out
- ..\ms\test
   (if you have trouble getting to this stage, consult INSTALL.W32)
- md c:\openssl 
- md c:\openssl\bin
- md c:\openssl\lib
- md c:\openssl\include
- md c:\openssl\include\openssl
- copy /b inc32\openssl\*       c:\openssl\include\openssl
- copy /b out\libssl32.a c:\openssl\lib
- copy /b out\libeay32.a c:\openssl\lib
- copy /b libssl32.dll c:\openssl\bin
- copy /b libeay32.dll c:\openssl\bin
- copy /b out\openssl.exe  c:\openssl\bin
- cd Net-SSLeay-xxxx
- c:\strawberry-perl\perl\bin\perl Makefile.PL
- dmake
- copy c:\openssl\bin\*.dll blib/arch/auto/Net/SSLeay
- dmake install

4. Windows XP SP2
   Perl CamelPack perl-camelpack-5.8.7.exe
   Shining Light Win32 OpenSSL 0.9.7L
      http://www.shininglightpro.com/products/Win32OpenSSL.html

Install all packages in the order listed above
Unpack and install the Net-SSLeay package
 cd Net-SSLeay-xxxx
 perl Makefile.PL (accept external tests and extra CPAN installs)
 nmake
 nmake install

(Note that 'nmake test' does not seem to work with CamelPack 5.8.7)

5. Windows Server 2003
   ActivePerl 5.8.8.820
   VC++ 6.0
   Microsoft Platform SDK SVR2003R2
   OpenSSL 0.9.8e source openssl-0.9.8e.tar.gz + tls extensions patch 
    from Radiator/goodies/openssl-0.9.8e-session-ticket-osc.patch   
   Dynamic linking to SSL DLLs

Install all packages in the order listed above
Unpack, patch and  and build OpenSSL, patch with 
  cd openssl-0.9.8e+extensions
  patch -p1 < Radiator/goodies/openssl-0.9.8e-session-ticket-osc.patch                 
  perl Configure VC-WIN32 --prefix=c:/OpenSSL enable-tlsext
  ms\do_ms
  nmake -f ms\ntdll.mak
  nmake -f ms\ntdll.mak install
(if you have trouble getting to this stage, consult INSTALL.W32)
  copy c:\OpenSSL\bin\*.dll c:\windows\system32

Unpack and install the Net-SSLeay package
 cd Net-SSLeay-xxxx
 perl Makefile.PL
 nmake
 copy c:\OpenSSL\bin\*.dll blib\arch\auto\Net\SSLeay\
 nmake test
 nmake install

6. Windows Server 2003
   ActivePerl 5.10.1
   Microsoft Platform SDK 2003 SP1
   OpenSSL 0.9.8i source including TLS extensions
   Dynamic linking to SSL DLLs

Build OpenSSL
   S:
   cd \openssl-0.9.8i+extensions
   nmake -f ms\ntdll.mak clean
   perl Configure VC-WIN64A --prefix=c:/OpenSSL enable-tlsext
   ms\do_win64a
   nmake -f ms\ntdll.mak
   cd out32dll
   ..\ms\test
   nmake -f ms\ntdll.mak install
Now build Net-SSLeay
   nmake clean
   R:
   cd \net-ssleay\trunk
   perl Makefile.PL
   nmake
   copy c:\OpenSSL\bin\*.dll blib\arch\auto\Net\SSLeay
   nmake test
   nmake install

7. Windows XP Professional SP3
  ActivePerl 5.16.1
  OpenSSL 1.0.1j binary from http://slproweb.com/download/Win32OpenSSL-1_0_1j.exe
  Visual C++ 2008 Redistributables from http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF
  Microsoft Visual Studio 2010 Express
   with Visual Studio Command Prompt shell:
   R:
   cd \net-ssleay\trunk
   perl Makefile.PL
   nmake
   nmake test (some warnings will be reported)

8. Windows XP Professional SP3 on VMWare
  ActivePerl 5.16.1
  OpenSSL 1.0.1 source code
  Microsoft Visual Studio 2010 Express
   with Visual Studio Command Prompt shell:
Build OpenSSL
   S:
   cd \openssl-1.0.1e
   perl Configure VC-WIN32 no-asm --prefix=c:/OpenSSL 
   ms\do_ms
   nmake -f ms\ntdll.mak
   nmake -f ms\ntdll.mak install
Now build Net-SSLeay
   R:
   cd \net-ssleay\trunk
   nmake clean
   perl Makefile.PL
   nmake
   nmake test (some warnings will be reported)