*/
enum pts_attr_req_funct_comp_type_t {
/** Unknown */
- PTS_FUNC_COMP_TYPE_UNKNOWN = 0x0,
+ PTS_FUNC_COMP_TYPE_UNKNOWN = 0x0,
/** Trusted Platform */
- PTS_FUNC_COMP_TYPE_TRUSTED = 0x1,
+ PTS_FUNC_COMP_TYPE_TRUSTED = 0x1,
/** Operating System */
PTS_FUNC_COMP_TYPE_OS = 0x2,
/** Graphical User Interface */
/** BIOS */
PTS_FUNC_COMP_NAME_BIOS = 0x0002,
/** Platform Extensions */
- PTS_FUNC_COMP_NAME_PLAT_EXT = 0x0003,
+ PTS_FUNC_COMP_NAME_PLAT_EXT = 0x0003,
/** Motherboard firmware */
PTS_FUNC_COMP_NAME_BOARD = 0x0004,
/** Initial Program Loader */
- PTS_FUNC_COMP_NAME_INIT_LOADER = 0x0005,
+ PTS_FUNC_COMP_NAME_INIT_LOADER = 0x0005,
/** Option ROMs */
- PTS_FUNC_COMP_NAME_OPT_ROMS = 0x0006,
+ PTS_FUNC_COMP_NAME_OPT_ROMS = 0x0006,
};
/**
* @param flags Set of flags
*/
void (*set_flags)(tcg_pts_attr_req_funct_comp_evid_t *this,
- pts_attr_req_funct_comp_evid_flag_t flags);
+ pts_attr_req_funct_comp_evid_flag_t flags);
/**
* Get Sub-component Depth
* @param qualifier Functional Name Category Qualifier
*/
void (*set_qualifier)(tcg_pts_attr_req_funct_comp_evid_t *this,
- tcg_pts_qualifier_t qualifier);
+ tcg_pts_qualifier_t qualifier);
/**
* Get Component Functional Name
* @param name Component Functional Name
*/
pa_tnc_attr_t* tcg_pts_attr_req_funct_comp_evid_create(pts_attr_req_funct_comp_evid_flag_t flags,
- u_int32_t depth,
- u_int32_t vendor_id,
- tcg_pts_qualifier_t qualifier,
- pts_attr_req_funct_comp_name_bin_enum_t name);
+ u_int32_t depth,
+ u_int32_t vendor_id,
+ tcg_pts_qualifier_t qualifier,
+ pts_attr_req_funct_comp_name_bin_enum_t name);
/**
* Creates an tcg_pts_attr_req_funct_comp_evid_t object from received data
/**
* Transformation type for PCR
*/
- pts_attr_simple_comp_evid_pcr_transform_t transformation;
+ pts_pcr_transform_t transformation;
/**
* Measurement time
}
writer->write_uint8 (writer, qualifier);
- writer->write_uint32 (writer, this->name);
+ writer->write_uint32(writer, this->name);
writer->write_uint8 (writer, (this->measurement_type << 7));
- writer->write_uint24 (writer, this->extended_pcr);
+ writer->write_uint24(writer, this->extended_pcr);
writer->write_uint16(writer, this->hash_algorithm);
writer->write_uint8 (writer, this->transformation);
- writer->write_data (writer, this->measurement_time);
+ writer->write_data (writer, this->measurement_time);
/* Optional fields */
if (this->policy_uri.ptr && this->policy_uri.len > 0)
{
- writer->write_uint16 (writer, this->policy_uri.len);
- writer->write_data (writer, this->policy_uri);
+ writer->write_uint16(writer, this->policy_uri.len);
+ writer->write_data (writer, this->policy_uri);
}
if (this->pcr_before.ptr && this->pcr_after.ptr &&
this->pcr_before.len == this->pcr_after.len &&
this->pcr_before.len > 0 && this->pcr_after.len > 0)
{
- writer->write_uint16 (writer, this->pcr_before.len);
- writer->write_data (writer, this->pcr_before);
- writer->write_data (writer, this->pcr_after);
+ writer->write_uint16(writer, this->pcr_before.len);
+ writer->write_data (writer, this->pcr_before);
+ writer->write_data (writer, this->pcr_after);
}
writer->write_data (writer, this->measurement);
reader->read_uint8(reader, &transformation);
this->transformation = transformation;
- /* TODO: Check the transformation is defined in pts_attr_simple_comp_evid_pcr_transform_t */
+ /* TODO: Check the transformation is defined in pts_pcr_transform_t */
reader->read_data(reader, PTS_SIMPLE_COMP_EVID_MEASUREMENT_TIME_SIZE,
&this->measurement_time);
this->hash_algorithm = hash_algorithm;
}
-METHOD(tcg_pts_attr_simple_comp_evid_t, get_pcr_trans, pts_attr_simple_comp_evid_pcr_transform_t,
+METHOD(tcg_pts_attr_simple_comp_evid_t, get_pcr_trans, pts_pcr_transform_t,
private_tcg_pts_attr_simple_comp_evid_t *this)
{
return this->transformation;
}
METHOD(tcg_pts_attr_simple_comp_evid_t, set_pcr_trans, void,
- private_tcg_pts_attr_simple_comp_evid_t *this, pts_attr_simple_comp_evid_pcr_transform_t transformation)
+ private_tcg_pts_attr_simple_comp_evid_t *this, pts_pcr_transform_t transformation)
{
this->transformation = transformation;
}
pts_attr_req_funct_comp_name_bin_enum_t name,
u_int32_t extended_pcr,
pts_meas_algorithms_t hash_algorithm,
- pts_attr_simple_comp_evid_pcr_transform_t transformation,
+ pts_pcr_transform_t transformation,
chunk_t measurement_time,
chunk_t policy_uri,
chunk_t pcr_before,
typedef struct tcg_pts_attr_simple_comp_evid_t tcg_pts_attr_simple_comp_evid_t;
typedef enum pts_attr_simple_comp_evid_flag_t pts_attr_simple_comp_evid_flag_t;
-typedef enum pts_attr_simple_comp_evid_pcr_transform_t pts_attr_simple_comp_evid_pcr_transform_t;
+typedef enum pts_pcr_transform_t pts_pcr_transform_t;
#include "tcg_attr.h"
#include "tcg_pts_meas_algo.h"
*/
enum pts_attr_simple_comp_evid_flag_t {
/** PCR information fields inlcuded */
- PTS_SIMPLE_COMP_EVID_FLAG_PCR = 0,
+ PTS_SIMPLE_COMP_EVID_FLAG_PCR = 0,
/** No Validation was attempted */
- PTS_SIMPLE_COMP_EVID_FLAG_NO_VALID = 1,
+ PTS_SIMPLE_COMP_EVID_FLAG_NO_VALID = 1,
/** Attempted validation, unable to verify */
- PTS_SIMPLE_COMP_EVID_FLAG_NO_VER = 2,
+ PTS_SIMPLE_COMP_EVID_FLAG_NO_VER = 2,
/** Attempted validation, verification failed */
- PTS_SIMPLE_COMP_EVID_FLAG_VER_FAIL = 3,
+ PTS_SIMPLE_COMP_EVID_FLAG_VER_FAIL = 3,
/** Attempted validation, verification passed */
- PTS_SIMPLE_COMP_EVID_FLAG_VER_PASS = 4,
+ PTS_SIMPLE_COMP_EVID_FLAG_VER_PASS = 4,
};
/**
- * PTS Simple Component Evidence PCR Transformations
+ * PTS PCR Transformations
*/
-enum pts_attr_simple_comp_evid_pcr_transform_t {
+enum pts_pcr_transform_t {
/** No Transformation */
- PTS_SIMPLE_COMP_EVID_PCR_TRANS_NO = 0,
+ PTS_PCR_TRANSFORM_NO = 0,
/** Hash Value matched PCR size */
- PTS_SIMPLE_COMP_EVID_PCR_TRANS_MATCH = 1,
+ PTS_PCR_TRANSFORM_MATCH = 1,
/** Hash value shorter than PCR size */
- PTS_SIMPLE_COMP_EVID_PCR_TRANS_SHORT = 2,
+ PTS_PCR_TRANSFORM_SHORT = 2,
/** Hash value longer than PCR size */
- PTS_SIMPLE_COMP_EVID_PCR_TRANS_LONG = 3,
+ PTS_PCR_TRANSFORM_LONG = 3,
};
/**
*
* @return Transformation type of PCR
*/
- pts_attr_simple_comp_evid_pcr_transform_t (*get_pcr_trans)(tcg_pts_attr_simple_comp_evid_t *this);
+ pts_pcr_transform_t (*get_pcr_trans)(tcg_pts_attr_simple_comp_evid_t *this);
/**
* Set PCR Transformation
* @param transformation Transformation type of PCR
*/
void (*set_pcr_trans)(tcg_pts_attr_simple_comp_evid_t *this,
- pts_attr_simple_comp_evid_pcr_transform_t transformation);
+ pts_pcr_transform_t transformation);
/**
* Get Measurement Time
pts_attr_req_funct_comp_name_bin_enum_t name,
u_int32_t extended_pcr,
pts_meas_algorithms_t hash_algorithm,
- pts_attr_simple_comp_evid_pcr_transform_t transformation,
+ pts_pcr_transform_t transformation,
chunk_t measurement_time,
chunk_t policy_uri,
chunk_t pcr_before,