shortened type name to pts_pcr_transform_t

This commit is contained in:
Andreas Steffen
2011-09-08 12:08:11 +02:00
parent 618d4e383d
commit 2446ca0e47
3 changed files with 39 additions and 39 deletions
@@ -49,9 +49,9 @@ enum pts_attr_req_funct_comp_evid_flag_t {
*/
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 */
@@ -79,13 +79,13 @@ enum pts_attr_req_funct_comp_name_bin_enum_t {
/** 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,
};
/**
@@ -121,7 +121,7 @@ struct tcg_pts_attr_req_funct_comp_evid_t {
* @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
@@ -157,7 +157,7 @@ struct tcg_pts_attr_req_funct_comp_evid_t {
* @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
@@ -188,10 +188,10 @@ struct tcg_pts_attr_req_funct_comp_evid_t {
* @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
+13 -13
View File
@@ -173,7 +173,7 @@ struct private_tcg_pts_attr_simple_comp_evid_t {
/**
* Transformation type for PCR
*/
pts_attr_simple_comp_evid_pcr_transform_t transformation;
pts_pcr_transform_t transformation;
/**
* Measurement time
@@ -287,27 +287,27 @@ METHOD(pa_tnc_attr_t, build, void,
}
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);
@@ -409,7 +409,7 @@ METHOD(pa_tnc_attr_t, process, status_t,
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);
@@ -537,14 +537,14 @@ METHOD(tcg_pts_attr_simple_comp_evid_t, set_hash_algorithm, void,
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;
}
@@ -630,7 +630,7 @@ pa_tnc_attr_t *tcg_pts_attr_simple_comp_evid_create(
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,
+15 -15
View File
@@ -23,7 +23,7 @@
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"
@@ -38,29 +38,29 @@ typedef enum pts_attr_simple_comp_evid_pcr_transform_t pts_attr_simple_comp_evid
*/
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,
};
/**
@@ -183,7 +183,7 @@ struct tcg_pts_attr_simple_comp_evid_t {
*
* @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
@@ -191,7 +191,7 @@ struct tcg_pts_attr_simple_comp_evid_t {
* @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
@@ -301,7 +301,7 @@ pa_tnc_attr_t* tcg_pts_attr_simple_comp_evid_create(pts_attr_simple_comp_evid_fl
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,