This queue is for tickets about the Crypt-OpenSSL-DSA CPAN distribution.

Report information
The Basics
Id:
14350
Status:
resolved
Priority:
Low/Low

People
Owner:
TJMATHER [...] cpan.org
Requestors:
sisyphus1 [...] optusnet.com.au
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
0.12
Fixed in:
(no value)

Attachments
90-openssl-compat.patch



Subject: Fix for Win32
Hi, Attached is a patch to t/90-openssl-compat.t that will enable Crypt::OpenSSL::DSA-0.12 to test successfully on my Win32 perl. My perl (5.8.7) was built using the MinGW compiler (native Win32 port of gcc). Openssl was also built with the same compiler. I believe the same patch will work equally well for a perl and openssl that have been built on Win32 using MS Visual Studio compiler (but this belief is untested). The module still doesn't build straight out of the box, however. It was necessary to provide appropriate 'LIBS' and 'INC' arguments to 'perl Makefile.PL'. Imho it would be sufficient to provide instructions about that aspect in the 'README' - though that (obviously) doesn't enable the module to be built by the automated CPAN.pm procedure. The problem with 90-openssl-compat.t, as it was written, is that the "which" command is not implemented on Win32, it's unlikely that the openssl executable will be in "/usr/bin" (or even "/usr/local/bin"), and for the '-x' test to pass we need to provide it with the full path to the openssl executable. The patch avoids all of those pitfalls. Cheers, Rob
--- 90-opensssl-compat.t_fixed 2005-08-29 14:36:50.000000000 +1000 +++ 90-openssl-compat.t 2005-05-23 11:36:14.000000000 +1000 @@ -12,17 +12,9 @@ BEGIN { plan tests => 84 } my $HAS_SHA1 = eval "use Digest::SHA1; 1;"; -my ($OPEN_SSL, $testable); -if($^O !~ /mswin32/i) { - $OPEN_SSL = `which openssl` || "/usr/bin/openssl"; - chomp $OPEN_SSL; - $testable = -x $OPEN_SSL && $HAS_SHA1; - } -else { - $OPEN_SSL = "openssl"; - eval{`openssl version`}; - if(!$@) {$testable = 1 && $HAS_SHA1} - } +my $OPEN_SSL = `which openssl` || "/usr/bin/openssl"; +chomp $OPEN_SSL; +my $testable = -x $OPEN_SSL && $HAS_SHA1; my $why_skip = $HAS_SHA1 ? "Need openssl binary in path" : "Need Digest::SHA1 to test"; my $dsa = Crypt::OpenSSL::DSA->generate_parameters( 512, "foo" );
From: sisyphus1@optusnet.com.au
[guest - Mon Aug 29 01:22:53 2005]:
Show quoted text
> Hi, > Attached is a patch to t/90-openssl-compat.t that will enable > Crypt::OpenSSL::DSA-0.12 to test successfully on my Win32 perl.
Doh!!! The patch I supplied is back-to-front. That is, it's the patch you'd apply if you wanted to return the patched version of the file back to the original :-) Feel free to contact me if a "corrected" patch is required. Cheers, Rob
Patch applied and version 0.13 uploaded to CPAN


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.