I am writing this message after having successfully configured Crypt::SSLeay
0.35 on a Windows 2000 platform, using ActiveState Perl v5.6.0 and OpenSSL
0.9.6b

This message is meant to help other people facing similar problems, and also
in the hope of getting some feedback on the shortcuts I had to take.

Although the Crypt::SSLeay docs advise to use the binary package distributed
by ActiveState, this package in rather old (0.17), and does not support
client certificates. I was therefore left with the only option of compiling
the package from source. In doing so, there were two problems I had to
solve, which are reproduced below:

Problem 1: Crypt::SSLeay fails to compile due to lack of win32 libraries
------------------------------------------------------------------------

My "perl Makefile.PL" gave the following output:
C:\users\fmc\securePay\build\Crypt-SSLeay-0.35>perl Makefile.PL
No OpenSSL installation found, usually in /usr/local/openssl
Which OpenSSL build path do you want to link against?  /openssl

================================================
BUILD INFORMATION
================================================

ssl dir:        c:\openssl
libraries:      -lssleay32 -llibeay32 -lRSAglue -lrsaref
include dir:    c:\openssl\include -Ic:\openssl\inc32
ssl header:     openssl/ssl.h
ssl candidate:  /openssl; /openssl/include/openssl; OpenSSL 0.9.6

================================================

Note (probably harmless): No library found for '-lrsaref'
Note (probably harmless): No library found for 'oldnames.lib'
Note (probably harmless): No library found for 'kernel32.lib'
Note (probably harmless): No library found for 'user32.lib'
Note (probably harmless): No library found for 'gdi32.lib'
Note (probably harmless): No library found for 'winspool.lib'
Note (probably harmless): No library found for 'comdlg32.lib'
Note (probably harmless): No library found for 'advapi32.lib'
Note (probably harmless): No library found for 'shell32.lib'
Note (probably harmless): No library found for 'ole32.lib'
Note (probably harmless): No library found for 'oleaut32.lib'
Note (probably harmless): No library found for 'netapi32.lib'
Note (probably harmless): No library found for 'uuid.lib'
Note (probably harmless): No library found for 'wsock32.lib'
Note (probably harmless): No library found for 'mpr.lib'
Note (probably harmless): No library found for 'winmm.lib'
Note (probably harmless): No library found for 'version.lib'
Note (probably harmless): No library found for 'odbc32.lib'
Note (probably harmless): No library found for 'odbccp32.lib'
Note (probably harmless): No library found for 'msvcrt.lib'
Writing Makefile for Crypt::SSLeay


After unsuccessfully trying to find out why ExtUtils::Liblist was not
locating the necessary windows libraries, I had to resort to a shortcut:

I copied the contents of the "libs" variable in my c:\perl\lib\config.pm to
the generated Makefile:

LDLOADLIBS = c:\openssl\lib\ssleay32.lib c:\openssl\lib\libeay32.lib
c:\openssl\lib\RSAglue.lib oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib
odbccp32.lib msvcrt.lib


After this ugly hack, "nmake" and "nmake test" ran with no significant
errors.


Problem 2: Perl crashing when invoking Crypt::SSLeay
----------------------------------------------------

After compiling and installing Crypt::SSLeay, I tried the following test:

C:\users\fmc\securePay\SSL>lwp-request -m GET -x https://127.0.0.1

After successfully loading the secure page, perl56.dll crashed with an
access violation.

Searching on the Internet for an answer, I found a message by Christopher
Hogan on October 2000 reporting a similar problem with Crypt::SSLeay 0.17:
http://www.mail-archive.com/openssl-dev@openssl.org/msg06736.html

Following Christopher's suggestion, I commented out the following lines from
SSLeay.xs:

[...]
           RETVAL = newSVpv(str, 0);
//         free(str);                 <--
        OUTPUT:
           RETVAL
[...]
           RETVAL = newSVpv(str, 0);
//         free(str);                 <--
        OUTPUT:
           RETVAL

This solved the problem, allowing Crypt::SSLeay to work on Windows 2000. I
am however not sure of any implications this may have on system stability or
possible memory leaks.

--
Filipe Custódio
Technical Architect
e-Trust Unit
Novabase

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to