From a180054edb5c62194bdd0891457a9837a81f2018 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Fri, 26 Jul 2013 04:32:34 +0200 Subject: [PATCH 01/18] Update to 1.10.5. - Modernize spec file. - New -doc subpackage containing HTML documentation. - Package Python binding. --- .gitignore | 1 + README.fedora | 21 ++++----- botan-1.8.14-soname.patch | 19 -------- botan.spec | 97 +++++++++++++++++++++++++++++---------- repack.sh | 21 +++++---- sources | 2 +- 6 files changed, 97 insertions(+), 64 deletions(-) delete mode 100644 botan-1.8.14-soname.patch diff --git a/.gitignore b/.gitignore index c755cb4..38d1d01 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /Botan-1.8.12.stripped.tbz /Botan-1.8.13.stripped.tbz /Botan-1.8.14.stripped.tbz +/Botan-1.10.5.stripped.tbz diff --git a/README.fedora b/README.fedora index f3b8795..1a10d12 100644 --- a/README.fedora +++ b/README.fedora @@ -1,14 +1,13 @@ For legal reasons, the following modules have been completely removed from the Botan package in Fedora: - * Block Ciphers - * IDEA [src/block/idea] - * RC6 [src/block/rc6] - * RC5 [src/block/rc5] - * Public Key Base - * ECC Public Key [src/pubkey/ecc_key] - * ECC Domain Parameters [src/pubkey/ec_dompar] - * ECDSA [src/pubkey/ecdsa] - * ECKAEG [src/pubkey/eckaeg] - * Math - * GF(p) Math [src/math/gfpmath] +* IDEA Block Cipher [src/block/idea, src/block/idea_sse2] +* RC5 Block Cipher [src/block/rc5] +* RC6 Block Cipher [src/block/rc6] +* GF(p) Math [src/math/ec_gfp] +* ECC Domain Parameters [src/pubkey/ec_group] +* ECC Public Key [src/pubkey/ecc_key] +* ECDH [src/pubkey/ecdh] +* ECDSA [src/pubkey/ecdsa] +* GOST 34.10 [src/pubkey/gost_3410] +* SRP-6 [src/constructs/srp6] diff --git a/botan-1.8.14-soname.patch b/botan-1.8.14-soname.patch deleted file mode 100644 index 6976728..0000000 --- a/botan-1.8.14-soname.patch +++ /dev/null @@ -1,19 +0,0 @@ -# -# old_revision [adcf24b7e258c125f78aaff4ef2d3557f1183c3e] -# -# patch "configure.py" -# from [b43917e0e74e7ef1ff0024542da0dabe104a1582] -# to [ba82e657a585f31e9ba20056a57c5f597c0f0297] -# -============================================================ ---- configure.py b43917e0e74e7ef1ff0024542da0dabe104a1582 -+++ configure.py ba82e657a585f31e9ba20056a57c5f597c0f0297 -@@ -38,7 +38,7 @@ class BuildConfigurationInformation(obje - version_major = 1 - version_minor = 8 - version_patch = 14 -- version_so_patch = 13 -+ version_so_patch = 2 - version_suffix = '' - - version_string = '%d.%d.%d%s' % ( diff --git a/botan.spec b/botan.spec index 152464a..babc333 100644 --- a/botan.spec +++ b/botan.spec @@ -1,6 +1,8 @@ +%global major_version 1.10 + Name: botan -Version: 1.8.14 -Release: 2%{?dist} +Version: %{major_version}.5 +Release: 1%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -10,18 +12,20 @@ URL: http://botan.randombit.net/ # here: http://files.randombit.net/botan/Botan-%%{version}.tbz Source0: Botan-%{version}.stripped.tbz Source1: README.fedora -# soname was changed unintentionally upstream, revert it. -Patch0: botan-1.8.14-soname.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc-c++ BuildRequires: python +BuildRequires: python-sphinx +BuildRequires: python-devel +BuildRequires: boost-python-devel BuildRequires: bzip2-devel BuildRequires: zlib-devel BuildRequires: gmp-devel BuildRequires: openssl-devel +# do not check .so files in the python_sitelib directory +%global __provides_exclude_from ^(%{python_sitearch}/.*\\.so)$ %description Botan is a BSD-licensed crypto library written in C++. It provides a @@ -35,24 +39,47 @@ flavor of the library. %package devel Summary: Development files for %{name} Group: Development/Libraries -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: pkgconfig Requires: bzip2-devel Requires: zlib-devel Requires: gmp-devel Requires: openssl-devel - %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. +%package doc +Summary: Documentation for %{name} +Group: Documentation +BuildArch: noarch + +%description doc +%{summary} + +This package contains HTML documentation for %{name}. + + +%package -n python-%{name} +Summary: Python bindings for %{name} +Group: System Environment/Libraries + +%description -n python-%{name} +%{summary} + +This package contains the Python binding for %{name}. + +Note: The Python binding should be considered alpha software, and the +interfaces may change in the future. + + %prep %setup -q -n Botan-%{version} -%patch0 -p0 cp -av %{SOURCE1} . + %build # we have the necessary prerequisites, so enable optional modules %define enable_modules gnump,bzip2,zlib,openssl @@ -67,23 +94,31 @@ cp -av %{SOURCE1} . --os=linux \ --cpu=%{_arch} \ --enable-modules=%{enable_modules} \ - --disable-modules=%{disable_modules} + --disable-modules=%{disable_modules} \ + --with-boost-python \ + --with-python-version=%{python_version} # (ab)using CXX as an easy way to inject our CXXFLAGS make CXX="g++ ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags} +make -f Makefile.python \ + CXX="g++ ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags} %install -rm -rf %{buildroot} make install \ DESTDIR=%{buildroot}%{_prefix} \ DOCDIR=_doc \ INSTALL_CMD_EXEC="install -p -m 755" \ - INSTALL_CMD_DATA="install -p -m 644" \ + INSTALL_CMD_DATA="install -p -m 644" +make -f Makefile.python install \ + PYTHON_SITE_PACKAGE_DIR=%{buildroot}%{python_sitearch} -%clean -rm -rf %{buildroot} +# fixups +find doc/examples -type f -exec chmod -x {} \; +mv doc/examples/python doc/python-examples +rm _doc/manual/.buildinfo +rm -r _doc/manual/.doctrees %post -p /sbin/ldconfig @@ -93,22 +128,30 @@ rm -rf %{buildroot} %files -%defattr(-,root,root,-) -%{_libdir}/libbotan*-*.so -%doc _doc/readme.txt _doc/log.txt _doc/thanks.txt _doc/credits.txt -%doc _doc/license.txt _doc/fips140.tex _doc/pgpkeys.asc +%doc _doc/readme.txt +%doc doc/license.txt %doc README.fedora +%{_libdir}/libbotan-%{major_version}.so.* %files devel -%defattr(-,root,root,-) %doc doc/examples -%doc _doc/api* _doc/tutorial* -%{_bindir}/botan-config +%{_bindir}/botan-config-%{major_version} %{_includedir}/* -%exclude %{_libdir}/libbotan.a -%{_libdir}/libbotan.so -%{_libdir}/pkgconfig/botan-1.8.pc +%exclude %{_libdir}/libbotan-%{major_version}.a +%{_libdir}/libbotan-%{major_version}.so +%{_libdir}/pkgconfig/botan-%{major_version}.pc + + +%files doc +%doc _doc/manual +%doc _doc/readme.txt +%doc doc/license.txt + + +%files -n python-%{name} +%doc doc/python-examples +%{python_sitearch}/%{name} %check @@ -116,12 +159,18 @@ make CXX="g++ ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags} check # these checks would fail mv checks/validate.dat{,.orig} -awk '/\[.*\]/{f=0} /\[(RC5.*|RC6|IDEA)\]/{f=1} (f && !/^#/){sub(/^/,"#")} {print}' \ +awk '/\[.*\]/{f=0} /\[(RC5.*|RC6|IDEA.*)\]/{f=1} (f && !/^#/){sub(/^/,"#")} {print}' \ checks/validate.dat.orig > checks/validate.dat LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Fri Jul 26 2013 Thomas Moschny - 1.10.5-1 +- Update to 1.10.5. +- Modernize spec file. +- New -doc subpackage containing HTML documentation. +- Package Python binding. + * Wed Feb 13 2013 Fedora Release Engineering - 1.8.14-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild diff --git a/repack.sh b/repack.sh index 9bd4162..c74ea1b 100755 --- a/repack.sh +++ b/repack.sh @@ -1,6 +1,6 @@ #! /bin/bash -version=1.8.14 +version=1.10.5 name=Botan-${version} suffix=.tbz newsuffix=.stripped.tbz @@ -11,13 +11,16 @@ tmpfile=$(mktemp) ${compr} -cd ${name}${suffix} > ${tmpfile} -tar --delete --file=${tmpfile} ./Botan-${version}/src/block/idea -tar --delete --file=${tmpfile} ./Botan-${version}/src/block/rc6 -tar --delete --file=${tmpfile} ./Botan-${version}/src/block/rc5 -tar --delete --file=${tmpfile} ./Botan-${version}/src/math/gfpmath -tar --delete --file=${tmpfile} ./Botan-${version}/src/pubkey/ec_dompar -tar --delete --file=${tmpfile} ./Botan-${version}/src/pubkey/ecc_key -tar --delete --file=${tmpfile} ./Botan-${version}/src/pubkey/ecdsa -tar --delete --file=${tmpfile} ./Botan-${version}/src/pubkey/eckaeg +tar --delete --file=${tmpfile} Botan-${version}/src/block/idea +tar --delete --file=${tmpfile} Botan-${version}/src/block/idea_sse2 +tar --delete --file=${tmpfile} Botan-${version}/src/block/rc6 +tar --delete --file=${tmpfile} Botan-${version}/src/block/rc5 +tar --delete --file=${tmpfile} Botan-${version}/src/math/ec_gfp +tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ecc_key +tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ecdh +tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ecdsa +tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ec_group +tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/gost_3410 +tar --delete --file=${tmpfile} Botan-${version}/src/constructs/srp6 ${compr} -c ${tmpfile} > ${name}${newsuffix} diff --git a/sources b/sources index 219b46d..f334e98 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4b5ce78b1cfc0735eb7ec4f6903068ca Botan-1.8.14.stripped.tbz +dcc2a74f56c617add323df4ae175c1a5 Botan-1.10.5.stripped.tbz From 49e022358c0f9c336c2fd3365655da3d0371f292 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Fri, 26 Jul 2013 12:13:41 +0200 Subject: [PATCH 02/18] Rename the subpackage for the Python binding. --- botan.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/botan.spec b/botan.spec index babc333..66f6fa0 100644 --- a/botan.spec +++ b/botan.spec @@ -2,7 +2,7 @@ Name: botan Version: %{major_version}.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -62,11 +62,11 @@ BuildArch: noarch This package contains HTML documentation for %{name}. -%package -n python-%{name} +%package python Summary: Python bindings for %{name} Group: System Environment/Libraries -%description -n python-%{name} +%description python %{summary} This package contains the Python binding for %{name}. @@ -149,7 +149,7 @@ rm -r _doc/manual/.doctrees %doc doc/license.txt -%files -n python-%{name} +%files python %doc doc/python-examples %{python_sitearch}/%{name} @@ -165,6 +165,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Fri Jul 26 2013 Thomas Moschny - 1.10.5-2 +- Rename the subpackage for the Python binding. + * Fri Jul 26 2013 Thomas Moschny - 1.10.5-1 - Update to 1.10.5. - Modernize spec file. From f2a104bfae7d6fca9beb727dfe0a624d4a45ab81 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Sat, 27 Jul 2013 14:57:17 +0200 Subject: [PATCH 03/18] Rebuild for boost 1.54.0 --- botan.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/botan.spec b/botan.spec index 66f6fa0..6ef9849 100644 --- a/botan.spec +++ b/botan.spec @@ -2,7 +2,7 @@ Name: botan Version: %{major_version}.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -165,6 +165,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Sat Jul 27 2013 pmachata@redhat.com - 1.10.5-3 +- Rebuild for boost 1.54.0 + * Fri Jul 26 2013 Thomas Moschny - 1.10.5-2 - Rename the subpackage for the Python binding. From 89956fd8c978afead36c29872098e537bfc8872c Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Tue, 3 Sep 2013 19:53:33 +0200 Subject: [PATCH 04/18] Re-enable IDEA (rhbz#1003052) and SRP-6. --- README.fedora | 2 -- botan.spec | 7 +++++-- repack.sh | 3 --- sources | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.fedora b/README.fedora index 1a10d12..038f1bf 100644 --- a/README.fedora +++ b/README.fedora @@ -1,7 +1,6 @@ For legal reasons, the following modules have been completely removed from the Botan package in Fedora: -* IDEA Block Cipher [src/block/idea, src/block/idea_sse2] * RC5 Block Cipher [src/block/rc5] * RC6 Block Cipher [src/block/rc6] * GF(p) Math [src/math/ec_gfp] @@ -10,4 +9,3 @@ from the Botan package in Fedora: * ECDH [src/pubkey/ecdh] * ECDSA [src/pubkey/ecdsa] * GOST 34.10 [src/pubkey/gost_3410] -* SRP-6 [src/constructs/srp6] diff --git a/botan.spec b/botan.spec index 6ef9849..119020e 100644 --- a/botan.spec +++ b/botan.spec @@ -2,7 +2,7 @@ Name: botan Version: %{major_version}.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -159,12 +159,15 @@ make CXX="g++ ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags} check # these checks would fail mv checks/validate.dat{,.orig} -awk '/\[.*\]/{f=0} /\[(RC5.*|RC6|IDEA.*)\]/{f=1} (f && !/^#/){sub(/^/,"#")} {print}' \ +awk '/\[.*\]/{f=0} /\[(RC5.*|RC6)\]/{f=1} (f && !/^#/){sub(/^/,"#")} {print}' \ checks/validate.dat.orig > checks/validate.dat LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Tue Sep 3 2013 Thomas Moschny - 1.10.5-4 +- Re-enable IDEA (rhbz#1003052) and SRP-6. + * Sat Jul 27 2013 pmachata@redhat.com - 1.10.5-3 - Rebuild for boost 1.54.0 diff --git a/repack.sh b/repack.sh index c74ea1b..33e7bdd 100755 --- a/repack.sh +++ b/repack.sh @@ -11,8 +11,6 @@ tmpfile=$(mktemp) ${compr} -cd ${name}${suffix} > ${tmpfile} -tar --delete --file=${tmpfile} Botan-${version}/src/block/idea -tar --delete --file=${tmpfile} Botan-${version}/src/block/idea_sse2 tar --delete --file=${tmpfile} Botan-${version}/src/block/rc6 tar --delete --file=${tmpfile} Botan-${version}/src/block/rc5 tar --delete --file=${tmpfile} Botan-${version}/src/math/ec_gfp @@ -21,6 +19,5 @@ tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ecdh tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ecdsa tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ec_group tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/gost_3410 -tar --delete --file=${tmpfile} Botan-${version}/src/constructs/srp6 ${compr} -c ${tmpfile} > ${name}${newsuffix} diff --git a/sources b/sources index f334e98..3fc6f5b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dcc2a74f56c617add323df4ae175c1a5 Botan-1.10.5.stripped.tbz +ac941b269bd6c73ab40b63577482b163 Botan-1.10.5.stripped.tbz From f78580826ce09bda3d1e0deb4c5ecaf20c018531 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Tue, 3 Sep 2013 19:55:37 +0200 Subject: [PATCH 05/18] Fix changelog. --- botan.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/botan.spec b/botan.spec index 119020e..ae003d9 100644 --- a/botan.spec +++ b/botan.spec @@ -168,7 +168,7 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate * Tue Sep 3 2013 Thomas Moschny - 1.10.5-4 - Re-enable IDEA (rhbz#1003052) and SRP-6. -* Sat Jul 27 2013 pmachata@redhat.com - 1.10.5-3 +* Sat Jul 27 2013 Petr Machata - 1.10.5-3 - Rebuild for boost 1.54.0 * Fri Jul 26 2013 Thomas Moschny - 1.10.5-2 From a7ae4770ebf8ae220e51e956bfbd34290a096430 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 10 May 2014 14:29:27 +0200 Subject: [PATCH 06/18] Update to 1.10.8. --- .gitignore | 1 + botan.spec | 7 +++++-- repack.sh | 2 +- sources | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 38d1d01..c7a054a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /Botan-1.8.13.stripped.tbz /Botan-1.8.14.stripped.tbz /Botan-1.10.5.stripped.tbz +/Botan-1.10.8.stripped.tbz diff --git a/botan.spec b/botan.spec index ae003d9..3e77829 100644 --- a/botan.spec +++ b/botan.spec @@ -1,8 +1,8 @@ %global major_version 1.10 Name: botan -Version: %{major_version}.5 -Release: 4%{?dist} +Version: %{major_version}.8 +Release: 1%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -165,6 +165,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Sat May 10 2014 Thomas Moschny - 1.10.8-1 +- Update to 1.10.8. + * Tue Sep 3 2013 Thomas Moschny - 1.10.5-4 - Re-enable IDEA (rhbz#1003052) and SRP-6. diff --git a/repack.sh b/repack.sh index 33e7bdd..9f40365 100755 --- a/repack.sh +++ b/repack.sh @@ -1,6 +1,6 @@ #! /bin/bash -version=1.10.5 +version=1.10.8 name=Botan-${version} suffix=.tbz newsuffix=.stripped.tbz diff --git a/sources b/sources index 3fc6f5b..89d7334 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ac941b269bd6c73ab40b63577482b163 Botan-1.10.5.stripped.tbz +c7ebfad55bdfe0089e6201d11b0faa75 Botan-1.10.8.stripped.tbz From c20c9653818e1cc2a41d20814178f2b8d249caf8 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 12 May 2014 13:06:24 +0100 Subject: [PATCH 07/18] Added AArch64 architecture support, patch being sent upstream --- botan.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/botan.spec b/botan.spec index 3e77829..6c9cd67 100644 --- a/botan.spec +++ b/botan.spec @@ -2,7 +2,7 @@ Name: botan Version: %{major_version}.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -12,6 +12,7 @@ URL: http://botan.randombit.net/ # here: http://files.randombit.net/botan/Botan-%%{version}.tbz Source0: Botan-%{version}.stripped.tbz Source1: README.fedora +Patch0: botan-aarch64.patch BuildRequires: gcc-c++ BuildRequires: python @@ -77,6 +78,7 @@ interfaces may change in the future. %prep %setup -q -n Botan-%{version} +%patch0 -p1 cp -av %{SOURCE1} . @@ -165,6 +167,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Mon May 12 2014 Marcin Juszkiewicz - 1.10.8-2 +- Added AArch64 architecture support + * Sat May 10 2014 Thomas Moschny - 1.10.8-1 - Update to 1.10.8. From 36e8a6c98af14acc26eb20538ce9889da14a2dfb Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 12 May 2014 13:06:38 +0100 Subject: [PATCH 08/18] Added AArch64 architecture support, patch being sent upstream --- botan-aarch64.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 botan-aarch64.patch diff --git a/botan-aarch64.patch b/botan-aarch64.patch new file mode 100644 index 0000000..ffb6888 --- /dev/null +++ b/botan-aarch64.patch @@ -0,0 +1,21 @@ +Index: Botan-1.10.8/src/build-data/arch/aarch64.txt +=================================================================== +--- /dev/null ++++ Botan-1.10.8/src/build-data/arch/aarch64.txt +@@ -0,0 +1,16 @@ ++ ++endian little ++family aarch64 ++ ++ ++arm64 # For Debian ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ From 53bda05aa577346241af3d5cf2e73c5c585cd39d Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 23 May 2014 10:28:27 +0200 Subject: [PATCH 09/18] rebuild for boost 1.55.0 --- botan.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/botan.spec b/botan.spec index 6c9cd67..f5797aa 100644 --- a/botan.spec +++ b/botan.spec @@ -2,7 +2,7 @@ Name: botan Version: %{major_version}.8 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -167,6 +167,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Fri May 23 2014 David Tardon - 1.10.8-3 +- rebuild for boost 1.55.0 + * Mon May 12 2014 Marcin Juszkiewicz - 1.10.8-2 - Added AArch64 architecture support From 8d68e9c74f3fb4d95cd4b9604630c47d00d1822c Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Sun, 25 May 2014 14:30:14 -0500 Subject: [PATCH 10/18] Added ppc64le arch support --- botan-1.10-add-ppc64le.patch | 50 ++++++++++++++++++++++++++++++++++++ botan.spec | 7 ++++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 botan-1.10-add-ppc64le.patch diff --git a/botan-1.10-add-ppc64le.patch b/botan-1.10-add-ppc64le.patch new file mode 100644 index 0000000..05794cd --- /dev/null +++ b/botan-1.10-add-ppc64le.patch @@ -0,0 +1,50 @@ +diff -Naur Botan-1.10.8.orig/src/build-data/arch/ppc64le.txt Botan-1.10.8/src/build-data/arch/ppc64le.txt +--- Botan-1.10.8.orig/src/build-data/arch/ppc64le.txt 1969-12-31 18:00:00.000000000 -0600 ++++ Botan-1.10.8/src/build-data/arch/ppc64le.txt 2014-05-25 12:59:22.030001491 -0500 +@@ -0,0 +1,16 @@ ++ ++endian little ++family ppc64le ++ ++ ++ppc64el # For Debian ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff -Naur Botan-1.10.8.orig/src/build-data/cc/gcc.txt Botan-1.10.8/src/build-data/cc/gcc.txt +--- Botan-1.10.8.orig/src/build-data/cc/gcc.txt 2014-05-25 12:44:19.580001491 -0500 ++++ Botan-1.10.8/src/build-data/cc/gcc.txt 2014-05-25 12:55:57.750001491 -0500 +@@ -83,6 +83,7 @@ + mips64 -> "-mips3 -mcpu=SUBMODEL" mips64- + ppc32 -> "-mcpu=SUBMODEL" ppc + ppc64 -> "-mcpu=SUBMODEL" ppc ++ppc64le -> "-mcpu=SUBMODEL" + sparc32 -> "-mcpu=SUBMODEL -Wa,-xarch=v8plus" sparc32- + sparc64 -> "-mcpu=v9 -mtune=SUBMODEL" + x86_32 -> "-march=SUBMODEL -momit-leaf-frame-pointer" +@@ -98,6 +99,7 @@ + sparc32 -> "-m32 -mno-app-regs" + sparc64 -> "-m64 -mno-app-regs" + ppc64 -> "-m64" ++ppc64le -> "-m64" + + # This should probably be used on most/all targets, but the docs are unclear + openbsd -> "-pthread" +diff -Naur Botan-1.10.8.orig/src/math/mp/mp_asm64/info.txt Botan-1.10.8/src/math/mp/mp_asm64/info.txt +--- Botan-1.10.8.orig/src/math/mp/mp_asm64/info.txt 2014-05-25 12:44:19.620001491 -0500 ++++ Botan-1.10.8/src/math/mp/mp_asm64/info.txt 2014-05-25 12:45:01.580001491 -0500 +@@ -13,6 +13,7 @@ + mips64 + ppc64 + sparc64 ++ppc64le + + + # The inline asm only works with gcc, but it looks like (at least on diff --git a/botan.spec b/botan.spec index f5797aa..7750c3c 100644 --- a/botan.spec +++ b/botan.spec @@ -2,7 +2,7 @@ Name: botan Version: %{major_version}.8 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -13,6 +13,7 @@ URL: http://botan.randombit.net/ Source0: Botan-%{version}.stripped.tbz Source1: README.fedora Patch0: botan-aarch64.patch +Patch1: botan-1.10-add-ppc64le.patch BuildRequires: gcc-c++ BuildRequires: python @@ -79,6 +80,7 @@ interfaces may change in the future. %prep %setup -q -n Botan-%{version} %patch0 -p1 +%patch1 -p1 cp -av %{SOURCE1} . @@ -167,6 +169,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Sun May 25 2014 Brent Baude - 1.10.8-4 +- Added ppc64le arch support + * Fri May 23 2014 David Tardon - 1.10.8-3 - rebuild for boost 1.55.0 From 4ed026fc925d83b1203d9c280bfa9cb08f67f45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sat, 31 May 2014 10:09:40 +0200 Subject: [PATCH 11/18] rebuild for boost 1.55.0 (libboost_python.so.1.55.0) --- botan.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/botan.spec b/botan.spec index 7750c3c..04e22a4 100644 --- a/botan.spec +++ b/botan.spec @@ -2,7 +2,7 @@ Name: botan Version: %{major_version}.8 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -169,6 +169,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Sat May 31 2014 Björn Esser - 1.10.8-5 +- rebuild for boost 1.55.0 (libboost_python.so.1.55.0) + * Sun May 25 2014 Brent Baude - 1.10.8-4 - Added ppc64le arch support From c0cba64d16fc1c1fac982e02577b47795889f734 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 6 Jun 2014 22:27:04 -0500 Subject: [PATCH 12/18] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- botan.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/botan.spec b/botan.spec index 04e22a4..a662d1a 100644 --- a/botan.spec +++ b/botan.spec @@ -2,7 +2,7 @@ Name: botan Version: %{major_version}.8 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -169,6 +169,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 1.10.8-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Sat May 31 2014 Björn Esser - 1.10.8-5 - rebuild for boost 1.55.0 (libboost_python.so.1.55.0) From 80c63f463e6cd51f0b40e9209f6f277c94c43fcb Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 15 Aug 2014 23:04:03 +0000 Subject: [PATCH 13/18] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- botan.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/botan.spec b/botan.spec index a662d1a..1a80066 100644 --- a/botan.spec +++ b/botan.spec @@ -2,7 +2,7 @@ Name: botan Version: %{major_version}.8 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -169,6 +169,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Fri Aug 15 2014 Fedora Release Engineering - 1.10.8-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Jun 07 2014 Fedora Release Engineering - 1.10.8-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From a67d57e0c081a05791f1ddd07645613ce9bd27b3 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 31 Jan 2015 10:23:51 +0100 Subject: [PATCH 14/18] Update to 1.10.9. --- .gitignore | 1 + botan.spec | 12 ++++++++++-- repack.sh | 2 +- sources | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c7a054a..a10c5ff 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /Botan-1.8.14.stripped.tbz /Botan-1.10.5.stripped.tbz /Botan-1.10.8.stripped.tbz +/Botan-1.10.9.stripped.tbz diff --git a/botan.spec b/botan.spec index 1a80066..1168f46 100644 --- a/botan.spec +++ b/botan.spec @@ -1,8 +1,8 @@ %global major_version 1.10 Name: botan -Version: %{major_version}.8 -Release: 7%{?dist} +Version: %{major_version}.9 +Release: 1%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -19,7 +19,12 @@ BuildRequires: gcc-c++ BuildRequires: python BuildRequires: python-sphinx BuildRequires: python-devel +%if 0%{?fedora} >= 22 +# work around bug 1186014 +BuildRequires: boost-python-devel%{?_isa} +%else BuildRequires: boost-python-devel +%endif BuildRequires: bzip2-devel BuildRequires: zlib-devel @@ -169,6 +174,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Sat Jan 31 2015 Thomas Moschny - 1.10.9-1 +- Update to 1.10.9. + * Fri Aug 15 2014 Fedora Release Engineering - 1.10.8-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild diff --git a/repack.sh b/repack.sh index 9f40365..d23452d 100755 --- a/repack.sh +++ b/repack.sh @@ -1,6 +1,6 @@ #! /bin/bash -version=1.10.8 +version=1.10.9 name=Botan-${version} suffix=.tbz newsuffix=.stripped.tbz diff --git a/sources b/sources index 89d7334..458bb6a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c7ebfad55bdfe0089e6201d11b0faa75 Botan-1.10.8.stripped.tbz +126ef6f9c7527392ecd5a0337669c8d6 Botan-1.10.9.stripped.tbz From 1ab004f2d7f3bf3a876d72a42e1f4abb121d08c6 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Thu, 5 Feb 2015 18:01:55 +0100 Subject: [PATCH 15/18] Remove workaround for bug 1186014. --- botan.spec | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/botan.spec b/botan.spec index 1168f46..c7bf754 100644 --- a/botan.spec +++ b/botan.spec @@ -2,7 +2,7 @@ Name: botan Version: %{major_version}.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -13,18 +13,13 @@ URL: http://botan.randombit.net/ Source0: Botan-%{version}.stripped.tbz Source1: README.fedora Patch0: botan-aarch64.patch -Patch1: botan-1.10-add-ppc64le.patch +Patch1: botan-1.10-add-ppc64le.patch BuildRequires: gcc-c++ BuildRequires: python BuildRequires: python-sphinx BuildRequires: python-devel -%if 0%{?fedora} >= 22 -# work around bug 1186014 -BuildRequires: boost-python-devel%{?_isa} -%else BuildRequires: boost-python-devel -%endif BuildRequires: bzip2-devel BuildRequires: zlib-devel @@ -174,6 +169,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Thu Feb 5 2015 Thomas Moschny - 1.10.9-2 +- Remove workaround for bug 1186014. + * Sat Jan 31 2015 Thomas Moschny - 1.10.9-1 - Update to 1.10.9. From 41ed55682f5f1991640fa5c84dd6a2effd9beefd Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Fri, 6 Feb 2015 18:34:28 +0100 Subject: [PATCH 16/18] Disable gmp engine (see bug 1116406). --- botan.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/botan.spec b/botan.spec index c7bf754..2dfe915 100644 --- a/botan.spec +++ b/botan.spec @@ -2,7 +2,7 @@ Name: botan Version: %{major_version}.9 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -23,7 +23,6 @@ BuildRequires: boost-python-devel BuildRequires: bzip2-devel BuildRequires: zlib-devel -BuildRequires: gmp-devel BuildRequires: openssl-devel # do not check .so files in the python_sitelib directory @@ -45,7 +44,6 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Requires: pkgconfig Requires: bzip2-devel Requires: zlib-devel -Requires: gmp-devel Requires: openssl-devel %description devel @@ -86,10 +84,10 @@ cp -av %{SOURCE1} . %build # we have the necessary prerequisites, so enable optional modules -%define enable_modules gnump,bzip2,zlib,openssl +%define enable_modules bzip2,zlib,openssl # fixme: maybe disable unix_procs, very slow. -%define disable_modules %{nil} +%define disable_modules gnump ./configure.py \ --prefix=%{_prefix} \ @@ -169,6 +167,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Thu Feb 5 2015 Thomas Moschny - 1.10.9-3 +- Disable gmp engine (see bug 1116406). + * Thu Feb 5 2015 Thomas Moschny - 1.10.9-2 - Remove workaround for bug 1186014. From 4083bc67434b9c92cd6044e16b4e487d80158052 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Fri, 6 Feb 2015 18:34:45 +0100 Subject: [PATCH 17/18] Use _pkgdocdir. --- botan.spec | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/botan.spec b/botan.spec index 2dfe915..1ddb878 100644 --- a/botan.spec +++ b/botan.spec @@ -28,6 +28,8 @@ BuildRequires: openssl-devel # do not check .so files in the python_sitelib directory %global __provides_exclude_from ^(%{python_sitearch}/.*\\.so)$ +%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} + %description Botan is a BSD-licensed crypto library written in C++. It provides a wide variety of basic cryptographic algorithms, X.509 certificates and @@ -79,7 +81,6 @@ interfaces may change in the future. %setup -q -n Botan-%{version} %patch0 -p1 %patch1 -p1 -cp -av %{SOURCE1} . %build @@ -98,7 +99,8 @@ cp -av %{SOURCE1} . --enable-modules=%{enable_modules} \ --disable-modules=%{disable_modules} \ --with-boost-python \ - --with-python-version=%{python_version} + --with-python-version=%{python_version} \ + --with-sphinx # (ab)using CXX as an easy way to inject our CXXFLAGS make CXX="g++ ${CXXFLAGS:-%{optflags}}" %{?_smp_mflags} @@ -109,7 +111,7 @@ make -f Makefile.python \ %install make install \ DESTDIR=%{buildroot}%{_prefix} \ - DOCDIR=_doc \ + DOCDIR=%{buildroot}%{_pkgdocdir} \ INSTALL_CMD_EXEC="install -p -m 755" \ INSTALL_CMD_DATA="install -p -m 644" @@ -119,8 +121,10 @@ make -f Makefile.python install \ # fixups find doc/examples -type f -exec chmod -x {} \; mv doc/examples/python doc/python-examples -rm _doc/manual/.buildinfo -rm -r _doc/manual/.doctrees +cp -a doc/{examples,python-examples,license.txt} \ + %{buildroot}%{_pkgdocdir} +cp -a %{SOURCE1} %{buildroot}%{_pkgdocdir} +rm -r %{buildroot}%{_pkgdocdir}/manual/{.doctrees,.buildinfo} %post -p /sbin/ldconfig @@ -130,14 +134,15 @@ rm -r _doc/manual/.doctrees %files -%doc _doc/readme.txt -%doc doc/license.txt -%doc README.fedora +%dir %{_pkgdocdir} +%{_pkgdocdir}/readme.txt +%{_pkgdocdir}/license.txt +%{_pkgdocdir}/README.fedora %{_libdir}/libbotan-%{major_version}.so.* %files devel -%doc doc/examples +%{_pkgdocdir}/examples %{_bindir}/botan-config-%{major_version} %{_includedir}/* %exclude %{_libdir}/libbotan-%{major_version}.a @@ -146,13 +151,19 @@ rm -r _doc/manual/.doctrees %files doc -%doc _doc/manual -%doc _doc/readme.txt -%doc doc/license.txt +%dir %{_pkgdocdir} +%{_pkgdocdir}/manual +# next files duplicated on purpose, because -doc doesn't depend on the +# main package +%{_pkgdocdir}/readme.txt +%{_pkgdocdir}/license.txt +%{_pkgdocdir}/README.fedora %files python -%doc doc/python-examples +%{_pkgdocdir}/python-examples +%exclude %{_pkgdocdir}/python-examples/*.pyc +%exclude %{_pkgdocdir}/python-examples/*.pyo %{python_sitearch}/%{name} @@ -169,6 +180,7 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog * Thu Feb 5 2015 Thomas Moschny - 1.10.9-3 - Disable gmp engine (see bug 1116406). +- Use _pkgdocdir. * Thu Feb 5 2015 Thomas Moschny - 1.10.9-2 - Remove workaround for bug 1186014. From 953c48ed291ec6bafc1d64871ebda6024260ed41 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Fri, 6 Feb 2015 18:52:22 +0100 Subject: [PATCH 18/18] Re-enable cleared ECC. Patch by Tom Callaway . --- botan-1.10.5-ecc-fix.patch | 327 +++++++++++++++++++++++++++++++++++++ botan.spec | 10 +- repack.sh | 5 - sources | 2 +- 4 files changed, 337 insertions(+), 7 deletions(-) create mode 100644 botan-1.10.5-ecc-fix.patch diff --git a/botan-1.10.5-ecc-fix.patch b/botan-1.10.5-ecc-fix.patch new file mode 100644 index 0000000..4cd2e9a --- /dev/null +++ b/botan-1.10.5-ecc-fix.patch @@ -0,0 +1,327 @@ +diff -up Botan-1.10.5/checks/cvc_tests.cpp.eccfix Botan-1.10.5/checks/cvc_tests.cpp +--- Botan-1.10.5/checks/cvc_tests.cpp.eccfix 2013-10-22 01:24:04.150239344 +0100 ++++ Botan-1.10.5/checks/cvc_tests.cpp 2013-10-22 01:24:28.166207414 +0100 +@@ -582,7 +582,7 @@ u32bit do_cvc_tests(Botan::RandomNumberG + std::cout << "Testing CVC: " << std::flush; + + test_enc_gen_selfsigned(rng); +- test_enc_gen_req(rng); ++ // test_enc_gen_req(rng); + test_cvc_req_ext(rng); + test_cvc_ado_ext(rng); + test_cvc_ado_creation(rng); +diff -up Botan-1.10.5/checks/ecdh.cpp.eccfix Botan-1.10.5/checks/ecdh.cpp +--- Botan-1.10.5/checks/ecdh.cpp.eccfix 2013-10-22 01:22:58.494326624 +0100 ++++ Botan-1.10.5/checks/ecdh.cpp 2013-10-22 01:23:52.580254726 +0100 +@@ -57,8 +57,8 @@ void test_ecdh_some_dp(RandomNumberGener + { + std::vector oids; + oids.push_back("1.2.840.10045.3.1.7"); +- oids.push_back("1.3.132.0.8"); +- oids.push_back("1.2.840.10045.3.1.1"); ++ // oids.push_back("1.3.132.0.8"); ++ // oids.push_back("1.2.840.10045.3.1.1"); + + for(u32bit i = 0; i< oids.size(); i++) + { +@@ -85,8 +85,8 @@ void test_ecdh_der_derivation(RandomNumb + { + std::vector oids; + oids.push_back("1.2.840.10045.3.1.7"); +- oids.push_back("1.3.132.0.8"); +- oids.push_back("1.2.840.10045.3.1.1"); ++ // oids.push_back("1.3.132.0.8"); ++ // oids.push_back("1.2.840.10045.3.1.1"); + + for(u32bit i = 0; i< oids.size(); i++) + { +@@ -116,7 +116,7 @@ u32bit do_ecdh_tests(RandomNumberGenerat + { + std::cout << "Testing ECDH (InSiTo unit tests): "; + +- test_ecdh_normal_derivation(rng); ++ // test_ecdh_normal_derivation(rng); + test_ecdh_some_dp(rng); + test_ecdh_der_derivation(rng); + +diff -up Botan-1.10.5/checks/ecdsa.cpp.eccfix Botan-1.10.5/checks/ecdsa.cpp +--- Botan-1.10.5/checks/ecdsa.cpp.eccfix 2013-03-02 21:19:35.000000000 +0000 ++++ Botan-1.10.5/checks/ecdsa.cpp 2013-10-22 01:22:48.882339400 +0100 +@@ -300,6 +300,7 @@ void test_create_and_verify(RandomNumber + void test_curve_registry(RandomNumberGenerator& rng) + { + std::vector oids; ++ /* Disabled. + oids.push_back("1.3.132.0.8"); + oids.push_back("1.2.840.10045.3.1.1"); + oids.push_back("1.2.840.10045.3.1.2"); +@@ -307,7 +308,9 @@ void test_curve_registry(RandomNumberGen + oids.push_back("1.2.840.10045.3.1.4"); + oids.push_back("1.2.840.10045.3.1.5"); + oids.push_back("1.2.840.10045.3.1.6"); ++ */ + oids.push_back("1.2.840.10045.3.1.7"); ++ /* Disabled + oids.push_back("1.3.132.0.6"); + oids.push_back("1.3.132.0.7"); + oids.push_back("1.3.132.0.28"); +@@ -318,7 +321,9 @@ void test_curve_registry(RandomNumberGen + oids.push_back("1.3.132.0.32"); + oids.push_back("1.3.132.0.33"); + oids.push_back("1.3.132.0.10"); ++ */ + oids.push_back("1.3.132.0.34"); ++ /* Disabled. + oids.push_back("1.3.132.0.35"); + oids.push_back("1.3.6.1.4.1.8301.3.1.2.9.0.38"); + oids.push_back("1.3.36.3.3.2.8.1.1.1"); +@@ -328,6 +333,7 @@ void test_curve_registry(RandomNumberGen + oids.push_back("1.3.36.3.3.2.8.1.1.9"); + oids.push_back("1.3.36.3.3.2.8.1.1.11"); + oids.push_back("1.3.36.3.3.2.8.1.1.13"); ++ */ + + unsigned int i; + for (i = 0; i < oids.size(); i++) +@@ -419,16 +425,16 @@ u32bit do_ecdsa_tests(Botan::RandomNumbe + { + std::cout << "Testing ECDSA (InSiTo unit tests): "; + +- test_hash_larger_than_n(rng); +- test_decode_ecdsa_X509(); ++ // test_hash_larger_than_n(rng); ++ // test_decode_ecdsa_X509(); + test_decode_ver_link_SHA256(); + test_decode_ver_link_SHA1(); +- test_sign_then_ver(rng); +- test_ec_sign(rng); +- test_create_pkcs8(rng); +- test_create_and_verify(rng); ++ // test_sign_then_ver(rng); ++ // test_ec_sign(rng); ++ // test_create_pkcs8(rng); ++ // test_create_and_verify(rng); + test_curve_registry(rng); +- test_read_pkcs8(rng); ++ // test_read_pkcs8(rng); + + std::cout << std::endl; + +diff -up Botan-1.10.5/checks/pk.cpp.eccfix Botan-1.10.5/checks/pk.cpp +--- Botan-1.10.5/checks/pk.cpp.eccfix 2013-03-02 21:19:36.000000000 +0000 ++++ Botan-1.10.5/checks/pk.cpp 2013-10-22 01:20:13.225546244 +0100 +@@ -760,14 +760,14 @@ void do_pk_keygen_tests(RandomNumberGene + #endif + + #if defined(BOTAN_HAS_ECDSA) +- EC_KEY(ECDSA_PrivateKey, "secp112r1"); +- EC_KEY(ECDSA_PrivateKey, "secp128r1"); +- EC_KEY(ECDSA_PrivateKey, "secp160r1"); +- EC_KEY(ECDSA_PrivateKey, "secp192r1"); +- EC_KEY(ECDSA_PrivateKey, "secp224r1"); ++// EC_KEY(ECDSA_PrivateKey, "secp112r1"); ++// EC_KEY(ECDSA_PrivateKey, "secp128r1"); ++// EC_KEY(ECDSA_PrivateKey, "secp160r1"); ++// EC_KEY(ECDSA_PrivateKey, "secp192r1"); ++// EC_KEY(ECDSA_PrivateKey, "secp224r1"); + EC_KEY(ECDSA_PrivateKey, "secp256r1"); + EC_KEY(ECDSA_PrivateKey, "secp384r1"); +- EC_KEY(ECDSA_PrivateKey, "secp521r1"); ++// EC_KEY(ECDSA_PrivateKey, "secp521r1"); + #endif + + #if defined(BOTAN_HAS_GOST_34_10_2001) +@@ -919,7 +919,7 @@ u32bit do_pk_validation_tests(const std: + + std::cout << std::endl; + +- do_ec_tests(rng); ++ // do_ec_tests(rng); + errors += do_ecdsa_tests(rng); + errors += do_ecdh_tests(rng); + do_pk_keygen_tests(rng); +diff -up Botan-1.10.5/checks/pk_bench.cpp.eccfix Botan-1.10.5/checks/pk_bench.cpp +--- Botan-1.10.5/checks/pk_bench.cpp.eccfix 2013-03-02 21:19:36.000000000 +0000 ++++ Botan-1.10.5/checks/pk_bench.cpp 2013-10-22 01:20:13.225546244 +0100 +@@ -77,12 +77,12 @@ using namespace Botan; + namespace { + + const char* ec_domains[] = { +- "secp160r2", +- "secp192r1", +- "secp224r1", ++// "secp160r2", ++// "secp192r1", ++// "secp224r1", + "secp256r1", + "secp384r1", +- "secp521r1", ++// "secp521r1", + 0 + }; + +diff -up Botan-1.10.5/checks/pk_valid.dat.eccfix Botan-1.10.5/checks/pk_valid.dat +--- Botan-1.10.5/checks/pk_valid.dat.eccfix 2013-03-02 21:19:36.000000000 +0000 ++++ Botan-1.10.5/checks/pk_valid.dat 2013-10-22 01:20:13.226546243 +0100 +@@ -4232,45 +4232,6 @@ MIG6AgEAMIGhBgcqhkjOOAQBMIGVAkAA8HR2W1fH + 14593FBF63EAC64976987524044D8B11AB9A95B4B75A760FE22C45A3EFD6: + + # ECDSA format is group name:private key:message:nonce:signature +-[ECDSA/EMSA1(SHA-1)] +- +-# From ANSI X9.62 +-secp192r1:\ +-1A8D598FC15BF0FD89030B5CB1111AEB92AE8BAF5EA475FB:\ +-616263:\ +-FA6DE29746BBEB7F8BB1E761F85F7DFB2983169D82FA2F4E:\ +-885052380FF147B734C330C43D39B2C4A89F29B0F749FEAD\ +-E9ECC78106DEF82BF1070CF1D4D804C3CB390046951DF686 +- +-x962_p239v1:\ +-7EF7C6FABEFFFDEA864206E80B0B08A9331ED93E698561B64CA0F7777F3D:\ +-616263:\ +-656C7196BF87DCC5D1F1020906DF2782360D36B2DE7A17ECE37D503784AF:\ +-2CB7F36803EBB9C427C58D8265F11FC5084747133078FC279DE874FBECB0\ +-2EEAE988104E9C2234A3C2BEB1F53BFA5DC11FF36A875D1E3CCB1F7E45CF +- +-brainpool160r1:\ +-1CA8A0ACE60292D2813D992C4EC7A4BCDF611C0:\ +-43727970746F2B2B20352E362E312045434453412074657374206D7367:\ +-9CB692B33F02179D1A6F2A0669FD8DAAF17E4FC4:\ +-672EAFD043D30BAE7CA826828333FA70F10A14C7\ +-0F49C076BB26178277D8E490D0C77F7A9649DE31 +- +-[ECDSA/EMSA1(SHA-224)] +-secp224r1:\ +-42D126D0E51F3D6AA9B4D60BD1290853AA964A9C8698D5D5BDBAADEB:\ +-45434453412074657374206D657373616765203230313130323135:\ +-E1F6B207B4FC896879A51F65E85DB94CEB633FEC765739E689847D64:\ +-A4C80AAF3D7B61200E66D6F41EC66D3D65E9E38DC06A88FE3B7F6C4C\ +-8A5CEE4E04FE240464EA2DBB52489D3FAC1CDE6DA24A0E4C6598BCD2 +- +-brainpool224r1:\ +-47B5CCE9EED463CED28666DA57DA9D0A8BDD3F000CCFC0AE6054F1AD:\ +-43727970746F2B2B20352E362E312045434453412074657374206D7367:\ +-9E9D0C9E67FF5785C3AD89195567CD3990D54C628788F26DB926F5B6:\ +-40369F41BD0D15C92DFB855779DBF439376FB6EDC4153E9B99019B79\ +-40FEF076FC8D610EC12AFC9CC43A150BD0190E507622E6623906D6B8 +- + [ECDSA/EMSA1(SHA-256)] + secp256r1:\ + 368E89CC30AE7A3B4B4903C30C238C010257FE97DB85AF35982A7960A0DBD2F3:\ +@@ -4286,20 +4247,6 @@ C1DDAA59A4E0B5D95EB873C33BC465C6782EBF7B + A8369164EF54A67303760B77AA62C4DE8122396908EA5B06DBCC2BC48264C832\ + ADB3A8855019D5AFF789EC1F276AD38A03AAF41F88593B74E5CB9DF7E4BD4922 + +-brainpool256r1:\ +-4EC702404A8047A08206721DE33F02E1F06B14E09A5582171EA9BB8AB3C9BC14:\ +-43727970746F2B2B20352E362E312045434453412074657374206D7367:\ +-A9952A1B896FB2C2AEA88EA578E2A5323114978A765E03E397969DC0F282708C:\ +-54F843E89B084EEE1CFFED09F222DF041CD46DB0C48833667BA0790ECD603089\ +-5304039A927714E79E5FCDB1D043E093FD85C8DD98B835CD6C7BB492C05357E5 +- +-brainpool256r1:\ +-416D7FCEB966DF966CAE7BE2608C5C4D8939A7B5B3CF6D3E441A64886AC5FAD7:\ +-43727970746F2B2B20352E362E312045434453412074657374206D7367:\ +-A07978494C1B301C1E44467853CD367624549E0E9F5092C0100A53F877AD2EF6:\ +-93935B733CCC6A8702191664346135D1D6320D86A2346DFCA41AEDFBC4260435\ +-A4A9C66485C02BC2DCC858364173FAE00EA02529BA21B56BBBB2EAA4B811416D +- + [ECDSA/EMSA1(SHA-384)] + secp384r1:\ + 100CC52F0263DCB12FDB9E50D44A4C84831A98756265DF0CBFD092D27A739821\ +@@ -4321,54 +4268,6 @@ FF83C10E8D84777D17B724957B83E1500F578F10 + A34F66CA2AF31241FAF85AEE2528438DA6BED934D75ACCF2E41176D8B661AB58\ + B7B867D802C38B39E8227F9CF0865072D381948FFFF637D8FB9B37BEC6AE0772 + +-brainpool384r1:\ +-19AD48ECFB30F115AEF41CAFD29B265A586399C0F95166017AA7DB894413A2AE\ +-821B7BE4F4E7B6BBC22A4E2EB1CC0865:\ +-43727970746F2B2B20352E362E312045434453412074657374206D7367:\ +-83928FD1219F1C6D5B128C0ECD2E39A83399CE609382D41890D43FD476318E0C\ +-26264E98E0D5A0DBCC28A8C01C2D63D7:\ +-4B800A206ED7807C0F15798509164709E94ED73B5E02B10D65F45B6C2B7FD694\ +-37F3B5D1342DAF0988CA100B8875C739\ +-2CFA819E10B76CFE12B2C6485D8326B66E6256CD2F4A6DFEB9B2B7BDD732EA9E\ +-9D5398DDECCBEAAF3FD53D554AA1FADD +- +-[ECDSA/EMSA1(SHA-512)] +- +-secp521r1:\ +-1511908E830069DAD59E8BA8F1BD4045612A4844805F61F7ECD92A1DEE1877B7\ +-E62A57860314820C97FFC972732E3C4C0AE837103692E85B3A11B49EB3E20EF1599:\ +-45434453412F53484128353132292074657374206D6573736167652032303131\ +-30323135:\ +-01C352020AAA6D14B6FC2B78FD46209A9EEF6A357CD8B5D53738E3D655FE7A80\ +-8396E1DC5742058D05F2D76C8CBF4832BE0580A6FD7B4C7426656D17680DEAAEEEC2:\ +-0138A515C79EECAAB50139FB5D9EF5A771CC1C0999F2E54B5A1A9370EA8ADCFD\ +-DDD6E9933A39EDA0862F3ECAEBD49EA5ED58D93DA8F72B1CFB11E52A1528AEC8\ +-63870060D717B29AD6D36DE953A4753FAC58629429EF4DD8F98B5A4F5504C5B2\ +-29C23C609905632CD8D839DC472693698D7A149E8F3F17462F86BA0A7A895D80\ +-583A46E9 +- +-brainpool512r1:\ +-1433AE89858BE7DD9346AF015FEC69F0556982FFEB9CCEF7FB1CE71155F7620C\ +-ED4A6ACD0F35461A17C8370C4E600BECBACC0F7C1D2D1A2C00203A0E6626C21C:\ +-43727970746F2B2B20352E362E312045434453412074657374206D7367:\ +-AA72BC70ABD9E078DDE47F5440E75A93F136F6EAA5267F591E0D3F562DE48BD8\ +-FED21B9E3F6F5560250566A00C7AAE7E57770BFC7D18A3E7750DC6C7083CC5B0:\ +-A058CD406C7F2D87FBBDDDD1870C67D1ACBD222D45A929565101842EDFAEFB89\ +-3CF07AD22CAC0F3350A7D1300741AB5ECE38498F196690CBCEDBF8C866995E5C\ +-17F48EA66EB70ADE68F6C16103BE54DD004230270E1F8CAC2D6BD47F717C0D1B\ +-1E335FA4AAA5212321EE93E55FED129D781912A0D87B78A5B569DA272B3C9469 +- +-brainpool512r1:\ +-83DBEFECAF8CFF78C575BE9659C1A104767979497AD9B589B1B13705C71F1DEF\ +-AF5CA76C8700236CE2392268E0133CAADE358E3D4F2E64CB4AB8517079E3EFA0:\ +-43727970746F2B2B20352E362E312045434453412074657374206D7367:\ +-A110CC7BEF64F5C0349344025B97B151C735408BD2BC0D0CC4E54642EA0DF33E\ +-829E85916086B51624B830BB2CDF53DAD9003A6D194115051139DBC3E81DF197:\ +-3254388208915E0EEB99DA89AA198C6FDB1A31B21D3B69EF8EFE4848AE78C32A\ +-4C489347510A9DD04125BBE95F847E14A2DF3267A0A6D1B5EC442B130C9B5DD1\ +-924FCD9F365897570329BFEC41FBAF42961210F3FF850DE5736FFBAAB09C5C03\ +-E0058BD51C8A8EF0FF221F31CF93FE59572ADA3CFEC7016085258A45D1E8544C +- + # ECC verification format is group name:public key:message:signature + [GOST_3410_VA/EMSA1(GOST-34.11)] + gost_256A:\ +diff -up Botan-1.10.5/src/libstate/policy.cpp.eccfix Botan-1.10.5/src/libstate/policy.cpp +--- Botan-1.10.5/src/libstate/policy.cpp.eccfix 2013-03-02 21:19:37.000000000 +0000 ++++ Botan-1.10.5/src/libstate/policy.cpp 2013-10-22 01:20:13.226546243 +0100 +@@ -210,6 +210,7 @@ void set_default_oids(Library_State& con + + /* ECC domain parameters */ + ++ /* Disabled. + add_oid(config, "1.3.132.0.6", "secp112r1"); + add_oid(config, "1.3.132.0.7", "secp112r2"); + add_oid(config, "1.3.132.0.8", "secp160r1"); +@@ -221,7 +222,9 @@ void set_default_oids(Library_State& con + add_oid(config, "1.3.132.0.31", "secp192k1"); + add_oid(config, "1.3.132.0.32", "secp224k1"); + add_oid(config, "1.3.132.0.33", "secp224r1"); ++ */ + add_oid(config, "1.3.132.0.34", "secp384r1"); ++ /* Disabled. + add_oid(config, "1.3.132.0.35", "secp521r1"); + + add_oid(config, "1.2.840.10045.3.1.1", "secp192r1"); +@@ -230,8 +233,10 @@ void set_default_oids(Library_State& con + add_oid(config, "1.2.840.10045.3.1.4", "x962_p239v1"); + add_oid(config, "1.2.840.10045.3.1.5", "x962_p239v2"); + add_oid(config, "1.2.840.10045.3.1.6", "x962_p239v3"); ++ */ + add_oid(config, "1.2.840.10045.3.1.7", "secp256r1"); + ++ /* Disabled. + add_oid(config, "1.3.36.3.3.2.8.1.1.1", "brainpool160r1"); + add_oid(config, "1.3.36.3.3.2.8.1.1.3", "brainpool192r1"); + add_oid(config, "1.3.36.3.3.2.8.1.1.5", "brainpool224r1"); +@@ -242,6 +247,7 @@ void set_default_oids(Library_State& con + + add_oid(config, "1.2.643.2.2.35.1", "gost_256A"); + add_oid(config, "1.2.643.2.2.36.0", "gost_256A"); ++ */ + + /* CVC */ + add_oid(config, "0.4.0.127.0.7.3.1.2.1", diff --git a/botan.spec b/botan.spec index 1ddb878..9fec23c 100644 --- a/botan.spec +++ b/botan.spec @@ -2,7 +2,7 @@ Name: botan Version: %{major_version}.9 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Crypto library written in C++ Group: System Environment/Libraries @@ -14,6 +14,8 @@ Source0: Botan-%{version}.stripped.tbz Source1: README.fedora Patch0: botan-aarch64.patch Patch1: botan-1.10-add-ppc64le.patch +# Enable only cleared ECC algorithms +Patch2: botan-1.10.5-ecc-fix.patch BuildRequires: gcc-c++ BuildRequires: python @@ -81,7 +83,10 @@ interfaces may change in the future. %setup -q -n Botan-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 -b .eccfix +# These tests will fail. +rm -rf checks/ec_tests.cpp %build # we have the necessary prerequisites, so enable optional modules @@ -178,6 +183,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ./check --validate %changelog +* Fri Feb 6 2015 Thomas Moschny - 1.10.9-4 +- Re-enable cleared ECC. Patch by Tom Callaway . + * Thu Feb 5 2015 Thomas Moschny - 1.10.9-3 - Disable gmp engine (see bug 1116406). - Use _pkgdocdir. diff --git a/repack.sh b/repack.sh index d23452d..3eb65b2 100755 --- a/repack.sh +++ b/repack.sh @@ -13,11 +13,6 @@ ${compr} -cd ${name}${suffix} > ${tmpfile} tar --delete --file=${tmpfile} Botan-${version}/src/block/rc6 tar --delete --file=${tmpfile} Botan-${version}/src/block/rc5 -tar --delete --file=${tmpfile} Botan-${version}/src/math/ec_gfp -tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ecc_key -tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ecdh -tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ecdsa -tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/ec_group tar --delete --file=${tmpfile} Botan-${version}/src/pubkey/gost_3410 ${compr} -c ${tmpfile} > ${name}${newsuffix} diff --git a/sources b/sources index 458bb6a..804aba0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -126ef6f9c7527392ecd5a0337669c8d6 Botan-1.10.9.stripped.tbz +44eb12a2757f51623b17b38fe8b9df2c Botan-1.10.9.stripped.tbz