1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /******************************************************************************* 3 * Copyright 2018-2019, Fraunhofer SIT sponsored by Infineon Technologies AG 4 * All rights reserved. 5 *******************************************************************************/ 6 #ifndef IFAPI_POLICY_H 7 #define IFAPI_POLICY_H 8 9 #include <stdint.h> 10 #include <stdarg.h> 11 #include <stdbool.h> 12 #include <sys/stat.h> 13 #include <json-c/json.h> 14 #include <json-c/json_util.h> 15 16 #include "tss2_esys.h" 17 #include "tss2_fapi.h" 18 #include "fapi_int.h" 19 #include "fapi_policy.h" 20 21 TSS2_RC 22 get_policy_digest_idx( 23 TPML_DIGEST_VALUES *digest_values, 24 TPMI_ALG_HASH hashAlg, 25 size_t *idx); 26 27 TSS2_RC 28 ifapi_compute_policy_digest( 29 TPML_PCRVALUES *pcrs, 30 TPML_PCR_SELECTION *pcr_selection, 31 TPMI_ALG_HASH hash_alg, 32 TPM2B_DIGEST *pcr_digest); 33 34 TSS2_RC 35 ifapi_calculate_tree( 36 FAPI_CONTEXT *context, 37 const char *policyPath, 38 TPMS_POLICY *policy, 39 TPMI_ALG_HASH hash_alg, 40 size_t *digest_idx, 41 size_t *hash_size); 42 43 #endif /* IFAPI_POLICY_H */ 44