--- embedaddon/strongswan/src/libimcv/pts/pts_pcr.h 2020/06/03 09:46:43 1.1.1.1 +++ embedaddon/strongswan/src/libimcv/pts/pts_pcr.h 2021/03/17 00:20:08 1.1.1.2 @@ -23,8 +23,11 @@ typedef struct pts_pcr_t pts_pcr_t; +#include "pts_meas_algo.h" + #include +#include #include /** @@ -33,16 +36,18 @@ typedef struct pts_pcr_t pts_pcr_t; #define PTS_PCR_MAX_NUM 24 /** - * Number of bytes that can be saved in a PCR of TPM, TPM Spec 1.2 - */ -#define PTS_PCR_LEN 20 - -/** * Class implementing a shadow PCR register set */ struct pts_pcr_t { /** + * Get the hash algorithm used by the PCR bank + * + * @return hash_measurement algorithm + */ + pts_meas_algorithms_t(*get_pcr_algo)(pts_pcr_t *this); + + /** * Get the number of selected PCRs * * @return number of selected PCRs @@ -114,7 +119,12 @@ struct pts_pcr_t { /** * Creates an pts_pcr_t object + * + * @param tpm_version TPM version + * @param algo Hash algorithm used by PCR bank + * @param locality TPM locality in which the PCR bank was initialized */ -pts_pcr_t* pts_pcr_create(void); +pts_pcr_t* pts_pcr_create(tpm_version_t tpm_version, pts_meas_algorithms_t algo, + uint8_t locality); #endif /** PTS_PCR_H_ @}*/