Skip Menu |

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

Report information
The Basics
Id: 95373
Status: resolved
Priority: 0/
Queue: Crypt-SMIME

People
Owner: Nobody in particular
Requestors: kmx [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.13



Subject: Improving compatibility with MS Windows
Please consider applying enclosed patch.

--
kmx
Subject: Crypt-SMIME-0.12.patch
diff -ru Crypt-SMIME-0.12_orig/SMIME.xs Crypt-SMIME-0.12_patched/SMIME.xs --- Crypt-SMIME-0.12_orig/SMIME.xs 2014-04-30 10:47:39.000000000 +0200 +++ Crypt-SMIME-0.12_patched/SMIME.xs 2014-05-05 18:01:48.139102800 +0200 @@ -355,7 +355,11 @@ RAND_poll(); while (RAND_status() == 0) { +#ifdef WIN32 + long seed = rand(); +#else long seed = random(); +#endif RAND_seed(&seed, sizeof(long)); } } diff -ru Crypt-SMIME-0.12_orig/t/01-smime.t Crypt-SMIME-0.12_patched/t/01-smime.t --- Crypt-SMIME-0.12_orig/t/01-smime.t 2014-04-30 07:33:50.000000000 +0200 +++ Crypt-SMIME-0.12_patched/t/01-smime.t 2014-05-05 18:08:16.439646500 +0200 @@ -6,10 +6,11 @@ use File::Temp qw(tempfile); use Test::More tests => 24; use Test::Exception; +use Config; my (%key, %csr, %crt); do { - my $OPENSSL = ExtUtils::PkgConfig->variable('openssl', 'prefix') . '/bin/openssl'; + my $OPENSSL = ExtUtils::PkgConfig->variable('openssl', 'prefix') . '/bin/openssl' . $Config{exe_ext}; if (-x $OPENSSL) { diag "Using `$OPENSSL' to generate a keypair"; } diff -ru Crypt-SMIME-0.12_orig/t/02-smime.more.t Crypt-SMIME-0.12_patched/t/02-smime.more.t --- Crypt-SMIME-0.12_orig/t/02-smime.more.t 2014-04-30 07:35:52.000000000 +0200 +++ Crypt-SMIME-0.12_patched/t/02-smime.more.t 2014-05-05 18:07:53.059613700 +0200 @@ -5,10 +5,11 @@ use File::Spec; use File::Temp qw(tempfile); use Test::More tests => 13; +use Config; my ($key, $crt); do { - my $OPENSSL = ExtUtils::PkgConfig->variable('openssl', 'prefix') . '/bin/openssl'; + my $OPENSSL = ExtUtils::PkgConfig->variable('openssl', 'prefix') . '/bin/openssl' . $Config{exe_ext}; if (-x $OPENSSL) { diag "Using `$OPENSSL' to generate a keypair"; } diff -ru Crypt-SMIME-0.12_orig/t/03-chained-certs.t Crypt-SMIME-0.12_patched/t/03-chained-certs.t --- Crypt-SMIME-0.12_orig/t/03-chained-certs.t 2014-04-30 10:22:28.000000000 +0200 +++ Crypt-SMIME-0.12_patched/t/03-chained-certs.t 2014-05-05 18:08:26.679660800 +0200 @@ -6,6 +6,7 @@ use File::Temp qw(tempfile); use Test::More tests => 8; use Test::Exception; +use Config; # Create the following certificate tree: # @@ -29,7 +30,7 @@ do { my $DEVNULL = File::Spec->devnull(); - my $OPENSSL = ExtUtils::PkgConfig->variable('openssl', 'prefix') . '/bin/openssl'; + my $OPENSSL = ExtUtils::PkgConfig->variable('openssl', 'prefix') . '/bin/openssl' . $Config{exe_ext}; if (-x $OPENSSL) { diag "Using `$OPENSSL' to generate keypairs"; }
Applied with a slight modification. Thank you very much for your patch.