diff options
-rwxr-xr-x | configure.py | 12 | ||||
-rw-r--r-- | doc/building.tex | 71 | ||||
-rw-r--r-- | doc/log.txt | 4 | ||||
-rw-r--r-- | readme.txt | 2 | ||||
-rw-r--r-- | src/asn1/info.txt | 1 | ||||
-rw-r--r-- | src/benchmark/benchmark.h | 8 | ||||
-rw-r--r-- | src/build-data/buildh.in | 2 | ||||
-rw-r--r-- | src/build-data/cc/ekopath.txt | 3 | ||||
-rw-r--r-- | src/build-data/cc/gcc.txt | 3 | ||||
-rw-r--r-- | src/build-data/cc/hpcc.txt | 3 | ||||
-rw-r--r-- | src/build-data/cc/icc.txt | 3 | ||||
-rw-r--r-- | src/build-data/cc/msvc.txt | 8 | ||||
-rw-r--r-- | src/build-data/cc/open64.txt | 3 | ||||
-rw-r--r-- | src/build-data/cc/pgi.txt | 3 | ||||
-rw-r--r-- | src/build-data/cc/sunwspro.txt | 3 | ||||
-rw-r--r-- | src/build-data/cc/xlc.txt | 3 | ||||
-rw-r--r-- | src/build-data/innosetup.in | 25 | ||||
-rw-r--r-- | src/build-data/makefile/nmake.in | 67 | ||||
-rw-r--r-- | src/build-data/os/windows.txt | 4 | ||||
-rw-r--r-- | src/libstate/scan_name.h | 2 |
20 files changed, 75 insertions, 155 deletions
diff --git a/configure.py b/configure.py index e7e8dbcea..956fdb333 100755 --- a/configure.py +++ b/configure.py @@ -39,7 +39,7 @@ class BuildConfigurationInformation(object): version_minor = 9 version_patch = 3 version_so_patch = 3 - version_suffix = '-dev' + version_suffix = '' version_string = '%d.%d.%d%s' % ( version_major, version_minor, version_patch, version_suffix) @@ -523,7 +523,6 @@ class CompilerInfo(object): 'lang_flags': '', 'warning_flags': '', 'dll_import_flags': '', - 'dll_export_flags': '', 'ar_command': None, 'makefile_style': '' }) @@ -598,7 +597,9 @@ class CompilerInfo(object): def so_link_command_for(self, osname): if osname in self.so_link_flags: return self.so_link_flags[osname] - return self.so_link_flags['default'] + if 'default' in self.so_link_flags: + return self.so_link_flags['default'] + return '' """ Return defines for build.h @@ -807,7 +808,7 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): 'lang_flags': cc.lang_flags + options.extra_flags, 'warn_flags': cc.warning_flags, 'shared_flags': cc.shared_flags, - 'dll_export_flags': cc.dll_export_flags, + 'dll_import_flags': cc.dll_import_flags, 'so_link': cc.so_link_command_for(osinfo.basename), @@ -1076,7 +1077,8 @@ def setup_build(build_config, options, template_vars): for (template, sink) in [('buildh.in', 'build.h'), ('botan-config.in', 'botan-config'), ('botan.pc.in', build_config.pkg_config_file()), - ('botan.doxy.in', 'botan.doxy')]: + ('botan.doxy.in', 'botan.doxy'), + ('innosetup.in', 'botan.iss')]: templates_to_proc[os.path.join(options.build_data, template)] = \ os.path.join(build_config.build_dir, sink) diff --git a/doc/building.tex b/doc/building.tex index f58786e76..5d9b0b171 100644 --- a/doc/building.tex +++ b/doc/building.tex @@ -172,8 +172,6 @@ compiler to look for both include files and library files in place where they will be in the default compiler search paths (consult your documentation and/or local expert for details). -\pagebreak - \subsection{Configuration Parameters} There are some configuration parameters which you may want to tweak @@ -230,22 +228,17 @@ support this there is a flag to \filename{configure.py} called inserted into \filename{build/build.h} which is (indirectly) included into every Botan header and source file. -\pagebreak - \section{Modules} There are a fairly large number of modules included with Botan. Some of these are extremely useful, while others are only necessary in very -unusual circumstances. The modules included with this release are: +unusual circumstances. Most are loaded (or not) automatically as +necessary, but some require external libraries are thus must be +enabled at build time; these include: \newcommand{\mod}[2]{\textbf{#1}: #2} \begin{list}{$\cdot$} - \item \mod{alloc\_mmap}{Allocates memory using memory mappings of temporary - files. This means that if the OS swaps all or part of the application, - the sensitive data will be swapped to where we can later clean it, - rather than somewhere in the swap partition.} - \item \mod{bzip2}{Enables an application to perform bzip2 compression and decompression using the library. Available on any system that has bzip2.} @@ -254,70 +247,14 @@ unusual circumstances. The modules included with this release are: decompression using the library. Available on any system that has zlib.} - %\item \mod{eng\_aep}{An engine that uses any available AEP accelerator card - % to speed up PK operations. You have to have the AEP drivers installed - % for this to link correctly, but you don't have to have a card - % installed - it will automatically be enabled if a card is detected at - % run time.} - \item \mod{gnump}{An engine that uses GNU MP to speed up PK operations. GNU MP 4.1 or later is required.} \item \mod{openssl}{An engine that uses OpenSSL to speed up public key operations and some ciphers/hashes. OpenSSL 0.9.7 or later is required.} - - \item \mod{beos\_stats}{An entropy source that uses BeOS-specific - APIs to gather (hopefully unpredictable) data from the system.} - - \item \mod{cryptoapi\_rng}{An entropy source that uses the Win32 - CryptoAPI function \texttt{CryptGenRandom} to gather - entropy. Supported on NT4, Win95 OSR2, and all later Windows - systems.} - - \item \mod{egd}{An entropy source that accesses EGD (the entropy - gathering daemon). Common on Unix systems that don't have - \texttt{/dev/random}.} - - \item \mod{proc\_walk}{Gather entropy by reading files from a particular file - tree. Usually used with \texttt{/proc}; most other file trees don't - have sufficient variability over time to be useful.} - - \item \mod{unix\_procs}{Gather entropy by running various Unix programs, like - \texttt{arp} and \texttt{vmstat}, and reading their output in the - hopes that at least some of it will be unpredictable to an attacker.} - - \item \mod{win32\_stats}{Gather entropy by walking through various pieces of - information about processes running on the system. Does not run on - NT4, but should run on all other Win32 systems.} - - \item \mod{fd\_unix}{Let the users of \texttt{Pipe} perform I/O with Unix - file descriptors in addition to \texttt{iostream} objects.} - - \item \mod{pthread}{Add support for using \texttt{pthread} mutexes to - lock internal data structures. Important if you are using threads - with the library.} - - \item \mod{qt\_mutex}{Add support for using Qt mutexes to lock internal data - structures.} - - \item \mod{cpu\_counter}{Use the contents of the CPU cycle counter when - generating random bits to further randomize the results. Works on x86 - (Pentium and up), Alpha, and SPARCv9.} - - \item \mod{posix\_rt}{Use the POSIX realtime clock as a high-resolution - timer.} - - \item \mod{gettimeofday}{Use the traditional Unix - \texttt{gettimeofday} as a high resolution timer.} - - \item \mod{win32\_query\_perf\_ctr}{Use Win32's - \texttt{QueryPerformanceCounter} as a high resolution timer.} - \end{list} -\pagebreak - \section{Building Applications} \subsection{Unix} @@ -376,8 +313,6 @@ is less of a problem - only the developer needs to worry about it. As long as they can remember where they installed Botan, they just have to set the appropriate flags in their Makefile/project file. -\pagebreak - \section{Language Wrappers} \subsection{Building the Python wrappers} diff --git a/doc/log.txt b/doc/log.txt index 12a28ab1f..57c1a22a1 100644 --- a/doc/log.txt +++ b/doc/log.txt @@ -1,10 +1,12 @@ -* 1.9.3-dev, ????-??-?? +* 1.9.3, 2009-11-19 - Add new AES implementation using Intel's AES instruction intrinsics - Add an implementation of format preserving encryption - Allow use of any hash function in X.509 certificate creation - Optimizations for MARS, Skipjack, and AES - Set macros for available SIMD instructions in build.h + - Add support for using InnoSetup to package Windows builds + - By default build a DLL on Windows * 1.9.2, 2009-11-03 - Add SIMD version of XTEA diff --git a/readme.txt b/readme.txt index 44f1f471c..4d13f7f1a 100644 --- a/readme.txt +++ b/readme.txt @@ -1,4 +1,4 @@ -Botan 1.9.3-dev, ????-??-?? +Botan 1.9.3, 2009-11-19 Botan is a C++ class library for performing a wide variety of cryptographic operations. diff --git a/src/asn1/info.txt b/src/asn1/info.txt index d836b4c0b..621b8b628 100644 --- a/src/asn1/info.txt +++ b/src/asn1/info.txt @@ -26,4 +26,5 @@ alloc bigint filters oid_lookup +timer </requires> diff --git a/src/benchmark/benchmark.h b/src/benchmark/benchmark.h index a9c3fc01e..cc13ae58d 100644 --- a/src/benchmark/benchmark.h +++ b/src/benchmark/benchmark.h @@ -25,10 +25,10 @@ namespace Botan { * @return results a map from provider to speed in mebibytes per second */ std::map<std::string, double> -algorithm_benchmark(const std::string& name, - u32bit milliseconds, - RandomNumberGenerator& rng, - Algorithm_Factory& af); +BOTAN_DLL algorithm_benchmark(const std::string& name, + u32bit milliseconds, + RandomNumberGenerator& rng, + Algorithm_Factory& af); } diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in index e0d8368ed..37ff06f9d 100644 --- a/src/build-data/buildh.in +++ b/src/build-data/buildh.in @@ -9,7 +9,7 @@ #define BOTAN_VERSION_PATCH %{version_patch} #ifndef BOTAN_DLL - #define BOTAN_DLL %{dll_export_flags} + #define BOTAN_DLL %{dll_import_flags} #endif /* Chunk sizes */ diff --git a/src/build-data/cc/ekopath.txt b/src/build-data/cc/ekopath.txt index bff1ff460..ac514261e 100644 --- a/src/build-data/cc/ekopath.txt +++ b/src/build-data/cc/ekopath.txt @@ -18,9 +18,6 @@ ar_command "pathCC -ar -o" shared_flags "-fPIC" debug_flags -g -dll_import_flags "" -dll_export_flags "" - makefile_style unix <so_link_flags> diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt index be111fafc..c977b9df4 100644 --- a/src/build-data/cc/gcc.txt +++ b/src/build-data/cc/gcc.txt @@ -18,9 +18,6 @@ shared_flags "-fPIC" debug_flags -g no_debug_flags "-finline-functions" -dll_import_flags "" -dll_export_flags "" - makefile_style unix <so_link_flags> diff --git a/src/build-data/cc/hpcc.txt b/src/build-data/cc/hpcc.txt index 614830f9e..4b21a03de 100644 --- a/src/build-data/cc/hpcc.txt +++ b/src/build-data/cc/hpcc.txt @@ -16,9 +16,6 @@ lang_flags "-AA -ext +eh -z" warning_flags "" # +w shared_flags "+Z" -dll_import_flags "" -dll_export_flags "" - makefile_style unix <mach_abi_linking> diff --git a/src/build-data/cc/icc.txt b/src/build-data/cc/icc.txt index 8a546018e..c3a5130bb 100644 --- a/src/build-data/cc/icc.txt +++ b/src/build-data/cc/icc.txt @@ -16,9 +16,6 @@ lang_flags "" warning_flags "-w1" shared_flags "-fPIC" -dll_import_flags "" -dll_export_flags "" - makefile_style unix <mach_opt> diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt index 805093ce5..278aaadf4 100644 --- a/src/build-data/cc/msvc.txt +++ b/src/build-data/cc/msvc.txt @@ -9,6 +9,7 @@ add_lib_dir_option -L add_lib_option "" lib_opt_flags "/O2" +shared_flags "/DBOTAN_DLL=__declspec(dllexport)" check_opt_flags "/O2" debug_flags "/Zi" no_debug_flags "" @@ -16,12 +17,15 @@ lang_flags "/EHsc /GR /D_CONSOLE" warning_flags "" dll_import_flags "__declspec(dllimport)" -dll_export_flags "__declspec(dllexport)" ar_command "lib" makefile_style nmake <so_link_flags> -default -> "link /DLL" +default -> "$(CXX) /LD" </so_link_flags> + +<mach_abi_linking> +all -> "/MD" +</mach_abi_linking> diff --git a/src/build-data/cc/open64.txt b/src/build-data/cc/open64.txt index 275d25f72..34359ef63 100644 --- a/src/build-data/cc/open64.txt +++ b/src/build-data/cc/open64.txt @@ -16,9 +16,6 @@ shared_flags "-fPIC" lang_flags "-ansi -LANG:ansi-for-init-scope=ON" warning_flags "-Wall -W" -dll_import_flags "" -dll_export_flags "" - makefile_style unix <so_link_flags> diff --git a/src/build-data/cc/pgi.txt b/src/build-data/cc/pgi.txt index 99f7bcea5..0e4f8baf2 100644 --- a/src/build-data/cc/pgi.txt +++ b/src/build-data/cc/pgi.txt @@ -12,9 +12,6 @@ lib_opt_flags "-fast -Minline" check_opt_flags "-fast" shared_flags "-fPIC" -dll_import_flags "" -dll_export_flags "" - makefile_style unix <so_link_flags> diff --git a/src/build-data/cc/sunwspro.txt b/src/build-data/cc/sunwspro.txt index ee41ebeca..bd86ade33 100644 --- a/src/build-data/cc/sunwspro.txt +++ b/src/build-data/cc/sunwspro.txt @@ -18,9 +18,6 @@ shared_flags "-KPIC" warning_flags "+w" lang_flags "+p -D__EXTENSIONS__" -dll_import_flags "" -dll_export_flags "" - makefile_style unix <so_link_flags> diff --git a/src/build-data/cc/xlc.txt b/src/build-data/cc/xlc.txt index e9ae41c1a..87b32746b 100644 --- a/src/build-data/cc/xlc.txt +++ b/src/build-data/cc/xlc.txt @@ -14,9 +14,6 @@ lang_flags "" debug_flags -g no_debug_flags "" -dll_import_flags "" -dll_export_flags "" - makefile_style unix <mach_opt> diff --git a/src/build-data/innosetup.in b/src/build-data/innosetup.in new file mode 100644 index 000000000..ffe780979 --- /dev/null +++ b/src/build-data/innosetup.in @@ -0,0 +1,25 @@ +; A script for packaging botan with InnoSetup + +[Setup] +AppName=Botan +AppVerName=Botan %{version} + +AppPublisher=Jack Lloyd +AppCopyright=Copyright (C) 1999-2009 Jack Lloyd and others +AppPublisherURL=http://botan.randombit.net/ +AppVersion=%{version} + +DefaultDirName={pf}\botan +DefaultGroupName=botan + +SolidCompression=yes + +OutputDir=. +OutputBaseFilename=botan-%{version} + +[Files] +Source: "..\botan.dll"; DestDir: "{app}" +Source: "..\botan.dll.manifest"; DestDir: "{app}" +Source: "..\botan.exp"; DestDir: "{app}" +Source: "..\botan.lib"; DestDir: "{app}" +Source: "include\botan\*"; DestDir: "{app}\include\botan" diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in index 34c864e93..2604a3459 100644 --- a/src/build-data/makefile/nmake.in +++ b/src/build-data/makefile/nmake.in @@ -1,31 +1,25 @@ -################################################## -# Compiler Options # -################################################## +### Compiler Options CXX = %{cc} LIB_OPT = %{lib_opt} CHECK_OPT = %{check_opt} MACH_OPT = %{mach_opt} LANG_FLAGS = %{lang_flags} WARN_FLAGS = %{warn_flags} +SO_OBJ_FLAGS = %{shared_flags} +SO_LINK_CMD = %{so_link} LINK_TO = %{link_to} -################################################## -# Version Numbers # -################################################## +### Version Numbers VERSION = %{version} -################################################## -# Installation Settings # -################################################## +### Installation Settings DESTDIR = %{prefix} LIBDIR = $(DESTDIR)\%{libdir} HEADERDIR = $(DESTDIR)\%{includedir}\botan DOCDIR = $(DESTDIR)\%{docdir}\Botan-$(VERSION) -################################################## -# Aliases for Common Programs # -################################################## +### Aliases for Common Programs AR = %{ar_command} CD = @cd ECHO = @echo @@ -34,11 +28,10 @@ INSTALL_CMD = %{install_cmd_exec} MKDIR = @md MKDIR_INSTALL = @md RM = @del /Q +RM_R = $(RM) /S RMDIR = @rmdir -################################################## -# File Lists # -################################################## +### File Lists CHECK = check DOCS = %{doc_files} @@ -49,59 +42,41 @@ LIBOBJS = %{lib_objs} CHECKOBJS = %{check_objs} -LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS) +LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS) $(SO_OBJ_FLAGS) CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS) -LIBRARIES = $(STATIC_LIB) +LIBRARIES = $(DLL) -LIBNAME = libbotan +LIBNAME = botan +DLL = $(LIBNAME).%{so_suffix} STATIC_LIB = $(LIBNAME).%{static_suffix} all: $(LIBRARIES) -################################################## -# Build Commands # -################################################## +### Build Commands %{lib_build_cmds} %{check_build_cmds} -################################################## -# Link Commands # -################################################## - -# Link for Borland? -#ilink32 -L$(BCB)\lib -w -c -x -Gn -ap -Tpe c0x32.obj \ -# $(CHECKOBJS),check.exe,,$(LINK_TO) $(STATIC_LIB) - +### Link Commands $(CHECK): $(LIBRARIES) $(CHECKOBJS) - link /OUT:[email protected] $(CHECKOBJS) $(STATIC_LIB) $(LINK_TO) - -$(STATIC_LIB): $(LIBOBJS) - $(AR) /OUT:$@ /NAME:BOTAN-$(VERSION) $(LIBOBJS) + $(CXX) /Fe$@ $(CHECKOBJS) $(STATIC_LIB) $(LINK_TO) -################################################## -# Misc Targets # -################################################## -static: $(STATIC_LIB) +$(DLL): $(LIBOBJS) + $(SO_LINK_CMD) /Febotan $(LIBOBJS) $(LINK_TO) -################################################## -# Fake Targets # -################################################## +### Fake Targets clean: $(RM) %{build_dir}\lib\* %{build_dir}\checks\* $(RM) $(LIBRARIES) $(CHECK) distclean: clean - $(RM) %{build_dir}\build.h - $(RM) %{build_dir}\include\botan\* + $(RM_R) %{build_dir} $(RMDIR) %{build_dir}\include\botan %{build_dir}\include $(RMDIR) %{build_dir}\lib %{build_dir}\checks $(RMDIR) %{build_dir} - $(RM) Makefile + $(RM) Makefile $(LIBNAME).* $(CHECK).* -################################################## -# Install Commands # -################################################## +### Install Commands install: $(LIBRARIES) $(ECHO) "Install command not implemented" diff --git a/src/build-data/os/windows.txt b/src/build-data/os/windows.txt index e2e8bb665..e72931c98 100644 --- a/src/build-data/os/windows.txt +++ b/src/build-data/os/windows.txt @@ -4,7 +4,7 @@ obj_suffix obj so_suffix dll static_suffix lib -install_root c:\Botan +install_root c:\\Botan doc_dir docs install_cmd_data "copy" @@ -15,7 +15,7 @@ win32_virtual_lock </target_features> <supports_shared> -msvc +all </supports_shared> <aliases> diff --git a/src/libstate/scan_name.h b/src/libstate/scan_name.h index ced5f3e15..7992d7498 100644 --- a/src/libstate/scan_name.h +++ b/src/libstate/scan_name.h @@ -19,7 +19,7 @@ namespace Botan { A class encapsulating a SCAN name (similar to JCE conventions) http://www.users.zetnet.co.uk/hopwood/crypto/scan/ */ -class SCAN_Name +class BOTAN_DLL SCAN_Name { public: /** |