From 87cbaef441c6baba2699a8ea53ac2562c46c772d Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 16 Dec 2009 00:32:49 +0000 Subject: Full working amalgamation build, plus internal-only headers concept. --- src/pubkey/dh/dh_core.cpp | 8 ++------ src/pubkey/dh/info.txt | 13 +++++++------ src/pubkey/dl_algo/info.txt | 7 ------- src/pubkey/dl_group/info.txt | 7 ------- src/pubkey/dlies/info.txt | 7 ------- src/pubkey/dsa/info.txt | 13 +++++++------ src/pubkey/ec_dompar/info.txt | 7 ------- src/pubkey/ecc_key/info.txt | 7 ------- src/pubkey/ecdsa/info.txt | 11 ----------- src/pubkey/eckaeg/info.txt | 11 ----------- src/pubkey/elgamal/elg_core.cpp | 8 ++------ src/pubkey/elgamal/info.txt | 11 ----------- src/pubkey/if_algo/if_core.cpp | 8 ++------ src/pubkey/if_algo/info.txt | 13 ++++++++----- src/pubkey/info.txt | 2 -- src/pubkey/keypair/info.txt | 7 ------- src/pubkey/nr/info.txt | 11 ----------- src/pubkey/pk_codecs/info.txt | 9 --------- src/pubkey/rsa/info.txt | 7 ------- src/pubkey/rw/info.txt | 7 ------- 20 files changed, 28 insertions(+), 146 deletions(-) (limited to 'src/pubkey') diff --git a/src/pubkey/dh/dh_core.cpp b/src/pubkey/dh/dh_core.cpp index 78a26a8ef..07d134c44 100644 --- a/src/pubkey/dh/dh_core.cpp +++ b/src/pubkey/dh/dh_core.cpp @@ -13,18 +13,14 @@ namespace Botan { -namespace { - -const u32bit BLINDING_BITS = BOTAN_PRIVATE_KEY_OP_BLINDING_BITS; - -} - /* * DH_Core Constructor */ DH_Core::DH_Core(RandomNumberGenerator& rng, const DL_Group& group, const BigInt& x) { + const u32bit BLINDING_BITS = BOTAN_PRIVATE_KEY_OP_BLINDING_BITS; + op = Engine_Core::dh_op(group, x); const BigInt& p = group.get_p(); diff --git a/src/pubkey/dh/info.txt b/src/pubkey/dh/info.txt index 8295a74f4..ca8f74fa1 100644 --- a/src/pubkey/dh/info.txt +++ b/src/pubkey/dh/info.txt @@ -1,14 +1,15 @@ define DIFFIE_HELLMAN -load_on auto + +dh_core.h +dh_op.h +dh.h + - + dh.cpp -dh.h dh_core.cpp -dh_core.h -dh_op.h - + dl_algo diff --git a/src/pubkey/dl_algo/info.txt b/src/pubkey/dl_algo/info.txt index 0ac91c887..21829fa42 100644 --- a/src/pubkey/dl_algo/info.txt +++ b/src/pubkey/dl_algo/info.txt @@ -1,12 +1,5 @@ define DL_PUBLIC_KEY_FAMILY -load_on auto - - -dl_algo.cpp -dl_algo.h - - asn1 dl_group diff --git a/src/pubkey/dl_group/info.txt b/src/pubkey/dl_group/info.txt index 2e5273ac4..8922be3fb 100644 --- a/src/pubkey/dl_group/info.txt +++ b/src/pubkey/dl_group/info.txt @@ -1,12 +1,5 @@ -load_on auto - define DL_GROUP - -dl_group.cpp -dl_group.h - - asn1 bigint diff --git a/src/pubkey/dlies/info.txt b/src/pubkey/dlies/info.txt index d3e950427..5aa90f646 100644 --- a/src/pubkey/dlies/info.txt +++ b/src/pubkey/dlies/info.txt @@ -1,12 +1,5 @@ define DLIES -load_on auto - - -dlies.cpp -dlies.h - - kdf libstate diff --git a/src/pubkey/dsa/info.txt b/src/pubkey/dsa/info.txt index 776a5da28..1248cf68d 100644 --- a/src/pubkey/dsa/info.txt +++ b/src/pubkey/dsa/info.txt @@ -1,15 +1,16 @@ define DSA -load_on auto + +dsa.h +dsa_core.h +dsa_op.h + - + dsa.cpp -dsa.h dsa_core.cpp -dsa_core.h dsa_op.cpp -dsa_op.h - + dl_algo diff --git a/src/pubkey/ec_dompar/info.txt b/src/pubkey/ec_dompar/info.txt index f32e4fc2f..b05903b69 100644 --- a/src/pubkey/ec_dompar/info.txt +++ b/src/pubkey/ec_dompar/info.txt @@ -1,12 +1,5 @@ define ECC_DOMAIN_PARAMATERS -load_on auto - - -ec_dompar.cpp -ec_dompar.h - - asn1 bigint diff --git a/src/pubkey/ecc_key/info.txt b/src/pubkey/ecc_key/info.txt index f45533129..92455189a 100644 --- a/src/pubkey/ecc_key/info.txt +++ b/src/pubkey/ecc_key/info.txt @@ -1,12 +1,5 @@ define ECC_PUBLIC_KEY_CRYPTO -load_on auto - - -ecc_key.cpp -ecc_key.h - - alloc asn1 diff --git a/src/pubkey/ecdsa/info.txt b/src/pubkey/ecdsa/info.txt index 3da73dd34..be5ac037a 100644 --- a/src/pubkey/ecdsa/info.txt +++ b/src/pubkey/ecdsa/info.txt @@ -1,16 +1,5 @@ define ECDSA -load_on auto - - -ecdsa.cpp -ecdsa.h -ecdsa_core.cpp -ecdsa_core.h -ecdsa_op.cpp -ecdsa_op.h - - alloc asn1 diff --git a/src/pubkey/eckaeg/info.txt b/src/pubkey/eckaeg/info.txt index 3a9768df1..53a744daa 100644 --- a/src/pubkey/eckaeg/info.txt +++ b/src/pubkey/eckaeg/info.txt @@ -1,16 +1,5 @@ define ECKAEG -load_on auto - - -eckaeg.cpp -eckaeg.h -eckaeg_core.cpp -eckaeg_core.h -eckaeg_op.cpp -eckaeg_op.h - - alloc asn1 diff --git a/src/pubkey/elgamal/elg_core.cpp b/src/pubkey/elgamal/elg_core.cpp index 8b8c8f50b..f2416d8a0 100644 --- a/src/pubkey/elgamal/elg_core.cpp +++ b/src/pubkey/elgamal/elg_core.cpp @@ -13,12 +13,6 @@ namespace Botan { -namespace { - -const u32bit BLINDING_BITS = BOTAN_PRIVATE_KEY_OP_BLINDING_BITS; - -} - /* * ELG_Core Constructor */ @@ -34,6 +28,8 @@ ELG_Core::ELG_Core(const DL_Group& group, const BigInt& y) ELG_Core::ELG_Core(RandomNumberGenerator& rng, const DL_Group& group, const BigInt& y, const BigInt& x) { + const u32bit BLINDING_BITS = BOTAN_PRIVATE_KEY_OP_BLINDING_BITS; + op = Engine_Core::elg_op(group, y, x); const BigInt& p = group.get_p(); diff --git a/src/pubkey/elgamal/info.txt b/src/pubkey/elgamal/info.txt index 8c55eb909..7906d0cd0 100644 --- a/src/pubkey/elgamal/info.txt +++ b/src/pubkey/elgamal/info.txt @@ -1,16 +1,5 @@ define ELGAMAL -load_on auto - - -elgamal.cpp -elgamal.h -elg_core.cpp -elg_core.h -elg_op.cpp -elg_op.h - - dl_algo dl_group diff --git a/src/pubkey/if_algo/if_core.cpp b/src/pubkey/if_algo/if_core.cpp index 8cc6a816f..9c4a12ee5 100644 --- a/src/pubkey/if_algo/if_core.cpp +++ b/src/pubkey/if_algo/if_core.cpp @@ -13,12 +13,6 @@ namespace Botan { -namespace { - -const u32bit BLINDING_BITS = BOTAN_PRIVATE_KEY_OP_BLINDING_BITS; - -} - /* * IF_Core Constructor */ @@ -36,6 +30,8 @@ IF_Core::IF_Core(RandomNumberGenerator& rng, const BigInt& p, const BigInt& q, const BigInt& d1, const BigInt& d2, const BigInt& c) { + const u32bit BLINDING_BITS = BOTAN_PRIVATE_KEY_OP_BLINDING_BITS; + op = Engine_Core::if_op(e, n, d, p, q, d1, d2, c); if(BLINDING_BITS) diff --git a/src/pubkey/if_algo/info.txt b/src/pubkey/if_algo/info.txt index ec948aec3..833117819 100644 --- a/src/pubkey/if_algo/info.txt +++ b/src/pubkey/if_algo/info.txt @@ -2,14 +2,17 @@ define IF_PUBLIC_KEY_FAMILY load_on dep - -if_algo.cpp + if_algo.h -if_core.cpp if_core.h -if_op.cpp if_op.h - + + + +if_algo.cpp +if_core.cpp +if_op.cpp + asn1 diff --git a/src/pubkey/info.txt b/src/pubkey/info.txt index ea6b4cb9b..69e743351 100644 --- a/src/pubkey/info.txt +++ b/src/pubkey/info.txt @@ -1,7 +1,5 @@ define PUBLIC_KEY_CRYPTO -load_on auto - alloc asn1 diff --git a/src/pubkey/keypair/info.txt b/src/pubkey/keypair/info.txt index 360d317c5..c6bf758cc 100644 --- a/src/pubkey/keypair/info.txt +++ b/src/pubkey/keypair/info.txt @@ -1,12 +1,5 @@ define KEYPAIR_TESTING -load_on auto - - -keypair.cpp -keypair.h - - libstate diff --git a/src/pubkey/nr/info.txt b/src/pubkey/nr/info.txt index dcf22033e..c0886ac07 100644 --- a/src/pubkey/nr/info.txt +++ b/src/pubkey/nr/info.txt @@ -1,16 +1,5 @@ define NYBERG_RUEPPEL -load_on auto - - -nr.cpp -nr.h -nr_core.cpp -nr_core.h -nr_op.cpp -nr_op.h - - dl_algo dl_group diff --git a/src/pubkey/pk_codecs/info.txt b/src/pubkey/pk_codecs/info.txt index 55c71b0c9..64fb10b8a 100644 --- a/src/pubkey/pk_codecs/info.txt +++ b/src/pubkey/pk_codecs/info.txt @@ -1,12 +1,3 @@ -load_on auto - - -pkcs8.h -pkcs8.cpp -x509_key.h -x509_key.cpp - - asn1 filters diff --git a/src/pubkey/rsa/info.txt b/src/pubkey/rsa/info.txt index c8bde68d0..877d092b6 100644 --- a/src/pubkey/rsa/info.txt +++ b/src/pubkey/rsa/info.txt @@ -1,12 +1,5 @@ define RSA -load_on auto - - -rsa.cpp -rsa.h - - if_algo keypair diff --git a/src/pubkey/rw/info.txt b/src/pubkey/rw/info.txt index 39857bccc..cb3e5531c 100644 --- a/src/pubkey/rw/info.txt +++ b/src/pubkey/rw/info.txt @@ -1,12 +1,5 @@ define RW -load_on auto - - -rw.cpp -rw.h - - if_algo keypair -- cgit v1.2.3 From 12afeca214c4414a0ced0bc4654d0fc5908dc77b Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 16 Dec 2009 02:22:58 +0000 Subject: Make many more headers internal-only. Fixes for the amalgamation generator for internal headers. Remove BOTAN_DLL exporting macros from all internal-only headers; the classes/functions there don't need to be exported, and avoiding the PIC/GOT indirection can be a big win. Add missing BOTAN_DLLs where necessary, mostly gfpmath and cvc For GCC, use -fvisibility=hidden and set BOTAN_DLL to the visibility __attribute__ to export those classes/functions. --- configure.py | 10 +++- doc/examples/ca.cpp | 2 +- doc/examples/gen_certs.cpp | 2 +- doc/examples/read_ssh.cpp | 15 ++++-- doc/examples/row_encryptor.cpp | 67 +++++++++++++++++--------- doc/examples/test_es.cpp | 18 +++---- doc/log.txt | 1 + src/algo_factory/algo_cache.h | 4 +- src/algo_factory/algo_factory.cpp | 2 +- src/algo_factory/algo_factory.h | 3 +- src/alloc/alloc_mmap/info.txt | 8 +++- src/alloc/alloc_mmap/mmap_mem.cpp | 4 +- src/alloc/alloc_mmap/mmap_mem.h | 4 +- src/alloc/mem_pool/info.txt | 9 ++++ src/alloc/mem_pool/mem_pool.cpp | 4 +- src/alloc/mem_pool/mem_pool.h | 6 +-- src/alloc/system_alloc/defalloc.cpp | 4 +- src/alloc/system_alloc/defalloc.h | 6 +-- src/alloc/system_alloc/info.txt | 9 ++++ src/asn1/asn1_alt.cpp | 4 +- src/asn1/asn1_dn.cpp | 2 +- src/asn1/asn1_oid.cpp | 2 +- src/asn1/ber_dec.cpp | 2 +- src/asn1/der_enc.cpp | 4 +- src/block/aes/aes.cpp | 2 +- src/block/aes_intel/aes_intel.cpp | 2 +- src/block/blowfish/blowfish.cpp | 2 +- src/block/cast/cast128.cpp | 4 +- src/block/cast/cast256.cpp | 4 +- src/block/des/des.cpp | 2 +- src/block/des/desx.cpp | 2 +- src/block/gost_28147/gost_28147.cpp | 2 +- src/block/idea/idea.cpp | 2 +- src/block/kasumi/kasumi.cpp | 4 +- src/block/lion/lion.cpp | 2 +- src/block/lubyrack/lubyrack.cpp | 2 +- src/block/mars/mars.cpp | 4 +- src/block/misty1/misty1.cpp | 2 +- src/block/noekeon/noekeon.cpp | 4 +- src/block/rc2/rc2.cpp | 4 +- src/block/rc5/rc5.cpp | 4 +- src/block/rc6/rc6.cpp | 4 +- src/block/safer/safer_sk.cpp | 4 +- src/block/seed/seed.cpp | 2 +- src/block/serpent/serpent.cpp | 4 +- src/block/serpent_ia32/serp_ia32.cpp | 2 +- src/block/serpent_simd/serp_simd.cpp | 2 +- src/block/skipjack/skipjack.cpp | 2 +- src/block/square/square.cpp | 4 +- src/block/tea/tea.cpp | 2 +- src/block/twofish/twofish.cpp | 4 +- src/block/xtea/xtea.cpp | 2 +- src/block/xtea_simd/xtea_simd.cpp | 2 +- src/build-data/cc/gcc.txt | 4 +- src/cert/cvc/asn1_eac_tm.cpp | 2 +- src/cert/cvc/cvc_self.h | 75 +++++++++++++++--------------- src/cert/cvc/eac_asn_obj.h | 16 +++---- src/cert/x509/x509_crl.h | 2 +- src/cert/x509/x509_ext.cpp | 2 +- src/cert/x509/x509cert.cpp | 2 +- src/checksum/adler32/adler32.cpp | 2 +- src/checksum/crc24/crc24.cpp | 2 +- src/checksum/crc32/crc32.cpp | 2 +- src/constructs/aont/package.cpp | 4 +- src/constructs/cryptobox/cryptobox.cpp | 2 +- src/constructs/fpe/fpe.cpp | 2 +- src/constructs/tss/tss.cpp | 2 +- src/entropy/dev_random/dev_random.h | 2 +- src/entropy/egd/es_egd.h | 2 +- src/entropy/hres_timer/hres_timer.h | 2 +- src/entropy/proc_walk/es_ftw.h | 2 +- src/entropy/unix_procs/es_unix.h | 2 +- src/entropy/unix_procs/unix_cmd.h | 2 +- src/filters/filter.cpp | 2 +- src/filters/info.txt | 31 +++++++++++- src/filters/modes/cbc/cbc.cpp | 2 +- src/filters/modes/cfb/cfb.cpp | 2 +- src/filters/modes/cts/cts.cpp | 2 +- src/filters/modes/eax/eax.cpp | 2 +- src/filters/modes/eax/eax_dec.cpp | 2 +- src/filters/modes/xts/xts.cpp | 2 +- src/filters/out_buf.cpp | 4 +- src/filters/out_buf.h | 2 +- src/filters/pipe.cpp | 4 +- src/filters/pipe_rw.cpp | 4 +- src/filters/secqueue.cpp | 2 +- src/filters/secqueue.h | 2 +- src/hash/bmw/bmw_512.cpp | 4 +- src/hash/fork256/fork256.cpp | 4 +- src/hash/gost_3411/gost_3411.cpp | 6 +-- src/hash/has160/has160.cpp | 4 +- src/hash/md2/md2.cpp | 2 +- src/hash/md4/md4.cpp | 4 +- src/hash/md4_ia32/md4_ia32.cpp | 2 +- src/hash/md5/md5.cpp | 4 +- src/hash/md5_ia32/md5_ia32.cpp | 2 +- src/hash/mdx_hash/mdx_hash.cpp | 2 +- src/hash/rmd128/rmd128.cpp | 4 +- src/hash/rmd160/rmd160.cpp | 4 +- src/hash/sha1/sha160.cpp | 4 +- src/hash/sha1_ia32/sha1_ia32.cpp | 2 +- src/hash/sha1_sse2/sha1_sse2.cpp | 2 +- src/hash/sha2/sha2_32.cpp | 4 +- src/hash/sha2/sha2_64.cpp | 4 +- src/hash/skein/skein_512.cpp | 2 +- src/hash/tiger/tiger.cpp | 2 +- src/hash/whirlpool/whrlpool.cpp | 2 +- src/kdf/kdf2/kdf2.cpp | 2 +- src/kdf/mgf1/mgf1.cpp | 4 +- src/kdf/tls_prf/prf_tls.cpp | 2 +- src/kdf/x942_prf/prf_x942.cpp | 2 +- src/libstate/libstate.cpp | 22 ++++----- src/libstate/scan_name.cpp | 3 +- src/mac/cbc_mac/cbc_mac.cpp | 2 +- src/mac/cmac/cmac.cpp | 2 +- src/mac/hmac/hmac.cpp | 2 +- src/mac/x919_mac/x919_mac.cpp | 2 +- src/math/bigint/big_ops2.cpp | 2 +- src/math/bigint/big_ops3.cpp | 2 +- src/math/bigint/bigint.cpp | 4 +- src/math/bigint/bigint.h | 2 +- src/math/gfpmath/gfp_element.h | 40 ++++++++-------- src/math/gfpmath/point_gfp.cpp | 6 +-- src/math/gfpmath/point_gfp.h | 41 ++++++++-------- src/math/numbertheory/mp_numth.cpp | 2 +- src/math/numbertheory/numthry.cpp | 2 +- src/mutex/info.txt | 4 ++ src/mutex/mutex.h | 6 +-- src/mutex/noop_mutex/info.txt | 8 ++++ src/mutex/noop_mutex/mux_noop.cpp | 2 +- src/mutex/noop_mutex/mux_noop.h | 4 +- src/mutex/pthreads/info.txt | 8 ++++ src/mutex/pthreads/mux_pthr.cpp | 2 +- src/mutex/pthreads/mux_pthr.h | 4 +- src/mutex/qt_mutex/info.txt | 8 ++++ src/mutex/qt_mutex/mux_qt.cpp | 2 +- src/mutex/qt_mutex/mux_qt.h | 4 +- src/mutex/win32_crit_section/info.txt | 8 +++- src/mutex/win32_crit_section/mux_win32.cpp | 2 +- src/mutex/win32_crit_section/mux_win32.h | 4 +- src/pk_pad/emsa4/emsa4.cpp | 2 +- src/pubkey/dlies/dlies.cpp | 2 +- src/pubkey/ec_dompar/ec_dompar.h | 13 ++++-- src/pubkey/pubkey.cpp | 2 +- src/rng/hmac_rng/hmac_rng.cpp | 6 +-- src/rng/randpool/randpool.cpp | 6 +-- src/rng/x931_rng/x931_rng.cpp | 2 +- src/s2k/pbkdf2/pbkdf2.cpp | 4 +- src/selftest/selftest.cpp | 2 +- src/stream/arc4/arc4.cpp | 2 +- src/stream/ctr/ctr.cpp | 2 +- src/stream/ofb/ofb.cpp | 2 +- src/stream/salsa20/salsa20.cpp | 4 +- src/stream/turing/turing.cpp | 4 +- src/stream/wid_wake/wid_wake.cpp | 4 +- src/sym_algo/symkey.cpp | 2 +- src/utils/bswap.h | 2 +- src/utils/cpuid.cpp | 2 +- src/utils/datastor/datastor.cpp | 2 +- src/utils/info.txt | 12 +++-- src/utils/loadstor.h | 6 +-- src/utils/mlock.cpp | 2 +- src/utils/mlock.h | 4 +- src/utils/parsing.cpp | 2 +- src/utils/simd_32/simd_altivec.h | 2 +- src/utils/simd_32/simd_scalar.h | 4 +- 166 files changed, 488 insertions(+), 351 deletions(-) (limited to 'src/pubkey') diff --git a/configure.py b/configure.py index a6adf91ab..cda5020c4 100755 --- a/configure.py +++ b/configure.py @@ -1255,6 +1255,8 @@ def generate_amalgamation(build_config): self.header_includes += '\n' def header_contents(self, name): + name = name.replace('internal/', '') + if name in self.included_already: return @@ -1300,7 +1302,9 @@ def generate_amalgamation(build_config): botan_all_h.write(pub_header_amalag.contents) botan_all_h.write("\n#endif\n") - internal_header_amalag = Amalgamation_Generator(build_config.internal_headers) + internal_header_amalag = Amalgamation_Generator( + filter(lambda s: s.find('asm_macr_') == -1, + build_config.internal_headers)) botan_all_cpp = open('botan_all.cpp', 'w') @@ -1311,7 +1315,11 @@ def generate_amalgamation(build_config): botan_all_cpp.write(internal_header_amalag.header_includes) botan_all_cpp.write(internal_header_amalag.contents) + for src in build_config.sources: + if src.endswith('.S'): + continue + contents = open(src).readlines() for line in contents: if botan_include.search(line): diff --git a/doc/examples/ca.cpp b/doc/examples/ca.cpp index b98e6620e..f5eccdde9 100644 --- a/doc/examples/ca.cpp +++ b/doc/examples/ca.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include using namespace Botan; #include diff --git a/doc/examples/gen_certs.cpp b/doc/examples/gen_certs.cpp index 1c95402f4..8490a167e 100644 --- a/doc/examples/gen_certs.cpp +++ b/doc/examples/gen_certs.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include #include diff --git a/doc/examples/read_ssh.cpp b/doc/examples/read_ssh.cpp index a88306caa..4d9050a31 100644 --- a/doc/examples/read_ssh.cpp +++ b/doc/examples/read_ssh.cpp @@ -5,17 +5,24 @@ #include #include #include -#include #include #include using namespace Botan; +inline u32bit make_u32bit(byte i0, byte i1, byte i2, byte i3) + { + return ((static_cast(i0) << 24) | + (static_cast(i1) << 16) | + (static_cast(i2) << 8) | + (static_cast(i3))); + } + u32bit read_u32bit(Pipe& pipe) { - byte out[4] = { 0 }; - pipe.read(out, 4); - u32bit len = load_be(out, 0); + byte sz[4] = { 0 }; + pipe.read(sz, 4); + u32bit len = make_u32bit(sz[0], sz[1], sz[2], sz[3]); if(len > 10000) throw Decoding_Error("Huge size in read_u32bit, something went wrong"); return len; diff --git a/doc/examples/row_encryptor.cpp b/doc/examples/row_encryptor.cpp index 1dac82f89..162e962e0 100644 --- a/doc/examples/row_encryptor.cpp +++ b/doc/examples/row_encryptor.cpp @@ -19,16 +19,23 @@ class Row_Encryptor Row_Encryptor(const std::string& passphrase, RandomNumberGenerator& rng); + Row_Encryptor(const std::string& passphrase, + const MemoryRegion& salt); + std::string encrypt(const std::string& input, const MemoryRegion& salt); std::string decrypt(const std::string& input, const MemoryRegion& salt); + SecureVector get_s2k_salt() const { return s2k_salt; } private: + void init(const std::string& passphrase); + Row_Encryptor(const Row_Encryptor&) {} Row_Encryptor& operator=(const Row_Encryptor&) { return (*this); } + SecureVector s2k_salt; Pipe enc_pipe, dec_pipe; EAX_Encryption* eax_enc; // owned by enc_pipe EAX_Decryption* eax_dec; // owned by dec_pipe; @@ -37,11 +44,24 @@ class Row_Encryptor Row_Encryptor::Row_Encryptor(const std::string& passphrase, RandomNumberGenerator& rng) { + s2k_salt.resize(10); // 80 bits + rng.randomize(&s2k_salt[0], s2k_salt.size()); + init(passphrase); + } + +Row_Encryptor::Row_Encryptor(const std::string& passphrase, + const MemoryRegion& salt) + { + s2k_salt = salt; + init(passphrase); + } + +void Row_Encryptor::init(const std::string& passphrase) + { std::auto_ptr s2k(get_s2k("PBKDF2(SHA-160)")); s2k->set_iterations(10000); - - s2k->new_random_salt(rng, 10); // 10 bytes == 80 bits + s2k->change_salt(&s2k_salt[0], s2k_salt.size()); SecureVector key = s2k->derive_key(32, passphrase).bits_of(); @@ -67,11 +87,7 @@ std::string Row_Encryptor::encrypt(const std::string& input, const MemoryRegion& salt) { eax_enc->set_iv(salt); - - enc_pipe.start_msg(); - enc_pipe.write(input); - enc_pipe.end_msg(); - + enc_pipe.process_msg(input); return enc_pipe.read_all_as_string(Pipe::LAST_MESSAGE); } @@ -79,11 +95,7 @@ std::string Row_Encryptor::decrypt(const std::string& input, const MemoryRegion& salt) { eax_dec->set_iv(salt); - - dec_pipe.start_msg(); - dec_pipe.write(input); - dec_pipe.end_msg(); - + dec_pipe.process_msg(input); return dec_pipe.read_all_as_string(Pipe::LAST_MESSAGE); } @@ -91,28 +103,25 @@ std::string Row_Encryptor::decrypt(const std::string& input, Test code follows: */ -#include - int main() { Botan::LibraryInitializer init; AutoSeeded_RNG rng; + const std::string secret_passphrase = "secret passphrase"; + Row_Encryptor encryptor("secret passphrase", rng); std::vector original_inputs; - for(u32bit i = 0; i != 15000; ++i) + for(u32bit i = 0; i != 50000; ++i) { std::ostringstream out; - // This will actually generate variable length inputs (when - // there are leading 0s, which are skipped), which is good - // since it assures performance is OK across a mix of lengths - // TODO: Maybe randomize the length slightly? + u32bit output_bytes = rng.next_byte(); - for(u32bit j = 0; j != 32; ++j) + for(u32bit j = 0; j != output_bytes; ++j) out << std::hex << (int)rng.next_byte(); original_inputs.push_back(out.str()); @@ -124,7 +133,9 @@ int main() for(u32bit i = 0; i != original_inputs.size(); ++i) { std::string input = original_inputs[i]; - store_le(i, salt); + + for(u32bit j = 0; j != 4; ++j) + salt[j] = (i >> 8) & 0xFF; encrypted_values.push_back(encryptor.encrypt(input, salt)); } @@ -132,7 +143,10 @@ int main() for(u32bit i = 0; i != encrypted_values.size(); ++i) { std::string ciphertext = encrypted_values[i]; - store_le(i, salt); // NOTE: same salt value as previous loop (index value) + + // NOTE: same salt value as previous loop (index value) + for(u32bit j = 0; j != 4; ++j) + salt[j] = (i >> 8) & 0xFF; std::string output = encryptor.decrypt(ciphertext, salt); @@ -140,4 +154,13 @@ int main() std::cout << "BOOM " << i << "\n"; } + Row_Encryptor test_s2k_salt_copy(secret_passphrase, + encryptor.get_s2k_salt()); + + salt.clear(); // all-0 + std::string test = test_s2k_salt_copy.decrypt(encrypted_values[0], salt); + if(test != original_inputs[0]) + std::cout << "S2K salt copy failed to decrypt properly\n"; + + return 0; } diff --git a/doc/examples/test_es.cpp b/doc/examples/test_es.cpp index 951d51ac7..b5510ab75 100644 --- a/doc/examples/test_es.cpp +++ b/doc/examples/test_es.cpp @@ -1,32 +1,32 @@ #include #include -#if defined(BOTAN_HAS_ENTROPY_SRC_DEVICE) - #include +#if defined(BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM) + #include #endif #if defined(BOTAN_HAS_ENTROPY_SRC_EGD) - #include + #include #endif #if defined(BOTAN_HAS_ENTROPY_SRC_UNIX) - #include + #include #endif #if defined(BOTAN_HAS_ENTROPY_SRC_BEOS) - #include + #include #endif #if defined(BOTAN_HAS_ENTROPY_SRC_CAPI) - #include + #include #endif #if defined(BOTAN_HAS_ENTROPY_SRC_WIN32) - #include + #include #endif #if defined(BOTAN_HAS_ENTROPY_SRC_FTW) - #include + #include #endif @@ -76,7 +76,7 @@ int main() { Botan::LibraryInitializer init; -#if defined(BOTAN_HAS_ENTROPY_SRC_DEVICE) +#if defined(BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM) test_entropy_source( new Device_EntropySource( split_on("/dev/random:/dev/srandom:/dev/urandom", ':') diff --git a/doc/log.txt b/doc/log.txt index 9250a0257..6334ee995 100644 --- a/doc/log.txt +++ b/doc/log.txt @@ -1,6 +1,7 @@ * 1.9.4-dev, ????-??-?? - New option --gen-amalgamation for creating a SQLite-style amalgamation + - Many headers are now explicitly internal-use-only and are not installed - Greatly improve the Win32 installer - Several fixes for Visual C++ debug builds 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 -#include +#include +#include #include #include #include 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 #include -#include +#include #include #include 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 +#include #include #include @@ -25,6 +25,7 @@ class MessageAuthenticationCode; template 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 + +mmap_mem.cpp + + + +mmap_mem.h + 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 +#include #include #include @@ -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 +#include 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 @@ + + +mem_pool.cpp + + + +mem_pool.h + + mutex 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 -#include +#include +#include #include #include #include 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 #include -#include +#include #include #include @@ -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 +#include +#include #include -#include #include #include 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 +#include 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 @@ + + +defalloc.cpp + + + +defalloc.h + + 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 #include #include -#include +#include #include #include -#include +#include 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 #include #include -#include +#include #include 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 #include #include -#include +#include #include 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 #include -#include +#include 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 #include #include -#include -#include +#include +#include #include #include 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 -#include +#include 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 -#include +#include #include 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 -#include +#include 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 -#include -#include +#include +#include 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 -#include -#include +#include +#include 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 -#include +#include 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 -#include +#include 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 -#include +#include 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 -#include +#include 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 -#include -#include +#include +#include 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 -#include +#include #include 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 -#include +#include 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 -#include -#include +#include +#include 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 -#include +#include #include 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 -#include -#include +#include +#include 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 -#include -#include +#include +#include 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 -#include -#include +#include +#include #include #include 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 -#include -#include +#include +#include #include 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 -#include +#include #include -#include +#include 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 -#include +#include 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 -#include -#include +#include +#include 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 -#include +#include 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 #include #include -#include +#include 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 -#include +#include 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 -#include -#include +#include +#include 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 -#include +#include 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 -#include -#include +#include +#include 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 -#include +#include 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 -#include +#include #include 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 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 #include #include -#include +#include #include 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 #include #include -#include +#include #include #include 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 #include #include -#include +#include #include #include #include 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 -#include +#include 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 -#include +#include 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 -#include +#include 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 #include #include -#include -#include +#include +#include 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 #include #include -#include +#include #include 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 #include #include -#include +#include #include 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 -#include +#include #include #include #include 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 -#include +#include #include 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 + +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 + + + +basefilt.h +buf_filt.h +data_snk.h +data_src.h +filter.h +filters.h +key_filt.h +pbe.h +pipe.h + + + +out_buf.h +secqueue.h + 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 -#include +#include #include 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 #include -#include +#include #include 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 -#include +#include #include 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 #include -#include +#include #include #include 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 -#include +#include #include #include 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 -#include +#include #include #include 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 -#include +#include +#include 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 -#include -#include +#include +#include #include 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 -#include -#include +#include +#include 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 +#include #include 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 -#include -#include +#include +#include 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 -#include -#include +#include +#include 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 -#include -#include -#include +#include +#include +#include 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 -#include -#include +#include +#include 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 -#include +#include 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 -#include -#include +#include +#include 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 -#include +#include 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 -#include -#include +#include +#include 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 -#include +#include 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 #include -#include +#include 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 -#include -#include +#include +#include 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 -#include -#include +#include +#include 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 -#include -#include +#include +#include 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 -#include +#include 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 -#include +#include #include 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 -#include -#include +#include +#include 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 -#include -#include +#include +#include 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 -#include +#include #include #include #include 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 #include -#include +#include #include 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 -#include +#include 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 -#include +#include 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 -#include +#include #include -#include +#include #include #include 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 -#include +#include #include #include #include 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 #include #include -#include +#include #include #include 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 -#include -#include -#include -#include -#include -#include #include -#include #include +#include +#include +#include +#include +#include +#include +#include #include #if defined(BOTAN_HAS_MUTEX_PTHREAD) - #include + #include #elif defined(BOTAN_HAS_MUTEX_WIN32) - #include + #include #elif defined(BOTAN_HAS_MUTEX_QT) - #include + #include #endif #if defined(BOTAN_HAS_ALLOC_MMAP) - #include + #include #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 #include #include +#include #include 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 -#include +#include #include 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 -#include +#include 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 -#include +#include 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 -#include +#include #include 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 #include -#include +#include #include 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 #include #include -#include +#include #include 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 #include -#include +#include #include -#include +#include 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 FE2OSP(const GFpElement& elem); -GFpElement OS2FEP(MemoryRegion const& os, BigInt p); +SecureVector BOTAN_DLL FE2OSP(const GFpElement& elem); +GFpElement BOTAN_DLL OS2FEP(MemoryRegion 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(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 EC2OSP(const PointGFp& point, byte format); -PointGFp OS2ECP(MemoryRegion const& os, const CurveGFp& curve); +SecureVector BOTAN_DLL EC2OSP(const PointGFp& point, byte format); +PointGFp BOTAN_DLL OS2ECP(MemoryRegion const& os, const CurveGFp& curve); -SecureVector encode_uncompressed(const PointGFp& point); // maybe make private -SecureVector encode_hybrid(const PointGFp& point); // maybe make private -SecureVector encode_compressed(const PointGFp& point); // maybe make private +/* Should these be private? */ +SecureVector +BOTAN_DLL encode_uncompressed(const PointGFp& point); + +SecureVector BOTAN_DLL encode_hybrid(const PointGFp& point); +SecureVector 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 #include -#include +#include #include 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 -#include +#include #include 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 + + +mutex.h + 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 + + +mux_noop.cpp + + + +mux_noop.h + 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 +#include 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 +#include 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 + +mux_pthr.cpp + + + +mux_pthr.h + + all!qnx,freebsd,dragonfly,openbsd,netbsd -> pthread 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 +#include #include #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 +#include 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 + +mux_qt.cpp + + + +mux_qt.h + + # I think we want to always use qt-mt, not qt -- not much point in supporting # mutexes in a single threaded application, after all. 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 +#include #include #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 +#include 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 + +mux_win32.cpp + + + +mux_win32.h + 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 +#include #include 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 +#include 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 #include -#include +#include 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 #include -#include +#include 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 encode_der_ec_dompar(EC_Domain_Params const& dom_pars, - EC_dompar_enc enc_type); +SecureVector +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 const& encoded); +EC_Domain_Params +BOTAN_DLL decode_ber_ec_dompar(SecureVector 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 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 #include #include -#include +#include #include 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 -#include -#include -#include +#include +#include +#include #include 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 -#include -#include -#include +#include +#include +#include #include 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 -#include +#include #include 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 -#include -#include +#include +#include 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 #include #include -#include +#include 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 -#include +#include #include 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 -#include +#include 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 -#include +#include #include 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 -#include -#include +#include +#include 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 -#include -#include +#include +#include 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 -#include -#include +#include +#include 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 -#include +#include #include #include #include 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 -#include +#include 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 #include -#include +#include #include #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 #include #include -#include +#include #include 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 - + 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 + + +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 -#include -#include -#include +#include +#include +#include #include #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 +#include #if defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK) #include 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 #include #include -#include +#include 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 +#include #include #include 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 -#include +#include +#include namespace Botan { -- cgit v1.2.3