From a838d3396404bfebc61a26e99bbac41694cdde01 Mon Sep 17 00:00:00 2001 From: Andreas Fuchs Date: Thu, 2 May 2024 16:01:05 +0200 Subject: [PATCH] IWYU: Convert ESYS tests Signed-off-by: Andreas Fuchs --- test/integration/esys-act-set-timeout.int.c | 12 +++++------ test/integration/esys-audit.int.c | 12 +++++------ .../integration/esys-auto-session-flags.int.c | 12 ++++++----- test/integration/esys-certify-creation.int.c | 10 ++++----- test/integration/esys-certify.int.c | 10 ++++----- test/integration/esys-certifyX509.int.c | 12 +++++------ test/integration/esys-change-eps.int.c | 12 +++++------ .../esys-check-auth-with-trailing-zero.int.c | 10 ++++----- test/integration/esys-clear-control.int.c | 12 +++++------ test/integration/esys-clear.int.c | 13 ++++++------ test/integration/esys-clockset.int.c | 12 +++++------ test/integration/esys-commit.int.c | 13 ++++++------ test/integration/esys-create-fail.int.c | 15 +++++++------ .../esys-create-password-auth.int.c | 13 +++++++----- .../integration/esys-create-policy-auth.int.c | 10 ++++----- .../esys-create-primary-hmac.int.c | 13 +++++++----- .../esys-create-session-auth.int.c | 13 +++++++----- test/integration/esys-createloaded.int.c | 17 ++++++++------- test/integration/esys-crypto.int.c | 12 +++++------ test/integration/esys-duplicate.int.c | 16 +++++++------- test/integration/esys-ecc-parameters.int.c | 12 +++++------ test/integration/esys-ecdh-keygen.int.c | 11 +++++----- test/integration/esys-ecdh-zgen.int.c | 11 +++++----- test/integration/esys-encrypt-decrypt.int.c | 13 ++++++------ .../esys-event-sequence-complete.int.c | 10 ++++----- .../esys-evict-control-serialization.int.c | 14 ++++++++----- test/integration/esys-field-upgrade.int.c | 12 +++++------ test/integration/esys-firmware-read.int.c | 12 +++++------ .../integration/esys-get-capability-act.int.c | 14 ++++++------- test/integration/esys-get-capability.int.c | 10 ++++----- test/integration/esys-get-random.int.c | 10 ++++----- test/integration/esys-get-time.int.c | 15 +++++++------ test/integration/esys-hash.int.c | 10 ++++----- test/integration/esys-hashsequencestart.int.c | 11 +++++----- test/integration/esys-hierarchy-control.int.c | 12 +++++------ .../esys-hierarchychangeauth.int.c | 11 +++++----- test/integration/esys-hmac.int.c | 13 ++++++------ test/integration/esys-hmacsequencestart.int.c | 11 +++++----- test/integration/esys-import.int.c | 14 +++++++------ test/integration/esys-lock.int.c | 12 +++++------ test/integration/esys-mac.int.c | 11 +++++----- test/integration/esys-make-credential.int.c | 14 ++++++++----- test/integration/esys-nv-certify.int.c | 12 +++++------ test/integration/esys-nv-ram-counter.int.c | 14 ++++++++----- .../esys-nv-ram-extend-index.int.c | 14 ++++++++----- .../esys-nv-ram-ordinary-index.int.c | 16 ++++++++------ test/integration/esys-nv-ram-set-bits.int.c | 14 ++++++++----- test/integration/esys-object-changeauth.int.c | 10 ++++----- test/integration/esys-pcr-auth-value.int.c | 12 +++++------ test/integration/esys-pcr-basic.int.c | 12 +++++------ .../esys-policy-authorize-nv-opt.int.c | 15 ++++++------- test/integration/esys-policy-authorize.int.c | 11 +++++----- .../esys-policy-nv-changeauth.int.c | 10 ++++----- .../esys-policy-nv-undefine-special.int.c | 12 +++++------ test/integration/esys-policy-password.int.c | 12 +++++------ .../esys-policy-physical-presence-opt.int.c | 15 ++++++------- test/integration/esys-policy-regression.int.c | 15 +++++++------ .../esys-policy-template-opt.int.c | 15 ++++++------- test/integration/esys-policy-ticket.int.c | 14 ++++++------- test/integration/esys-pp-commands.int.c | 12 +++++------ test/integration/esys-quote.int.c | 13 +++++++----- .../esys-rsa-encrypt-decrypt.int.c | 14 ++++++++----- .../esys-save-and-load-context.int.c | 13 +++++++----- .../integration/esys-session-attributes.int.c | 13 ++++++------ test/integration/esys-set-algorithm-set.int.c | 12 +++++------ test/integration/esys-stir-random.int.c | 10 ++++----- test/integration/esys-testparms.int.c | 10 ++++----- test/integration/esys-tpm-clear-auth.int.c | 12 +++++------ test/integration/esys-tpm-tests.int.c | 11 +++++----- .../esys-tr-fromTpmPublic-key.int.c | 11 +++++----- .../esys-tr-fromTpmPublic-nv.int.c | 11 +++++----- .../esys-tr-fromTpmPublic-session.int.c | 11 +++++----- .../esys-tr-getName-hierarchy.int.c | 13 ++++++------ test/integration/esys-tr-getName.int.c | 15 ++++++------- .../esys-tr-getTpmHandle-key.int.c | 10 ++++----- .../integration/esys-tr-getTpmHandle-nv.int.c | 10 ++++----- .../esys-unseal-password-auth.int.c | 21 +++++++++---------- test/integration/esys-verify-signature.int.c | 11 +++++----- test/integration/esys-zgen-2phase.int.c | 13 ++++++------ test/integration/main-esys.c | 17 ++++----------- test/unit/esys-crypto.c | 1 - 81 files changed, 533 insertions(+), 466 deletions(-) diff --git a/test/integration/esys-act-set-timeout.int.c b/test/integration/esys-act-set-timeout.int.c index 92e59f037..f6e6fe2a3 100644 --- a/test/integration/esys-act-set-timeout.int.c +++ b/test/integration/esys-act-set-timeout.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_RESMGR_R... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_FlushContext, Esys_A... +#include "tss2_tpm2_types.h" // for TPM2_RC_COMMAND_CODE, TPM2B_NONCE, TPM2... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** Test of the ESAPI function Esys_ACT_SetTimeout. * diff --git a/test/integration/esys-audit.int.c b/test/integration/esys-audit.int.c index 4ade09bc6..06d2160a0 100644 --- a/test/integration/esys-audit.int.c +++ b/test/integration/esys-audit.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC_SUCCESS, UINT32, TSS2_RC, TSS2_... +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2_ALG_SHA256, TPM2_ALG_NULL, TPM2_RC... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_WARNING /** This test is intended to test the ESYS audit commands. * diff --git a/test/integration/esys-auto-session-flags.int.c b/test/integration/esys-auto-session-flags.int.c index ef272e751..20a0b6cd6 100644 --- a/test/integration/esys-auto-session-flags.int.c +++ b/test/integration/esys-auto-session-flags.int.c @@ -8,12 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include "tss2_esys.h" -#include "esys_iutil.h" +#include // for free, EXIT_FAILURE, EXIT_SUCCESS + +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_ESYS_RC_GENERAL_F... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_FlushContext, Esys_S... +#include "tss2_tpm2_types.h" // for TPM2B_MAX_NV_BUFFER, TPM2_ALG_SHA256 + #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** This test is intended to test auto adjust and restore session flags in ESYS * diff --git a/test/integration/esys-certify-creation.int.c b/test/integration/esys-certify-creation.int.c index 1ba382a33..caa7d4d28 100644 --- a/test/integration/esys-certify-creation.int.c +++ b/test/integration/esys-certify-creation.int.c @@ -8,14 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_AUTH, TPM2B_DATA, TPM2B_PUBLIC -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO /** This test is intended to test the command Esys_CertifyCreation. * diff --git a/test/integration/esys-certify.int.c b/test/integration/esys-certify.int.c index a9d263e50..0853237e5 100644 --- a/test/integration/esys-certify.int.c +++ b/test/integration/esys-certify.int.c @@ -8,14 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for Esys_Free, Esys_FlushContext, ESYS_TR_NONE +#include "tss2_tpm2_types.h" // for TPM2B_AUTH, TPM2B_DATA, TPM2B_PUBLIC -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO /** This test is intended to test the command Esys_Certify. * diff --git a/test/integration/esys-certifyX509.int.c b/test/integration/esys-certifyX509.int.c index 3885c673a..a53a94d30 100644 --- a/test/integration/esys-certifyX509.int.c +++ b/test/integration/esys-certifyX509.int.c @@ -9,15 +9,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_RESMGR_R... +#include "tss2_esys.h" // for Esys_Free, Esys_FlushContext, ESYS_TR_NONE +#include "tss2_tpm2_types.h" // for TPM2_ALG_SHA256, TPM2_RC_COMMAND_CODE -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO /** This test is intended to test the command Esys_CertifyX509. * diff --git a/test/integration/esys-change-eps.int.c b/test/integration/esys-change-eps.int.c index 4a17f7271..e772154e5 100644 --- a/test/integration/esys-change-eps.int.c +++ b/test/integration/esys-change-eps.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC, TSS2_RESMGR_RC_LAYER, TSS2_RES... +#include "tss2_esys.h" // for Esys_ChangeEPS, ESYS_CONTEXT, ESYS_TR_NONE +#include "tss2_tpm2_types.h" // for TPM2_RC_COMMAND_CODE, TPM2_RC_BAD_AUTH -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOG_WARNING, goto_if_error, number_rc /** Test the ESYS function Esys_ChangeEPS. * diff --git a/test/integration/esys-check-auth-with-trailing-zero.int.c b/test/integration/esys-check-auth-with-trailing-zero.int.c index 21cfe9921..8ca90fdac 100644 --- a/test/integration/esys-check-auth-with-trailing-zero.int.c +++ b/test/integration/esys-check-auth-with-trailing-zero.int.c @@ -4,14 +4,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, UINT16 +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_Free, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2_ALG_SHA256, TPM2B_PUBLIC, TPM2B_AUTH -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** This test is intended to test trailing zeros in an auth value * diff --git a/test/integration/esys-clear-control.int.c b/test/integration/esys-clear-control.int.c index 9f52adf06..bbf9b4437 100644 --- a/test/integration/esys-clear-control.int.c +++ b/test/integration/esys-clear-control.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, goto_error_if_not_failed +#include "tss2_common.h" // for TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_ClearControl, ESYS_T... +#include "tss2_tpm2_types.h" // for TPM2_NO, TPM2_RC_BAD_AUTH, TPM2_RC_HIER... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, number_rc, LOG_WARNING /** Test the ESYS function Esys_ClearControl. * diff --git a/test/integration/esys-clear.int.c b/test/integration/esys-clear.int.c index c3b45edb8..ba15acb59 100644 --- a/test/integration/esys-clear.int.c +++ b/test/integration/esys-clear.int.c @@ -8,15 +8,16 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for memset -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC +#include "tss2_esys.h" // for Esys_Clear, ESYS_CONTEXT, ESYS_TR_NONE +#include "tss2_tpm2_types.h" // for TPM2_RC_BAD_AUTH -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOG_WARNING, goto_if_error, number_rc /** Test of the ESYS function Esys_Clear. * diff --git a/test/integration/esys-clockset.int.c b/test/integration/esys-clockset.int.c index 0416f9a62..8ae1e984d 100644 --- a/test/integration/esys-clockset.int.c +++ b/test/integration/esys-clockset.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS, NULL -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, TSS2_RESMGR_R... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_ClockRateAdjust, Esy... +#include "tss2_tpm2_types.h" // for TPM2_RC_AUTH_CONTEXT, TPMS_TIME_INFO -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_WARNING /** Test the ESYS function Esys_ClockSet and Esys_ReadClock. * diff --git a/test/integration/esys-commit.int.c b/test/integration/esys-commit.int.c index 96b3220e3..20d99b99f 100644 --- a/test/integration/esys-commit.int.c +++ b/test/integration/esys-commit.int.c @@ -8,15 +8,16 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memset -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, UINT16 +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_ECC_POINT, TPM2B_PUBLIC, TPM2_ALG... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO, LOG... /** This test is intended to test Esys_Commit. * based on an ECC key diff --git a/test/integration/esys-create-fail.int.c b/test/integration/esys-create-fail.int.c index f96fb48c8..b496627f9 100644 --- a/test/integration/esys-create-fail.int.c +++ b/test/integration/esys-create-fail.int.c @@ -8,15 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "test-esys.h" // for goto_error_if_not_failed, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_Create +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPM2B_SENSITIVE_CREATE -#include "test-esys.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, LOG_INFO, LOG_ERROR /** This test is intended to test password authentication. * diff --git a/test/integration/esys-create-password-auth.int.c b/test/integration/esys-create-password-auth.int.c index 6135f23ba..d30a666c6 100644 --- a/test/integration/esys-create-password-auth.int.c +++ b/test/integration/esys-create-password-auth.int.c @@ -8,14 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_SENSITIVE_CREATE, TPM2B_PUBLIC -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_INFO, LOG_ERROR /** This test is intended to test password authentication for the ESYS command * Create. diff --git a/test/integration/esys-create-policy-auth.int.c b/test/integration/esys-create-policy-auth.int.c index 32f65d513..0e3d0cfd3 100644 --- a/test/integration/esys-create-policy-auth.int.c +++ b/test/integration/esys-create-policy-auth.int.c @@ -4,14 +4,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_Free, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPM2_ALG_SHA256, TPM2B_SE... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO /** This test is intended to test policy authentication for the ESYS command * Create. diff --git a/test/integration/esys-create-primary-hmac.int.c b/test/integration/esys-create-primary-hmac.int.c index 6a7ac3c3e..d35a1a2fe 100644 --- a/test/integration/esys-create-primary-hmac.int.c +++ b/test/integration/esys-create-primary-hmac.int.c @@ -8,14 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, Esys_FlushContext, ESYS_TR_NONE +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPM2_ALG_NULL, TPM2_ALG_S... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO, MAY... /** This test is intended to test Esys_CreatePrimary with hmac verification. * diff --git a/test/integration/esys-create-session-auth.int.c b/test/integration/esys-create-session-auth.int.c index 48e8bb4a7..6f421137d 100644 --- a/test/integration/esys-create-session-auth.int.c +++ b/test/integration/esys-create-session-auth.int.c @@ -7,14 +7,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, free, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_SENSITIVE_CREATE, TPM2_ALG_SHA256 -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO /** This test is intended to test parameter encryption/decryption, session management, * hmac computation, and session key generation. diff --git a/test/integration/esys-createloaded.int.c b/test/integration/esys-createloaded.int.c index f49411abd..78e66975d 100644 --- a/test/integration/esys-createloaded.int.c +++ b/test/integration/esys-createloaded.int.c @@ -8,17 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include +#include // for bool, false +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS, size_t +#include // for memcmp, memset -#include "tss2_esys.h" -#include "tss2_mu.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, BYTE, TSS2_RE... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_FlushContext, Esys_Free +#include "tss2_mu.h" // for Tss2_MU_TPMT_PUBLIC_Marshal +#include "tss2_tpm2_types.h" // for TPM2B_NAME, TPM2_ALG_SHA256, TPM2B_AUTH -#include "esys_iutil.h" -#include "test-esys.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 static bool check_name(ESYS_CONTEXT * esys_context, ESYS_TR object_handle) { diff --git a/test/integration/esys-crypto.int.c b/test/integration/esys-crypto.int.c index 933c1f2c6..a2428c2c6 100644 --- a/test/integration/esys-crypto.int.c +++ b/test/integration/esys-crypto.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS, NULL +#include // for memcmp -#include "tss2_esys.h" -#include "esys_int.h" +#include "esys_int.h" // for ESYS_CONTEXT +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, TSS2_ESYS_RC_BAD_... +#include "tss2_esys.h" // for ESYS_CONTEXT, ESYS_CRYPTO_CALLBACKS, Esys_S... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOG_ERROR, xstr #define TEST_FN_PTR ((void *)0xBADC0DE) diff --git a/test/integration/esys-duplicate.int.c b/test/integration/esys-duplicate.int.c index 068d44a9f..e13c75017 100644 --- a/test/integration/esys-duplicate.int.c +++ b/test/integration/esys-duplicate.int.c @@ -8,16 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" -#include "tss2_mu.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, TSS2_RESMGR_R... +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPM2_ALG_AES, TPM2_ALG_CFB -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO, LOG... /** This test is intended to test the ESYS commands Duplicate and Rewrap. * diff --git a/test/integration/esys-ecc-parameters.int.c b/test/integration/esys-ecc-parameters.int.c index a0ee056c8..ff5d8c65e 100644 --- a/test/integration/esys-ecc-parameters.int.c +++ b/test/integration/esys-ecc-parameters.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_ECC_Parameters, ESYS... +#include "tss2_tpm2_types.h" // for TPM2_ECC_NIST_P256, TPM2_RC_1, TPM2_RC_... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for SAFE_FREE, LOG_WARNING, goto_if_error /** Test the ESYS function Esys_ECC_Parameters. * diff --git a/test/integration/esys-ecdh-keygen.int.c b/test/integration/esys-ecdh-keygen.int.c index 920e49ee1..a1e578645 100644 --- a/test/integration/esys-ecdh-keygen.int.c +++ b/test/integration/esys-ecdh-keygen.int.c @@ -8,14 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memset -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPM2_ALG_NULL, TPM2B_ECC_... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO /** This test is intended to test Esys_ECDH_KeyGen based on an ECC key * created with Esys_CreatePrimary. diff --git a/test/integration/esys-ecdh-zgen.int.c b/test/integration/esys-ecdh-zgen.int.c index 33b2fd450..fd1827394 100644 --- a/test/integration/esys-ecdh-zgen.int.c +++ b/test/integration/esys-ecdh-zgen.int.c @@ -8,14 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memset -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPM2_ALG_SHA256, TPM2B_EC... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO /** This test is intended to test Esys_ECDH_ZGen. * based on an ECC key diff --git a/test/integration/esys-encrypt-decrypt.int.c b/test/integration/esys-encrypt-decrypt.int.c index e441f965f..e96314ee2 100644 --- a/test/integration/esys-encrypt-decrypt.int.c +++ b/test/integration/esys-encrypt-decrypt.int.c @@ -8,15 +8,16 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for BYTE, TSS2_RC_SUCCESS, TSS2_RESMGR_RC_L... +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_MAX_BUFFER, TPM2_RC_COMMAND_CODE -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO, LOG... /** This test is intended to test the ESYS function Esys_EncryptDecrypt. * diff --git a/test/integration/esys-event-sequence-complete.int.c b/test/integration/esys-event-sequence-complete.int.c index 20af1d023..91ee9525c 100644 --- a/test/integration/esys-event-sequence-complete.int.c +++ b/test/integration/esys-event-sequence-complete.int.c @@ -8,14 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS, NULL -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_Free, ESYS_TR_PASSWORD +#include "tss2_tpm2_types.h" // for TPM2B_AUTH, TPM2B_MAX_BUFFER, TPM2_ALG_... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error /** Test the ESYS commands HashSequenceStart, SequenceUpdate, * and EventSequenceComplete. diff --git a/test/integration/esys-evict-control-serialization.int.c b/test/integration/esys-evict-control-serialization.int.c index edb1a2434..4b739243a 100644 --- a/test/integration/esys-evict-control-serialization.int.c +++ b/test/integration/esys-evict-control-serialization.int.c @@ -8,14 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for uint8_t +#include // for NULL, free, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_EvictControl +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPM2B_SENSITIVE_CREATE -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO /** This test is intended to test EvictControl and ESYS Serialization. * diff --git a/test/integration/esys-field-upgrade.int.c b/test/integration/esys-field-upgrade.int.c index e5042e216..25ca2ea10 100644 --- a/test/integration/esys-field-upgrade.int.c +++ b/test/integration/esys-field-upgrade.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC, TSS2_RESMGR_RC_LAYER, TSS2_RES... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_FieldUpgradeData +#include "tss2_tpm2_types.h" // for TPM2_RC_COMMAND_CODE, TPMT_HA, TPM2B_MA... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOG_WARNING, goto_if_error /** Test the ESYS function Esys_FieldUpgradeStart and Esys_FieldUpgradeData. * diff --git a/test/integration/esys-firmware-read.int.c b/test/integration/esys-firmware-read.int.c index af1629157..a8db3fe8f 100644 --- a/test/integration/esys-firmware-read.int.c +++ b/test/integration/esys-firmware-read.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC, TSS2_RESMGR_RC_LAYER, TSS2_RES... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_FirmwareRead, ESYS_C... +#include "tss2_tpm2_types.h" // for TPM2_RC_COMMAND_CODE, TPM2B_MAX_BUFFER -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOG_WARNING, goto_if_error /** Test the ESYS function Esys_FirmwareRead. * diff --git a/test/integration/esys-get-capability-act.int.c b/test/integration/esys-get-capability-act.int.c index beb3623b5..beec70cc4 100644 --- a/test/integration/esys-get-capability-act.int.c +++ b/test/integration/esys-get-capability-act.int.c @@ -3,16 +3,16 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for UINT32, TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_GetCapability, ESYS_... +#include "tss2_tpm2_types.h" // for TPM2_CAP, TPM2_CAP_ACT, TPM2_RC_N_MASK - -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for SAFE_FREE, goto_if_error + /** This test is intended to test to get ACT * capabilities using the get capability command. * diff --git a/test/integration/esys-get-capability.int.c b/test/integration/esys-get-capability.int.c index 0ab225bd2..90d05e1fc 100644 --- a/test/integration/esys-get-capability.int.c +++ b/test/integration/esys-get-capability.int.c @@ -8,14 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "tss2_common.h" // for UINT32, TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_GetCapability, ESYS_... +#include "tss2_tpm2_types.h" // for TPM2_CAP, TPM2_CAP_TPM_PROPERTIES, TPM2... -#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 /** This test is intended to test the ESYS get capability command. * diff --git a/test/integration/esys-get-random.int.c b/test/integration/esys-get-random.int.c index ee754b8e3..9d4cb0055 100644 --- a/test/integration/esys-get-random.int.c +++ b/test/integration/esys-get-random.int.c @@ -8,14 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for free, NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "tss2_common.h" // for BYTE, TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_GetRandom, Esys_Star... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST, TPM2_RC_SUCCESS, TPMA_SES... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOG_ERROR, LOGBLOB_DEBUG, LOG_INFO /** Test the ESYS function Esys_GetRandom. * diff --git a/test/integration/esys-get-time.int.c b/test/integration/esys-get-time.int.c index 32255c8bf..cadc6708c 100644 --- a/test/integration/esys-get-time.int.c +++ b/test/integration/esys-get-time.int.c @@ -8,15 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_RESMGR_R... +#include "tss2_esys.h" // for Esys_Free, Esys_FlushContext, ESYS_TR_NONE +#include "tss2_tpm2_types.h" // for TPM2_RC_COMMAND_CODE, TPM2B_AUTH, TPM2B... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_INFO, LOG_ERROR, LOG... /** This test is intended to test the GetTime command with password * authentication. diff --git a/test/integration/esys-hash.int.c b/test/integration/esys-hash.int.c index 5d009d951..11eb2dc1a 100644 --- a/test/integration/esys-hash.int.c +++ b/test/integration/esys-hash.int.c @@ -8,14 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_Hash, ESY... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST, TPM2B_MAX_BUFFER, TPM2_AL... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error /** This test is intended to test the ESYS command Esys_HASH. * diff --git a/test/integration/esys-hashsequencestart.int.c b/test/integration/esys-hashsequencestart.int.c index a540808bc..1fadbecc8 100644 --- a/test/integration/esys-hashsequencestart.int.c +++ b/test/integration/esys-hashsequencestart.int.c @@ -8,14 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memset -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_HashSeque... +#include "tss2_tpm2_types.h" // for TPM2B_AUTH, TPM2B_DIGEST, TPM2B_MAX_BUFFER -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error /** Test the ESYS commands HashSequenceStart, SequenceUpdate, * and SequenceComplete. diff --git a/test/integration/esys-hierarchy-control.int.c b/test/integration/esys-hierarchy-control.int.c index e6364a7c2..1d8ac6b46 100644 --- a/test/integration/esys-hierarchy-control.int.c +++ b/test/integration/esys-hierarchy-control.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, goto_error_if_not_failed +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_CreatePri... +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPM2B_CREATION_DATA, TPM2... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO, LOG... /** Test the ESYS function Esys_HierarchyControl. * diff --git a/test/integration/esys-hierarchychangeauth.int.c b/test/integration/esys-hierarchychangeauth.int.c index fd11c5ff5..9eb2b2656 100644 --- a/test/integration/esys-hierarchychangeauth.int.c +++ b/test/integration/esys-hierarchychangeauth.int.c @@ -8,14 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for bool, false, true +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_AUTH, TPM2B_PUBLIC, TPM2B_CREATIO... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO /** This test is intended to test the change of an authorization value of * a hierarchy. diff --git a/test/integration/esys-hmac.int.c b/test/integration/esys-hmac.int.c index 505d2ef2a..be90b5de6 100644 --- a/test/integration/esys-hmac.int.c +++ b/test/integration/esys-hmac.int.c @@ -8,15 +8,16 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include +#include // for NULL +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for memcpy -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPMT_PUBLIC, TPM2B_DIGEST -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** This test is intended to test the ESYS command Esys_HMAC with password * authentication. diff --git a/test/integration/esys-hmacsequencestart.int.c b/test/integration/esys-hmacsequencestart.int.c index 96b3ef112..aebf55017 100644 --- a/test/integration/esys-hmacsequencestart.int.c +++ b/test/integration/esys-hmacsequencestart.int.c @@ -8,14 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memset -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, ESYS_TR_PASSWORD +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPMT_PUBLIC, TPM2_ALG_SHA256 -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** Test the ESYS commands: HMAC_Start, SequenceUpdate, and SequenceComplete. * diff --git a/test/integration/esys-import.int.c b/test/integration/esys-import.int.c index 791321d25..261fefe32 100644 --- a/test/integration/esys-import.int.c +++ b/test/integration/esys-import.int.c @@ -8,15 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" -#include "tss2_mu.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPM2_ALG_CFB, TPM2B_DATA -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO /** This test is intended to test the ESYS commands Duplicate and Import. * diff --git a/test/integration/esys-lock.int.c b/test/integration/esys-lock.int.c index c149beb63..456d35845 100644 --- a/test/integration/esys-lock.int.c +++ b/test/integration/esys-lock.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for UINT32, TSS2_RC, TSS2_RESMGR_RC_LAYER +#include "tss2_esys.h" // for ESYS_TR_NONE, ESYS_TR_PASSWORD, Esys_Di... +#include "tss2_tpm2_types.h" // for TPM2_RC_COMMAND_CODE, TPM2_RC_BAD_AUTH -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_WARNING, number_rc /** Test the ESYS functions related to TPM locks. * diff --git a/test/integration/esys-mac.int.c b/test/integration/esys-mac.int.c index b34abc82a..0b8f1bb57 100644 --- a/test/integration/esys-mac.int.c +++ b/test/integration/esys-mac.int.c @@ -8,14 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcpy -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPMT_PUBLIC, TPM2B_DIGEST -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** This test is intended to test the ESYS command Esys_MAC with password * authentication. diff --git a/test/integration/esys-make-credential.int.c b/test/integration/esys-make-credential.int.c index 1d275280c..0ba3e671d 100644 --- a/test/integration/esys-make-credential.int.c +++ b/test/integration/esys-make-credential.int.c @@ -8,14 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memset -#include "tss2_esys.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPM2B_DIGEST, TPM2B_SENSI... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_INFO, LOG_ERROR /** This test is intended to test the function Esys_MakeCredential * We start by creating a primary key (Esys_CreatePrimary). diff --git a/test/integration/esys-nv-certify.int.c b/test/integration/esys-nv-certify.int.c index d013cd810..4fb3f3f12 100644 --- a/test/integration/esys-nv-certify.int.c +++ b/test/integration/esys-nv-certify.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, TSS2_RESMGR_R... +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, ESYS_TR_PASSWORD +#include "tss2_tpm2_types.h" // for TPM2B_AUTH, TPM2_ALG_SHA256, TPM2_RC_CO... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO, LOG... /** This test is intended to test the command Esys_NV_Certify. * diff --git a/test/integration/esys-nv-ram-counter.int.c b/test/integration/esys-nv-ram-counter.int.c index e7adbf523..6c2fb4535 100644 --- a/test/integration/esys-nv-ram-counter.int.c +++ b/test/integration/esys-nv-ram-counter.int.c @@ -8,14 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp, memset -#include "tss2_esys.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_NV_ReadPu... +#include "tss2_tpm2_types.h" // for TPM2B_NAME, TPM2B_NV_PUBLIC, TPM2_ALG_S... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** This test is intended to test the definition of a counter in NV ram and to * test the ESYS NV_Increment function. diff --git a/test/integration/esys-nv-ram-extend-index.int.c b/test/integration/esys-nv-ram-extend-index.int.c index b5a4ee48e..e13bd4d28 100644 --- a/test/integration/esys-nv-ram-extend-index.int.c +++ b/test/integration/esys-nv-ram-extend-index.int.c @@ -8,14 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp, memset -#include "tss2_esys.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_NV_ReadPu... +#include "tss2_tpm2_types.h" // for TPM2B_NAME, TPM2B_MAX_NV_BUFFER, TPM2B_... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** This test is intended to test the ESYS nv define space, nv extend, and * nv read command. diff --git a/test/integration/esys-nv-ram-ordinary-index.int.c b/test/integration/esys-nv-ram-ordinary-index.int.c index 5576740ee..9ada5a4a8 100644 --- a/test/integration/esys-nv-ram-ordinary-index.int.c +++ b/test/integration/esys-nv-ram-ordinary-index.int.c @@ -8,15 +8,19 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp, memset -#include "tss2_esys.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "test-esys.h" // for goto_error_if_not_failed, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, UINT16 +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_NV_ReadPu... +#include "tss2_tpm2_types.h" // for TPM2B_NAME, TPM2B_MAX_NV_BUFFER, TPM2B_... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** This test is intended to test the ESYS commands nv define space, nv write, * nv read command, nv lock write and nv lock read, and nv undefine. diff --git a/test/integration/esys-nv-ram-set-bits.int.c b/test/integration/esys-nv-ram-set-bits.int.c index 9ae710616..e686fc55d 100644 --- a/test/integration/esys-nv-ram-set-bits.int.c +++ b/test/integration/esys-nv-ram-set-bits.int.c @@ -8,14 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp, memset -#include "tss2_esys.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, UINT64 +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_NV_ReadPu... +#include "tss2_tpm2_types.h" // for TPM2B_NAME, TPM2B_NV_PUBLIC, TPM2_ALG_S... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** This test is intended to test the definition of a bit field in NV ram and to * test the ESYS NV_SetBits function. diff --git a/test/integration/esys-object-changeauth.int.c b/test/integration/esys-object-changeauth.int.c index 91aa749b0..3ac677e66 100644 --- a/test/integration/esys-object-changeauth.int.c +++ b/test/integration/esys-object-changeauth.int.c @@ -8,14 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_SUCCESS, EXIT_FAILURE -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for Esys_TR_SetAuth, ESYS_TR_NONE, Esys_Flu... +#include "tss2_tpm2_types.h" // for TPM2B_AUTH, TPM2B_PUBLIC, TPM2B_SENSITI... -#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, return_if_error /** This test is intended to test the ESYS command ObjectChangeAuth. * diff --git a/test/integration/esys-pcr-auth-value.int.c b/test/integration/esys-pcr-auth-value.int.c index 109e0d0d8..f360a6677 100644 --- a/test/integration/esys-pcr-auth-value.int.c +++ b/test/integration/esys-pcr-auth-value.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC, TSS2_RESMGR_RC_LAYER, TSS2_RES... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_PCR_SetAuthValue +#include "tss2_tpm2_types.h" // for TPM2_RC_COMMAND_CODE, TPM2B_DIGEST, TPM... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_WARNING, number_rc /** Test the commands Esys_PCR_SetAuthValue and Esys_PCR_SetAuthPolicy. * diff --git a/test/integration/esys-pcr-basic.int.c b/test/integration/esys-pcr-basic.int.c index e06c3da03..38fa5ef36 100644 --- a/test/integration/esys-pcr-basic.int.c +++ b/test/integration/esys-pcr-basic.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for UINT32, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_PCR_Allocate +#include "tss2_tpm2_types.h" // for TPM2_ALG_SHA256, TPML_DIGEST_VALUES -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_WARNING, number_rc /** Test the basic commands for PCR processing. * diff --git a/test/integration/esys-policy-authorize-nv-opt.int.c b/test/integration/esys-policy-authorize-nv-opt.int.c index d471405ae..0517f7bf7 100644 --- a/test/integration/esys-policy-authorize-nv-opt.int.c +++ b/test/integration/esys-policy-authorize-nv-opt.int.c @@ -8,16 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for false, bool, true +#include // for free, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp -#include "tss2_esys.h" -#include "tss2_mu.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for BYTE, TSS2_RC, TSS2_RC_SUCCESS, TSS2_RE... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_FlushContext, Esys_N... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST, TPM2_RC_COMMAND_CODE, TPM... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOGBLOB_DEBUG #define FLUSH true #define NOT_FLUSH false diff --git a/test/integration/esys-policy-authorize.int.c b/test/integration/esys-policy-authorize.int.c index aa6306f55..1af382173 100644 --- a/test/integration/esys-policy-authorize.int.c +++ b/test/integration/esys-policy-authorize.int.c @@ -8,15 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" -#include "tss2_mu.h" +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST, TPM2_ALG_SHA256, TPM2B_AUTH -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO /** This test is intended to test the ESYS policy authorization. * diff --git a/test/integration/esys-policy-nv-changeauth.int.c b/test/integration/esys-policy-nv-changeauth.int.c index 7912bf472..fe5ad1d8d 100644 --- a/test/integration/esys-policy-nv-changeauth.int.c +++ b/test/integration/esys-policy-nv-changeauth.int.c @@ -8,14 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_FlushContext, Esys_N... +#include "tss2_tpm2_types.h" // for TPM2_ALG_SHA256, TPM2_CC_NV_ChangeAuth -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** This test is intended to test the ESYS commands PolicyAuthValue, * PolicyCommandCode, Esys_PolicyGetDigest, and NV_ChangeAuth. diff --git a/test/integration/esys-policy-nv-undefine-special.int.c b/test/integration/esys-policy-nv-undefine-special.int.c index 47c87ae65..a3378fd06 100644 --- a/test/integration/esys-policy-nv-undefine-special.int.c +++ b/test/integration/esys-policy-nv-undefine-special.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS, NULL -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_FlushContext, Esys_S... +#include "tss2_tpm2_types.h" // for TPM2_ALG_SHA256, TPM2B_NONCE, TPM2_ALG_AES -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, number_rc /** This test is intended to test the ESYS command Esys_NV_UndefineSpaceSpecial, * The NV space attributes TPMA_NV_PLATFORMCREATE and TPMA_NV_POLICY_DELETE diff --git a/test/integration/esys-policy-password.int.c b/test/integration/esys-policy-password.int.c index 7b05c96a6..376cfaded 100644 --- a/test/integration/esys-policy-password.int.c +++ b/test/integration/esys-policy-password.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for test_invoke_esys +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPM2_ALG_AES, TPM2_ALG_CFB -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** This test is intended to test the ESYS command PolicyPassword. * diff --git a/test/integration/esys-policy-physical-presence-opt.int.c b/test/integration/esys-policy-physical-presence-opt.int.c index 6e83c9c4b..bc878c501 100644 --- a/test/integration/esys-policy-physical-presence-opt.int.c +++ b/test/integration/esys-policy-physical-presence-opt.int.c @@ -8,16 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for false, true, bool +#include // for free, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp -#include "tss2_esys.h" -#include "tss2_mu.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for BYTE, TSS2_RC, TSS2_RC_SUCCESS, TSS2_RE... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_FlushContext, ESYS_C... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST, TPM2_RC_COMMAND_CODE, TPM... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOGBLOB_DEBUG #define FLUSH true #define NOT_FLUSH false diff --git a/test/integration/esys-policy-regression.int.c b/test/integration/esys-policy-regression.int.c index 7c85b84ea..81ebe7cfb 100644 --- a/test/integration/esys-policy-regression.int.c +++ b/test/integration/esys-policy-regression.int.c @@ -8,14 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include "tss2_esys.h" -#include "tss2_mu.h" +#include // for true, false, bool +#include // for free, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp + +#include "test-esys.h" // for test_invoke_esys +#include "tss2_common.h" // for BYTE, TSS2_RC_SUCCESS, TSS2_RC, TSS2_RE... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_StartAuthSession +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST, TPM2_ALG_SHA256, TPM2_SE_... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOGBLOB_DEBUG #define FLUSH true #define NOT_FLUSH false diff --git a/test/integration/esys-policy-template-opt.int.c b/test/integration/esys-policy-template-opt.int.c index d1a37a9bc..d3d74de75 100644 --- a/test/integration/esys-policy-template-opt.int.c +++ b/test/integration/esys-policy-template-opt.int.c @@ -8,16 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for false, true, bool +#include // for free, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp -#include "tss2_esys.h" -#include "tss2_mu.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for BYTE, TSS2_RC, TSS2_RC_SUCCESS, TSS2_RE... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_FlushContext, ESYS_C... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST, TPM2_RC_COMMAND_CODE, TPM... -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOGBLOB_DEBUG #define FLUSH true #define NOT_FLUSH false diff --git a/test/integration/esys-policy-ticket.int.c b/test/integration/esys-policy-ticket.int.c index ec86e591a..001a68339 100644 --- a/test/integration/esys-policy-ticket.int.c +++ b/test/integration/esys-policy-ticket.int.c @@ -8,16 +8,16 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS, size_t -#include "tss2_esys.h" -#include "tss2_mu.h" +#include "test-esys.h" // for test_invoke_esys +#include "tss2_common.h" // for TSS2_RC_SUCCESS, BYTE, INT32, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_mu.h" // for Tss2_MU_INT32_Marshal +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST, TPM2_ALG_SHA256, TPM2B_NONCE -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO, LOG... /** This test is intended to test the ESYS policy commands related to * signed authorization actions. diff --git a/test/integration/esys-pp-commands.int.c b/test/integration/esys-pp-commands.int.c index 80711f878..83756ee75 100644 --- a/test/integration/esys-pp-commands.int.c +++ b/test/integration/esys-pp-commands.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC, TSS2_RESMGR_RC_LAYER, TSS2_RES... +#include "tss2_esys.h" // for Esys_PP_Commands, ESYS_CONTEXT, ESYS_TR... +#include "tss2_tpm2_types.h" // for TPM2_RC_COMMAND_CODE, TPML_CC, TPM2_CC_... -#include "test-esys.h" -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOG_WARNING, goto_if_error, number_rc /** Test the ESYS function Esys_PP_Commands. * diff --git a/test/integration/esys-quote.int.c b/test/integration/esys-quote.int.c index 05db8954b..fad139473 100644 --- a/test/integration/esys-quote.int.c +++ b/test/integration/esys-quote.int.c @@ -8,14 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2_ALG_SHA256, TPM2B_AUTH, TPM2B_DATA -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_INFO, LOG_ERROR /** This test is intended to test the quote command with password * authentication. diff --git a/test/integration/esys-rsa-encrypt-decrypt.int.c b/test/integration/esys-rsa-encrypt-decrypt.int.c index 6d08981b0..f265ea7f2 100644 --- a/test/integration/esys-rsa-encrypt-decrypt.int.c +++ b/test/integration/esys-rsa-encrypt-decrypt.int.c @@ -8,14 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS, size_t +#include // for memcmp -#include "tss2_esys.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "tss2_common.h" // for BYTE, TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_PUBLIC, TPM2B_PUBLIC_KEY_RSA, TPM... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO /** This test is intended to test RSA encryption / decryption. * with password diff --git a/test/integration/esys-save-and-load-context.int.c b/test/integration/esys-save-and-load-context.int.c index 6783c4f90..e20276432 100644 --- a/test/integration/esys-save-and-load-context.int.c +++ b/test/integration/esys-save-and-load-context.int.c @@ -8,14 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, Esys_FlushContext, ESYS_TR_NONE +#include "tss2_tpm2_types.h" // for TPM2B_SENSITIVE_CREATE, TPM2B_PUBLIC -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_INFO, LOG_ERROR /** This test is intended to test context save and load. * diff --git a/test/integration/esys-session-attributes.int.c b/test/integration/esys-session-attributes.int.c index a51c07fba..bfb767511 100644 --- a/test/integration/esys-session-attributes.int.c +++ b/test/integration/esys-session-attributes.int.c @@ -8,16 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for uint8_t +#include // for NULL, size_t, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" -#include "tss2_mu.h" +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_TCTI_RC_... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_FlushContext, Esys_Free +#include "tss2_mu.h" // for Tss2_MU_TPMS_AUTH_COMMAND_Unmarshal +#include "tss2_tpm2_types.h" // for TPMA_SESSION_ENCRYPT, TPM2_ALG_SHA256 -#include "esys_iutil.h" #define LOGDEFAULT LOGLEVEL_INFO #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOGLEVEL_INFO, goto_if_error, LOG_ERROR extern TSS2_RC (*transmit_hook) (const uint8_t *command_buffer, size_t command_size); diff --git a/test/integration/esys-set-algorithm-set.int.c b/test/integration/esys-set-algorithm-set.int.c index 988f25e9d..2bbc20e95 100644 --- a/test/integration/esys-set-algorithm-set.int.c +++ b/test/integration/esys-set-algorithm-set.int.c @@ -8,15 +8,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC, TSS2_RESMGR_RC_LAYER, TSS2_RES... +#include "tss2_esys.h" // for Esys_SetAlgorithmSet, ESYS_CONTEXT, ESY... +#include "tss2_tpm2_types.h" // for TPM2_RC_COMMAND_CODE, TPM2_RC_BAD_AUTH -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOG_WARNING, goto_if_error, number_rc /** Test the ESYS function Esys_SetAlgorithmSet. * diff --git a/test/integration/esys-stir-random.int.c b/test/integration/esys-stir-random.int.c index f48b51a32..a5a573194 100644 --- a/test/integration/esys-stir-random.int.c +++ b/test/integration/esys-stir-random.int.c @@ -8,14 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_StirRandom, ESYS_CON... +#include "tss2_tpm2_types.h" // for TPM2B_SENSITIVE_DATA -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error /** Test the ESYS function Esys_StirRandom. * diff --git a/test/integration/esys-testparms.int.c b/test/integration/esys-testparms.int.c index a6b31df04..4306ea3e6 100644 --- a/test/integration/esys-testparms.int.c +++ b/test/integration/esys-testparms.int.c @@ -8,14 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_TestParms, ESYS_CONTEXT +#include "tss2_tpm2_types.h" // for TPM2_ALG_AES, TPM2_ALG_CFB, TPM2_ALG_NULL -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error /** Test the ESYS function Esys_TestParms. * diff --git a/test/integration/esys-tpm-clear-auth.int.c b/test/integration/esys-tpm-clear-auth.int.c index d9bde5b61..1b952d93e 100644 --- a/test/integration/esys-tpm-clear-auth.int.c +++ b/test/integration/esys-tpm-clear-auth.int.c @@ -8,16 +8,16 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_FlushContext, Esys_H... +#include "tss2_tpm2_types.h" // for TPM2_ALG_SHA256, TPM2_SE_HMAC, TPM2B_AUTH -#include "esys_iutil.h" -#include "test-esys.h" #define LOGDEFAULT LOGLEVEL_INFO #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOGLEVEL_INFO, LOG_DEBUG, goto_if_error /** Test auth verification in clear command * diff --git a/test/integration/esys-tpm-tests.int.c b/test/integration/esys-tpm-tests.int.c index 5dcb788ec..f3d991c45 100644 --- a/test/integration/esys-tpm-tests.int.c +++ b/test/integration/esys-tpm-tests.int.c @@ -7,14 +7,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for free, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "esys_int.h" // for ESYS_CONTEXT, _ESYS_STATE_INIT +#include "tss2_common.h" // for TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, ESYS_CONTEXT, Esys_GetTes... +#include "tss2_tpm2_types.h" // for TPML_ALG, TPM2B_MAX_BUFFER, TPM2_ALG_SH... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error /** Test the ESYS functions for TPM tests. * diff --git a/test/integration/esys-tr-fromTpmPublic-key.int.c b/test/integration/esys-tr-fromTpmPublic-key.int.c index de33833dc..63591a65b 100644 --- a/test/integration/esys-tr-fromTpmPublic-key.int.c +++ b/test/integration/esys-tr-fromTpmPublic-key.int.c @@ -7,14 +7,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for free, NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp -#include "tss2_esys.h" +#include "tss2_common.h" // for BYTE, TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_EvictControl, Esys_F... +#include "tss2_tpm2_types.h" // for TPM2B_NAME, TPM2_PERSISTENT_FIRST, TPM2... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO /** This tests the Esys_TR_FromTPMPublic and Esys_TR_GetName functions by * creating an NV Index and then attempting to retrieve an ESYS_TR object for diff --git a/test/integration/esys-tr-fromTpmPublic-nv.int.c b/test/integration/esys-tr-fromTpmPublic-nv.int.c index 112408b95..8b55d9e6d 100644 --- a/test/integration/esys-tr-fromTpmPublic-nv.int.c +++ b/test/integration/esys-tr-fromTpmPublic-nv.int.c @@ -7,14 +7,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for free, NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp -#include "tss2_esys.h" +#include "tss2_common.h" // for BYTE, TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_TR_FromTPMPublic +#include "tss2_tpm2_types.h" // for TPM2B_NAME, TPM2_NV_INDEX_FIRST, TPMA_S... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** This tests the Esys_TR_FromTPMPublic and Esys_TR_GetName functions by * creating an NV Index and then attempting to retrieve an ESYS_TR object for diff --git a/test/integration/esys-tr-fromTpmPublic-session.int.c b/test/integration/esys-tr-fromTpmPublic-session.int.c index db8bfcdcf..7ea4677a5 100644 --- a/test/integration/esys-tr-fromTpmPublic-session.int.c +++ b/test/integration/esys-tr-fromTpmPublic-session.int.c @@ -3,14 +3,15 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for PRIu32 +#include // for free, NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_ESYS_RC_BAD_TR, TSS2_RC, TSS2_RC_S... +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_GetCapability, Esys_... +#include "tss2_tpm2_types.h" // for TPMS_CAPABILITY_DATA, TPML_HANDLE, TPMU... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOG_ERROR, TPM2_ERROR_FORMAT, TPM2_ERRO... /** This tests the ability to create an ESYS_TR object via Esys_TR_FromTPMPublic * given a TPM2_HANDLE representing a session handle. diff --git a/test/integration/esys-tr-getName-hierarchy.int.c b/test/integration/esys-tr-getName-hierarchy.int.c index 271c9e1e0..69cf58787 100644 --- a/test/integration/esys-tr-getName-hierarchy.int.c +++ b/test/integration/esys-tr-getName-hierarchy.int.c @@ -7,15 +7,16 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for free, EXIT_FAILURE, EXIT_SUCCESS, size_t +#include // for memcmp -#include "tss2_mu.h" -#include "tss2_esys.h" +#include "tss2_common.h" // for BYTE, TSS2_RC +#include "tss2_esys.h" // for Esys_TR_GetName, ESYS_CONTEXT, ESYS_TR_... +#include "tss2_mu.h" // for Tss2_MU_TPM2_HANDLE_Marshal +#include "tss2_tpm2_types.h" // for TPM2B_NAME, TPM2_RH_OWNER -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** This tests the Esys_TR_FromTPMPublic and Esys_TR_GetName functions by * creating an NV Index and then attempting to retrieve an ESYS_TR object for diff --git a/test/integration/esys-tr-getName.int.c b/test/integration/esys-tr-getName.int.c index b4bffec56..6238b688b 100644 --- a/test/integration/esys-tr-getName.int.c +++ b/test/integration/esys-tr-getName.int.c @@ -3,15 +3,16 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include "tss2_mu.h" -#include "tss2_esys.h" +#include // for size_t, EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp + +#include "tss2_common.h" // for BYTE, TSS2_RC +#include "tss2_esys.h" // for Esys_Free, Esys_TR_GetName, Esys_TR_Get... +#include "tss2_mu.h" // for Tss2_MU_TPM2_HANDLE_Marshal +#include "tss2_tpm2_types.h" // for TPM2B_NAME, TPM2_NV_AC_FIRST, TPM2_HANDLE -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR /** This tests the Esys_TR_GetTpmHandle and Esys_TR_GetName functions by * using a dummy AC, ACT handle and validating it against the expected TPM diff --git a/test/integration/esys-tr-getTpmHandle-key.int.c b/test/integration/esys-tr-getTpmHandle-key.int.c index a64a5e117..948d89853 100644 --- a/test/integration/esys-tr-getTpmHandle-key.int.c +++ b/test/integration/esys-tr-getTpmHandle-key.int.c @@ -3,14 +3,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_EvictControl, Esys_T... +#include "tss2_tpm2_types.h" // for TPM2B_SENSITIVE_CREATE, TPM2_PERSISTENT... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOG_ERROR, goto_if_error, LOG_INFO /** This tests the Esys_TR_ToTPMPublic function by * creating a Primary Object Key and then attempting to retrieve diff --git a/test/integration/esys-tr-getTpmHandle-nv.int.c b/test/integration/esys-tr-getTpmHandle-nv.int.c index a95d990f5..1339413af 100644 --- a/test/integration/esys-tr-getTpmHandle-nv.int.c +++ b/test/integration/esys-tr-getTpmHandle-nv.int.c @@ -7,14 +7,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for ESYS_TR_NONE, Esys_NV_DefineSpace, Esys... +#include "tss2_tpm2_types.h" // for TPM2B_AUTH, TPM2B_NV_PUBLIC, TPM2_ALG_S... -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for LOG_ERROR, goto_if_error /** This tests the Esys_TR_ToTPMPublic function by * creating an NV index object and then attempting to retrieve diff --git a/test/integration/esys-unseal-password-auth.int.c b/test/integration/esys-unseal-password-auth.int.c index 9659faa35..7855891d8 100644 --- a/test/integration/esys-unseal-password-auth.int.c +++ b/test/integration/esys-unseal-password-auth.int.c @@ -8,20 +8,19 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include +#include // for NULL +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for memcmp +#include // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext -#include - -#include "test.h" -#include "esys_types.h" -#include "esys_iutil.h" +#include "esys_int.h" // for RSRC_NODE_T +#include "esys_iutil.h" // for esys_GetResourceObject +#include "esys_types.h" // for IESYS_RESOURCE +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC +#include "tss2_tpm2_types.h" // for TPM2B_SENSITIVE_CREATE, TPM2B_PUBLIC #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_INFO, LOG_ERROR /** This test is intended to test the unseal operation for the ESYS command * Unseal. diff --git a/test/integration/esys-verify-signature.int.c b/test/integration/esys-verify-signature.int.c index 38d3f4cd4..32ed1ee19 100644 --- a/test/integration/esys-verify-signature.int.c +++ b/test/integration/esys-verify-signature.int.c @@ -8,15 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS -#include "tss2_esys.h" -#include "tss2_mu.h" +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2B_AUTH, TPM2B_DIGEST, TPM2B_NAME -#include "esys_iutil.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_INFO /** This test is intended to test the ESYS signing and signature verification. * diff --git a/test/integration/esys-zgen-2phase.int.c b/test/integration/esys-zgen-2phase.int.c index 5d9467a3d..e4733a0a9 100644 --- a/test/integration/esys-zgen-2phase.int.c +++ b/test/integration/esys-zgen-2phase.int.c @@ -8,15 +8,16 @@ #include "config.h" // IWYU pragma: keep #endif -#include +#include // for NULL, EXIT_FAILURE, EXIT_SUCCESS +#include // for memset -#include "tss2_esys.h" +#include "test-esys.h" // for EXIT_SKIP, test_invoke_esys +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RESMGR_RC_LAYER +#include "tss2_esys.h" // for Esys_Free, ESYS_TR_NONE, Esys_FlushContext +#include "tss2_tpm2_types.h" // for TPM2_RC_COMMAND_CODE, TPM2B_ECC_POINT -#include "esys_iutil.h" -#include "test-esys.h" #define LOGMODULE test -#include "util/log.h" -#include "util/aux_util.h" +#include "util/log.h" // for goto_if_error, LOG_ERROR, LOG_WARNING /** This test is intended to test Esys_ECDH_ZGen. * diff --git a/test/integration/main-esys.c b/test/integration/main-esys.c index 9d3726721..1209f0d2e 100644 --- a/test/integration/main-esys.c +++ b/test/integration/main-esys.c @@ -8,21 +8,12 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include +#include "test-esys.h" // for test_invoke_esys, EXIT_SKIP +#include "tss2_common.h" // for TSS2_RC -#include "tss2_esys.h" - -#include "tss2_tctildr.h" -#include "test-esys.h" -#include "tss2-esys/esys_int.h" #define LOGMODULE test -#include "util/log.h" - - - -#include "test-common.h" +#include "test-common.h" // for test_esys_checks_post, test_esys_checks_pre +#include "util/log.h" // for LOG_ERROR diff --git a/test/unit/esys-crypto.c b/test/unit/esys-crypto.c index 5ac23172e..189950bc3 100644 --- a/test/unit/esys-crypto.c +++ b/test/unit/esys-crypto.c @@ -13,7 +13,6 @@ #include // for NULL, size_t, malloc #include "esys_crypto.h" // for iesys_initialize_crypto_backend, iesys... -#include "esys_crypto_ossl.h" // for _iesys_crypto_aes_decrypt, _iesys_cryp... #include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_ESYS_RC_BAD_REFE... #include "tss2_esys.h" // for ESYS_CRYPTO_CALLBACKS, Esys_GetSysContext #include "tss2_sys.h" // for TSS2_SYS_CONTEXT