diff --git a/perl-Crypt-DSA.spec b/perl-Crypt-DSA.spec index b94cec1..ebeee82 100644 --- a/perl-Crypt-DSA.spec +++ b/perl-Crypt-DSA.spec @@ -1,11 +1,12 @@ Summary: Perl module for DSA signatures and key generation Name: perl-Crypt-DSA Version: 1.17 -Release: 9%{?dist} +Release: 10%{?dist} License: GPL+ or Artistic Group: Development/Libraries Url: http://search.cpan.org/dist/Crypt-DSA/ Source0: http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Crypt-DSA-%{version}.tar.gz +Patch0: remove-fallback.patch Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) BuildArch: noarch BuildRequires: perl(Carp) @@ -38,6 +39,10 @@ verification, and key generation. %prep %setup -q -n Crypt-DSA-%{version} +# Remove the ability to fall back to the cryptographically-insecure Data::Random +# instead of using /dev/random (#743567, CPAN RT#71421, CVE-2011-3599) +%patch0 -p1 + %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} @@ -45,7 +50,6 @@ make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -exec rm -f {} ';' -find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null %{_fixperms} %{buildroot} %check @@ -64,6 +68,11 @@ make test AUTOMATED_TESTING=1 TEST_FILES="xt/*.t" %{_mandir}/man3/Crypt::DSA::Util.3pm* %changelog +* Tue Sep 3 2013 Paul Howarth - 1.17-10 +- Remove the ability to fall back to the cryptographically-insecure Data::Random + instead of using /dev/random (#743567, CPAN RT#71421, CVE-2011-3599) +- Don't need to remove empty directories from the buildroot + * Sat Aug 03 2013 Fedora Release Engineering - 1.17-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild diff --git a/remove-fallback.patch b/remove-fallback.patch new file mode 100644 index 0000000..f39bb3c --- /dev/null +++ b/remove-fallback.patch @@ -0,0 +1,19 @@ +Description: Remove the ability to fall back to Data::Random +Forwarded: yes +Bug: https://rt.cpan.org/Public/Bug/Display.html?id=71421 +Author: Harlan Lieberman-Berg +--- a/lib/Crypt/DSA/Util.pm ++++ b/lib/Crypt/DSA/Util.pm +@@ -64,11 +64,8 @@ + } + close $fh; + } +- elsif ( require Data::Random ) { +- $r .= Data::Random::rand_chars( set=>'numeric' ) for 1..$bytes; +- } + else { +- croak "makerandom requires /dev/random or Data::Random"; ++ croak "makerandom requires /dev/random"; + } + my $down = $size - 1; + $r = unpack 'H*', pack 'B*', '0' x ( $size % 8 ? 8 - $size % 8 : 0 ) .