From 5f840ef30d390999f097e1a03fdb2b532ea3fd94 Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Thu, 18 Aug 2011 16:09:09 +0200 Subject: [PATCH] created PTS Functional Component Name header file --- src/libimcv/Makefile.am | 1 + src/libimcv/tcg/tcg_pts_attr_req_funct_comp_evid.c | 24 ++--- src/libimcv/tcg/tcg_pts_attr_req_funct_comp_evid.h | 80 +++------------ src/libimcv/tcg/tcg_pts_attr_simple_comp_evid.c | 46 ++++----- src/libimcv/tcg/tcg_pts_attr_simple_comp_evid.h | 113 ++++++++++----------- src/libimcv/tcg/tcg_pts_funct_comp_name.h | 81 +++++++++++++++ 6 files changed, 183 insertions(+), 162 deletions(-) create mode 100644 src/libimcv/tcg/tcg_pts_funct_comp_name.h diff --git a/src/libimcv/Makefile.am b/src/libimcv/Makefile.am index e8f8e54..b9046fa 100644 --- a/src/libimcv/Makefile.am +++ b/src/libimcv/Makefile.am @@ -16,6 +16,7 @@ libimcv_la_SOURCES = \ pa_tnc/pa_tnc_msg.h pa_tnc/pa_tnc_msg.c \ pa_tnc/pa_tnc_attr.h pa_tnc/pa_tnc_attr.c \ tcg/tcg_attr.h tcg/tcg_attr.c \ + tcg/tcg_pts_funct_comp_name.h \ tcg/tcg_pts_meas_algo.h tcg/tcg_pts_meas_algo.c \ tcg/tcg_pts_attr_req_proto_caps.h tcg/tcg_pts_attr_req_proto_caps.c \ tcg/tcg_pts_attr_proto_caps.h tcg/tcg_pts_attr_proto_caps.c \ diff --git a/src/libimcv/tcg/tcg_pts_attr_req_funct_comp_evid.c b/src/libimcv/tcg/tcg_pts_attr_req_funct_comp_evid.c index 27f0076..a3ea55d 100644 --- a/src/libimcv/tcg/tcg_pts_attr_req_funct_comp_evid.c +++ b/src/libimcv/tcg/tcg_pts_attr_req_funct_comp_evid.c @@ -118,12 +118,12 @@ struct private_tcg_pts_attr_req_funct_comp_evid_t { /** * Functional Name Category Qualifier */ - tcg_pts_qualifier_t qualifier; + pts_qualifier_t qualifier; /** * Component Functional Name */ - pts_attr_req_funct_comp_name_bin_enum_t name; + pts_funct_comp_name_t name; }; METHOD(pa_tnc_attr_t, get_vendor_id, pen_t, @@ -273,7 +273,7 @@ METHOD(pa_tnc_attr_t, process, status_t, /* TODO: Check the type is defined in pts_attr_req_funct_comp_type_t */ reader->read_uint32(reader, &this->name); - /* TODO: Check the name is defined in pts_attr_req_funct_comp_name_bin_enum_t */ + /* TODO: Check the name is defined in pts_funct_comp_name_t */ reader->destroy(reader); return SUCCESS; @@ -316,27 +316,26 @@ METHOD(tcg_pts_attr_req_funct_comp_evid_t, get_family, u_int8_t, return this->family; } -METHOD(tcg_pts_attr_req_funct_comp_evid_t, get_qualifier, tcg_pts_qualifier_t, +METHOD(tcg_pts_attr_req_funct_comp_evid_t, get_qualifier, pts_qualifier_t, private_tcg_pts_attr_req_funct_comp_evid_t *this) { return this->qualifier; } METHOD(tcg_pts_attr_req_funct_comp_evid_t, set_qualifier, void, - private_tcg_pts_attr_req_funct_comp_evid_t *this, - tcg_pts_qualifier_t qualifier) + private_tcg_pts_attr_req_funct_comp_evid_t *this, pts_qualifier_t qualifier) { this->qualifier = qualifier; } -METHOD(tcg_pts_attr_req_funct_comp_evid_t, get_comp_funct_name, pts_attr_req_funct_comp_name_bin_enum_t, +METHOD(tcg_pts_attr_req_funct_comp_evid_t, get_comp_funct_name, pts_funct_comp_name_t, private_tcg_pts_attr_req_funct_comp_evid_t *this) { return this->name; } METHOD(tcg_pts_attr_req_funct_comp_evid_t, set_comp_funct_name, void, - private_tcg_pts_attr_req_funct_comp_evid_t *this, pts_attr_req_funct_comp_name_bin_enum_t name) + private_tcg_pts_attr_req_funct_comp_evid_t *this, pts_funct_comp_name_t name) { this->name = name; } @@ -345,11 +344,10 @@ METHOD(tcg_pts_attr_req_funct_comp_evid_t, set_comp_funct_name, void, * Described in header. */ 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) + pts_attr_req_funct_comp_evid_flag_t flags, + u_int32_t depth, u_int32_t vendor_id, + pts_qualifier_t qualifier, + pts_funct_comp_name_t name) { private_tcg_pts_attr_req_funct_comp_evid_t *this; diff --git a/src/libimcv/tcg/tcg_pts_attr_req_funct_comp_evid.h b/src/libimcv/tcg/tcg_pts_attr_req_funct_comp_evid.h index 223d267..e41b3ab 100644 --- a/src/libimcv/tcg/tcg_pts_attr_req_funct_comp_evid.h +++ b/src/libimcv/tcg/tcg_pts_attr_req_funct_comp_evid.h @@ -23,11 +23,9 @@ typedef struct tcg_pts_attr_req_funct_comp_evid_t tcg_pts_attr_req_funct_comp_evid_t; typedef enum pts_attr_req_funct_comp_evid_flag_t pts_attr_req_funct_comp_evid_flag_t; -typedef enum pts_attr_req_funct_comp_type_t pts_attr_req_funct_comp_type_t; -typedef enum pts_attr_req_funct_comp_name_bin_enum_t pts_attr_req_funct_comp_name_bin_enum_t; -typedef struct tcg_pts_qualifier_t tcg_pts_qualifier_t; #include "tcg_attr.h" +#include "tcg_pts_funct_comp_name.h" #include "pa_tnc/pa_tnc_attr.h" /** @@ -45,59 +43,6 @@ enum pts_attr_req_funct_comp_evid_flag_t { }; /** - * PTS Component Functional Type for Qualifier field - */ -enum pts_attr_req_funct_comp_type_t { - /** Unknown */ - PTS_FUNC_COMP_TYPE_UNKNOWN = 0x0, - /** Trusted Platform */ - PTS_FUNC_COMP_TYPE_TRUSTED = 0x1, - /** Operating System */ - PTS_FUNC_COMP_TYPE_OS = 0x2, - /** Graphical User Interface */ - PTS_FUNC_COMP_TYPE_GUI = 0x3, - /** Application */ - PTS_FUNC_COMP_TYPE_APP = 0x4, - /** Networking */ - PTS_FUNC_COMP_TYPE_NET = 0x5, - /** Library */ - PTS_FUNC_COMP_TYPE_LIB = 0x6, - /** TNC Defined Component */ - PTS_FUNC_COMP_TYPE_TNC = 0x7, - /** All matching Components */ - PTS_FUNC_COMP_TYPE_ALL = 0xF, -}; - -/** - * PTS Component Functional Name Binary Enumeration - */ -enum pts_attr_req_funct_comp_name_bin_enum_t { - /** Ignore */ - PTS_FUNC_COMP_NAME_IGNORE = 0x0000, - /** CRTM */ - PTS_FUNC_COMP_NAME_CRTM = 0x0001, - /** BIOS */ - PTS_FUNC_COMP_NAME_BIOS = 0x0002, - /** Platform Extensions */ - 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, - /** Option ROMs */ - PTS_FUNC_COMP_NAME_OPT_ROMS = 0x0006, -}; - -/** - * Qualifier for Functional Component - */ -struct tcg_pts_qualifier_t { - bool kernel; - bool sub_component; - pts_attr_req_funct_comp_type_t type; -}; - -/** * Class implementing the TCG PTS Request Functional Component Evidence attribute * */ @@ -118,7 +63,7 @@ struct tcg_pts_attr_req_funct_comp_evid_t { /** * Set flags for PTS Request Functional Component Evidence * - * @param flags Set of flags + * @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); @@ -149,31 +94,31 @@ struct tcg_pts_attr_req_funct_comp_evid_t { * * @return Functional Name Category Qualifier */ - tcg_pts_qualifier_t (*get_qualifier)(tcg_pts_attr_req_funct_comp_evid_t *this); + pts_qualifier_t (*get_qualifier)(tcg_pts_attr_req_funct_comp_evid_t *this); /** * Set qualifier for Component Functional Name * - * @param qualifier Functional Name Category Qualifier + * @param qualifier Functional Name Category Qualifier */ void (*set_qualifier)(tcg_pts_attr_req_funct_comp_evid_t *this, - tcg_pts_qualifier_t qualifier); + pts_qualifier_t qualifier); /** * Get Component Functional Name * * @return Component Functional Name */ - pts_attr_req_funct_comp_name_bin_enum_t (*get_comp_funct_name)(tcg_pts_attr_req_funct_comp_evid_t *this); + pts_funct_comp_name_t (*get_comp_funct_name)(tcg_pts_attr_req_funct_comp_evid_t *this); /** * Set Component Functional Name * - * @param name Component Functional Name + * @param name Component Functional Name */ void (*set_comp_funct_name)(tcg_pts_attr_req_funct_comp_evid_t *this, - pts_attr_req_funct_comp_name_bin_enum_t name); + pts_funct_comp_name_t name); }; @@ -188,15 +133,14 @@ 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, + pts_qualifier_t qualifier, + pts_funct_comp_name_t name); /** * Creates an tcg_pts_attr_req_funct_comp_evid_t object from received data * - * @param value unparsed attribute value + * @param value Unparsed attribute value */ pa_tnc_attr_t* tcg_pts_attr_req_funct_comp_evid_create_from_data(chunk_t value); diff --git a/src/libimcv/tcg/tcg_pts_attr_simple_comp_evid.c b/src/libimcv/tcg/tcg_pts_attr_simple_comp_evid.c index 39a67f5..c33ac22 100644 --- a/src/libimcv/tcg/tcg_pts_attr_simple_comp_evid.c +++ b/src/libimcv/tcg/tcg_pts_attr_simple_comp_evid.c @@ -148,12 +148,12 @@ struct private_tcg_pts_attr_simple_comp_evid_t { /** * Functional Name Category Qualifier */ - tcg_pts_qualifier_t qualifier; + pts_qualifier_t qualifier; /** * Component Functional Name */ - pts_attr_req_funct_comp_name_bin_enum_t name; + pts_funct_comp_name_t name; /** * Measurement type @@ -398,7 +398,7 @@ METHOD(pa_tnc_attr_t, process, status_t, } reader->read_uint32(reader, &this->name); - /* TODO: Check the name is defined in pts_attr_req_funct_comp_name_bin_enum_t */ + /* TODO: Check the name is defined in pts_funct_comp_name_t */ reader->read_uint8(reader, &measurement_type); this->measurement_type = (measurement_type >> 7 ) & 1; @@ -481,7 +481,7 @@ METHOD(tcg_pts_attr_simple_comp_evid_t, get_family, u_int8_t, return this->family; } -METHOD(tcg_pts_attr_simple_comp_evid_t, get_qualifier, tcg_pts_qualifier_t, +METHOD(tcg_pts_attr_simple_comp_evid_t, get_qualifier, pts_qualifier_t, private_tcg_pts_attr_simple_comp_evid_t *this) { return this->qualifier; @@ -489,19 +489,19 @@ METHOD(tcg_pts_attr_simple_comp_evid_t, get_qualifier, tcg_pts_qualifier_t, METHOD(tcg_pts_attr_simple_comp_evid_t, set_qualifier, void, private_tcg_pts_attr_simple_comp_evid_t *this, - tcg_pts_qualifier_t qualifier) + pts_qualifier_t qualifier) { this->qualifier = qualifier; } -METHOD(tcg_pts_attr_simple_comp_evid_t, get_comp_funct_name, pts_attr_req_funct_comp_name_bin_enum_t, +METHOD(tcg_pts_attr_simple_comp_evid_t, get_comp_funct_name, pts_funct_comp_name_t, private_tcg_pts_attr_simple_comp_evid_t *this) { return this->name; } METHOD(tcg_pts_attr_simple_comp_evid_t, set_comp_funct_name, void, - private_tcg_pts_attr_simple_comp_evid_t *this, pts_attr_req_funct_comp_name_bin_enum_t name) + private_tcg_pts_attr_simple_comp_evid_t *this, pts_funct_comp_name_t name) { this->name = name; } @@ -600,11 +600,13 @@ METHOD(tcg_pts_attr_simple_comp_evid_t, set_pcr_after_value, void, METHOD(tcg_pts_attr_simple_comp_evid_t, get_pcr_len, u_int16_t, private_tcg_pts_attr_simple_comp_evid_t *this) { - if(this->pcr_before.ptr && this->pcr_after.ptr && + 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) - return this->pcr_before.len; - else return 0; + { + return this->pcr_before.len; + } + return 0; } METHOD(tcg_pts_attr_simple_comp_evid_t, get_comp_measurement, chunk_t, @@ -623,19 +625,17 @@ METHOD(tcg_pts_attr_simple_comp_evid_t, set_comp_measurement, void, * Described in header. */ pa_tnc_attr_t *tcg_pts_attr_simple_comp_evid_create( - pts_attr_simple_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 extended_pcr, - pts_meas_algorithms_t hash_algorithm, - pts_pcr_transform_t transformation, - chunk_t measurement_time, - chunk_t policy_uri, - chunk_t pcr_before, - chunk_t pcr_after, - chunk_t measurement) + pts_attr_simple_comp_evid_flag_t flags, + u_int32_t depth, u_int32_t vendor_id, + pts_qualifier_t qualifier, + pts_funct_comp_name_t name, + u_int32_t extended_pcr, + pts_meas_algorithms_t hash_algorithm, + pts_pcr_transform_t transformation, + chunk_t measurement_time, + chunk_t policy_uri, + chunk_t pcr_before, chunk_t pcr_after, + chunk_t measurement) { private_tcg_pts_attr_simple_comp_evid_t *this; diff --git a/src/libimcv/tcg/tcg_pts_attr_simple_comp_evid.h b/src/libimcv/tcg/tcg_pts_attr_simple_comp_evid.h index 7753daf..94fe013 100644 --- a/src/libimcv/tcg/tcg_pts_attr_simple_comp_evid.h +++ b/src/libimcv/tcg/tcg_pts_attr_simple_comp_evid.h @@ -27,12 +27,9 @@ typedef enum pts_pcr_transform_t pts_pcr_transform_t; #include "tcg_attr.h" #include "tcg_pts_meas_algo.h" +#include "tcg_pts_funct_comp_name.h" #include "pa_tnc/pa_tnc_attr.h" -/* For Qualifier and Component Name fields, tcg_pts_qualifier_t, - * pts_attr_req_funct_comp_name_bin_enum_t, pts_attr_req_funct_comp_type_t */ -#include "tcg_pts_attr_req_funct_comp_evid.h" - /** * PTS Simple Component Evidence Flags */ @@ -77,7 +74,7 @@ struct tcg_pts_attr_simple_comp_evid_t { /** * Get flags for PTS Simple Component Evidence * - * @return Set of flags + * @return Set of flags */ pts_attr_simple_comp_evid_flag_t (*get_flags)(tcg_pts_attr_simple_comp_evid_t *this); @@ -92,30 +89,30 @@ struct tcg_pts_attr_simple_comp_evid_t { /** * Get Sub-component Depth * - * @return Sub-component Depth + * @return Sub-component Depth */ u_int32_t (*get_sub_component_depth)(tcg_pts_attr_simple_comp_evid_t *this); /** * Get Specific Component Functional Name Vendor ID * - * @return Component Functional Name Vendor ID + * @return Component Functional Name Vendor ID */ u_int32_t (*get_spec_comp_funct_name_vendor_id)(tcg_pts_attr_simple_comp_evid_t *this); /** * Get Family * - * @return Functional Name Family + * @return Functional Name Family */ u_int8_t (*get_family)(tcg_pts_attr_simple_comp_evid_t *this); /** * Get Qualifier * - * @return Functional Name Category Qualifier + * @return Functional Name Category Qualifier */ - tcg_pts_qualifier_t (*get_qualifier)(tcg_pts_attr_simple_comp_evid_t *this); + pts_qualifier_t (*get_qualifier)(tcg_pts_attr_simple_comp_evid_t *this); /** * Set qualifier for Component Functional Name @@ -123,14 +120,14 @@ struct tcg_pts_attr_simple_comp_evid_t { * @param qualifier Functional Name Category Qualifier */ void (*set_qualifier)(tcg_pts_attr_simple_comp_evid_t *this, - tcg_pts_qualifier_t qualifier); + pts_qualifier_t qualifier); /** * Get Special Component Functional Name * - * @return Component Functional Name + * @return Component Functional Name */ - pts_attr_req_funct_comp_name_bin_enum_t (*get_comp_funct_name)(tcg_pts_attr_simple_comp_evid_t *this); + pts_funct_comp_name_t (*get_comp_funct_name)(tcg_pts_attr_simple_comp_evid_t *this); /** @@ -139,116 +136,116 @@ struct tcg_pts_attr_simple_comp_evid_t { * @param name Component Functional Name */ void (*set_comp_funct_name)(tcg_pts_attr_simple_comp_evid_t *this, - pts_attr_req_funct_comp_name_bin_enum_t name); + pts_funct_comp_name_t name); /** * Get Measurement Type * - * @return Measurement Type + * @return Measurement Type */ u_int8_t (*get_measurement_type)(tcg_pts_attr_simple_comp_evid_t *this); /** * Get which PCR the functional component is extended into * - * @return Number of PCR + * @return Number of PCR */ u_int32_t (*get_extended_pcr)(tcg_pts_attr_simple_comp_evid_t *this); /** * Set which PCR the functional component is extended into * - * @param pcr_number Number of PCR + * @param pcr_number Number of PCR */ void (*set_extended_pcr)(tcg_pts_attr_simple_comp_evid_t *this, - u_int32_t extended_pcr); + u_int32_t extended_pcr); /** * Get Hash Algorithm * - * @return Hash Algorithm + * @return Hash Algorithm */ pts_meas_algorithms_t (*get_hash_algorithm)(tcg_pts_attr_simple_comp_evid_t *this); /** * Set Hash Algorithm * - * @param hash_algorithm Hash Algorithm + * @param hash_algorithm Hash Algorithm */ void (*set_hash_algorithm)(tcg_pts_attr_simple_comp_evid_t *this, - pts_meas_algorithms_t hash_algorithm); + pts_meas_algorithms_t hash_algorithm); /** * Get PCR Transformation * - * @return Transformation type of PCR + * @return Transformation type of PCR */ pts_pcr_transform_t (*get_pcr_trans)(tcg_pts_attr_simple_comp_evid_t *this); /** * Set PCR Transformation * - * @param transformation Transformation type of PCR + * @param transformation Transformation type of PCR */ void (*set_pcr_trans)(tcg_pts_attr_simple_comp_evid_t *this, - pts_pcr_transform_t transformation); + pts_pcr_transform_t transformation); /** * Get Measurement Time * - * @return Measurement time + * @return Measurement time */ chunk_t (*get_measurement_time)(tcg_pts_attr_simple_comp_evid_t *this); /** * Set Measurement Time * - * @param time Measurement time + * @param time Measurement time */ void (*set_measurement_time)(tcg_pts_attr_simple_comp_evid_t *this, - chunk_t time); + chunk_t time); /** * Get Optional Policy URI * - * @return Policy URI + * @return Policy URI */ chunk_t (*get_policy_uri)(tcg_pts_attr_simple_comp_evid_t *this); /** * Set Optional Policy URI * - * @param policy_uri Policy URI + * @param policy_uri Policy URI */ void (*set_policy_uri)(tcg_pts_attr_simple_comp_evid_t *this, - chunk_t policy_uri); + chunk_t policy_uri); /** * Get Optional PCR Length * - * @return Length of PCR before/after values + * @return Length of PCR before/after values */ u_int16_t (*get_pcr_len)(tcg_pts_attr_simple_comp_evid_t *this); /** * Get Optional PCR before value * - * @return PCR before value + * @return PCR before value */ chunk_t (*get_pcr_before_value)(tcg_pts_attr_simple_comp_evid_t *this); /** * Set Optional PCR before value * - * @param pcr_before PCR before value + * @param pcr_before PCR before value */ void (*set_pcr_before_value)(tcg_pts_attr_simple_comp_evid_t *this, - chunk_t pcr_before); + chunk_t pcr_before); /** * Get Optional PCR after value * - * @return PCR after value + * @return PCR after value */ chunk_t (*get_pcr_after_value)(tcg_pts_attr_simple_comp_evid_t *this); @@ -258,60 +255,60 @@ struct tcg_pts_attr_simple_comp_evid_t { * @param pcr_after PCR after value */ void (*set_pcr_after_value)(tcg_pts_attr_simple_comp_evid_t *this, - chunk_t pcr_after); + chunk_t pcr_after); /** * Get Component Measurement * - * @return Component Measurement Hash + * @return Component Measurement Hash */ chunk_t (*get_comp_measurement)(tcg_pts_attr_simple_comp_evid_t *this); /** * Set Component Measurement * - * @param measurement Component Measurement Hash + * @param measurement Component Measurement Hash */ void (*set_comp_measurement)(tcg_pts_attr_simple_comp_evid_t *this, - chunk_t measurement); + chunk_t measurement); }; /** * Creates an tcg_pts_attr_simple_comp_evid_t object * - * @param flags Set of flags - * @param depth Sub-component Depth - * @param vendor_id Component Functional Name Vendor ID - * @param qualifier Functional Name Category Qualifier - * @param name Component Functional Name + * @param flags Set of flags + * @param depth Sub-component Depth + * @param vendor_id Component Functional Name Vendor ID + * @param qualifier Functional Name Category Qualifier + * @param name Component Functional Name * @param extended_pcr Which PCR the functional component is extended into * @param hash_algorithm Hash Algorithm * @param transformation Transformation type for PCR * @param measurement_time Measurement time * @param policy_uri Optional Policy URI * @param pcr_before Optional PCR before value - * @param pcr_after Optional PCR after value + * @param pcr_after Optional PCR after value * @param measurement Component Measurement */ pa_tnc_attr_t* tcg_pts_attr_simple_comp_evid_create(pts_attr_simple_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 extended_pcr, - pts_meas_algorithms_t hash_algorithm, - pts_pcr_transform_t transformation, - chunk_t measurement_time, - chunk_t policy_uri, - chunk_t pcr_before, - chunk_t pcr_after, - chunk_t measurement); + u_int32_t depth, + u_int32_t vendor_id, + pts_qualifier_t qualifier, + pts_funct_comp_name_t name, + u_int32_t extended_pcr, + pts_meas_algorithms_t hash_algorithm, + pts_pcr_transform_t transformation, + chunk_t measurement_time, + chunk_t policy_uri, + chunk_t pcr_before, + chunk_t pcr_after, + chunk_t measurement); /** * Creates an tcg_pts_attr_simple_comp_evid_t object from received data * - * @param value unparsed attribute value + * @param value Unparsed attribute value */ pa_tnc_attr_t* tcg_pts_attr_simple_comp_evid_create_from_data(chunk_t value); diff --git a/src/libimcv/tcg/tcg_pts_funct_comp_name.h b/src/libimcv/tcg/tcg_pts_funct_comp_name.h new file mode 100644 index 0000000..68e0edc --- /dev/null +++ b/src/libimcv/tcg/tcg_pts_funct_comp_name.h @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2011 Sansar Choinyambuu + * HSR Hochschule fuer Technik Rapperswil + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. See . + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +/** + * @defgroup tcg_pts_attr_req_funct_comp_evid tcg_pts_attr_req_funct_comp_evid + * @{ @ingroup tcg_pts_attr_req_funct_comp_evid + */ + +#ifndef TCG_PTS_FUNCT_COMP_NAME_H_ +#define TCG_PTS_FUNCT_COMP_NAME_H_ + +typedef enum pts_funct_comp_type_t pts_funct_comp_type_t; +typedef enum pts_funct_comp_name_t pts_funct_comp_name_t; +typedef struct pts_qualifier_t pts_qualifier_t; + +/** + * PTS Component Functional Type for Qualifier field + */ +enum pts_funct_comp_type_t { + /** Unknown */ + PTS_FUNC_COMP_TYPE_UNKNOWN = 0x0, + /** Trusted Platform */ + PTS_FUNC_COMP_TYPE_TRUSTED = 0x1, + /** Operating System */ + PTS_FUNC_COMP_TYPE_OS = 0x2, + /** Graphical User Interface */ + PTS_FUNC_COMP_TYPE_GUI = 0x3, + /** Application */ + PTS_FUNC_COMP_TYPE_APP = 0x4, + /** Networking */ + PTS_FUNC_COMP_TYPE_NET = 0x5, + /** Library */ + PTS_FUNC_COMP_TYPE_LIB = 0x6, + /** TNC Defined Component */ + PTS_FUNC_COMP_TYPE_TNC = 0x7, + /** All matching Components */ + PTS_FUNC_COMP_TYPE_ALL = 0xF, +}; + +/** + * PTS Component Functional Name Binary Enumeration + */ +enum pts_funct_comp_name_t { + /** Ignore */ + PTS_FUNC_COMP_NAME_IGNORE = 0x0000, + /** CRTM */ + PTS_FUNC_COMP_NAME_CRTM = 0x0001, + /** BIOS */ + PTS_FUNC_COMP_NAME_BIOS = 0x0002, + /** Platform Extensions */ + PTS_FUNC_COMP_NAME_PLATFORM_EXT = 0x0003, + /** Motherboard firmware */ + PTS_FUNC_COMP_NAME_BOARD = 0x0004, + /** Initial Program Loader */ + PTS_FUNC_COMP_NAME_INIT_LOADER = 0x0005, + /** Option ROMs */ + PTS_FUNC_COMP_NAME_OPT_ROMS = 0x0006, +}; + +/** + * Qualifier for Functional Component + */ +struct pts_qualifier_t { + bool kernel; + bool sub_component; + pts_funct_comp_type_t type; +}; + +#endif /** TCG_PTS_FUNCT_COMP_NAME_H_ @}*/ -- 2.7.4