aboutsummaryrefslogtreecommitdiffstats
path: root/src/libimcv/pts/pts.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libimcv/pts/pts.h')
-rw-r--r--src/libimcv/pts/pts.h40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/libimcv/pts/pts.h b/src/libimcv/pts/pts.h
index 1e07c4be3..ba9a87a82 100644
--- a/src/libimcv/pts/pts.h
+++ b/src/libimcv/pts/pts.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011 Sansar Choinyambuu
- * Copyright (C) 2012-2014 Andreas Steffen
+ * Copyright (C) 2012-2016 Andreas Steffen
* HSR Hochschule fuer Technik Rapperswil
*
* This program is free software; you can redistribute it and/or modify it
@@ -236,39 +236,41 @@ struct pts_t {
pts_file_meta_t* (*get_metadata)(pts_t *this, char *pathname, bool is_dir);
/**
- * Reads given PCR value and returns it
- * Expects owner secret to be WELL_KNOWN_SECRET
+ * Retrieve the current value of a PCR register in a given PCR bank
*
- * @param pcr_num Number of PCR to read
- * @param pcr_value Chunk to save pcr read output
- * @return NULL in case of TSS error, PCR value otherwise
+ * @param pcr_num PCR number
+ * @param pcr_value PCR value returned
+ * @param alg hash algorithm, selects PCR bank (TPM 2.0 only)
+ * @return TRUE if PCR value retrieval succeeded
*/
- bool (*read_pcr)(pts_t *this, uint32_t pcr_num, chunk_t *pcr_value);
+ bool (*read_pcr)(pts_t *this, uint32_t pcr_num, chunk_t *pcr_value,
+ hash_algorithm_t alg);
/**
- * Extends given PCR with given value
- * Expects owner secret to be WELL_KNOWN_SECRET
+ * Extend a PCR register in a given PCR bank with a hash value
*
- * @param pcr_num Number of PCR to extend
- * @param input Value to extend
- * @param output Chunk to save PCR value after extension
- * @return FALSE in case of TSS error, TRUE otherwise
+ * @param pcr_num PCR number
+ * @param pcr_value extended PCR value returned
+ * @param hash data to be extended into the PCR
+ * @param alg hash algorithm, selects PCR bank (TPM 2.0 only)
+ * @return TRUE if PCR extension succeeded
*/
- bool (*extend_pcr)(pts_t *this, uint32_t pcr_num, chunk_t input,
- chunk_t *output);
+ bool (*extend_pcr)(pts_t *this, uint32_t pcr_num, chunk_t *pcr_value,
+ chunk_t data, hash_algorithm_t alg);
/**
* Quote over PCR's
* Expects owner and SRK secret to be WELL_KNOWN_SECRET and no password set for AIK
*
* @param use_quote2 Version of the Quote function to be used
+ * @param use_version_info Version info is concatenated to TPM_QUOTE_INFO2
* @param pcr_comp Chunk to save PCR composite structure
* @param quote_sig Chunk to save quote operation output
* without external data (anti-replay protection)
* @return FALSE in case of TSS error, TRUE otherwise
*/
- bool (*quote_tpm)(pts_t *this, bool use_quote2, chunk_t *pcr_comp,
- chunk_t *quote_sig);
+ bool (*quote_tpm)(pts_t *this, bool use_quote2, bool use_version_info,
+ chunk_t *pcr_comp, chunk_t *quote_sig);
/**
* Get the shadow PCR set
@@ -281,13 +283,13 @@ struct pts_t {
* Constructs and returns TPM Quote Info structure expected from IMC
*
* @param use_quote2 Version of the TPM_QUOTE_INFO to be constructed
- * @param use_ver_info Version info is concatenated to TPM_QUOTE_INFO2
+ * @param use_version_info Version info is concatenated to TPM_QUOTE_INFO2
* @param comp_hash_algo Composite Hash Algorithm
* @param pcr_comp Output variable to store PCR Composite
* @param quote_info Output variable to store TPM Quote Info
* @return FALSE in case of any error, TRUE otherwise
*/
- bool (*get_quote_info)(pts_t *this, bool use_quote2, bool ver_info_included,
+ bool (*get_quote_info)(pts_t *this, bool use_quote2, bool use_version_info,
pts_meas_algorithms_t comp_hash_algo,
chunk_t *pcr_comp, chunk_t *quote_info);