From 97b101615bf0794efe58903a9258e86fa83ee654 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 10 May 2014 16:16:59 +0200 Subject: [PATCH] Add patch to fix prime testing. --- botan-1.8.14-fix_prime_testing.patch | 14 ++++++++++++++ botan.spec | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 botan-1.8.14-fix_prime_testing.patch diff --git a/botan-1.8.14-fix_prime_testing.patch b/botan-1.8.14-fix_prime_testing.patch new file mode 100644 index 0000000..5698c6a --- /dev/null +++ b/botan-1.8.14-fix_prime_testing.patch @@ -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 diff --git a/botan.spec b/botan.spec index cb1aebf..5a051b4 100644 --- a/botan.spec +++ b/botan.spec @@ -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 - 1.8.14-2 +- Add patch to fix prime testing. + * Sat Aug 25 2012 Thomas Moschny - 1.8.14-1 - Update to 1.8.14.