diff options
84 files changed, 181 insertions, 129 deletions
diff --git a/src/asn1/asn1_int.h b/src/asn1/asn1_int.h index 619f45b53..e6fb09398 100644 --- a/src/asn1/asn1_int.h +++ b/src/asn1/asn1_int.h @@ -89,7 +89,7 @@ bool maybe_BER(DataSource&); /* * General BER Decoding Error Exception */ -struct BER_Decoding_Error : public Decoding_Error +struct BOTAN_DLL BER_Decoding_Error : public Decoding_Error { BER_Decoding_Error(const std::string&); }; @@ -97,7 +97,7 @@ struct BER_Decoding_Error : public Decoding_Error /* * Exception For Incorrect BER Taggings */ -struct BER_Bad_Tag : public BER_Decoding_Error +struct BOTAN_DLL BER_Bad_Tag : public BER_Decoding_Error { BER_Bad_Tag(const std::string&, ASN1_Tag); BER_Bad_Tag(const std::string&, ASN1_Tag, ASN1_Tag); diff --git a/src/block/gost_28147/gost_28147.h b/src/block/gost_28147/gost_28147.h index bf6f8178b..2b7daaf6a 100644 --- a/src/block/gost_28147/gost_28147.h +++ b/src/block/gost_28147/gost_28147.h @@ -12,15 +12,13 @@ namespace Botan { -class GOST_28147_89_Params; - /** * The GOST 28147-89 block cipher uses a set of 4 bit Sboxes, however * the standard does not actually define these Sboxes; they are * considered a local configuration issue. Several different sets are * used. */ -class GOST_28147_89_Params +class BOTAN_DLL GOST_28147_89_Params { public: byte sbox_entry(u32bit row, u32bit col) const; diff --git a/src/cert/cvc/eac_obj.h b/src/cert/cvc/eac_obj.h index 2c1250a9a..d357adb7d 100644 --- a/src/cert/cvc/eac_obj.h +++ b/src/cert/cvc/eac_obj.h @@ -18,6 +18,7 @@ #include <botan/oids.h> #include <botan/look_pk.h> #include <botan/ecdsa_sig.h> +#include <botan/freestore.h> #include <string> namespace Botan { diff --git a/src/cert/cvc/signed_obj.h b/src/cert/cvc/signed_obj.h index 3c233d21b..17b75a08a 100644 --- a/src/cert/cvc/signed_obj.h +++ b/src/cert/cvc/signed_obj.h @@ -11,7 +11,6 @@ #include <botan/asn1_obj.h> #include <botan/pubkey_enums.h> -#include <botan/freestore.h> #include <botan/pipe.h> #include <vector> diff --git a/src/constructs/aont/package.h b/src/constructs/aont/package.h index 5024c0421..9c23d1836 100644 --- a/src/constructs/aont/package.h +++ b/src/constructs/aont/package.h @@ -25,10 +25,10 @@ namespace AllOrNothingTransform { * @arg output the output data buffer (must be at least * input_len + cipher->BLOCK_SIZE bytes long) */ -void package(RandomNumberGenerator& rng, - BlockCipher* cipher, - const byte input[], u32bit input_len, - byte output[]); +void BOTAN_DLL package(RandomNumberGenerator& rng, + BlockCipher* cipher, + const byte input[], u32bit input_len, + byte output[]); /** * Rivest's Package Tranform (Inversion) @@ -39,9 +39,9 @@ void package(RandomNumberGenerator& rng, * @arg output the output data buffer (must be at least * input_len - cipher->BLOCK_SIZE bytes long) */ -void unpackage(BlockCipher* cipher, - const byte input[], u32bit input_len, - byte output[]); +void BOTAN_DLL unpackage(BlockCipher* cipher, + const byte input[], u32bit input_len, + byte output[]); } diff --git a/src/constructs/fpe/fpe.h b/src/constructs/fpe/fpe.h index fba1652d3..75f90247f 100644 --- a/src/constructs/fpe/fpe.h +++ b/src/constructs/fpe/fpe.h @@ -16,16 +16,16 @@ namespace Botan { /* * Encrypt X from and onto the group Z_n using key and tweak */ -BigInt fpe_encrypt(const BigInt& n, const BigInt& X, - const SymmetricKey& key, - const MemoryRegion<byte>& tweak); +BigInt BOTAN_DLL fpe_encrypt(const BigInt& n, const BigInt& X, + const SymmetricKey& key, + const MemoryRegion<byte>& tweak); /* * Decrypt X from and onto the group Z_n using key and tweak */ -BigInt fpe_decrypt(const BigInt& n, const BigInt& X, - const SymmetricKey& key, - const MemoryRegion<byte>& tweak); +BigInt BOTAN_DLL fpe_decrypt(const BigInt& n, const BigInt& X, + const SymmetricKey& key, + const MemoryRegion<byte>& tweak); } diff --git a/src/constructs/tss/tss.h b/src/constructs/tss/tss.h index 6e623c193..45d64d9cb 100644 --- a/src/constructs/tss/tss.h +++ b/src/constructs/tss/tss.h @@ -15,7 +15,7 @@ namespace Botan { -class RTSS_Share +class BOTAN_DLL RTSS_Share { public: /** diff --git a/src/engine/aes_isa_eng/aes_isa_engine.h b/src/engine/aes_isa_eng/aes_isa_engine.h index 602a114a9..5f22e4105 100644 --- a/src/engine/aes_isa_eng/aes_isa_engine.h +++ b/src/engine/aes_isa_eng/aes_isa_engine.h @@ -12,7 +12,7 @@ namespace Botan { -class BOTAN_DLL AES_ISA_Engine : public Engine +class AES_ISA_Engine : public Engine { public: std::string provider_name() const { return "aes_isa"; } diff --git a/src/engine/aes_isa_eng/info.txt b/src/engine/aes_isa_eng/info.txt index c0695aaf3..10159f7ec 100644 --- a/src/engine/aes_isa_eng/info.txt +++ b/src/engine/aes_isa_eng/info.txt @@ -1,3 +1,11 @@ define ENGINE_AES_ISA load_on dep + +<source> +aes_isa_engine.cpp +</source> + +<header:internal> +aes_isa_engine.h +</header:internal> diff --git a/src/engine/amd64_eng/eng_amd64.cpp b/src/engine/amd64_eng/amd64_engine.cpp index eed2cf303..6de1484fb 100644 --- a/src/engine/amd64_eng/eng_amd64.cpp +++ b/src/engine/amd64_eng/amd64_engine.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_amd64.h> +#include <botan/internal/amd64_engine.h> #if defined(BOTAN_HAS_SHA1_AMD64) #include <botan/sha1_amd64.h> diff --git a/src/engine/amd64_eng/eng_amd64.h b/src/engine/amd64_eng/amd64_engine.h index 528291fed..dc6f3e993 100644 --- a/src/engine/amd64_eng/eng_amd64.h +++ b/src/engine/amd64_eng/amd64_engine.h @@ -12,7 +12,7 @@ namespace Botan { -class BOTAN_DLL AMD64_Assembler_Engine : public Engine +class AMD64_Assembler_Engine : public Engine { public: std::string provider_name() const { return "amd64"; } diff --git a/src/engine/amd64_eng/info.txt b/src/engine/amd64_eng/info.txt index 2ae2aaad0..089abd7ad 100644 --- a/src/engine/amd64_eng/info.txt +++ b/src/engine/amd64_eng/info.txt @@ -1,3 +1,11 @@ define ENGINE_AMD64_ASSEMBLER load_on dep + +<header:internal> +amd64_engine.h +</header:internal> + +<source> +amd64_engine.cpp +</source> diff --git a/src/engine/def_engine/def_mode.cpp b/src/engine/def_engine/def_mode.cpp index b7373ef84..233385eda 100644 --- a/src/engine/def_engine/def_mode.cpp +++ b/src/engine/def_engine/def_mode.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/def_eng.h> +#include <botan/internal/default_engine.h> #include <botan/parsing.h> #include <botan/filters.h> #include <botan/algo_factory.h> diff --git a/src/engine/def_engine/def_pk_ops.cpp b/src/engine/def_engine/def_pk_ops.cpp index 31dce7a74..3ac608819 100644 --- a/src/engine/def_engine/def_pk_ops.cpp +++ b/src/engine/def_engine/def_pk_ops.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/def_eng.h> +#include <botan/internal/default_engine.h> #if defined(BOTAN_HAS_IF_PUBLIC_KEY_FAMILY) #include <botan/if_op.h> diff --git a/src/engine/def_engine/def_powm.cpp b/src/engine/def_engine/def_powm.cpp index 9e7a88a1a..9767e51ef 100644 --- a/src/engine/def_engine/def_powm.cpp +++ b/src/engine/def_engine/def_powm.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/def_eng.h> -#include <botan/def_powm.h> +#include <botan/internal/default_engine.h> +#include <botan/internal/def_powm.h> namespace Botan { diff --git a/src/engine/def_engine/def_eng.h b/src/engine/def_engine/default_engine.h index ba5bee8ef..6846d3497 100644 --- a/src/engine/def_engine/def_eng.h +++ b/src/engine/def_engine/default_engine.h @@ -15,7 +15,7 @@ namespace Botan { /* * Default Engine */ -class BOTAN_DLL Default_Engine : public Engine +class Default_Engine : public Engine { public: std::string provider_name() const { return "core"; } diff --git a/src/engine/def_engine/info.txt b/src/engine/def_engine/info.txt index 74b4d3f9b..faa591696 100644 --- a/src/engine/def_engine/info.txt +++ b/src/engine/def_engine/info.txt @@ -1,8 +1,8 @@ define DEFAULT_ENGINE -<header:public> -def_eng.h -</header:public> +<header:internal> +default_engine.h +</header:internal> <source> def_mode.cpp diff --git a/src/engine/def_engine/lookup_block.cpp b/src/engine/def_engine/lookup_block.cpp index 7ee5f5810..cdad76c46 100644 --- a/src/engine/def_engine/lookup_block.cpp +++ b/src/engine/def_engine/lookup_block.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/def_eng.h> +#include <botan/internal/default_engine.h> #include <botan/scan_name.h> #include <botan/algo_factory.h> diff --git a/src/engine/def_engine/lookup_hash.cpp b/src/engine/def_engine/lookup_hash.cpp index 9b2018736..4ce7915d4 100644 --- a/src/engine/def_engine/lookup_hash.cpp +++ b/src/engine/def_engine/lookup_hash.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/def_eng.h> +#include <botan/internal/default_engine.h> #include <botan/scan_name.h> #include <botan/algo_factory.h> #include <memory> diff --git a/src/engine/def_engine/lookup_mac.cpp b/src/engine/def_engine/lookup_mac.cpp index 3fef12b59..adeec881b 100644 --- a/src/engine/def_engine/lookup_mac.cpp +++ b/src/engine/def_engine/lookup_mac.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/def_eng.h> +#include <botan/internal/default_engine.h> #include <botan/scan_name.h> #include <botan/algo_factory.h> diff --git a/src/engine/def_engine/lookup_stream.cpp b/src/engine/def_engine/lookup_stream.cpp index e2f1b32b8..0ec9620e6 100644 --- a/src/engine/def_engine/lookup_stream.cpp +++ b/src/engine/def_engine/lookup_stream.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/def_eng.h> +#include <botan/internal/default_engine.h> #include <botan/scan_name.h> #if defined(BOTAN_HAS_ARC4) diff --git a/src/engine/gnump/gmp_dh.cpp b/src/engine/gnump/gmp_dh.cpp index b33240268..430530dd3 100644 --- a/src/engine/gnump/gmp_dh.cpp +++ b/src/engine/gnump/gmp_dh.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_gmp.h> -#include <botan/gmp_wrap.h> +#include <botan/internal/gnump_engine.h> +#include <botan/internal/gmp_wrap.h> #include <gmp.h> namespace Botan { diff --git a/src/engine/gnump/gmp_dsa.cpp b/src/engine/gnump/gmp_dsa.cpp index 69a9c3e9c..b350a2075 100644 --- a/src/engine/gnump/gmp_dsa.cpp +++ b/src/engine/gnump/gmp_dsa.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_gmp.h> -#include <botan/gmp_wrap.h> +#include <botan/internal/gnump_engine.h> +#include <botan/internal/gmp_wrap.h> #include <gmp.h> namespace Botan { diff --git a/src/engine/gnump/gmp_elg.cpp b/src/engine/gnump/gmp_elg.cpp index ee109f1d6..539804a23 100644 --- a/src/engine/gnump/gmp_elg.cpp +++ b/src/engine/gnump/gmp_elg.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_gmp.h> -#include <botan/gmp_wrap.h> +#include <botan/internal/gnump_engine.h> +#include <botan/internal/gmp_wrap.h> #include <gmp.h> namespace Botan { diff --git a/src/engine/gnump/gmp_if.cpp b/src/engine/gnump/gmp_if.cpp index b96f2ddac..64fbe386a 100644 --- a/src/engine/gnump/gmp_if.cpp +++ b/src/engine/gnump/gmp_if.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_gmp.h> -#include <botan/gmp_wrap.h> +#include <botan/internal/gnump_engine.h> +#include <botan/internal/gmp_wrap.h> #include <gmp.h> namespace Botan { diff --git a/src/engine/gnump/gmp_mem.cpp b/src/engine/gnump/gmp_mem.cpp index 89a1ed2d4..59e0cc4c5 100644 --- a/src/engine/gnump/gmp_mem.cpp +++ b/src/engine/gnump/gmp_mem.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_gmp.h> +#include <botan/internal/gnump_engine.h> #include <cstring> #include <gmp.h> diff --git a/src/engine/gnump/gmp_nr.cpp b/src/engine/gnump/gmp_nr.cpp index 4aeb09fe2..7d6fe536d 100644 --- a/src/engine/gnump/gmp_nr.cpp +++ b/src/engine/gnump/gmp_nr.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_gmp.h> -#include <botan/gmp_wrap.h> +#include <botan/internal/gnump_engine.h> +#include <botan/internal/gmp_wrap.h> #include <gmp.h> namespace Botan { diff --git a/src/engine/gnump/gmp_powm.cpp b/src/engine/gnump/gmp_powm.cpp index 687aed88a..70c2b2f5e 100644 --- a/src/engine/gnump/gmp_powm.cpp +++ b/src/engine/gnump/gmp_powm.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_gmp.h> -#include <botan/gmp_wrap.h> +#include <botan/internal/gnump_engine.h> +#include <botan/internal/gmp_wrap.h> namespace Botan { diff --git a/src/engine/gnump/gmp_wrap.cpp b/src/engine/gnump/gmp_wrap.cpp index 735fc7070..39d107a78 100644 --- a/src/engine/gnump/gmp_wrap.cpp +++ b/src/engine/gnump/gmp_wrap.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/gmp_wrap.h> +#include <botan/internal/gmp_wrap.h> #define GNU_MP_VERSION_CODE_FOR(a,b,c) ((a << 16) | (b << 8) | (c)) diff --git a/src/engine/gnump/gmp_wrap.h b/src/engine/gnump/gmp_wrap.h index 11a51c87d..f8d9cf365 100644 --- a/src/engine/gnump/gmp_wrap.h +++ b/src/engine/gnump/gmp_wrap.h @@ -16,7 +16,7 @@ namespace Botan { /* * Lightweight GMP mpz_t Wrapper */ -class BOTAN_DLL GMP_MPZ +class GMP_MPZ { public: mpz_t value; diff --git a/src/engine/gnump/eng_gmp.h b/src/engine/gnump/gnump_engine.h index 6a52b7e51..ec4a7e721 100644 --- a/src/engine/gnump/eng_gmp.h +++ b/src/engine/gnump/gnump_engine.h @@ -15,7 +15,7 @@ namespace Botan { /* * GMP Engine */ -class BOTAN_DLL GMP_Engine : public Engine +class GMP_Engine : public Engine { public: std::string provider_name() const { return "gmp"; } diff --git a/src/engine/gnump/info.txt b/src/engine/gnump/info.txt index 9566bded2..bd5c15f7f 100644 --- a/src/engine/gnump/info.txt +++ b/src/engine/gnump/info.txt @@ -6,11 +6,8 @@ load_on request all -> gmp </libs> -<header:public> -eng_gmp.h -</header:public> - <header:internal> +gnump_engine.h gmp_wrap.h </header:internal> diff --git a/src/engine/ia32_eng/eng_ia32.cpp b/src/engine/ia32_eng/ia32_engine.cpp index 6ff2a4be4..eb7795888 100644 --- a/src/engine/ia32_eng/eng_ia32.cpp +++ b/src/engine/ia32_eng/ia32_engine.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_ia32.h> +#include <botan/internal/ia32_engine.h> #if defined(BOTAN_HAS_SERPENT_IA32) #include <botan/serp_ia32.h> diff --git a/src/engine/ia32_eng/eng_ia32.h b/src/engine/ia32_eng/ia32_engine.h index b7cb4824a..517b88aa8 100644 --- a/src/engine/ia32_eng/eng_ia32.h +++ b/src/engine/ia32_eng/ia32_engine.h @@ -12,7 +12,7 @@ namespace Botan { -class BOTAN_DLL IA32_Assembler_Engine : public Engine +class IA32_Assembler_Engine : public Engine { public: std::string provider_name() const { return "ia32"; } diff --git a/src/engine/ia32_eng/info.txt b/src/engine/ia32_eng/info.txt index d2106c555..258c64d1d 100644 --- a/src/engine/ia32_eng/info.txt +++ b/src/engine/ia32_eng/info.txt @@ -1,3 +1,11 @@ define ENGINE_IA32_ASSEMBLER load_on dep + +<source> +ia32_engine.cpp +</source> + +<header:internal> +ia32_engine.h +</header:internal> diff --git a/src/engine/openssl/arc4_openssl.cpp b/src/engine/openssl/arc4_openssl.cpp index 793e1faff..d76bce349 100644 --- a/src/engine/openssl/arc4_openssl.cpp +++ b/src/engine/openssl/arc4_openssl.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_ossl.h> +#include <botan/internal/openssl_engine.h> #include <botan/parsing.h> #include <openssl/rc4.h> diff --git a/src/engine/openssl/bn_powm.cpp b/src/engine/openssl/bn_powm.cpp index 7b836d170..abf4f47c9 100644 --- a/src/engine/openssl/bn_powm.cpp +++ b/src/engine/openssl/bn_powm.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_ossl.h> -#include <botan/bn_wrap.h> +#include <botan/internal/openssl_engine.h> +#include <botan/internal/bn_wrap.h> namespace Botan { diff --git a/src/engine/openssl/bn_wrap.cpp b/src/engine/openssl/bn_wrap.cpp index e1cfe3f95..6f1b5ef25 100644 --- a/src/engine/openssl/bn_wrap.cpp +++ b/src/engine/openssl/bn_wrap.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/bn_wrap.h> +#include <botan/internal/bn_wrap.h> namespace Botan { diff --git a/src/engine/openssl/bn_wrap.h b/src/engine/openssl/bn_wrap.h index 4d18be1b5..0307189a9 100644 --- a/src/engine/openssl/bn_wrap.h +++ b/src/engine/openssl/bn_wrap.h @@ -16,7 +16,7 @@ namespace Botan { /* * Lightweight OpenSSL BN Wrapper */ -class BOTAN_DLL OSSL_BN +class OSSL_BN { public: BIGNUM* value; @@ -36,7 +36,7 @@ class BOTAN_DLL OSSL_BN /* * Lightweight OpenSSL BN_CTX Wrapper */ -class BOTAN_DLL OSSL_BN_CTX +class OSSL_BN_CTX { public: BN_CTX* value; diff --git a/src/engine/openssl/info.txt b/src/engine/openssl/info.txt index d30e76293..c65f80a29 100644 --- a/src/engine/openssl/info.txt +++ b/src/engine/openssl/info.txt @@ -6,11 +6,8 @@ load_on request all -> crypto </libs> -<header:public> -eng_ossl.h -</header:public> - <header:internal> +openssl_engine.h bn_wrap.h </header:internal> diff --git a/src/engine/openssl/eng_ossl.h b/src/engine/openssl/openssl_engine.h index 7105546dd..4ee2be2c0 100644 --- a/src/engine/openssl/eng_ossl.h +++ b/src/engine/openssl/openssl_engine.h @@ -15,7 +15,7 @@ namespace Botan { /* * OpenSSL Engine */ -class BOTAN_DLL OpenSSL_Engine : public Engine +class OpenSSL_Engine : public Engine { public: /** diff --git a/src/engine/openssl/ossl_bc.cpp b/src/engine/openssl/ossl_bc.cpp index 7fdf54e42..98a5b6963 100644 --- a/src/engine/openssl/ossl_bc.cpp +++ b/src/engine/openssl/ossl_bc.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_ossl.h> +#include <botan/internal/openssl_engine.h> #include <openssl/evp.h> namespace Botan { diff --git a/src/engine/openssl/ossl_dh.cpp b/src/engine/openssl/ossl_dh.cpp index 72eab8a48..7cbe6477d 100644 --- a/src/engine/openssl/ossl_dh.cpp +++ b/src/engine/openssl/ossl_dh.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_ossl.h> -#include <botan/bn_wrap.h> +#include <botan/internal/openssl_engine.h> +#include <botan/internal/bn_wrap.h> #include <openssl/opensslv.h> #if OPENSSL_VERSION_NUMBER < 0x0090700F diff --git a/src/engine/openssl/ossl_dsa.cpp b/src/engine/openssl/ossl_dsa.cpp index bfffb8796..66529bcec 100644 --- a/src/engine/openssl/ossl_dsa.cpp +++ b/src/engine/openssl/ossl_dsa.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_ossl.h> -#include <botan/bn_wrap.h> +#include <botan/internal/openssl_engine.h> +#include <botan/internal/bn_wrap.h> #include <openssl/opensslv.h> #if OPENSSL_VERSION_NUMBER < 0x0090700F diff --git a/src/engine/openssl/ossl_elg.cpp b/src/engine/openssl/ossl_elg.cpp index aefda9a1e..35c59a7ff 100644 --- a/src/engine/openssl/ossl_elg.cpp +++ b/src/engine/openssl/ossl_elg.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_ossl.h> -#include <botan/bn_wrap.h> +#include <botan/internal/openssl_engine.h> +#include <botan/internal/bn_wrap.h> #include <openssl/opensslv.h> #if OPENSSL_VERSION_NUMBER < 0x0090700F diff --git a/src/engine/openssl/ossl_if.cpp b/src/engine/openssl/ossl_if.cpp index bbc10d549..a30a4d8b4 100644 --- a/src/engine/openssl/ossl_if.cpp +++ b/src/engine/openssl/ossl_if.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_ossl.h> -#include <botan/bn_wrap.h> +#include <botan/internal/openssl_engine.h> +#include <botan/internal/bn_wrap.h> #include <openssl/opensslv.h> #if OPENSSL_VERSION_NUMBER < 0x0090700F diff --git a/src/engine/openssl/ossl_md.cpp b/src/engine/openssl/ossl_md.cpp index 1e01a6f25..f41e0f950 100644 --- a/src/engine/openssl/ossl_md.cpp +++ b/src/engine/openssl/ossl_md.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_ossl.h> +#include <botan/internal/openssl_engine.h> #include <openssl/evp.h> namespace Botan { diff --git a/src/engine/openssl/ossl_nr.cpp b/src/engine/openssl/ossl_nr.cpp index 532e4b8be..b14ec7f8c 100644 --- a/src/engine/openssl/ossl_nr.cpp +++ b/src/engine/openssl/ossl_nr.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include <botan/eng_ossl.h> -#include <botan/bn_wrap.h> +#include <botan/internal/openssl_engine.h> +#include <botan/internal/bn_wrap.h> #include <openssl/opensslv.h> #if OPENSSL_VERSION_NUMBER < 0x0090700F diff --git a/src/engine/simd_engine/info.txt b/src/engine/simd_engine/info.txt index b0523285f..cddb7524a 100644 --- a/src/engine/simd_engine/info.txt +++ b/src/engine/simd_engine/info.txt @@ -1,3 +1,11 @@ define ENGINE_SIMD load_on dep + +<source> +simd_engine.cpp +</source> + +<header:internal> +simd_engine.h +</header:internal> diff --git a/src/engine/simd_engine/simd_engine.cpp b/src/engine/simd_engine/simd_engine.cpp index 60ff8ba1d..892221f22 100644 --- a/src/engine/simd_engine/simd_engine.cpp +++ b/src/engine/simd_engine/simd_engine.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/simd_engine.h> +#include <botan/internal/simd_engine.h> #include <botan/internal/simd_32.h> #include <botan/cpuid.h> diff --git a/src/engine/simd_engine/simd_engine.h b/src/engine/simd_engine/simd_engine.h index 22a58e203..722b5529b 100644 --- a/src/engine/simd_engine/simd_engine.h +++ b/src/engine/simd_engine/simd_engine.h @@ -12,7 +12,7 @@ namespace Botan { -class BOTAN_DLL SIMD_Engine : public Engine +class SIMD_Engine : public Engine { public: std::string provider_name() const { return "simd"; } diff --git a/src/entropy/entropy_src.h b/src/entropy/entropy_src.h index be1a16636..4d01bce7c 100644 --- a/src/entropy/entropy_src.h +++ b/src/entropy/entropy_src.h @@ -17,7 +17,7 @@ namespace Botan { /** * Class used to accumulate the poll results of EntropySources */ -class Entropy_Accumulator +class BOTAN_DLL Entropy_Accumulator { public: Entropy_Accumulator(u32bit goal) : @@ -63,7 +63,7 @@ class Entropy_Accumulator double collected_bits; }; -class Entropy_Accumulator_BufferedComputation : public Entropy_Accumulator +class BOTAN_DLL Entropy_Accumulator_BufferedComputation : public Entropy_Accumulator { public: Entropy_Accumulator_BufferedComputation(BufferedComputation& sink, diff --git a/src/filters/basefilt.h b/src/filters/basefilt.h index b1bcb1a00..81e897bc4 100644 --- a/src/filters/basefilt.h +++ b/src/filters/basefilt.h @@ -15,7 +15,7 @@ namespace Botan { /** * BitBucket is a filter which simply discards all inputs */ -struct BitBucket : public Filter +struct BOTAN_DLL BitBucket : public Filter { void write(const byte[], u32bit) {} }; diff --git a/src/filters/fd_unix/fd_unix.h b/src/filters/fd_unix/fd_unix.h index 0aed0092c..0ff220e50 100644 --- a/src/filters/fd_unix/fd_unix.h +++ b/src/filters/fd_unix/fd_unix.h @@ -15,8 +15,8 @@ namespace Botan { /* * Unix I/O Operators for Pipe */ -int operator<<(int, Pipe&); -int operator>>(int, Pipe&); +int BOTAN_DLL operator<<(int, Pipe&); +int BOTAN_DLL operator>>(int, Pipe&); } diff --git a/src/filters/pipe.h b/src/filters/pipe.h index bab360c24..ba17e7e68 100644 --- a/src/filters/pipe.h +++ b/src/filters/pipe.h @@ -28,7 +28,7 @@ class BOTAN_DLL Pipe : public DataSource public: typedef u32bit message_id; - class Invalid_Message_Number : public Invalid_Argument + class BOTAN_DLL Invalid_Message_Number : public Invalid_Argument { public: Invalid_Message_Number(const std::string&, message_id); diff --git a/src/hash/bmw/bmw_512.h b/src/hash/bmw/bmw_512.h index 55cd761a9..8130a88e4 100644 --- a/src/hash/bmw/bmw_512.h +++ b/src/hash/bmw/bmw_512.h @@ -12,7 +12,7 @@ namespace Botan { -class BMW_512 : public MDx_HashFunction +class BOTAN_DLL BMW_512 : public MDx_HashFunction { public: void clear(); diff --git a/src/libstate/info.txt b/src/libstate/info.txt index 605a5a6a0..d8e9869ac 100644 --- a/src/libstate/info.txt +++ b/src/libstate/info.txt @@ -8,10 +8,13 @@ libstate.h init.h look_pk.h lookup.h -pk_engine.h scan_name.h </header:public> +<header:internal> +pk_engine.h +</header:internal> + <source> get_enc.cpp init.cpp diff --git a/src/libstate/libstate.cpp b/src/libstate/libstate.cpp index 2de621648..6aa3c5119 100644 --- a/src/libstate/libstate.cpp +++ b/src/libstate/libstate.cpp @@ -7,12 +7,13 @@ #include <botan/libstate.h> #include <botan/charset.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/default_engine.h> +#include <botan/internal/mutex.h> #include <botan/internal/mux_noop.h> #include <botan/internal/stl_util.h> #include <algorithm> @@ -30,27 +31,27 @@ #endif #if defined(BOTAN_HAS_ENGINE_IA32_ASSEMBLER) - #include <botan/eng_ia32.h> + #include <botan/internal/ia32_engine.h> #endif #if defined(BOTAN_HAS_ENGINE_AMD64_ASSEMBLER) - #include <botan/eng_amd64.h> + #include <botan/internal/amd64_engine.h> #endif #if defined(BOTAN_HAS_ENGINE_AES_ISA) - #include <botan/aes_isa_engine.h> + #include <botan/internal/aes_isa_engine.h> #endif #if defined(BOTAN_HAS_ENGINE_SIMD) - #include <botan/simd_engine.h> + #include <botan/internal/simd_engine.h> #endif #if defined(BOTAN_HAS_ENGINE_GNU_MP) - #include <botan/eng_gmp.h> + #include <botan/internal/gnump_engine.h> #endif #if defined(BOTAN_HAS_ENGINE_OPENSSL) - #include <botan/eng_ossl.h> + #include <botan/internal/openssl_engine.h> #endif namespace Botan { diff --git a/src/libstate/pk_engine.cpp b/src/libstate/pk_engine.cpp index 790ddcde4..d6f4f7015 100644 --- a/src/libstate/pk_engine.cpp +++ b/src/libstate/pk_engine.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/pk_engine.h> +#include <botan/internal/pk_engine.h> #include <botan/libstate.h> #include <botan/engine.h> diff --git a/src/math/gfpmath/gfp_element.cpp b/src/math/gfpmath/gfp_element.cpp index ebba236d5..233f2e4cd 100644 --- a/src/math/gfpmath/gfp_element.cpp +++ b/src/math/gfpmath/gfp_element.cpp @@ -8,7 +8,7 @@ #include <botan/gfp_element.h> #include <botan/numthry.h> -#include <botan/def_powm.h> +#include <botan/internal/def_powm.h> #include <botan/internal/mp_asm.h> #include <botan/internal/mp_asmi.h> #include <ostream> diff --git a/src/math/numbertheory/def_powm.h b/src/math/numbertheory/def_powm.h index 472c865c3..5b8a5a591 100644 --- a/src/math/numbertheory/def_powm.h +++ b/src/math/numbertheory/def_powm.h @@ -17,7 +17,7 @@ namespace Botan { /* * Fixed Window Exponentiator */ -class BOTAN_DLL Fixed_Window_Exponentiator : public Modular_Exponentiator +class Fixed_Window_Exponentiator : public Modular_Exponentiator { public: void set_exponent(const BigInt&); @@ -39,7 +39,7 @@ class BOTAN_DLL Fixed_Window_Exponentiator : public Modular_Exponentiator /* * Montgomery Exponentiator */ -class BOTAN_DLL Montgomery_Exponentiator : public Modular_Exponentiator +class Montgomery_Exponentiator : public Modular_Exponentiator { public: void set_exponent(const BigInt&); diff --git a/src/math/numbertheory/info.txt b/src/math/numbertheory/info.txt index 4a3e3436b..19abfaaa0 100644 --- a/src/math/numbertheory/info.txt +++ b/src/math/numbertheory/info.txt @@ -4,12 +4,15 @@ define BIGINT_MATH <header:public> blinding.h -def_powm.h numthry.h pow_mod.h reducer.h </header:public> +<header:internal> +def_powm.h +</header:internal> + <source> blinding.cpp dsa_gen.cpp diff --git a/src/math/numbertheory/numthry.h b/src/math/numbertheory/numthry.h index e4c043799..ae2c219fc 100644 --- a/src/math/numbertheory/numthry.h +++ b/src/math/numbertheory/numthry.h @@ -41,7 +41,7 @@ BigInt BOTAN_DLL power_mod(const BigInt&, const BigInt&, const BigInt&); * Compute the square root of x modulo a prime * using the Shanks-Tonnelli algorithm */ -BigInt ressol(const BigInt& x, const BigInt& p); +BigInt BOTAN_DLL ressol(const BigInt& x, const BigInt& p); /* * Utility Functions diff --git a/src/math/numbertheory/pow_mod.cpp b/src/math/numbertheory/pow_mod.cpp index fd9b8e921..8d6bac699 100644 --- a/src/math/numbertheory/pow_mod.cpp +++ b/src/math/numbertheory/pow_mod.cpp @@ -6,7 +6,7 @@ */ #include <botan/pow_mod.h> -#include <botan/pk_engine.h> +#include <botan/internal/pk_engine.h> namespace Botan { diff --git a/src/math/numbertheory/powm_fw.cpp b/src/math/numbertheory/powm_fw.cpp index 8f39830a7..1cfcdcd66 100644 --- a/src/math/numbertheory/powm_fw.cpp +++ b/src/math/numbertheory/powm_fw.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/def_powm.h> +#include <botan/internal/def_powm.h> #include <botan/numthry.h> #include <vector> diff --git a/src/math/numbertheory/powm_mnt.cpp b/src/math/numbertheory/powm_mnt.cpp index d18081c6a..e356387c0 100644 --- a/src/math/numbertheory/powm_mnt.cpp +++ b/src/math/numbertheory/powm_mnt.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/def_powm.h> +#include <botan/internal/def_powm.h> #include <botan/numthry.h> #include <botan/internal/mp_core.h> diff --git a/src/pubkey/dh/dh.cpp b/src/pubkey/dh/dh.cpp index 149bc5882..baaa31126 100644 --- a/src/pubkey/dh/dh.cpp +++ b/src/pubkey/dh/dh.cpp @@ -7,7 +7,7 @@ #include <botan/dh.h> #include <botan/numthry.h> -#include <botan/workfactor.h> +#include <botan/internal/workfactor.h> namespace Botan { diff --git a/src/pubkey/dh/dh_core.cpp b/src/pubkey/dh/dh_core.cpp index 07d134c44..cbe2dc9f1 100644 --- a/src/pubkey/dh/dh_core.cpp +++ b/src/pubkey/dh/dh_core.cpp @@ -7,7 +7,7 @@ #include <botan/dh_core.h> #include <botan/numthry.h> -#include <botan/pk_engine.h> +#include <botan/internal/pk_engine.h> #include <botan/parsing.h> #include <algorithm> diff --git a/src/pubkey/dl_group/dl_group.cpp b/src/pubkey/dl_group/dl_group.cpp index 13ea03016..a2e239783 100644 --- a/src/pubkey/dl_group/dl_group.cpp +++ b/src/pubkey/dl_group/dl_group.cpp @@ -12,8 +12,8 @@ #include <botan/der_enc.h> #include <botan/ber_dec.h> #include <botan/pipe.h> -#include <botan/workfactor.h> #include <botan/pem.h> +#include <botan/internal/workfactor.h> namespace Botan { diff --git a/src/pubkey/dsa/dsa_core.cpp b/src/pubkey/dsa/dsa_core.cpp index e5a23a5c3..d952e10eb 100644 --- a/src/pubkey/dsa/dsa_core.cpp +++ b/src/pubkey/dsa/dsa_core.cpp @@ -7,7 +7,7 @@ #include <botan/dsa_core.h> #include <botan/numthry.h> -#include <botan/pk_engine.h> +#include <botan/internal/pk_engine.h> #include <botan/parsing.h> #include <algorithm> diff --git a/src/pubkey/ecdsa/ecdsa_core.cpp b/src/pubkey/ecdsa/ecdsa_core.cpp index 0be186fb4..78b527786 100644 --- a/src/pubkey/ecdsa/ecdsa_core.cpp +++ b/src/pubkey/ecdsa/ecdsa_core.cpp @@ -7,7 +7,7 @@ */ #include <botan/ecdsa_core.h> -#include <botan/pk_engine.h> +#include <botan/internal/pk_engine.h> namespace Botan { diff --git a/src/pubkey/eckaeg/eckaeg_core.cpp b/src/pubkey/eckaeg/eckaeg_core.cpp index dc89a878d..eaf467933 100644 --- a/src/pubkey/eckaeg/eckaeg_core.cpp +++ b/src/pubkey/eckaeg/eckaeg_core.cpp @@ -8,7 +8,7 @@ #include <botan/eckaeg_core.h> #include <botan/numthry.h> -#include <botan/pk_engine.h> +#include <botan/internal/pk_engine.h> #include <botan/parsing.h> #include <algorithm> diff --git a/src/pubkey/elgamal/elg_core.cpp b/src/pubkey/elgamal/elg_core.cpp index f2416d8a0..0005c4ffc 100644 --- a/src/pubkey/elgamal/elg_core.cpp +++ b/src/pubkey/elgamal/elg_core.cpp @@ -7,7 +7,7 @@ #include <botan/elg_core.h> #include <botan/numthry.h> -#include <botan/pk_engine.h> +#include <botan/internal/pk_engine.h> #include <botan/parsing.h> #include <algorithm> diff --git a/src/pubkey/elgamal/elgamal.cpp b/src/pubkey/elgamal/elgamal.cpp index 8c07c5735..e3215f757 100644 --- a/src/pubkey/elgamal/elgamal.cpp +++ b/src/pubkey/elgamal/elgamal.cpp @@ -9,7 +9,7 @@ #include <botan/numthry.h> #include <botan/keypair.h> #include <botan/look_pk.h> -#include <botan/workfactor.h> +#include <botan/internal/workfactor.h> namespace Botan { diff --git a/src/pubkey/if_algo/if_core.cpp b/src/pubkey/if_algo/if_core.cpp index 9c4a12ee5..41ebfe8dd 100644 --- a/src/pubkey/if_algo/if_core.cpp +++ b/src/pubkey/if_algo/if_core.cpp @@ -7,7 +7,7 @@ #include <botan/if_core.h> #include <botan/numthry.h> -#include <botan/pk_engine.h> +#include <botan/internal/pk_engine.h> #include <botan/parsing.h> #include <algorithm> diff --git a/src/pubkey/info.txt b/src/pubkey/info.txt index 69e743351..b28bd1868 100644 --- a/src/pubkey/info.txt +++ b/src/pubkey/info.txt @@ -1,5 +1,24 @@ define PUBLIC_KEY_CRYPTO +<source> +pk_algs.cpp +pk_keys.cpp +pubkey.cpp +pubkey_enums.cpp +workfactor.cpp +</source> + +<header:public> +pk_keys.h +pubkey.h +pubkey_enums.h +</header:public> + +<header:internal> +pk_algs.h +workfactor.h +</header:internal> + <requires> alloc asn1 diff --git a/src/pubkey/nr/nr_core.cpp b/src/pubkey/nr/nr_core.cpp index afa1115db..a87c32d60 100644 --- a/src/pubkey/nr/nr_core.cpp +++ b/src/pubkey/nr/nr_core.cpp @@ -7,7 +7,7 @@ #include <botan/nr_core.h> #include <botan/numthry.h> -#include <botan/pk_engine.h> +#include <botan/internal/pk_engine.h> #include <botan/parsing.h> #include <algorithm> diff --git a/src/pubkey/pk_algs.cpp b/src/pubkey/pk_algs.cpp index 99d7294f0..c040e006b 100644 --- a/src/pubkey/pk_algs.cpp +++ b/src/pubkey/pk_algs.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/pk_algs.h> +#include <botan/internal/pk_algs.h> #if defined(BOTAN_HAS_RSA) #include <botan/rsa.h> diff --git a/src/pubkey/pk_codecs/pkcs8.cpp b/src/pubkey/pk_codecs/pkcs8.cpp index 3d73b7ab1..f287e1e63 100644 --- a/src/pubkey/pk_codecs/pkcs8.cpp +++ b/src/pubkey/pk_codecs/pkcs8.cpp @@ -10,9 +10,9 @@ #include <botan/der_enc.h> #include <botan/ber_dec.h> #include <botan/asn1_obj.h> -#include <botan/pk_algs.h> #include <botan/oids.h> #include <botan/pem.h> +#include <botan/internal/pk_algs.h> #include <memory> namespace Botan { diff --git a/src/pubkey/pk_codecs/x509_key.cpp b/src/pubkey/pk_codecs/x509_key.cpp index 3fec15f7f..fcfb2b165 100644 --- a/src/pubkey/pk_codecs/x509_key.cpp +++ b/src/pubkey/pk_codecs/x509_key.cpp @@ -10,9 +10,9 @@ #include <botan/asn1_obj.h> #include <botan/der_enc.h> #include <botan/ber_dec.h> -#include <botan/pk_algs.h> #include <botan/oids.h> #include <botan/pem.h> +#include <botan/internal/pk_algs.h> #include <memory> namespace Botan { diff --git a/src/pubkey/workfactor.cpp b/src/pubkey/workfactor.cpp index e40b7919c..f15c64783 100644 --- a/src/pubkey/workfactor.cpp +++ b/src/pubkey/workfactor.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include <botan/workfactor.h> +#include <botan/internal/workfactor.h> #include <algorithm> #include <cmath> diff --git a/src/selftest/selftest.cpp b/src/selftest/selftest.cpp index a4da329f4..61f9c5571 100644 --- a/src/selftest/selftest.cpp +++ b/src/selftest/selftest.cpp @@ -7,7 +7,7 @@ #include <botan/selftest.h> #include <botan/filters.h> -#include <botan/def_eng.h> +#include <botan/internal/default_engine.h> #include <botan/internal/stl_util.h> namespace Botan { diff --git a/src/utils/charset.h b/src/utils/charset.h index eebb1997d..afb11733b 100644 --- a/src/utils/charset.h +++ b/src/utils/charset.h @@ -28,14 +28,16 @@ namespace Charset { /* * Character Set Handling */ -std::string transcode(const std::string&, Character_Set, Character_Set); +std::string BOTAN_DLL transcode(const std::string& str, + Character_Set to, + Character_Set from); -bool is_digit(char); -bool is_space(char); -bool caseless_cmp(char, char); +bool BOTAN_DLL is_digit(char c); +bool BOTAN_DLL is_space(char c); +bool BOTAN_DLL caseless_cmp(char x, char y); -byte char2digit(char); -char digit2char(byte); +byte BOTAN_DLL char2digit(char c); +char BOTAN_DLL digit2char(byte b); } diff --git a/src/utils/cpuid.h b/src/utils/cpuid.h index 455721af9..2c9599899 100644 --- a/src/utils/cpuid.h +++ b/src/utils/cpuid.h @@ -12,7 +12,7 @@ namespace Botan { -class CPUID +class BOTAN_DLL CPUID { public: enum CPUID_bits { |