SHA256
1
0
forked from pool/Botan

- Devel package now is versioned so multiple devel packages may

be installed in parallel.
- Devel package renamed back to Botan-devel to keep rpmlint from
  thinking it is a library package ...

- Update to 1.10.0:
  New Features:
  * SSL (SSLv3, TLS 1.0, and TLS 1.1 are currently supported)
  * GOST 34.10-2001 signature scheme (a Russian ECC signature standard
    analogous to ECDSA)
  * The SHA-3 candidates Keccak and Blue Midnight Wish
  * Bcrypt password hashing
  * XSalsa20
  * AES key wrapping
  * Comb4P hash combinator.
  Other Changes:
  * The block cipher interface now exposes any possible parallelism
    available to the implementation, and XTS, CTR, and CBC modes have been
    changed to use them.
  * SIMD implementations of Serpent, XTEA, Noekeon, and IDEA have been
    added, as has an implementation of AES using SSSE3 which runs both in
    constant time and, on recent processors, significantly faster than the
    usual table based implementation.  There have also been numerous
    optimizations to elliptic curves.
  * The documentation, previously written in LaTeX, is now in
    reStructuredText, which is converted into HTML with Sphinx.  This new
    format is significantly easier to write, encouraging more documentation
    to be written and updated.  And, indeed, a number of features never
    before documented are now described in the manual.

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/Botan?expand=0&rev=18
This commit is contained in:
Philipp Thomas 2011-06-22 14:07:02 +00:00 committed by Git OBS Bridge
parent b06576eceb
commit 9cac7e1d7b
10 changed files with 226 additions and 97 deletions

3
Botan-1.10.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:65669a2ba74e07e1fa9ec5435c4785a5d901e4b5ca504701e9ec561513448aeb
size 2188918

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:73c8731368140a951ae03899d651dc1b9b94e27c1125e41cdf3c32d6881ec4eb
size 2557313

View File

@ -1,26 +1,44 @@
Index: src/build-data/makefile/unix.in Index: src/build-data/makefile/unix.in
=================================================================== ===================================================================
--- src/build-data/makefile/unix.in.orig 2009-11-03 19:02:17.000000000 +0100 --- src/build-data/makefile/unix.in.orig 2011-06-21 17:33:59.550471797 +0200
+++ src/build-data/makefile/unix.in 2009-12-11 19:10:50.687527483 +0100 +++ src/build-data/makefile/unix.in 2011-06-21 17:35:52.643901474 +0200
@@ -19,7 +19,7 @@ VERSION = %{version} @@ -12,12 +12,12 @@ VERSION = %{version}
################################################## SERIES = %{version_major}.%{version_minor}
DESTDIR = %{prefix}
# Installation Settings
-DESTDIR = %{prefix}
+DESTDIR =
-BINDIR = $(DESTDIR)/bin -BINDIR = $(DESTDIR)/bin
+BINDIR = $(DESTDIR)/%{prefix}/bin -LIBDIR = $(DESTDIR)/%{libdir}
LIBDIR = $(DESTDIR)/%{libdir} -HEADERDIR = $(DESTDIR)/%{includedir}/botan-$(SERIES)/botan
HEADERDIR = $(DESTDIR)/%{includedir}/botan -DOCDIR = $(DESTDIR)/%{docdir}/botan-$(VERSION)
DOCDIR = $(DESTDIR)/%{docdir}/Botan-$(VERSION) +BINDIR = $(DESTDIR)%{prefix}/bin
+LIBDIR = $(DESTDIR)%{libdir}
+HEADERDIR = $(DESTDIR)%{includedir}/botan-$(SERIES)/botan
+DOCDIR = $(DESTDIR)%{docdir}/Botan-$(VERSION)
PKGCONF_DIR = $(LIBDIR)/pkgconfig
CONFIG_SCRIPT = %{botan_config}
Index: src/build-data/makefile/unix_shr.in Index: src/build-data/makefile/unix_shr.in
=================================================================== ===================================================================
--- src/build-data/makefile/unix_shr.in.orig 2009-11-03 19:02:17.000000000 +0100 --- src/build-data/makefile/unix_shr.in.orig 2011-06-21 17:33:59.550471797 +0200
+++ src/build-data/makefile/unix_shr.in 2009-12-11 19:10:40.239524087 +0100 +++ src/build-data/makefile/unix_shr.in 2011-06-21 17:35:50.812926900 +0200
@@ -22,7 +22,7 @@ SO_VERSION = %{so_version} @@ -14,12 +14,12 @@ VERSION = %{version}
################################################## SERIES = %{version_major}.%{version_minor}
DESTDIR = %{prefix}
# Installation Settings
-DESTDIR = %{prefix}
+DESTDIR =
-BINDIR = $(DESTDIR)/bin -BINDIR = $(DESTDIR)/bin
+BINDIR = $(DESTDIR)/%{prefix}/bin -LIBDIR = $(DESTDIR)/%{libdir}
LIBDIR = $(DESTDIR)/%{libdir} -HEADERDIR = $(DESTDIR)/%{includedir}/botan-$(SERIES)/botan
HEADERDIR = $(DESTDIR)/%{includedir}/botan -DOCDIR = $(DESTDIR)/%{docdir}/botan-$(VERSION)
DOCDIR = $(DESTDIR)/%{docdir}/Botan-$(VERSION) +BINDIR = $(DESTDIR)%{prefix}/bin
+LIBDIR = $(DESTDIR)%{libdir}
+HEADERDIR = $(DESTDIR)%{includedir}/botan-$(SERIES)/botan
+DOCDIR = $(DESTDIR)%{docdir}/Botan-$(VERSION)
PKGCONF_DIR = $(LIBDIR)/pkgconfig
CONFIG_SCRIPT = %{botan_config}

12
Botan-fix_pkgconfig.patch Normal file
View File

@ -0,0 +1,12 @@
Index: src/build-data/botan.pc.in
===================================================================
--- src/build-data/botan.pc.in.orig 2011-06-20 15:52:09.000000000 +0200
+++ src/build-data/botan.pc.in 2011-06-21 18:17:45.434985232 +0200
@@ -1,6 +1,6 @@
prefix=%{prefix}
exec_prefix=${prefix}
-libdir=${prefix}/%{libdir}
+libdir=${prefix}%{libdir}
includedir=${prefix}/include/botan-%{version_major}.%{version_minor}
Name: Botan

View File

@ -1,27 +1,46 @@
Index: src/utils/types.h Index: src/utils/types.h
=================================================================== ===================================================================
--- src/utils/types.h.orig 2009-11-03 19:02:17.000000000 +0100 --- src/utils/types.h.orig 2011-06-20 15:52:09.000000000 +0200
+++ src/utils/types.h 2009-11-23 18:18:51.924780607 +0100 +++ src/utils/types.h 2011-06-21 16:48:39.324325773 +0200
@@ -9,21 +9,22 @@ @@ -9,8 +9,8 @@
#define BOTAN_TYPES_H__ #define BOTAN_TYPES_H__
#include <botan/build.h> #include <botan/build.h>
-#include <stddef.h>
-
+#include <cstddef>
+#include <stdint.h> +#include <stdint.h>
/**
namespace Botan { * The primary namespace for the botan library
*/
@@ -19,22 +19,22 @@ namespace Botan {
/**
* Typedef representing an unsigned 8-bit quantity
*/
-typedef unsigned char byte; -typedef unsigned char byte;
-typedef unsigned short u16bit;
-typedef unsigned int u32bit;
+typedef uint8_t byte; +typedef uint8_t byte;
/**
* Typedef representing an unsigned 16-bit quantity
*/
-typedef unsigned short u16bit;
+typedef uint16_t u16bit; +typedef uint16_t u16bit;
/**
* Typedef representing an unsigned 32-bit quantity
*/
-typedef unsigned int u32bit;
+typedef uint32_t u32bit; +typedef uint32_t u32bit;
/**
* Typedef representing a signed 32-bit quantity
*/
-typedef signed int s32bit; -typedef signed int s32bit;
+typedef int32_t s32bit; +typedef int32_t s32bit;
#if defined(_MSC_VER) || defined(__BORLANDC__) /**
typedef unsigned __int64 u64bit; * Typedef representing an unsigned 64-bit quantity
@@ -44,7 +44,7 @@ typedef signed int s32bit;
#elif defined(__KCC) #elif defined(__KCC)
typedef unsigned __long_long u64bit; typedef unsigned __long_long u64bit;
#elif defined(__GNUG__) #elif defined(__GNUG__)

15
Botan-no-buildtime.patch Normal file
View File

@ -0,0 +1,15 @@
Index: src/build-data/buildh.in
===================================================================
--- src/build-data/buildh.in.orig 2011-06-20 15:52:09.000000000 +0200
+++ src/build-data/buildh.in 2011-06-21 14:54:51.287402063 +0200
@@ -3,8 +3,8 @@
#define BOTAN_BUILD_CONFIG_H__
/*
-* This file was automatically generated %{timestamp} UTC by
-* %{user}@%{hostname} running '%{command_line}'
+* This file was automatically generated by
+* %{user} running '%{command_line}'
*
* Target
* - Compiler: %{cc} %{lib_opt} %{mach_opt}

View File

@ -0,0 +1,24 @@
Index: src/mutex/qt_mutex/mux_qt.cpp
===================================================================
--- src/mutex/qt_mutex/mux_qt.cpp.orig 2011-06-20 15:52:09.000000000 +0200
+++ src/mutex/qt_mutex/mux_qt.cpp 2011-06-21 14:56:14.738269417 +0200
@@ -9,7 +9,7 @@
#include <botan/internal/mux_qt.h>
#include <qmutex.h>
-#if !defined(QT_THREAD_SUPPORT)
+#if !(defined(QT_THREAD_SUPPORT) || !defined(QT_NO_THREAD))
#error Your version of Qt does not support threads or mutexes
#endif
Index: src/mutex/qt_mutex/info.txt
===================================================================
--- src/mutex/qt_mutex/info.txt.orig 2011-06-20 15:52:09.000000000 +0200
+++ src/mutex/qt_mutex/info.txt 2011-06-21 14:55:17.957040061 +0200
@@ -13,5 +13,5 @@ mux_qt.h
# I think we want to always use qt-mt, not qt -- not much point in supporting
# mutexes in a single threaded application, after all.
<libs>
-all -> qt-mt
+all -> QtCore
</libs>

View File

@ -1,3 +1,78 @@
-------------------------------------------------------------------
Tue Jun 21 16:53:15 CEST 2011 - pth@suse.de
- Devel package now is versioned so multiple devel packages may
be installed in parallel.
- Devel package renamed back to Botan-devel to keep rpmlint from
thinking it is a library package ...
- Update to 1.10.0:
New Features:
* SSL (SSLv3, TLS 1.0, and TLS 1.1 are currently supported)
* GOST 34.10-2001 signature scheme (a Russian ECC signature standard
analogous to ECDSA)
* The SHA-3 candidates Keccak and Blue Midnight Wish
* Bcrypt password hashing
* XSalsa20
* AES key wrapping
* Comb4P hash combinator.
Other Changes:
* The block cipher interface now exposes any possible parallelism
available to the implementation, and XTS, CTR, and CBC modes have been
changed to use them.
* SIMD implementations of Serpent, XTEA, Noekeon, and IDEA have been
added, as has an implementation of AES using SSSE3 which runs both in
constant time and, on recent processors, significantly faster than the
usual table based implementation. There have also been numerous
optimizations to elliptic curves.
* The documentation, previously written in LaTeX, is now in
reStructuredText, which is converted into HTML with Sphinx. This new
format is significantly easier to write, encouraging more documentation
to be written and updated. And, indeed, a number of features never
before documented are now described in the manual.
-------------------------------------------------------------------
Wed Sep 1 16:38:40 CEST 2010 - pth@suse.de
- Prefix last patch with Botan-.
- Enable building of the qt_mutex module. This means that from now
on libbotan requires libQtCore.
- Fix test for thread/mutex support to also work for Qt4.
- Update to 1.8.10:
* This release changes a number of aspects of how private keys are
encrypted. The default encryption algorithm has changed from 3DES
to AES-256
* The default iteration count for PBES1 and PBES2 encryption schemes
(which are used primarily to encrypt asymmetric keys like RSA or
DSA) has increased from 2048 to 10000, which should make brute
force key cracking substantially harder.
* The first round of AES now uses a smaller set of lookup tables;
this only reduces performance slightly but some timing and cache
analysis attacks against AES are substantially harder when AES is
implemented this way.
* The class known as S2K was renamed PBKDF in 1.9, with a typedef
for backwards compatibility. For providing an equivalent forward
compatibility path, 1.8.10 includes a typedef for PBKDF and a new
accessor function get_pbkdf. It also includes a new interface for
deriving keys with a passphrase which takes both the passphrase
and desired output length as well as the salt and iteration
count; in many cases this call is actually significantly more
convenient than the older API.
-------------------------------------------------------------------
Tue Aug 31 09:22:59 UTC 2010 - aj@suse.de
- Do not include build time and host in package to not trigger rebuilds.
- Add pkg-config build requires as suggested by rpmlint.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Mar 10 01:01:48 CET 2010 - ro@suse.de Wed Mar 10 01:01:48 CET 2010 - ro@suse.de

View File

@ -1,5 +1,5 @@
# #
# spec file for package Botan (Version 1.8.8) # spec file for package Botan (Version 1.8.10)
# #
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
@ -17,26 +17,30 @@
# norootforbuild # norootforbuild
%define version_suffix 1_8_2 %define version_suffix 1_10-0
%define short_version 1.10
Name: Botan Name: Botan
Version: 1.8.8 Version: 1.10.0
Release: 5 Release: 1
Url: http://botan.randombit.net Url: http://botan.randombit.net
Summary: A C++ Crypto Library Summary: A C++ Crypto Library
License: BSD3c License: BSD3c
AutoReqProv: on AutoReqProv: on
Prefix: /usr Prefix: /usr
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Source: %{name}-%{version}.tar.bz2 Source: Botan-1.10.0.tar.bz2
Patch0: Botan-inttypes.patch Patch0: Botan-inttypes.patch
Patch1: Botan-ull_constants.patch.bz2 Patch1: Botan-ull_constants.patch.bz2
Patch2: Botan-fix_install_paths.patch Patch2: Botan-fix_install_paths.patch
Patch3: botan-1.8.8-binutils_lea_offset.patch Patch4: Botan-no-buildtime.patch
Patch5: Botan-qt_thread_support.patch
Patch6: Botan-fix_pkgconfig.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: zlib, bzip2 >= 1.0.2, gmp >= 4.1 Requires: zlib, bzip2 >= 1.0.2, gmp >= 4.1
BuildRequires: bzip2 >= 1.0.2 gmp-devel >= 4.1 zlib-devel BuildRequires: bzip2 >= 1.0.2 gmp-devel >= 4.1 zlib-devel
BuildRequires: gcc-c++ gmp-devel libbz2-devel openssl-devel python BuildRequires: gcc-c++ gmp-devel libbz2-devel openssl-devel python
BuildRequires: libqt4-devel pkg-config
%description %description
Botan is a C++ library that provides support for many common Botan is a C++ library that provides support for many common
@ -50,7 +54,8 @@ Authors:
-------- --------
Jack Lloyd <lloyd@randombit.net> Jack Lloyd <lloyd@randombit.net>
%package -n libbotan-1_8_2 %package -n libbotan-%{version_suffix}
License: BSD3c License: BSD3c
Summary: A C++ Crypto Library Summary: A C++ Crypto Library
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
@ -67,18 +72,19 @@ Authors:
-------- --------
Jack Lloyd <lloyd@randombit.net> Jack Lloyd <lloyd@randombit.net>
%package -n libbotan-devel %package %{short_version}-devel
License: BSD3c License: BSD3c
Summary: Development files for Botan Summary: Development files for Botan
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: libbotan-1_8_2 = %{version} Requires: libbotan-1_8_2 = %{version}
Requires: gmp-devel libbz2-devel Requires: gmp-devel libbz2-devel
Provides: Botan-devel = %{version} Provides: Botan-devel = %{version}, libbotan-devel = %{version}
Obsoletes: Botan-devel < %{version} Obsoletes: Botan-devel < %{version}, libbotan-devel < %{version}
Requires: libbotan-%{version_suffix} = %{version} Requires: libbotan-%{version_suffix} = %{version}
%define botan_docdir %{_defaultdocdir}/%{name}
%description -n libbotan-devel %define botan_docdir %{_datadir}/doc/packages/%{name}-%{version}
%description %{short_version}-devel
This package contains the header files and libraries needed to develop This package contains the header files and libraries needed to develop
programs that use the Botan library. programs that use the Botan library.
@ -93,28 +99,28 @@ Authors:
%patch0 %patch0
%patch1 %patch1
%patch2 %patch2
%patch3 %patch4
%patch5
%patch6
%build %build
export RPM_OPT_FLAGS export RPM_OPT_FLAGS
%define common_config_flags --libdir=%{_lib} --with-bzip2 --with-zlib --with-gnump --with-openssl %define common_config_flags --libdir=%{_lib} --with-bzip2 --with-zlib --with-gnump --with-openssl
./configure.py --prefix=/usr --libdir=%{_libdir} \ ./configure.py --prefix=/usr --libdir=%{_libdir} \
--docdir=%{_defaultdocdir}/%{name} \ --docdir=%{_defaultdocdir} \
--includedir=%{_includedir} \ --includedir=%{_includedir} \
--with-bzip2 \ --with-bzip2 \
--with-zlib \ --with-zlib \
--with-gnump \ --with-gnump \
--with-openssl \ --with-openssl \
--enable-modules=qt_mutex \
--with-tr1-implementation=system \ --with-tr1-implementation=system \
--cpu=%_target_cpu --cpu=%_target_cpu
make %{?_smp_mflags} WARN_FLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags} WARN_FLAGS="$RPM_OPT_FLAGS -I/usr/include/Qt"
%install %install
%makeinstall %makeinstall
mv %{buildroot}/%{botan_docdir}/%{name}-%{version}/* %{buildroot}/%{botan_docdir}/ rm -f %{buildroot}/%{_libdir}/libbotan*.a
rm -rf %{buildroot}/usr/share/doc/Botan-%{version}
rm -f %{buildroot}/%{botan_docdir}/fips140.tex
rm -f %{buildroot}/%{_libdir}/libbotan.a
%post -n libbotan-%{version_suffix} -p /sbin/ldconfig %post -n libbotan-%{version_suffix} -p /sbin/ldconfig
@ -123,26 +129,14 @@ rm -f %{buildroot}/%{_libdir}/libbotan.a
%files -n libbotan-%{version_suffix} %files -n libbotan-%{version_suffix}
%defattr(-,root,root) %defattr(-,root,root)
%docdir %{botan_docdir} %docdir %{botan_docdir}
%{botan_docdir}/license.txt %{botan_docdir}/*
%{botan_docdir}/readme.txt %{_libdir}/libbotan-%{short_version}.so.*
%{botan_docdir}/log.txt
%{botan_docdir}/thanks.txt
%{botan_docdir}/credits.txt
%{botan_docdir}/pgpkeys.asc
#%{botan_docdir}/info.txt
%{_libdir}/libbotan-*.so
%files -n libbotan-devel %files %{short_version}-devel
%defattr(-,root,root) %defattr(-,root,root)
%docdir %{botan_docdir} %{_libdir}/libbotan-%{short_version}.so
%dir %{botan_docdir} %{_libdir}/pkgconfig/botan-%{short_version}.pc
%{botan_docdir}/api.pdf %{_includedir}/botan-%{short_version}
%{botan_docdir}/api.tex %{_bindir}/botan-config-%{short_version}
%{botan_docdir}/tutorial.pdf
%{botan_docdir}/tutorial.tex
%{_libdir}/libbotan.so
%{_libdir}/pkgconfig/botan-1.8.pc
%{_includedir}/botan/
%{_bindir}/botan-config
%changelog %changelog

View File

@ -1,28 +0,0 @@
#
#
# patch "src/hash/sha1_amd64/sha1_amd64_imp.S"
# from [dd263db10309950dec501dd9257a8df43cf6c6aa]
# to [ab1db7a394b41a1d3b9a63a6e8e1571e4671b962]
#
================================================================================
--- src/hash/sha1_amd64/sha1_amd64_imp.S
+++ src/hash/sha1_amd64/sha1_amd64_imp.S
@@ -103,10 +103,16 @@
subq $320, W
+/*
+* Using negative values for SHA-1 constants > 2^31 to work around
+* a bug in binutils not accepting large lea displacements.
+* -0x70E44324 == 0x8F1BBCDC
+* -0x359D3E2A == 0xCA62C1D6
+*/
#define MAGIC1 0x5A827999
#define MAGIC2 0x6ED9EBA1
-#define MAGIC3 0x8F1BBCDC
-#define MAGIC4 0xCA62C1D6
+#define MAGIC3 -0x70E44324
+#define MAGIC4 -0x359D3E2A
#define T %esi
#define T2 %eax