Subject: | [PATCH] Openssl-1.0.0 version detection fix |
Hi,
this OpenSSL 1.0.0 issue is related to a version detection routine in
Makefile.pl that is not ready for version numbers starting with 1.
The current code detects "undef" version and based on that we define:
#define CRYPT_SSLEAY_free free
instead of
#define CRYPT_SSLEAY_free OPENSSL_free
Which ends at least on Win32/strawberry perl with some nasty perl.exe
crashes.
Here is a simple patch for Makefile.PL that solves it:
my $version;
my $type;
while (<VERSION_FILE>) {
- if (/^#define\s+$version_match\s+0x0+(\d\d\d)/) {
+ if (/^#define\s+$version_match\s+0x(\d\d\d\d\d)/) {
$version = $1;
- $version =~ s/(\d)0(\d)/$1$2/;
+ $version =~ s/^(\d)0(\d)0(\d)/$1$2$3/;
$type = ($version > 92) ? "OpenSSL" : "SSLeay";
- $version = join('.', split(//, "0$version"));
+ $version = join('.', split(//, $version));
last;
}
}
Please consider this patch as without it Crypt::SSLeay does not work on
Win32 with openssl-1.0.0
--
kmx