[botan/el6] Add patch to fix prime testing.
Thomas Moschny
thm at fedoraproject.org
Sat May 10 14:32:13 UTC 2014
commit b512a893c498ab2ae9d0a6a86f1a3f165125eeef
Author: Thomas Moschny <thm at fedoraproject.org>
Date: Sat May 10 16:16:59 2014 +0200
Add patch to fix prime testing.
botan-1.8.14-fix_prime_testing.patch | 14 ++++++++++++++
botan.spec | 9 ++++++++-
2 files changed, 22 insertions(+), 1 deletions(-)
---
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 <thomas.moschny at gmx.de> - 1.8.14-2
+- Add patch to fix prime testing.
+
* Sat Aug 25 2012 Thomas Moschny <thomas.moschny at gmx.de> - 1.8.14-1
- Update to 1.8.14.
More information about the scm-commits
mailing list