diff --git a/src/tss2-esys/esys_crypto_ossl.c b/src/tss2-esys/esys_crypto_ossl.c index 926259339..939d0aae9 100644 --- a/src/tss2-esys/esys_crypto_ossl.c +++ b/src/tss2-esys/esys_crypto_ossl.c @@ -8,7 +8,7 @@ #include "config.h" // for HAVE_EVP_SM4_CFB #endif -#include // for uint8_t, PRIu16 +#include // for PRIu16 #include // for BN_free, BN_bin2bn, BN_bn2bin, BN_n... #include // for OSSL_LIB_CTX_free, OSSL_LIB_CTX_new #include // for EC_POINT_free, EC_POINT_new, EC_GRO... @@ -25,9 +25,8 @@ #include // for OSSL_PKEY_PARAM_EC_PUB_X, OSSL_PKEY... #include // for OSSL_PARAM_BLD_free, OSSL_PARAM_BLD... #include // for OSSL_PARAM_free -#include // for BIGNUM, EVP_CIPHER, EVP_CIPHER_CTX #endif -#include "esys_crypto.h" // for iesys_crypto_hash_get_digest_size +#include "esys_crypto.h" // for OSSL_FREE, iesys_crypto_hash_get_di... #include "esys_crypto_ossl.h" #include "tss2_esys.h" // for ESYS_CRYPTO_CONTEXT_BLOB #include "tss2_mu.h" // for Tss2_MU_TPMS_ECC_POINT_Marshal diff --git a/src/tss2-fapi/api/Fapi_ExportKey.c b/src/tss2-fapi/api/Fapi_ExportKey.c index 6046d32db..8be51ec75 100644 --- a/src/tss2-fapi/api/Fapi_ExportKey.c +++ b/src/tss2-fapi/api/Fapi_ExportKey.c @@ -8,7 +8,7 @@ #include "config.h" // IWYU pragma: keep #endif -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_put, json_object_to_js... #include // for NULL #include // for memset, strdup diff --git a/src/tss2-fapi/api/Fapi_ExportPolicy.c b/src/tss2-fapi/api/Fapi_ExportPolicy.c index a5a888afe..42144ad3f 100644 --- a/src/tss2-fapi/api/Fapi_ExportPolicy.c +++ b/src/tss2-fapi/api/Fapi_ExportPolicy.c @@ -9,7 +9,7 @@ #endif #include // for PRIu16 -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_to_json_string_ext #include // for false, true #include // for memset, size_t, NULL diff --git a/src/tss2-fapi/api/Fapi_GetInfo.c b/src/tss2-fapi/api/Fapi_GetInfo.c index 15156dbd1..5eb63feb0 100644 --- a/src/tss2-fapi/api/Fapi_GetInfo.c +++ b/src/tss2-fapi/api/Fapi_GetInfo.c @@ -8,7 +8,7 @@ #include "config.h" // for PACKAGE_STRING #endif -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_put, json_object_to_js... #include // for memset, strdup, NULL, size_t #include "fapi_int.h" // for FAPI_CONTEXT, IFAPI_GetInfo, IFAPI... diff --git a/src/tss2-fapi/api/Fapi_GetTpmBlobs.c b/src/tss2-fapi/api/Fapi_GetTpmBlobs.c index 83cb57e56..e797fcb4f 100644 --- a/src/tss2-fapi/api/Fapi_GetTpmBlobs.c +++ b/src/tss2-fapi/api/Fapi_GetTpmBlobs.c @@ -8,7 +8,7 @@ #include "config.h" // IWYU pragma: keep #endif -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_put, json_objec... #include // for uint8_t #include // for malloc, size_t, NULL #include // for memcpy diff --git a/src/tss2-fapi/api/Fapi_Import.c b/src/tss2-fapi/api/Fapi_Import.c index 0adfc3b02..5a5ef0b97 100644 --- a/src/tss2-fapi/api/Fapi_Import.c +++ b/src/tss2-fapi/api/Fapi_Import.c @@ -8,7 +8,7 @@ #include "config.h" // IWYU pragma: keep #endif -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_put, json_tok... #include // for uint16_t #include // for NULL, size_t #include // for strncmp, memset, memcpy diff --git a/src/tss2-fapi/api/Fapi_NvExtend.c b/src/tss2-fapi/api/Fapi_NvExtend.c index e0dc9f709..5ff16c1fb 100644 --- a/src/tss2-fapi/api/Fapi_NvExtend.c +++ b/src/tss2-fapi/api/Fapi_NvExtend.c @@ -8,7 +8,7 @@ #include "config.h" // IWYU pragma: keep #endif -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_array_add, json_object... #include // for uint8_t #include // for NULL, malloc, size_t #include // for memcpy, memset diff --git a/src/tss2-fapi/api/Fapi_NvIncrement.c b/src/tss2-fapi/api/Fapi_NvIncrement.c index 88059c5f6..18c15db79 100644 --- a/src/tss2-fapi/api/Fapi_NvIncrement.c +++ b/src/tss2-fapi/api/Fapi_NvIncrement.c @@ -8,7 +8,7 @@ #include "config.h" // IWYU pragma: keep #endif -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object #include // for NULL #include // for memset diff --git a/src/tss2-fapi/api/Fapi_NvSetBits.c b/src/tss2-fapi/api/Fapi_NvSetBits.c index 70fbd37e5..7038a6722 100644 --- a/src/tss2-fapi/api/Fapi_NvSetBits.c +++ b/src/tss2-fapi/api/Fapi_NvSetBits.c @@ -9,7 +9,7 @@ #endif #include // for uint64_t, PRIx64 -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object #include // for NULL #include // for memset diff --git a/src/tss2-fapi/api/Fapi_NvWrite.c b/src/tss2-fapi/api/Fapi_NvWrite.c index d14c68dca..149cbd4d9 100644 --- a/src/tss2-fapi/api/Fapi_NvWrite.c +++ b/src/tss2-fapi/api/Fapi_NvWrite.c @@ -8,7 +8,7 @@ #include "config.h" // IWYU pragma: keep #endif -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object #include // for uint8_t #include // for NULL, malloc, size_t #include // for memcpy, memset diff --git a/src/tss2-fapi/api/Fapi_VerifyQuote.c b/src/tss2-fapi/api/Fapi_VerifyQuote.c index 315fef552..19ab4d1f5 100644 --- a/src/tss2-fapi/api/Fapi_VerifyQuote.c +++ b/src/tss2-fapi/api/Fapi_VerifyQuote.c @@ -8,7 +8,7 @@ #include "config.h" // IWYU pragma: keep #endif -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_put, json_tokener_parse #include // for uint8_t #include // for NULL, size_t, malloc #include // for memset, memcmp, memcpy diff --git a/src/tss2-fapi/fapi_crypto.c b/src/tss2-fapi/fapi_crypto.c index 1b92b788b..76d24a4b2 100644 --- a/src/tss2-fapi/fapi_crypto.c +++ b/src/tss2-fapi/fapi_crypto.c @@ -14,7 +14,7 @@ #include // for buf_mem_st #include // for OSSL_LIB_CTX_free, OSSL_LIB_CTX_new #include // for ECDSA_SIG_free, i2d_ECDSA_SIG, ECDS... -#include // for EVP_PKEY_type, EVP_PKEY_free, EVP_P... +#include // for EVP_PKEY_type, EVP_PKEY_free, EVP_PKEY #include // for NID_sm2, NID_X9_62_prime192v1, NID_... #include // for OBJ_nid2sn, OBJ_txt2nid #include // for OPENSSL_VERSION_NUMBER @@ -31,7 +31,6 @@ #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, BIGNUM, BIO, EVP_PKEY_CTX #endif #include // for ERR_print_errors_fp diff --git a/src/tss2-fapi/fapi_int.h b/src/tss2-fapi/fapi_int.h index e89b79cf7..163ad6934 100644 --- a/src/tss2-fapi/fapi_int.h +++ b/src/tss2-fapi/fapi_int.h @@ -6,7 +6,7 @@ #ifndef FAPI_INT_H #define FAPI_INT_H -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object #include // for bool, false, true #include // for uint8_t, uint32_t, uint64_t #include // for size_t, NULL diff --git a/src/tss2-fapi/fapi_util.c b/src/tss2-fapi/fapi_util.c index fe2437990..724836617 100644 --- a/src/tss2-fapi/fapi_util.c +++ b/src/tss2-fapi/fapi_util.c @@ -8,7 +8,7 @@ #include "config.h" // IWYU pragma: keep #endif -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_put, json_object_t... #include // for free, calloc, malloc #include // for memcpy, strcmp, memset, strlen #include // for strcasecmp diff --git a/src/tss2-fapi/ifapi_config.c b/src/tss2-fapi/ifapi_config.c index ef5635ed3..22aeeb8b4 100644 --- a/src/tss2-fapi/ifapi_config.c +++ b/src/tss2-fapi/ifapi_config.c @@ -8,7 +8,7 @@ #include "config.h" // for SYSCONFDIR #endif -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_put, json_object #include // for uint8_t #include // for NULL, getenv, size_t #include // for strncmp, strlen, memset, strdup diff --git a/src/tss2-fapi/ifapi_curl.c b/src/tss2-fapi/ifapi_curl.c index 35c04204d..6280a79f3 100644 --- a/src/tss2-fapi/ifapi_curl.c +++ b/src/tss2-fapi/ifapi_curl.c @@ -4,9 +4,10 @@ #endif #include // for curl_easy_strerror, CURLE_OK, curl_ea... -#include // for asn1_string_st #include // for BIO_free, BIO_new_mem_buf +#include // for X509, ASN1_IA5STRING, X509_CRL, DIST_... #include // for NID_crl_distribution_points, NID_info... +#include // for OPENSSL_VERSION_NUMBER #include // for PEM_read_bio_X509 #include // for STACK_OF #include // for X509_free, X509_STORE_add_cert, X509_... @@ -17,8 +18,6 @@ #if OPENSSL_VERSION_NUMBER < 0x30000000L #include -#else -#include // for X509, ASN1_IA5STRING, X509_CRL, DIST_... #endif #include "fapi_certificates.h" // for root_cert_list diff --git a/src/tss2-fapi/ifapi_eventlog.c b/src/tss2-fapi/ifapi_eventlog.c index 64325e455..330be5e26 100644 --- a/src/tss2-fapi/ifapi_eventlog.c +++ b/src/tss2-fapi/ifapi_eventlog.c @@ -8,7 +8,6 @@ #include "config.h" // IWYU pragma: keep #endif -#include // for json_object, json_object_put, json_object_to_js... #include // for uint8_t #include // for free #include // for memset, strdup, memcpy @@ -18,9 +17,9 @@ #include "ifapi_eventlog.h" #include "ifapi_helpers.h" // for ifapi_asprintf, ifapi_cal... #include "ifapi_ima_eventlog.h" // for IFAPI_IMA_EVENT, ifapi_re... -#include "ifapi_json_deserialize.h" // for ifapi_json_IFAPI_EVENT_deserialize -#include "ifapi_json_serialize.h" // for ifapi_json_IFAPI_EVENT_se... +#include "ifapi_json_deserialize.h" // for ifapi_json_IFAPI_EVENT_de... #include "ifapi_json_eventlog_serialize.h" // for ifapi_get_tcg_firmware_ev... +#include "ifapi_json_serialize.h" // for ifapi_json_IFAPI_EVENT_se... #include "ifapi_macros.h" // for check_not_null, statecase #include "tpm_json_deserialize.h" // for ifapi_parse_json diff --git a/src/tss2-fapi/ifapi_eventlog.h b/src/tss2-fapi/ifapi_eventlog.h index bf4b2a029..9120b967c 100644 --- a/src/tss2-fapi/ifapi_eventlog.h +++ b/src/tss2-fapi/ifapi_eventlog.h @@ -6,7 +6,7 @@ #ifndef IFAPI_EVENTLOG_H #define IFAPI_EVENTLOG_H -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object #include // for bool #include // for size_t diff --git a/src/tss2-fapi/ifapi_eventlog_system.c b/src/tss2-fapi/ifapi_eventlog_system.c index 9768a5943..1527db181 100644 --- a/src/tss2-fapi/ifapi_eventlog_system.c +++ b/src/tss2-fapi/ifapi_eventlog_system.c @@ -9,7 +9,6 @@ #endif #include // for uintptr_t, uint8_t, int64_t, PRId64 -#include // for json_object, json_object_put, json_object_to_js... #include // for sscanf #include // for calloc #include // for strlen, strncmp, memcmp, strcmp diff --git a/src/tss2-fapi/ifapi_eventlog_system.h b/src/tss2-fapi/ifapi_eventlog_system.h index 55fe286a1..82824a556 100644 --- a/src/tss2-fapi/ifapi_eventlog_system.h +++ b/src/tss2-fapi/ifapi_eventlog_system.h @@ -6,13 +6,13 @@ #ifndef IFAPI_EVENTLOG_SYSTEM_H #define IFAPI_EVENTLOG_SYSTEM_H -#include // for json_object, json_object_put, json_object_to_js... -#include // for bool -#include // for size_t +#include // for json_object +#include // for bool +#include // for size_t -#include "efi_event.h" // for TCG_EVENT_HEADER2, TCG_DIGEST2, TCG_E... -#include "fapi_types.h" // for UINT8_ARY -#include "tss2_common.h" // for UINT32, BYTE, TSS2_RC +#include "efi_event.h" // for TCG_EVENT_HEADER2, TCG_DIGEST2, TCG_EVENT +#include "fapi_types.h" // for UINT8_ARY +#include "tss2_common.h" // for UINT32, BYTE, TSS2_RC typedef UINT32 TCG_EVENT_TYPE; diff --git a/src/tss2-fapi/ifapi_get_web_cert.c b/src/tss2-fapi/ifapi_get_web_cert.c index 4ce0ab88f..890e6e921 100644 --- a/src/tss2-fapi/ifapi_get_web_cert.c +++ b/src/tss2-fapi/ifapi_get_web_cert.c @@ -5,10 +5,11 @@ #endif #include // for curl_easy_cleanup, curl_easy_init -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_get_string, json_objec... #include // for BIO_new, BIO_free_all, BIO_push #include // for buf_mem_st #include // for EVP_DigestUpdate, BIO_f_base64 +#include // for OPENSSL_VERSION_NUMBER #include // for SHA256_DIGEST_LENGTH #include // for bool, true #include // for uint8_t @@ -18,8 +19,6 @@ #if OPENSSL_VERSION_NUMBER < 0x30000000L #include -#else -#include // for X509, ASN1_IA5STRING, X509_CRL, DIST_... #endif #include "fapi_int.h" // for FAPI_CONTEXT, VENDOR_AMD, VENDOR_INTC diff --git a/src/tss2-fapi/ifapi_helpers.c b/src/tss2-fapi/ifapi_helpers.c index 761dbdfcf..edaf70c34 100644 --- a/src/tss2-fapi/ifapi_helpers.c +++ b/src/tss2-fapi/ifapi_helpers.c @@ -10,7 +10,6 @@ #include // for EEXIST, errno #include // for PRIu16, SCNx32, PRIi32, PRIu32 -#include // for json_object, json_object_put, json_object_to_js... #include // for va_list, va_end, va_copy, va_start #include // for sscanf, vsnprintf, vsprintf, vas... #include // for malloc, calloc, free @@ -27,6 +26,7 @@ #include "ifapi_json_serialize.h" // for ifapi_json_FAPI_QUOTE_INFO_seria... #include "ifapi_macros.h" // for strdup_check, goto_if_error2 #include "ifapi_policy.h" // for ifapi_compute_policy_digest +#include "linkhash.h" // for lh_entry #include "tpm_json_deserialize.h" // for ifapi_parse_json #include "tss2_mu.h" // for Tss2_MU_TPMI_ALG_HASH_Marshal diff --git a/src/tss2-fapi/ifapi_helpers.h b/src/tss2-fapi/ifapi_helpers.h index 5f3086841..533c8996a 100644 --- a/src/tss2-fapi/ifapi_helpers.h +++ b/src/tss2-fapi/ifapi_helpers.h @@ -6,7 +6,7 @@ #ifndef IFAPI_HELPERS_H #define IFAPI_HELPERS_H -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object #include // for bool #include // for size_t #include // for uint8_t diff --git a/src/tss2-fapi/ifapi_ima_eventlog.c b/src/tss2-fapi/ifapi_ima_eventlog.c index 5b1015190..c340c706f 100644 --- a/src/tss2-fapi/ifapi_ima_eventlog.c +++ b/src/tss2-fapi/ifapi_ima_eventlog.c @@ -9,8 +9,7 @@ #endif #include // for PRIu32 -#include // for json_object, json_object_put, json_object_to_js... -#include // for EVP_MD, EVP_get_digestbyname, EVP_MD_size +#include // for EVP_get_digestbyname, EVP_MD, EVP_... #include // for bool, false, true #include // for fread, fclose, FILE, fopen, sprintf #include // for calloc, malloc diff --git a/src/tss2-fapi/ifapi_ima_eventlog.h b/src/tss2-fapi/ifapi_ima_eventlog.h index 8706bd80b..8f0f54b69 100644 --- a/src/tss2-fapi/ifapi_ima_eventlog.h +++ b/src/tss2-fapi/ifapi_ima_eventlog.h @@ -6,14 +6,14 @@ #ifndef IFAPI_IMA_EVENTLOG_H #define IFAPI_IMA_EVENTLOG_H -#include // for json_object, json_object_put, json_object_to_js... -#include // for bool -#include // for size_t -#include // for uint32_t +#include // for json_object +#include // for bool +#include // for size_t +#include // for uint32_t -#include "fapi_types.h" // for UINT8_ARY -#include "tss2_common.h" // for UINT32, TSS2_RC, UINT8 -#include "tss2_tpm2_types.h" // for TPM2_SHA512_DIGEST_SIZE, TPMI_ALG_HASH +#include "fapi_types.h" // for UINT8_ARY +#include "tss2_common.h" // for UINT32, TSS2_RC, UINT8 +#include "tss2_tpm2_types.h" // for TPM2_SHA512_DIGEST_SIZE, TPMI_ALG_HASH /* Defines from kernel ima.h" */ #define TCG_EVENT_NAME_LEN_MAX 255 diff --git a/src/tss2-fapi/ifapi_json_deserialize.c b/src/tss2-fapi/ifapi_json_deserialize.c index de8b3538e..3dcefc10d 100644 --- a/src/tss2-fapi/ifapi_json_deserialize.c +++ b/src/tss2-fapi/ifapi_json_deserialize.c @@ -9,7 +9,6 @@ #endif #include // for int64_t, uint8_t, PRId64 -#include // for json_object, json_object_put, json_object_to_js... #include // for NULL, size_t, sscanf #include // for calloc, malloc #include // for memset, strlen, strdup diff --git a/src/tss2-fapi/ifapi_json_deserialize.h b/src/tss2-fapi/ifapi_json_deserialize.h index a874673ff..acb55045f 100644 --- a/src/tss2-fapi/ifapi_json_deserialize.h +++ b/src/tss2-fapi/ifapi_json_deserialize.h @@ -6,13 +6,13 @@ #ifndef IFAPI_JSON_DESERIALIZE_H #define IFAPI_JSON_DESERIALIZE_H -#include // for json_object, json_object_put, json_object_to_js... -#include // for bool +#include // for json_object +#include // for bool -#include "ifapi_eventlog.h" // for IFAPI_EVENT_TYPE, FAPI_QUOTE_INFO -#include "ifapi_keystore.h" // for IFAPI_KEY, IFAPI_EXT_PUB_KEY, IFAPI_H... -#include "ifapi_macros.h" // for return_if_error2 -#include "tss2_common.h" // for TSS2_RC, UINT32 +#include "ifapi_eventlog.h" // for IFAPI_EVENT_TYPE, FAPI_QUOTE_INFO, IFAPI... +#include "ifapi_keystore.h" // for IFAPI_KEY, IFAPI_EXT_PUB_KEY, IFAPI_HIER... +#include "ifapi_macros.h" // for return_if_error2 +#include "tss2_common.h" // for TSS2_RC, UINT32 #define YES 1 #define NO 0 diff --git a/src/tss2-fapi/ifapi_json_eventlog_deserialize.h b/src/tss2-fapi/ifapi_json_eventlog_deserialize.h index 94db8588f..1f30d96c5 100644 --- a/src/tss2-fapi/ifapi_json_eventlog_deserialize.h +++ b/src/tss2-fapi/ifapi_json_eventlog_deserialize.h @@ -6,7 +6,7 @@ #ifndef IFAPI_JSON_EVENTLOG_DESERIALIZE_H #define IFAPI_JSON_EVENTLOG_DESERIALIZE_H -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object #include // for size_t #include // for uint8_t diff --git a/src/tss2-fapi/ifapi_json_eventlog_serialize.c b/src/tss2-fapi/ifapi_json_eventlog_serialize.c index 1d59d33bc..940adb6bd 100644 --- a/src/tss2-fapi/ifapi_json_eventlog_serialize.c +++ b/src/tss2-fapi/ifapi_json_eventlog_serialize.c @@ -10,12 +10,12 @@ #include // for errno #include // for PRIu8, PRIu64, PRIu16, PRIu32 -#include // for json_object, json_object_put, json_object_to_js... #include // for fclose, fread, fopen, sprintf, FILE #include // for free, calloc, malloc, realloc #include // for strlen, memcpy, strerror, memset -#include // for char16_t, c16rtomb, mbstate_t +#include // for char16_t, c16rtomb #include // for uuid_unparse_lower, uuid_t +#include // for mbstate_t #include "efi_event.h" // for TCG_EVENT2, TCG_SPECID_EVENT, UEF... #include "fapi_crypto.h" // for ifapi_hash_get_digest_size diff --git a/src/tss2-fapi/ifapi_json_eventlog_serialize.h b/src/tss2-fapi/ifapi_json_eventlog_serialize.h index a4a958696..9288d98a9 100644 --- a/src/tss2-fapi/ifapi_json_eventlog_serialize.h +++ b/src/tss2-fapi/ifapi_json_eventlog_serialize.h @@ -6,13 +6,13 @@ #ifndef IFAPI_JSON_EVENTLOG_SERIALIZE_H #define IFAPI_JSON_EVENTLOG_SERIALIZE_H -#include // for json_object, json_object_put, json_object_to_js... -#include // for bool -#include // for size_t -#include // for uint32_t +#include // for json_object +#include // for bool +#include // for size_t +#include // for uint32_t -#include "tss2_common.h" // for TSS2_RC, UINT8 -#include "tss2_tpm2_types.h" // for TPM2_MAX_PCRS +#include "tss2_common.h" // for TSS2_RC, UINT8 +#include "tss2_tpm2_types.h" // for TPM2_MAX_PCRS typedef struct { json_object *jso_event_list; diff --git a/src/tss2-fapi/ifapi_json_serialize.c b/src/tss2-fapi/ifapi_json_serialize.c index 337ff9832..be97a8037 100644 --- a/src/tss2-fapi/ifapi_json_serialize.c +++ b/src/tss2-fapi/ifapi_json_serialize.c @@ -9,7 +9,6 @@ #endif #include // for PRIx32, uint8_t -#include // for json_object, json_object_put, json_object_to_js... #include // for true #include // for NULL, size_t, sprintf #include // for malloc diff --git a/src/tss2-fapi/ifapi_json_serialize.h b/src/tss2-fapi/ifapi_json_serialize.h index 79c61ee31..108359a14 100644 --- a/src/tss2-fapi/ifapi_json_serialize.h +++ b/src/tss2-fapi/ifapi_json_serialize.h @@ -6,7 +6,7 @@ #ifndef IFAPI_JSON_SERIALIZE_H #define IFAPI_JSON_SERIALIZE_H -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object #include "fapi_int.h" // for IFAPI_CAP_INFO, IFAPI_INFO #include "fapi_types.h" // for UINT8_ARY diff --git a/src/tss2-fapi/ifapi_keystore.c b/src/tss2-fapi/ifapi_keystore.c index c9459be6a..363e40328 100644 --- a/src/tss2-fapi/ifapi_keystore.c +++ b/src/tss2-fapi/ifapi_keystore.c @@ -9,7 +9,7 @@ #endif #include // for isalnum -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_put, json_object_to_... #include // for uint8_t #include // for strcmp, strncmp, strlen, strdup #include // for stat diff --git a/src/tss2-fapi/ifapi_policy_json_deserialize.c b/src/tss2-fapi/ifapi_policy_json_deserialize.c index aa11d958c..509961e11 100644 --- a/src/tss2-fapi/ifapi_policy_json_deserialize.c +++ b/src/tss2-fapi/ifapi_policy_json_deserialize.c @@ -9,7 +9,6 @@ #endif #include // for int64_t, PRId64, PRIx64 -#include // for json_object, json_object_put, json_object_to_js... #include // for bool, false, true #include // for size_t, NULL, sscanf #include // for calloc diff --git a/src/tss2-fapi/ifapi_policy_json_deserialize.h b/src/tss2-fapi/ifapi_policy_json_deserialize.h index 36cca037e..a7f63194a 100644 --- a/src/tss2-fapi/ifapi_policy_json_deserialize.h +++ b/src/tss2-fapi/ifapi_policy_json_deserialize.h @@ -6,7 +6,7 @@ #ifndef IFAPI_POLICY_JSON_DESERIALIZE_H #define IFAPI_POLICY_JSON_DESERIALIZE_H -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object #include "ifapi_policy_types.h" // for TPMI_POLICYTYPE, TPML_POLICYAUTHORIZ... #include "tss2_common.h" // for TSS2_RC, UINT32 diff --git a/src/tss2-fapi/ifapi_policy_json_serialize.c b/src/tss2-fapi/ifapi_policy_json_serialize.c index 0fecfc4a9..a031235cb 100644 --- a/src/tss2-fapi/ifapi_policy_json_serialize.c +++ b/src/tss2-fapi/ifapi_policy_json_serialize.c @@ -8,7 +8,6 @@ #endif #include // for PRIx32 -#include // for json_object, json_object_put, json_object_to_js... #include // for NULL, size_t #include // for strcmp, strlen diff --git a/src/tss2-fapi/ifapi_policy_json_serialize.h b/src/tss2-fapi/ifapi_policy_json_serialize.h index 26fb77212..55bed1a0a 100644 --- a/src/tss2-fapi/ifapi_policy_json_serialize.h +++ b/src/tss2-fapi/ifapi_policy_json_serialize.h @@ -8,7 +8,7 @@ -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object #include "ifapi_policy_types.h" // for TPMI_POLICYTYPE, TPML_POLICYAUTHORIZ... #include "tss2_common.h" // for TSS2_RC, UINT32 diff --git a/src/tss2-fapi/ifapi_policy_store.c b/src/tss2-fapi/ifapi_policy_store.c index 58b78341a..83544bcba 100644 --- a/src/tss2-fapi/ifapi_policy_store.c +++ b/src/tss2-fapi/ifapi_policy_store.c @@ -8,10 +8,10 @@ #include "config.h" // IWYU pragma: keep #endif -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_put, json_obj... #include // for uint8_t -#include // for remove -#include // for NULL, free +#include // for NULL, remove +#include // for free #include // for strdup, strlen, memset #include "fapi_int.h" // for IFAPI_FILE_DELIM, IFAPI_P... @@ -19,10 +19,10 @@ #include "ifapi_io.h" // for ifapi_io_path_exists, IFA... #include "ifapi_keystore.h" // for ifapi_check_valid_path #include "ifapi_macros.h" // for goto_if_error2, return_tr... -#include "ifapi_policy_store.h" -#include "ifapi_policy_types.h" // for TPMS_POLICY #include "ifapi_policy_json_deserialize.h" // for ifapi_json_TPMS_POLICY_de... #include "ifapi_policy_json_serialize.h" // for ifapi_json_TPMS_POLICY_se... +#include "ifapi_policy_store.h" +#include "ifapi_policy_types.h" // for TPMS_POLICY #include "tpm_json_deserialize.h" // for ifapi_parse_json #define LOGMODULE fapi diff --git a/src/tss2-fapi/ifapi_profiles.c b/src/tss2-fapi/ifapi_profiles.c index 4ca579699..16c08e796 100644 --- a/src/tss2-fapi/ifapi_profiles.c +++ b/src/tss2-fapi/ifapi_profiles.c @@ -8,7 +8,7 @@ #include "config.h" // for HAVE_REALLOCARRAY #endif -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_get_string #include // for uint8_t #include // for calloc, free, reallocarray #include // for memset, strdup, strlen diff --git a/src/tss2-fapi/tpm_json_deserialize.c b/src/tss2-fapi/tpm_json_deserialize.c index f0918003f..62464aba1 100644 --- a/src/tss2-fapi/tpm_json_deserialize.c +++ b/src/tss2-fapi/tpm_json_deserialize.c @@ -5,24 +5,24 @@ ******************************************************************************/ #ifdef HAVE_CONFIG_H -#include "config.h" // for MAXLOGLEVEL +#include "config.h" // for MAXLOGLEVEL #endif -#include // for tolower, isxdigit -#include // for int64_t, uint8_t, PRId64, PRIu32 -#include // for json_object, json_object_put, json_object_to_js... -#include // for va_arg, va_end, va_list, va_start -#include // for sscanf -#include // for malloc -#include // for memset, strlen, strncmp -#include // for strcasecmp, strncasecmp - -#include "ifapi_helpers.h" // for ifapi_check_json_object_fields -#include "ifapi_macros.h" // for return_if_error2, return_error2 +#include // for tolower, isxdigit +#include // for int64_t, uint8_t, PRId64, PRIu32, PRIx64 +#include // for va_arg, va_end, va_list, va_start +#include // for sscanf +#include // for malloc +#include // for memset, strlen, strncmp +#include // for strcasecmp, strncasecmp + +#include "ifapi_helpers.h" // for ifapi_check_json_object_fields +#include "ifapi_macros.h" // for return_if_error2, return_error2 +#include "linkhash.h" // for lh_entry #include "tpm_json_deserialize.h" #define LOGMODULE fapijson -#include "util/log.h" // for LOG_ERROR, LOG_TRACE, return_if_error +#include "util/log.h" // for LOG_ERROR, LOG_TRACE, return_if_error /* Deserialize according to the rules of parenttype and then filter against values provided in the ... list. */ diff --git a/src/tss2-fapi/tpm_json_deserialize.h b/src/tss2-fapi/tpm_json_deserialize.h index 9b2b629cd..b759a7a75 100644 --- a/src/tss2-fapi/tpm_json_deserialize.h +++ b/src/tss2-fapi/tpm_json_deserialize.h @@ -6,13 +6,13 @@ #ifndef FAPI_TPM_JSON_DESERIALIZE_H #define FAPI_TPM_JSON_DESERIALIZE_H -#include // for json_object, json_object_put, json_object_to_js... -#include // for bool -#include // for size_t +#include // for json_object +#include // for bool +#include // for size_t -#include "fapi_types.h" // for UINT8_ARY -#include "tss2_common.h" // for TSS2_RC, UINT32, BYTE, UINT16, UINT64 -#include "tss2_tpm2_types.h" // for TPM2B_CREATION_DATA, TPM2B_DATA, TPM2... +#include "fapi_types.h" // for UINT8_ARY +#include "tss2_common.h" // for TSS2_RC, UINT32, BYTE, UINT16, UINT64 +#include "tss2_tpm2_types.h" // for TPM2B_CREATION_DATA, TPM2B_DATA, TPM2B_... #define YES 1 #define NO 0 diff --git a/src/tss2-fapi/tpm_json_serialize.c b/src/tss2-fapi/tpm_json_serialize.c index 7b21c153a..a6c80bd79 100644 --- a/src/tss2-fapi/tpm_json_serialize.c +++ b/src/tss2-fapi/tpm_json_serialize.c @@ -8,15 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include // for PRIuPTR, PRIx32, uint8_t, PRIi32 -#include // for json_object, json_object_put, json_object_to_js... -#include // for NULL, size_t, sprintf +#include // for PRIuPTR, PRIx32, uint8_t, PRIi32, PRIu32 +#include // for NULL, size_t, sprintf -#include "ifapi_macros.h" // for check_oom, return_error2 +#include "ifapi_macros.h" // for check_oom, return_error2 #include "tpm_json_serialize.h" #define LOGMODULE fapijson -#include "util/log.h" // for return_error, return_if_error, retur... +#include "util/log.h" // for return_error, return_if_error, return_if_null #define CHECK_IN_LIST(type, needle, ...) \ type tab[] = { __VA_ARGS__ }; \ diff --git a/src/tss2-fapi/tpm_json_serialize.h b/src/tss2-fapi/tpm_json_serialize.h index c68d7486a..65927242b 100644 --- a/src/tss2-fapi/tpm_json_serialize.h +++ b/src/tss2-fapi/tpm_json_serialize.h @@ -6,10 +6,10 @@ #ifndef FAPI_TPM_JSON_SERIALIZE_H #define FAPI_TPM_JSON_SERIALIZE_H -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object -#include "tss2_common.h" // for TSS2_RC, UINT32, INT32, UINT16, UINT64 -#include "tss2_tpm2_types.h" // for TPM2B_CREATION_DATA, TPM2B_DATA, TPM2... +#include "tss2_common.h" // for TSS2_RC, UINT32, INT32, UINT16, UINT64 +#include "tss2_tpm2_types.h" // for TPM2B_CREATION_DATA, TPM2B_DATA, TPM2B_... #define YES 1 #define NO 0 diff --git a/src/tss2-policy/tss2_policy.c b/src/tss2-policy/tss2_policy.c index 939addd8e..3b4c162ab 100644 --- a/src/tss2-policy/tss2_policy.c +++ b/src/tss2-policy/tss2_policy.c @@ -4,10 +4,10 @@ #endif #include // for PRIx16, PRIx32 -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_put, json_obj... #include // for true, bool, false -#include // for free, calloc -#include // for NULL, memcpy, size_t, memset +#include // for NULL, free, size_t, calloc +#include // for memcpy, memset, strlen #include "fapi_crypto.h" // for ifapi_hash_get_digest_size #include "fapi_int.h" // for IFAPI_POLICY_EXEC_CTX @@ -24,6 +24,7 @@ #include "tss2_esys.h" // for ESYS_CONTEXT, ESYS_TR #include "tss2_policy.h" // for TSS2_POLICY_CTX, TSS2_POL... #include "tss2_tpm2_types.h" // for TPM2B_DIGEST, TPMT_HA + #define LOGMODULE "policy" #include "util/log.h" // for LOG_ERROR, str, LOG_TRACE diff --git a/src/tss2-tcti/mpsse/mpsse.c b/src/tss2-tcti/mpsse/mpsse.c index 017e1bcd6..ea56e3cfb 100644 --- a/src/tss2-tcti/mpsse/mpsse.c +++ b/src/tss2-tcti/mpsse/mpsse.c @@ -29,15 +29,13 @@ * SPDX short identifier: BSD-2-Clause */ -#include -#include -#include -#include -#include +#include // for uint8_t, uint32_t, int32_t, uint16_t +#include // for NULL, free, malloc +#include // for memset +#include // for select, timeval #include "mpsse.h" -#include "support.h" -#include "config.h" +#include "support.h" // for is_valid_context, raw_write, set_bits_low /* List of known FT2232-based devices */ struct vid_pid supported_devices[] = { diff --git a/src/tss2-tcti/mpsse/support.c b/src/tss2-tcti/mpsse/support.c index 3781412c6..33b6c2c85 100644 --- a/src/tss2-tcti/mpsse/support.c +++ b/src/tss2-tcti/mpsse/support.c @@ -29,10 +29,11 @@ * SPDX short identifier: BSD-2-Clause */ -#include -#include +#include // for MPSSE_BITMODE, SET_BITS_LOW, ftdi_read_data, ftd... +#include // for malloc, NULL +#include // for memcpy, memset -#include "mpsse.h" +#include "mpsse.h" // for mpsse_context, CMD_SIZE, I2C, HIGH, NUM_GPIOL_PINS #include "support.h" /* Write data to the FTDI chip */ diff --git a/src/tss2-tcti/mpsse/support.h b/src/tss2-tcti/mpsse/support.h index 1197951f2..3707a4d5a 100644 --- a/src/tss2-tcti/mpsse/support.h +++ b/src/tss2-tcti/mpsse/support.h @@ -31,7 +31,9 @@ #ifndef _SUPPORT_H_ #define _SUPPORT_H_ -#include "mpsse.h" +#include // for uint32_t, uint16_t, uint8_t + +struct mpsse_context; int raw_write (struct mpsse_context *mpsse, unsigned char *buf, int size); int raw_read (struct mpsse_context *mpsse, unsigned char *buf, int size); diff --git a/src/tss2-tcti/tcti-libtpms.c b/src/tss2-tcti/tcti-libtpms.c index 508586e06..5f4fcb130 100644 --- a/src/tss2-tcti/tcti-libtpms.c +++ b/src/tss2-tcti/tcti-libtpms.c @@ -8,21 +8,27 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "tss2_tcti_libtpms.h" - +#include // for dlerror, dlsym, dlclose, dlopen, RTLD... +#include // for errno +#include // for open, posix_fallocate, O_CREAT, O_RDWR +#include // for uint32_t, PRIx32, PRIu32, PRIxPTR +#include // for TPM_SUCCESS, TPM_FAIL, TPM_RETRY +#include // for htonl, ntohl +#include // for NULL, ssize_t +#include // for free +#include // for memcpy, strerror, memset, strdup, strlen +#include // for close, lseek, truncate + +#include "tcti-common.h" // for TSS2_TCTI_COMMON_CONTEXT, tpm_header_t #include "tcti-libtpms.h" -#include "tcti-common.h" +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_TCTI_R... +#include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT, TSS2_TCTI_INFO +#include "tss2_tcti_libtpms.h" // for Tss2_Tcti_Libtpms_Init, Tss2_Tcti_Lib... +#include "tss2_tpm2_types.h" // for TPM2_RC_SUCCESS +#include "util/aux_util.h" // for MAYBE_UNUSED, ARRAY_LEN + #define LOGMODULE tcti -#include "util/log.h" +#include "util/log.h" // for LOG_ERROR, LOG_TRACE, LOG_DEBUG, LOGB... /* * libtpms API calls need to be wrapped. We set the current active TCTI module diff --git a/src/tss2-tcti/tcti-libtpms.h b/src/tss2-tcti/tcti-libtpms.h index 63f09dc06..c254daca5 100644 --- a/src/tss2-tcti/tcti-libtpms.h +++ b/src/tss2-tcti/tcti-libtpms.h @@ -7,19 +7,12 @@ #ifndef TCTI_LIBTPMS_H #define TCTI_LIBTPMS_H -#include +#include // for TPMLIB_StateType, TPMLIB_TPMVersion +#include // for TPM_RESULT +#include // for uint32_t, uint8_t +#include // for size_t -#include -#include -#include -#include - -#include -#include -#include - -#include "tcti-common.h" -#include "util/aux_util.h" +#include "tcti-common.h" // for TSS2_TCTI_COMMON_CONTEXT #define TCTI_LIBTPMS_MAGIC 0x49E299A554504D32ULL diff --git a/src/tss2-tcti/tctildr-dl.h b/src/tss2-tcti/tctildr-dl.h index b1c24e8af..673e7255c 100644 --- a/src/tss2-tcti/tctildr-dl.h +++ b/src/tss2-tcti/tctildr-dl.h @@ -5,8 +5,8 @@ #ifndef TCTILDR_DL_H #define TCTILDR_DL_H -#include "tss2_tpm2_types.h" -#include "tss2_tcti.h" +#include "tss2_common.h" // for TSS2_RC +#include "tss2_tcti.h" // for TSS2_TCTI_INFO, TSS2_TCTI_CONTEXT const TSS2_TCTI_INFO* info_from_handle (void *dlhandle); diff --git a/src/tss2-tcti/tctildr-nodl.h b/src/tss2-tcti/tctildr-nodl.h index d46ade42c..a2350f52c 100644 --- a/src/tss2-tcti/tctildr-nodl.h +++ b/src/tss2-tcti/tctildr-nodl.h @@ -5,8 +5,8 @@ #ifndef TCTILDR_NODL_H #define TCTILDR_NODL_H -#include "tss2_tpm2_types.h" -#include "tss2_tcti.h" +#include "tss2_common.h" // for TSS2_RC +#include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT TSS2_RC tctildr_get_default (TSS2_TCTI_CONTEXT **tcti, diff --git a/test/integration/fapi-data-crypt.int.c b/test/integration/fapi-data-crypt.int.c index 889c46e25..aa02e07da 100644 --- a/test/integration/fapi-data-crypt.int.c +++ b/test/integration/fapi-data-crypt.int.c @@ -18,7 +18,7 @@ #include // for memcmp, strlen, strcmp, strncmp #include // for read -#include "test-fapi.h" // for pcr_reset, EXIT_SKIP, test_invoke_fapi +#include "test-fapi.h" // for pcr_reset, EXIT_SKIP, FAPI_PROFILE, tes... #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 diff --git a/test/integration/fapi-export-policy.int.c b/test/integration/fapi-export-policy.int.c index d89d2fbeb..c316065ce 100644 --- a/test/integration/fapi-export-policy.int.c +++ b/test/integration/fapi-export-policy.int.c @@ -8,20 +8,20 @@ #include "config.h" // IWYU pragma: keep #endif -#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... +#include // for json_object_object_get_ex, json_obje... +#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_po... +#include "test-fapi.h" // for pcr_reset, ASSERT, ASSERT_SIZE, test... +#include "tss2_common.h" // for TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, FAPI_CONTEXT, Fapi_Expo... #define LOGMODULE test -#include "util/log.h" // for LOG_ERROR, goto_if_error, SAFE_FREE +#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 02128f0ee..7f0a31dbd 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 // 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... +#include // for uint8_t +#include // for BIO_free, BIO_new_mem_buf +#include // for EVP_PKEY_CTX_free, EVP_PKEY_free, EVP_PKEY_... +#include // for PEM_read_bio_PrivateKey +#include // for EVP_PKEY_CTX_set_rsa_padding, RSA_PKCS1_PAD... +#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_GetCertificate #define LOGMODULE test -#include "test-fapi.h" // for ASSERT, ASSERT_SIZE, test_invoke_fapi -#include "util/log.h" // for goto_if_error, LOG_ERROR, SAFE_FREE, LOG_... +#include "test-fapi.h" // for ASSERT, ASSERT_SIZE, test_invoke_fapi +#include "util/log.h" // for goto_if_error, LOG_ERROR, SAFE_FREE, LOG_INFO /** 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 c5a81962e..8a447ce5e 100644 --- a/test/integration/fapi-get-esys-blobs.int.c +++ b/test/integration/fapi-get-esys-blobs.int.c @@ -8,22 +8,22 @@ #include "config.h" // IWYU pragma: keep #endif -#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 // for json_object_put, json_object, json_obje... +#include // for uint8_t +#include // for NULL, size_t, sprintf +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for memcpy, strncmp + +#include "fapi_int.h" // for FAPI_CONTEXT +#include "test-fapi.h" // for ASSERT, FAPI_PROFILE, EXIT_SKIP, test_i... +#include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, BYTE, TSS2_FA... +#include "tss2_esys.h" // for Esys_FlushContext, Esys_TR_Deserialize +#include "tss2_fapi.h" // for FAPI_CONTEXT, Fapi_Delete, Fapi_GetEsys... +#include "tss2_tpm2_types.h" // for TPM2_ALG_SHA256, TPM2B_AUTH, TPM2B_PUBLIC #define LOGMODULE test -#include "tss2_mu.h" // for Tss2_MU_TPMS_CONTEXT_Unmarshal -#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_ERROR +#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-import-ossl-key.int.c b/test/integration/fapi-import-ossl-key.int.c index 4aef2e3de..a32b6d262 100644 --- a/test/integration/fapi-import-ossl-key.int.c +++ b/test/integration/fapi-import-ossl-key.int.c @@ -8,17 +8,17 @@ #include "config.h" // IWYU pragma: keep #endif -#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 // for json_object_put, json_object_get_string +#include // for NULL +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for strcmp, strdup, strlen, strncmp -#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" // for ASSERT, ASSERT_SIZE, test_invoke_fapi +#include "tss2_common.h" // for TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_ExportKey, Fapi_Import #define LOGMODULE test -#include "util/log.h" // for LOG_ERROR, SAFE_FREE, goto_if_error +#include "util/log.h" // for LOG_ERROR, SAFE_FREE, goto_if_error, LOG_INFO #define SIZE 2000 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 ce9686e18..a6565d1c1 100644 --- a/test/integration/fapi-key-create-null-key-sign.int.c +++ b/test/integration/fapi-key-create-null-key-sign.int.c @@ -8,19 +8,19 @@ #include "config.h" // IWYU pragma: keep #endif -#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 // for json_object_new_string, json_object +#include // for uint8_t +#include // for NULL, size_t, sprintf +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for strncmp -#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" // for init_fapi, fapi_profile, test_invoke_fapi +#include "tss2_common.h" // for TSS2_FAPI_RC_BAD_VALUE, TSS2_RC_SUCCESS +#include "tss2_fapi.h" // for Fapi_CreateKey, Fapi_Delete, Fapi_Finalize +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST #define LOGMODULE test -#include "util/log.h" // for goto_if_error, SAFE_FREE, UNUSED +#include "util/log.h" // for goto_if_error, SAFE_FREE, UNUSED, retur... #define PASSWORD "abc" #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 ae0c059c2..0a30e5475 100644 --- a/test/integration/fapi-key-create-policy-pcr-sign.int.c +++ b/test/integration/fapi-key-create-policy-pcr-sign.int.c @@ -8,20 +8,20 @@ #include "config.h" // IWYU pragma: keep #endif -#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 // for json_object_object_get_ex, json_object_put +#include // for uint8_t +#include // for NULL, fopen, fclose, fileno, fseek, ftell +#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, pcr_r... +#include "tss2_common.h" // for BYTE, TSS2_FAPI_RC_MEMORY, TSS2_RC, TSS... +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_ExportPolicy, Fapi_Cr... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST #define LOGMODULE test -#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_ERROR +#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-signed-keyedhash.int.c b/test/integration/fapi-key-create-policy-signed-keyedhash.int.c index fe2a42a34..f21462079 100644 --- a/test/integration/fapi-key-create-policy-signed-keyedhash.int.c +++ b/test/integration/fapi-key-create-policy-signed-keyedhash.int.c @@ -20,8 +20,7 @@ #if OPENSSL_VERSION_NUMBER < 0x30000000L #include #else -#include // for OSSL_ALG_PARAM_DIGEST -#include // for EVP_MD, OSSL_PARAM, EVP_CIPHER, EVP_... +#include // for OSSL_PARAM_construct_end, OSSL_PARAM_c... #endif #include "test-fapi.h" // for ASSERT, pcr_reset, FAPI_PROFILE, test_... diff --git a/test/integration/fapi-key-create-primary-sign.int.c b/test/integration/fapi-key-create-primary-sign.int.c index ebeba500a..586cb7705 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 // 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 // for json_object_put, json_object, json_obje... +#include // for uint8_t +#include // for NULL, size_t, sprintf +#include // for EXIT_FAILURE, EXIT_SUCCESS +#include // for strlen, strncmp -#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" // for ASSERT, ASSERT_SIZE, fapi_profile, test... +#include "tss2_common.h" // for BYTE, TSS2_RC, 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" // for SAFE_FREE, goto_if_error, UNUSED +#include "util/log.h" // for SAFE_FREE, goto_if_error, UNUSED, retur... #define PASSWORD "abc" #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 251b4c18d..5a7508421 100644 --- a/test/integration/fapi-key-create-sign.int.c +++ b/test/integration/fapi-key-create-sign.int.c @@ -8,20 +8,20 @@ #include "config.h" // IWYU pragma: keep #endif -#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 // for json_object_object_add, json_object_put +#include // for uint8_t +#include // for NULL, size_t, sprintf +#include // for EXIT_FAILURE, EXIT_SUCCESS +#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_RC... +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_GetDescription, Fapi_... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST #define LOGMODULE test -#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_INFO +#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_INFO, ret... #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 0e66701e0..7106b2acf 100644 --- a/test/integration/fapi-key-create2-sign.int.c +++ b/test/integration/fapi-key-create2-sign.int.c @@ -8,22 +8,22 @@ #include "config.h" // IWYU pragma: keep #endif -#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 // for json_object_object_add, json_object_put +#include // for bool, false, true +#include // for uint8_t +#include // for NULL, size_t, fopen, fclose, fileno, fseek +#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_PR... +#include "tss2_common.h" // for BYTE, TSS2_FAPI_RC_GENERAL_FAILURE, TSS... +#include "tss2_fapi.h" // for Fapi_CreateKey, Fapi_Import, Fapi_Verif... +#include "tss2_tpm2_types.h" // for TPM2B_DIGEST #define LOGMODULE test -#include "util/log.h" // for goto_if_error, SAFE_FREE, LOG_ERROR +#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-quote-destructive-eventlog.int.c b/test/integration/fapi-quote-destructive-eventlog.int.c index 7d199d265..df1f8072b 100644 --- a/test/integration/fapi-quote-destructive-eventlog.int.c +++ b/test/integration/fapi-quote-destructive-eventlog.int.c @@ -7,21 +7,21 @@ #ifdef HAVE_CONFIG_H #include "config.h" // IWYU pragma: keep #endif -#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 // for json_object_put, json_object, json_obje... +#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_exists +#include "tss2_common.h" // for TSS2_FAPI_RC_MEMORY, TSS2_FAPI_RC_GENER... +#include "tss2_fapi.h" // for Fapi_PcrExtend, Fapi_Delete, Fapi_Verif... +#include "tss2_tpm2_types.h" // for TPM2_ALG_SHA1, TPM2_ALG_SHA256, TPML_DI... #define LOGMODULE test #define LOGDEFAULT LOGLEVEL_INFO -#include "util/log.h" // for LOGLEVEL_INFO, SAFE_FREE, goto_if_e... +#include "util/log.h" // for LOGLEVEL_INFO, SAFE_FREE, goto_if_error #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 f102d839f..c06f7737d 100644 --- a/test/integration/fapi-quote-with-primary.int.c +++ b/test/integration/fapi-quote-with-primary.int.c @@ -7,19 +7,19 @@ #ifdef HAVE_CONFIG_H #include "config.h" // IWYU pragma: keep #endif -#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 // for json_object_put, json_object_get_string +#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... +#include "ifapi_eventlog.h" // for CONTENT, CONTENT_TYPE +#include "test-fapi.h" // for ASSERT, ASSERT_SIZE, pcr_reset, CHECK_JS... +#include "tss2_common.h" // for TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_CreateKey, Fapi_ExportKey #define LOGMODULE test -#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_INFO +#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_INFO, LOG_... #define EVENT_SIZE 10 diff --git a/test/integration/fapi-quote.int.c b/test/integration/fapi-quote.int.c index 9adb0dacd..f804f20a2 100644 --- a/test/integration/fapi-quote.int.c +++ b/test/integration/fapi-quote.int.c @@ -7,20 +7,20 @@ #ifdef HAVE_CONFIG_H #include "config.h" // IWYU pragma: keep #endif -#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 +#include // for json_object_put, json_object_get_string +#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, pcr... +#include "tss2_common.h" // for TSS2_RC +#include "tss2_fapi.h" // for Fapi_Delete, Fapi_VerifyQuote, Fapi_Cre... +#include "tss2_tpm2_types.h" // for TPM2_RC_SUCCESS #define LOGMODULE test -#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_INFO +#include "util/log.h" // for SAFE_FREE, goto_if_error, LOG_INFO, LOG... #define EVENT_SIZE 10 diff --git a/test/integration/main-fapi.c b/test/integration/main-fapi.c index 41991184f..25896368e 100644 --- a/test/integration/main-fapi.c +++ b/test/integration/main-fapi.c @@ -9,14 +9,14 @@ #endif #include // for PRIx32, int64_t, PRId64, PRIu16 -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_get_string, json_object... #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 EVP_PKEY_free, EVP_PKEY, EVP_PKEY_C... #include // for NID_sm2, NID_X9_62_prime192v1, NID_... #include // for OBJ_nid2sn #include // for OPENSSL_VERSION_NUMBER @@ -25,26 +25,27 @@ #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 free, calloc, setenv, malloc, mkdtemp #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 // 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 // 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 "linkhash.h" // for lh_entry +#include "test-common.h" // for TSS2_TEST_FAPI_CONTEXT, TSS2_TEST_E... +#include "test-fapi.h" // for EXIT_ERROR, test_invoke_fapi, ASSERT #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_fapi.h" // for Fapi_GetTcti, Fapi_Finalize, FAPI_C... #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 diff --git a/test/integration/sys-util.c b/test/integration/sys-util.c index 7d4084c04..e7a96cdb4 100644 --- a/test/integration/sys-util.c +++ b/test/integration/sys-util.c @@ -10,16 +10,16 @@ #include // for assert #include // for uint8_t, uint32_t -#include // for EVP_MD_CTX_free, EVP_sm3, EVP_CIPHER... +#include // for EVP_MD, EVP_MD_CTX_free, EVP_sm3 #include // for OPENSSL_VERSION_NUMBER #include // for SHA1, SHA256, SHA384, SHA512 -#include // for NULL, calloc, exit, free, size_t +#include // for calloc, exit, free #include // for memcpy, memcmp, memmove #if OPENSSL_VERSION_NUMBER < 0x30000000L #include #else #include // for OSSL_ALG_PARAM_DIGEST -#include // for EVP_MD, OSSL_PARAM, EVP_CIPHER, EVP_... +#include // for OSSL_PARAM_construct_end, OSSL_PARAM... #endif #define LOGMODULE testintegration diff --git a/test/integration/test-fapi.h b/test/integration/test-fapi.h index 69253fba4..ccf4c9119 100644 --- a/test/integration/test-fapi.h +++ b/test/integration/test-fapi.h @@ -9,7 +9,7 @@ #include #endif #include -#include +#include #include #include #include diff --git a/test/unit/CommonPreparePrologue.c b/test/unit/CommonPreparePrologue.c index 276a96339..8e17a4194 100644 --- a/test/unit/CommonPreparePrologue.c +++ b/test/unit/CommonPreparePrologue.c @@ -8,10 +8,10 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test_setup_te... #include // for NULL #include // for calloc, free +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test_setup_te... #include "sysapi_util.h" // for CommonPreparePrologue, _TSS2_SYS_CONTEXT_BLOB #include "tss2_common.h" // for TSS2_RC, TSS2_SYS_RC_BAD_SEQUENCE, TSS2_SYS... #include "tss2_sys.h" // for Tss2_Sys_GetContextSize diff --git a/test/unit/TPM2B-marshal.c b/test/unit/TPM2B-marshal.c index 11a252316..2a83ddb00 100644 --- a/test/unit/TPM2B-marshal.c +++ b/test/unit/TPM2B-marshal.c @@ -8,12 +8,12 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include // for le32toh, le64toh #include // for uint8_t, uint32_t, uint64_t, uint16_t #include // for NULL, size_t #include // for memcpy +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, TSS2_MU_RC_B... #include "tss2_mu.h" // for Tss2_MU_TPM2B_DIGEST_Marshal, Tss2_MU_... #include "tss2_tpm2_types.h" // for TPM2B_ECC_POINT, TPM2B_DIGEST, TPM2B_E... diff --git a/test/unit/TPMA-marshal.c b/test/unit/TPMA-marshal.c index 612c4db5a..c27856b77 100644 --- a/test/unit/TPMA-marshal.c +++ b/test/unit/TPMA-marshal.c @@ -8,10 +8,10 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include // for NULL, size_t #include // for uint8_t, uint32_t +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_MU_RC_B... #include "tss2_mu.h" // for Tss2_MU_TPMA_ALGORITHM_Marshal, Tss2_M... #include "tss2_tpm2_types.h" // for TPMA_ALGORITHM, TPMA_SESSION, TPMA_ALG... diff --git a/test/unit/TPML-marshal.c b/test/unit/TPML-marshal.c index c2f52ac4a..67044cecb 100644 --- a/test/unit/TPML-marshal.c +++ b/test/unit/TPML-marshal.c @@ -8,11 +8,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include // for NULL, size_t #include // for uint8_t #include // for memcpy +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include "tss2_common.h" // for BYTE, TSS2_RC_SUCCESS, TSS2_RC, TSS2_M... #include "tss2_mu.h" // for Tss2_MU_TPML_HANDLE_Marshal, Tss2_MU_T... #include "tss2_tpm2_types.h" // for TPMS_PCR_SELECTION, TPML_PCR_SELECTION diff --git a/test/unit/TPMS-marshal.c b/test/unit/TPMS-marshal.c index 84d428b74..8a69b24ab 100644 --- a/test/unit/TPMS-marshal.c +++ b/test/unit/TPMS-marshal.c @@ -8,10 +8,10 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include // for NULL, size_t #include // for uint8_t, uint32_t, uint16_t +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, TSS2_MU_RC_B... #include "tss2_mu.h" // for Tss2_MU_TPMS_CAPABILITY_DATA_Marshal #include "tss2_tpm2_types.h" // for TPMS_CAPABILITY_DATA, TPMS_ALG_PROPERTY diff --git a/test/unit/TPMT-marshal.c b/test/unit/TPMT-marshal.c index 3b48a2055..3162c2d1f 100644 --- a/test/unit/TPMT-marshal.c +++ b/test/unit/TPMT-marshal.c @@ -8,10 +8,10 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include // for NULL, size_t #include // for uint8_t +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include "tss2_common.h" // for BYTE, TSS2_RC, TSS2_RC_SUCCESS, TSS2_M... #include "tss2_mu.h" // for Tss2_MU_TPMT_PUBLIC_PARMS_Unmarshal #include "tss2_tpm2_types.h" // for TPMT_TK_CREATION, TPM2B_DIGEST, TPMT_P... diff --git a/test/unit/TPMU-marshal.c b/test/unit/TPMU-marshal.c index 7b9d79e36..182f009e0 100644 --- a/test/unit/TPMU-marshal.c +++ b/test/unit/TPMU-marshal.c @@ -8,11 +8,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include // for NULL, size_t #include // for uint8_t #include // for memset, memcmp, memcpy +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include "tss2_common.h" // for BYTE, TSS2_RC_SUCCESS, TSS2_RC, TSS2_M... #include "tss2_mu.h" // for Tss2_MU_TPMU_HA_Marshal, Tss2_MU_TPMU_... #include "tss2_tpm2_types.h" // for TPM2B_ECC_PARAMETER, TPMS_SIGNATURE_ECDSA diff --git a/test/unit/UINT16-marshal.c b/test/unit/UINT16-marshal.c index 9261868cb..ee82a495a 100644 --- a/test/unit/UINT16-marshal.c +++ b/test/unit/UINT16-marshal.c @@ -8,10 +8,10 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test, CMUnitTest #include // for uint8_t #include // for NULL, size_t +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test, CMUnitTest #include "tss2_common.h" // for UINT16, TSS2_RC, TSS2_RC_SUCCESS, TSS2_MU_R... #include "tss2_mu.h" // for Tss2_MU_UINT16_Marshal, Tss2_MU_UINT16_Unma... diff --git a/test/unit/UINT32-marshal.c b/test/unit/UINT32-marshal.c index ab55b3420..0ea8b0e11 100644 --- a/test/unit/UINT32-marshal.c +++ b/test/unit/UINT32-marshal.c @@ -8,10 +8,10 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include // for uint8_t #include // for NULL, size_t +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include "tss2_common.h" // for UINT32, TSS2_RC, TSS2_RC_SUCCESS, TSS2... #include "tss2_mu.h" // for Tss2_MU_UINT32_Marshal, Tss2_MU_UINT32... #include "util/tss2_endian.h" // for HOST_TO_BE_32 diff --git a/test/unit/UINT64-marshal.c b/test/unit/UINT64-marshal.c index 7e28a80bf..bc515de0a 100644 --- a/test/unit/UINT64-marshal.c +++ b/test/unit/UINT64-marshal.c @@ -8,10 +8,10 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include // for uint8_t #include // for NULL, size_t +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include "tss2_common.h" // for UINT64, TSS2_RC, TSS2_RC_SUCCESS, TSS2... #include "tss2_mu.h" // for Tss2_MU_UINT64_Marshal, Tss2_MU_UINT64... #include "util/tss2_endian.h" // for HOST_TO_BE_64 diff --git a/test/unit/UINT8-marshal.c b/test/unit/UINT8-marshal.c index 0d1cc7ffa..2ae647d75 100644 --- a/test/unit/UINT8-marshal.c +++ b/test/unit/UINT8-marshal.c @@ -8,10 +8,10 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test, CMUnitTest #include // for uint8_t #include // for NULL, size_t +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test, CMUnitTest #include "tss2_common.h" // for TSS2_RC, UINT8, TSS2_RC_SUCCESS, TSS2_MU_RC... #include "tss2_mu.h" // for Tss2_MU_UINT8_Unmarshal, Tss2_MU_UINT8_Marshal diff --git a/test/unit/dlopen-fail.c b/test/unit/dlopen-fail.c index a863f28bf..4ece552eb 100644 --- a/test/unit/dlopen-fail.c +++ b/test/unit/dlopen-fail.c @@ -4,10 +4,10 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for will_return, assert_int_equal, cmocka_unit... #include // for NULL, fprintf, stderr #include // for exit +#include "../helper/cmocka_all.h" // for will_return, assert_int_equal, cmocka_unit... #include "tss2_common.h" // for TSS2_BASE_RC_NOT_IMPLEMENTED, TSS2_RC, TSS... #include "tss2_esys.h" // for Esys_Initialize #include "tss2_fapi.h" // for Fapi_Initialize, Fapi_Initialize_Async diff --git a/test/unit/esys-ac-getcapability.c b/test/unit/esys-ac-getcapability.c index a84e15068..3b2fa3863 100644 --- a/test/unit/esys-ac-getcapability.c +++ b/test/unit/esys-ac-getcapability.c @@ -8,12 +8,12 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, CMUnitTest, cmo... #include // for uint8_t, int32_t, uint32_t, uint64_t #include // for NULL, size_t #include // for free, malloc #include // for memcpy, memset +#include "../helper/cmocka_all.h" // for assert_int_equal, CMUnitTest, cmo... #include "tss2-tcti/tcti-common.h" // for header_unmarshal, tpm_header_t #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_TC... #include "tss2_esys.h" // for ESYS_CONTEXT, ESYS_TR_NONE, Esys_... diff --git a/test/unit/esys-ac-send.c b/test/unit/esys-ac-send.c index 2a9f0bb7b..216f72003 100644 --- a/test/unit/esys-ac-send.c +++ b/test/unit/esys-ac-send.c @@ -8,11 +8,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, CMUnitTest, cmo... #include // for uint8_t, int32_t, uint32_t, uint64_t #include // for NULL, size_t, free, malloc #include // for memcpy, memset +#include "../helper/cmocka_all.h" // for assert_int_equal, CMUnitTest, cmo... #include "tss2-tcti/tcti-common.h" // for header_unmarshal, tpm_header_t #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_TC... #include "tss2_esys.h" // for ESYS_CONTEXT, ESYS_TR_NONE, Esys_... diff --git a/test/unit/esys-context-null.c b/test/unit/esys-context-null.c index d01c9f6d7..7c526d2a7 100644 --- a/test/unit/esys-context-null.c +++ b/test/unit/esys-context-null.c @@ -8,9 +8,10 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test, CMUnitTest #include // for NULL +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test, CMUnitTest + #define LOGMODULE test #include // for ESYS_TR_NONE, ESYS_TR_PASSWORD, Esys_AC_Get... diff --git a/test/unit/esys-crypto.c b/test/unit/esys-crypto.c index 189950bc3..05b4b548b 100644 --- a/test/unit/esys-crypto.c +++ b/test/unit/esys-crypto.c @@ -8,10 +8,10 @@ #include "config.h" // for HAVE_EVP_SM4_CFB #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include // for uint8_t #include // for NULL, size_t, malloc +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test #include "esys_crypto.h" // for iesys_initialize_crypto_backend, iesys... #include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_ESYS_RC_BAD_REFE... #include "tss2_esys.h" // for ESYS_CRYPTO_CALLBACKS, Esys_GetSysContext diff --git a/test/unit/esys-getpollhandles.c b/test/unit/esys-getpollhandles.c index 95ae8360e..bb4c9b04e 100644 --- a/test/unit/esys-getpollhandles.c +++ b/test/unit/esys-getpollhandles.c @@ -8,11 +8,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, CMUnitTest, assert_memory... #include // for uint32_t, uint64_t, uint8_t #include // for NULL, free, size_t, malloc #include // for memcpy, memset +#include "../helper/cmocka_all.h" // for assert_int_equal, CMUnitTest, assert_memory... #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_TCTI_RC_BAD_... #include "tss2_esys.h" // for ESYS_CONTEXT, Esys_Finalize, Esys_GetPollHa... #include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT, TSS2_TCTI_POLL_HANDLE diff --git a/test/unit/esys-nulltcti.c b/test/unit/esys-nulltcti.c index f32c70f46..ae9fa94c1 100644 --- a/test/unit/esys-nulltcti.c +++ b/test/unit/esys-nulltcti.c @@ -8,9 +8,9 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for CMUnitTest, assert_int_equal, assert_ptr_... #include // for NULL, calloc, free +#include "../helper/cmocka_all.h" // for CMUnitTest, assert_int_equal, assert_ptr_... #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_BASE_RC_GE... #include "tss2_esys.h" // for Esys_Finalize, Esys_Initialize, ESYS_CONTEXT #include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT, TSS2_TCTI_CANCEL, TSS2... diff --git a/test/unit/esys-policy-ac-sendselect.c b/test/unit/esys-policy-ac-sendselect.c index 3ef6008eb..c59af8cb4 100644 --- a/test/unit/esys-policy-ac-sendselect.c +++ b/test/unit/esys-policy-ac-sendselect.c @@ -8,11 +8,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, CMUnitTest, cmo... #include // for uint8_t, int32_t, uint32_t, uint64_t #include // for NULL, size_t, free, malloc #include // for memcpy, memset +#include "../helper/cmocka_all.h" // for assert_int_equal, CMUnitTest, cmo... #include "tss2-tcti/tcti-common.h" // for header_unmarshal, tpm_header_t #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_TC... #include "tss2_esys.h" // for ESYS_CONTEXT, ESYS_TR_NONE, Esys_... diff --git a/test/unit/esys-resubmissions.c b/test/unit/esys-resubmissions.c index c38ebb63e..582fd9113 100644 --- a/test/unit/esys-resubmissions.c +++ b/test/unit/esys-resubmissions.c @@ -8,11 +8,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test... #include // for uint8_t, uint32_t, int32_t, uint64_t #include // for NULL, size_t, free, malloc #include // for memcpy, memset +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test... #include "esys_int.h" // for RSRC_NODE_T #include "esys_types.h" // for IESYS_RESOURCE, IESYSC_WITHOUT_MIS... #include "tss2-esys/esys_iutil.h" // for esys_CreateResourceObject diff --git a/test/unit/esys-sequence-finish.c b/test/unit/esys-sequence-finish.c index ec2f8712c..3acd94d0b 100644 --- a/test/unit/esys-sequence-finish.c +++ b/test/unit/esys-sequence-finish.c @@ -8,11 +8,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test_setu... #include // for uint8_t, int32_t #include // for size_t, NULL, calloc, free #include // for memcpy +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test_setu... #include "esys_int.h" // for _ESYS_STATE, _ESYS_STATE_INIT, _ESYS_ST... #include "tss2_common.h" // for TSS2_RC, TSS2_ESYS_RC_BAD_SEQUENCE, TSS... #include "tss2_esys.h" // for ESYS_CONTEXT, ESYS_TR, Esys_AC_GetCapab... diff --git a/test/unit/esys-tcti-rcs.c b/test/unit/esys-tcti-rcs.c index 947efb7ac..36cf7840e 100644 --- a/test/unit/esys-tcti-rcs.c +++ b/test/unit/esys-tcti-rcs.c @@ -8,11 +8,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test... #include // for uint8_t, PRIu32, uint32_t, int32_t #include // for NULL, exit, size_t, free, malloc #include // for memset +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test... #include "esys_int.h" // for RSRC_NODE_T #include "esys_types.h" // for IESYS_RESOURCE, IESYSC_WITHOUT_MIS... #include "tss2-esys/esys_iutil.h" // for esys_CreateResourceObject diff --git a/test/unit/esys-tpm-rcs.c b/test/unit/esys-tpm-rcs.c index d72e9d76e..311034e67 100644 --- a/test/unit/esys-tpm-rcs.c +++ b/test/unit/esys-tpm-rcs.c @@ -8,11 +8,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test... #include // for uint8_t, int32_t, uint32_t, uint64_t #include // for NULL, size_t, free, malloc #include // for memcpy, memset +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test... #include "esys_int.h" // for RSRC_NODE_T #include "esys_types.h" // for IESYS_RESOURCE, IESYSC_WITHOUT_MIS... #include "tss2-esys/esys_iutil.h" // for esys_CreateResourceObject diff --git a/test/unit/esys-vendor.c b/test/unit/esys-vendor.c index 82bf9f430..e88e2479d 100644 --- a/test/unit/esys-vendor.c +++ b/test/unit/esys-vendor.c @@ -4,12 +4,12 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, assert_true, will_ret... #include // for uint8_t, int32_t #include // for false #include // for NULL, size_t, calloc, free, strtol #include // for strcmp, strlen +#include "../helper/cmocka_all.h" // for assert_int_equal, assert_true, will_ret... #include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, UINT16, TSS2_... #include "tss2_esys.h" // for ESYS_TR_NONE, Esys_Finalize, Esys_Free #include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT, TSS2_TCTI_CANCEL diff --git a/test/unit/fapi-check-ima-log.c b/test/unit/fapi-check-ima-log.c index f252de0d8..0e536b717 100644 --- a/test/unit/fapi-check-ima-log.c +++ b/test/unit/fapi-check-ima-log.c @@ -8,13 +8,13 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for cmocka_unit_test, assert_int_equal #include // for uint32_t, uint8_t -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_put, json_object #include // for bool #include // for NULL, fprintf, stderr #include // for strdup +#include "../helper/cmocka_all.h" // for cmocka_unit_test, assert_int_equal #include "ifapi_eventlog.h" // for ifapi_cleanup_event, IFAPI_EVENT #include "ifapi_ima_eventlog.h" // for ifapi_read_ima_event_log #include "ifapi_json_deserialize.h" // for ifapi_json_IFAPI_EVENT_deserialize diff --git a/test/unit/fapi-config.c b/test/unit/fapi-config.c index 372282923..d3afe5193 100644 --- a/test/unit/fapi-config.c +++ b/test/unit/fapi-config.c @@ -8,20 +8,20 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_ptr_not_equal, assert_true -#include // for uint8_t -#include // for json_object, json_object_put, json_object_to_js... -#include // for NULL, size_t -#include // for getenv -#include // for strlen, strncmp, strdup - -#include "ifapi_config.h" // for IFAPI_CONFIG, ifapi_config_initiali... -#include "ifapi_io.h" // for IFAPI_IO -#include "tss2_common.h" // for TSS2_FAPI_RC_BAD_VALUE, TSS2_RC -#include "util/aux_util.h" // for SAFE_FREE +#include // for uint8_t +#include // for json_object_object_del, json_objec... +#include // for NULL, size_t +#include // for getenv +#include // for strlen, strncmp, strdup + +#include "../helper/cmocka_all.h" // for assert_ptr_not_equal, assert_true +#include "ifapi_config.h" // for IFAPI_CONFIG, ifapi_config_initial... +#include "ifapi_io.h" // for IFAPI_IO +#include "tss2_common.h" // for TSS2_FAPI_RC_BAD_VALUE, TSS2_RC +#include "util/aux_util.h" // for SAFE_FREE #define LOGMODULE tests -#include "util/log.h" // for LOG_WARNING +#include "util/log.h" // for LOG_WARNING /* * The unit tests will test deserialization of FAPI config files. It will be diff --git a/test/unit/fapi-eventlog.c b/test/unit/fapi-eventlog.c index 995e9ebb9..3b859e39f 100644 --- a/test/unit/fapi-eventlog.c +++ b/test/unit/fapi-eventlog.c @@ -8,14 +8,14 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for cmocka_unit_test, assert_... #include // for uint32_t, uint8_t, UINT16... -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_put, json_object #include // for bool #include // for NULL, size_t, fread, fopen #include // for calloc, free #include // for memcmp, memcpy, strdup +#include "../helper/cmocka_all.h" // for cmocka_unit_test, assert_... #include "ifapi_eventlog.h" // for ifapi_cleanup_event, IFAP... #include "ifapi_helpers.h" // for IFAPI_PCR_REG, ifapi_calc... #include "ifapi_json_deserialize.h" // for ifapi_json_IFAPI_EVENT_de... diff --git a/test/unit/fapi-get-web-cert.c b/test/unit/fapi-get-web-cert.c index 6b783bfed..9ae10191c 100644 --- a/test/unit/fapi-get-web-cert.c +++ b/test/unit/fapi-get-web-cert.c @@ -8,18 +8,18 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test_s... -#include // for EVP_MD_CTX -#include // for size_t, NULL -#include // for calloc -#include // for strdup, strlen - -#include "fapi_int.h" // for VENDOR_INTC, VENDOR_AMD, FAPI_CONTEXT -#include "ifapi_get_web_cert.h" // for ifapi_get_web_ek_certificate -#include "tss2_common.h" // for TSS2_FAPI_RC_NO_CERT, TSS2_RC, TSS2_... -#include "tss2_fapi.h" // for FAPI_CONTEXT -#include "tss2_tpm2_types.h" // for TPM2_ALG_NULL, TPM2B_PUBLIC, TPM2_AL... -#include "util/aux_util.h" // for SAFE_FREE, UNUSED +#include // for EVP_MD_CTX +#include // for size_t, NULL +#include // for calloc +#include // for strdup, strlen + +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_test... +#include "fapi_int.h" // for VENDOR_INTC, VENDOR_AMD, FAPI_CONTEXT +#include "ifapi_get_web_cert.h" // for ifapi_get_web_ek_certificate +#include "tss2_common.h" // for TSS2_FAPI_RC_NO_CERT, TSS2_RC, TSS... +#include "tss2_fapi.h" // for FAPI_CONTEXT +#include "tss2_tpm2_types.h" // for TPM2_ALG_NULL, TPM2B_PUBLIC, TPM2_... +#include "util/aux_util.h" // for SAFE_FREE, UNUSED #define LOGMODULE tests #include "util/log.h" diff --git a/test/unit/fapi-helpers.c b/test/unit/fapi-helpers.c index de53660c4..82c4ab469 100644 --- a/test/unit/fapi-helpers.c +++ b/test/unit/fapi-helpers.c @@ -8,11 +8,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, assert_true, cmocka_u... #include // for uint8_t #include // for false, bool, true #include // for size_t, NULL +#include "../helper/cmocka_all.h" // for assert_int_equal, assert_true, cmocka_u... #include "fapi_crypto.h" // for ifapi_get_profile_sig_scheme, IFAPI_CRY... #include "ifapi_helpers.h" // for ifapi_get_name, ifapi_TPMT_PUBLIC_cmp #include "ifapi_profiles.h" // for IFAPI_PROFILE diff --git a/test/unit/fapi-ima-eventlog.c b/test/unit/fapi-ima-eventlog.c index 28071b22b..5a2c4ad4c 100644 --- a/test/unit/fapi-ima-eventlog.c +++ b/test/unit/fapi-ima-eventlog.c @@ -8,13 +8,13 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, assert_non_null #include // for uint32_t -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_put, json_object #include // for OpenSSL_add_all_digests #include // for NULL, fprintf, stderr #include // for strdup +#include "../helper/cmocka_all.h" // for assert_int_equal, assert_non_null #include "ifapi_eventlog.h" // for ifapi_cleanup_event, IFAPI_EVENT #include "ifapi_ima_eventlog.h" // for ifapi_get_ima_eventname, ifapi_r... #include "ifapi_json_deserialize.h" // for ifapi_json_IFAPI_EVENT_deserialize diff --git a/test/unit/fapi-io.c b/test/unit/fapi-io.c index 61141ce89..db3a9d034 100644 --- a/test/unit/fapi-io.c +++ b/test/unit/fapi-io.c @@ -8,7 +8,6 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for will_return, assert_int_equal, mock_type #include // for errno, EAGAIN #include // for uint8_t #include // for false, true, bool @@ -17,6 +16,7 @@ #include // for stat #include // for R_OK +#include "../helper/cmocka_all.h" // for will_return, assert_int_equal, mock_type #include "ifapi_io.h" // for IFAPI_IO, ifapi_io_read_async, ifapi_io_rea... #include "tss2_common.h" // for TSS2_FAPI_RC_IO_ERROR, TSS2_RC, TSS2_FAPI_R... diff --git a/test/unit/fapi-json.c b/test/unit/fapi-json.c index a53628e34..e5c58f832 100644 --- a/test/unit/fapi-json.c +++ b/test/unit/fapi-json.c @@ -8,12 +8,12 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, assert_... -#include // for json_object, json_object_put, json_object_to_js... +#include // for json_object_put, json_tok... #include // for fprintf, stderr, NULL #include // for free, calloc, malloc #include // for strdup, memset, strcmp +#include "../helper/cmocka_all.h" // for assert_int_equal, assert_... #include "fapi_types.h" // for UINT8_ARY #include "ifapi_helpers.h" // for ifapi_cleanup_policy #include "ifapi_json_deserialize.h" // for ifapi_json_IFAPI_OBJECT_d... diff --git a/test/unit/fapi-profiles.c b/test/unit/fapi-profiles.c index 6bad3f69c..f71cc39b3 100644 --- a/test/unit/fapi-profiles.c +++ b/test/unit/fapi-profiles.c @@ -8,21 +8,21 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_ptr_not_equal, cmocka_unit_test -#include // for uint8_t -#include // for json_object, json_object_put, json_object_to_js... -#include // for NULL, fopen, fclose, fileno, fseek -#include // for calloc, malloc -#include // for strdup -#include // for read - -#include "ifapi_io.h" // for IFAPI_IO -#include "ifapi_profiles.h" // for IFAPI_PROFILES, IFAPI_PROFILE_ENTRY -#include "tss2_common.h" // for TSS2_FAPI_RC_BAD_VALUE, TSS2_RC -#include "util/aux_util.h" // for SAFE_FREE +#include // for uint8_t +#include // for json_object, json_object_object_del +#include // for NULL, fopen, fclose, fileno, fseek +#include // for calloc, malloc +#include // for strdup +#include // for read + +#include "../helper/cmocka_all.h" // for assert_ptr_not_equal, cmocka_unit_... +#include "ifapi_io.h" // for IFAPI_IO +#include "ifapi_profiles.h" // for IFAPI_PROFILES, IFAPI_PROFILE_ENTRY +#include "tss2_common.h" // for TSS2_FAPI_RC_BAD_VALUE, TSS2_RC +#include "util/aux_util.h" // for SAFE_FREE #define LOGMODULE tests -#include "util/log.h" // for LOG_ERROR +#include "util/log.h" // for LOG_ERROR /* * The unit tests will test deserialization of FAPI profiles. It will be diff --git a/test/unit/io.c b/test/unit/io.c index 33dce8e72..6587b80ae 100644 --- a/test/unit/io.c +++ b/test/unit/io.c @@ -8,13 +8,13 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for will_return, assert_int_equal, cmocka_unit_... #include // for EINVAL, ENOTSOCK, errno #include // for uint8_t, PRIxPTR, uintptr_t #include // for ssize_t, NULL, size_t #include // for memset #include // for socklen_t +#include "../helper/cmocka_all.h" // for will_return, assert_int_equal, cmocka_unit_... #include "tss2_common.h" // for TSS2_RC, TSS2_TCTI_RC_IO_ERROR, TSS2_RC_SUC... #include "util-io/io.h" // for socket_connect, SOCKET, socket_connect_unix diff --git a/test/unit/key-value-parse.c b/test/unit/key-value-parse.c index 389bea122..8a0ecb34d 100644 --- a/test/unit/key-value-parse.c +++ b/test/unit/key-value-parse.c @@ -9,11 +9,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for cmocka_unit_test, assert_false #include // for bool #include // for NULL #include // for strcmp +#include "../helper/cmocka_all.h" // for cmocka_unit_test, assert_false #include "tss2_common.h" // for TSS2_RC, TSS2_TCTI_RC_BAD_VALUE #include "util/key-value-parse.h" // for parse_key_value, parse_key_value_s... diff --git a/test/unit/log.c b/test/unit/log.c index 7507ed143..fac99c565 100644 --- a/test/unit/log.c +++ b/test/unit/log.c @@ -8,10 +8,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for CMUnitTest, cmocka_run_group_tests, cmocka_uni... #include // for NULL #include // for setenv +#include "../helper/cmocka_all.h" // for CMUnitTest, cmocka_run_group_tests, cmocka_uni... + #define LOGMODULE test #include "util/log.h" // for LOG_INFO, LOGLEVEL_UNDEFINED, LOGMODULE_status diff --git a/test/unit/sys-execute.c b/test/unit/sys-execute.c index 7eb6d70cb..733ac2f9b 100644 --- a/test/unit/sys-execute.c +++ b/test/unit/sys-execute.c @@ -9,11 +9,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, CMUnitTest, ass... #include // for uint8_t, int32_t #include // for NULL, calloc, free, size_t #include // for memcpy +#include "../helper/cmocka_all.h" // for assert_int_equal, CMUnitTest, ass... #include "tss2-tcti/tcti-common.h" // for tpm_header_t, header_unmarshal #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_AB... #include "tss2_sys.h" // for TSS2_SYS_CONTEXT, Tss2_Sys_Execute diff --git a/test/unit/tcti-cmd.c b/test/unit/tcti-cmd.c index 25a046d03..16bd02edd 100644 --- a/test/unit/tcti-cmd.c +++ b/test/unit/tcti-cmd.c @@ -4,7 +4,6 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, will_return_always #include // for errno, EINVAL, EFAULT, EBADF, ENOMEM #include // for size_t, sigprocmask, sigset_t #include // for uint8_t @@ -12,6 +11,8 @@ #include // for calloc, free #include // for fork, pipe +#include "../helper/cmocka_all.h" // for assert_int_equal, will_return_always + #if defined (__FreeBSD__) #include #else diff --git a/test/unit/tcti-device.c b/test/unit/tcti-device.c index fcdb20340..8f7f8e40f 100644 --- a/test/unit/tcti-device.c +++ b/test/unit/tcti-device.c @@ -8,7 +8,6 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for will_return, assert_true, assert_... #include // for errno, EACCES, ENOENT #include // for uint8_t #include // for pollfd, nfds_t @@ -16,6 +15,7 @@ #include // for calloc, free #include // for memcpy, strlen, strncmp +#include "../helper/cmocka_all.h" // for will_return, assert_true, assert_... #include "tss2-tcti/tcti-common.h" // for tcti_common_context_cast, TSS2_TC... #include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, TSS2_TC... #include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT, TSS2_TCTI_TIME... diff --git a/test/unit/tcti-i2c-ftdi.c b/test/unit/tcti-i2c-ftdi.c index af5c4ce07..7ec046090 100644 --- a/test/unit/tcti-i2c-ftdi.c +++ b/test/unit/tcti-i2c-ftdi.c @@ -24,7 +24,6 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, assert_true #include // for uint8_t #include // for false, true #include // for NULL, size_t @@ -32,6 +31,7 @@ #include // for strncmp, memcpy #include // for fd_set, timeval +#include "../helper/cmocka_all.h" // for assert_int_equal, assert_true #include "tss2-tcti/mpsse/mpsse.h" // for MPSSE_OK, ACK, I2C, MSB, ONE_... #include "tss2-tcti/tcti-common.h" // for TCTI_VERSION #include "tss2-tcti/tcti-i2c-ftdi.h" // for I2C_DEV_ADDR_DEFAULT diff --git a/test/unit/tcti-i2c-helper.c b/test/unit/tcti-i2c-helper.c index 3b7af7b2d..a57d741a7 100644 --- a/test/unit/tcti-i2c-helper.c +++ b/test/unit/tcti-i2c-helper.c @@ -24,13 +24,13 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, assert_stri... #include // for uint8_t, int32_t #include // for false, bool, true #include // for NULL, size_t #include // for free, calloc, malloc #include // for memcpy, strncmp +#include "../helper/cmocka_all.h" // for assert_int_equal, assert_stri... #include "tss2-tcti/tcti-common.h" // for TCTI_STATE_RECEIVE, TCTI_VERSION #include "tss2-tcti/tcti-i2c-helper.h" // for TCTI_I2C_HELPER_TPM_STS_REG #include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, TSS... diff --git a/test/unit/tcti-libtpms.c b/test/unit/tcti-libtpms.c index cb01ee92c..169943cf7 100644 --- a/test/unit/tcti-libtpms.c +++ b/test/unit/tcti-libtpms.c @@ -8,25 +8,31 @@ #include "config.h" // IWYU pragma: keep #endif -#include -#include -#include -#include -#include -#include - -#include -#include "../helper/cmocka_all.h" -#include - -#include "tss2_tcti.h" -#include "tss2_tcti_libtpms.h" - -#include "tss2-tcti/tcti-common.h" -#include "tss2-tcti/tcti-libtpms.h" +#include // for RTLD_LAZY, RTLD_LOCAL +#include // for errno, ENOENT +#include // for O_CREAT, O_RDWR, SEEK_END, mode_t +#include // for uint32_t +#include // for TPM_SUCCESS +#include // for libtpms_callbacks, TPMLIB_STATE_... +#include // for TPM_IO_TpmEstablished_Reset +#include // for TPM_RESULT +#include // for NULL, fprintf, size_t, stderr +#include // for free, calloc, malloc +#include // for memcpy, strerror, strlen, strncmp +#include // for MAP_FAILED, MREMAP_MAYMOVE, MAP_... +#include // for unlink + +#include "../helper/cmocka_all.h" // for will_return, expect_value, asser... +#include "tss2-tcti/tcti-common.h" // for TSS2_TCTI_COMMON_CONTEXT, tcti_c... +#include "tss2-tcti/tcti-libtpms.h" // for TSS2_TCTI_LIBTPMS_CONTEXT, STATE... +#include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, TSS2_T... +#include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT, Tss2_Tcti_Tra... +#include "tss2_tcti_libtpms.h" // for Tss2_Tcti_Libtpms_Init +#include "tss2_tpm2_types.h" // for TPM2_RC_SUCCESS +#include "util/aux_util.h" // for ARRAY_LEN #define LOGMODULE test -#include "util/log.h" +#include "util/log.h" // for LOG_TRACE, LOG_ERROR, LOG_WARNING #define EXIT_SKIP 77 diff --git a/test/unit/tcti-mssim.c b/test/unit/tcti-mssim.c index 9fc3fc23d..c89149e7a 100644 --- a/test/unit/tcti-mssim.c +++ b/test/unit/tcti-mssim.c @@ -8,7 +8,6 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for will_return, assert_int_equal #include // for uint8_t #include // for pollfd, nfds_t #include // for printf, NULL, size_t, ssize_t @@ -16,6 +15,7 @@ #include // for memcpy #include // for socklen_t +#include "../helper/cmocka_all.h" // for will_return, assert_int_equal #include "tss2-tcti/tcti-common.h" // for tcti_common_context_cast, TSS2_TC... #include "tss2-tcti/tcti-mssim.h" // for mssim_conf_t, TSS2_TCTI_MSSIM_CON... #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_TC... diff --git a/test/unit/tcti-pcap.c b/test/unit/tcti-pcap.c index 49301385a..a49696902 100644 --- a/test/unit/tcti-pcap.c +++ b/test/unit/tcti-pcap.c @@ -8,7 +8,6 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for will_return, assert_int_equal #include // for uint8_t, uint32_t, uint64_t #include // for htonl, ntohl #include // for NULL, size_t, fprintf, ssize_t @@ -17,6 +16,7 @@ #include // for mode_t #include // for clockid_t, timespec, CLOCK_... +#include "../helper/cmocka_all.h" // for will_return, assert_int_equal #include "tss2-tcti/tcti-common.h" // for TSS2_TCTI_COMMON_CONTEXT #include "tss2-tcti/tcti-pcap-builder.h" // for ENV_PCAP_FILE, pcap_buider_ctx #include "tss2-tcti/tcti-pcap.h" // for TSS2_TCTI_PCAP_CONTEXT, TCT... diff --git a/test/unit/tcti-spi-ftdi.c b/test/unit/tcti-spi-ftdi.c index 37a05b519..2f123ab4f 100644 --- a/test/unit/tcti-spi-ftdi.c +++ b/test/unit/tcti-spi-ftdi.c @@ -8,13 +8,13 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, assert_ptr_equal #include // for false #include // for NULL, size_t #include // for free, malloc, calloc #include // for memcmp, memcpy #include // for fd_set, timeval +#include "../helper/cmocka_all.h" // for assert_int_equal, assert_ptr_equal #include "tss2-tcti/mpsse/mpsse.h" // for MPSSE_OK, GPIOL0, FIFTEEN_MHZ, MSB #include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC #include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT, TSS2_TCTI_FINA... diff --git a/test/unit/tcti-spi-helper.c b/test/unit/tcti-spi-helper.c index ad01cc83f..7d941c252 100644 --- a/test/unit/tcti-spi-helper.c +++ b/test/unit/tcti-spi-helper.c @@ -8,13 +8,13 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, assert_true, ass... #include // for int32_t #include // for false, true, bool #include // for NULL, size_t #include // for free, calloc, malloc #include // for memcpy, memcmp +#include "../helper/cmocka_all.h" // for assert_int_equal, assert_true, ass... #include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC, TSS2_TCT... #include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT #include "tss2_tcti_spi_helper.h" // for Tss2_Tcti_Spi_Helper_Init, TSS2_TC... diff --git a/test/unit/tcti-spi-ltt2go.c b/test/unit/tcti-spi-ltt2go.c index 2fcce6898..52b3abb1a 100644 --- a/test/unit/tcti-spi-ltt2go.c +++ b/test/unit/tcti-spi-ltt2go.c @@ -8,7 +8,6 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, assert_ptr_... #include // for uint16_t, uint8_t #include // for libusb_device_handle, libusb_... #include // for false @@ -17,6 +16,7 @@ #include // for memcmp, memcpy #include // for fd_set, timeval +#include "../helper/cmocka_all.h" // for assert_int_equal, assert_ptr_... #include "tss2-tcti/tcti-spi-helper.h" // for TSS2_TCTI_SPI_HELPER_CONTEXT #include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC #include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT diff --git a/test/unit/tcti-spidev.c b/test/unit/tcti-spidev.c index 80552a584..8a553e045 100644 --- a/test/unit/tcti-spidev.c +++ b/test/unit/tcti-spidev.c @@ -8,7 +8,6 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, assert_memo... #include // for O_RDWR #include // for uint8_t #include // for false @@ -17,6 +16,8 @@ #include // for memcpy, strncmp #include // for fd_set, timeval +#include "../helper/cmocka_all.h" // for assert_int_equal, assert_memo... + #include // for spi_ioc_transfer #include "tss2-tcti/tcti-spi-helper.h" // for TSS2_TCTI_SPI_HELPER_CONTEXT diff --git a/test/unit/tcti-swtpm.c b/test/unit/tcti-swtpm.c index db50af61d..c72c897dc 100644 --- a/test/unit/tcti-swtpm.c +++ b/test/unit/tcti-swtpm.c @@ -8,13 +8,13 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, will_return #include // for uint8_t, uint32_t #include // for NULL, printf, size_t, ssize_t #include // for free, calloc #include // for memcmp, memcpy #include // for socklen_t +#include "../helper/cmocka_all.h" // for assert_int_equal, will_return #include "tss2-tcti/tcti-common.h" // for tcti_common_context_cast, TSS2_TC... #include "tss2-tcti/tcti-swtpm.h" // for swtpm_conf_t, TSS2_TCTI_SWTPM_CON... #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_TC... diff --git a/test/unit/tctildr-dl.c b/test/unit/tctildr-dl.c index 83cbd44b7..487569cf7 100644 --- a/test/unit/tctildr-dl.c +++ b/test/unit/tctildr-dl.c @@ -9,11 +9,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for expect_value, will_return #include // for RTLD_NOW #include // for NULL #include // for printf +#include "../helper/cmocka_all.h" // for expect_value, will_return #include "tss2-tcti/tctildr-dl.h" // for handle_from_name, tctildr_g... #include "tss2-tcti/tctildr-interface.h" // for tctildr_get_tcti, tctildr_g... #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS diff --git a/test/unit/tctildr-getinfo.c b/test/unit/tctildr-getinfo.c index c65c2bb26..575fd93ba 100644 --- a/test/unit/tctildr-getinfo.c +++ b/test/unit/tctildr-getinfo.c @@ -3,10 +3,10 @@ * Copyright 2019, Intel Corporation */ -#include "../helper/cmocka_all.h" // for will_return, mock_type, cmocka_unit_test #include // for ENOMEM, errno #include // for printf, NULL, size_t +#include "../helper/cmocka_all.h" // for will_return, mock_type, cmocka_unit_test #include "tss2-tcti/tctildr.h" // for copy_info #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_TCTI_R... #include "tss2_tcti.h" // for TSS2_TCTI_INFO, TSS2_TCTI_CONTEXT diff --git a/test/unit/tctildr-nodl.c b/test/unit/tctildr-nodl.c index 65ded9569..13a06bf96 100644 --- a/test/unit/tctildr-nodl.c +++ b/test/unit/tctildr-nodl.c @@ -8,9 +8,9 @@ #include "config.h" // for TCTI_MSSIM, TCTI_SWTPM #endif -#include "../helper/cmocka_all.h" // for will_return, cmocka_unit_test #include // for NULL, size_t +#include "../helper/cmocka_all.h" // for will_return, cmocka_unit_test #include "tss2-tcti/tctildr-interface.h" // for tctildr_get_tcti, tctildr_f... #include "tss2-tcti/tctildr-nodl.h" // for tctildr_get_default #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS diff --git a/test/unit/tctildr-tcti.c b/test/unit/tctildr-tcti.c index 50572490c..5ec39eb5e 100644 --- a/test/unit/tctildr-tcti.c +++ b/test/unit/tctildr-tcti.c @@ -3,12 +3,12 @@ * Copyright 2018-2019, Intel Corporation */ -#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_tes... #include // for uint8_t, int32_t #include // for true #include // for NULL, size_t #include // for calloc, free +#include "../helper/cmocka_all.h" // for assert_int_equal, cmocka_unit_tes... #include "tss2-tcti/tcti-common.h" // for TCTI_VERSION #include "tss2-tcti/tctildr.h" // for TSS2_TCTILDR_CONTEXT, tctildr_fin... #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_TC... diff --git a/test/unit/tctildr.c b/test/unit/tctildr.c index da2e2e722..1bd438b6a 100644 --- a/test/unit/tctildr.c +++ b/test/unit/tctildr.c @@ -7,11 +7,11 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for will_return, assert_int_equal, cmocka... #include // for PATH_MAX #include // for NULL, size_t #include // for memset +#include "../helper/cmocka_all.h" // for will_return, assert_int_equal, cmocka... #include "tss2-tcti/tctildr.h" // for tctildr_conf_parse, tcti_from_init #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_TCTI_R... #include "tss2_tcti.h" // for TSS2_TCTI_CONTEXT, TSS2_TCTI_INFO diff --git a/test/unit/test_tss2_rc.c b/test/unit/test_tss2_rc.c index b8d4afbc2..2e7837c05 100644 --- a/test/unit/test_tss2_rc.c +++ b/test/unit/test_tss2_rc.c @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: BSD-2-Clause */ -#include "../helper/cmocka_all.h" // for cmocka_unit_test, assert_int_equal, ass... #include // for bool, true #include // for NULL #include // for snprintf #include // for strlen +#include "../helper/cmocka_all.h" // for cmocka_unit_test, assert_int_equal, ass... #include "tss2_common.h" // for TSS2_RC, TSS2_RC_SUCCESS, TSS2_RC_LAYER #include "tss2_rc.h" // for Tss2_RC_Decode, TSS2_RC_INFO, Tss2_RC_S... #include "tss2_tpm2_types.h" // for TPM2_RC_HASH, TPM2_RC_EXPIRED, TPM2_RC_... diff --git a/test/unit/tss2_policy.c b/test/unit/tss2_policy.c index 2e15f1b50..abe65f90e 100644 --- a/test/unit/tss2_policy.c +++ b/test/unit/tss2_policy.c @@ -8,13 +8,13 @@ #include "config.h" // IWYU pragma: keep #endif -#include "../helper/cmocka_all.h" // for assert_int_equal, assert_s... #include // for PATH_MAX #include // for NULL, size_t #include // for fclose, fopen, fprintf, fread #include // for calloc #include // for memcpy, memset +#include "../helper/cmocka_all.h" // for assert_int_equal, assert_s... #include "tss2_common.h" // for TSS2_RC_SUCCESS, TSS2_RC #include "tss2_policy.h" // for TSS2_POLICY_PCR_SELECTION #include "tss2_tpm2_types.h" // for TPM2B_DIGEST, TPMS_PCR_SEL...