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. --- checks/check.cpp | 2 - checks/ec_tests.cpp | 1 - configure.py | 170 ++++++++++++++++++--------- doc/log.txt | 1 + src/algo_factory/algo_factory.cpp | 2 +- src/algo_factory/info.txt | 12 +- src/algo_factory/prov_weight.cpp | 2 +- src/alloc/info.txt | 6 +- src/alloc/mem_pool/info.txt | 7 -- src/alloc/system_alloc/info.txt | 7 -- src/asn1/info.txt | 7 +- src/benchmark/info.txt | 7 -- src/block/serpent/serpent.cpp | 4 + src/block/serpent_ia32/serp_ia32_imp.S | 2 +- src/block/serpent_simd/info.txt | 12 ++ src/block/serpent_simd/serp_simd.cpp | 8 +- src/block/xtea_simd/info.txt | 7 -- src/block/xtea_simd/xtea_simd.cpp | 2 +- src/cert/cvc/cvc_gen_cert.h | 1 + src/cert/cvc/info.txt | 29 +++-- src/cert/x509/info.txt | 27 +++-- src/checksum/adler32/info.txt | 7 -- src/checksum/crc24/info.txt | 7 -- src/checksum/crc32/info.txt | 7 -- src/cms/info.txt | 13 -- src/codec/pem/info.txt | 7 -- src/constructs/aont/info.txt | 7 -- src/constructs/cryptobox/info.txt | 7 -- src/constructs/fpe/info.txt | 10 +- src/engine/amd64_eng/info.txt | 5 - src/engine/def_engine/info.txt | 9 +- src/engine/gnump/info.txt | 12 +- src/engine/ia32_eng/info.txt | 5 - src/engine/info.txt | 6 +- src/engine/openssl/info.txt | 14 ++- src/engine/simd_engine/simd_engine.cpp | 2 +- src/entropy/beos_stats/info.txt | 8 +- src/entropy/cryptoapi_rng/info.txt | 8 +- src/entropy/dev_random/dev_random.cpp | 125 ++++++++++++++++++++ src/entropy/dev_random/dev_random.h | 53 +++++++++ src/entropy/dev_random/es_dev.cpp | 125 -------------------- src/entropy/dev_random/es_dev.h | 53 --------- src/entropy/dev_random/info.txt | 10 +- src/entropy/egd/es_egd.cpp | 2 +- src/entropy/egd/info.txt | 8 +- src/entropy/hres_timer/hres_timer.cpp | 2 +- src/entropy/hres_timer/info.txt | 8 ++ src/entropy/info.txt | 6 - src/entropy/proc_walk/es_ftw.cpp | 2 +- src/entropy/proc_walk/info.txt | 8 +- src/entropy/unix_procs/es_unix.cpp | 4 +- src/entropy/unix_procs/es_unix.h | 2 +- src/entropy/unix_procs/info.txt | 11 +- src/entropy/unix_procs/unix_cmd.cpp | 2 +- src/entropy/unix_procs/unix_src.cpp | 2 +- src/entropy/win32_stats/info.txt | 8 +- src/filters/base64/info.txt | 8 -- src/filters/hex/info.txt | 8 -- src/filters/modes/cbc/info.txt | 7 -- src/filters/modes/cfb/info.txt | 11 -- src/filters/modes/cts/info.txt | 11 -- src/filters/modes/eax/info.txt | 11 -- src/filters/modes/ecb/info.txt | 8 -- src/filters/modes/info.txt | 7 -- src/filters/modes/mode_pad/info.txt | 7 -- src/filters/modes/xts/info.txt | 12 -- src/filters/pipe.h | 4 +- src/hash/has160/has160.cpp | 4 +- src/hash/info.txt | 6 - src/hash/md4_ia32/md4_ia32_imp.S | 2 +- src/hash/md5_ia32/md5_ia32_imp.S | 2 +- src/hash/rmd128/rmd128.cpp | 4 +- src/hash/sha1_amd64/sha1_amd64_imp.S | 2 +- src/hash/sha1_ia32/sha1_ia32_imp.S | 2 +- src/kdf/info.txt | 7 -- src/kdf/kdf1/info.txt | 7 -- src/kdf/kdf2/info.txt | 7 -- src/kdf/mgf1/info.txt | 7 -- src/kdf/ssl_prf/info.txt | 7 -- src/kdf/tls_prf/info.txt | 8 -- src/kdf/x942_prf/info.txt | 7 -- src/libstate/info.txt | 19 +-- src/libstate/oid_lookup/info.txt | 7 -- src/mac/cbc_mac/info.txt | 7 -- src/mac/cmac/info.txt | 7 -- src/mac/hmac/info.txt | 7 -- src/mac/info.txt | 7 -- src/mac/ssl3mac/info.txt | 7 -- src/mac/x919_mac/info.txt | 7 -- src/math/bigint/big_ops2.cpp | 2 +- src/math/bigint/big_ops3.cpp | 2 +- src/math/bigint/bigint.cpp | 2 +- src/math/bigint/divide.cpp | 2 +- src/math/bigint/info.txt | 12 +- src/math/bigint/monty_amd64/info.txt | 4 +- src/math/bigint/monty_amd64/mp_monty.S | 2 +- src/math/bigint/monty_generic/info.txt | 4 +- src/math/bigint/monty_generic/mp_monty.cpp | 6 +- src/math/bigint/mp_amd64/info.txt | 8 +- src/math/bigint/mp_amd64/mp_asmi.h | 2 +- src/math/bigint/mp_asm.cpp | 6 +- src/math/bigint/mp_asm64/info.txt | 4 +- src/math/bigint/mp_comba.cpp | 4 +- src/math/bigint/mp_generic/info.txt | 4 +- src/math/bigint/mp_generic/mp_asmi.h | 2 +- src/math/bigint/mp_ia32/info.txt | 8 +- src/math/bigint/mp_ia32/mp_asmi.h | 2 +- src/math/bigint/mp_ia32_msvc/info.txt | 4 +- src/math/bigint/mp_ia32_msvc/mp_asmi.h | 2 +- src/math/bigint/mp_karat.cpp | 4 +- src/math/bigint/mp_misc.cpp | 4 +- src/math/bigint/mp_shift.cpp | 2 +- src/math/bigint/mulop_amd64/info.txt | 4 +- src/math/bigint/mulop_amd64/mp_mulop.cpp | 6 +- src/math/bigint/mulop_amd64/mp_mulop_amd64.S | 2 +- src/math/bigint/mulop_generic/info.txt | 4 +- src/math/bigint/mulop_generic/mp_mulop.cpp | 6 +- src/math/bigint/mulop_ia32/info.txt | 4 +- src/math/bigint/mulop_ia32/mp_mulop.S | 2 +- src/math/gfpmath/gfp_element.cpp | 5 +- src/math/gfpmath/info.txt | 19 +-- src/math/numbertheory/info.txt | 15 ++- src/math/numbertheory/mp_numth.cpp | 2 +- src/math/numbertheory/powm_fw.cpp | 6 +- src/math/numbertheory/powm_mnt.cpp | 8 +- src/math/numbertheory/reducer.cpp | 2 +- src/mutex/info.txt | 6 - src/mutex/noop_mutex/info.txt | 7 -- src/mutex/pthreads/info.txt | 7 -- src/pbe/info.txt | 7 -- src/pbe/pbes1/info.txt | 7 -- src/pbe/pbes2/info.txt | 7 -- src/pk_pad/eme1/info.txt | 5 - src/pk_pad/eme_pkcs/info.txt | 7 -- src/pk_pad/emsa1/info.txt | 7 -- src/pk_pad/emsa1_bsi/info.txt | 7 -- src/pk_pad/emsa2/info.txt | 7 -- src/pk_pad/emsa3/info.txt | 7 -- src/pk_pad/emsa4/info.txt | 7 -- src/pk_pad/emsa_raw/info.txt | 7 -- src/pk_pad/hash_id/info.txt | 7 -- src/pk_pad/info.txt | 6 - 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 -- src/rng/auto_rng/auto_rng.cpp | 20 ++-- src/rng/auto_rng/info.txt | 7 -- src/rng/hmac_rng/info.txt | 7 -- src/rng/info.txt | 7 -- src/rng/randpool/info.txt | 7 -- src/rng/x931_rng/info.txt | 7 -- src/s2k/info.txt | 7 -- src/s2k/pbkdf1/info.txt | 7 -- src/s2k/pbkdf2/info.txt | 7 -- src/s2k/pgps2k/info.txt | 7 -- src/selftest/info.txt | 7 -- src/stream/arc4/info.txt | 11 -- src/stream/ctr/info.txt | 7 -- src/stream/info.txt | 6 - src/stream/ofb/info.txt | 7 -- src/stream/salsa20/info.txt | 11 -- src/stream/turing/info.txt | 12 -- src/stream/wid_wake/info.txt | 11 -- src/sym_algo/info.txt | 8 -- src/utils/asm_amd64/info.txt | 4 + src/utils/asm_ia32/info.txt | 4 + src/utils/buf_comp/info.txt | 6 - src/utils/datastor/info.txt | 7 -- src/utils/info.txt | 33 ++++++ src/utils/simd_32/info.txt | 7 ++ src/utils/simd_32/simd_32.h | 6 +- src/utils/simd_32/simd_altivec.h | 4 + src/utils/simd_32/simd_sse.h | 5 +- 190 files changed, 677 insertions(+), 1136 deletions(-) create mode 100644 src/entropy/dev_random/dev_random.cpp create mode 100644 src/entropy/dev_random/dev_random.h delete mode 100644 src/entropy/dev_random/es_dev.cpp delete mode 100644 src/entropy/dev_random/es_dev.h diff --git a/checks/check.cpp b/checks/check.cpp index b460d34f7..8b31f354d 100644 --- a/checks/check.cpp +++ b/checks/check.cpp @@ -14,7 +14,6 @@ #include #include -#include using namespace Botan; @@ -82,7 +81,6 @@ void test_types() passed = passed && test("u32bit", 32, false); passed = passed && test("u64bit", 64, false); passed = passed && test("s32bit", 31, true); - passed = passed && test("word", 0, false); if(!passed) std::cout << "Typedefs in include/types.h may be incorrect!\n"; diff --git a/checks/ec_tests.cpp b/checks/ec_tests.cpp index 2d25e2153..0420e0ee2 100644 --- a/checks/ec_tests.cpp +++ b/checks/ec_tests.cpp @@ -10,7 +10,6 @@ void do_ec_tests(RandomNumberGenerator&) { return; } #include #include -#include #include #include #include diff --git a/configure.py b/configure.py index 83a0cfcd4..a6adf91ab 100755 --- a/configure.py +++ b/configure.py @@ -65,14 +65,12 @@ class BuildConfigurationInformation(object): self.pyobject_dir = os.path.join(self.build_dir, 'python') self.include_dir = os.path.join(self.build_dir, 'include') - self.full_include_dir = os.path.join(self.include_dir, 'botan') + self.botan_include_dir = os.path.join(self.include_dir, 'botan') + self.internal_include_dir = os.path.join(self.botan_include_dir, 'internal') - all_files = flatten([mod.add for mod in modules]) - - self.headers = sorted( - [file for file in all_files if file.endswith('.h')]) - - self.sources = sorted(set(all_files) - set(self.headers)) + self.sources = sorted(flatten([mod.sources() for mod in modules])) + self.public_headers = sorted(flatten([m.public_headers() for m in modules])) + self.internal_headers = sorted(flatten([m.internal_headers() for m in modules])) checks_dir = os.path.join(options.base_dir, 'checks') @@ -104,7 +102,8 @@ class BuildConfigurationInformation(object): def build_dirs(self): dirs = [self.checkobj_dir, self.libobj_dir, - self.full_include_dir] + self.botan_include_dir, + self.internal_include_dir] if self.use_boost_python: dirs.append(self.pyobject_dir) return dirs @@ -179,7 +178,7 @@ def process_command_line(args): build_group.add_option('--gen-amalgamation', dest='gen_amalgamation', default=False, action='store_true', - help=SUPPRESS_HELP) + help='generate amalgamation files') build_group.add_option('--with-tr1-implementation', metavar='WHICH', dest='with_tr1', default=None, @@ -298,6 +297,10 @@ Generic lexer function for info.txt and src/build-data files """ def lex_me_harder(infofile, to_obj, allowed_groups, name_val_pairs): + # Format as a nameable Python variable + def py_var(group): + return group.replace(':', '_') + class LexerError(Exception): def __init__(self, msg, line): self.msg = msg @@ -322,7 +325,7 @@ def lex_me_harder(infofile, to_obj, allowed_groups, name_val_pairs): lexer.wordchars += '|:.<>/,-!+' # handle various funky chars in info.txt for group in allowed_groups: - to_obj.__dict__[group] = [] + to_obj.__dict__[py_var(group)] = [] for (key,val) in name_val_pairs.items(): to_obj.__dict__[key] = val @@ -347,7 +350,7 @@ def lex_me_harder(infofile, to_obj, allowed_groups, name_val_pairs): token = lexer.get_token() while token != end_marker: - to_obj.__dict__[group].append(token) + to_obj.__dict__[py_var(group)].append(token) token = lexer.get_token() if token is None: raise LexerError('Group "%s" not terminated' % (group), @@ -371,21 +374,29 @@ class ModuleInfo(object): def __init__(self, infofile): lex_me_harder(infofile, self, - ['add', 'requires', 'os', 'arch', 'cc', 'libs'], + ['source', 'header:internal', 'header:public', + 'requires', 'os', 'arch', 'cc', 'libs'], { 'load_on': 'auto', 'define': None, 'uses_tr1': 'false', 'need_isa': None, 'mp_bits': 0 }) - if self.add == []: + if self.source == [] and \ + self.header_internal == [] and \ + self.header_public == []: + for (dirpath, dirnames, filenames) in os.walk(self.lives_in): if dirpath == self.lives_in: - self.add = [filename for filename in filenames - if (filename.endswith('.cpp') or - filename.endswith('.h') or - filename.endswith('.S')) - and not filename.startswith('.')] + for filename in filenames: + if filename.startswith('.'): + continue + + if filename.endswith('.cpp') or \ + filename.endswith('.S'): + self.source.append(filename) + elif filename.endswith('.h'): + self.header_public.append(filename) # Coerce to more useful types def convert_lib_list(l): @@ -409,7 +420,12 @@ class ModuleInfo(object): return os.path.join(os.path.split(self.lives_in)[0], *filename.split(':')) - self.add = map(add_dir_name, self.add) + self.source = map(add_dir_name, self.source) + self.header_internal = map(add_dir_name, self.header_internal) + self.header_public = map(add_dir_name, self.header_public) + + if len([f for f in self.source if f.endswith('h')]) > 0: + print self.lives_in self.mp_bits = int(self.mp_bits) @@ -418,6 +434,15 @@ class ModuleInfo(object): else: self.uses_tr1 = False + def sources(self): + return self.source + + def public_headers(self): + return self.header_public + + def internal_headers(self): + return self.header_internal + def compatible_cpu(self, archinfo, options): arch_name = archinfo.basename @@ -883,7 +908,7 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): 'target_cpu_defines': make_cpp_macros(arch.defines(options)), - 'include_files': makefile_list(build_config.headers), + 'include_files': makefile_list(build_config.public_headers), 'lib_objs': makefile_list( objectfile_list(build_config.sources, @@ -1165,16 +1190,22 @@ def setup_build(build_config, options, template_vars): finally: f.close() - logging.debug('Linking %d header files in %s' % ( - len(build_config.headers), build_config.full_include_dir)) + logging.debug('Linking %d public header files in %s' % ( + len(build_config.public_headers), build_config.botan_include_dir)) + + for header_file in build_config.public_headers: + portable_symlink(header_file, build_config.botan_include_dir) - for header_file in build_config.headers: - portable_symlink(header_file, build_config.full_include_dir) + logging.debug('Linking %d internal header files in %s' % ( + len(build_config.internal_headers), build_config.internal_include_dir)) + + for header_file in build_config.internal_headers: + portable_symlink(header_file, build_config.internal_include_dir) """ Generate Amalgamation """ -def generate_amalgamation(build_config, options, modules): +def generate_amalgamation(build_config): def ending_with_suffix(suffix): def predicate(val): return val.endswith(suffix) @@ -1200,69 +1231,94 @@ def generate_amalgamation(build_config, options, modules): return contents - header_bits = {} + botan_include = re.compile('#include $') + std_include = re.compile('#include <([^/\.]+)>$') - for header in sorted(filter(ending_with_suffix('.h'), - flatten([m.add for m in modules]))): - contents = open(header).readlines() - header_bits[os.path.basename(header)] = contents + class Amalgamation_Generator: + def __init__(self, input_list): - header_bits['build.h'] = open('build/build.h').readlines() + self.included_already = set() + self.all_std_includes = set() - for (name, contents) in header_bits.items(): - header_bits[name] = strip_header_goop(contents) + self.file_contents = {} + for f in sorted(input_list): + contents = strip_header_goop(open(f).readlines()) + self.file_contents[os.path.basename(f)] = contents + self.contents = '' + for name in self.file_contents: + self.contents += ''.join(list(self.header_contents(name))) - included_already = set() - all_std_includes = set() + self.header_includes = '' + for std_header in self.all_std_includes: + self.header_includes += '#include <%s>\n' % (std_header) + self.header_includes += '\n' - botan_include = re.compile('^#include $') - std_include = re.compile('#include <([^/]+)>$') + def header_contents(self, name): + if name in self.included_already: + return - def header_contents(name): - if name not in included_already: - included_already.add(name) + self.included_already.add(name) - contents = header_bits[name] + if name not in self.file_contents: + return - for line in contents: + for line in self.file_contents[name]: match = botan_include.search(line) if match: - for c in header_contents(match.group(1)): + for c in self.header_contents(match.group(1)): yield c else: match = std_include.search(line) if match: - all_std_includes.add(match.group(1)) + self.all_std_includes.add(match.group(1)) else: yield line - return botan_all_h = open('botan_all.h', 'w') + pub_header_amalag = Amalgamation_Generator(build_config.public_headers) - final_contents = '' - for name in header_bits: - final_contents += ''.join(list(header_contents(name))) - - botan_all_h.write("""/* -* Botan Amalgamation + amalg_header = """/* +* Botan %s Amalgamation * (C) 1999-2009 Jack Lloyd and others * * Distributed under the terms of the Botan license */ +""" % (build_config.version_string) + + botan_all_h.write(amalg_header) + botan_all_h.write(""" #ifndef BOTAN_AMALGAMATION_H__ #define BOTAN_AMALGAMATION_H__ """) - for std_header in all_std_includes: - botan_all_h.write('#include <%s>\n' % (std_header)) - botan_all_h.write('\n') + botan_all_h.write(pub_header_amalag.header_includes) + botan_all_h.write(pub_header_amalag.contents) + botan_all_h.write("\n#endif\n") + + internal_header_amalag = Amalgamation_Generator(build_config.internal_headers) + + botan_all_cpp = open('botan_all.cpp', 'w') + + botan_all_cpp.write(amalg_header) + + botan_all_cpp.write('#include "botan_all.h"\n') + + botan_all_cpp.write(internal_header_amalag.header_includes) + botan_all_cpp.write(internal_header_amalag.contents) + + for src in build_config.sources: + contents = open(src).readlines() + for line in contents: + if botan_include.search(line): + continue + else: + botan_all_cpp.write(line) - botan_all_h.write(final_contents) """ Main driver @@ -1371,7 +1427,7 @@ def main(argv = None): options) build_config = BuildConfigurationInformation(options, modules_to_use) - build_config.headers.append( + build_config.public_headers.append( os.path.join(build_config.build_dir, 'build.h')) template_vars = create_template_vars(build_config, options, @@ -1384,7 +1440,7 @@ def main(argv = None): setup_build(build_config, options, template_vars) if options.gen_amalgamation: - generate_amalgamation(build_config, options, modules_to_use) + generate_amalgamation(build_config) logging.info('Botan %s build setup is complete' % ( build_config.version_string)) diff --git a/doc/log.txt b/doc/log.txt index c0c87028c..9250a0257 100644 --- a/doc/log.txt +++ b/doc/log.txt @@ -1,5 +1,6 @@ * 1.9.4-dev, ????-??-?? + - New option --gen-amalgamation for creating a SQLite-style amalgamation - Greatly improve the Win32 installer - Several fixes for Visual C++ debug builds diff --git a/src/algo_factory/algo_factory.cpp b/src/algo_factory/algo_factory.cpp index 22915d97c..f1c2ae3a0 100644 --- a/src/algo_factory/algo_factory.cpp +++ b/src/algo_factory/algo_factory.cpp @@ -6,7 +6,7 @@ */ #include -#include +#include #include #include #include diff --git a/src/algo_factory/info.txt b/src/algo_factory/info.txt index 4b25c7fc5..eae4b3934 100644 --- a/src/algo_factory/info.txt +++ b/src/algo_factory/info.txt @@ -2,12 +2,18 @@ load_on auto define ALGORITHM_FACTORY - -algo_factory.cpp + algo_factory.h + + + algo_cache.h + + + +algo_factory.cpp prov_weight.cpp - + block diff --git a/src/algo_factory/prov_weight.cpp b/src/algo_factory/prov_weight.cpp index d7e84a323..c7c2d8d8d 100644 --- a/src/algo_factory/prov_weight.cpp +++ b/src/algo_factory/prov_weight.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include namespace Botan { diff --git a/src/alloc/info.txt b/src/alloc/info.txt index 99dbe3a4d..40e7bacdf 100644 --- a/src/alloc/info.txt +++ b/src/alloc/info.txt @@ -1,6 +1,4 @@ -load_on auto - - + allocate.h secmem.h - + diff --git a/src/alloc/mem_pool/info.txt b/src/alloc/mem_pool/info.txt index 73a548292..6cb221834 100644 --- a/src/alloc/mem_pool/info.txt +++ b/src/alloc/mem_pool/info.txt @@ -1,10 +1,3 @@ -load_on auto - - -mem_pool.cpp -mem_pool.h - - mutex diff --git a/src/alloc/system_alloc/info.txt b/src/alloc/system_alloc/info.txt index 8b9a2f067..8826440d4 100644 --- a/src/alloc/system_alloc/info.txt +++ b/src/alloc/system_alloc/info.txt @@ -1,10 +1,3 @@ -load_on auto - - -defalloc.cpp -defalloc.h - - libstate mem_pool diff --git a/src/asn1/info.txt b/src/asn1/info.txt index d836b4c0b..7ed025e68 100644 --- a/src/asn1/info.txt +++ b/src/asn1/info.txt @@ -2,7 +2,7 @@ define ASN1 load_on auto - + alg_id.cpp asn1_alt.cpp asn1_att.cpp @@ -13,13 +13,16 @@ asn1_str.cpp asn1_tm.cpp ber_dec.cpp der_enc.cpp + + + alg_id.h asn1_int.h asn1_obj.h asn1_oid.h ber_dec.h der_enc.h - + alloc diff --git a/src/benchmark/info.txt b/src/benchmark/info.txt index 0210971f7..3a817435a 100644 --- a/src/benchmark/info.txt +++ b/src/benchmark/info.txt @@ -1,12 +1,5 @@ define RUNTIME_BENCHMARKING -load_on auto - - -benchmark.cpp -benchmark.h - - algo_factory block diff --git a/src/block/serpent/serpent.cpp b/src/block/serpent/serpent.cpp index 2fa27308f..e16afc89c 100644 --- a/src/block/serpent/serpent.cpp +++ b/src/block/serpent/serpent.cpp @@ -344,6 +344,10 @@ void Serpent::decrypt_n(const byte in[], byte out[], u32bit blocks) const } } +#undef key_xor +#undef transform +#undef i_transform + /* * Serpent Key Schedule */ diff --git a/src/block/serpent_ia32/serp_ia32_imp.S b/src/block/serpent_ia32/serp_ia32_imp.S index 8b4a79937..768192061 100644 --- a/src/block/serpent_ia32/serp_ia32_imp.S +++ b/src/block/serpent_ia32/serp_ia32_imp.S @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include START_LISTING(serp_ia32.S) diff --git a/src/block/serpent_simd/info.txt b/src/block/serpent_simd/info.txt index d65b41235..b3bf34972 100644 --- a/src/block/serpent_simd/info.txt +++ b/src/block/serpent_simd/info.txt @@ -5,3 +5,15 @@ serpent simd_32 simd_engine + + +serp_simd.cpp + + + +serp_simd.h + + + +serp_simd_sbox.h + diff --git a/src/block/serpent_simd/serp_simd.cpp b/src/block/serpent_simd/serp_simd.cpp index b394b0c26..0a535c9a0 100644 --- a/src/block/serpent_simd/serp_simd.cpp +++ b/src/block/serpent_simd/serp_simd.cpp @@ -6,8 +6,8 @@ */ #include -#include -#include +#include +#include #include namespace Botan { @@ -171,6 +171,10 @@ void serpent_decrypt_4(const byte in[64], } +#undef key_xor +#undef transform +#undef i_transform + /* * Serpent Encryption */ diff --git a/src/block/xtea_simd/info.txt b/src/block/xtea_simd/info.txt index 98a6e941f..5a8445b35 100644 --- a/src/block/xtea_simd/info.txt +++ b/src/block/xtea_simd/info.txt @@ -1,12 +1,5 @@ define XTEA_SIMD -load_on auto - - -xtea_simd.cpp -xtea_simd.h - - xtea simd_32 diff --git a/src/block/xtea_simd/xtea_simd.cpp b/src/block/xtea_simd/xtea_simd.cpp index 6151c355c..264d4f949 100644 --- a/src/block/xtea_simd/xtea_simd.cpp +++ b/src/block/xtea_simd/xtea_simd.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include namespace Botan { diff --git a/src/cert/cvc/cvc_gen_cert.h b/src/cert/cvc/cvc_gen_cert.h index 4a788026c..797970e29 100644 --- a/src/cert/cvc/cvc_gen_cert.h +++ b/src/cert/cvc/cvc_gen_cert.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/src/cert/cvc/info.txt b/src/cert/cvc/info.txt index bdd496614..2033b9576 100644 --- a/src/cert/cvc/info.txt +++ b/src/cert/cvc/info.txt @@ -4,29 +4,32 @@ uses_tr1 yes load_on auto - -asn1_eac_str.cpp -asn1_eac_tm.cpp -ecdsa_sig.cpp -ecdsa_sig.h -cvc_ado.cpp + cvc_ado.h -cvc_ca.cpp cvc_ca.h -cvc_cert.cpp cvc_cert.h cvc_gen_cert.h cvc_key.h -cvc_req.cpp cvc_req.h -cvc_self.cpp cvc_self.h eac_asn_obj.h eac_obj.h -signed_obj.cpp -signed_obj.h +ecdsa_sig.h freestore.h - +signed_obj.h + + + +asn1_eac_str.cpp +asn1_eac_tm.cpp +ecdsa_sig.cpp +cvc_ado.cpp +cvc_ca.cpp +cvc_cert.cpp +cvc_req.cpp +cvc_self.cpp +signed_obj.cpp + asn1 diff --git a/src/cert/x509/info.txt b/src/cert/x509/info.txt index 37faea9fa..a5cd973a4 100644 --- a/src/cert/x509/info.txt +++ b/src/cert/x509/info.txt @@ -2,31 +2,34 @@ define X509 load_on auto - + certstor.h -certstor.cpp -crl_ent.cpp crl_ent.h pkcs10.h +x509_ca.h +x509_crl.h +x509_ext.h +x509_obj.h +x509cert.h +x509find.h +x509self.h +x509stor.h + + + +certstor.cpp +crl_ent.cpp pkcs10.cpp x509_ca.cpp -x509_ca.h x509_crl.cpp -x509_crl.h x509_ext.cpp -x509_ext.h x509_obj.cpp -x509_obj.h x509cert.cpp -x509cert.h x509find.cpp -x509find.h x509opt.cpp x509self.cpp -x509self.h x509stor.cpp -x509stor.h - + asn1 diff --git a/src/checksum/adler32/info.txt b/src/checksum/adler32/info.txt index 53bc66354..a25c792d3 100644 --- a/src/checksum/adler32/info.txt +++ b/src/checksum/adler32/info.txt @@ -1,12 +1,5 @@ define ADLER32 -load_on auto - - -adler32.cpp -adler32.h - - hash diff --git a/src/checksum/crc24/info.txt b/src/checksum/crc24/info.txt index 8c61aa58b..2c2dbc782 100644 --- a/src/checksum/crc24/info.txt +++ b/src/checksum/crc24/info.txt @@ -1,12 +1,5 @@ define CRC24 -load_on auto - - -crc24.cpp -crc24.h - - hash diff --git a/src/checksum/crc32/info.txt b/src/checksum/crc32/info.txt index d86848cf4..590092ede 100644 --- a/src/checksum/crc32/info.txt +++ b/src/checksum/crc32/info.txt @@ -1,12 +1,5 @@ define CRC32 -load_on auto - - -crc32.cpp -crc32.h - - hash diff --git a/src/cms/info.txt b/src/cms/info.txt index 55d559f83..44c5811f8 100644 --- a/src/cms/info.txt +++ b/src/cms/info.txt @@ -1,18 +1,5 @@ define CMS -load_on auto - - -cms_algo.cpp -cms_comp.cpp -cms_dalg.cpp -cms_dec.cpp -cms_dec.h -cms_ealg.cpp -cms_enc.cpp -cms_enc.h - - asn1 bigint diff --git a/src/codec/pem/info.txt b/src/codec/pem/info.txt index 5544e1bb0..88f36594c 100644 --- a/src/codec/pem/info.txt +++ b/src/codec/pem/info.txt @@ -1,12 +1,5 @@ define PEM_CODEC -load_on auto - - -pem.cpp -pem.h - - base64 filters diff --git a/src/constructs/aont/info.txt b/src/constructs/aont/info.txt index 533b70eb5..ebd54fc11 100644 --- a/src/constructs/aont/info.txt +++ b/src/constructs/aont/info.txt @@ -1,12 +1,5 @@ define PACKAGE_TRANSFORM -load_on auto - - -package.cpp -package.h - - block ctr diff --git a/src/constructs/cryptobox/info.txt b/src/constructs/cryptobox/info.txt index 0780f55aa..3521c32d0 100644 --- a/src/constructs/cryptobox/info.txt +++ b/src/constructs/cryptobox/info.txt @@ -1,12 +1,5 @@ -load_on auto - define CRYPTO_BOX - -cryptobox.h -cryptobox.cpp - - filters ctr diff --git a/src/constructs/fpe/info.txt b/src/constructs/fpe/info.txt index f7a8c4ae4..15965cff5 100644 --- a/src/constructs/fpe/info.txt +++ b/src/constructs/fpe/info.txt @@ -1,13 +1,7 @@ define FORMAT_PRESERVING_ENCRYPTION -load_on auto - - -fpe.cpp -fpe.h - - -cbc_mac +hmac +sha2 bigint diff --git a/src/engine/amd64_eng/info.txt b/src/engine/amd64_eng/info.txt index 03baf76ee..2ae2aaad0 100644 --- a/src/engine/amd64_eng/info.txt +++ b/src/engine/amd64_eng/info.txt @@ -1,8 +1,3 @@ define ENGINE_AMD64_ASSEMBLER load_on dep - - -eng_amd64.cpp -eng_amd64.h - diff --git a/src/engine/def_engine/info.txt b/src/engine/def_engine/info.txt index e307fbf8e..74b4d3f9b 100644 --- a/src/engine/def_engine/info.txt +++ b/src/engine/def_engine/info.txt @@ -1,9 +1,10 @@ define DEFAULT_ENGINE -load_on auto - - + def_eng.h + + + def_mode.cpp def_pk_ops.cpp def_powm.cpp @@ -11,7 +12,7 @@ lookup_block.cpp lookup_hash.cpp lookup_mac.cpp lookup_stream.cpp - + algo_factory diff --git a/src/engine/gnump/info.txt b/src/engine/gnump/info.txt index 0805c1ba8..9566bded2 100644 --- a/src/engine/gnump/info.txt +++ b/src/engine/gnump/info.txt @@ -6,8 +6,15 @@ load_on request all -> gmp - + eng_gmp.h + + + +gmp_wrap.h + + + gmp_dh.cpp gmp_dsa.cpp gmp_elg.cpp @@ -16,8 +23,7 @@ gmp_mem.cpp gmp_nr.cpp gmp_powm.cpp gmp_wrap.cpp -gmp_wrap.h - + bigint diff --git a/src/engine/ia32_eng/info.txt b/src/engine/ia32_eng/info.txt index 98fd1f2cc..d2106c555 100644 --- a/src/engine/ia32_eng/info.txt +++ b/src/engine/ia32_eng/info.txt @@ -1,8 +1,3 @@ define ENGINE_IA32_ASSEMBLER load_on dep - - -eng_ia32.cpp -eng_ia32.h - diff --git a/src/engine/info.txt b/src/engine/info.txt index dcb26d9d6..b270edaa5 100644 --- a/src/engine/info.txt +++ b/src/engine/info.txt @@ -1,10 +1,8 @@ define ENGINES -load_on auto - - + engine.h - + block diff --git a/src/engine/openssl/info.txt b/src/engine/openssl/info.txt index 9f8c84b31..d30e76293 100644 --- a/src/engine/openssl/info.txt +++ b/src/engine/openssl/info.txt @@ -6,12 +6,18 @@ load_on request all -> crypto - + +eng_ossl.h + + + +bn_wrap.h + + + arc4_openssl.cpp bn_powm.cpp bn_wrap.cpp -bn_wrap.h -eng_ossl.h ossl_bc.cpp ossl_dh.cpp ossl_dsa.cpp @@ -19,7 +25,7 @@ ossl_elg.cpp ossl_if.cpp ossl_md.cpp ossl_nr.cpp - + bigint diff --git a/src/engine/simd_engine/simd_engine.cpp b/src/engine/simd_engine/simd_engine.cpp index fdb1644d0..60ff8ba1d 100644 --- a/src/engine/simd_engine/simd_engine.cpp +++ b/src/engine/simd_engine/simd_engine.cpp @@ -6,7 +6,7 @@ */ #include -#include +#include #include #if defined(BOTAN_HAS_SERPENT_SIMD) diff --git a/src/entropy/beos_stats/info.txt b/src/entropy/beos_stats/info.txt index 26c3feb75..088b926f9 100644 --- a/src/entropy/beos_stats/info.txt +++ b/src/entropy/beos_stats/info.txt @@ -1,6 +1,12 @@ define ENTROPY_SRC_BEOS -load_on auto + +es_beos.cpp + + + +es_beos.h + beos diff --git a/src/entropy/cryptoapi_rng/info.txt b/src/entropy/cryptoapi_rng/info.txt index a07892971..800e9ee52 100644 --- a/src/entropy/cryptoapi_rng/info.txt +++ b/src/entropy/cryptoapi_rng/info.txt @@ -1,6 +1,12 @@ define ENTROPY_SRC_CAPI -load_on auto + +es_capi.cpp + + + +es_capi.h + # We'll just assume CAPI is there; this is OK except for 3.x, early # versions of 95, and maybe NT 3.5 diff --git a/src/entropy/dev_random/dev_random.cpp b/src/entropy/dev_random/dev_random.cpp new file mode 100644 index 000000000..d0babfd1e --- /dev/null +++ b/src/entropy/dev_random/dev_random.cpp @@ -0,0 +1,125 @@ +/* +* /dev/random EntropySource +* (C) 1999-2009 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#include + +#include +#include +#include +#include +#include + +namespace Botan { + +/** +Close the device, if open +*/ +void Device_EntropySource::Device_Reader::close() + { + if(fd > 0) { ::close(fd); fd = -1; } + } + +/** +Read bytes from a device file +*/ +u32bit Device_EntropySource::Device_Reader::get(byte out[], u32bit length, + u32bit ms_wait_time) + { + if(fd < 0) + return 0; + + if(fd >= FD_SETSIZE) + return 0; + + fd_set read_set; + FD_ZERO(&read_set); + FD_SET(fd, &read_set); + + struct ::timeval timeout; + + timeout.tv_sec = (ms_wait_time / 1000); + timeout.tv_usec = (ms_wait_time % 1000) * 1000; + + if(::select(fd + 1, &read_set, 0, 0, &timeout) < 0) + return 0; + + if(!(FD_ISSET(fd, &read_set))) + return 0; + + const ssize_t got = ::read(fd, out, length); + if(got <= 0) + return 0; + + return static_cast(got); + } + +/** +Attempt to open a device +*/ +Device_EntropySource::Device_Reader::fd_type +Device_EntropySource::Device_Reader::open(const std::string& pathname) + { +#ifndef O_NONBLOCK + #define O_NONBLOCK 0 +#endif + +#ifndef O_NOCTTY + #define O_NOCTTY 0 +#endif + + const int flags = O_RDONLY | O_NONBLOCK | O_NOCTTY; + return ::open(pathname.c_str(), flags); + } + +/** +Device_EntropySource constructor +Open a file descriptor to each (available) device in fsnames +*/ +Device_EntropySource::Device_EntropySource( + const std::vector& fsnames) + { + for(u32bit i = 0; i != fsnames.size(); ++i) + { + Device_Reader::fd_type fd = Device_Reader::open(fsnames[i]); + if(fd > 0) + devices.push_back(Device_Reader(fd)); + } + } + +/** +Device_EntropySource destructor: close all open devices +*/ +Device_EntropySource::~Device_EntropySource() + { + for(size_t i = 0; i != devices.size(); ++i) + devices[i].close(); + } + +/** +* Gather entropy from a RNG device +*/ +void Device_EntropySource::poll(Entropy_Accumulator& accum) + { + u32bit go_get = std::min(accum.desired_remaining_bits() / 8, 48); + + u32bit read_wait_ms = std::max(go_get, 1000); + MemoryRegion& io_buffer = accum.get_io_buffer(go_get); + + for(size_t i = 0; i != devices.size(); ++i) + { + u32bit got = devices[i].get(io_buffer.begin(), io_buffer.size(), + read_wait_ms); + + if(got) + { + accum.add(io_buffer.begin(), got, 8); + break; + } + } + } + +} diff --git a/src/entropy/dev_random/dev_random.h b/src/entropy/dev_random/dev_random.h new file mode 100644 index 000000000..df9dbe1c1 --- /dev/null +++ b/src/entropy/dev_random/dev_random.h @@ -0,0 +1,53 @@ +/* +* /dev/random EntropySource +* (C) 1999-2009 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ + +#ifndef BOTAN_ENTROPY_SRC_DEVICE_H__ +#define BOTAN_ENTROPY_SRC_DEVICE_H__ + +#include +#include +#include + +namespace Botan { + +class BOTAN_DLL Device_EntropySource : public EntropySource + { + public: + std::string name() const { return "RNG Device Reader"; } + + void poll(Entropy_Accumulator& accum); + + Device_EntropySource(const std::vector& fsnames); + ~Device_EntropySource(); + private: + + /** + A class handling reading from a Unix character device + */ + class Device_Reader + { + public: + typedef int fd_type; + + // Does not own fd, a transient class + Device_Reader(fd_type device_fd) : fd(device_fd) {} + + void close(); + + u32bit get(byte out[], u32bit length, u32bit ms_wait_time); + + static fd_type open(const std::string& pathname); + private: + fd_type fd; + }; + + std::vector devices; + }; + +} + +#endif diff --git a/src/entropy/dev_random/es_dev.cpp b/src/entropy/dev_random/es_dev.cpp deleted file mode 100644 index ef3074194..000000000 --- a/src/entropy/dev_random/es_dev.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/* -* /dev/random EntropySource -* (C) 1999-2009 Jack Lloyd -* -* Distributed under the terms of the Botan license -*/ - -#include - -#include -#include -#include -#include -#include - -namespace Botan { - -/** -Close the device, if open -*/ -void Device_EntropySource::Device_Reader::close() - { - if(fd > 0) { ::close(fd); fd = -1; } - } - -/** -Read bytes from a device file -*/ -u32bit Device_EntropySource::Device_Reader::get(byte out[], u32bit length, - u32bit ms_wait_time) - { - if(fd < 0) - return 0; - - if(fd >= FD_SETSIZE) - return 0; - - fd_set read_set; - FD_ZERO(&read_set); - FD_SET(fd, &read_set); - - struct ::timeval timeout; - - timeout.tv_sec = (ms_wait_time / 1000); - timeout.tv_usec = (ms_wait_time % 1000) * 1000; - - if(::select(fd + 1, &read_set, 0, 0, &timeout) < 0) - return 0; - - if(!(FD_ISSET(fd, &read_set))) - return 0; - - const ssize_t got = ::read(fd, out, length); - if(got <= 0) - return 0; - - return static_cast(got); - } - -/** -Attempt to open a device -*/ -Device_EntropySource::Device_Reader::fd_type -Device_EntropySource::Device_Reader::open(const std::string& pathname) - { -#ifndef O_NONBLOCK - #define O_NONBLOCK 0 -#endif - -#ifndef O_NOCTTY - #define O_NOCTTY 0 -#endif - - const int flags = O_RDONLY | O_NONBLOCK | O_NOCTTY; - return ::open(pathname.c_str(), flags); - } - -/** -Device_EntropySource constructor -Open a file descriptor to each (available) device in fsnames -*/ -Device_EntropySource::Device_EntropySource( - const std::vector& fsnames) - { - for(u32bit i = 0; i != fsnames.size(); ++i) - { - Device_Reader::fd_type fd = Device_Reader::open(fsnames[i]); - if(fd > 0) - devices.push_back(Device_Reader(fd)); - } - } - -/** -Device_EntropySource destructor: close all open devices -*/ -Device_EntropySource::~Device_EntropySource() - { - for(size_t i = 0; i != devices.size(); ++i) - devices[i].close(); - } - -/** -* Gather entropy from a RNG device -*/ -void Device_EntropySource::poll(Entropy_Accumulator& accum) - { - u32bit go_get = std::min(accum.desired_remaining_bits() / 8, 48); - - u32bit read_wait_ms = std::max(go_get, 1000); - MemoryRegion& io_buffer = accum.get_io_buffer(go_get); - - for(size_t i = 0; i != devices.size(); ++i) - { - u32bit got = devices[i].get(io_buffer.begin(), io_buffer.size(), - read_wait_ms); - - if(got) - { - accum.add(io_buffer.begin(), got, 8); - break; - } - } - } - -} diff --git a/src/entropy/dev_random/es_dev.h b/src/entropy/dev_random/es_dev.h deleted file mode 100644 index df9dbe1c1..000000000 --- a/src/entropy/dev_random/es_dev.h +++ /dev/null @@ -1,53 +0,0 @@ -/* -* /dev/random EntropySource -* (C) 1999-2009 Jack Lloyd -* -* Distributed under the terms of the Botan license -*/ - -#ifndef BOTAN_ENTROPY_SRC_DEVICE_H__ -#define BOTAN_ENTROPY_SRC_DEVICE_H__ - -#include -#include -#include - -namespace Botan { - -class BOTAN_DLL Device_EntropySource : public EntropySource - { - public: - std::string name() const { return "RNG Device Reader"; } - - void poll(Entropy_Accumulator& accum); - - Device_EntropySource(const std::vector& fsnames); - ~Device_EntropySource(); - private: - - /** - A class handling reading from a Unix character device - */ - class Device_Reader - { - public: - typedef int fd_type; - - // Does not own fd, a transient class - Device_Reader(fd_type device_fd) : fd(device_fd) {} - - void close(); - - u32bit get(byte out[], u32bit length, u32bit ms_wait_time); - - static fd_type open(const std::string& pathname); - private: - fd_type fd; - }; - - std::vector devices; - }; - -} - -#endif diff --git a/src/entropy/dev_random/info.txt b/src/entropy/dev_random/info.txt index 2907d4178..cabb47ea2 100644 --- a/src/entropy/dev_random/info.txt +++ b/src/entropy/dev_random/info.txt @@ -1,6 +1,12 @@ -define ENTROPY_SRC_DEVICE +define ENTROPY_SRC_DEV_RANDOM -load_on auto + +dev_random.cpp + + + +dev_random.h + aix diff --git a/src/entropy/egd/es_egd.cpp b/src/entropy/egd/es_egd.cpp index 9e37f8f17..bd8dc8590 100644 --- a/src/entropy/egd/es_egd.cpp +++ b/src/entropy/egd/es_egd.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include #include #include #include diff --git a/src/entropy/egd/info.txt b/src/entropy/egd/info.txt index be6380fc9..25117ed09 100644 --- a/src/entropy/egd/info.txt +++ b/src/entropy/egd/info.txt @@ -1,6 +1,12 @@ define ENTROPY_SRC_EGD -load_on auto + +es_egd.cpp + + + +es_egd.h + solaris -> socket diff --git a/src/entropy/hres_timer/hres_timer.cpp b/src/entropy/hres_timer/hres_timer.cpp index 74ea801c4..73282d8d2 100644 --- a/src/entropy/hres_timer/hres_timer.cpp +++ b/src/entropy/hres_timer/hres_timer.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include #include #include diff --git a/src/entropy/hres_timer/info.txt b/src/entropy/hres_timer/info.txt index 6c6454f5d..6e542aac8 100644 --- a/src/entropy/hres_timer/info.txt +++ b/src/entropy/hres_timer/info.txt @@ -1 +1,9 @@ define ENTROPY_SRC_HIGH_RESOLUTION_TIMER + + +hres_timer.cpp + + + +hres_timer.h + diff --git a/src/entropy/info.txt b/src/entropy/info.txt index 5f3d39dd5..a048df7d9 100644 --- a/src/entropy/info.txt +++ b/src/entropy/info.txt @@ -1,9 +1,3 @@ -load_on auto - - -entropy_src.h - - buf_comp diff --git a/src/entropy/proc_walk/es_ftw.cpp b/src/entropy/proc_walk/es_ftw.cpp index 2016f099a..5e2b17860 100644 --- a/src/entropy/proc_walk/es_ftw.cpp +++ b/src/entropy/proc_walk/es_ftw.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include #include #include #include diff --git a/src/entropy/proc_walk/info.txt b/src/entropy/proc_walk/info.txt index 50b67980a..fd65d8ffe 100644 --- a/src/entropy/proc_walk/info.txt +++ b/src/entropy/proc_walk/info.txt @@ -1,6 +1,12 @@ define ENTROPY_SRC_FTW -load_on auto + +es_ftw.cpp + + + +es_ftw.h + aix diff --git a/src/entropy/unix_procs/es_unix.cpp b/src/entropy/unix_procs/es_unix.cpp index fc5b026a4..039479308 100644 --- a/src/entropy/unix_procs/es_unix.cpp +++ b/src/entropy/unix_procs/es_unix.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include -#include +#include +#include #include #include #include diff --git a/src/entropy/unix_procs/es_unix.h b/src/entropy/unix_procs/es_unix.h index 1f8abb784..283405e19 100644 --- a/src/entropy/unix_procs/es_unix.h +++ b/src/entropy/unix_procs/es_unix.h @@ -9,7 +9,7 @@ #define BOTAN_ENTROPY_SRC_UNIX_H__ #include -#include +#include #include namespace Botan { diff --git a/src/entropy/unix_procs/info.txt b/src/entropy/unix_procs/info.txt index 529b56966..2100584e4 100644 --- a/src/entropy/unix_procs/info.txt +++ b/src/entropy/unix_procs/info.txt @@ -1,6 +1,15 @@ define ENTROPY_SRC_UNIX -load_on auto + +es_unix.cpp +unix_cmd.cpp +unix_src.cpp + + + +es_unix.h +unix_cmd.h + aix diff --git a/src/entropy/unix_procs/unix_cmd.cpp b/src/entropy/unix_procs/unix_cmd.cpp index 1cae07e26..34e7c314a 100644 --- a/src/entropy/unix_procs/unix_cmd.cpp +++ b/src/entropy/unix_procs/unix_cmd.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include #include #include diff --git a/src/entropy/unix_procs/unix_src.cpp b/src/entropy/unix_procs/unix_src.cpp index c843af6c2..a72ecf055 100644 --- a/src/entropy/unix_procs/unix_src.cpp +++ b/src/entropy/unix_procs/unix_src.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include namespace Botan { diff --git a/src/entropy/win32_stats/info.txt b/src/entropy/win32_stats/info.txt index 3af05d502..0972df898 100644 --- a/src/entropy/win32_stats/info.txt +++ b/src/entropy/win32_stats/info.txt @@ -1,6 +1,12 @@ define ENTROPY_SRC_WIN32 -load_on auto + +es_win32.cpp + + + +es_win32.h + windows diff --git a/src/filters/base64/info.txt b/src/filters/base64/info.txt index 1d36b948e..93671739d 100644 --- a/src/filters/base64/info.txt +++ b/src/filters/base64/info.txt @@ -1,13 +1,5 @@ define BASE64_CODEC -load_on auto - - -base64.cpp -b64_char.cpp -base64.h - - filters diff --git a/src/filters/hex/info.txt b/src/filters/hex/info.txt index 817ff1a00..0a4205669 100644 --- a/src/filters/hex/info.txt +++ b/src/filters/hex/info.txt @@ -1,13 +1,5 @@ define HEX_CODEC -load_on auto - - -hex.cpp -hex_char.cpp -hex.h - - filters diff --git a/src/filters/modes/cbc/info.txt b/src/filters/modes/cbc/info.txt index 9b4be1b58..92a39d674 100644 --- a/src/filters/modes/cbc/info.txt +++ b/src/filters/modes/cbc/info.txt @@ -1,12 +1,5 @@ define CBC -load_on auto - - -cbc.cpp -cbc.h - - mode_pad diff --git a/src/filters/modes/cfb/info.txt b/src/filters/modes/cfb/info.txt index b68afc7d0..230899a03 100644 --- a/src/filters/modes/cfb/info.txt +++ b/src/filters/modes/cfb/info.txt @@ -1,12 +1 @@ define CFB - -load_on auto - - -cfb.cpp -cfb.h - - - -modes - diff --git a/src/filters/modes/cts/info.txt b/src/filters/modes/cts/info.txt index 773254a30..237f8cd97 100644 --- a/src/filters/modes/cts/info.txt +++ b/src/filters/modes/cts/info.txt @@ -1,12 +1 @@ define CTS - -load_on auto - - -cts.cpp -cts.h - - - -block - diff --git a/src/filters/modes/eax/info.txt b/src/filters/modes/eax/info.txt index 143944f03..4c91318d6 100644 --- a/src/filters/modes/eax/info.txt +++ b/src/filters/modes/eax/info.txt @@ -1,16 +1,5 @@ define EAX -load_on auto - - -eax.cpp -eax.h -eax_dec.cpp - - -block cmac -filters -mac diff --git a/src/filters/modes/ecb/info.txt b/src/filters/modes/ecb/info.txt index f5c831169..a26930470 100644 --- a/src/filters/modes/ecb/info.txt +++ b/src/filters/modes/ecb/info.txt @@ -1,13 +1,5 @@ define ECB -load_on auto - - -ecb.cpp -ecb.h - - -block mode_pad diff --git a/src/filters/modes/info.txt b/src/filters/modes/info.txt index 420233b46..6d27c9709 100644 --- a/src/filters/modes/info.txt +++ b/src/filters/modes/info.txt @@ -1,12 +1,5 @@ define CIPHER_MODEBASE -load_on auto - - -modebase.cpp -modebase.h - - block filters diff --git a/src/filters/modes/mode_pad/info.txt b/src/filters/modes/mode_pad/info.txt index 9629a7202..e97ea03a5 100644 --- a/src/filters/modes/mode_pad/info.txt +++ b/src/filters/modes/mode_pad/info.txt @@ -1,8 +1 @@ define CIPHER_MODE_PADDING - -load_on auto - - -mode_pad.cpp -mode_pad.h - diff --git a/src/filters/modes/xts/info.txt b/src/filters/modes/xts/info.txt index 871bb987a..9af3238f1 100644 --- a/src/filters/modes/xts/info.txt +++ b/src/filters/modes/xts/info.txt @@ -1,13 +1 @@ define XTS - -load_on auto - - -xts.cpp -xts.h - - - -block -filters - diff --git a/src/filters/pipe.h b/src/filters/pipe.h index 120f2fbdd..bab360c24 100644 --- a/src/filters/pipe.h +++ b/src/filters/pipe.h @@ -268,8 +268,8 @@ BOTAN_DLL std::istream& operator>>(std::istream&, Pipe&); } -#endif - #if defined(BOTAN_HAS_PIPE_UNIXFD_IO) #include #endif + +#endif diff --git a/src/hash/has160/has160.cpp b/src/hash/has160/has160.cpp index ae45418ce..d245a0249 100644 --- a/src/hash/has160/has160.cpp +++ b/src/hash/has160/has160.cpp @@ -11,7 +11,7 @@ namespace Botan { -namespace { +namespace HAS_160_F { /* * HAS-160 F1 Function @@ -60,6 +60,8 @@ inline void F4(u32bit A, u32bit& B, u32bit C, u32bit D, u32bit& E, */ void HAS_160::compress_n(const byte input[], u32bit blocks) { + using namespace HAS_160_F; + u32bit A = digest[0], B = digest[1], C = digest[2], D = digest[3], E = digest[4]; diff --git a/src/hash/info.txt b/src/hash/info.txt index 0e45806f8..a048df7d9 100644 --- a/src/hash/info.txt +++ b/src/hash/info.txt @@ -1,9 +1,3 @@ -load_on auto - - -hash.h - - buf_comp diff --git a/src/hash/md4_ia32/md4_ia32_imp.S b/src/hash/md4_ia32/md4_ia32_imp.S index 1df972bb9..c7e108147 100644 --- a/src/hash/md4_ia32/md4_ia32_imp.S +++ b/src/hash/md4_ia32/md4_ia32_imp.S @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include START_LISTING(md4_ia32.S) diff --git a/src/hash/md5_ia32/md5_ia32_imp.S b/src/hash/md5_ia32/md5_ia32_imp.S index d1aecb834..e77836353 100644 --- a/src/hash/md5_ia32/md5_ia32_imp.S +++ b/src/hash/md5_ia32/md5_ia32_imp.S @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include START_LISTING(md5_ia32.S) diff --git a/src/hash/rmd128/rmd128.cpp b/src/hash/rmd128/rmd128.cpp index 7e9da3bdd..51e416eb1 100644 --- a/src/hash/rmd128/rmd128.cpp +++ b/src/hash/rmd128/rmd128.cpp @@ -11,7 +11,7 @@ namespace Botan { -namespace { +namespace RIPEMD_128_F { /* * RIPEMD-128 F1 Function @@ -60,6 +60,8 @@ inline void F4(u32bit& A, u32bit B, u32bit C, u32bit D, */ void RIPEMD_128::compress_n(const byte input[], u32bit blocks) { + using namespace RIPEMD_128_F; + const u32bit MAGIC2 = 0x5A827999, MAGIC3 = 0x6ED9EBA1, MAGIC4 = 0x8F1BBCDC, MAGIC5 = 0x50A28BE6, MAGIC6 = 0x5C4DD124, MAGIC7 = 0x6D703EF3; diff --git a/src/hash/sha1_amd64/sha1_amd64_imp.S b/src/hash/sha1_amd64/sha1_amd64_imp.S index d45e2fd86..4eea75f11 100644 --- a/src/hash/sha1_amd64/sha1_amd64_imp.S +++ b/src/hash/sha1_amd64/sha1_amd64_imp.S @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include START_LISTING(sha1_amd64.S) diff --git a/src/hash/sha1_ia32/sha1_ia32_imp.S b/src/hash/sha1_ia32/sha1_ia32_imp.S index 3167fce9a..c2777b4b5 100644 --- a/src/hash/sha1_ia32/sha1_ia32_imp.S +++ b/src/hash/sha1_ia32/sha1_ia32_imp.S @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include START_LISTING(sha1_ia32.S) diff --git a/src/kdf/info.txt b/src/kdf/info.txt index 8eb4fc6e9..a4cd72bf5 100644 --- a/src/kdf/info.txt +++ b/src/kdf/info.txt @@ -1,12 +1,5 @@ define KDF_BASE -load_on auto - - -kdf.cpp -kdf.h - - alloc diff --git a/src/kdf/kdf1/info.txt b/src/kdf/kdf1/info.txt index 2557f9472..354466107 100644 --- a/src/kdf/kdf1/info.txt +++ b/src/kdf/kdf1/info.txt @@ -1,12 +1,5 @@ define KDF1 -load_on auto - - -kdf1.h -kdf1.cpp - - hash diff --git a/src/kdf/kdf2/info.txt b/src/kdf/kdf2/info.txt index b71595449..d233b5f77 100644 --- a/src/kdf/kdf2/info.txt +++ b/src/kdf/kdf2/info.txt @@ -1,12 +1,5 @@ define KDF2 -load_on auto - - -kdf2.cpp -kdf2.h - - hash diff --git a/src/kdf/mgf1/info.txt b/src/kdf/mgf1/info.txt index 0f104c3b3..91973a614 100644 --- a/src/kdf/mgf1/info.txt +++ b/src/kdf/mgf1/info.txt @@ -1,12 +1,5 @@ define MGF1 -load_on dep - - -mgf1.h -mgf1.cpp - - hash diff --git a/src/kdf/ssl_prf/info.txt b/src/kdf/ssl_prf/info.txt index b306721b9..68355ff40 100644 --- a/src/kdf/ssl_prf/info.txt +++ b/src/kdf/ssl_prf/info.txt @@ -1,12 +1,5 @@ define SSL_V3_PRF -load_on auto - - -prf_ssl3.h -prf_ssl3.cpp - - md5 sha1 diff --git a/src/kdf/tls_prf/info.txt b/src/kdf/tls_prf/info.txt index 11a0d44f5..9531a6a83 100644 --- a/src/kdf/tls_prf/info.txt +++ b/src/kdf/tls_prf/info.txt @@ -1,15 +1,7 @@ define TLS_V10_PRF -load_on auto - - -prf_tls.h -prf_tls.cpp - - hmac -mac md5 sha1 diff --git a/src/kdf/x942_prf/info.txt b/src/kdf/x942_prf/info.txt index e38b2aac1..e51aafd08 100644 --- a/src/kdf/x942_prf/info.txt +++ b/src/kdf/x942_prf/info.txt @@ -1,12 +1,5 @@ define X942_PRF -load_on auto - - -prf_x942.cpp -prf_x942.h - - asn1 oid_lookup diff --git a/src/libstate/info.txt b/src/libstate/info.txt index e8271ce99..605a5a6a0 100644 --- a/src/libstate/info.txt +++ b/src/libstate/info.txt @@ -2,23 +2,26 @@ load_on always define LIBSTATE_MODULE - + botan.h +libstate.h +init.h +look_pk.h +lookup.h +pk_engine.h +scan_name.h + + + get_enc.cpp init.cpp -init.h libstate.cpp -libstate.h look_pk.cpp -look_pk.h lookup.cpp -lookup.h pk_engine.cpp -pk_engine.h policy.cpp scan_name.cpp -scan_name.h - + algo_factory diff --git a/src/libstate/oid_lookup/info.txt b/src/libstate/oid_lookup/info.txt index e0f6f099c..6544c9501 100644 --- a/src/libstate/oid_lookup/info.txt +++ b/src/libstate/oid_lookup/info.txt @@ -1,12 +1,5 @@ -load_on dep - define OID_LOOKUP - -oids.cpp -oids.h - - asn1 diff --git a/src/mac/cbc_mac/info.txt b/src/mac/cbc_mac/info.txt index 80adc5fd0..b65bb684c 100644 --- a/src/mac/cbc_mac/info.txt +++ b/src/mac/cbc_mac/info.txt @@ -1,12 +1,5 @@ define CBC_MAC -load_on auto - - -cbc_mac.cpp -cbc_mac.h - - block diff --git a/src/mac/cmac/info.txt b/src/mac/cmac/info.txt index 5dad789de..5513943ac 100644 --- a/src/mac/cmac/info.txt +++ b/src/mac/cmac/info.txt @@ -1,12 +1,5 @@ define CMAC -load_on auto - - -cmac.cpp -cmac.h - - block diff --git a/src/mac/hmac/info.txt b/src/mac/hmac/info.txt index 26da83533..b1a69c25b 100644 --- a/src/mac/hmac/info.txt +++ b/src/mac/hmac/info.txt @@ -1,12 +1,5 @@ define HMAC -load_on auto - - -hmac.cpp -hmac.h - - hash diff --git a/src/mac/info.txt b/src/mac/info.txt index 9a839d04d..6a74d8445 100644 --- a/src/mac/info.txt +++ b/src/mac/info.txt @@ -1,10 +1,3 @@ -load_on auto - - -mac.h -mac.cpp - - buf_comp sym_algo diff --git a/src/mac/ssl3mac/info.txt b/src/mac/ssl3mac/info.txt index c4ef54629..8c636dbae 100644 --- a/src/mac/ssl3mac/info.txt +++ b/src/mac/ssl3mac/info.txt @@ -1,12 +1,5 @@ define SSL3_MAC -load_on auto - - -ssl3_mac.cpp -ssl3_mac.h - - hash diff --git a/src/mac/x919_mac/info.txt b/src/mac/x919_mac/info.txt index 16955816c..ca294c951 100644 --- a/src/mac/x919_mac/info.txt +++ b/src/mac/x919_mac/info.txt @@ -1,12 +1,5 @@ define ANSI_X919_MAC -load_on auto - - -x919_mac.cpp -x919_mac.h - - block diff --git a/src/math/bigint/big_ops2.cpp b/src/math/bigint/big_ops2.cpp index 488eca909..863e5bde4 100644 --- a/src/math/bigint/big_ops2.cpp +++ b/src/math/bigint/big_ops2.cpp @@ -6,7 +6,7 @@ */ #include -#include +#include #include #include diff --git a/src/math/bigint/big_ops3.cpp b/src/math/bigint/big_ops3.cpp index ad8b7bbd0..8f7861003 100644 --- a/src/math/bigint/big_ops3.cpp +++ b/src/math/bigint/big_ops3.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include diff --git a/src/math/bigint/bigint.cpp b/src/math/bigint/bigint.cpp index 7592ec439..dba4f6204 100644 --- a/src/math/bigint/bigint.cpp +++ b/src/math/bigint/bigint.cpp @@ -6,7 +6,7 @@ */ #include -#include +#include #include #include #include diff --git a/src/math/bigint/divide.cpp b/src/math/bigint/divide.cpp index 45d31350d..a5f2462d8 100644 --- a/src/math/bigint/divide.cpp +++ b/src/math/bigint/divide.cpp @@ -6,7 +6,7 @@ */ #include -#include +#include namespace Botan { diff --git a/src/math/bigint/info.txt b/src/math/bigint/info.txt index 30018b795..d5741943f 100644 --- a/src/math/bigint/info.txt +++ b/src/math/bigint/info.txt @@ -2,11 +2,17 @@ load_on auto define BIGINT - + bigint.h divide.h -mp_core.h mp_types.h + + + +mp_core.h + + + big_code.cpp big_io.cpp big_ops2.cpp @@ -19,7 +25,7 @@ mp_comba.cpp mp_karat.cpp mp_misc.cpp mp_shift.cpp - + alloc diff --git a/src/math/bigint/monty_amd64/info.txt b/src/math/bigint/monty_amd64/info.txt index 657cd0353..bb16dbe8f 100644 --- a/src/math/bigint/monty_amd64/info.txt +++ b/src/math/bigint/monty_amd64/info.txt @@ -2,9 +2,9 @@ mp_bits 64 load_on never - + mp_monty.S - + amd64 diff --git a/src/math/bigint/monty_amd64/mp_monty.S b/src/math/bigint/monty_amd64/mp_monty.S index fa493aaa2..9eab9f766 100644 --- a/src/math/bigint/monty_amd64/mp_monty.S +++ b/src/math/bigint/monty_amd64/mp_monty.S @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include START_LISTING(mp_monty.S) diff --git a/src/math/bigint/monty_generic/info.txt b/src/math/bigint/monty_generic/info.txt index c709229e6..cd05ccdc0 100644 --- a/src/math/bigint/monty_generic/info.txt +++ b/src/math/bigint/monty_generic/info.txt @@ -1,5 +1,5 @@ load_on dep - + mp_monty.cpp - + diff --git a/src/math/bigint/monty_generic/mp_monty.cpp b/src/math/bigint/monty_generic/mp_monty.cpp index 5409e2569..ba1071e21 100644 --- a/src/math/bigint/monty_generic/mp_monty.cpp +++ b/src/math/bigint/monty_generic/mp_monty.cpp @@ -6,9 +6,9 @@ * Distributed under the terms of the Botan license */ -#include -#include -#include +#include +#include +#include namespace Botan { diff --git a/src/math/bigint/mp_amd64/info.txt b/src/math/bigint/mp_amd64/info.txt index a7da8806e..616fb2840 100644 --- a/src/math/bigint/mp_amd64/info.txt +++ b/src/math/bigint/mp_amd64/info.txt @@ -1,11 +1,11 @@ -mp_bits 64 - load_on dep - +mp_bits 64 + + mp_asm.h mp_asmi.h - + amd64 diff --git a/src/math/bigint/mp_amd64/mp_asmi.h b/src/math/bigint/mp_amd64/mp_asmi.h index 1a3ac1aaa..d8f681d77 100644 --- a/src/math/bigint/mp_amd64/mp_asmi.h +++ b/src/math/bigint/mp_amd64/mp_asmi.h @@ -9,7 +9,7 @@ #ifndef BOTAN_MP_ASM_INTERNAL_H__ #define BOTAN_MP_ASM_INTERNAL_H__ -#include +#include namespace Botan { diff --git a/src/math/bigint/mp_asm.cpp b/src/math/bigint/mp_asm.cpp index ea9738d30..9827bff06 100644 --- a/src/math/bigint/mp_asm.cpp +++ b/src/math/bigint/mp_asm.cpp @@ -6,9 +6,9 @@ * Distributed under the terms of the Botan license */ -#include -#include -#include +#include +#include +#include #include namespace Botan { diff --git a/src/math/bigint/mp_asm64/info.txt b/src/math/bigint/mp_asm64/info.txt index 7bdbffb2c..fd0242a7a 100644 --- a/src/math/bigint/mp_asm64/info.txt +++ b/src/math/bigint/mp_asm64/info.txt @@ -2,10 +2,10 @@ mp_bits 64 load_on dep - + mp_asm.h mp_generic:mp_asmi.h - + #amd64 diff --git a/src/math/bigint/mp_comba.cpp b/src/math/bigint/mp_comba.cpp index 218038d8a..2770d3f0a 100644 --- a/src/math/bigint/mp_comba.cpp +++ b/src/math/bigint/mp_comba.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include -#include +#include +#include namespace Botan { diff --git a/src/math/bigint/mp_generic/info.txt b/src/math/bigint/mp_generic/info.txt index 28f258ebb..ab4d7406a 100644 --- a/src/math/bigint/mp_generic/info.txt +++ b/src/math/bigint/mp_generic/info.txt @@ -1,6 +1,6 @@ load_on dep - + mp_asm.h mp_asmi.h - + diff --git a/src/math/bigint/mp_generic/mp_asmi.h b/src/math/bigint/mp_generic/mp_asmi.h index 21c4db248..9913c6ba9 100644 --- a/src/math/bigint/mp_generic/mp_asmi.h +++ b/src/math/bigint/mp_generic/mp_asmi.h @@ -9,7 +9,7 @@ #ifndef BOTAN_MP_ASM_INTERNAL_H__ #define BOTAN_MP_ASM_INTERNAL_H__ -#include +#include namespace Botan { diff --git a/src/math/bigint/mp_ia32/info.txt b/src/math/bigint/mp_ia32/info.txt index 6e093a7e5..182f34eb7 100644 --- a/src/math/bigint/mp_ia32/info.txt +++ b/src/math/bigint/mp_ia32/info.txt @@ -1,11 +1,11 @@ -mp_bits 32 +load_on dep -load_on asm_ok +mp_bits 32 - + mp_asm.h mp_asmi.h - + ia32 diff --git a/src/math/bigint/mp_ia32/mp_asmi.h b/src/math/bigint/mp_ia32/mp_asmi.h index 46bf302d5..0b8708e53 100644 --- a/src/math/bigint/mp_ia32/mp_asmi.h +++ b/src/math/bigint/mp_ia32/mp_asmi.h @@ -9,7 +9,7 @@ #ifndef BOTAN_MP_ASM_INTERNAL_H__ #define BOTAN_MP_ASM_INTERNAL_H__ -#include +#include namespace Botan { diff --git a/src/math/bigint/mp_ia32_msvc/info.txt b/src/math/bigint/mp_ia32_msvc/info.txt index 52839d89b..55a42c310 100644 --- a/src/math/bigint/mp_ia32_msvc/info.txt +++ b/src/math/bigint/mp_ia32_msvc/info.txt @@ -2,10 +2,10 @@ mp_bits 32 load_on dep - + mp_generic:mp_asm.h mp_asmi.h - + ia32 diff --git a/src/math/bigint/mp_ia32_msvc/mp_asmi.h b/src/math/bigint/mp_ia32_msvc/mp_asmi.h index 33ce6eb3d..4c3027fde 100644 --- a/src/math/bigint/mp_ia32_msvc/mp_asmi.h +++ b/src/math/bigint/mp_ia32_msvc/mp_asmi.h @@ -9,7 +9,7 @@ #ifndef BOTAN_MP_ASM_INTERNAL_H__ #define BOTAN_MP_ASM_INTERNAL_H__ -#include +#include namespace Botan { diff --git a/src/math/bigint/mp_karat.cpp b/src/math/bigint/mp_karat.cpp index f30d418cc..a50e4ee0c 100644 --- a/src/math/bigint/mp_karat.cpp +++ b/src/math/bigint/mp_karat.cpp @@ -5,9 +5,9 @@ * Distributed under the terms of the Botan license */ -#include +#include #include -#include +#include namespace Botan { diff --git a/src/math/bigint/mp_misc.cpp b/src/math/bigint/mp_misc.cpp index 6b7fc651b..86d5f3d50 100644 --- a/src/math/bigint/mp_misc.cpp +++ b/src/math/bigint/mp_misc.cpp @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#include -#include +#include +#include namespace Botan { diff --git a/src/math/bigint/mp_shift.cpp b/src/math/bigint/mp_shift.cpp index a7de79c77..f1d609bfb 100644 --- a/src/math/bigint/mp_shift.cpp +++ b/src/math/bigint/mp_shift.cpp @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include #include namespace Botan { diff --git a/src/math/bigint/mulop_amd64/info.txt b/src/math/bigint/mulop_amd64/info.txt index 704e4dad8..4a82ff5be 100644 --- a/src/math/bigint/mulop_amd64/info.txt +++ b/src/math/bigint/mulop_amd64/info.txt @@ -2,9 +2,9 @@ mp_bits 64 load_on never - + mp_mulop_amd64.S - + amd64 diff --git a/src/math/bigint/mulop_amd64/mp_mulop.cpp b/src/math/bigint/mulop_amd64/mp_mulop.cpp index cbd723e28..e2f38a104 100644 --- a/src/math/bigint/mulop_amd64/mp_mulop.cpp +++ b/src/math/bigint/mulop_amd64/mp_mulop.cpp @@ -5,9 +5,9 @@ * Distributed under the terms of the Botan license */ -#include -#include -#include +#include +#include +#include #include namespace Botan { diff --git a/src/math/bigint/mulop_amd64/mp_mulop_amd64.S b/src/math/bigint/mulop_amd64/mp_mulop_amd64.S index dd794bccd..d0bb3325f 100644 --- a/src/math/bigint/mulop_amd64/mp_mulop_amd64.S +++ b/src/math/bigint/mulop_amd64/mp_mulop_amd64.S @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include START_LISTING(mp_mulop.S) diff --git a/src/math/bigint/mulop_generic/info.txt b/src/math/bigint/mulop_generic/info.txt index 8fa2a40c9..548d0f44b 100644 --- a/src/math/bigint/mulop_generic/info.txt +++ b/src/math/bigint/mulop_generic/info.txt @@ -1,5 +1,5 @@ load_on dep - + mp_mulop.cpp - + diff --git a/src/math/bigint/mulop_generic/mp_mulop.cpp b/src/math/bigint/mulop_generic/mp_mulop.cpp index 4647d00d5..33ee2af32 100644 --- a/src/math/bigint/mulop_generic/mp_mulop.cpp +++ b/src/math/bigint/mulop_generic/mp_mulop.cpp @@ -5,9 +5,9 @@ * Distributed under the terms of the Botan license */ -#include -#include -#include +#include +#include +#include #include namespace Botan { diff --git a/src/math/bigint/mulop_ia32/info.txt b/src/math/bigint/mulop_ia32/info.txt index dd554773f..7afa2ca2f 100644 --- a/src/math/bigint/mulop_ia32/info.txt +++ b/src/math/bigint/mulop_ia32/info.txt @@ -4,9 +4,9 @@ mp_bits 32 load_on request - + mp_mulop.S - + ia32 diff --git a/src/math/bigint/mulop_ia32/mp_mulop.S b/src/math/bigint/mulop_ia32/mp_mulop.S index 0ca559659..34cd58112 100644 --- a/src/math/bigint/mulop_ia32/mp_mulop.S +++ b/src/math/bigint/mulop_ia32/mp_mulop.S @@ -5,7 +5,7 @@ * Distributed under the terms of the Botan license */ -#include +#include START_LISTING(mp_muladd.S) diff --git a/src/math/gfpmath/gfp_element.cpp b/src/math/gfpmath/gfp_element.cpp index 4b95e68ff..ebba236d5 100644 --- a/src/math/gfpmath/gfp_element.cpp +++ b/src/math/gfpmath/gfp_element.cpp @@ -9,9 +9,8 @@ #include #include #include -#include -#include -#include +#include +#include #include #include diff --git a/src/math/gfpmath/info.txt b/src/math/gfpmath/info.txt index abbdb0a47..a02dbc044 100644 --- a/src/math/gfpmath/info.txt +++ b/src/math/gfpmath/info.txt @@ -1,18 +1,19 @@ -uses_tr1 yes - -load_on auto - define BIGINT_GFP - -curve_gfp.cpp +uses_tr1 yes + + curve_gfp.h -gfp_element.cpp gfp_element.h gfp_modulus.h -point_gfp.cpp point_gfp.h - + + + +curve_gfp.cpp +gfp_element.cpp +point_gfp.cpp + bigint diff --git a/src/math/numbertheory/info.txt b/src/math/numbertheory/info.txt index 527f4fa29..4a3e3436b 100644 --- a/src/math/numbertheory/info.txt +++ b/src/math/numbertheory/info.txt @@ -2,25 +2,28 @@ load_on auto define BIGINT_MATH - -blinding.cpp + blinding.h def_powm.h +numthry.h +pow_mod.h +reducer.h + + + +blinding.cpp dsa_gen.cpp jacobi.cpp make_prm.cpp mp_numth.cpp numthry.cpp -numthry.h pow_mod.cpp -pow_mod.h powm_fw.cpp powm_mnt.cpp primes.cpp reducer.cpp -reducer.h ressol.cpp - + algo_factory diff --git a/src/math/numbertheory/mp_numth.cpp b/src/math/numbertheory/mp_numth.cpp index 2cb36b8a3..484c15f8d 100644 --- a/src/math/numbertheory/mp_numth.cpp +++ b/src/math/numbertheory/mp_numth.cpp @@ -6,7 +6,7 @@ */ #include -#include +#include #include #include diff --git a/src/math/numbertheory/powm_fw.cpp b/src/math/numbertheory/powm_fw.cpp index b764ee7aa..8f39830a7 100644 --- a/src/math/numbertheory/powm_fw.cpp +++ b/src/math/numbertheory/powm_fw.cpp @@ -16,8 +16,8 @@ namespace { /* * Try to choose a good window size */ -u32bit choose_window_bits(u32bit exp_bits, u32bit, - Power_Mod::Usage_Hints hints) +u32bit fw_powm_window_bits(u32bit exp_bits, u32bit, + Power_Mod::Usage_Hints hints) { static const u32bit wsize[][2] = { { 2048, 7 }, { 1024, 6 }, { 256, 5 }, { 128, 4 }, { 64, 3 }, { 0, 0 } @@ -62,7 +62,7 @@ void Fixed_Window_Exponentiator::set_exponent(const BigInt& e) */ void Fixed_Window_Exponentiator::set_base(const BigInt& base) { - window_bits = choose_window_bits(exp.bits(), base.bits(), hints); + window_bits = fw_powm_window_bits(exp.bits(), base.bits(), hints); g.resize((1 << window_bits) - 1); g[0] = base; diff --git a/src/math/numbertheory/powm_mnt.cpp b/src/math/numbertheory/powm_mnt.cpp index e6d8cc3f0..d18081c6a 100644 --- a/src/math/numbertheory/powm_mnt.cpp +++ b/src/math/numbertheory/powm_mnt.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include namespace Botan { @@ -16,8 +16,8 @@ namespace { /* * Try to choose a good window size */ -u32bit choose_window_bits(u32bit exp_bits, u32bit, - Power_Mod::Usage_Hints hints) +u32bit montgomery_powm_window_bits(u32bit exp_bits, u32bit, + Power_Mod::Usage_Hints hints) { static const u32bit wsize[][2] = { { 2048, 4 }, { 1024, 3 }, { 256, 2 }, { 128, 1 }, { 0, 0 } @@ -76,7 +76,7 @@ void Montgomery_Exponentiator::set_exponent(const BigInt& exp) */ void Montgomery_Exponentiator::set_base(const BigInt& base) { - window_bits = choose_window_bits(exp.bits(), base.bits(), hints); + window_bits = montgomery_powm_window_bits(exp.bits(), base.bits(), hints); g.resize((1 << window_bits) - 1); diff --git a/src/math/numbertheory/reducer.cpp b/src/math/numbertheory/reducer.cpp index fbd675ea6..aa53f1a0e 100644 --- a/src/math/numbertheory/reducer.cpp +++ b/src/math/numbertheory/reducer.cpp @@ -7,7 +7,7 @@ #include #include -#include +#include namespace Botan { diff --git a/src/mutex/info.txt b/src/mutex/info.txt index 0f2836b64..b92b329aa 100644 --- a/src/mutex/info.txt +++ b/src/mutex/info.txt @@ -1,7 +1 @@ define MUTEX_WRAPPERS - -load_on auto - - -mutex.h - diff --git a/src/mutex/noop_mutex/info.txt b/src/mutex/noop_mutex/info.txt index 6025959c2..de98deda0 100644 --- a/src/mutex/noop_mutex/info.txt +++ b/src/mutex/noop_mutex/info.txt @@ -1,8 +1 @@ -load_on auto - define MUTEX_NOOP - - -mux_noop.cpp -mux_noop.h - diff --git a/src/mutex/pthreads/info.txt b/src/mutex/pthreads/info.txt index 7315c186a..e363cdbeb 100644 --- a/src/mutex/pthreads/info.txt +++ b/src/mutex/pthreads/info.txt @@ -1,12 +1,5 @@ define MUTEX_PTHREAD -load_on auto - - -mux_pthr.cpp -mux_pthr.h - - all!qnx,freebsd,dragonfly,openbsd,netbsd -> pthread diff --git a/src/pbe/info.txt b/src/pbe/info.txt index f58ed1da4..b45c8f9f4 100644 --- a/src/pbe/info.txt +++ b/src/pbe/info.txt @@ -1,12 +1,5 @@ -load_on dep - define PASSWORD_BASED_ENCRYPTION - -get_pbe.cpp -get_pbe.h - - filters libstate diff --git a/src/pbe/pbes1/info.txt b/src/pbe/pbes1/info.txt index 5dcbf9510..4fe66f6f8 100644 --- a/src/pbe/pbes1/info.txt +++ b/src/pbe/pbes1/info.txt @@ -1,12 +1,5 @@ define PBE_PKCS_V15 -load_on auto - - -pbes1.cpp -pbes1.h - - asn1 block diff --git a/src/pbe/pbes2/info.txt b/src/pbe/pbes2/info.txt index 71fb6ea72..e0d3833e2 100644 --- a/src/pbe/pbes2/info.txt +++ b/src/pbe/pbes2/info.txt @@ -1,12 +1,5 @@ define PBE_PKCS_V20 -load_on auto - - -pbes2.cpp -pbes2.h - - algo_factory asn1 diff --git a/src/pk_pad/eme1/info.txt b/src/pk_pad/eme1/info.txt index 794254e8e..42f6be5a2 100644 --- a/src/pk_pad/eme1/info.txt +++ b/src/pk_pad/eme1/info.txt @@ -2,11 +2,6 @@ define EME1 load_on auto - -eme1.h -eme1.cpp - - hash kdf diff --git a/src/pk_pad/eme_pkcs/info.txt b/src/pk_pad/eme_pkcs/info.txt index 95c568452..e4fb4604d 100644 --- a/src/pk_pad/eme_pkcs/info.txt +++ b/src/pk_pad/eme_pkcs/info.txt @@ -1,8 +1 @@ define EME_PKCS1v15 - -load_on auto - - -eme_pkcs.h -eme_pkcs.cpp - diff --git a/src/pk_pad/emsa1/info.txt b/src/pk_pad/emsa1/info.txt index 55832307b..294e4b068 100644 --- a/src/pk_pad/emsa1/info.txt +++ b/src/pk_pad/emsa1/info.txt @@ -1,12 +1,5 @@ define EMSA1 -load_on auto - - -emsa1.h -emsa1.cpp - - hash diff --git a/src/pk_pad/emsa1_bsi/info.txt b/src/pk_pad/emsa1_bsi/info.txt index 5e8fe09ca..313b153fc 100644 --- a/src/pk_pad/emsa1_bsi/info.txt +++ b/src/pk_pad/emsa1_bsi/info.txt @@ -1,12 +1,5 @@ define EMSA1_BSI -load_on auto - - -emsa1_bsi.h -emsa1_bsi.cpp - - emsa1 diff --git a/src/pk_pad/emsa2/info.txt b/src/pk_pad/emsa2/info.txt index a6fff2a02..16357f841 100644 --- a/src/pk_pad/emsa2/info.txt +++ b/src/pk_pad/emsa2/info.txt @@ -1,12 +1,5 @@ define EMSA2 -load_on auto - - -emsa2.h -emsa2.cpp - - hash hash_id diff --git a/src/pk_pad/emsa3/info.txt b/src/pk_pad/emsa3/info.txt index babd98711..e9ba20196 100644 --- a/src/pk_pad/emsa3/info.txt +++ b/src/pk_pad/emsa3/info.txt @@ -1,12 +1,5 @@ define EMSA3 -load_on auto - - -emsa3.h -emsa3.cpp - - hash hash_id diff --git a/src/pk_pad/emsa4/info.txt b/src/pk_pad/emsa4/info.txt index ea1db30a1..ff492d1e0 100644 --- a/src/pk_pad/emsa4/info.txt +++ b/src/pk_pad/emsa4/info.txt @@ -1,12 +1,5 @@ define EMSA4 -load_on auto - - -emsa4.h -emsa4.cpp - - hash kdf diff --git a/src/pk_pad/emsa_raw/info.txt b/src/pk_pad/emsa_raw/info.txt index 4bd850e11..f5be26ac9 100644 --- a/src/pk_pad/emsa_raw/info.txt +++ b/src/pk_pad/emsa_raw/info.txt @@ -1,8 +1 @@ define EMSA_RAW - -load_on auto - - -emsa_raw.h -emsa_raw.cpp - diff --git a/src/pk_pad/hash_id/info.txt b/src/pk_pad/hash_id/info.txt index af9f5cd4f..5a4df3cc2 100644 --- a/src/pk_pad/hash_id/info.txt +++ b/src/pk_pad/hash_id/info.txt @@ -1,12 +1,5 @@ define HASH_ID -load_on auto - - -hash_id.cpp -hash_id.h - - alloc diff --git a/src/pk_pad/info.txt b/src/pk_pad/info.txt index 14b05f458..19e15f8bd 100644 --- a/src/pk_pad/info.txt +++ b/src/pk_pad/info.txt @@ -2,12 +2,6 @@ define PK_PADDING load_on auto - -emsa.h -eme.cpp -eme.h - - alloc rng 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 diff --git a/src/rng/auto_rng/auto_rng.cpp b/src/rng/auto_rng/auto_rng.cpp index 6906d9d17..5befc9d14 100644 --- a/src/rng/auto_rng/auto_rng.cpp +++ b/src/rng/auto_rng/auto_rng.cpp @@ -28,35 +28,35 @@ #endif #if defined(BOTAN_HAS_ENTROPY_SRC_HIGH_RESOLUTION_TIMER) - #include + #include #endif -#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 namespace Botan { @@ -72,7 +72,7 @@ void add_entropy_sources(RandomNumberGenerator* rng) rng->add_entropy_source(new High_Resolution_Timestamp); #endif -#if defined(BOTAN_HAS_ENTROPY_SRC_DEVICE) +#if defined(BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM) rng->add_entropy_source( new Device_EntropySource( split_on("/dev/urandom:/dev/random:/dev/srandom", ':') diff --git a/src/rng/auto_rng/info.txt b/src/rng/auto_rng/info.txt index 357dc17ad..0f7cee282 100644 --- a/src/rng/auto_rng/info.txt +++ b/src/rng/auto_rng/info.txt @@ -1,12 +1,5 @@ define AUTO_SEEDING_RNG -load_on auto - - -auto_rng.h -auto_rng.cpp - - hmac sha2 diff --git a/src/rng/hmac_rng/info.txt b/src/rng/hmac_rng/info.txt index f6135ee5a..5facd4aae 100644 --- a/src/rng/hmac_rng/info.txt +++ b/src/rng/hmac_rng/info.txt @@ -1,12 +1,5 @@ define HMAC_RNG -load_on auto - - -hmac_rng.cpp -hmac_rng.h - - mac diff --git a/src/rng/info.txt b/src/rng/info.txt index eea122cf9..4c88ba382 100644 --- a/src/rng/info.txt +++ b/src/rng/info.txt @@ -1,10 +1,3 @@ -load_on auto - - -rng.cpp -rng.h - - entropy diff --git a/src/rng/randpool/info.txt b/src/rng/randpool/info.txt index cab276e15..cc54e5d06 100644 --- a/src/rng/randpool/info.txt +++ b/src/rng/randpool/info.txt @@ -1,12 +1,5 @@ define RANDPOOL -load_on auto - - -randpool.cpp -randpool.h - - block mac diff --git a/src/rng/x931_rng/info.txt b/src/rng/x931_rng/info.txt index 35836b33b..d5ec68013 100644 --- a/src/rng/x931_rng/info.txt +++ b/src/rng/x931_rng/info.txt @@ -1,12 +1,5 @@ define X931_RNG -load_on auto - - -x931_rng.cpp -x931_rng.h - - block diff --git a/src/s2k/info.txt b/src/s2k/info.txt index 17f2a8c42..1d5226524 100644 --- a/src/s2k/info.txt +++ b/src/s2k/info.txt @@ -1,10 +1,3 @@ -load_on auto - - -s2k.cpp -s2k.h - - rng sym_algo diff --git a/src/s2k/pbkdf1/info.txt b/src/s2k/pbkdf1/info.txt index 387043f1b..e51b44886 100644 --- a/src/s2k/pbkdf1/info.txt +++ b/src/s2k/pbkdf1/info.txt @@ -1,12 +1,5 @@ define PBKDF1 -load_on auto - - -pbkdf1.cpp -pbkdf1.h - - hash diff --git a/src/s2k/pbkdf2/info.txt b/src/s2k/pbkdf2/info.txt index 56359d13d..5462b2e1b 100644 --- a/src/s2k/pbkdf2/info.txt +++ b/src/s2k/pbkdf2/info.txt @@ -1,12 +1,5 @@ define PBKDF2 -load_on auto - - -pbkdf2.cpp -pbkdf2.h - - mac diff --git a/src/s2k/pgps2k/info.txt b/src/s2k/pgps2k/info.txt index a1f5b3dfd..8be9c79f8 100644 --- a/src/s2k/pgps2k/info.txt +++ b/src/s2k/pgps2k/info.txt @@ -1,12 +1,5 @@ define PGPS2K -load_on auto - - -pgp_s2k.cpp -pgp_s2k.h - - hash diff --git a/src/selftest/info.txt b/src/selftest/info.txt index 079fd5030..53c6d286d 100644 --- a/src/selftest/info.txt +++ b/src/selftest/info.txt @@ -1,12 +1,5 @@ define SELFTESTS -load_on auto - - -selftest.cpp -selftest.h - - algo_factory filters diff --git a/src/stream/arc4/info.txt b/src/stream/arc4/info.txt index bb373dbc5..e3022925c 100644 --- a/src/stream/arc4/info.txt +++ b/src/stream/arc4/info.txt @@ -1,12 +1 @@ define ARC4 - -load_on auto - - -stream - - - -arc4.cpp -arc4.h - diff --git a/src/stream/ctr/info.txt b/src/stream/ctr/info.txt index ac4f3f710..2fa2272fd 100644 --- a/src/stream/ctr/info.txt +++ b/src/stream/ctr/info.txt @@ -1,12 +1,5 @@ define CTR_BE -load_on auto - - -ctr.cpp -ctr.h - - block stream diff --git a/src/stream/info.txt b/src/stream/info.txt index 213c42137..68d6c46d6 100644 --- a/src/stream/info.txt +++ b/src/stream/info.txt @@ -1,11 +1,5 @@ -load_on auto - define STREAM_CIPHER - -stream_cipher.h - - sym_algo diff --git a/src/stream/ofb/info.txt b/src/stream/ofb/info.txt index a01e9e1a6..702fea666 100644 --- a/src/stream/ofb/info.txt +++ b/src/stream/ofb/info.txt @@ -1,12 +1,5 @@ define OFB -load_on auto - - -ofb.cpp -ofb.h - - block stream diff --git a/src/stream/salsa20/info.txt b/src/stream/salsa20/info.txt index 8171708b0..1ce648d9f 100644 --- a/src/stream/salsa20/info.txt +++ b/src/stream/salsa20/info.txt @@ -1,12 +1 @@ define SALSA20 - -load_on auto - - -stream - - - -salsa20.cpp -salsa20.h - diff --git a/src/stream/turing/info.txt b/src/stream/turing/info.txt index dede0dd39..feb00a92d 100644 --- a/src/stream/turing/info.txt +++ b/src/stream/turing/info.txt @@ -1,13 +1 @@ define TURING - -load_on auto - - -stream - - - -tur_tab.cpp -turing.cpp -turing.h - diff --git a/src/stream/wid_wake/info.txt b/src/stream/wid_wake/info.txt index 6289e0369..f7333dede 100644 --- a/src/stream/wid_wake/info.txt +++ b/src/stream/wid_wake/info.txt @@ -1,12 +1 @@ define WID_WAKE - -load_on auto - - -stream - - - -wid_wake.cpp -wid_wake.h - diff --git a/src/sym_algo/info.txt b/src/sym_algo/info.txt index fab46270e..cfdd9b691 100644 --- a/src/sym_algo/info.txt +++ b/src/sym_algo/info.txt @@ -1,11 +1,3 @@ -load_on auto - - -sym_algo.h -symkey.cpp -symkey.h - - alloc filters diff --git a/src/utils/asm_amd64/info.txt b/src/utils/asm_amd64/info.txt index fdfcbcb6a..93405e6ce 100644 --- a/src/utils/asm_amd64/info.txt +++ b/src/utils/asm_amd64/info.txt @@ -1,5 +1,9 @@ load_on dep + +asm_macr_amd64.h + + amd64 diff --git a/src/utils/asm_ia32/info.txt b/src/utils/asm_ia32/info.txt index d19fdd192..d490124f4 100644 --- a/src/utils/asm_ia32/info.txt +++ b/src/utils/asm_ia32/info.txt @@ -1,5 +1,9 @@ load_on dep + +asm_macr_ia32.h + + ia32 diff --git a/src/utils/buf_comp/info.txt b/src/utils/buf_comp/info.txt index 7aea580ce..b91fe5082 100644 --- a/src/utils/buf_comp/info.txt +++ b/src/utils/buf_comp/info.txt @@ -1,9 +1,3 @@ -load_on auto - - -buf_comp.h - - alloc diff --git a/src/utils/datastor/info.txt b/src/utils/datastor/info.txt index 9c995adaf..93e938d78 100644 --- a/src/utils/datastor/info.txt +++ b/src/utils/datastor/info.txt @@ -1,10 +1,3 @@ -load_on auto - - -datastor.cpp -datastor.h - - alloc filters diff --git a/src/utils/info.txt b/src/utils/info.txt index 110afeb64..7324f55f6 100644 --- a/src/utils/info.txt +++ b/src/utils/info.txt @@ -2,6 +2,39 @@ define UTIL_FUNCTIONS load_on always + +charset.cpp +cpuid.cpp +exceptn.cpp +mlock.cpp +parsing.cpp +time.cpp +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 + +exceptn.h +mem_ops.h +types.h +ui.h +version.h + + linux,tru64 -> rt diff --git a/src/utils/simd_32/info.txt b/src/utils/simd_32/info.txt index 883096a5d..08cbdfa52 100644 --- a/src/utils/simd_32/info.txt +++ b/src/utils/simd_32/info.txt @@ -1,3 +1,10 @@ define SIMD_32 load_on always + + +simd_32.h +simd_sse.h +simd_scalar.h +simd_altivec.h + diff --git a/src/utils/simd_32/simd_32.h b/src/utils/simd_32/simd_32.h index 324db1a7d..38ea078d0 100644 --- a/src/utils/simd_32/simd_32.h +++ b/src/utils/simd_32/simd_32.h @@ -12,17 +12,17 @@ #if defined(BOTAN_TARGET_CPU_HAS_SSE2) - #include + #include namespace Botan { typedef SIMD_SSE2 SIMD_32; } #elif defined(BOTAN_TARGET_CPU_HAS_ALTIVEC) - #include + #include namespace Botan { typedef SIMD_Altivec SIMD_32; } #else - #include + #include namespace Botan { typedef SIMD_Scalar SIMD_32; } #endif diff --git a/src/utils/simd_32/simd_altivec.h b/src/utils/simd_32/simd_altivec.h index e1704e76c..9cc5c1068 100644 --- a/src/utils/simd_32/simd_altivec.h +++ b/src/utils/simd_32/simd_altivec.h @@ -8,6 +8,8 @@ #ifndef BOTAN_SIMD_ALTIVEC_H__ #define BOTAN_SIMD_ALTIVEC_H__ +#if defined(BOTAN_TARGET_CPU_HAS_ALTIVEC) + #include #include @@ -207,3 +209,5 @@ class SIMD_Altivec } #endif + +#endif diff --git a/src/utils/simd_32/simd_sse.h b/src/utils/simd_32/simd_sse.h index 9f03b3733..31bbce2c7 100644 --- a/src/utils/simd_32/simd_sse.h +++ b/src/utils/simd_32/simd_sse.h @@ -8,8 +8,9 @@ #ifndef BOTAN_SIMD_SSE_H__ #define BOTAN_SIMD_SSE_H__ -#include +#if defined(BOTAN_TARGET_CPU_HAS_SSE2) +#include #include namespace Botan { @@ -159,3 +160,5 @@ class SIMD_SSE2 } #endif + +#endif -- cgit v1.2.3