Botan/Botan.spec

143 lines
4.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package Botan
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Accepting request 621856 from home:dmolkentin:branches:devel:libraries:c_c++ - Update to Botan 2.7 * CVE-2018-12435 Avoid a side channel in ECDSA signature generation (GH #1604) * Avoid a side channel in RSA key generation due to use of a non-constant time gcd algorithm. (GH #1542 #1556) * Optimize prime generation, especially improving RSA key generation. (GH #1542) * Make Karatsuba multiplication, Montgomery field operations, Barrett reduction and Montgomery exponentiation const time (GH #1540 #1606 #1609 #1610) * Optimizations for elliptic curve operations especially improving reductions and inversions modulo NIST primes (GH #1534 #1538 #1545 #1546 #1547 #1550) * Add 24 word wide Comba multiplication, improving 3072-bit RSA and DH by ~25%. (GH #1564) * Unroll Montgomery reduction for specific sizes (GH #1603) * Improved performance of signature verification in ECGDSA, ECKCDSA, SM2 and GOST by 10-15%. * XMSS optimizations (GH #1583 #1585) * Fix an error that meant XMSS would only sign half as many signatures as is allowed (GH #1582) * Add support for base32 encoding/decoding (GH #1541) * Add BMI2 optimized version of SHA-256, 40% faster on Skylake (GH #1584) * Allow the year to be up to 2200 in ASN.1 time objects. Previously this was limited to 2100. (GH #1536) * Add support for Scrypt password hashing (GH #1570) * Add support for using Scrypt for private key encryption (GH #1574) * Optimizations for DES/3DES, approx 50% faster when used in certain modes such as CBC decrypt or CTR. * XMSS signature verification did not check that the signature was of the expected length which could lead to a crash. (GH #1537) OBS-URL: https://build.opensuse.org/request/show/621856 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/Botan?expand=0&rev=86
2018-07-10 11:45:11 +02:00
%define version_suffix 2-7
%define short_version 2
Name: Botan
Accepting request 621856 from home:dmolkentin:branches:devel:libraries:c_c++ - Update to Botan 2.7 * CVE-2018-12435 Avoid a side channel in ECDSA signature generation (GH #1604) * Avoid a side channel in RSA key generation due to use of a non-constant time gcd algorithm. (GH #1542 #1556) * Optimize prime generation, especially improving RSA key generation. (GH #1542) * Make Karatsuba multiplication, Montgomery field operations, Barrett reduction and Montgomery exponentiation const time (GH #1540 #1606 #1609 #1610) * Optimizations for elliptic curve operations especially improving reductions and inversions modulo NIST primes (GH #1534 #1538 #1545 #1546 #1547 #1550) * Add 24 word wide Comba multiplication, improving 3072-bit RSA and DH by ~25%. (GH #1564) * Unroll Montgomery reduction for specific sizes (GH #1603) * Improved performance of signature verification in ECGDSA, ECKCDSA, SM2 and GOST by 10-15%. * XMSS optimizations (GH #1583 #1585) * Fix an error that meant XMSS would only sign half as many signatures as is allowed (GH #1582) * Add support for base32 encoding/decoding (GH #1541) * Add BMI2 optimized version of SHA-256, 40% faster on Skylake (GH #1584) * Allow the year to be up to 2200 in ASN.1 time objects. Previously this was limited to 2100. (GH #1536) * Add support for Scrypt password hashing (GH #1570) * Add support for using Scrypt for private key encryption (GH #1574) * Optimizations for DES/3DES, approx 50% faster when used in certain modes such as CBC decrypt or CTR. * XMSS signature verification did not check that the signature was of the expected length which could lead to a crash. (GH #1537) OBS-URL: https://build.opensuse.org/request/show/621856 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/Botan?expand=0&rev=86
2018-07-10 11:45:11 +02:00
Version: 2.7.0
Release: 0
Summary: A C++ Crypto Library
License: BSD-2-Clause
Group: Development/Libraries/C and C++
Url: http://botan.randombit.net
Source0: http://botan.randombit.net/releases/Botan-%{version}.tgz
Source1: http://botan.randombit.net/releases/Botan-%{version}.tgz.asc
Source2: %{name}.keyring
Source3: baselibs.conf
BuildRequires: bzip2 >= 1.0.2
BuildRequires: gcc-c++
# FIXME: is this dependency correct?
BuildRequires: gmp-devel >= 4.1
#Requires: gmp >= 4.1
BuildRequires: libbz2-devel
BuildRequires: openssl-devel
BuildRequires: pkgconfig
BuildRequires: python3
BuildRequires: zlib-devel
%description
Botan is a C++ library that provides support for many common
cryptographic operations, including encryption, authentication, and
X.509v3 certificates and CRLs. A wide variety of algorithms is
supported, including RSA, DSA, DES, AES, MD5, and SHA-1.
%package -n libbotan-%{version_suffix}
Summary: A C++ Crypto Library
Group: System/Libraries
%description -n libbotan-%{version_suffix}
Botan is a C++ library that provides support for many common
cryptographic operations, including encryption, authentication, and
X.509v3 certificates and CRLs. A wide variety of algorithms is
supported, including RSA, DSA, DES, AES, MD5, and SHA-1.
%package -n libbotan-devel
Summary: Development files for Botan
Group: Development/Libraries/C and C++
Requires: libbotan-%{version_suffix} = %{version}
Requires: libbz2-devel
Provides: Botan-devel = %{version}
Obsoletes: Botan-devel < %{version}
%description -n libbotan-devel
This package contains the header files and libraries needed to develop
programs that use the Botan library.
%package -n python3-botan
Summary: Botan python bindings
Group: Development/Languages/Python
Requires: python3
%description -n python3-botan
This package contains the python bindings to libbotan's C98 interface.
%package doc
%define botan_docdir %{_docdir}/botan-%{version}
Summary: Documentation of Botan
Group: Development/Libraries/C and C++
BuildArch: noarch
%description doc
Documentation of Botan package.
%prep
%setup -q -n Botan-%{version}
%build
export RPM_OPT_FLAGS
python3 ./configure.py \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--libdir=%{_libdir} \
--docdir=%{_defaultdocdir} \
--includedir=%{_includedir} \
--with-bzip2 \
--with-zlib \
--with-openssl \
%ifarch %ix86
--cpu=x86_32
%else
%ifarch %{arm}
--cpu=arm
%else
--cpu=%{_target_cpu}
%endif
%endif
make %{?_smp_mflags} WARN_FLAGS="%{optflags}"
%install
sed -i 's/env python/env python3/' src/scripts/install.py
%make_install
rm -f %{buildroot}/%{_libdir}/libbotan*.a
chmod +x %{buildroot}%{python3_sitearch}/botan2.py
sed -i '1s@^#!/.*@#!%{_bindir}/python3@' %{buildroot}%{python3_sitearch}/botan2.py
%post -n libbotan-%{version_suffix} -p /sbin/ldconfig
%postun -n libbotan-%{version_suffix} -p /sbin/ldconfig
%files
%{_bindir}/botan
%files doc
%docdir %{botan_docdir}
%{botan_docdir}
%files -n libbotan-%{version_suffix}
%{_libdir}/libbotan-%{short_version}.so.*
%files -n libbotan-devel
%{_libdir}/libbotan-%{short_version}.so
%{_libdir}/pkgconfig/botan-%{short_version}.pc
%{_includedir}/botan-%{short_version}
%files -n python3-botan
%{python3_sitearch}/botan2.py
%changelog