From b395b6528737f3f3d4358805c53b3b0683f0ddea Mon Sep 17 00:00:00 2001 From: David Garske Date: Wed, 7 Feb 2024 14:28:33 -0800 Subject: [PATCH] Fix for config.h, which should only be included from .c files, not headers. ZD 17473 --- IDE/OPENSTM32/Inc/wolftpm_example.h | 4 ---- IDE/OPENSTM32/Src/wolftpm_example.c | 3 +++ examples/attestation/activate_credential.c | 4 ++++ examples/attestation/make_credential.c | 4 ++++ examples/bench/bench.c | 4 ++++ examples/boot/secret_seal.c | 3 +++ examples/boot/secret_unseal.c | 3 +++ examples/boot/secure_rot.c | 3 +++ examples/csr/csr.c | 3 +++ examples/gpio/gpio_config.c | 7 ++++++- examples/gpio/gpio_read.c | 4 ++++ examples/gpio/gpio_set.c | 4 ++++ examples/keygen/create_primary.c | 4 ++++ examples/keygen/external_import.c | 7 ++++++- examples/keygen/keygen.c | 4 ++++ examples/keygen/keyimport.c | 4 ++++ examples/keygen/keyload.c | 3 +++ examples/management/flush.c | 4 ++++ examples/native/native_test.c | 4 ++++ examples/nvram/counter.c | 6 +++++- examples/nvram/policy_nv.c | 6 +++++- examples/nvram/read.c | 6 +++++- examples/nvram/store.c | 6 +++++- examples/pcr/extend.c | 4 ++++ examples/pcr/policy.c | 4 ++++ examples/pcr/policy_sign.c | 3 +++ examples/pcr/quote.c | 4 ++++ examples/pcr/read_pcr.c | 4 ++++ examples/pkcs7/pkcs7.c | 3 +++ examples/seal/seal.c | 4 ++++ examples/seal/unseal.c | 4 ++++ examples/timestamp/clock_set.c | 4 ++++ examples/timestamp/signed_timestamp.c | 4 ++++ examples/tls/tls_client.c | 3 +++ examples/tls/tls_client_notpm.c | 3 +++ examples/tls/tls_server.c | 3 +++ examples/tpm_test_keys.c | 4 ++++ examples/wrap/wrap_test.c | 7 ++++++- hal/tpm_io.c | 4 ++++ hal/tpm_io_atmel.c | 3 +++ hal/tpm_io_barebox.c | 3 +++ hal/tpm_io_infineon.c | 3 +++ hal/tpm_io_linux.c | 5 ++++- hal/tpm_io_microchip.c | 6 +++++- hal/tpm_io_mmio.c | 3 +++ hal/tpm_io_qnx.c | 3 +++ hal/tpm_io_st.c | 3 +++ hal/tpm_io_xilinx.c | 3 +++ src/tpm2.c | 3 +++ src/tpm2_cryptocb.c | 4 ++++ src/tpm2_linux.c | 4 ++++ src/tpm2_packet.c | 4 +++- src/tpm2_param_enc.c | 4 ++++ src/tpm2_swtpm.c | 4 ++++ src/tpm2_tis.c | 3 +++ src/tpm2_winapi.c | 3 +++ src/tpm2_wrap.c | 4 ++++ wolftpm/tpm2_types.h | 4 ---- 58 files changed, 213 insertions(+), 18 deletions(-) diff --git a/IDE/OPENSTM32/Inc/wolftpm_example.h b/IDE/OPENSTM32/Inc/wolftpm_example.h index da90daa..cf360eb 100644 --- a/IDE/OPENSTM32/Inc/wolftpm_example.h +++ b/IDE/OPENSTM32/Inc/wolftpm_example.h @@ -27,10 +27,6 @@ #include #include -#ifdef HAVE_CONFIG_H - #include -#endif - #ifndef WOLFSSL_USER_SETTINGS #include #endif diff --git a/IDE/OPENSTM32/Src/wolftpm_example.c b/IDE/OPENSTM32/Src/wolftpm_example.c index 0378510..89d8a9e 100644 --- a/IDE/OPENSTM32/Src/wolftpm_example.c +++ b/IDE/OPENSTM32/Src/wolftpm_example.c @@ -19,6 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif #include "wolftpm_example.h" diff --git a/examples/attestation/activate_credential.c b/examples/attestation/activate_credential.c index 93b2bc4..673e985 100644 --- a/examples/attestation/activate_credential.c +++ b/examples/attestation/activate_credential.c @@ -23,6 +23,10 @@ * and extract the secret for challenge response to an attestation server */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/attestation/make_credential.c b/examples/attestation/make_credential.c index b2b85f6..99a2242 100644 --- a/examples/attestation/make_credential.c +++ b/examples/attestation/make_credential.c @@ -21,6 +21,10 @@ /* This example shows how to create a challenge for Remote Attestation */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #ifndef WOLFTPM2_NO_WRAPPER diff --git a/examples/bench/bench.c b/examples/bench/bench.c index 7296713..e036c78 100644 --- a/examples/bench/bench.c +++ b/examples/bench/bench.c @@ -22,6 +22,10 @@ /* This example shows benchmarks using the TPM2 wrapper API's in TPM2_Wrapper_Bench() below. */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/boot/secret_seal.c b/examples/boot/secret_seal.c index c3be981..33e9814 100644 --- a/examples/boot/secret_seal.c +++ b/examples/boot/secret_seal.c @@ -22,6 +22,9 @@ /* Example for using TPM to seal a secret using an external key based on PCR(s) */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/examples/boot/secret_unseal.c b/examples/boot/secret_unseal.c index 609625e..439cdfb 100644 --- a/examples/boot/secret_unseal.c +++ b/examples/boot/secret_unseal.c @@ -22,6 +22,9 @@ /* Example for using TPM to seal a secret using an external key based on PCR(s) */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/examples/boot/secure_rot.c b/examples/boot/secure_rot.c index 5f01325..814adfe 100644 --- a/examples/boot/secure_rot.c +++ b/examples/boot/secure_rot.c @@ -22,6 +22,9 @@ /* Example for using TPM for secure boot root of trust */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/examples/csr/csr.c b/examples/csr/csr.c index b5907fd..e2a0333 100644 --- a/examples/csr/csr.c +++ b/examples/csr/csr.c @@ -19,6 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/examples/gpio/gpio_config.c b/examples/gpio/gpio_config.c index ebd5cac..0d37c71 100644 --- a/examples/gpio/gpio_config.c +++ b/examples/gpio/gpio_config.c @@ -20,7 +20,12 @@ */ /* This examples demonstrates the use of GPIO available on some TPM modules. - * Support tested with STM ST33 and Nuvoton NPCT750 FW 7.2.3.0 or later */ + * Support tested with STM ST33 and Nuvoton NPCT750 FW 7.2.3.0 or later + */ + +#ifdef HAVE_CONFIG_H + #include +#endif #include diff --git a/examples/gpio/gpio_read.c b/examples/gpio/gpio_read.c index e5ce2ab..076f9b5 100644 --- a/examples/gpio/gpio_read.c +++ b/examples/gpio/gpio_read.c @@ -25,6 +25,10 @@ * */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/gpio/gpio_set.c b/examples/gpio/gpio_set.c index 8762ce9..77dc8cf 100644 --- a/examples/gpio/gpio_set.c +++ b/examples/gpio/gpio_set.c @@ -25,6 +25,10 @@ * */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/keygen/create_primary.c b/examples/keygen/create_primary.c index c981bec..a5f4acc 100644 --- a/examples/keygen/create_primary.c +++ b/examples/keygen/create_primary.c @@ -21,6 +21,10 @@ /* Tool and example for creating and storing primary keys using TPM2.0 */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/keygen/external_import.c b/examples/keygen/external_import.c index 48344c1..3b67dc4 100644 --- a/examples/keygen/external_import.c +++ b/examples/keygen/external_import.c @@ -20,7 +20,12 @@ */ /* Example for importing an external RSA key with seed and creating a - * child key under it. */ + * child key under it. + */ + +#ifdef HAVE_CONFIG_H + #include +#endif #include diff --git a/examples/keygen/keygen.c b/examples/keygen/keygen.c index 1a71811..ab87d47 100644 --- a/examples/keygen/keygen.c +++ b/examples/keygen/keygen.c @@ -21,6 +21,10 @@ /* Tool and example for creating, storing and loading keys using TPM2.0 */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/keygen/keyimport.c b/examples/keygen/keyimport.c index cf4c781..2268984 100644 --- a/examples/keygen/keyimport.c +++ b/examples/keygen/keyimport.c @@ -21,6 +21,10 @@ /* Tool and example for creating, storing and loading keys using TPM2.0 */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/keygen/keyload.c b/examples/keygen/keyload.c index 439950a..343d7bb 100644 --- a/examples/keygen/keyload.c +++ b/examples/keygen/keyload.c @@ -21,6 +21,9 @@ /* Tool and example for creating, storing and loading keys using TPM2.0 */ +#ifdef HAVE_CONFIG_H + #include +#endif /* use ANSI stdio for support of format strings, must be set before * including stdio.h diff --git a/examples/management/flush.c b/examples/management/flush.c index 82d0180..dc635f4 100644 --- a/examples/management/flush.c +++ b/examples/management/flush.c @@ -21,6 +21,10 @@ /* This is a helper tool for reseting the value of a TPM2.0 PCR */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/native/native_test.c b/examples/native/native_test.c index e471bf0..ae864da 100644 --- a/examples/native/native_test.c +++ b/examples/native/native_test.c @@ -21,6 +21,10 @@ /* This example shows using the TPM2_ specification API's in TPM2_Native_Test() */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/nvram/counter.c b/examples/nvram/counter.c index 75e9e80..5d3dd82 100644 --- a/examples/nvram/counter.c +++ b/examples/nvram/counter.c @@ -24,7 +24,11 @@ * NB: This example uses Parameter Encryption to protect * the Password Authorization of the TPM NVRAM Index * - **/ + */ + +#ifdef HAVE_CONFIG_H + #include +#endif #include diff --git a/examples/nvram/policy_nv.c b/examples/nvram/policy_nv.c index d8e575d..b858ca9 100644 --- a/examples/nvram/policy_nv.c +++ b/examples/nvram/policy_nv.c @@ -24,7 +24,11 @@ * NB: This example uses Parameter Encryption to protect the password of the * TPM NVRAM Index, where the private and public parts of a TPM key is stored * - **/ + */ + +#ifdef HAVE_CONFIG_H + #include +#endif #include diff --git a/examples/nvram/read.c b/examples/nvram/read.c index 869cbb8..d90172f 100644 --- a/examples/nvram/read.c +++ b/examples/nvram/read.c @@ -24,7 +24,11 @@ * NB: This example uses Parameter Encryption to protect * the Password Authorization of the TPM NVRAM Index * - **/ + */ + +#ifdef HAVE_CONFIG_H + #include +#endif #include diff --git a/examples/nvram/store.c b/examples/nvram/store.c index 4cb8e3b..007a6e7 100644 --- a/examples/nvram/store.c +++ b/examples/nvram/store.c @@ -24,7 +24,11 @@ * NB: This example uses Parameter Encryption to protect the password of the * TPM NVRAM Index, where the private and public parts of a TPM key is stored * - **/ + */ + +#ifdef HAVE_CONFIG_H + #include +#endif #include diff --git a/examples/pcr/extend.c b/examples/pcr/extend.c index 0378b7e..5220948 100644 --- a/examples/pcr/extend.c +++ b/examples/pcr/extend.c @@ -21,6 +21,10 @@ /* This is a helper tool for extending hash into a TPM2.0 PCR */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #ifndef WOLFTPM2_NO_WRAPPER diff --git a/examples/pcr/policy.c b/examples/pcr/policy.c index dc79608..dfaafef 100644 --- a/examples/pcr/policy.c +++ b/examples/pcr/policy.c @@ -21,6 +21,10 @@ /* This is a helper tool for setting policies on a TPM 2.0 PCR */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/pcr/policy_sign.c b/examples/pcr/policy_sign.c index 72a3673..456ec02 100644 --- a/examples/pcr/policy_sign.c +++ b/examples/pcr/policy_sign.c @@ -22,6 +22,9 @@ /* Example for signing PCR(s) to create a policy for unsealing a secret */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/examples/pcr/quote.c b/examples/pcr/quote.c index 1519692..dc30ad7 100644 --- a/examples/pcr/quote.c +++ b/examples/pcr/quote.c @@ -23,6 +23,10 @@ * PCR measurement. PCR values are used as basis for system integrity. */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #ifndef WOLFTPM2_NO_WRAPPER diff --git a/examples/pcr/read_pcr.c b/examples/pcr/read_pcr.c index 098a39b..2e9de46 100644 --- a/examples/pcr/read_pcr.c +++ b/examples/pcr/read_pcr.c @@ -21,6 +21,10 @@ /* This is a helper tool for reading the value of a TPM2.0 PCR */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/pkcs7/pkcs7.c b/examples/pkcs7/pkcs7.c index 7ffa293..0641dd1 100644 --- a/examples/pkcs7/pkcs7.c +++ b/examples/pkcs7/pkcs7.c @@ -19,6 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/examples/seal/seal.c b/examples/seal/seal.c index f546fee..8d4066a 100644 --- a/examples/seal/seal.c +++ b/examples/seal/seal.c @@ -21,6 +21,10 @@ /* Example for TPM 2.0 sealing a user secret using TPM key */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/seal/unseal.c b/examples/seal/unseal.c index 402fff1..c61d99c 100644 --- a/examples/seal/unseal.c +++ b/examples/seal/unseal.c @@ -21,6 +21,10 @@ /* This example demonstrates how to extract the data from a TPM seal object */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/timestamp/clock_set.c b/examples/timestamp/clock_set.c index 9db5cbc..1122254 100644 --- a/examples/timestamp/clock_set.c +++ b/examples/timestamp/clock_set.c @@ -21,6 +21,10 @@ /* This example shows how to increment the TPM2 clock */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/timestamp/signed_timestamp.c b/examples/timestamp/signed_timestamp.c index 67deb1d..f3e192c 100644 --- a/examples/timestamp/signed_timestamp.c +++ b/examples/timestamp/signed_timestamp.c @@ -23,6 +23,10 @@ * generate a signed timestamp from the TPM using a Attestation Identity Key. */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/examples/tls/tls_client.c b/examples/tls/tls_client.c index 9d6de10..472b4e8 100644 --- a/examples/tls/tls_client.c +++ b/examples/tls/tls_client.c @@ -19,6 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/examples/tls/tls_client_notpm.c b/examples/tls/tls_client_notpm.c index 090464f..93d583f 100644 --- a/examples/tls/tls_client_notpm.c +++ b/examples/tls/tls_client_notpm.c @@ -19,6 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/examples/tls/tls_server.c b/examples/tls/tls_server.c index 8e10fbb..6bc4098 100644 --- a/examples/tls/tls_server.c +++ b/examples/tls/tls_server.c @@ -19,6 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/examples/tpm_test_keys.c b/examples/tpm_test_keys.c index 1d09c66..c5df182 100644 --- a/examples/tpm_test_keys.c +++ b/examples/tpm_test_keys.c @@ -19,6 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif + /* use ANSI stdio for support of format strings, must be set before * including stdio.h */ diff --git a/examples/wrap/wrap_test.c b/examples/wrap/wrap_test.c index cc347c7..94e698e 100644 --- a/examples/wrap/wrap_test.c +++ b/examples/wrap/wrap_test.c @@ -19,7 +19,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ -/* This example shows using the TPM2 wrapper API's in TPM2_Wrapper_Test() below. */ +/* This example shows using the TPM2 wrapper API's in TPM2_Wrapper_Test() below. + */ + +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/hal/tpm_io.c b/hal/tpm_io.c index c0d8751..d6faba1 100644 --- a/hal/tpm_io.c +++ b/hal/tpm_io.c @@ -31,6 +31,10 @@ * */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include #include "tpm_io.h" diff --git a/hal/tpm_io_atmel.c b/hal/tpm_io_atmel.c index bbb3f8f..31c3778 100644 --- a/hal/tpm_io_atmel.c +++ b/hal/tpm_io_atmel.c @@ -21,6 +21,9 @@ /* This example shows IO interfaces for ATMEL microcontrollers using ASF */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/hal/tpm_io_barebox.c b/hal/tpm_io_barebox.c index 3513d50..478b140 100644 --- a/hal/tpm_io_barebox.c +++ b/hal/tpm_io_barebox.c @@ -21,6 +21,9 @@ /* This example shows IO interfaces for Barebox */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/hal/tpm_io_infineon.c b/hal/tpm_io_infineon.c index 252b986..04bca15 100644 --- a/hal/tpm_io_infineon.c +++ b/hal/tpm_io_infineon.c @@ -23,6 +23,9 @@ * - TC2XX/TC3XX using macro: `WOLFTPM_INFINEON_TRICORE`. */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/hal/tpm_io_linux.c b/hal/tpm_io_linux.c index 5ca01e8..193498d 100644 --- a/hal/tpm_io_linux.c +++ b/hal/tpm_io_linux.c @@ -23,8 +23,11 @@ * * NB: To use /dev/tpm0, wolfTPM does not require an IO callback, just pass NULL * - * */ + */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/hal/tpm_io_microchip.c b/hal/tpm_io_microchip.c index 46403c5..178963f 100644 --- a/hal/tpm_io_microchip.c +++ b/hal/tpm_io_microchip.c @@ -20,8 +20,12 @@ */ /* This example shows IO interfaces for Microchip micro-controllers using - * MPLAB X and Harmony */ + * MPLAB X and Harmony + */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/hal/tpm_io_mmio.c b/hal/tpm_io_mmio.c index 0ea70ee..1156c93 100644 --- a/hal/tpm_io_mmio.c +++ b/hal/tpm_io_mmio.c @@ -21,6 +21,9 @@ /* Support for Memory Mapped I/O for accessing TPM */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/hal/tpm_io_qnx.c b/hal/tpm_io_qnx.c index 495e559..eb42afa 100644 --- a/hal/tpm_io_qnx.c +++ b/hal/tpm_io_qnx.c @@ -21,6 +21,9 @@ /* This example shows IO interfaces for QNX */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/hal/tpm_io_st.c b/hal/tpm_io_st.c index 6eedfc3..d6744b2 100644 --- a/hal/tpm_io_st.c +++ b/hal/tpm_io_st.c @@ -21,6 +21,9 @@ /* This example shows IO interfaces for STM32 CubeMX HAL */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/hal/tpm_io_xilinx.c b/hal/tpm_io_xilinx.c index 43f20ff..6516b73 100644 --- a/hal/tpm_io_xilinx.c +++ b/hal/tpm_io_xilinx.c @@ -21,6 +21,9 @@ /* This example shows IO interfaces for Xilinx */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/src/tpm2.c b/src/tpm2.c index 75f7ec7..76ebba9 100644 --- a/src/tpm2.c +++ b/src/tpm2.c @@ -19,6 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif #include #include diff --git a/src/tpm2_cryptocb.c b/src/tpm2_cryptocb.c index ef25d83..0115d86 100644 --- a/src/tpm2_cryptocb.c +++ b/src/tpm2_cryptocb.c @@ -19,6 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #if !defined(WOLFTPM2_NO_WRAPPER) diff --git a/src/tpm2_linux.c b/src/tpm2_linux.c index c1b2032..9c3f354 100644 --- a/src/tpm2_linux.c +++ b/src/tpm2_linux.c @@ -19,6 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #ifdef WOLFTPM_LINUX_DEV diff --git a/src/tpm2_packet.c b/src/tpm2_packet.c index 85949a6..0cb830e 100644 --- a/src/tpm2_packet.c +++ b/src/tpm2_packet.c @@ -19,10 +19,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif #include - /* Endianess Helpers */ #ifdef LITTLE_ENDIAN_ORDER #define cpu_to_be16(d) ByteReverseWord16(d) diff --git a/src/tpm2_param_enc.c b/src/tpm2_param_enc.c index f040fdf..2df0d28 100644 --- a/src/tpm2_param_enc.c +++ b/src/tpm2_param_enc.c @@ -19,6 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/src/tpm2_swtpm.c b/src/tpm2_swtpm.c index f67cee1..583650f 100644 --- a/src/tpm2_swtpm.c +++ b/src/tpm2_swtpm.c @@ -32,6 +32,10 @@ * See docs/SWTPM.md */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #ifdef WOLFTPM_SWTPM diff --git a/src/tpm2_tis.c b/src/tpm2_tis.c index 4004f74..0c0a8ed 100644 --- a/src/tpm2_tis.c +++ b/src/tpm2_tis.c @@ -19,6 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif #include diff --git a/src/tpm2_winapi.c b/src/tpm2_winapi.c index fcd8a46..840a5c2 100644 --- a/src/tpm2_winapi.c +++ b/src/tpm2_winapi.c @@ -19,6 +19,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif #include diff --git a/src/tpm2_wrap.c b/src/tpm2_wrap.c index b6c1709..24bdf8f 100644 --- a/src/tpm2_wrap.c +++ b/src/tpm2_wrap.c @@ -19,6 +19,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ +#ifdef HAVE_CONFIG_H + #include +#endif + #include #include diff --git a/wolftpm/tpm2_types.h b/wolftpm/tpm2_types.h index ded3f00..aa81435 100644 --- a/wolftpm/tpm2_types.h +++ b/wolftpm/tpm2_types.h @@ -22,10 +22,6 @@ #ifndef __TPM2_TYPES_H__ #define __TPM2_TYPES_H__ -#ifdef HAVE_CONFIG_H - #include -#endif - #include #include