summaryrefslogtreecommitdiff
path: root/src/libpts/tcg/tcg_attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libpts/tcg/tcg_attr.c')
-rw-r--r--src/libpts/tcg/tcg_attr.c61
1 files changed, 38 insertions, 23 deletions
diff --git a/src/libpts/tcg/tcg_attr.c b/src/libpts/tcg/tcg_attr.c
index b91bf8283..f9c6c46cf 100644
--- a/src/libpts/tcg/tcg_attr.c
+++ b/src/libpts/tcg/tcg_attr.c
@@ -13,23 +13,26 @@
*/
#include "tcg_attr.h"
-#include "tcg/tcg_pts_attr_proto_caps.h"
-#include "tcg/tcg_pts_attr_dh_nonce_params_req.h"
-#include "tcg/tcg_pts_attr_dh_nonce_params_resp.h"
-#include "tcg/tcg_pts_attr_dh_nonce_finish.h"
-#include "tcg/tcg_pts_attr_meas_algo.h"
-#include "tcg/tcg_pts_attr_get_tpm_version_info.h"
-#include "tcg/tcg_pts_attr_tpm_version_info.h"
-#include "tcg/tcg_pts_attr_get_aik.h"
-#include "tcg/tcg_pts_attr_aik.h"
-#include "tcg/tcg_pts_attr_req_func_comp_evid.h"
-#include "tcg/tcg_pts_attr_gen_attest_evid.h"
-#include "tcg/tcg_pts_attr_simple_comp_evid.h"
-#include "tcg/tcg_pts_attr_simple_evid_final.h"
-#include "tcg/tcg_pts_attr_req_file_meas.h"
-#include "tcg/tcg_pts_attr_file_meas.h"
-#include "tcg/tcg_pts_attr_req_file_meta.h"
-#include "tcg/tcg_pts_attr_unix_file_meta.h"
+#include "tcg/pts/tcg_pts_attr_proto_caps.h"
+#include "tcg/pts/tcg_pts_attr_dh_nonce_params_req.h"
+#include "tcg/pts/tcg_pts_attr_dh_nonce_params_resp.h"
+#include "tcg/pts/tcg_pts_attr_dh_nonce_finish.h"
+#include "tcg/pts/tcg_pts_attr_meas_algo.h"
+#include "tcg/pts/tcg_pts_attr_get_tpm_version_info.h"
+#include "tcg/pts/tcg_pts_attr_tpm_version_info.h"
+#include "tcg/pts/tcg_pts_attr_get_aik.h"
+#include "tcg/pts/tcg_pts_attr_aik.h"
+#include "tcg/pts/tcg_pts_attr_req_func_comp_evid.h"
+#include "tcg/pts/tcg_pts_attr_gen_attest_evid.h"
+#include "tcg/pts/tcg_pts_attr_simple_comp_evid.h"
+#include "tcg/pts/tcg_pts_attr_simple_evid_final.h"
+#include "tcg/pts/tcg_pts_attr_req_file_meas.h"
+#include "tcg/pts/tcg_pts_attr_file_meas.h"
+#include "tcg/pts/tcg_pts_attr_req_file_meta.h"
+#include "tcg/pts/tcg_pts_attr_unix_file_meta.h"
+#include "tcg/swid/tcg_swid_attr_req.h"
+#include "tcg/swid/tcg_swid_attr_tag_id_inv.h"
+#include "tcg/swid/tcg_swid_attr_tag_inv.h"
ENUM_BEGIN(tcg_attr_names, TCG_SCAP_REFERENCES,
TCG_SCAP_SUMMARY_RESULTS,
@@ -39,15 +42,17 @@ ENUM_BEGIN(tcg_attr_names, TCG_SCAP_REFERENCES,
"SCAP Assessment",
"SCAP Results",
"SCAP Summary Results");
-ENUM_NEXT(tcg_attr_names, TCG_SWID_INVENTORY_REQUEST,
- TCG_SWID_TAG_IDENTIFIER_RESPONSE,
+ENUM_NEXT(tcg_attr_names, TCG_SWID_REQUEST,
+ TCG_SWID_TAG_EVENTS,
TCG_SCAP_SUMMARY_RESULTS,
- "SWID Inventory Request",
- "SWID Tag Response",
- "SWID Tag Identifier Response");
+ "SWID Request",
+ "SWID Tag Identifier Inventory",
+ "SWID Tag Identifier Events",
+ "SWID Tag Inventory",
+ "SWID Tag Events");
ENUM_NEXT(tcg_attr_names, TCG_PTS_REQ_FUNC_COMP_EVID,
TCG_PTS_REQ_FUNC_COMP_EVID,
- TCG_SWID_TAG_IDENTIFIER_RESPONSE,
+ TCG_SWID_TAG_EVENTS,
"Request Functional Component Evidence");
ENUM_NEXT(tcg_attr_names, TCG_PTS_GEN_ATTEST_EVID,
TCG_PTS_GEN_ATTEST_EVID,
@@ -170,6 +175,12 @@ pa_tnc_attr_t* tcg_attr_create_from_data(u_int32_t type, chunk_t value)
{
switch (type)
{
+ case TCG_SWID_REQUEST:
+ return tcg_swid_attr_req_create_from_data(value);
+ case TCG_SWID_TAG_ID_INVENTORY:
+ return tcg_swid_attr_tag_id_inv_create_from_data(value);
+ case TCG_SWID_TAG_INVENTORY:
+ return tcg_swid_attr_tag_inv_create_from_data(value);
case TCG_PTS_REQ_PROTO_CAPS:
return tcg_pts_attr_proto_caps_create_from_data(value, TRUE);
case TCG_PTS_PROTO_CAPS:
@@ -208,6 +219,10 @@ pa_tnc_attr_t* tcg_attr_create_from_data(u_int32_t type, chunk_t value)
return tcg_pts_attr_req_file_meta_create_from_data(value);
case TCG_PTS_UNIX_FILE_META:
return tcg_pts_attr_unix_file_meta_create_from_data(value);
+ /* unsupported TCG/SWID attributes */
+ case TCG_SWID_TAG_ID_EVENTS:
+ case TCG_SWID_TAG_EVENTS:
+ /* unsupported TCG/PTS attributes */
case TCG_PTS_REQ_TEMPL_REF_MANI_SET_META:
case TCG_PTS_TEMPL_REF_MANI_SET_META:
case TCG_PTS_UPDATE_TEMPL_REF_MANI: