Add patch to fix prime testing.

This commit is contained in:
Thomas Moschny 2014-05-10 16:16:59 +02:00
parent 1eed74820e
commit 97b101615b
2 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,14 @@
============================================================
--- src/math/numbertheory/numthry.cpp e810b1dace1f2f07c3fceabddb59844a8807d58f
+++ src/math/numbertheory/numthry.cpp 03df310d0075893ff7b86ca57867fa0f0293c22e
@@ -285,9 +285,9 @@ bool passes_mr_tests(RandomNumberGenerat
u32bit tests = miller_rabin_test_iterations(n.bits(), verify);
- BigInt nonce;
for(u32bit i = 0; i != tests; ++i)
{
+ BigInt nonce;
if(!verify && PRIMES[i] < (n-1))
nonce = PRIMES[i];
else

View File

@ -1,6 +1,6 @@
Name: botan
Version: 1.8.14
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Crypto library written in C++
Group: System Environment/Libraries
@ -12,6 +12,9 @@ Source0: Botan-%{version}.stripped.tbz
Source1: README.fedora
# soname was changed unintentionally upstream, revert it.
Patch0: botan-1.8.14-soname.patch
# patch to fix prime testing, see also
# http://botan.randombit.net/relnotes/1_10_8.html
Patch1: botan-1.8.14-fix_prime_testing.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gcc-c++
@ -51,6 +54,7 @@ developing applications that use %{name}.
%prep
%setup -q -n Botan-%{version}
%patch0 -p0
%patch1 -p0
cp -av %{SOURCE1} .
%build
@ -122,6 +126,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate
%changelog
* Sat May 10 2014 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.14-2
- Add patch to fix prime testing.
* Sat Aug 25 2012 Thomas Moschny <thomas.moschny@gmx.de> - 1.8.14-1
- Update to 1.8.14.