diff --git a/test/integration/fapi-check-wrong-paths.int.c b/test/integration/fapi-check-wrong-paths.int.c index 5ea058bd7..9b3bfcdf3 100644 --- a/test/integration/fapi-check-wrong-paths.int.c +++ b/test/integration/fapi-check-wrong-paths.int.c @@ -7,22 +7,15 @@ #ifdef HAVE_CONFIG_H #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "tss2_fapi.h" - -#include "test-fapi.h" +#include // for NULL +#include // for EXIT_FAILURE, EXIT_SUCCESS + +#include "test-fapi.h" // for test_invoke_fapi +#include "tss2_common.h" // for TSS2_FAPI_RC_BAD_PATH, TSS2_RC_SUCCESS, TSS... +#include "tss2_fapi.h" // for Fapi_CreateKey, Fapi_Delete, Fapi_CreateNv + #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR #define EVENT_SIZE 10 diff --git a/test/integration/fapi-data-crypt.int.c b/test/integration/fapi-data-crypt.int.c index 4a5c74773..889c46e25 100644 --- a/test/integration/fapi-data-crypt.int.c +++ b/test/integration/fapi-data-crypt.int.c @@ -8,23 +8,23 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "tss2_fapi.h" - -#include "test-fapi.h" +#include // for BIO_free, BIO_new_mem_buf +#include // for EVP_DigestSignFinal, EVP_PKEY_free, EVP... +#include // for PEM_read_bio_PrivateKey +#include // for EVP_PKEY_CTX_set_rsa_padding, RSA_PKCS1... +#include // for uint8_t, uint32_t +#include // for NULL, fopen, size_t, fclose, fileno, fseek +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp, strlen, strcmp, strncmp +#include // for read + +#include "test-fapi.h" // for pcr_reset, EXIT_SKIP, test_invoke_fapi +#include "tss2_common.h" // for TSS2_FAPI_RC_GENERAL_FAILURE, TSS2_RC +#include "tss2_fapi.h" // for Fapi_Free, Fapi_Delete, Fapi_Decrypt +#include "tss2_tpm2_types.h" // for TPM2_ALG_SHA256 #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOG_ERROR, goto_if_error, SAFE_FREE #define SIZE 128 diff --git a/test/integration/fapi-duplicate.int.c b/test/integration/fapi-duplicate.int.c index c5642274a..f8421790f 100644 --- a/test/integration/fapi-duplicate.int.c +++ b/test/integration/fapi-duplicate.int.c @@ -8,17 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include +#include // for NULL, fopen, fclose, fileno, fprintf, fseek +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strlen +#include // for read -#include "tss2_fapi.h" +#include "test-fapi.h" // for ASSERT, pcr_reset, ASSERT_SIZE, CHECK_JSON_... +#include "tss2_common.h" // for TSS2_FAPI_RC_MEMORY, TSS2_RC +#include "tss2_fapi.h" // for Fapi_Import, Fapi_CreateKey, Fapi_Delete -#include "test-fapi.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_ERROR, LOG_INFO #define SIZE 2000 diff --git a/test/integration/fapi-export-policy.int.c b/test/integration/fapi-export-policy.int.c index 6bf470891..d89d2fbeb 100644 --- a/test/integration/fapi-export-policy.int.c +++ b/test/integration/fapi-export-policy.int.c @@ -8,26 +8,20 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "tss2_fapi.h" -#include "tss2_esys.h" -#include "tss2_tcti.h" - -#include "test-fapi.h" -#include "test-fapi-policies.h" +#include // for json_object, json_object_put, json_object_to_js... +#include // for bool, false, true +#include // for NULL, fopen, fprintf, fclose, fileno +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strlen, strcmp +#include // for read + +#include "test-fapi-policies.h" // for policy_digests, _test_fapi_policy_p... +#include "test-fapi.h" // for pcr_reset, ASSERT, ASSERT_SIZE, tes... +#include "tss2_common.h" // for TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, FAPI_CONTEXT, Fapi_Exp... #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOG_ERROR, goto_if_error, SAFE_FREE /** Check the digest values from result table for sha1 and sha256. */ static bool diff --git a/test/integration/fapi-ext-public-key.int.c b/test/integration/fapi-ext-public-key.int.c index 582e36554..02128f0ee 100644 --- a/test/integration/fapi-ext-public-key.int.c +++ b/test/integration/fapi-ext-public-key.int.c @@ -8,22 +8,22 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "tss2_fapi.h" +#include // for uint8_t +#include // for BIO_free, BIO_new_mem_buf +#include // for EVP_PKEY_CTX_free, EVP_PKEY_free, EVP_PKE... +#include // for PEM_read_bio_PrivateKey +#include // for EVP_PKEY_CTX_set_rsa_padding, RSA_PKCS1_P... +#include // for NULL, size_t +#include // for fprintf, stderr +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for strcmp, strlen + +#include "tss2_common.h" // for TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_Import, Fapi_GetCertifi... #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" -#include "test-fapi.h" +#include "test-fapi.h" // for ASSERT, ASSERT_SIZE, test_invoke_fapi +#include "util/log.h" // for goto_if_error, LOG_ERROR, SAFE_FREE, LOG_... /** Test the FAPI functions use an external public key for signature and quote verify without TPM. * diff --git a/test/integration/fapi-get-esys-blobs.int.c b/test/integration/fapi-get-esys-blobs.int.c index cd7ecc086..c5a81962e 100644 --- a/test/integration/fapi-get-esys-blobs.int.c +++ b/test/integration/fapi-get-esys-blobs.int.c @@ -8,20 +8,22 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for json_object, json_object_put, json_object_to_js... +#include // for uint8_t +#include // for sprintf +#include // for NULL, size_t, EXIT_FAILURE, EXIT_SUC... +#include // for memcpy, strncmp + +#include "fapi_int.h" // for FAPI_CONTEXT +#include "test-fapi.h" // for ASSERT, FAPI_PROFILE, EXIT_SKIP, tes... +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, BYTE, TSS2... +#include "tss2_esys.h" // for Esys_FlushContext, Esys_TR_Deserialize +#include "tss2_fapi.h" // for FAPI_CONTEXT, Fapi_Delete, Fapi_GetE... +#include "tss2_tpm2_types.h" // for TPM2_ALG_SHA256, TPM2B_AUTH, TPM2B_P... -#include "tss2_fapi.h" -#include "tss2_esys.h" - -#include "test-fapi.h" -#include "fapi_util.h" -#include "fapi_int.h" - -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" -#include "tss2_mu.h" +#include "tss2_mu.h" // for Tss2_MU_TPMS_CONTEXT_Unmarshal +#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_ERROR #define PASSWORD "abc" #define SIGN_TEMPLATE "sign,noDa" diff --git a/test/integration/fapi-get-random.int.c b/test/integration/fapi-get-random.int.c index fff1551b6..3d19efc79 100644 --- a/test/integration/fapi-get-random.int.c +++ b/test/integration/fapi-get-random.int.c @@ -8,14 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for poll +#include // for uint8_t +#include // for NULL, size_t, EXIT_FAILURE -#include "tss2_fapi.h" -#include "test-fapi.h" +#include "test-fapi.h" // for ASSERT, test_invoke_fapi +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_FAPI_RC_NO_HANDLE +#include "tss2_fapi.h" // for Fapi_Free, Fapi_Delete, Fapi_GetPollHan... +#include "tss2_tpm2_types.h" // for TPMU_HA #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** Test the FAPI function FAPI_GetRandom and async invocations. * diff --git a/test/integration/fapi-import-ossl-key.int.c b/test/integration/fapi-import-ossl-key.int.c index f865d07a8..4aef2e3de 100644 --- a/test/integration/fapi-import-ossl-key.int.c +++ b/test/integration/fapi-import-ossl-key.int.c @@ -8,20 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include +#include // for json_object, json_object_put, json_object_to_js... +#include // for NULL +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for strcmp, strdup, strlen, strncmp -#include "tss2_fapi.h" +#include "test-fapi.h" // for ASSERT, ASSERT_SIZE, test_invoke_fapi +#include "tss2_common.h" // for TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_ExportKey, Fapi_I... -#include "test-fapi.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOG_ERROR, SAFE_FREE, goto_if_error #define SIZE 2000 diff --git a/test/integration/fapi-info.int.c b/test/integration/fapi-info.int.c index dc1432a4a..d05be5713 100644 --- a/test/integration/fapi-info.int.c +++ b/test/integration/fapi-info.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for strlen -#include "tss2_fapi.h" +#include "tss2_common.h" // for TSS2_RC +#include "tss2_fapi.h" // for Fapi_GetInfo, FAPI_CONTEXT #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" -#include "test-fapi.h" +#include "test-fapi.h" // for ASSERT, CHECK_JSON_FIELDS, ASSERT_SIZE, tes... +#include "util/log.h" // for SAFE_FREE, LOG_INFO, goto_if_error /** Test the FAPI functions for GetInfo. * diff --git a/test/integration/fapi-key-change-auth.int.c b/test/integration/fapi-key-change-auth.int.c index 6704ae98c..40108fba8 100644 --- a/test/integration/fapi-key-change-auth.int.c +++ b/test/integration/fapi-key-change-auth.int.c @@ -8,16 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include +#include // for uint8_t +#include // for NULL, asprintf, size_t +#include // for exit, free, EXIT_FAILURE, EXIT_SUCCESS +#include // for strlen, strstr -#include "tss2_fapi.h" +#include "tss2_common.h" // for TSS2_RC, BYTE, TSS2_FAPI_RC_BAD_VALUE +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_ChangeAuth, Fapi_Crea... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" -#include "test-fapi.h" +#include "test-fapi.h" // for ASSERT, fapi_profile, test_invoke_fapi +#include "util/log.h" // for goto_if_error, SAFE_FREE, UNUSED, retur... #define PASSWORD "abc" #define USER_DATA "my user data" diff --git a/test/integration/fapi-key-create-ckda-sign.int.c b/test/integration/fapi-key-create-ckda-sign.int.c index edb50cf81..20de0ced5 100644 --- a/test/integration/fapi-key-create-ckda-sign.int.c +++ b/test/integration/fapi-key-create-ckda-sign.int.c @@ -8,15 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include +#include // for uint8_t +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS, size_t +#include // for strstr, strcmp -#include "tss2_fapi.h" +#include "tss2_common.h" // for TSS2_RC, BYTE, TSS2_FAPI_RC_BAD_VALUE +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateKey, Fapi_Provi... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" -#include "test-fapi.h" +#include "test-fapi.h" // for ASSERT, test_invoke_fapi +#include "util/log.h" // for SAFE_FREE, goto_if_error, UNUSED, retur... #ifdef FAPI_PASSWORD diff --git a/test/integration/fapi-key-create-he-sign.int.c b/test/integration/fapi-key-create-he-sign.int.c index eeed6e048..786fd0bb0 100644 --- a/test/integration/fapi-key-create-he-sign.int.c +++ b/test/integration/fapi-key-create-he-sign.int.c @@ -8,19 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include +#include // for bool, false, true +#include // for uint8_t +#include // for NULL, size_t, EXIT_FAILURE, EXIT_SUCCESS +#include // for strcmp, strlen, strncmp -#include "tss2_fapi.h" +#include "test-fapi.h" // for ASSERT, ASSERT_SIZE, fapi_profile, test... +#include "tss2_common.h" // for TSS2_RC, BYTE, TSS2_FAPI_RC_GENERAL_FAI... +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateKey, Fapi_Provi... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST -#include "test-fapi.h" -#include "fapi_util.h" -#include "fapi_int.h" - -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, SAFE_FREE, UNUSED, LOG_E... #define PASSWORD "abc" #define SIGN_TEMPLATE "sign,noDa" diff --git a/test/integration/fapi-key-create-null-key-sign.int.c b/test/integration/fapi-key-create-null-key-sign.int.c index 82304588f..ce9686e18 100644 --- a/test/integration/fapi-key-create-null-key-sign.int.c +++ b/test/integration/fapi-key-create-null-key-sign.int.c @@ -8,18 +8,19 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for json_object, json_object_put, json_object_to_js... +#include // for uint8_t +#include // for sprintf +#include // for NULL, size_t, EXIT_FAILURE, EXIT_SUC... +#include // for strncmp -#include "tss2_fapi.h" +#include "test-fapi.h" // for init_fapi, fapi_profile, test_invoke... +#include "tss2_common.h" // for TSS2_FAPI_RC_BAD_VALUE, TSS2_RC_SUCCESS +#include "tss2_fapi.h" // for Fapi_CreateKey, Fapi_Delete, Fapi_Fi... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST -#include "test-fapi.h" -#include "fapi_util.h" -#include "fapi_int.h" - -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, SAFE_FREE, UNUSED #define PASSWORD "abc" #define SIGN_TEMPLATE "sign,noDa" diff --git a/test/integration/fapi-key-create-policies-sign.int.c b/test/integration/fapi-key-create-policies-sign.int.c index f7ae50f47..112766815 100644 --- a/test/integration/fapi-key-create-policies-sign.int.c +++ b/test/integration/fapi-key-create-policies-sign.int.c @@ -8,19 +8,19 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include +#include // for uint8_t +#include // for NULL, fopen, fclose, fileno, fseek, ftell +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strstr +#include // for read -#include "tss2_fapi.h" +#include "tss2_common.h" // for TSS2_RC, BYTE, TSS2_FAPI_RC_BAD_VALUE +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateKey, Fapi_Import +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" -#include "test-fapi.h" +#include "test-fapi.h" // for ASSERT, pcr_reset, FAPI_POLICIES, test_... +#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_ERROR #ifdef TEST_PASSWORD #define PASSWORD "abc" diff --git a/test/integration/fapi-key-create-policy-authorize-nv-sign.int.c b/test/integration/fapi-key-create-policy-authorize-nv-sign.int.c index 4d9ac0278..6ad202d9d 100644 --- a/test/integration/fapi-key-create-policy-authorize-nv-sign.int.c +++ b/test/integration/fapi-key-create-policy-authorize-nv-sign.int.c @@ -8,25 +8,22 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include - - -#include "tss2_fapi.h" -#include "tss2_esys.h" -#include "tss2_tcti.h" - -#include "test-fapi.h" +#include // for uint8_t +#include // for NULL, fopen, snprintf, fclose, fileno +#include // for free, EXIT_FAILURE, malloc, EXIT_SUCCESS +#include // for strcmp, strstr +#include // for read + +#include "test-fapi.h" // for ASSERT, FAPI_PROFILE, pcr_reset, EXIT_SKIP +#include "tss2_common.h" // for TSS2_RC, BYTE, TSS2_FAPI_RC_NOT_IMPLEME... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_Finalize, Esys_GetCa... +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateKey, Fapi_Import +#include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST, TPMS_CAPABILITY_DATA, TPM... #define LOGMODULE test #define LOGDEFAULT LOGLEVEL_INFO -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOGLEVEL_INFO, goto_if_error, SAFE_FREE #define NV_SIZE 34 #define PASSWORD "" diff --git a/test/integration/fapi-key-create-policy-authorize-pem-sign.int.c b/test/integration/fapi-key-create-policy-authorize-pem-sign.int.c index f45bc6802..d03d343cf 100644 --- a/test/integration/fapi-key-create-policy-authorize-pem-sign.int.c +++ b/test/integration/fapi-key-create-policy-authorize-pem-sign.int.c @@ -8,21 +8,19 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include +#include // for uint8_t +#include // for NULL, fopen, fclose, fileno, fseek, ftell +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strcmp, strstr +#include // for read -#include "tss2_fapi.h" - -#include "test-fapi.h" +#include "test-fapi.h" // for ASSERT, FAPI_PROFILE, pcr_reset, EXIT_SKIP +#include "tss2_common.h" // for TSS2_FAPI_RC_MEMORY, BYTE, TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateKey, Fapi_Import +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_ERROR #define OBJECT_PATH "HS/SRK/mySignKey" #define USER_DATA "my user data" diff --git a/test/integration/fapi-key-create-policy-authorize-sign.int.c b/test/integration/fapi-key-create-policy-authorize-sign.int.c index 52d99caac..826fd6958 100644 --- a/test/integration/fapi-key-create-policy-authorize-sign.int.c +++ b/test/integration/fapi-key-create-policy-authorize-sign.int.c @@ -8,21 +8,20 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include - -#include "tss2_fapi.h" - -#include "test-fapi.h" +#include // for bool, false, true +#include // for uint8_t +#include // for NULL, fopen, fclose, fileno, fseek, ftell +#include // for malloc, EXIT_FAILURE, exit, free, EXIT_... +#include // for strlen, strcmp, strstr +#include // for read + +#include "test-fapi.h" // for ASSERT, cmp_strtokens, pcr_reset, ASSER... +#include "tss2_common.h" // for TSS2_FAPI_RC_MEMORY, TSS2_FAPI_RC_GENER... +#include "tss2_fapi.h" // for Fapi_List, Fapi_CreateKey, Fapi_Import +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_ERROR static bool cb_called = false; diff --git a/test/integration/fapi-key-create-policy-nv-counter-sign.int.c b/test/integration/fapi-key-create-policy-nv-counter-sign.int.c index 67f2b02f5..0de3b8139 100644 --- a/test/integration/fapi-key-create-policy-nv-counter-sign.int.c +++ b/test/integration/fapi-key-create-policy-nv-counter-sign.int.c @@ -8,19 +8,19 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include +#include // for uint8_t +#include // for NULL, fopen, fclose, fileno, fseek, ftell +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strstr +#include // for read -#include "tss2_fapi.h" +#include "tss2_common.h" // for BYTE, TSS2_FAPI_RC_MEMORY, TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateKey, Fapi_CreateNv +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" -#include "test-fapi.h" +#include "test-fapi.h" // for ASSERT, test_invoke_fapi +#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_ERROR #define SIGN_TEMPLATE "sign,noDa" #define PASSWORD NULL diff --git a/test/integration/fapi-key-create-policy-nv-sign.int.c b/test/integration/fapi-key-create-policy-nv-sign.int.c index 3e6d843b3..e30051d17 100644 --- a/test/integration/fapi-key-create-policy-nv-sign.int.c +++ b/test/integration/fapi-key-create-policy-nv-sign.int.c @@ -8,19 +8,19 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include +#include // for uint8_t +#include // for NULL, fopen, fclose, fileno, fseek, ftell +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strstr, strcmp +#include // for read -#include "tss2_fapi.h" +#include "tss2_common.h" // for BYTE, TSS2_FAPI_RC_MEMORY, TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateKey, Fapi_CreateNv +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" -#include "test-fapi.h" +#include "test-fapi.h" // for ASSERT, test_invoke_fapi +#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_ERROR #define SIGN_TEMPLATE "sign,noDa" #define PASSWORD NULL diff --git a/test/integration/fapi-key-create-policy-or-sign.int.c b/test/integration/fapi-key-create-policy-or-sign.int.c index b21058acb..74781ddb6 100644 --- a/test/integration/fapi-key-create-policy-or-sign.int.c +++ b/test/integration/fapi-key-create-policy-or-sign.int.c @@ -8,21 +8,20 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include - -#include "tss2_fapi.h" - -#include "test-fapi.h" +#include // for bool, false, true +#include // for uint8_t +#include // for NULL, fopen, fclose, fileno, fseek, ftell +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strcmp, strstr +#include // for read + +#include "test-fapi.h" // for ASSERT, pcr_reset, FAPI_PROFILE, test_i... +#include "tss2_common.h" // for BYTE, TSS2_FAPI_RC_GENERAL_FAILURE, TSS... +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_SetBranchCB, Fapi_Set... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_ERROR #define PASSWORD NULL #define SIGN_TEMPLATE "sign,noDa" diff --git a/test/integration/fapi-key-create-policy-pcr-sign.int.c b/test/integration/fapi-key-create-policy-pcr-sign.int.c index 08367b447..ae0c059c2 100644 --- a/test/integration/fapi-key-create-policy-pcr-sign.int.c +++ b/test/integration/fapi-key-create-policy-pcr-sign.int.c @@ -8,23 +8,20 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include // for json_object, json_object_put, json_object_to_js... +#include // for uint8_t +#include // for NULL, fopen, fclose, fileno, fseek +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strcmp, strstr, strlen +#include // for read + +#include "test-fapi.h" // for ASSERT, CHECK_JSON, FAPI_PROFILE +#include "tss2_common.h" // for BYTE, TSS2_FAPI_RC_MEMORY, TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_ExportPolicy, Fap... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST - -#include "tss2_fapi.h" - -#include "test-fapi.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_ERROR #define PASSWORD NULL #define SIGN_TEMPLATE "sign,noDa" diff --git a/test/integration/fapi-key-create-policy-secret-key-sign.int.c b/test/integration/fapi-key-create-policy-secret-key-sign.int.c index 9034e646f..a3f21b036 100644 --- a/test/integration/fapi-key-create-policy-secret-key-sign.int.c +++ b/test/integration/fapi-key-create-policy-secret-key-sign.int.c @@ -8,22 +8,19 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include +#include // for uint8_t +#include // for NULL, fopen, fclose, fileno, fseek, ftell +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strstr +#include // for read - -#include "tss2_fapi.h" - -#include "test-fapi.h" +#include "test-fapi.h" // for ASSERT, test_invoke_fapi +#include "tss2_common.h" // for BYTE, TSS2_RC, TSS2_RC_SUCCESS, TSS2_FA... +#include "tss2_fapi.h" // for Fapi_CreateKey, Fapi_Delete, Fapi_Sign +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_ERROR #define NV_SIZE 34 #define PASSWORD "abc" diff --git a/test/integration/fapi-key-create-policy-secret-nv-sign.int.c b/test/integration/fapi-key-create-policy-secret-nv-sign.int.c index 3d4e2cfed..ab1315d3d 100644 --- a/test/integration/fapi-key-create-policy-secret-nv-sign.int.c +++ b/test/integration/fapi-key-create-policy-secret-nv-sign.int.c @@ -8,22 +8,19 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include +#include // for uint8_t +#include // for NULL, fopen, fclose, fileno, fseek, ftell +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strstr +#include // for read - -#include "tss2_fapi.h" - -#include "test-fapi.h" +#include "test-fapi.h" // for ASSERT, test_invoke_fapi +#include "tss2_common.h" // for BYTE, TSS2_RC, TSS2_RC_SUCCESS, TSS2_FA... +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_Import, Fapi_Sign +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_ERROR #define NV_SIZE 34 #define PASSWORD "abc" diff --git a/test/integration/fapi-key-create-policy-signed-keyedhash.int.c b/test/integration/fapi-key-create-policy-signed-keyedhash.int.c index d9271fb64..fe2a42a34 100644 --- a/test/integration/fapi-key-create-policy-signed-keyedhash.int.c +++ b/test/integration/fapi-key-create-policy-signed-keyedhash.int.c @@ -8,24 +8,29 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include - -#include +#include // for uint8_t, PRIu16, uint32_t +#include // for EVP_MAC_CTX_free, EVP_MAC_free, EVP_MD... +#include // for OPENSSL_VERSION_NUMBER +#include // for SHA512_DIGEST_LENGTH +#include // for NULL, fclose, fopen, size_t, fileno +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strcmp, strstr +#include // for read + +#if OPENSSL_VERSION_NUMBER < 0x30000000L #include -#include -#include +#else +#include // for OSSL_ALG_PARAM_DIGEST +#include // for EVP_MD, OSSL_PARAM, EVP_CIPHER, EVP_... +#endif -#include "tss2_fapi.h" +#include "test-fapi.h" // for ASSERT, pcr_reset, FAPI_PROFILE, test_... +#include "tss2_common.h" // for TSS2_FAPI_RC_GENERAL_FAILURE, TSS2_FAP... +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateKey, Fapi_Crea... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST, TPM2_ALG_SHA1, TPM2_ALG_... -#include "test-fapi.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_ERROR char *userDataTest = "test"; diff --git a/test/integration/fapi-key-create-policy-signed.int.c b/test/integration/fapi-key-create-policy-signed.int.c index 320da76ec..55ba5860b 100644 --- a/test/integration/fapi-key-create-policy-signed.int.c +++ b/test/integration/fapi-key-create-policy-signed.int.c @@ -8,24 +8,23 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include +#include // for BIO_free, BIO_new_mem_buf +#include // for EVP_DigestSignFinal, EVP_DigestSignInit +#include // for PEM_read_bio_PrivateKey +#include // for EVP_PKEY_CTX_set_rsa_padding, RSA_PKCS1... +#include // for uint8_t, uint32_t +#include // for NULL, fclose, fopen, fileno, fprintf +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strlen, strstr +#include // for read + +#include "test-fapi.h" // for ASSERT, pcr_reset, ASSERT_SIZE, test_in... +#include "tss2_common.h" // for TSS2_FAPI_RC_GENERAL_FAILURE, TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateKey, Fapi_Import +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST, TPM2_ALG_SHA256 -#include -#include -#include -#include - -#include "tss2_fapi.h" - -#include "test-fapi.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for SAFE_FREE, LOG_ERROR, goto_if_error #ifdef TEST_ECC const char *priv_pem = diff --git a/test/integration/fapi-key-create-primary-sign.int.c b/test/integration/fapi-key-create-primary-sign.int.c index d95c39e57..ebeba500a 100644 --- a/test/integration/fapi-key-create-primary-sign.int.c +++ b/test/integration/fapi-key-create-primary-sign.int.c @@ -8,19 +8,19 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include +#include // for json_object, json_object_put, json_object_to_js... +#include // for uint8_t +#include // for sprintf +#include // for NULL, size_t, EXIT_FAILURE, EXIT_SUC... +#include // for strlen, strncmp -#include "tss2_fapi.h" +#include "test-fapi.h" // for ASSERT, ASSERT_SIZE, fapi_profile +#include "tss2_common.h" // for BYTE, TSS2_RC, TSS2_FAPI_RC_BAD_VALUE +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_ChangeAuth, Fapi_C... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST -#include "test-fapi.h" -#include "fapi_util.h" -#include "fapi_int.h" - -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for SAFE_FREE, goto_if_error, UNUSED #define PASSWORD "abc" #define SIGN_TEMPLATE "sign,noDa" diff --git a/test/integration/fapi-key-create-sign-password-provision.int.c b/test/integration/fapi-key-create-sign-password-provision.int.c index 99c7841ae..e8e2c678a 100644 --- a/test/integration/fapi-key-create-sign-password-provision.int.c +++ b/test/integration/fapi-key-create-sign-password-provision.int.c @@ -8,19 +8,19 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include +#include // for uint8_t +#include // for NULL, fopen, fclose, fileno, fprintf +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strlen, strstr, strncmp +#include // for read -#include "tss2_fapi.h" +#include "test-fapi.h" // for ASSERT, pcr_reset, ASSERT_SIZE, fapi_pr... +#include "tss2_common.h" // for TSS2_RC, BYTE, TSS2_FAPI_RC_BAD_VALUE +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_ChangeAuth, Fapi_Crea... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST -#include "test-fapi.h" -#include "fapi_util.h" -#include "fapi_int.h" - -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_ERROR #define PASSWORD "abc" #define SIGN_TEMPLATE "sign,noDa" diff --git a/test/integration/fapi-key-create-sign-policy-provision.int.c b/test/integration/fapi-key-create-sign-policy-provision.int.c index eddc1dedd..d68783c60 100644 --- a/test/integration/fapi-key-create-sign-policy-provision.int.c +++ b/test/integration/fapi-key-create-sign-policy-provision.int.c @@ -8,15 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include +#include // for uint8_t +#include // for NULL, size_t, EXIT_FAILURE, EXIT_SUCCESS +#include // for strlen, strncmp -#include "tss2_fapi.h" +#include "test-fapi.h" // for ASSERT, ASSERT_SIZE, fapi_profile, test... +#include "tss2_common.h" // for TSS2_RC, BYTE, TSS2_FAPI_RC_BAD_VALUE +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateKey, Fapi_GetTp... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST -#include "test-fapi.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for SAFE_FREE, goto_if_error, UNUSED, LOG_INFO #define PASSWORD NULL #define SIGN_TEMPLATE "sign,noDa" diff --git a/test/integration/fapi-key-create-sign.int.c b/test/integration/fapi-key-create-sign.int.c index a16983f33..251b4c18d 100644 --- a/test/integration/fapi-key-create-sign.int.c +++ b/test/integration/fapi-key-create-sign.int.c @@ -8,19 +8,20 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include +#include // for json_object, json_object_put, json_object_to_js... +#include // for uint8_t +#include // for sprintf +#include // for NULL, size_t, EXIT_FAILURE, EXIT_SUC... +#include // for strlen, strncmp + +#include "ifapi_macros.h" // for goto_if_null2 +#include "test-fapi.h" // for ASSERT, FAPI_PROFILE, cmp_strtokens +#include "tss2_common.h" // for BYTE, TSS2_FAPI_RC_MEMORY, TSS2_FAPI... +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_GetDescription +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST -#include "tss2_fapi.h" - -#include "test-fapi.h" -#include "fapi_util.h" -#include "fapi_int.h" - -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_INFO #define PASSWORD "abc" #define SIGN_TEMPLATE "sign,noDa" diff --git a/test/integration/fapi-key-create2-sign.int.c b/test/integration/fapi-key-create2-sign.int.c index 99435187d..0e66701e0 100644 --- a/test/integration/fapi-key-create2-sign.int.c +++ b/test/integration/fapi-key-create2-sign.int.c @@ -8,19 +8,22 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include +#include // for json_object, json_object_put, json_object_to_js... +#include // for bool, false, true +#include // for uint8_t +#include // for NULL, size_t, fopen, fclose, fileno +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strcmp, strlen, strncmp +#include // for read + +#include "ifapi_macros.h" // for goto_if_null2 +#include "test-fapi.h" // for ASSERT, pcr_reset, ASSERT_SIZE, FAPI... +#include "tss2_common.h" // for BYTE, TSS2_FAPI_RC_GENERAL_FAILURE +#include "tss2_fapi.h" // for Fapi_CreateKey, Fapi_Import, Fapi_Ve... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST -#include "tss2_fapi.h" - -#include "test-fapi.h" -#include "fapi_util.h" -#include "fapi_int.h" - -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_ERROR #define PASSWORD "abc" #define SIGN_TEMPLATE "sign,noDa" diff --git a/test/integration/fapi-nv-authorizenv-cphash.int.c b/test/integration/fapi-nv-authorizenv-cphash.int.c index d01d9b79e..0fb6f772e 100644 --- a/test/integration/fapi-nv-authorizenv-cphash.int.c +++ b/test/integration/fapi-nv-authorizenv-cphash.int.c @@ -8,19 +8,21 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include +#include // for uint8_t +#include // for NULL, fclose, fileno, fopen, FILE, size_t +#include // for free, EXIT_FAILURE, EXIT_SUCCESS +#include // for memset, strcmp +#include // for read + +#include "test-fapi.h" // for FAPI_PROFILE, ASSERT, CHECK_JSON_FIELDS +#include "tss2_common.h" // for TSS2_RC, TSS2_FAPI_RC_NOT_IMPLEMENTED +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_Finalize, Esys_GetCa... +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateNv, Fapi_Import +#include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT +#include "tss2_tpm2_types.h" // for TPMS_CAPABILITY_DATA, TPM2_CAP_COMMANDS -#include "tss2_fapi.h" -#include "tss2_esys.h" - -#include "test-fapi.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, SAFE_FREE static TSS2_RC check_tpm_cmd(FAPI_CONTEXT *context, TPM2_CC command_code) diff --git a/test/integration/fapi-nv-extend.int.c b/test/integration/fapi-nv-extend.int.c index 0a7099f2a..99679c986 100644 --- a/test/integration/fapi-nv-extend.int.c +++ b/test/integration/fapi-nv-extend.int.c @@ -8,17 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include +#include // for uint8_t +#include // for NULL, fprintf, stderr, size_t +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for strcmp, strlen -#include "tss2_fapi.h" +#include "tss2_common.h" // for TSS2_RC, TSS2_FAPI_RC_BAD_VALUE, TSS2_RC_SU... +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_NvExtend, Fapi_CreateNv #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" -#include "test-fapi.h" +#include "test-fapi.h" // for ASSERT, CHECK_JSON_FIELDS, FAPI_PROFILE +#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_INFO, UNUSED #define NV_SIZE 32 diff --git a/test/integration/fapi-nv-increment.int.c b/test/integration/fapi-nv-increment.int.c index 900553e15..72eb7d60e 100644 --- a/test/integration/fapi-nv-increment.int.c +++ b/test/integration/fapi-nv-increment.int.c @@ -8,18 +8,16 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include +#include // for fopen, NULL, fclose, fileno, fseek, ftell +#include // for malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for read -#include "tss2_fapi.h" +#include "test-fapi.h" // for pcr_reset, test_invoke_fapi +#include "tss2_common.h" // for TSS2_RC, TSS2_FAPI_RC_BAD_VALUE, TSS2_FAPI_... +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateNv, Fapi_NvIncrement -#include "test-fapi.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, SAFE_FREE, UNUSED #define PASSWORD "abc" diff --git a/test/integration/fapi-nv-ordinary.int.c b/test/integration/fapi-nv-ordinary.int.c index 54b4f15fe..26dbba759 100644 --- a/test/integration/fapi-nv-ordinary.int.c +++ b/test/integration/fapi-nv-ordinary.int.c @@ -8,18 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include +#include // for uint8_t +#include // for NULL, fopen, fclose, fileno, fseek, ftell +#include // for exit, malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strlen, memcmp, strcmp, memset +#include // for read -#include "tss2_fapi.h" +#include "test-fapi.h" // for ASSERT, pcr_reset, test_invoke_fapi +#include "tss2_common.h" // for TSS2_RC, TSS2_FAPI_RC_BAD_VALUE, TSS2_RC_SU... +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateNv, Fapi_NvRead -#include "test-fapi.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_ERROR, UNUSED #define NV_SIZE 1200 diff --git a/test/integration/fapi-nv-set-bits.int.c b/test/integration/fapi-nv-set-bits.int.c index 7c893315f..3833af7d9 100644 --- a/test/integration/fapi-nv-set-bits.int.c +++ b/test/integration/fapi-nv-set-bits.int.c @@ -8,17 +8,16 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include +#include // for uint64_t +#include // for NULL +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_fapi.h" -#include "test-fapi.h" +#include "test-fapi.h" // for test_invoke_fapi +#include "tss2_common.h" // for TSS2_RC, TSS2_FAPI_RC_ALREADY_PROVISIONED +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateNv, Fapi_NvSetBits #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, UNUSED, LOG_ERROR, return_error #define PASSWORD "abc" diff --git a/test/integration/fapi-nv-written-policy.int.c b/test/integration/fapi-nv-written-policy.int.c index 79fda1a67..35880a633 100644 --- a/test/integration/fapi-nv-written-policy.int.c +++ b/test/integration/fapi-nv-written-policy.int.c @@ -8,18 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include +#include // for uint8_t +#include // for NULL, fopen, fclose, fileno, fseek, ftell +#include // for calloc, malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp +#include // for read -#include "tss2_fapi.h" -#include "test-fapi.h" +#include "test-fapi.h" // for ASSERT, test_invoke_fapi +#include "tss2_common.h" // for TSS2_FAPI_RC_MEMORY, TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateNv, Fapi_GetAppData #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_ERROR, goto_i... #define NV_SIZE 10 #define APP_DATA_SIZE 10*1024*1024 diff --git a/test/integration/fapi-pcr-test.int.c b/test/integration/fapi-pcr-test.int.c index d26c0a5e2..ba2af95b4 100644 --- a/test/integration/fapi-pcr-test.int.c +++ b/test/integration/fapi-pcr-test.int.c @@ -8,18 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include +#include // for uint8_t +#include // for NULL, fprintf, size_t, stderr +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for strlen, strcmp -#include "tss2_fapi.h" +#include "ifapi_eventlog.h" // for CONTENT, CONTENT_TYPE +#include "test-fapi.h" // for ASSERT, pcr_reset, ASSERT_SIZE, CHECK_JS... +#include "tss2_common.h" // for TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_PcrRead, Fapi_PcrExtend -#include "test-fapi.h" -#include "ifapi_eventlog.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_ERROR, LOG... #define EVENT_SIZE 10 diff --git a/test/integration/fapi-platform-certificates.int.c b/test/integration/fapi-platform-certificates.int.c index a28acabb2..c1122fd19 100644 --- a/test/integration/fapi-platform-certificates.int.c +++ b/test/integration/fapi-platform-certificates.int.c @@ -8,17 +8,19 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for bool, false, true +#include // for uint8_t +#include // for NULL, size_t, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" -#include "tss2_fapi.h" - -#include "test-fapi.h" -#include "fapi_util.h" +#include "fapi_int.h" // for FAPI_CONTEXT +#include "test-fapi.h" // for ASSERT, EXIT_SKIP, test_invoke_fapi +#include "tss2_common.h" // for INT32, TSS2_FAPI_RC_NO_CERT, TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_NV_UndefineSpace +#include "tss2_fapi.h" // for FAPI_CONTEXT, Fapi_Delete, Fapi_Free +#include "tss2_tpm2_types.h" // for TPM2B_NV_PUBLIC, TPMS_CAPABILITY_DATA #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_INFO, number_rc, LOG... #define MIN_PLATFORM_CERT_HANDLE 0x01C08000 #define CERTIFICATE_SIZE 15 diff --git a/test/integration/fapi-policy-or-nv-read-write.int.c b/test/integration/fapi-policy-or-nv-read-write.int.c index 8d6a9dcc2..386c30c1f 100644 --- a/test/integration/fapi-policy-or-nv-read-write.int.c +++ b/test/integration/fapi-policy-or-nv-read-write.int.c @@ -8,22 +8,20 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include -#include - -#include "tss2_fapi.h" - -#include "test-fapi.h" +#include // for assert +#include // for bool, false, true +#include // for uint8_t +#include // for NULL, fopen, fclose, fileno, fseek, ftell +#include // for EXIT_FAILURE, malloc, EXIT_SUCCESS +#include // for strcmp, memcmp +#include // for read + +#include "test-fapi.h" // for pcr_reset, test_invoke_fapi +#include "tss2_common.h" // for TSS2_RC, TSS2_FAPI_RC_BAD_VALUE, TSS2_RC_SU... +#include "tss2_fapi.h" // for Fapi_CreateNv, Fapi_Delete, Fapi_Import #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, UNUSED, SAFE_FREE #define PASSWORD1 "abc" #define PASSWORD2 "def" diff --git a/test/integration/fapi-provisioning-cert-error.int.c b/test/integration/fapi-provisioning-cert-error.int.c index 5f9e373c3..91140d243 100644 --- a/test/integration/fapi-provisioning-cert-error.int.c +++ b/test/integration/fapi-provisioning-cert-error.int.c @@ -5,25 +5,17 @@ *******************************************************************************/ #ifdef HAVE_CONFIG_H -#include "config.h" // IWYU pragma: keep +#include "config.h" // for FAPI_TEST_EK_CERT_LESS #endif -#include +#include // for setenv, NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_fapi.h" -#include "tss2_esys.h" +#include "test-fapi.h" // for EXIT_SKIP, test_invoke_fapi +#include "tss2_common.h" // for TSS2_FAPI_RC_GENERAL_FAILURE, TSS2_RC +#include "tss2_fapi.h" // for Fapi_Provision, FAPI_CONTEXT -#include "test-fapi.h" -#include "fapi_util.h" -#include "fapi_int.h" -#include "tss2_esys.h" - -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" -#include "tss2_mu.h" -#include "fapi_int.h" +#include "util/log.h" // for LOG_ERROR /** Test the FAPI cleanup in an error case. diff --git a/test/integration/fapi-provisioning-error.int.c b/test/integration/fapi-provisioning-error.int.c index 4f82f2b65..c7060c80e 100644 --- a/test/integration/fapi-provisioning-error.int.c +++ b/test/integration/fapi-provisioning-error.int.c @@ -8,22 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_fapi.h" -#include "tss2_esys.h" +#include "test-fapi.h" // for test_invoke_fapi +#include "tss2_common.h" // for TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_Provision, FAPI_CONTEXT +#include "tss2_tpm2_types.h" // for TPM2_RC_N_MASK, TPM2_RC_NV_DEFINED -#include "test-fapi.h" -#include "fapi_util.h" -#include "fapi_int.h" -#include "tss2_esys.h" - -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" -#include "tss2_mu.h" -#include "fapi_int.h" +#include "util/log.h" // for goto_if_error /** Test the FAPI cleanup in an error case. diff --git a/test/integration/fapi-provisioning-with-template.int.c b/test/integration/fapi-provisioning-with-template.int.c index 00b00507d..e4e019840 100644 --- a/test/integration/fapi-provisioning-with-template.int.c +++ b/test/integration/fapi-provisioning-with-template.int.c @@ -3,20 +3,23 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include +#include // for bool, false, true +#include // for NULL, fopen, fclose, fileno, fseek, ftell +#include // for getenv, malloc, EXIT_FAILURE, EXIT_SUCCESS +#include // for strcmp, strstr +#include // for read -#include "tss2_esys.h" -#include "tss2_fapi.h" -#include "tss2_mu.h" +#include "test-fapi.h" // for EXIT_SKIP, test_invoke_fapi +#include "tss2_common.h" // for BYTE, TSS2_RC_SUCCESS, TSS2_FAPI_RC_NO_... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_NV_UndefineSpace +#include "tss2_fapi.h" // for Fapi_Provision, Fapi_Delete, Fapi_GetTcti +#include "tss2_mu.h" // for Tss2_MU_TPMT_PUBLIC_Marshal +#include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT +#include "tss2_tpm2_types.h" // for TPM2_HANDLE, TPM2B_MAX_NV_BUFFER, TPM2B... -#include "test-fapi.h" -#include "esys_iutil.h" #define LOGMODULE test #define LOGDEFAULT LOGLEVEL_INFO -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOGLEVEL_INFO, goto_if_error, LOG_ERROR /** This test is intended to test Fapi_Provision with a template and a nonce * stored in NV ram. diff --git a/test/integration/fapi-quote-destructive-eventlog.int.c b/test/integration/fapi-quote-destructive-eventlog.int.c index 5c721ead6..7d199d265 100644 --- a/test/integration/fapi-quote-destructive-eventlog.int.c +++ b/test/integration/fapi-quote-destructive-eventlog.int.c @@ -7,20 +7,21 @@ #ifdef HAVE_CONFIG_H #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include +#include // for json_object, json_object_put, json_object_to_js... +#include // for bool +#include // for uint8_t, uint32_t +#include // for NULL, size_t +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for strlen, strdup + +#include "test-fapi.h" // for ASSERT, ASSERT_SIZE, pcr_bank_sha1_... +#include "tss2_common.h" // for TSS2_FAPI_RC_MEMORY, TSS2_FAPI_RC_G... +#include "tss2_fapi.h" // for Fapi_PcrExtend, Fapi_Delete, Fapi_V... +#include "tss2_tpm2_types.h" // for TPM2_ALG_SHA1, TPM2_ALG_SHA256, TPM... -#include "tss2_fapi.h" - -#include "test-fapi.h" #define LOGMODULE test #define LOGDEFAULT LOGLEVEL_INFO -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOGLEVEL_INFO, SAFE_FREE, goto_if_e... #define EVENT_SIZE 10 diff --git a/test/integration/fapi-quote-destructive.int.c b/test/integration/fapi-quote-destructive.int.c index 8ab687f68..af3232058 100644 --- a/test/integration/fapi-quote-destructive.int.c +++ b/test/integration/fapi-quote-destructive.int.c @@ -7,19 +7,18 @@ #ifdef HAVE_CONFIG_H #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include +#include // for bool +#include // for uint8_t, uint32_t +#include // for NULL, size_t +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for strlen -#include "tss2_fapi.h" +#include "test-fapi.h" // for ASSERT, pcr_reset, ASSERT_SIZE, EXIT_SKIP +#include "tss2_common.h" // for TSS2_RC +#include "tss2_fapi.h" // for Fapi_PcrExtend, Fapi_Delete, Fapi_CreateKey -#include "test-fapi.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_INFO #define EVENT_SIZE 10 diff --git a/test/integration/fapi-quote-with-primary.int.c b/test/integration/fapi-quote-with-primary.int.c index 3f1b98391..f102d839f 100644 --- a/test/integration/fapi-quote-with-primary.int.c +++ b/test/integration/fapi-quote-with-primary.int.c @@ -7,23 +7,19 @@ #ifdef HAVE_CONFIG_H #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "tss2_fapi.h" - -#include "test-fapi.h" -#include "ifapi_eventlog.h" +#include // for json_object, json_object_put, json_object_to_js... +#include // for uint8_t, uint32_t +#include // for NULL, size_t +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for strlen, strdup + +#include "ifapi_eventlog.h" // for CONTENT, CONTENT_TYPE +#include "test-fapi.h" // for ASSERT, ASSERT_SIZE, pcr_reset, CHE... +#include "tss2_common.h" // for TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateKey, Fapi_E... + #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_INFO #define EVENT_SIZE 10 diff --git a/test/integration/fapi-quote.int.c b/test/integration/fapi-quote.int.c index e1245e1f2..9adb0dacd 100644 --- a/test/integration/fapi-quote.int.c +++ b/test/integration/fapi-quote.int.c @@ -7,23 +7,20 @@ #ifdef HAVE_CONFIG_H #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "tss2_fapi.h" - -#include "test-fapi.h" -#include "ifapi_eventlog.h" +#include // for json_object, json_object_put, json_object_to_js... +#include // for uint8_t, uint32_t +#include // for NULL, size_t +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for strlen, strdup + +#include "ifapi_eventlog.h" // for CONTENT, CONTENT_TYPE +#include "test-fapi.h" // for ASSERT, ASSERT_SIZE, cmp_strtokens +#include "tss2_common.h" // for TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_VerifyQuote, Fapi... +#include "tss2_tpm2_types.h" // for TPM2_RC_SUCCESS + #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_INFO #define EVENT_SIZE 10 diff --git a/test/integration/fapi-second-provisioning.int.c b/test/integration/fapi-second-provisioning.int.c index 6c15368b3..07cecbf57 100644 --- a/test/integration/fapi-second-provisioning.int.c +++ b/test/integration/fapi-second-provisioning.int.c @@ -8,22 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for strcmp, strncmp -#include "tss2_fapi.h" -#include "tss2_esys.h" +#include "test-fapi.h" // for init_fapi, FAPI_PROFILE, pcr_reset, EXIT_SKIP +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_FAPI_RC_AUTH... +#include "tss2_fapi.h" // for Fapi_Provision, Fapi_Delete, Fapi_Finalize -#include "test-fapi.h" -#include "fapi_util.h" -#include "fapi_int.h" -#include "tss2_esys.h" - -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" -#include "tss2_mu.h" -#include "fapi_int.h" +#include "util/log.h" // for goto_if_error, UNUSED, LOG_ERROR, LOG_WARNING #define PASSWORD "abc" diff --git a/test/integration/fapi-unseal.int.c b/test/integration/fapi-unseal.int.c index 886e7535a..458c62079 100644 --- a/test/integration/fapi-unseal.int.c +++ b/test/integration/fapi-unseal.int.c @@ -8,16 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include +#include // for uint8_t +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS, size_t +#include // for memcmp -#include "tss2_esys.h" -#include "tss2_fapi.h" +#include "test-fapi.h" // for ASSERT, test_invoke_fapi +#include "tss2_common.h" // for BYTE, TSS2_FAPI_RC_BAD_PATH, TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateSeal, Fapi_Unseal +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST -#include "test-fapi.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_ERROR /** Test the FAPI functions for sealing. diff --git a/test/integration/main-fapi.c b/test/integration/main-fapi.c index 6e3d32e81..683ac7be5 100644 --- a/test/integration/main-fapi.c +++ b/test/integration/main-fapi.c @@ -5,41 +5,54 @@ *******************************************************************************/ #ifdef HAVE_CONFIG_H -#include "config.h" // IWYU pragma: keep +#include "config.h" // for FAPI_TEST_EK_CERT_LESS #endif -#include -#include -#include -#include -#include -#include - -#include -#include -#include +#include // for PRIx32, int64_t, PRId64, PRIu16 +#include // for json_object, json_object_put, json_object_to_js... +#include // for ASN1_INTEGER_free, ASN1_INTEGER_new +#include // for BIO_free_all, BIO_new, BIO_s_file +#include // for BN_free, BN_bin2bn, BN_new +#include // for buf_mem_st +#include // for OPENSSL_free +#include // for EC_GROUP_free, EC_GROUP_new_by_curv... +#include // for EVP_PKEY_free, EVP_PKEY_CTX_free +#include // for NID_sm2, NID_X9_62_prime192v1, NID_... +#include // for OBJ_nid2sn +#include // for OPENSSL_VERSION_NUMBER +#include // for PEM_read_bio_PrivateKey, PEM_read_b... +#include // for EVP_PKEY_CTX_set_rsa_keygen_bits +#include // for X509_REQ_free, X509_free, X509_gmti... +#include // for false, bool, true +#include // for NULL, asprintf, size_t, perror, sscanf +#include // for free, calloc, setenv, getenv, malloc +#include // for strtok_r, memcpy, strdup, strcmp +#include // for stat #if OPENSSL_VERSION_NUMBER < 0x30000000L #include +#include "ifapi_macros.h" // for goto_if_null2 #else -#include -#include -#include +#include // for OSSL_PKEY_PARAM_GROUP_NAME, OSSL_PK... +#include // for OSSL_PARAM_BLD_free, OSSL_PARAM_BLD... +#include // for OSSL_PARAM_free +#include // for EVP_PKEY, X509, BIGNUM, BUF_MEM #endif -#include -#include - -#include "tss2_esys.h" -#include "tss2_fapi.h" -#include "test-fapi.h" -#include "fapi_int.h" -#include "tss2_rc.h" +#include // for ERR_error_string_n, ERR_get_error + +#include "fapi_int.h" // for OSSL_FREE, FAPI_CONTEXT +#include "test-common.h" // for TSS2_TEST_FAPI_CONTEXT, EXIT_ERROR +#include "test-fapi.h" // for test_invoke_fapi, ASSERT, FAPI_PROFILE +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, TSS2_FAPI... +#include "tss2_esys.h" // for Esys_Finalize, Esys_Initialize, ESY... +#include "tss2_fapi.h" // for Fapi_GetTcti, FAPI_CONTEXT, Fapi_Fi... +#include "tss2_rc.h" // for Tss2_RC_Decode +#include "tss2_sys.h" // for TSS2_SYS_CONTEXT, Tss2_Sys_CreatePr... +#include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT +#include "tss2_tpm2_types.h" // for TPM2B_MAX_NV_BUFFER, TPM2B_PUBLIC #define LOGDEFAULT LOGLEVEL_INFO #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" - -#include "test-common.h" +#include "util/log.h" // for LOGLEVEL_INFO, LOG_ERROR, SAFE_FREE #if OPENSSL_VERSION_NUMBER >= 0x10101000L #define EC_POINT_set_affine_coordinates_tss(group, tpm_pub_key, bn_x, bn_y, dmy) \ diff --git a/test/integration/policy-execute.int.c b/test/integration/policy-execute.int.c index 830fecbcc..7b7e60a0e 100644 --- a/test/integration/policy-execute.int.c +++ b/test/integration/policy-execute.int.c @@ -5,7 +5,7 @@ *******************************************************************************/ #ifdef HAVE_CONFIG_H -#include "config.h" // IWYU pragma: keep +#include "config.h" // for NDEBUG #endif /* @@ -17,31 +17,31 @@ #undef NDEBUG #endif -#include -#include -#include -#include -#include +#include // for assert +#include // for PATH_MAX +#include // for BIO_free, BIO_new_mem_buf +#include // for BN_bn2bin, BN_num_bytes +#include // for ECDSA_SIG_free, ECDSA_SIG_... +#include // for EVP_DigestSignFinal, EVP_P... +#include // for PEM_read_bio_PUBKEY, PEM_r... +#include // for EVP_PKEY_CTX_set_rsa_padding +#include // for false, bool, true +#include // for uint8_t +#include // for NULL, size_t, fclose, fopen +#include // for calloc, free, malloc, EXIT... +#include // for memcpy, strcmp, strlen + +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_PolicyG... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST, TPMS_PCR_SEL... -#if defined(__linux__) -#include -#endif - -#include -#include -#include -#include - -#include "tss2_esys.h" - -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" +#include "test/data/test-fapi-policies.h" // for policy_digests, _test_fapi... +#include "tss2_policy.h" // for TSS2_POLICY_PCR_SELECTION +#include "util/log.h" // for LOG_ERROR, goto_if_error +#include "util/tss2_endian.h" // for HOST_TO_BE_32 -#include "tss2_policy.h" -#include "test/data/test-fapi-policies.h" -#include "util/aux_util.h" -#include "util/tss2_endian.h" +struct mycb_data; #define TEST_LAYER TSS2_RC_LAYER(0) #define TSS2_RC_TEST_FAIL ((TSS2_RC)(TEST_LAYER | \