diff options
Diffstat (limited to 'src')
159 files changed, 411 insertions, 313 deletions
diff --git a/src/algo_factory/algo_cache.h b/src/algo_factory/algo_cache.h index 08b25cd47..c9fbf5b26 100644 --- a/src/algo_factory/algo_cache.h +++ b/src/algo_factory/algo_cache.h @@ -8,8 +8,8 @@ #ifndef BOTAN_ALGORITHM_CACHE_TEMPLATE_H__ #define BOTAN_ALGORITHM_CACHE_TEMPLATE_H__ -#include <botan/mutex.h> -#include <botan/stl_util.h> +#include <botan/internal/mutex.h> +#include <botan/internal/stl_util.h> #include <string> #include <vector> #include <map> diff --git a/src/algo_factory/algo_factory.cpp b/src/algo_factory/algo_factory.cpp index f1c2ae3a0..38c6387e5 100644 --- a/src/algo_factory/algo_factory.cpp +++ b/src/algo_factory/algo_factory.cpp @@ -7,7 +7,7 @@ #include <botan/algo_factory.h> #include <botan/internal/algo_cache.h> -#include <botan/stl_util.h> +#include <botan/internal/stl_util.h> #include <botan/engine.h> #include <botan/exceptn.h> diff --git a/src/algo_factory/algo_factory.h b/src/algo_factory/algo_factory.h index 73e592013..ac985b72b 100644 --- a/src/algo_factory/algo_factory.h +++ b/src/algo_factory/algo_factory.h @@ -8,7 +8,7 @@ #ifndef BOTAN_ALGORITHM_FACTORY_H__ #define BOTAN_ALGORITHM_FACTORY_H__ -#include <botan/mutex.h> +#include <botan/types.h> #include <string> #include <vector> @@ -25,6 +25,7 @@ class MessageAuthenticationCode; template<typename T> class Algorithm_Cache; class Engine; +class Mutex_Factory; /** * Algorithm Factory diff --git a/src/alloc/alloc_mmap/info.txt b/src/alloc/alloc_mmap/info.txt index 8ecb4df13..562277a37 100644 --- a/src/alloc/alloc_mmap/info.txt +++ b/src/alloc/alloc_mmap/info.txt @@ -1,6 +1,12 @@ define ALLOC_MMAP -load_on auto +<source> +mmap_mem.cpp +</source> + +<header:internal> +mmap_mem.h +</header:internal> <os> linux diff --git a/src/alloc/alloc_mmap/mmap_mem.cpp b/src/alloc/alloc_mmap/mmap_mem.cpp index 546da7a81..4a7019ae7 100644 --- a/src/alloc/alloc_mmap/mmap_mem.cpp +++ b/src/alloc/alloc_mmap/mmap_mem.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/mmap_mem.h> +#include <botan/internal/mmap_mem.h> #include <cstring> #include <sys/types.h> @@ -26,7 +26,7 @@ namespace { /* * MemoryMapping_Allocator Exception */ -class MemoryMapping_Failed : public Exception +class BOTAN_DLL MemoryMapping_Failed : public Exception { public: MemoryMapping_Failed(const std::string& msg) : diff --git a/src/alloc/alloc_mmap/mmap_mem.h b/src/alloc/alloc_mmap/mmap_mem.h index bef166a16..da3dda31d 100644 --- a/src/alloc/alloc_mmap/mmap_mem.h +++ b/src/alloc/alloc_mmap/mmap_mem.h @@ -8,14 +8,14 @@ #ifndef BOTAN_MMAP_ALLOCATOR_H__ #define BOTAN_MMAP_ALLOCATOR_H__ -#include <botan/mem_pool.h> +#include <botan/internal/mem_pool.h> namespace Botan { /* * Memory Mapping Allocator */ -class BOTAN_DLL MemoryMapping_Allocator : public Pooling_Allocator +class MemoryMapping_Allocator : public Pooling_Allocator { public: MemoryMapping_Allocator(Mutex* m) : Pooling_Allocator(m) {} diff --git a/src/alloc/mem_pool/info.txt b/src/alloc/mem_pool/info.txt index 6cb221834..5097c325f 100644 --- a/src/alloc/mem_pool/info.txt +++ b/src/alloc/mem_pool/info.txt @@ -1,3 +1,12 @@ + +<source> +mem_pool.cpp +</source> + +<header:internal> +mem_pool.h +</header:internal> + <requires> mutex </requires> diff --git a/src/alloc/mem_pool/mem_pool.cpp b/src/alloc/mem_pool/mem_pool.cpp index e30a7b98a..2945a4cef 100644 --- a/src/alloc/mem_pool/mem_pool.cpp +++ b/src/alloc/mem_pool/mem_pool.cpp @@ -7,8 +7,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/mem_pool.h> -#include <botan/rounding.h> +#include <botan/internal/mem_pool.h> +#include <botan/internal/rounding.h> #include <botan/mem_ops.h> #include <algorithm> #include <exception> diff --git a/src/alloc/mem_pool/mem_pool.h b/src/alloc/mem_pool/mem_pool.h index 51571405e..9735a547d 100644 --- a/src/alloc/mem_pool/mem_pool.h +++ b/src/alloc/mem_pool/mem_pool.h @@ -10,7 +10,7 @@ #include <botan/allocate.h> #include <botan/exceptn.h> -#include <botan/mutex.h> +#include <botan/internal/mutex.h> #include <utility> #include <vector> @@ -19,7 +19,7 @@ namespace Botan { /* * Pooling Allocator */ -class BOTAN_DLL Pooling_Allocator : public Allocator +class Pooling_Allocator : public Allocator { public: void* allocate(u32bit); @@ -36,7 +36,7 @@ class BOTAN_DLL Pooling_Allocator : public Allocator virtual void* alloc_block(u32bit) = 0; virtual void dealloc_block(void*, u32bit) = 0; - class BOTAN_DLL Memory_Block + class Memory_Block { public: Memory_Block(void*); diff --git a/src/alloc/system_alloc/defalloc.cpp b/src/alloc/system_alloc/defalloc.cpp index b1b338d71..faaeb3c58 100644 --- a/src/alloc/system_alloc/defalloc.cpp +++ b/src/alloc/system_alloc/defalloc.cpp @@ -5,9 +5,9 @@ * Distributed under the terms of the Botan license */ -#include <botan/defalloc.h> +#include <botan/internal/defalloc.h> +#include <botan/internal/mlock.h> #include <botan/libstate.h> -#include <botan/mlock.h> #include <cstdlib> #include <cstring> diff --git a/src/alloc/system_alloc/defalloc.h b/src/alloc/system_alloc/defalloc.h index 627e8df70..0c8804223 100644 --- a/src/alloc/system_alloc/defalloc.h +++ b/src/alloc/system_alloc/defalloc.h @@ -8,14 +8,14 @@ #ifndef BOTAN_BASIC_ALLOC_H__ #define BOTAN_BASIC_ALLOC_H__ -#include <botan/mem_pool.h> +#include <botan/internal/mem_pool.h> namespace Botan { /* * Malloc Allocator */ -class BOTAN_DLL Malloc_Allocator : public Allocator +class Malloc_Allocator : public Allocator { public: void* allocate(u32bit); @@ -27,7 +27,7 @@ class BOTAN_DLL Malloc_Allocator : public Allocator /* * Locking Allocator */ -class BOTAN_DLL Locking_Allocator : public Pooling_Allocator +class Locking_Allocator : public Pooling_Allocator { public: Locking_Allocator(Mutex* m) : Pooling_Allocator(m) {} diff --git a/src/alloc/system_alloc/info.txt b/src/alloc/system_alloc/info.txt index 8826440d4..87de0cb67 100644 --- a/src/alloc/system_alloc/info.txt +++ b/src/alloc/system_alloc/info.txt @@ -1,3 +1,12 @@ + +<source> +defalloc.cpp +</source> + +<header:internal> +defalloc.h +</header:internal> + <requires> libstate mem_pool diff --git a/src/asn1/asn1_alt.cpp b/src/asn1/asn1_alt.cpp index 41974eef6..6e9adf47b 100644 --- a/src/asn1/asn1_alt.cpp +++ b/src/asn1/asn1_alt.cpp @@ -10,10 +10,10 @@ #include <botan/der_enc.h> #include <botan/ber_dec.h> #include <botan/oids.h> -#include <botan/stl_util.h> +#include <botan/internal/stl_util.h> #include <botan/charset.h> #include <botan/parsing.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/asn1/asn1_dn.cpp b/src/asn1/asn1_dn.cpp index 3005e3d5e..6b08fa1ff 100644 --- a/src/asn1/asn1_dn.cpp +++ b/src/asn1/asn1_dn.cpp @@ -9,7 +9,7 @@ #include <botan/der_enc.h> #include <botan/ber_dec.h> #include <botan/parsing.h> -#include <botan/stl_util.h> +#include <botan/internal/stl_util.h> #include <botan/oids.h> namespace Botan { diff --git a/src/asn1/asn1_oid.cpp b/src/asn1/asn1_oid.cpp index 531ceb9b2..7db171fc8 100644 --- a/src/asn1/asn1_oid.cpp +++ b/src/asn1/asn1_oid.cpp @@ -8,7 +8,7 @@ #include <botan/asn1_oid.h> #include <botan/der_enc.h> #include <botan/ber_dec.h> -#include <botan/bit_ops.h> +#include <botan/internal/bit_ops.h> #include <botan/parsing.h> namespace Botan { diff --git a/src/asn1/ber_dec.cpp b/src/asn1/ber_dec.cpp index b34bf8ca2..a61bbf00a 100644 --- a/src/asn1/ber_dec.cpp +++ b/src/asn1/ber_dec.cpp @@ -7,7 +7,7 @@ #include <botan/ber_dec.h> #include <botan/bigint.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/asn1/der_enc.cpp b/src/asn1/der_enc.cpp index bee269431..37ba79802 100644 --- a/src/asn1/der_enc.cpp +++ b/src/asn1/der_enc.cpp @@ -8,8 +8,8 @@ #include <botan/der_enc.h> #include <botan/asn1_int.h> #include <botan/bigint.h> -#include <botan/loadstor.h> -#include <botan/bit_ops.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/bit_ops.h> #include <botan/parsing.h> #include <algorithm> diff --git a/src/block/aes/aes.cpp b/src/block/aes/aes.cpp index 108edd7a3..d972d921a 100644 --- a/src/block/aes/aes.cpp +++ b/src/block/aes/aes.cpp @@ -6,7 +6,7 @@ */ #include <botan/aes.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/block/aes_intel/aes_intel.cpp b/src/block/aes_intel/aes_intel.cpp index 3d3683d7d..5ccf3fc5d 100644 --- a/src/block/aes_intel/aes_intel.cpp +++ b/src/block/aes_intel/aes_intel.cpp @@ -6,7 +6,7 @@ */ #include <botan/aes_intel.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> #include <wmmintrin.h> namespace Botan { diff --git a/src/block/blowfish/blowfish.cpp b/src/block/blowfish/blowfish.cpp index d0b182a84..6a00caa90 100644 --- a/src/block/blowfish/blowfish.cpp +++ b/src/block/blowfish/blowfish.cpp @@ -6,7 +6,7 @@ */ #include <botan/blowfish.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/block/cast/cast128.cpp b/src/block/cast/cast128.cpp index 887dcf994..2d876d31e 100644 --- a/src/block/cast/cast128.cpp +++ b/src/block/cast/cast128.cpp @@ -6,8 +6,8 @@ */ #include <botan/cast128.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/block/cast/cast256.cpp b/src/block/cast/cast256.cpp index 7a4a4e805..832c170aa 100644 --- a/src/block/cast/cast256.cpp +++ b/src/block/cast/cast256.cpp @@ -6,8 +6,8 @@ */ #include <botan/cast256.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/block/des/des.cpp b/src/block/des/des.cpp index 05287304f..3bc970735 100644 --- a/src/block/des/des.cpp +++ b/src/block/des/des.cpp @@ -6,7 +6,7 @@ */ #include <botan/des.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/block/des/desx.cpp b/src/block/des/desx.cpp index 1fc1c47f2..d19d7da8a 100644 --- a/src/block/des/desx.cpp +++ b/src/block/des/desx.cpp @@ -6,7 +6,7 @@ */ #include <botan/desx.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> namespace Botan { diff --git a/src/block/gost_28147/gost_28147.cpp b/src/block/gost_28147/gost_28147.cpp index 272f1bcab..8340b8ccc 100644 --- a/src/block/gost_28147/gost_28147.cpp +++ b/src/block/gost_28147/gost_28147.cpp @@ -6,7 +6,7 @@ */ #include <botan/gost_28147.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/block/idea/idea.cpp b/src/block/idea/idea.cpp index fb5fe83f1..84c401475 100644 --- a/src/block/idea/idea.cpp +++ b/src/block/idea/idea.cpp @@ -6,7 +6,7 @@ */ #include <botan/idea.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/block/kasumi/kasumi.cpp b/src/block/kasumi/kasumi.cpp index dff6db13c..e22948293 100644 --- a/src/block/kasumi/kasumi.cpp +++ b/src/block/kasumi/kasumi.cpp @@ -6,8 +6,8 @@ */ #include <botan/kasumi.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/block/lion/lion.cpp b/src/block/lion/lion.cpp index d8822b9f2..e590a78ce 100644 --- a/src/block/lion/lion.cpp +++ b/src/block/lion/lion.cpp @@ -6,7 +6,7 @@ */ #include <botan/lion.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <botan/parsing.h> namespace Botan { diff --git a/src/block/lubyrack/lubyrack.cpp b/src/block/lubyrack/lubyrack.cpp index 2003d2a89..bdb26837e 100644 --- a/src/block/lubyrack/lubyrack.cpp +++ b/src/block/lubyrack/lubyrack.cpp @@ -6,7 +6,7 @@ */ #include <botan/lubyrack.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> namespace Botan { diff --git a/src/block/mars/mars.cpp b/src/block/mars/mars.cpp index 6b73ea054..526073cef 100644 --- a/src/block/mars/mars.cpp +++ b/src/block/mars/mars.cpp @@ -6,8 +6,8 @@ */ #include <botan/mars.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/block/misty1/misty1.cpp b/src/block/misty1/misty1.cpp index 8a92824cc..fcd647a76 100644 --- a/src/block/misty1/misty1.cpp +++ b/src/block/misty1/misty1.cpp @@ -6,7 +6,7 @@ */ #include <botan/misty1.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> #include <botan/parsing.h> namespace Botan { diff --git a/src/block/noekeon/noekeon.cpp b/src/block/noekeon/noekeon.cpp index 0bfce1882..74a485773 100644 --- a/src/block/noekeon/noekeon.cpp +++ b/src/block/noekeon/noekeon.cpp @@ -6,8 +6,8 @@ */ #include <botan/noekeon.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/block/rc2/rc2.cpp b/src/block/rc2/rc2.cpp index b5e4a7d50..7fd1ed80e 100644 --- a/src/block/rc2/rc2.cpp +++ b/src/block/rc2/rc2.cpp @@ -6,8 +6,8 @@ */ #include <botan/rc2.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/block/rc5/rc5.cpp b/src/block/rc5/rc5.cpp index 0bd596b10..c0f555103 100644 --- a/src/block/rc5/rc5.cpp +++ b/src/block/rc5/rc5.cpp @@ -6,8 +6,8 @@ */ #include <botan/rc5.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> #include <botan/parsing.h> #include <algorithm> diff --git a/src/block/rc6/rc6.cpp b/src/block/rc6/rc6.cpp index 8bda62259..5c2aba60a 100644 --- a/src/block/rc6/rc6.cpp +++ b/src/block/rc6/rc6.cpp @@ -6,8 +6,8 @@ */ #include <botan/rc6.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> #include <algorithm> namespace Botan { diff --git a/src/block/safer/safer_sk.cpp b/src/block/safer/safer_sk.cpp index eb5c22fc9..540efde79 100644 --- a/src/block/safer/safer_sk.cpp +++ b/src/block/safer/safer_sk.cpp @@ -6,9 +6,9 @@ */ #include <botan/safer_sk.h> -#include <botan/rotate.h> +#include <botan/internal/rotate.h> #include <botan/parsing.h> -#include <botan/rotate.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/block/seed/seed.cpp b/src/block/seed/seed.cpp index 378be16e4..b674fce95 100644 --- a/src/block/seed/seed.cpp +++ b/src/block/seed/seed.cpp @@ -6,7 +6,7 @@ */ #include <botan/seed.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/block/serpent/serpent.cpp b/src/block/serpent/serpent.cpp index e16afc89c..d08e0c384 100644 --- a/src/block/serpent/serpent.cpp +++ b/src/block/serpent/serpent.cpp @@ -6,8 +6,8 @@ */ #include <botan/serpent.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/block/serpent_ia32/serp_ia32.cpp b/src/block/serpent_ia32/serp_ia32.cpp index 721584b18..3b90f4950 100644 --- a/src/block/serpent_ia32/serp_ia32.cpp +++ b/src/block/serpent_ia32/serp_ia32.cpp @@ -6,7 +6,7 @@ */ #include <botan/serp_ia32.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/block/serpent_simd/serp_simd.cpp b/src/block/serpent_simd/serp_simd.cpp index 0a535c9a0..3a42db55f 100644 --- a/src/block/serpent_simd/serp_simd.cpp +++ b/src/block/serpent_simd/serp_simd.cpp @@ -8,7 +8,7 @@ #include <botan/serp_simd.h> #include <botan/internal/serp_simd_sbox.h> #include <botan/internal/simd_32.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/block/skipjack/skipjack.cpp b/src/block/skipjack/skipjack.cpp index b23d1e160..b1765d67a 100644 --- a/src/block/skipjack/skipjack.cpp +++ b/src/block/skipjack/skipjack.cpp @@ -6,7 +6,7 @@ */ #include <botan/skipjack.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/block/square/square.cpp b/src/block/square/square.cpp index 892568655..a64e2538e 100644 --- a/src/block/square/square.cpp +++ b/src/block/square/square.cpp @@ -6,8 +6,8 @@ */ #include <botan/square.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/block/tea/tea.cpp b/src/block/tea/tea.cpp index de30858da..617c9505a 100644 --- a/src/block/tea/tea.cpp +++ b/src/block/tea/tea.cpp @@ -6,7 +6,7 @@ */ #include <botan/tea.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/block/twofish/twofish.cpp b/src/block/twofish/twofish.cpp index 3136837aa..1969b615b 100644 --- a/src/block/twofish/twofish.cpp +++ b/src/block/twofish/twofish.cpp @@ -6,8 +6,8 @@ */ #include <botan/twofish.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/block/xtea/xtea.cpp b/src/block/xtea/xtea.cpp index fc14c0a57..2172d63b8 100644 --- a/src/block/xtea/xtea.cpp +++ b/src/block/xtea/xtea.cpp @@ -6,7 +6,7 @@ */ #include <botan/xtea.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/block/xtea_simd/xtea_simd.cpp b/src/block/xtea_simd/xtea_simd.cpp index 264d4f949..a8d1fe810 100644 --- a/src/block/xtea_simd/xtea_simd.cpp +++ b/src/block/xtea_simd/xtea_simd.cpp @@ -6,7 +6,7 @@ */ #include <botan/xtea_simd.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> #include <botan/internal/simd_32.h> namespace Botan { diff --git a/src/build-data/cc/gcc.txt b/src/build-data/cc/gcc.txt index 73e1ecf06..b27cd0299 100644 --- a/src/build-data/cc/gcc.txt +++ b/src/build-data/cc/gcc.txt @@ -16,10 +16,12 @@ warning_flags "-W -Wall" lib_opt_flags "-O3" check_opt_flags "-O2" -shared_flags "-fPIC" +shared_flags "-fPIC -fvisibility=hidden" debug_flags -g no_debug_flags "-finline-functions" +dll_import_flags '__attribute__((visibility("default")))' + makefile_style unix <so_link_flags> diff --git a/src/cert/cvc/asn1_eac_tm.cpp b/src/cert/cvc/asn1_eac_tm.cpp index f361e6098..ee2ed2ddf 100644 --- a/src/cert/cvc/asn1_eac_tm.cpp +++ b/src/cert/cvc/asn1_eac_tm.cpp @@ -11,7 +11,7 @@ #include <botan/ber_dec.h> #include <botan/charset.h> #include <botan/parsing.h> -#include <botan/rounding.h> +#include <botan/internal/rounding.h> #include <botan/time.h> namespace Botan { diff --git a/src/cert/cvc/cvc_self.h b/src/cert/cvc/cvc_self.h index db23547b9..fb24ecd3a 100644 --- a/src/cert/cvc/cvc_self.h +++ b/src/cert/cvc/cvc_self.h @@ -48,9 +48,9 @@ namespace CVC_EAC { * @result the self signed certificate */ -EAC1_1_CVC create_self_signed_cert(Private_Key const& key, - EAC1_1_CVC_Options const& opts, - RandomNumberGenerator& rng); +EAC1_1_CVC BOTAN_DLL create_self_signed_cert(Private_Key const& key, + EAC1_1_CVC_Options const& opts, + RandomNumberGenerator& rng); /** * Create a CVC request. The key encoding will be according to the provided private key. * @param priv_key the private key associated with the requesting entity @@ -61,10 +61,10 @@ EAC1_1_CVC create_self_signed_cert(Private_Key const& key, * @param rng the rng to use * @result the new request */ -EAC1_1_Req create_cvc_req(Private_Key const& priv_key, - ASN1_Chr const& chr, - std::string const& hash_alg, - RandomNumberGenerator& rng); +EAC1_1_Req BOTAN_DLL create_cvc_req(Private_Key const& priv_key, + ASN1_Chr const& chr, + std::string const& hash_alg, + RandomNumberGenerator& rng); /** * Create an ADO from a request object. @@ -74,15 +74,16 @@ EAC1_1_Req create_cvc_req(Private_Key const& priv_key, * CHR of the entity associated with the provided private key * @param rng the rng to use */ -EAC1_1_ADO create_ado_req(Private_Key const& priv_key, - EAC1_1_Req const& req, - ASN1_Car const& car, - RandomNumberGenerator& rng); +EAC1_1_ADO BOTAN_DLL create_ado_req(Private_Key const& priv_key, + EAC1_1_Req const& req, + ASN1_Car const& car, + RandomNumberGenerator& rng); } /** -* This namespace represents EAC 1.1 CVC convenience functions following the specific german -* requirements. +* This namespace represents EAC 1.1 CVC convenience functions +* following the specific german requirements. */ + namespace DE_EAC { /** @@ -99,13 +100,13 @@ namespace DE_EAC { * @param rng the rng to use * @result the CVCA certificate created */ -EAC1_1_CVC create_cvca(Private_Key const& priv_key, - std::string const& hash, - ASN1_Car const& car, - bool iris, - bool fingerpr, - u32bit cvca_validity_months, - RandomNumberGenerator& rng); +EAC1_1_CVC BOTAN_DLL create_cvca(Private_Key const& priv_key, + std::string const& hash, + ASN1_Car const& car, + bool iris, + bool fingerpr, + u32bit cvca_validity_months, + RandomNumberGenerator& rng); /** * Create a link certificate between two CVCA certificates. The key @@ -117,10 +118,10 @@ EAC1_1_CVC create_cvca(Private_Key const& priv_key, * the holder of the link certificate * @param rng a random number generator */ -EAC1_1_CVC link_cvca(EAC1_1_CVC const& signer, - Private_Key const& priv_key, - EAC1_1_CVC const& to_be_signed, - RandomNumberGenerator& rng); +EAC1_1_CVC BOTAN_DLL link_cvca(EAC1_1_CVC const& signer, + Private_Key const& priv_key, + EAC1_1_CVC const& to_be_signed, + RandomNumberGenerator& rng); /** * Create a CVC request. The key encoding will be implicitCA. @@ -132,10 +133,10 @@ EAC1_1_CVC link_cvca(EAC1_1_CVC const& signer, * @param rng a random number generator * @result the new request */ -EAC1_1_Req create_cvc_req(Private_Key const& priv_key, - ASN1_Chr const& chr, - std::string const& hash_alg, - RandomNumberGenerator& rng); +EAC1_1_Req BOTAN_DLL create_cvc_req(Private_Key const& priv_key, + ASN1_Chr const& chr, + std::string const& hash_alg, + RandomNumberGenerator& rng); /** * Sign a CVC request. @@ -151,15 +152,15 @@ EAC1_1_Req create_cvc_req(Private_Key const& priv_key, * @result the new certificate * **/ -EAC1_1_CVC sign_request(EAC1_1_CVC const& signer_cert, - Private_Key const& priv_key, - EAC1_1_Req const& req, - u32bit seqnr, - u32bit seqnr_len, - bool domestic, - u32bit dvca_validity_months, - u32bit ca_is_validity_months, - RandomNumberGenerator& rng); +EAC1_1_CVC BOTAN_DLL sign_request(EAC1_1_CVC const& signer_cert, + Private_Key const& priv_key, + EAC1_1_Req const& req, + u32bit seqnr, + u32bit seqnr_len, + bool domestic, + u32bit dvca_validity_months, + u32bit ca_is_validity_months, + RandomNumberGenerator& rng); } } diff --git a/src/cert/cvc/eac_asn_obj.h b/src/cert/cvc/eac_asn_obj.h index 3e70f6b74..652c9a6e6 100644 --- a/src/cert/cvc/eac_asn_obj.h +++ b/src/cert/cvc/eac_asn_obj.h @@ -226,14 +226,14 @@ class BOTAN_DLL ASN1_Chr : public ASN1_EAC_String /* * Comparison Operations */ -bool operator==(const EAC_Time&, const EAC_Time&); -bool operator!=(const EAC_Time&, const EAC_Time&); -bool operator<=(const EAC_Time&, const EAC_Time&); -bool operator>=(const EAC_Time&, const EAC_Time&); -bool operator>(const EAC_Time&, const EAC_Time&); -bool operator<(const EAC_Time&, const EAC_Time&); - -bool operator==(const ASN1_EAC_String&, const ASN1_EAC_String&); +bool BOTAN_DLL operator==(const EAC_Time&, const EAC_Time&); +bool BOTAN_DLL operator!=(const EAC_Time&, const EAC_Time&); +bool BOTAN_DLL operator<=(const EAC_Time&, const EAC_Time&); +bool BOTAN_DLL operator>=(const EAC_Time&, const EAC_Time&); +bool BOTAN_DLL operator>(const EAC_Time&, const EAC_Time&); +bool BOTAN_DLL operator<(const EAC_Time&, const EAC_Time&); + +bool BOTAN_DLL operator==(const ASN1_EAC_String&, const ASN1_EAC_String&); inline bool operator!=(const ASN1_EAC_String& lhs, const ASN1_EAC_String& rhs) { return !(lhs == rhs); diff --git a/src/cert/x509/x509_crl.h b/src/cert/x509/x509_crl.h index 6caef42cc..a7903e7e6 100644 --- a/src/cert/x509/x509_crl.h +++ b/src/cert/x509/x509_crl.h @@ -23,7 +23,7 @@ class BOTAN_DLL X509_CRL : public X509_Object /** * This class represents CRL related errors. */ - struct X509_CRL_Error : public Exception + struct BOTAN_DLL X509_CRL_Error : public Exception { X509_CRL_Error(const std::string& error) : Exception("X509_CRL: " + error) {} diff --git a/src/cert/x509/x509_ext.cpp b/src/cert/x509/x509_ext.cpp index 5e07cbd27..e88b5a268 100644 --- a/src/cert/x509/x509_ext.cpp +++ b/src/cert/x509/x509_ext.cpp @@ -11,7 +11,7 @@ #include <botan/ber_dec.h> #include <botan/oids.h> #include <botan/libstate.h> -#include <botan/bit_ops.h> +#include <botan/internal/bit_ops.h> #include <algorithm> #include <memory> diff --git a/src/cert/x509/x509cert.cpp b/src/cert/x509/x509cert.cpp index ac5839fb6..05f23298b 100644 --- a/src/cert/x509/x509cert.cpp +++ b/src/cert/x509/x509cert.cpp @@ -9,7 +9,7 @@ #include <botan/x509_ext.h> #include <botan/der_enc.h> #include <botan/ber_dec.h> -#include <botan/stl_util.h> +#include <botan/internal/stl_util.h> #include <botan/parsing.h> #include <botan/bigint.h> #include <botan/oids.h> diff --git a/src/checksum/adler32/adler32.cpp b/src/checksum/adler32/adler32.cpp index c66943b88..2af1f22ce 100644 --- a/src/checksum/adler32/adler32.cpp +++ b/src/checksum/adler32/adler32.cpp @@ -6,7 +6,7 @@ */ #include <botan/adler32.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/checksum/crc24/crc24.cpp b/src/checksum/crc24/crc24.cpp index e50b4d33e..6023ace73 100644 --- a/src/checksum/crc24/crc24.cpp +++ b/src/checksum/crc24/crc24.cpp @@ -6,7 +6,7 @@ */ #include <botan/crc24.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/checksum/crc32/crc32.cpp b/src/checksum/crc32/crc32.cpp index 42462096f..1f118c023 100644 --- a/src/checksum/crc32/crc32.cpp +++ b/src/checksum/crc32/crc32.cpp @@ -6,7 +6,7 @@ */ #include <botan/crc32.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/constructs/aont/package.cpp b/src/constructs/aont/package.cpp index 37bad46c8..23b020e8a 100644 --- a/src/constructs/aont/package.cpp +++ b/src/constructs/aont/package.cpp @@ -9,8 +9,8 @@ #include <botan/package.h> #include <botan/filters.h> #include <botan/ctr.h> -#include <botan/loadstor.h> -#include <botan/xor_buf.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/xor_buf.h> namespace Botan { diff --git a/src/constructs/cryptobox/cryptobox.cpp b/src/constructs/cryptobox/cryptobox.cpp index ba7553c55..1c7975a7d 100644 --- a/src/constructs/cryptobox/cryptobox.cpp +++ b/src/constructs/cryptobox/cryptobox.cpp @@ -13,7 +13,7 @@ #include <botan/hmac.h> #include <botan/pbkdf2.h> #include <botan/pem.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> #include <botan/mem_ops.h> namespace Botan { diff --git a/src/constructs/fpe/fpe.cpp b/src/constructs/fpe/fpe.cpp index 86e56625d..17f9a1406 100644 --- a/src/constructs/fpe/fpe.cpp +++ b/src/constructs/fpe/fpe.cpp @@ -12,7 +12,7 @@ #include <botan/numthry.h> #include <botan/hmac.h> #include <botan/sha2_32.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> #include <stdexcept> namespace Botan { diff --git a/src/constructs/tss/tss.cpp b/src/constructs/tss/tss.cpp index 0782a27d1..d38741235 100644 --- a/src/constructs/tss/tss.cpp +++ b/src/constructs/tss/tss.cpp @@ -6,7 +6,7 @@ */ #include <botan/tss.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> #include <botan/pipe.h> #include <botan/hex.h> #include <botan/sha2_32.h> diff --git a/src/entropy/dev_random/dev_random.h b/src/entropy/dev_random/dev_random.h index df9dbe1c1..3ffe536e3 100644 --- a/src/entropy/dev_random/dev_random.h +++ b/src/entropy/dev_random/dev_random.h @@ -14,7 +14,7 @@ namespace Botan { -class BOTAN_DLL Device_EntropySource : public EntropySource +class Device_EntropySource : public EntropySource { public: std::string name() const { return "RNG Device Reader"; } diff --git a/src/entropy/egd/es_egd.h b/src/entropy/egd/es_egd.h index 5db65659d..1a3618989 100644 --- a/src/entropy/egd/es_egd.h +++ b/src/entropy/egd/es_egd.h @@ -17,7 +17,7 @@ namespace Botan { /** * EGD Entropy Source */ -class BOTAN_DLL EGD_EntropySource : public EntropySource +class EGD_EntropySource : public EntropySource { public: std::string name() const { return "EGD/PRNGD"; } diff --git a/src/entropy/hres_timer/hres_timer.h b/src/entropy/hres_timer/hres_timer.h index 8dfbfc2d7..a602d5d7b 100644 --- a/src/entropy/hres_timer/hres_timer.h +++ b/src/entropy/hres_timer/hres_timer.h @@ -15,7 +15,7 @@ namespace Botan { /* * High Resolution Timestamp Source */ -class BOTAN_DLL High_Resolution_Timestamp : public EntropySource +class High_Resolution_Timestamp : public EntropySource { public: std::string name() const { return "High Resolution Timestamp"; } diff --git a/src/entropy/proc_walk/es_ftw.h b/src/entropy/proc_walk/es_ftw.h index 928a7b16a..d7a719818 100644 --- a/src/entropy/proc_walk/es_ftw.h +++ b/src/entropy/proc_walk/es_ftw.h @@ -15,7 +15,7 @@ namespace Botan { /** * File Tree Walking Entropy Source */ -class BOTAN_DLL FTW_EntropySource : public EntropySource +class FTW_EntropySource : public EntropySource { public: std::string name() const { return "Proc Walker"; } diff --git a/src/entropy/unix_procs/es_unix.h b/src/entropy/unix_procs/es_unix.h index 283405e19..03496b364 100644 --- a/src/entropy/unix_procs/es_unix.h +++ b/src/entropy/unix_procs/es_unix.h @@ -17,7 +17,7 @@ namespace Botan { /** * Unix Entropy Source */ -class BOTAN_DLL Unix_EntropySource : public EntropySource +class Unix_EntropySource : public EntropySource { public: std::string name() const { return "Unix Entropy Source"; } diff --git a/src/entropy/unix_procs/unix_cmd.h b/src/entropy/unix_procs/unix_cmd.h index aec189176..7decf587f 100644 --- a/src/entropy/unix_procs/unix_cmd.h +++ b/src/entropy/unix_procs/unix_cmd.h @@ -31,7 +31,7 @@ struct Unix_Program /** * Command Output DataSource */ -class BOTAN_DLL DataSource_Command : public DataSource +class DataSource_Command : public DataSource { public: u32bit read(byte[], u32bit); diff --git a/src/filters/filter.cpp b/src/filters/filter.cpp index ff223ae8c..ca32a3801 100644 --- a/src/filters/filter.cpp +++ b/src/filters/filter.cpp @@ -6,7 +6,7 @@ */ #include <botan/filter.h> -#include <botan/secqueue.h> +#include <botan/internal/secqueue.h> #include <botan/exceptn.h> namespace Botan { diff --git a/src/filters/info.txt b/src/filters/info.txt index c4113de58..94b91371b 100644 --- a/src/filters/info.txt +++ b/src/filters/info.txt @@ -1,6 +1,35 @@ define FILTERS -load_on auto +<source> +algo_filt.cpp +basefilt.cpp +buf_filt.cpp +data_snk.cpp +data_src.cpp +filter.cpp +out_buf.cpp +pipe.cpp +pipe_io.cpp +pipe_rw.cpp +secqueue.cpp +</source> + +<header:public> +basefilt.h +buf_filt.h +data_snk.h +data_src.h +filter.h +filters.h +key_filt.h +pbe.h +pipe.h +</header:public> + +<header:internal> +out_buf.h +secqueue.h +</header:internal> <requires> alloc diff --git a/src/filters/modes/cbc/cbc.cpp b/src/filters/modes/cbc/cbc.cpp index fb7ae8f90..a52f4b2e1 100644 --- a/src/filters/modes/cbc/cbc.cpp +++ b/src/filters/modes/cbc/cbc.cpp @@ -6,7 +6,7 @@ */ #include <botan/cbc.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <algorithm> namespace Botan { diff --git a/src/filters/modes/cfb/cfb.cpp b/src/filters/modes/cfb/cfb.cpp index a126bd995..777673d6f 100644 --- a/src/filters/modes/cfb/cfb.cpp +++ b/src/filters/modes/cfb/cfb.cpp @@ -7,7 +7,7 @@ #include <botan/cfb.h> #include <botan/parsing.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <algorithm> namespace Botan { diff --git a/src/filters/modes/cts/cts.cpp b/src/filters/modes/cts/cts.cpp index 99f042f61..226a31898 100644 --- a/src/filters/modes/cts/cts.cpp +++ b/src/filters/modes/cts/cts.cpp @@ -6,7 +6,7 @@ */ #include <botan/cts.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <algorithm> namespace Botan { diff --git a/src/filters/modes/eax/eax.cpp b/src/filters/modes/eax/eax.cpp index e2ef178b6..7893ce258 100644 --- a/src/filters/modes/eax/eax.cpp +++ b/src/filters/modes/eax/eax.cpp @@ -7,7 +7,7 @@ #include <botan/eax.h> #include <botan/cmac.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <botan/parsing.h> #include <algorithm> diff --git a/src/filters/modes/eax/eax_dec.cpp b/src/filters/modes/eax/eax_dec.cpp index f395ce437..24b68f3b7 100644 --- a/src/filters/modes/eax/eax_dec.cpp +++ b/src/filters/modes/eax/eax_dec.cpp @@ -6,7 +6,7 @@ */ #include <botan/eax.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <botan/parsing.h> #include <algorithm> diff --git a/src/filters/modes/xts/xts.cpp b/src/filters/modes/xts/xts.cpp index 586cc92af..c9b77e1eb 100644 --- a/src/filters/modes/xts/xts.cpp +++ b/src/filters/modes/xts/xts.cpp @@ -6,7 +6,7 @@ */ #include <botan/xts.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <algorithm> #include <stdexcept> diff --git a/src/filters/out_buf.cpp b/src/filters/out_buf.cpp index 864598194..80189eb3c 100644 --- a/src/filters/out_buf.cpp +++ b/src/filters/out_buf.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/out_buf.h> -#include <botan/secqueue.h> +#include <botan/internal/out_buf.h> +#include <botan/internal/secqueue.h> namespace Botan { diff --git a/src/filters/out_buf.h b/src/filters/out_buf.h index 0baacda20..fecbf9191 100644 --- a/src/filters/out_buf.h +++ b/src/filters/out_buf.h @@ -17,7 +17,7 @@ namespace Botan { /* * Container of output buffers for Pipe */ -class BOTAN_DLL Output_Buffers +class Output_Buffers { public: u32bit read(byte[], u32bit, Pipe::message_id); diff --git a/src/filters/pipe.cpp b/src/filters/pipe.cpp index 33824be24..80b6f27aa 100644 --- a/src/filters/pipe.cpp +++ b/src/filters/pipe.cpp @@ -6,8 +6,8 @@ */ #include <botan/pipe.h> -#include <botan/out_buf.h> -#include <botan/secqueue.h> +#include <botan/internal/out_buf.h> +#include <botan/internal/secqueue.h> #include <botan/parsing.h> namespace Botan { diff --git a/src/filters/pipe_rw.cpp b/src/filters/pipe_rw.cpp index 41b57a716..756a1cf09 100644 --- a/src/filters/pipe_rw.cpp +++ b/src/filters/pipe_rw.cpp @@ -6,8 +6,8 @@ */ #include <botan/pipe.h> -#include <botan/out_buf.h> -#include <botan/secqueue.h> +#include <botan/internal/out_buf.h> +#include <botan/internal/secqueue.h> namespace Botan { diff --git a/src/filters/secqueue.cpp b/src/filters/secqueue.cpp index f63ef898c..74897805c 100644 --- a/src/filters/secqueue.cpp +++ b/src/filters/secqueue.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/secqueue.h> +#include <botan/internal/secqueue.h> #include <algorithm> namespace Botan { diff --git a/src/filters/secqueue.h b/src/filters/secqueue.h index fc1fc213a..75f650030 100644 --- a/src/filters/secqueue.h +++ b/src/filters/secqueue.h @@ -16,7 +16,7 @@ namespace Botan { /* * SecureQueue */ -class BOTAN_DLL SecureQueue : public Fanout_Filter, public DataSource +class SecureQueue : public Fanout_Filter, public DataSource { public: void write(const byte[], u32bit); diff --git a/src/hash/bmw/bmw_512.cpp b/src/hash/bmw/bmw_512.cpp index 5ccb09579..61c20d769 100644 --- a/src/hash/bmw/bmw_512.cpp +++ b/src/hash/bmw/bmw_512.cpp @@ -6,8 +6,8 @@ */ #include <botan/bmw_512.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/hash/fork256/fork256.cpp b/src/hash/fork256/fork256.cpp index bd85dfd7c..6e6e44fb8 100644 --- a/src/hash/fork256/fork256.cpp +++ b/src/hash/fork256/fork256.cpp @@ -6,8 +6,8 @@ */ #include <botan/fork256.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/hash/gost_3411/gost_3411.cpp b/src/hash/gost_3411/gost_3411.cpp index 16b1311da..6de3c9d52 100644 --- a/src/hash/gost_3411/gost_3411.cpp +++ b/src/hash/gost_3411/gost_3411.cpp @@ -6,9 +6,9 @@ */ #include <botan/gost_3411.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> -#include <botan/xor_buf.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> +#include <botan/internal/xor_buf.h> namespace Botan { diff --git a/src/hash/has160/has160.cpp b/src/hash/has160/has160.cpp index d245a0249..006e8f142 100644 --- a/src/hash/has160/has160.cpp +++ b/src/hash/has160/has160.cpp @@ -6,8 +6,8 @@ */ #include <botan/has160.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/hash/md2/md2.cpp b/src/hash/md2/md2.cpp index f03518ec0..7d0ab0ab0 100644 --- a/src/hash/md2/md2.cpp +++ b/src/hash/md2/md2.cpp @@ -6,7 +6,7 @@ */ #include <botan/md2.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> namespace Botan { diff --git a/src/hash/md4/md4.cpp b/src/hash/md4/md4.cpp index f573dae25..5713a17b2 100644 --- a/src/hash/md4/md4.cpp +++ b/src/hash/md4/md4.cpp @@ -6,8 +6,8 @@ */ #include <botan/md4.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/hash/md4_ia32/md4_ia32.cpp b/src/hash/md4_ia32/md4_ia32.cpp index 12fe71da4..cdaffb62e 100644 --- a/src/hash/md4_ia32/md4_ia32.cpp +++ b/src/hash/md4_ia32/md4_ia32.cpp @@ -6,7 +6,7 @@ */ #include <botan/md4_ia32.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/hash/md5/md5.cpp b/src/hash/md5/md5.cpp index 8c1e5a8e1..4714603d3 100644 --- a/src/hash/md5/md5.cpp +++ b/src/hash/md5/md5.cpp @@ -6,8 +6,8 @@ */ #include <botan/md5.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/hash/md5_ia32/md5_ia32.cpp b/src/hash/md5_ia32/md5_ia32.cpp index 443569b3b..5681a2763 100644 --- a/src/hash/md5_ia32/md5_ia32.cpp +++ b/src/hash/md5_ia32/md5_ia32.cpp @@ -6,7 +6,7 @@ */ #include <botan/md5_ia32.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/hash/mdx_hash/mdx_hash.cpp b/src/hash/mdx_hash/mdx_hash.cpp index 28402c2c5..cc03d0319 100644 --- a/src/hash/mdx_hash/mdx_hash.cpp +++ b/src/hash/mdx_hash/mdx_hash.cpp @@ -7,7 +7,7 @@ #include <botan/mdx_hash.h> #include <botan/exceptn.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/hash/rmd128/rmd128.cpp b/src/hash/rmd128/rmd128.cpp index 51e416eb1..f86addda4 100644 --- a/src/hash/rmd128/rmd128.cpp +++ b/src/hash/rmd128/rmd128.cpp @@ -6,8 +6,8 @@ */ #include <botan/rmd128.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/hash/rmd160/rmd160.cpp b/src/hash/rmd160/rmd160.cpp index 5237f1e12..e1d6a8dc5 100644 --- a/src/hash/rmd160/rmd160.cpp +++ b/src/hash/rmd160/rmd160.cpp @@ -6,8 +6,8 @@ */ #include <botan/rmd160.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/hash/sha1/sha160.cpp b/src/hash/sha1/sha160.cpp index ff44593f6..5666d8fa5 100644 --- a/src/hash/sha1/sha160.cpp +++ b/src/hash/sha1/sha160.cpp @@ -6,8 +6,8 @@ */ #include <botan/sha160.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/hash/sha1_ia32/sha1_ia32.cpp b/src/hash/sha1_ia32/sha1_ia32.cpp index 0fa0b6bf2..a8f7f7b75 100644 --- a/src/hash/sha1_ia32/sha1_ia32.cpp +++ b/src/hash/sha1_ia32/sha1_ia32.cpp @@ -6,7 +6,7 @@ */ #include <botan/sha1_ia32.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/hash/sha1_sse2/sha1_sse2.cpp b/src/hash/sha1_sse2/sha1_sse2.cpp index 9267689e7..89ad7b003 100644 --- a/src/hash/sha1_sse2/sha1_sse2.cpp +++ b/src/hash/sha1_sse2/sha1_sse2.cpp @@ -9,7 +9,7 @@ */ #include <botan/sha1_sse2.h> -#include <botan/rotate.h> +#include <botan/internal/rotate.h> #include <emmintrin.h> namespace Botan { diff --git a/src/hash/sha2/sha2_32.cpp b/src/hash/sha2/sha2_32.cpp index 91375df04..d9d69e4a9 100644 --- a/src/hash/sha2/sha2_32.cpp +++ b/src/hash/sha2/sha2_32.cpp @@ -7,8 +7,8 @@ */ #include <botan/sha2_32.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/hash/sha2/sha2_64.cpp b/src/hash/sha2/sha2_64.cpp index 3e7c0e228..9815a6e19 100644 --- a/src/hash/sha2/sha2_64.cpp +++ b/src/hash/sha2/sha2_64.cpp @@ -6,8 +6,8 @@ */ #include <botan/sha2_64.h> -#include <botan/loadstor.h> -#include <botan/rotate.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/hash/skein/skein_512.cpp b/src/hash/skein/skein_512.cpp index e1ca08c15..1d683c3cf 100644 --- a/src/hash/skein/skein_512.cpp +++ b/src/hash/skein/skein_512.cpp @@ -6,7 +6,7 @@ */ #include <botan/skein_512.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> #include <botan/parsing.h> #include <botan/exceptn.h> #include <algorithm> diff --git a/src/hash/tiger/tiger.cpp b/src/hash/tiger/tiger.cpp index 4f4d4dc83..5a1d21847 100644 --- a/src/hash/tiger/tiger.cpp +++ b/src/hash/tiger/tiger.cpp @@ -7,7 +7,7 @@ #include <botan/tiger.h> #include <botan/exceptn.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> #include <botan/parsing.h> namespace Botan { diff --git a/src/hash/whirlpool/whrlpool.cpp b/src/hash/whirlpool/whrlpool.cpp index 06755fe77..c9d520776 100644 --- a/src/hash/whirlpool/whrlpool.cpp +++ b/src/hash/whirlpool/whrlpool.cpp @@ -6,7 +6,7 @@ */ #include <botan/whrlpool.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/kdf/kdf2/kdf2.cpp b/src/kdf/kdf2/kdf2.cpp index 167f64436..f8f178c80 100644 --- a/src/kdf/kdf2/kdf2.cpp +++ b/src/kdf/kdf2/kdf2.cpp @@ -6,7 +6,7 @@ */ #include <botan/kdf2.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/kdf/mgf1/mgf1.cpp b/src/kdf/mgf1/mgf1.cpp index a26e33a9e..c61f583a7 100644 --- a/src/kdf/mgf1/mgf1.cpp +++ b/src/kdf/mgf1/mgf1.cpp @@ -6,9 +6,9 @@ */ #include <botan/mgf1.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> #include <botan/exceptn.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <algorithm> #include <memory> diff --git a/src/kdf/tls_prf/prf_tls.cpp b/src/kdf/tls_prf/prf_tls.cpp index 7c638b994..5e77f831e 100644 --- a/src/kdf/tls_prf/prf_tls.cpp +++ b/src/kdf/tls_prf/prf_tls.cpp @@ -6,7 +6,7 @@ */ #include <botan/prf_tls.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <botan/hmac.h> #include <botan/md5.h> #include <botan/sha160.h> diff --git a/src/kdf/x942_prf/prf_x942.cpp b/src/kdf/x942_prf/prf_x942.cpp index d9ee09d20..060fed700 100644 --- a/src/kdf/x942_prf/prf_x942.cpp +++ b/src/kdf/x942_prf/prf_x942.cpp @@ -9,7 +9,7 @@ #include <botan/der_enc.h> #include <botan/oids.h> #include <botan/sha160.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> #include <algorithm> #include <memory> diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp index 8b039a97a..2de621648 100644 --- a/src/libstate/libstate.cpp +++ b/src/libstate/libstate.cpp @@ -6,27 +6,27 @@ */ #include <botan/libstate.h> -#include <botan/init.h> -#include <botan/selftest.h> -#include <botan/engine.h> -#include <botan/stl_util.h> -#include <botan/mutex.h> -#include <botan/mux_noop.h> #include <botan/charset.h> -#include <botan/defalloc.h> #include <botan/def_eng.h> +#include <botan/engine.h> +#include <botan/init.h> +#include <botan/internal/mutex.h> +#include <botan/selftest.h> +#include <botan/internal/defalloc.h> +#include <botan/internal/mux_noop.h> +#include <botan/internal/stl_util.h> #include <algorithm> #if defined(BOTAN_HAS_MUTEX_PTHREAD) - #include <botan/mux_pthr.h> + #include <botan/internal/mux_pthr.h> #elif defined(BOTAN_HAS_MUTEX_WIN32) - #include <botan/mux_win32.h> + #include <botan/internal/mux_win32.h> #elif defined(BOTAN_HAS_MUTEX_QT) - #include <botan/mux_qt.h> + #include <botan/internal/mux_qt.h> #endif #if defined(BOTAN_HAS_ALLOC_MMAP) - #include <botan/mmap_mem.h> + #include <botan/internal/mmap_mem.h> #endif #if defined(BOTAN_HAS_ENGINE_IA32_ASSEMBLER) diff --git a/src/libstate/scan_name.cpp b/src/libstate/scan_name.cpp index 224d2e509..9e046e8ea 100644 --- a/src/libstate/scan_name.cpp +++ b/src/libstate/scan_name.cpp @@ -1,6 +1,6 @@ /** * SCAN Name Abstraction -* (C) 2008 Jack Lloyd +* (C) 2008-2009 Jack Lloyd * * Distributed under the terms of the Botan license */ @@ -8,6 +8,7 @@ #include <botan/scan_name.h> #include <botan/parsing.h> #include <botan/libstate.h> +#include <botan/exceptn.h> #include <stdexcept> namespace Botan { diff --git a/src/mac/cbc_mac/cbc_mac.cpp b/src/mac/cbc_mac/cbc_mac.cpp index 0617e3e90..6a0692580 100644 --- a/src/mac/cbc_mac/cbc_mac.cpp +++ b/src/mac/cbc_mac/cbc_mac.cpp @@ -6,7 +6,7 @@ */ #include <botan/cbc_mac.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <algorithm> namespace Botan { diff --git a/src/mac/cmac/cmac.cpp b/src/mac/cmac/cmac.cpp index b689a4d3a..05c5f4a88 100644 --- a/src/mac/cmac/cmac.cpp +++ b/src/mac/cmac/cmac.cpp @@ -6,7 +6,7 @@ */ #include <botan/cmac.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> namespace Botan { diff --git a/src/mac/hmac/hmac.cpp b/src/mac/hmac/hmac.cpp index dcd6bce5d..f69504c82 100644 --- a/src/mac/hmac/hmac.cpp +++ b/src/mac/hmac/hmac.cpp @@ -7,7 +7,7 @@ */ #include <botan/hmac.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> namespace Botan { diff --git a/src/mac/x919_mac/x919_mac.cpp b/src/mac/x919_mac/x919_mac.cpp index 52260494a..42e039d60 100644 --- a/src/mac/x919_mac/x919_mac.cpp +++ b/src/mac/x919_mac/x919_mac.cpp @@ -6,7 +6,7 @@ */ #include <botan/x919_mac.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <algorithm> namespace Botan { diff --git a/src/math/bigint/big_ops2.cpp b/src/math/bigint/big_ops2.cpp index 863e5bde4..1137fe4b2 100644 --- a/src/math/bigint/big_ops2.cpp +++ b/src/math/bigint/big_ops2.cpp @@ -7,7 +7,7 @@ #include <botan/bigint.h> #include <botan/internal/mp_core.h> -#include <botan/bit_ops.h> +#include <botan/internal/bit_ops.h> #include <algorithm> namespace Botan { diff --git a/src/math/bigint/big_ops3.cpp b/src/math/bigint/big_ops3.cpp index 8f7861003..b92b71543 100644 --- a/src/math/bigint/big_ops3.cpp +++ b/src/math/bigint/big_ops3.cpp @@ -8,7 +8,7 @@ #include <botan/bigint.h> #include <botan/divide.h> #include <botan/internal/mp_core.h> -#include <botan/bit_ops.h> +#include <botan/internal/bit_ops.h> #include <algorithm> namespace Botan { diff --git a/src/math/bigint/bigint.cpp b/src/math/bigint/bigint.cpp index dba4f6204..a11960aca 100644 --- a/src/math/bigint/bigint.cpp +++ b/src/math/bigint/bigint.cpp @@ -7,9 +7,9 @@ #include <botan/bigint.h> #include <botan/internal/mp_core.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> #include <botan/parsing.h> -#include <botan/rounding.h> +#include <botan/internal/rounding.h> namespace Botan { diff --git a/src/math/bigint/bigint.h b/src/math/bigint/bigint.h index 4f7f6f5bd..55ccf7aae 100644 --- a/src/math/bigint/bigint.h +++ b/src/math/bigint/bigint.h @@ -40,7 +40,7 @@ class BOTAN_DLL BigInt /** * DivideByZero Exception */ - struct DivideByZero : public Exception + struct BOTAN_DLL DivideByZero : public Exception { DivideByZero() : Exception("BigInt divide by zero") {} }; /** diff --git a/src/math/gfpmath/gfp_element.h b/src/math/gfpmath/gfp_element.h index 0fc4e0c7f..c6cfc9d32 100644 --- a/src/math/gfpmath/gfp_element.h +++ b/src/math/gfpmath/gfp_element.h @@ -225,14 +225,6 @@ class BOTAN_DLL GFpElement //friend declarations for non-member functions - /** - * write a GFpElement to an output stream. - * @param output the output stream to write to - * @param elem the object to write - * @result the output stream - */ - friend std::ostream& operator<<(std::ostream& output, const GFpElement& elem); - friend class Point_Coords_GFp; /** @@ -259,31 +251,37 @@ class BOTAN_DLL GFpElement }; // relational operators -bool operator==(const GFpElement& lhs, const GFpElement& rhs); +bool BOTAN_DLL operator==(const GFpElement& lhs, const GFpElement& rhs); inline bool operator!=(const GFpElement& lhs, const GFpElement& rhs ) { return !operator==(lhs, rhs); } // arithmetic operators -GFpElement operator+(const GFpElement& lhs, const GFpElement& rhs); -GFpElement operator-(const GFpElement& lhs, const GFpElement& rhs); -GFpElement operator-(const GFpElement& lhs); +GFpElement BOTAN_DLL operator+(const GFpElement& lhs, const GFpElement& rhs); +GFpElement BOTAN_DLL operator-(const GFpElement& lhs, const GFpElement& rhs); +GFpElement BOTAN_DLL operator-(const GFpElement& lhs); -GFpElement operator*(const GFpElement& lhs, const GFpElement& rhs); -GFpElement operator/(const GFpElement& lhs, const GFpElement& rhs); -GFpElement operator* (const GFpElement& lhs, u32bit rhs); -GFpElement operator* (u32bit rhs, const GFpElement& lhs); +GFpElement BOTAN_DLL operator*(const GFpElement& lhs, const GFpElement& rhs); +GFpElement BOTAN_DLL operator/(const GFpElement& lhs, const GFpElement& rhs); +GFpElement BOTAN_DLL operator* (const GFpElement& lhs, u32bit rhs); +GFpElement BOTAN_DLL operator* (u32bit rhs, const GFpElement& lhs); -// io operators -std::ostream& operator<<(std::ostream& output, const GFpElement& elem); + +/** +* write a GFpElement to an output stream. +* @param output the output stream to write to +* @param elem the object to write +* @result the output stream +*/ +BOTAN_DLL std::ostream& operator<<(std::ostream& output, const GFpElement& elem); // return (*this)^(-1) -GFpElement inverse(const GFpElement& elem); +GFpElement BOTAN_DLL inverse(const GFpElement& elem); // encoding and decoding -SecureVector<byte> FE2OSP(const GFpElement& elem); -GFpElement OS2FEP(MemoryRegion<byte> const& os, BigInt p); +SecureVector<byte> BOTAN_DLL FE2OSP(const GFpElement& elem); +GFpElement BOTAN_DLL OS2FEP(MemoryRegion<byte> const& os, BigInt p); inline void swap(GFpElement& x, GFpElement& y) { diff --git a/src/math/gfpmath/point_gfp.cpp b/src/math/gfpmath/point_gfp.cpp index b67631f7b..f95add9f7 100644 --- a/src/math/gfpmath/point_gfp.cpp +++ b/src/math/gfpmath/point_gfp.cpp @@ -839,7 +839,7 @@ void PointGFp::swap(PointGFp& other) std::swap<bool>(mAZpow4_set, other.mAZpow4_set); } -PointGFp const mult2(const PointGFp& point) +PointGFp mult2(const PointGFp& point) { return (PointGFp(point)).mult2_in_place(); } @@ -1114,8 +1114,8 @@ GFpElement PointGFp::decompress(bool yMod2, const GFpElement& x, return GFpElement(curve.get_p(),z); } -PointGFp const create_random_point(RandomNumberGenerator& rng, - const CurveGFp& curve) +PointGFp create_random_point(RandomNumberGenerator& rng, + const CurveGFp& curve) { // create a random point diff --git a/src/math/gfpmath/point_gfp.h b/src/math/gfpmath/point_gfp.h index 62b3bc7da..0c7bb8428 100644 --- a/src/math/gfpmath/point_gfp.h +++ b/src/math/gfpmath/point_gfp.h @@ -18,7 +18,7 @@ namespace Botan { -struct Illegal_Point : public Exception +struct BOTAN_DLL Illegal_Point : public Exception { Illegal_Point(const std::string& err = "") : Exception(err) {} }; @@ -260,36 +260,39 @@ class BOTAN_DLL PointGFp }; // relational operators -bool operator==(const PointGFp& lhs, const PointGFp& rhs); +bool BOTAN_DLL operator==(const PointGFp& lhs, const PointGFp& rhs); inline bool operator!=(const PointGFp& lhs, const PointGFp& rhs ) { return !operator==(lhs, rhs); } // arithmetic operators -PointGFp operator+(const PointGFp& lhs, const PointGFp& rhs); -PointGFp operator-(const PointGFp& lhs, const PointGFp& rhs); -PointGFp operator-(const PointGFp& lhs); +PointGFp BOTAN_DLL operator+(const PointGFp& lhs, const PointGFp& rhs); +PointGFp BOTAN_DLL operator-(const PointGFp& lhs, const PointGFp& rhs); +PointGFp BOTAN_DLL operator-(const PointGFp& lhs); -PointGFp operator*(const BigInt& scalar, const PointGFp& point); -PointGFp operator*(const PointGFp& point, const BigInt& scalar); -PointGFp mult_point_secure(const PointGFp& point, - const BigInt& scalar, - const BigInt& point_order, - const BigInt& max_secret); +PointGFp BOTAN_DLL operator*(const BigInt& scalar, const PointGFp& point); +PointGFp BOTAN_DLL operator*(const PointGFp& point, const BigInt& scalar); +PointGFp BOTAN_DLL mult_point_secure(const PointGFp& point, + const BigInt& scalar, + const BigInt& point_order, + const BigInt& max_secret); -PointGFp const mult2(const PointGFp& point); +PointGFp BOTAN_DLL mult2(const PointGFp& point); -PointGFp const create_random_point(RandomNumberGenerator& rng, - const CurveGFp& curve); +PointGFp BOTAN_DLL create_random_point(RandomNumberGenerator& rng, + const CurveGFp& curve); // encoding and decoding -SecureVector<byte> EC2OSP(const PointGFp& point, byte format); -PointGFp OS2ECP(MemoryRegion<byte> const& os, const CurveGFp& curve); +SecureVector<byte> BOTAN_DLL EC2OSP(const PointGFp& point, byte format); +PointGFp BOTAN_DLL OS2ECP(MemoryRegion<byte> const& os, const CurveGFp& curve); -SecureVector<byte> encode_uncompressed(const PointGFp& point); // maybe make private -SecureVector<byte> encode_hybrid(const PointGFp& point); // maybe make private -SecureVector<byte> encode_compressed(const PointGFp& point); // maybe make private +/* Should these be private? */ +SecureVector<byte> +BOTAN_DLL encode_uncompressed(const PointGFp& point); + +SecureVector<byte> BOTAN_DLL encode_hybrid(const PointGFp& point); +SecureVector<byte> BOTAN_DLL encode_compressed(const PointGFp& point); // swaps the states of point1 and point2, does not throw! // cf. Meyers, Item 25 diff --git a/src/math/numbertheory/mp_numth.cpp b/src/math/numbertheory/mp_numth.cpp index 484c15f8d..03eb8d9db 100644 --- a/src/math/numbertheory/mp_numth.cpp +++ b/src/math/numbertheory/mp_numth.cpp @@ -7,7 +7,7 @@ #include <botan/numthry.h> #include <botan/internal/mp_core.h> -#include <botan/rounding.h> +#include <botan/internal/rounding.h> #include <algorithm> namespace Botan { diff --git a/src/math/numbertheory/numthry.cpp b/src/math/numbertheory/numthry.cpp index 448681333..ab51b75a3 100644 --- a/src/math/numbertheory/numthry.cpp +++ b/src/math/numbertheory/numthry.cpp @@ -6,7 +6,7 @@ */ #include <botan/numthry.h> -#include <botan/bit_ops.h> +#include <botan/internal/bit_ops.h> #include <algorithm> namespace Botan { diff --git a/src/mutex/info.txt b/src/mutex/info.txt index b92b329aa..af4cf9bb3 100644 --- a/src/mutex/info.txt +++ b/src/mutex/info.txt @@ -1 +1,5 @@ define MUTEX_WRAPPERS + +<header:internal> +mutex.h +</header:internal> diff --git a/src/mutex/mutex.h b/src/mutex/mutex.h index a04ff83c9..fcb0e9982 100644 --- a/src/mutex/mutex.h +++ b/src/mutex/mutex.h @@ -15,7 +15,7 @@ namespace Botan { /* * Mutex Base Class */ -class BOTAN_DLL Mutex +class Mutex { public: virtual void lock() = 0; @@ -26,7 +26,7 @@ class BOTAN_DLL Mutex /* * Mutex Factory */ -class BOTAN_DLL Mutex_Factory +class Mutex_Factory { public: virtual Mutex* make() = 0; @@ -36,7 +36,7 @@ class BOTAN_DLL Mutex_Factory /* * Mutex Holding Class */ -class BOTAN_DLL Mutex_Holder +class Mutex_Holder { public: Mutex_Holder(Mutex* m) : mux(m) diff --git a/src/mutex/noop_mutex/info.txt b/src/mutex/noop_mutex/info.txt index de98deda0..16670b1dd 100644 --- a/src/mutex/noop_mutex/info.txt +++ b/src/mutex/noop_mutex/info.txt @@ -1 +1,9 @@ define MUTEX_NOOP + +<source> +mux_noop.cpp +</source> + +<header:internal> +mux_noop.h +</header:internal> diff --git a/src/mutex/noop_mutex/mux_noop.cpp b/src/mutex/noop_mutex/mux_noop.cpp index 5c45084fe..18151274a 100644 --- a/src/mutex/noop_mutex/mux_noop.cpp +++ b/src/mutex/noop_mutex/mux_noop.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/mux_noop.h> +#include <botan/internal/mux_noop.h> namespace Botan { diff --git a/src/mutex/noop_mutex/mux_noop.h b/src/mutex/noop_mutex/mux_noop.h index 94201cb7c..a1bd57858 100644 --- a/src/mutex/noop_mutex/mux_noop.h +++ b/src/mutex/noop_mutex/mux_noop.h @@ -8,14 +8,14 @@ #ifndef BOTAN_NOOP_MUTEX_FACTORY_H__ #define BOTAN_NOOP_MUTEX_FACTORY_H__ -#include <botan/mutex.h> +#include <botan/internal/mutex.h> namespace Botan { /* * No-Op Mutex Factory */ -class BOTAN_DLL Noop_Mutex_Factory : public Mutex_Factory +class Noop_Mutex_Factory : public Mutex_Factory { public: Mutex* make(); diff --git a/src/mutex/pthreads/info.txt b/src/mutex/pthreads/info.txt index e363cdbeb..1d826b61c 100644 --- a/src/mutex/pthreads/info.txt +++ b/src/mutex/pthreads/info.txt @@ -1,5 +1,13 @@ define MUTEX_PTHREAD +<source> +mux_pthr.cpp +</source> + +<header:internal> +mux_pthr.h +</header:internal> + <libs> all!qnx,freebsd,dragonfly,openbsd,netbsd -> pthread </libs> diff --git a/src/mutex/pthreads/mux_pthr.cpp b/src/mutex/pthreads/mux_pthr.cpp index 9f1d9816e..75a116fe8 100644 --- a/src/mutex/pthreads/mux_pthr.cpp +++ b/src/mutex/pthreads/mux_pthr.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/mux_pthr.h> +#include <botan/internal/mux_pthr.h> #include <botan/exceptn.h> #ifndef _POSIX_C_SOURCE diff --git a/src/mutex/pthreads/mux_pthr.h b/src/mutex/pthreads/mux_pthr.h index 118853947..27b854265 100644 --- a/src/mutex/pthreads/mux_pthr.h +++ b/src/mutex/pthreads/mux_pthr.h @@ -8,14 +8,14 @@ #ifndef BOTAN_MUTEX_PTHREAD_H__ #define BOTAN_MUTEX_PTHREAD_H__ -#include <botan/mutex.h> +#include <botan/internal/mutex.h> namespace Botan { /* * Pthread Mutex Factory */ -class BOTAN_DLL Pthread_Mutex_Factory : public Mutex_Factory +class Pthread_Mutex_Factory : public Mutex_Factory { public: Mutex* make(); diff --git a/src/mutex/qt_mutex/info.txt b/src/mutex/qt_mutex/info.txt index 346f04c81..7b014f886 100644 --- a/src/mutex/qt_mutex/info.txt +++ b/src/mutex/qt_mutex/info.txt @@ -2,6 +2,14 @@ define MUTEX_QT load_on request +<source> +mux_qt.cpp +</source> + +<header:internal> +mux_qt.h +</header:internal> + # 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> diff --git a/src/mutex/qt_mutex/mux_qt.cpp b/src/mutex/qt_mutex/mux_qt.cpp index 0f670c8b4..da4e5ce5c 100644 --- a/src/mutex/qt_mutex/mux_qt.cpp +++ b/src/mutex/qt_mutex/mux_qt.cpp @@ -6,7 +6,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/mux_qt.h> +#include <botan/internal/mux_qt.h> #include <qmutex.h> #if !defined(QT_THREAD_SUPPORT) diff --git a/src/mutex/qt_mutex/mux_qt.h b/src/mutex/qt_mutex/mux_qt.h index 5aed77f4b..cb396b81d 100644 --- a/src/mutex/qt_mutex/mux_qt.h +++ b/src/mutex/qt_mutex/mux_qt.h @@ -9,14 +9,14 @@ #ifndef BOTAN_MUTEX_QT_H__ #define BOTAN_MUTEX_QT_H__ -#include <botan/mutex.h> +#include <botan/internal/mutex.h> namespace Botan { /* * Qt Mutex */ -class BOTAN_DLL Qt_Mutex_Factory : public Mutex_Factory +class Qt_Mutex_Factory : public Mutex_Factory { public: Mutex* make(); diff --git a/src/mutex/win32_crit_section/info.txt b/src/mutex/win32_crit_section/info.txt index 1533ca2da..d90b8b64b 100644 --- a/src/mutex/win32_crit_section/info.txt +++ b/src/mutex/win32_crit_section/info.txt @@ -1,6 +1,12 @@ define MUTEX_WIN32 -load_on auto +<source> +mux_win32.cpp +</source> + +<header:internal> +mux_win32.h +</header:internal> <os> cygwin diff --git a/src/mutex/win32_crit_section/mux_win32.cpp b/src/mutex/win32_crit_section/mux_win32.cpp index 2a967892b..fa6051798 100644 --- a/src/mutex/win32_crit_section/mux_win32.cpp +++ b/src/mutex/win32_crit_section/mux_win32.cpp @@ -6,7 +6,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/mux_win32.h> +#include <botan/internal/mux_win32.h> #include <windows.h> namespace Botan { diff --git a/src/mutex/win32_crit_section/mux_win32.h b/src/mutex/win32_crit_section/mux_win32.h index a91850e71..4bbf6a540 100644 --- a/src/mutex/win32_crit_section/mux_win32.h +++ b/src/mutex/win32_crit_section/mux_win32.h @@ -9,14 +9,14 @@ #ifndef BOTAN_MUTEX_WIN32_H__ #define BOTAN_MUTEX_WIN32_H__ -#include <botan/mutex.h> +#include <botan/internal/mutex.h> namespace Botan { /* * Win32 Mutex Factory */ -class BOTAN_DLL Win32_Mutex_Factory : public Mutex_Factory +class Win32_Mutex_Factory : public Mutex_Factory { public: Mutex* make(); diff --git a/src/pk_pad/emsa4/emsa4.cpp b/src/pk_pad/emsa4/emsa4.cpp index dba248662..df4005aad 100644 --- a/src/pk_pad/emsa4/emsa4.cpp +++ b/src/pk_pad/emsa4/emsa4.cpp @@ -7,7 +7,7 @@ #include <botan/emsa4.h> #include <botan/mgf1.h> -#include <botan/bit_ops.h> +#include <botan/internal/bit_ops.h> namespace Botan { diff --git a/src/pubkey/dlies/dlies.cpp b/src/pubkey/dlies/dlies.cpp index 0f5d76726..3a3ab52ee 100644 --- a/src/pubkey/dlies/dlies.cpp +++ b/src/pubkey/dlies/dlies.cpp @@ -7,7 +7,7 @@ #include <botan/dlies.h> #include <botan/look_pk.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> namespace Botan { diff --git a/src/pubkey/ec_dompar/ec_dompar.h b/src/pubkey/ec_dompar/ec_dompar.h index 5ea599c9d..5f03f1c5f 100644 --- a/src/pubkey/ec_dompar/ec_dompar.h +++ b/src/pubkey/ec_dompar/ec_dompar.h @@ -92,7 +92,8 @@ class BOTAN_DLL EC_Domain_Params std::string m_oid; }; -bool operator==(EC_Domain_Params const& lhs, EC_Domain_Params const& rhs); +bool BOTAN_DLL operator==(EC_Domain_Params const& lhs, + EC_Domain_Params const& rhs); inline bool operator!=(const EC_Domain_Params& lhs, const EC_Domain_Params& rhs) @@ -102,10 +103,12 @@ inline bool operator!=(const EC_Domain_Params& lhs, enum EC_dompar_enc { ENC_EXPLICIT = 0, ENC_IMPLICITCA = 1, ENC_OID = 2 }; -SecureVector<byte> encode_der_ec_dompar(EC_Domain_Params const& dom_pars, - EC_dompar_enc enc_type); +SecureVector<byte> +BOTAN_DLL encode_der_ec_dompar(EC_Domain_Params const& dom_pars, + EC_dompar_enc enc_type); -EC_Domain_Params decode_ber_ec_dompar(SecureVector<byte> const& encoded); +EC_Domain_Params +BOTAN_DLL decode_ber_ec_dompar(SecureVector<byte> const& encoded); /** * Factory function, the only way to obtain EC domain parameters with @@ -115,7 +118,7 @@ EC_Domain_Params decode_ber_ec_dompar(SecureVector<byte> const& encoded); * @param oid the oid of the demanded EC domain parameters * @result the EC domain parameters associated with the OID */ -EC_Domain_Params get_EC_Dom_Pars_by_oid(std::string oid); +EC_Domain_Params BOTAN_DLL get_EC_Dom_Pars_by_oid(std::string oid); } diff --git a/src/pubkey/pubkey.cpp b/src/pubkey/pubkey.cpp index 4ddaa6fb6..44e31159c 100644 --- a/src/pubkey/pubkey.cpp +++ b/src/pubkey/pubkey.cpp @@ -10,7 +10,7 @@ #include <botan/ber_dec.h> #include <botan/bigint.h> #include <botan/parsing.h> -#include <botan/bit_ops.h> +#include <botan/internal/bit_ops.h> #include <memory> namespace Botan { diff --git a/src/rng/hmac_rng/hmac_rng.cpp b/src/rng/hmac_rng/hmac_rng.cpp index 26ada9047..ef9ecba2b 100644 --- a/src/rng/hmac_rng/hmac_rng.cpp +++ b/src/rng/hmac_rng/hmac_rng.cpp @@ -6,9 +6,9 @@ */ #include <botan/hmac_rng.h> -#include <botan/loadstor.h> -#include <botan/xor_buf.h> -#include <botan/stl_util.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/xor_buf.h> +#include <botan/internal/stl_util.h> #include <algorithm> namespace Botan { diff --git a/src/rng/randpool/randpool.cpp b/src/rng/randpool/randpool.cpp index 8f9a16edc..0b7f2921b 100644 --- a/src/rng/randpool/randpool.cpp +++ b/src/rng/randpool/randpool.cpp @@ -6,9 +6,9 @@ */ #include <botan/randpool.h> -#include <botan/loadstor.h> -#include <botan/xor_buf.h> -#include <botan/stl_util.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/xor_buf.h> +#include <botan/internal/stl_util.h> #include <algorithm> namespace Botan { diff --git a/src/rng/x931_rng/x931_rng.cpp b/src/rng/x931_rng/x931_rng.cpp index bd66d22bf..3ff180898 100644 --- a/src/rng/x931_rng/x931_rng.cpp +++ b/src/rng/x931_rng/x931_rng.cpp @@ -6,7 +6,7 @@ */ #include <botan/x931_rng.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <algorithm> namespace Botan { diff --git a/src/s2k/pbkdf2/pbkdf2.cpp b/src/s2k/pbkdf2/pbkdf2.cpp index 1de27c9ac..4fc1b8deb 100644 --- a/src/s2k/pbkdf2/pbkdf2.cpp +++ b/src/s2k/pbkdf2/pbkdf2.cpp @@ -6,8 +6,8 @@ */ #include <botan/pbkdf2.h> -#include <botan/loadstor.h> -#include <botan/xor_buf.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/xor_buf.h> namespace Botan { diff --git a/src/selftest/selftest.cpp b/src/selftest/selftest.cpp index 660be36e4..a4da329f4 100644 --- a/src/selftest/selftest.cpp +++ b/src/selftest/selftest.cpp @@ -8,7 +8,7 @@ #include <botan/selftest.h> #include <botan/filters.h> #include <botan/def_eng.h> -#include <botan/stl_util.h> +#include <botan/internal/stl_util.h> namespace Botan { diff --git a/src/stream/arc4/arc4.cpp b/src/stream/arc4/arc4.cpp index 293a0a336..1c89379ba 100644 --- a/src/stream/arc4/arc4.cpp +++ b/src/stream/arc4/arc4.cpp @@ -6,7 +6,7 @@ */ #include <botan/arc4.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <botan/parsing.h> namespace Botan { diff --git a/src/stream/ctr/ctr.cpp b/src/stream/ctr/ctr.cpp index 723b94f28..0b0f72da2 100644 --- a/src/stream/ctr/ctr.cpp +++ b/src/stream/ctr/ctr.cpp @@ -6,7 +6,7 @@ */ #include <botan/ctr.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> namespace Botan { diff --git a/src/stream/ofb/ofb.cpp b/src/stream/ofb/ofb.cpp index b52617789..cfa035a4f 100644 --- a/src/stream/ofb/ofb.cpp +++ b/src/stream/ofb/ofb.cpp @@ -6,7 +6,7 @@ */ #include <botan/ofb.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <algorithm> namespace Botan { diff --git a/src/stream/salsa20/salsa20.cpp b/src/stream/salsa20/salsa20.cpp index 3aae64eae..cc5d3a712 100644 --- a/src/stream/salsa20/salsa20.cpp +++ b/src/stream/salsa20/salsa20.cpp @@ -6,8 +6,8 @@ */ #include <botan/salsa20.h> -#include <botan/xor_buf.h> -#include <botan/loadstor.h> +#include <botan/internal/xor_buf.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/stream/turing/turing.cpp b/src/stream/turing/turing.cpp index 6769784c7..dec9190ab 100644 --- a/src/stream/turing/turing.cpp +++ b/src/stream/turing/turing.cpp @@ -6,8 +6,8 @@ */ #include <botan/turing.h> -#include <botan/loadstor.h> -#include <botan/xor_buf.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/xor_buf.h> namespace Botan { diff --git a/src/stream/wid_wake/wid_wake.cpp b/src/stream/wid_wake/wid_wake.cpp index 2a8946649..d52851aee 100644 --- a/src/stream/wid_wake/wid_wake.cpp +++ b/src/stream/wid_wake/wid_wake.cpp @@ -6,8 +6,8 @@ */ #include <botan/wid_wake.h> -#include <botan/loadstor.h> -#include <botan/xor_buf.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/xor_buf.h> namespace Botan { diff --git a/src/sym_algo/symkey.cpp b/src/sym_algo/symkey.cpp index e309f56ab..97bd08819 100644 --- a/src/sym_algo/symkey.cpp +++ b/src/sym_algo/symkey.cpp @@ -6,7 +6,7 @@ */ #include <botan/symkey.h> -#include <botan/xor_buf.h> +#include <botan/internal/xor_buf.h> #include <botan/rng.h> #include <botan/pipe.h> #include <botan/hex.h> diff --git a/src/utils/bswap.h b/src/utils/bswap.h index ec1e81435..3294111a0 100644 --- a/src/utils/bswap.h +++ b/src/utils/bswap.h @@ -10,7 +10,7 @@ #define BOTAN_BYTE_SWAP_H__ #include <botan/types.h> -#include <botan/rotate.h> +#include <botan/internal/rotate.h> namespace Botan { diff --git a/src/utils/cpuid.cpp b/src/utils/cpuid.cpp index 2ba7f9b77..a6f40f53c 100644 --- a/src/utils/cpuid.cpp +++ b/src/utils/cpuid.cpp @@ -7,7 +7,7 @@ #include <botan/cpuid.h> #include <botan/types.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> #include <botan/mem_ops.h> #if defined(BOTAN_TARGET_ARCH_IS_IA32) || defined(BOTAN_TARGET_ARCH_IS_AMD64) diff --git a/src/utils/datastor/datastor.cpp b/src/utils/datastor/datastor.cpp index 129dad9bf..0d808eebd 100644 --- a/src/utils/datastor/datastor.cpp +++ b/src/utils/datastor/datastor.cpp @@ -8,7 +8,7 @@ #include <botan/datastor.h> #include <botan/exceptn.h> #include <botan/parsing.h> -#include <botan/stl_util.h> +#include <botan/internal/stl_util.h> #include <botan/filters.h> namespace Botan { diff --git a/src/utils/info.txt b/src/utils/info.txt index 7324f55f6..edeeb1cf9 100644 --- a/src/utils/info.txt +++ b/src/utils/info.txt @@ -13,23 +13,25 @@ ui.cpp version.cpp </source> -<header:public> +<header:internal> bit_ops.h bswap.h -charset.h -cpuid.h loadstor.h mlock.h -parsing.h prefetch.h rotate.h rounding.h stl_util.h -time.h xor_buf.h +</header:internal> +<header:public> +charset.h +cpuid.h exceptn.h mem_ops.h +parsing.h +time.h types.h ui.h version.h diff --git a/src/utils/loadstor.h b/src/utils/loadstor.h index b15cafd2c..fa2e36c1e 100644 --- a/src/utils/loadstor.h +++ b/src/utils/loadstor.h @@ -10,9 +10,9 @@ #define BOTAN_LOAD_STORE_H__ #include <botan/types.h> -#include <botan/bswap.h> -#include <botan/rotate.h> -#include <botan/prefetch.h> +#include <botan/internal/bswap.h> +#include <botan/internal/rotate.h> +#include <botan/internal/prefetch.h> #include <cstring> #if BOTAN_TARGET_UNALIGNED_MEMORY_ACCESS_OK diff --git a/src/utils/mlock.cpp b/src/utils/mlock.cpp index 6453d8a30..bb3a38d4e 100644 --- a/src/utils/mlock.cpp +++ b/src/utils/mlock.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/mlock.h> +#include <botan/internal/mlock.h> #if defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK) #include <sys/types.h> diff --git a/src/utils/mlock.h b/src/utils/mlock.h index 0811e8190..66ced9e63 100644 --- a/src/utils/mlock.h +++ b/src/utils/mlock.h @@ -18,14 +18,14 @@ namespace Botan { * @param length the length of the memory block in bytes * @returns true if successful, false otherwise */ -BOTAN_DLL bool lock_mem(void* addr, u32bit length); +bool lock_mem(void* addr, u32bit length); /** * Unlock memory locked with lock_mem() * @param addr the start of the memory block * @param length the length of the memory block in bytes */ -BOTAN_DLL void unlock_mem(void* addr, u32bit length); +void unlock_mem(void* addr, u32bit length); } diff --git a/src/utils/parsing.cpp b/src/utils/parsing.cpp index 58a8e0b38..0ccd8a312 100644 --- a/src/utils/parsing.cpp +++ b/src/utils/parsing.cpp @@ -8,7 +8,7 @@ #include <botan/parsing.h> #include <botan/exceptn.h> #include <botan/charset.h> -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> namespace Botan { diff --git a/src/utils/simd_32/simd_altivec.h b/src/utils/simd_32/simd_altivec.h index 9cc5c1068..d24c7e73f 100644 --- a/src/utils/simd_32/simd_altivec.h +++ b/src/utils/simd_32/simd_altivec.h @@ -10,7 +10,7 @@ #if defined(BOTAN_TARGET_CPU_HAS_ALTIVEC) -#include <botan/loadstor.h> +#include <botan/internal/loadstor.h> #include <botan/cpuid.h> #include <altivec.h> diff --git a/src/utils/simd_32/simd_scalar.h b/src/utils/simd_32/simd_scalar.h index 148b76c35..e8e46db44 100644 --- a/src/utils/simd_32/simd_scalar.h +++ b/src/utils/simd_32/simd_scalar.h @@ -8,8 +8,8 @@ #ifndef BOTAN_SIMD_SCALAR_H__ #define BOTAN_SIMD_SCALAR_H__ -#include <botan/loadstor.h> -#include <botan/bswap.h> +#include <botan/internal/loadstor.h> +#include <botan/internal/bswap.h> namespace Botan { |