From 5d48c1406a956496fd4a020263ee59fbe7fad90a Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Thu, 21 Sep 2017 15:04:25 -0400 Subject: Header file cleanups Some help from include-what-you-use --- src/lib/asn1/asn1_obj.cpp | 2 -- src/lib/asn1/asn1_str.cpp | 1 - src/lib/asn1/ber_dec.h | 2 +- src/lib/asn1/der_enc.cpp | 1 - src/lib/base/scan_name.h | 3 +-- src/lib/base/secmem.h | 3 ++- src/lib/block/aes/aes.cpp | 1 - src/lib/block/lion/lion.cpp | 1 - src/lib/block/misty1/misty1.cpp | 1 - src/lib/entropy/proc_walk/proc_walk.cpp | 1 - src/lib/filters/codec_filt/hex_filt.cpp | 1 - src/lib/filters/pipe.cpp | 1 - src/lib/filters/pipe.h | 3 ++- src/lib/filters/pipe_rw.cpp | 1 + src/lib/hash/keccak/keccak.cpp | 1 - src/lib/hash/sha3/sha3.cpp | 1 - src/lib/hash/shake/shake.cpp | 1 - src/lib/hash/skein/skein_512.cpp | 1 - src/lib/hash/tiger/tiger.cpp | 1 - src/lib/kdf/hkdf/hkdf.h | 1 - src/lib/kdf/kdf.cpp | 6 +----- src/lib/kdf/prf_tls/prf_tls.cpp | 1 - src/lib/kdf/sp800_108/sp800_108.cpp | 1 - src/lib/kdf/sp800_56a/sp800_56a.cpp | 1 - src/lib/kdf/sp800_56c/sp800_56c.cpp | 2 -- src/lib/mac/gmac/gmac.h | 8 ++------ src/lib/math/bigint/big_rand.cpp | 2 +- src/lib/math/bigint/bigint.cpp | 2 -- src/lib/math/bigint/bigint.h | 4 +++- src/lib/math/ec_gfp/curve_gfp.cpp | 1 + src/lib/math/ec_gfp/curve_gfp.h | 2 +- src/lib/math/ec_gfp/point_gfp.cpp | 3 +-- src/lib/math/numbertheory/dsa_gen.cpp | 3 +-- src/lib/math/numbertheory/make_prm.cpp | 2 +- src/lib/math/numbertheory/numthry.cpp | 1 + src/lib/math/numbertheory/numthry.h | 3 ++- src/lib/misc/srp6/srp6.cpp | 2 ++ src/lib/misc/srp6/srp6.h | 4 ++-- src/lib/misc/tss/tss.cpp | 2 ++ src/lib/misc/tss/tss.h | 4 ++-- src/lib/modes/aead/aead.cpp | 1 + src/lib/modes/aead/ccm/ccm.cpp | 2 +- src/lib/modes/aead/ccm/ccm.h | 2 -- src/lib/modes/aead/eax/eax.cpp | 1 - src/lib/modes/aead/siv/siv.cpp | 1 - src/lib/modes/cfb/cfb.cpp | 1 - src/lib/modes/cipher_mode.cpp | 5 +---- src/lib/modes/xts/xts.cpp | 1 - src/lib/passhash/bcrypt/bcrypt.cpp | 3 ++- src/lib/passhash/bcrypt/bcrypt.h | 4 +++- src/lib/passhash/passhash9/passhash9.cpp | 1 + src/lib/passhash/passhash9/passhash9.h | 4 +++- src/lib/pbkdf/pbkdf2/pbkdf2.cpp | 1 - src/lib/pbkdf/pbkdf2/pbkdf2.h | 1 - src/lib/pk_pad/eme.cpp | 1 + src/lib/pk_pad/eme.h | 3 ++- src/lib/pk_pad/eme_oaep/oaep.cpp | 2 ++ src/lib/pk_pad/eme_pkcs1/eme_pkcs.cpp | 2 ++ src/lib/pk_pad/emsa.cpp | 1 + src/lib/pk_pad/emsa.h | 3 ++- src/lib/pk_pad/emsa1/emsa1.cpp | 1 + src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp | 1 + src/lib/pk_pad/emsa_pssr/pssr.cpp | 2 ++ src/lib/pk_pad/emsa_raw/emsa_raw.cpp | 1 + src/lib/pk_pad/emsa_x931/emsa_x931.cpp | 1 + src/lib/pk_pad/iso9796/iso9796.cpp | 4 +++- src/lib/pk_pad/mgf1/mgf1.cpp | 2 +- src/lib/pk_pad/mgf1/mgf1.h | 4 +++- src/lib/prov/pkcs11/p11_ecdh.cpp | 1 - src/lib/prov/pkcs11/p11_mechanism.cpp | 1 + src/lib/pubkey/ecdh/ecdh.cpp | 1 + src/lib/pubkey/ecies/ecies.cpp | 1 + src/lib/pubkey/pk_algs.cpp | 1 + src/lib/tls/tls_policy.cpp | 1 + src/lib/tls/tls_policy.h | 1 + src/lib/tls/tls_record.h | 1 + src/lib/tls/tls_seq_numbers.h | 1 + src/lib/utils/cpuid/cpuid.cpp | 1 + src/lib/utils/exceptn.h | 1 - src/lib/utils/http_util/http_util.h | 1 + src/lib/utils/types.h | 10 +++++----- src/lib/x509/name_constraint.cpp | 1 + src/lib/x509/ocsp.cpp | 1 + src/lib/x509/x509_ext.h | 1 + src/lib/x509/x509cert.cpp | 3 --- src/tests/test_bigint.cpp | 1 + src/tests/test_otp.cpp | 1 + src/tests/test_x509_path.cpp | 1 + src/tests/tests.cpp | 1 + 89 files changed, 87 insertions(+), 83 deletions(-) (limited to 'src') diff --git a/src/lib/asn1/asn1_obj.cpp b/src/lib/asn1/asn1_obj.cpp index 4ccb11c3f..2dc73738c 100644 --- a/src/lib/asn1/asn1_obj.cpp +++ b/src/lib/asn1/asn1_obj.cpp @@ -7,9 +7,7 @@ #include #include -#include #include -#include #include namespace Botan { diff --git a/src/lib/asn1/asn1_str.cpp b/src/lib/asn1/asn1_str.cpp index 81012f284..526e10158 100644 --- a/src/lib/asn1/asn1_str.cpp +++ b/src/lib/asn1/asn1_str.cpp @@ -9,7 +9,6 @@ #include #include #include -#include namespace Botan { diff --git a/src/lib/asn1/ber_dec.h b/src/lib/asn1/ber_dec.h index e725ef583..75616ed16 100644 --- a/src/lib/asn1/ber_dec.h +++ b/src/lib/asn1/ber_dec.h @@ -8,7 +8,7 @@ #ifndef BOTAN_BER_DECODER_H_ #define BOTAN_BER_DECODER_H_ -#include +#include #include namespace Botan { diff --git a/src/lib/asn1/der_enc.cpp b/src/lib/asn1/der_enc.cpp index 31955e915..141391a1d 100644 --- a/src/lib/asn1/der_enc.cpp +++ b/src/lib/asn1/der_enc.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/src/lib/base/scan_name.h b/src/lib/base/scan_name.h index 38f432f3a..9bc5afde8 100644 --- a/src/lib/base/scan_name.h +++ b/src/lib/base/scan_name.h @@ -8,10 +8,9 @@ #ifndef BOTAN_SCAN_NAME_H_ #define BOTAN_SCAN_NAME_H_ -#include +#include #include #include -#include namespace Botan { diff --git a/src/lib/base/secmem.h b/src/lib/base/secmem.h index cdcbb3236..5b77ed925 100644 --- a/src/lib/base/secmem.h +++ b/src/lib/base/secmem.h @@ -8,7 +8,8 @@ #ifndef BOTAN_SECURE_MEMORY_BUFFERS_H_ #define BOTAN_SECURE_MEMORY_BUFFERS_H_ -#include +#include // IWYU pragma: export +#include // IWYU pragma: export #include #include #include diff --git a/src/lib/block/aes/aes.cpp b/src/lib/block/aes/aes.cpp index 0878d84ae..b4be14d3d 100644 --- a/src/lib/block/aes/aes.cpp +++ b/src/lib/block/aes/aes.cpp @@ -10,7 +10,6 @@ #include #include #include -#include /* * This implementation is based on table lookups which are known to be diff --git a/src/lib/block/lion/lion.cpp b/src/lib/block/lion/lion.cpp index 4df22dd0b..7959de585 100644 --- a/src/lib/block/lion/lion.cpp +++ b/src/lib/block/lion/lion.cpp @@ -6,7 +6,6 @@ */ #include -#include namespace Botan { diff --git a/src/lib/block/misty1/misty1.cpp b/src/lib/block/misty1/misty1.cpp index 9afed9168..3e2677fce 100644 --- a/src/lib/block/misty1/misty1.cpp +++ b/src/lib/block/misty1/misty1.cpp @@ -7,7 +7,6 @@ #include #include -#include namespace Botan { diff --git a/src/lib/entropy/proc_walk/proc_walk.cpp b/src/lib/entropy/proc_walk/proc_walk.cpp index 5132ac951..1fb040b1b 100644 --- a/src/lib/entropy/proc_walk/proc_walk.cpp +++ b/src/lib/entropy/proc_walk/proc_walk.cpp @@ -8,7 +8,6 @@ */ #include -#include #include #ifndef _POSIX_C_SOURCE diff --git a/src/lib/filters/codec_filt/hex_filt.cpp b/src/lib/filters/codec_filt/hex_filt.cpp index 31e6b3824..ffaa7d567 100644 --- a/src/lib/filters/codec_filt/hex_filt.cpp +++ b/src/lib/filters/codec_filt/hex_filt.cpp @@ -7,7 +7,6 @@ #include #include -#include #include #include #include diff --git a/src/lib/filters/pipe.cpp b/src/lib/filters/pipe.cpp index 9af5a2158..3c901d0b7 100644 --- a/src/lib/filters/pipe.cpp +++ b/src/lib/filters/pipe.cpp @@ -8,7 +8,6 @@ #include #include #include -#include namespace Botan { diff --git a/src/lib/filters/pipe.h b/src/lib/filters/pipe.h index 677bd460b..24b536bf7 100644 --- a/src/lib/filters/pipe.h +++ b/src/lib/filters/pipe.h @@ -10,13 +10,14 @@ #define BOTAN_PIPE_H_ #include -#include #include #include #include namespace Botan { +class Filter; + /** * This class represents pipe objects. * A set of filters can be placed into a pipe, and information flows diff --git a/src/lib/filters/pipe_rw.cpp b/src/lib/filters/pipe_rw.cpp index dacc91008..fa24198ab 100644 --- a/src/lib/filters/pipe_rw.cpp +++ b/src/lib/filters/pipe_rw.cpp @@ -7,6 +7,7 @@ */ #include +#include #include namespace Botan { diff --git a/src/lib/hash/keccak/keccak.cpp b/src/lib/hash/keccak/keccak.cpp index f51b53e06..94e3f70ba 100644 --- a/src/lib/hash/keccak/keccak.cpp +++ b/src/lib/hash/keccak/keccak.cpp @@ -7,7 +7,6 @@ #include #include -#include #include namespace Botan { diff --git a/src/lib/hash/sha3/sha3.cpp b/src/lib/hash/sha3/sha3.cpp index a31b3bd14..e829c3f70 100644 --- a/src/lib/hash/sha3/sha3.cpp +++ b/src/lib/hash/sha3/sha3.cpp @@ -6,7 +6,6 @@ */ #include -#include #include namespace Botan { diff --git a/src/lib/hash/shake/shake.cpp b/src/lib/hash/shake/shake.cpp index 329aec080..ab7c9debe 100644 --- a/src/lib/hash/shake/shake.cpp +++ b/src/lib/hash/shake/shake.cpp @@ -7,7 +7,6 @@ #include #include -#include #include namespace Botan { diff --git a/src/lib/hash/skein/skein_512.cpp b/src/lib/hash/skein/skein_512.cpp index eaa3090a4..1df3da62d 100644 --- a/src/lib/hash/skein/skein_512.cpp +++ b/src/lib/hash/skein/skein_512.cpp @@ -6,7 +6,6 @@ */ #include -#include #include #include diff --git a/src/lib/hash/tiger/tiger.cpp b/src/lib/hash/tiger/tiger.cpp index 0851742c0..13ae4a792 100644 --- a/src/lib/hash/tiger/tiger.cpp +++ b/src/lib/hash/tiger/tiger.cpp @@ -7,7 +7,6 @@ #include #include -#include namespace Botan { diff --git a/src/lib/kdf/hkdf/hkdf.h b/src/lib/kdf/hkdf/hkdf.h index 1d8d3c159..e63973497 100644 --- a/src/lib/kdf/hkdf/hkdf.h +++ b/src/lib/kdf/hkdf/hkdf.h @@ -10,7 +10,6 @@ #define BOTAN_HKDF_H_ #include -#include #include namespace Botan { diff --git a/src/lib/kdf/kdf.cpp b/src/lib/kdf/kdf.cpp index 4b55b6962..f3d962c14 100644 --- a/src/lib/kdf/kdf.cpp +++ b/src/lib/kdf/kdf.cpp @@ -26,11 +26,7 @@ #include #endif -#if defined(BOTAN_HAS_TLS_V10_PRF) -#include -#endif - -#if defined(BOTAN_HAS_TLS_V12_PRF) +#if defined(BOTAN_HAS_TLS_V10_PRF) || defined(BOTAN_HAS_TLS_V12_PRF) #include #endif diff --git a/src/lib/kdf/prf_tls/prf_tls.cpp b/src/lib/kdf/prf_tls/prf_tls.cpp index ead41f505..69383e98e 100644 --- a/src/lib/kdf/prf_tls/prf_tls.cpp +++ b/src/lib/kdf/prf_tls/prf_tls.cpp @@ -6,7 +6,6 @@ */ #include -#include namespace Botan { diff --git a/src/lib/kdf/sp800_108/sp800_108.cpp b/src/lib/kdf/sp800_108/sp800_108.cpp index 8b1af2ea7..0f9eed1f2 100644 --- a/src/lib/kdf/sp800_108/sp800_108.cpp +++ b/src/lib/kdf/sp800_108/sp800_108.cpp @@ -6,7 +6,6 @@ */ #include -#include #include diff --git a/src/lib/kdf/sp800_56a/sp800_56a.cpp b/src/lib/kdf/sp800_56a/sp800_56a.cpp index 8698e5bee..8e9bcf856 100644 --- a/src/lib/kdf/sp800_56a/sp800_56a.cpp +++ b/src/lib/kdf/sp800_56a/sp800_56a.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include diff --git a/src/lib/kdf/sp800_56c/sp800_56c.cpp b/src/lib/kdf/sp800_56c/sp800_56c.cpp index 30a49e8ee..544a650ea 100644 --- a/src/lib/kdf/sp800_56c/sp800_56c.cpp +++ b/src/lib/kdf/sp800_56c/sp800_56c.cpp @@ -5,9 +5,7 @@ * Botan is released under the Simplified BSD License (see license.txt) */ -#include #include -#include namespace Botan { diff --git a/src/lib/mac/gmac/gmac.h b/src/lib/mac/gmac/gmac.h index 64550d2b1..ed586b4ea 100644 --- a/src/lib/mac/gmac/gmac.h +++ b/src/lib/mac/gmac/gmac.h @@ -8,19 +8,15 @@ #ifndef BOTAN_GMAC_H_ #define BOTAN_GMAC_H_ -#include #include -#include -#include +#include namespace Botan { /** * GMAC */ -class BOTAN_PUBLIC_API(2,0) GMAC : public MessageAuthenticationCode, - public GHASH - +class BOTAN_PUBLIC_API(2,0) GMAC : public MessageAuthenticationCode, public GHASH { public: void clear() override; diff --git a/src/lib/math/bigint/big_rand.cpp b/src/lib/math/bigint/big_rand.cpp index 506e9776a..1b715d1b4 100644 --- a/src/lib/math/bigint/big_rand.cpp +++ b/src/lib/math/bigint/big_rand.cpp @@ -6,7 +6,7 @@ */ #include -#include +#include #include namespace Botan { diff --git a/src/lib/math/bigint/bigint.cpp b/src/lib/math/bigint/bigint.cpp index a91a685e0..5bf91df23 100644 --- a/src/lib/math/bigint/bigint.cpp +++ b/src/lib/math/bigint/bigint.cpp @@ -7,8 +7,6 @@ #include #include -#include -#include #include #include diff --git a/src/lib/math/bigint/bigint.h b/src/lib/math/bigint/bigint.h index 683a1f596..0b116f3cc 100644 --- a/src/lib/math/bigint/bigint.h +++ b/src/lib/math/bigint/bigint.h @@ -9,14 +9,16 @@ #ifndef BOTAN_BIGINT_H_ #define BOTAN_BIGINT_H_ -#include #include #include +#include #include #include namespace Botan { +class RandomNumberGenerator; + /** * Arbitrary precision integer */ diff --git a/src/lib/math/ec_gfp/curve_gfp.cpp b/src/lib/math/ec_gfp/curve_gfp.cpp index 96593e601..efeb5210f 100644 --- a/src/lib/math/ec_gfp/curve_gfp.cpp +++ b/src/lib/math/ec_gfp/curve_gfp.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/src/lib/math/ec_gfp/curve_gfp.h b/src/lib/math/ec_gfp/curve_gfp.h index 330d0ba0d..805359ba9 100644 --- a/src/lib/math/ec_gfp/curve_gfp.h +++ b/src/lib/math/ec_gfp/curve_gfp.h @@ -10,7 +10,7 @@ #ifndef BOTAN_GFP_CURVE_H_ #define BOTAN_GFP_CURVE_H_ -#include +#include #include namespace Botan { diff --git a/src/lib/math/ec_gfp/point_gfp.cpp b/src/lib/math/ec_gfp/point_gfp.cpp index 5283b7352..c549823aa 100644 --- a/src/lib/math/ec_gfp/point_gfp.cpp +++ b/src/lib/math/ec_gfp/point_gfp.cpp @@ -9,8 +9,7 @@ #include #include -#include -#include +#include namespace Botan { diff --git a/src/lib/math/numbertheory/dsa_gen.cpp b/src/lib/math/numbertheory/dsa_gen.cpp index e8d620f4c..e345910ca 100644 --- a/src/lib/math/numbertheory/dsa_gen.cpp +++ b/src/lib/math/numbertheory/dsa_gen.cpp @@ -7,8 +7,7 @@ #include #include -#include -#include +#include namespace Botan { diff --git a/src/lib/math/numbertheory/make_prm.cpp b/src/lib/math/numbertheory/make_prm.cpp index 9443bb9a1..f06f1978e 100644 --- a/src/lib/math/numbertheory/make_prm.cpp +++ b/src/lib/math/numbertheory/make_prm.cpp @@ -6,7 +6,7 @@ */ #include -#include +#include #include namespace Botan { diff --git a/src/lib/math/numbertheory/numthry.cpp b/src/lib/math/numbertheory/numthry.cpp index 27fb73d08..961f50043 100644 --- a/src/lib/math/numbertheory/numthry.cpp +++ b/src/lib/math/numbertheory/numthry.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/src/lib/math/numbertheory/numthry.h b/src/lib/math/numbertheory/numthry.h index 91dcda68d..286304f7e 100644 --- a/src/lib/math/numbertheory/numthry.h +++ b/src/lib/math/numbertheory/numthry.h @@ -10,10 +10,11 @@ #include #include -#include namespace Botan { +class RandomNumberGenerator; + /** * Fused multiply-add * @param a an integer diff --git a/src/lib/misc/srp6/srp6.cpp b/src/lib/misc/srp6/srp6.cpp index 12107715f..44e137237 100644 --- a/src/lib/misc/srp6/srp6.cpp +++ b/src/lib/misc/srp6/srp6.cpp @@ -6,6 +6,8 @@ */ #include +#include +#include #include #include diff --git a/src/lib/misc/srp6/srp6.h b/src/lib/misc/srp6/srp6.h index a35098839..464b67252 100644 --- a/src/lib/misc/srp6/srp6.h +++ b/src/lib/misc/srp6/srp6.h @@ -9,13 +9,13 @@ #define BOTAN_RFC5054_SRP6_H_ #include -#include -#include #include #include namespace Botan { +class RandomNumberGenerator; + /** * SRP6a Client side * @param username the username we are attempting login for diff --git a/src/lib/misc/tss/tss.cpp b/src/lib/misc/tss/tss.cpp index 2039e5fea..33a21314e 100644 --- a/src/lib/misc/tss/tss.cpp +++ b/src/lib/misc/tss/tss.cpp @@ -6,6 +6,8 @@ */ #include +#include +#include #include #include #include diff --git a/src/lib/misc/tss/tss.h b/src/lib/misc/tss/tss.h index f1f503201..d1fd15f24 100644 --- a/src/lib/misc/tss/tss.h +++ b/src/lib/misc/tss/tss.h @@ -9,12 +9,12 @@ #define BOTAN_RTSS_H_ #include -#include -#include #include namespace Botan { +class RandomNumberGenerator; + /** * A split secret, using the format from draft-mcgrew-tss-03 */ diff --git a/src/lib/modes/aead/aead.cpp b/src/lib/modes/aead/aead.cpp index 1b7b78be7..e8885dc0e 100644 --- a/src/lib/modes/aead/aead.cpp +++ b/src/lib/modes/aead/aead.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #if defined(BOTAN_HAS_BLOCK_CIPHER) diff --git a/src/lib/modes/aead/ccm/ccm.cpp b/src/lib/modes/aead/ccm/ccm.cpp index 5a1de4908..6149718f0 100644 --- a/src/lib/modes/aead/ccm/ccm.cpp +++ b/src/lib/modes/aead/ccm/ccm.cpp @@ -7,7 +7,7 @@ */ #include -#include +#include namespace Botan { diff --git a/src/lib/modes/aead/ccm/ccm.h b/src/lib/modes/aead/ccm/ccm.h index 38c0affe7..4d4fe73e2 100644 --- a/src/lib/modes/aead/ccm/ccm.h +++ b/src/lib/modes/aead/ccm/ccm.h @@ -11,8 +11,6 @@ #include #include -#include -#include namespace Botan { diff --git a/src/lib/modes/aead/eax/eax.cpp b/src/lib/modes/aead/eax/eax.cpp index 66cd90151..dd0e458e7 100644 --- a/src/lib/modes/aead/eax/eax.cpp +++ b/src/lib/modes/aead/eax/eax.cpp @@ -9,7 +9,6 @@ #include #include #include -#include namespace Botan { diff --git a/src/lib/modes/aead/siv/siv.cpp b/src/lib/modes/aead/siv/siv.cpp index 70545243b..8e3d07059 100644 --- a/src/lib/modes/aead/siv/siv.cpp +++ b/src/lib/modes/aead/siv/siv.cpp @@ -10,7 +10,6 @@ #include #include #include -#include namespace Botan { diff --git a/src/lib/modes/cfb/cfb.cpp b/src/lib/modes/cfb/cfb.cpp index d22f1a35b..63904ed27 100644 --- a/src/lib/modes/cfb/cfb.cpp +++ b/src/lib/modes/cfb/cfb.cpp @@ -7,7 +7,6 @@ */ #include -#include namespace Botan { diff --git a/src/lib/modes/cipher_mode.cpp b/src/lib/modes/cipher_mode.cpp index 74d565f33..6023102da 100644 --- a/src/lib/modes/cipher_mode.cpp +++ b/src/lib/modes/cipher_mode.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #if defined(BOTAN_HAS_BLOCK_CIPHER) @@ -30,10 +31,6 @@ #include #endif -#if defined(BOTAN_HAS_MODE_XTS) - #include -#endif - #if defined(BOTAN_HAS_OPENSSL) #include #endif diff --git a/src/lib/modes/xts/xts.cpp b/src/lib/modes/xts/xts.cpp index 4a4250f84..53e959258 100644 --- a/src/lib/modes/xts/xts.cpp +++ b/src/lib/modes/xts/xts.cpp @@ -7,7 +7,6 @@ */ #include -#include #include namespace Botan { diff --git a/src/lib/passhash/bcrypt/bcrypt.cpp b/src/lib/passhash/bcrypt/bcrypt.cpp index 73456dead..8424de7e2 100644 --- a/src/lib/passhash/bcrypt/bcrypt.cpp +++ b/src/lib/passhash/bcrypt/bcrypt.cpp @@ -6,9 +6,10 @@ */ #include -#include +#include #include #include +#include namespace Botan { diff --git a/src/lib/passhash/bcrypt/bcrypt.h b/src/lib/passhash/bcrypt/bcrypt.h index c88df2745..51db8062d 100644 --- a/src/lib/passhash/bcrypt/bcrypt.h +++ b/src/lib/passhash/bcrypt/bcrypt.h @@ -8,10 +8,12 @@ #ifndef BOTAN_BCRYPT_H_ #define BOTAN_BCRYPT_H_ -#include +#include namespace Botan { +class RandomNumberGenerator; + /** * Create a password hash using Bcrypt * @param password the password diff --git a/src/lib/passhash/passhash9/passhash9.cpp b/src/lib/passhash/passhash9/passhash9.cpp index 1fa88c8c4..47c7d0342 100644 --- a/src/lib/passhash/passhash9/passhash9.cpp +++ b/src/lib/passhash/passhash9/passhash9.cpp @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/src/lib/passhash/passhash9/passhash9.h b/src/lib/passhash/passhash9/passhash9.h index 75847bfa5..825c63da6 100644 --- a/src/lib/passhash/passhash9/passhash9.h +++ b/src/lib/passhash/passhash9/passhash9.h @@ -8,10 +8,12 @@ #ifndef BOTAN_PASSHASH9_H_ #define BOTAN_PASSHASH9_H_ -#include +#include namespace Botan { +class RandomNumberGenerator; + /** * Create a password hash using PBKDF2 * @param password the password diff --git a/src/lib/pbkdf/pbkdf2/pbkdf2.cpp b/src/lib/pbkdf/pbkdf2/pbkdf2.cpp index 03e746717..4e1a73331 100644 --- a/src/lib/pbkdf/pbkdf2/pbkdf2.cpp +++ b/src/lib/pbkdf/pbkdf2/pbkdf2.cpp @@ -6,7 +6,6 @@ */ #include -#include #include namespace Botan { diff --git a/src/lib/pbkdf/pbkdf2/pbkdf2.h b/src/lib/pbkdf/pbkdf2/pbkdf2.h index 6d1ddc94b..ea357cac0 100644 --- a/src/lib/pbkdf/pbkdf2/pbkdf2.h +++ b/src/lib/pbkdf/pbkdf2/pbkdf2.h @@ -10,7 +10,6 @@ #include #include -#include namespace Botan { diff --git a/src/lib/pk_pad/eme.cpp b/src/lib/pk_pad/eme.cpp index 85efe1615..aa62f4196 100644 --- a/src/lib/pk_pad/eme.cpp +++ b/src/lib/pk_pad/eme.cpp @@ -7,6 +7,7 @@ #include #include +#include #if defined(BOTAN_HAS_EME_OAEP) #include diff --git a/src/lib/pk_pad/eme.h b/src/lib/pk_pad/eme.h index 8842358fe..26523bc88 100644 --- a/src/lib/pk_pad/eme.h +++ b/src/lib/pk_pad/eme.h @@ -9,10 +9,11 @@ #define BOTAN_PUBKEY_EME_ENCRYPTION_PAD_H_ #include -#include namespace Botan { +class RandomNumberGenerator; + /** * Encoding Method for Encryption */ diff --git a/src/lib/pk_pad/eme_oaep/oaep.cpp b/src/lib/pk_pad/eme_oaep/oaep.cpp index 71f5c14e0..5e567d0c2 100644 --- a/src/lib/pk_pad/eme_oaep/oaep.cpp +++ b/src/lib/pk_pad/eme_oaep/oaep.cpp @@ -7,6 +7,8 @@ #include #include +#include +#include #include namespace Botan { diff --git a/src/lib/pk_pad/eme_pkcs1/eme_pkcs.cpp b/src/lib/pk_pad/eme_pkcs1/eme_pkcs.cpp index 5d4f950f5..58aadbc38 100644 --- a/src/lib/pk_pad/eme_pkcs1/eme_pkcs.cpp +++ b/src/lib/pk_pad/eme_pkcs1/eme_pkcs.cpp @@ -6,6 +6,8 @@ */ #include +#include +#include #include namespace Botan { diff --git a/src/lib/pk_pad/emsa.cpp b/src/lib/pk_pad/emsa.cpp index d78c562c9..2c3370f4d 100644 --- a/src/lib/pk_pad/emsa.cpp +++ b/src/lib/pk_pad/emsa.cpp @@ -6,6 +6,7 @@ #include #include +#include #if defined(BOTAN_HAS_EMSA1) #include diff --git a/src/lib/pk_pad/emsa.h b/src/lib/pk_pad/emsa.h index 270aa9298..d45185f30 100644 --- a/src/lib/pk_pad/emsa.h +++ b/src/lib/pk_pad/emsa.h @@ -9,10 +9,11 @@ #define BOTAN_PUBKEY_EMSA_H_ #include -#include namespace Botan { +class RandomNumberGenerator; + /** * EMSA, from IEEE 1363s Encoding Method for Signatures, Appendix * diff --git a/src/lib/pk_pad/emsa1/emsa1.cpp b/src/lib/pk_pad/emsa1/emsa1.cpp index e3580ff93..db9f2432f 100644 --- a/src/lib/pk_pad/emsa1/emsa1.cpp +++ b/src/lib/pk_pad/emsa1/emsa1.cpp @@ -6,6 +6,7 @@ */ #include +#include namespace Botan { diff --git a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp index d5a6aa8fb..4175fe4b3 100644 --- a/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp +++ b/src/lib/pk_pad/emsa_pkcs1/emsa_pkcs1.cpp @@ -7,6 +7,7 @@ #include #include +#include namespace Botan { diff --git a/src/lib/pk_pad/emsa_pssr/pssr.cpp b/src/lib/pk_pad/emsa_pssr/pssr.cpp index f0fd69a78..941da7d99 100644 --- a/src/lib/pk_pad/emsa_pssr/pssr.cpp +++ b/src/lib/pk_pad/emsa_pssr/pssr.cpp @@ -6,6 +6,8 @@ */ #include +#include +#include #include #include diff --git a/src/lib/pk_pad/emsa_raw/emsa_raw.cpp b/src/lib/pk_pad/emsa_raw/emsa_raw.cpp index cf2426298..0302033f0 100644 --- a/src/lib/pk_pad/emsa_raw/emsa_raw.cpp +++ b/src/lib/pk_pad/emsa_raw/emsa_raw.cpp @@ -6,6 +6,7 @@ */ #include +#include namespace Botan { diff --git a/src/lib/pk_pad/emsa_x931/emsa_x931.cpp b/src/lib/pk_pad/emsa_x931/emsa_x931.cpp index 8d90bd245..91227328e 100644 --- a/src/lib/pk_pad/emsa_x931/emsa_x931.cpp +++ b/src/lib/pk_pad/emsa_x931/emsa_x931.cpp @@ -6,6 +6,7 @@ */ #include +#include #include namespace Botan { diff --git a/src/lib/pk_pad/iso9796/iso9796.cpp b/src/lib/pk_pad/iso9796/iso9796.cpp index 8608e7239..b8375af68 100644 --- a/src/lib/pk_pad/iso9796/iso9796.cpp +++ b/src/lib/pk_pad/iso9796/iso9796.cpp @@ -6,9 +6,11 @@ */ #include +#include +#include #include -#include #include +#include #include namespace Botan { diff --git a/src/lib/pk_pad/mgf1/mgf1.cpp b/src/lib/pk_pad/mgf1/mgf1.cpp index 8903ac6f0..dbfac5110 100644 --- a/src/lib/pk_pad/mgf1/mgf1.cpp +++ b/src/lib/pk_pad/mgf1/mgf1.cpp @@ -6,7 +6,7 @@ */ #include -#include +#include #include namespace Botan { diff --git a/src/lib/pk_pad/mgf1/mgf1.h b/src/lib/pk_pad/mgf1/mgf1.h index 65227afef..9eb652a82 100644 --- a/src/lib/pk_pad/mgf1/mgf1.h +++ b/src/lib/pk_pad/mgf1/mgf1.h @@ -8,10 +8,12 @@ #ifndef BOTAN_MGF1_H_ #define BOTAN_MGF1_H_ -#include +#include namespace Botan { +class HashFunction; + /** * MGF1 from PKCS #1 v2.0 * @param hash hash function to use diff --git a/src/lib/prov/pkcs11/p11_ecdh.cpp b/src/lib/prov/pkcs11/p11_ecdh.cpp index 088b93894..5ec5c063d 100644 --- a/src/lib/prov/pkcs11/p11_ecdh.cpp +++ b/src/lib/prov/pkcs11/p11_ecdh.cpp @@ -11,7 +11,6 @@ #if defined(BOTAN_HAS_ECDH) #include -#include #include #include #include diff --git a/src/lib/prov/pkcs11/p11_mechanism.cpp b/src/lib/prov/pkcs11/p11_mechanism.cpp index 290465dac..1621317cc 100644 --- a/src/lib/prov/pkcs11/p11_mechanism.cpp +++ b/src/lib/prov/pkcs11/p11_mechanism.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/src/lib/pubkey/ecdh/ecdh.cpp b/src/lib/pubkey/ecdh/ecdh.cpp index f6d2bb251..799e8aac9 100644 --- a/src/lib/pubkey/ecdh/ecdh.cpp +++ b/src/lib/pubkey/ecdh/ecdh.cpp @@ -8,6 +8,7 @@ */ #include +#include #include #if defined(BOTAN_HAS_OPENSSL) diff --git a/src/lib/pubkey/ecies/ecies.cpp b/src/lib/pubkey/ecies/ecies.cpp index b8fcea64b..d1edf058c 100644 --- a/src/lib/pubkey/ecies/ecies.cpp +++ b/src/lib/pubkey/ecies/ecies.cpp @@ -7,6 +7,7 @@ */ #include +#include #include #include diff --git a/src/lib/pubkey/pk_algs.cpp b/src/lib/pubkey/pk_algs.cpp index 743918923..8a39a5ade 100644 --- a/src/lib/pubkey/pk_algs.cpp +++ b/src/lib/pubkey/pk_algs.cpp @@ -7,6 +7,7 @@ #include #include +#include #if defined(BOTAN_HAS_RSA) #include diff --git a/src/lib/tls/tls_policy.cpp b/src/lib/tls/tls_policy.cpp index 863958eaa..822b41e5e 100644 --- a/src/lib/tls/tls_policy.cpp +++ b/src/lib/tls/tls_policy.cpp @@ -11,6 +11,7 @@ #include #include #include +#include namespace Botan { diff --git a/src/lib/tls/tls_policy.h b/src/lib/tls/tls_policy.h index 84e65609d..1ac3e40f2 100644 --- a/src/lib/tls/tls_policy.h +++ b/src/lib/tls/tls_policy.h @@ -12,6 +12,7 @@ #include #include #include +#include #include #include diff --git a/src/lib/tls/tls_record.h b/src/lib/tls/tls_record.h index b2078c651..42939b7fd 100644 --- a/src/lib/tls/tls_record.h +++ b/src/lib/tls/tls_record.h @@ -16,6 +16,7 @@ #include #include #include +#include namespace Botan { diff --git a/src/lib/tls/tls_seq_numbers.h b/src/lib/tls/tls_seq_numbers.h index dfebeae91..3f08f27cb 100644 --- a/src/lib/tls/tls_seq_numbers.h +++ b/src/lib/tls/tls_seq_numbers.h @@ -9,6 +9,7 @@ #define BOTAN_TLS_SEQ_NUMBERS_H_ #include +#include namespace Botan { diff --git a/src/lib/utils/cpuid/cpuid.cpp b/src/lib/utils/cpuid/cpuid.cpp index 3948853ac..d4e15c16b 100644 --- a/src/lib/utils/cpuid/cpuid.cpp +++ b/src/lib/utils/cpuid/cpuid.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include namespace Botan { diff --git a/src/lib/utils/exceptn.h b/src/lib/utils/exceptn.h index e5f2e51f7..bb8c245f6 100644 --- a/src/lib/utils/exceptn.h +++ b/src/lib/utils/exceptn.h @@ -9,7 +9,6 @@ #define BOTAN_EXCEPTION_H_ #include -#include #include #include diff --git a/src/lib/utils/http_util/http_util.h b/src/lib/utils/http_util/http_util.h index a81dd85df..9e4d215ef 100644 --- a/src/lib/utils/http_util/http_util.h +++ b/src/lib/utils/http_util/http_util.h @@ -14,6 +14,7 @@ #include #include #include +#include namespace Botan { diff --git a/src/lib/utils/types.h b/src/lib/utils/types.h index deccc2b93..98671bfa8 100644 --- a/src/lib/utils/types.h +++ b/src/lib/utils/types.h @@ -9,11 +9,11 @@ #ifndef BOTAN_TYPES_H_ #define BOTAN_TYPES_H_ -#include -#include -#include -#include -#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export /** * The primary namespace for the botan library diff --git a/src/lib/x509/name_constraint.cpp b/src/lib/x509/name_constraint.cpp index 703c6770c..fc91a5477 100644 --- a/src/lib/x509/name_constraint.cpp +++ b/src/lib/x509/name_constraint.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include namespace Botan { diff --git a/src/lib/x509/ocsp.cpp b/src/lib/x509/ocsp.cpp index be8e6ed1d..c437fa45e 100644 --- a/src/lib/x509/ocsp.cpp +++ b/src/lib/x509/ocsp.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #if defined(BOTAN_HAS_HTTP_UTIL) #include diff --git a/src/lib/x509/x509_ext.h b/src/lib/x509/x509_ext.h index bd2ec86c3..134c2ec3e 100644 --- a/src/lib/x509/x509_ext.h +++ b/src/lib/x509/x509_ext.h @@ -16,6 +16,7 @@ #include #include #include +#include namespace Botan { diff --git a/src/lib/x509/x509cert.cpp b/src/lib/x509/x509cert.cpp index 40bdbf477..785f414c3 100644 --- a/src/lib/x509/x509cert.cpp +++ b/src/lib/x509/x509cert.cpp @@ -8,13 +8,10 @@ #include #include -#include #include -#include #include #include #include -#include #include #include #include diff --git a/src/tests/test_bigint.cpp b/src/tests/test_bigint.cpp index 61be15d15..132723727 100644 --- a/src/tests/test_bigint.cpp +++ b/src/tests/test_bigint.cpp @@ -10,6 +10,7 @@ #include #include #include + #include #include #endif diff --git a/src/tests/test_otp.cpp b/src/tests/test_otp.cpp index 480065194..12295c96c 100644 --- a/src/tests/test_otp.cpp +++ b/src/tests/test_otp.cpp @@ -8,6 +8,7 @@ #include "tests.h" #if defined(BOTAN_HAS_HOTP) + #include #include #endif diff --git a/src/tests/test_x509_path.cpp b/src/tests/test_x509_path.cpp index e7cd9c18c..544d1b35d 100644 --- a/src/tests/test_x509_path.cpp +++ b/src/tests/test_x509_path.cpp @@ -10,6 +10,7 @@ #include #include #include + #include #endif #include diff --git a/src/tests/tests.cpp b/src/tests/tests.cpp index 9a35caf7d..243878bcd 100644 --- a/src/tests/tests.cpp +++ b/src/tests/tests.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3