2 * Copyright (C) 2011 Andreas Steffen
4 * HSR Hochschule fuer Technik Rapperswil
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 #include "ita_comp_tgrub.h"
18 #include "ita_comp_func_name.h"
20 #include "pts/pts_func_comp_evid_req.h"
21 #include "pts/components/pts_component.h"
26 typedef struct pts_ita_comp_tgrub_t pts_ita_comp_tgrub_t
;
29 * Private data of a pts_ita_comp_tgrub_t object.
32 struct pts_ita_comp_tgrub_t
{
35 * Public pts_component_manager_t interface.
37 pts_component_t
public;
40 * Component Functional Name
42 pts_comp_func_name_t
*name
;
45 METHOD(pts_component_t
, get_comp_func_name
, pts_comp_func_name_t
*,
46 pts_ita_comp_tgrub_t
*this)
51 METHOD(pts_component_t
, get_evidence_flags
, u_int8_t
,
52 pts_ita_comp_tgrub_t
*this)
54 return PTS_REQ_FUNC_COMP_FLAG_PCR
;
57 METHOD(pts_component_t
, measure
, bool,
58 pts_ita_comp_tgrub_t
*this)
60 /* TODO measure the tgrub functional component */
64 METHOD(pts_component_t
, verify
, bool,
65 pts_ita_comp_tgrub_t
*this)
67 /* TODO verify the measurement of the tgrub functional component */
71 METHOD(pts_component_t
, destroy
, void,
72 pts_ita_comp_tgrub_t
*this)
74 this->name
->destroy(this->name
);
81 pts_component_t
*pts_ita_comp_tgrub_create(u_int8_t qualifier
)
83 pts_ita_comp_tgrub_t
*this;
87 .get_comp_func_name
= _get_comp_func_name
,
88 .get_evidence_flags
= _get_evidence_flags
,
93 .name
= pts_comp_func_name_create(PEN_ITA
, PTS_ITA_COMP_FUNC_NAME_TBOOT
,