2 * Copyright (C) 2011 Sansar Choinyambuu
3 * HSR Hochschule fuer Technik Rapperswil
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * @defgroup tcg_pts_attr_simple_evid_final tcg_pts_attr_simple_evid_final
18 * @{ @ingroup tcg_pts_attr_simple_evid_final
21 #ifndef TCG_PTS_ATTR_SIMPLE_EVID_FINAL_H_
22 #define TCG_PTS_ATTR_SIMPLE_EVID_FINAL_H_
24 typedef struct tcg_pts_attr_simple_evid_final_t tcg_pts_attr_simple_evid_final_t
;
25 typedef enum pts_simple_evid_final_flag_t pts_simple_evid_final_flag_t
;
28 #include "pa_tnc/pa_tnc_attr.h"
29 /* For Optional Composite Hash Algorithm field, pts_attr_meas_algorithms_t*/
30 #include "tcg_pts_attr_meas_algo_selection.h"
33 * PTS Simple Evidence Final Flags
35 enum pts_simple_evid_final_flag_t
{
36 /** No Optional TPM PCR Composite nor Optional TPM Quote Signature fields included */
37 PTS_SIMPLE_EVID_FINAL_FLAG_NO
= 0,
38 /** Optional TPM PCR Composite and Optional TPM Quote Signature fields included */
39 /** using TPM_QUOTE_INFO */
40 PTS_SIMPLE_EVID_FINAL_FLAG_TPM_QUOTE_INFO
= 1,
41 /** Optional TPM PCR Composite and Optional TPM Quote Signature fields included */
42 /** using TPM_QUOTE_INFO2, TPM_CAP_VERSION_INFO was not appended */
43 PTS_SIMPLE_EVID_FINAL_FLAG_TPM_QUOTE_INFO2
= 2,
44 /** Optional TPM PCR Composite and Optional TPM Quote Signature fields included */
45 /** using TPM_QUOTE_INFO2, TPM_CAP_VERSION_INFO was appended */
46 PTS_SIMPLE_EVID_FINAL_FLAG_TPM_QUOTE_INFO2_CAP_VER
= 3,
47 /** Optional Evidence Signature included */
48 PTS_SIMPLE_EVID_FINAL_FLAG_EVID
= 4,
52 * Class implementing the TCG PTS Simple Evidence Final attribute
55 struct tcg_pts_attr_simple_evid_final_t
{
58 * Public PA-TNC attribute interface
60 pa_tnc_attr_t pa_tnc_attribute
;
63 * Get flags for PTS Simple Evidence Final
65 * @return Set of flags
67 pts_simple_evid_final_flag_t (*get_flags
)(tcg_pts_attr_simple_evid_final_t
*this);
70 * Set flags for PTS Simple Evidence Final
72 * @param flags Set of flags
74 void (*set_flags
)(tcg_pts_attr_simple_evid_final_t
*this,
75 pts_simple_evid_final_flag_t flags
);
78 * Get Optional Composite Hash Algorithm
80 * @return Composite Hash Algorithm
82 pts_meas_algorithms_t (*get_comp_hash_algorithm
)(tcg_pts_attr_simple_evid_final_t
*this);
85 * Set Optional Composite Hash Algorithm
87 * @param hash_algorithm Composite Hash Algorithm
89 void (*set_comp_hash_algorithm
)(tcg_pts_attr_simple_evid_final_t
*this,
90 pts_meas_algorithms_t hash_algorithm
);
93 * Get Optional TPM PCR Composite Length
95 * @return Length of Composite PCR Length
97 u_int32_t (*get_comp_pcr_len
)(tcg_pts_attr_simple_evid_final_t
*this);
100 * Get Optional TPM PCR Composite
102 * @return PCR Composite
104 chunk_t (*get_pcr_comp
)(tcg_pts_attr_simple_evid_final_t
*this);
107 * Set Optional TPM PCR Composite
109 * @param pcr_comp PCR Composite
111 void (*set_pcr_comp
)(tcg_pts_attr_simple_evid_final_t
*this,
115 * Get Optional TPM Quote Signature Length
117 * @return TPM Quote Signature Length
119 u_int32_t (*get_tpm_quote_sign_len
)(tcg_pts_attr_simple_evid_final_t
*this);
122 * Get Optional TPM Quote Signature
124 * @return TPM Quote Signature
126 chunk_t (*get_tpm_quote_sign
)(tcg_pts_attr_simple_evid_final_t
*this);
129 * Set Optional TPM Quote Signature
131 * @param tpm_quote_sign TPM Quote Signature
133 void (*set_tpm_quote_sign
)(tcg_pts_attr_simple_evid_final_t
*this,
134 chunk_t tpm_quote_sign
);
137 * Get Optional Evidence Signature
139 * @return Optional Evidence Signature
141 chunk_t (*get_evid_sign
)(tcg_pts_attr_simple_evid_final_t
*this);
144 * Set Optional Evidence Signature
146 * @param signature Optional Evidence Signature
148 void (*set_evid_sign
)(tcg_pts_attr_simple_evid_final_t
*this,
154 * Creates an tcg_pts_attr_simple_evid_final_t object
156 * @param flags Set of flags
157 * @param comp_hash_algorithm Composite Hash Algorithm
158 * @param pcr_comp Optional TPM PCR Composite
159 * @param tpm_quote_sign Optional TPM Quote Signature
160 * @param evid_sign Optional Evidence Signature
162 pa_tnc_attr_t
* tcg_pts_attr_simple_evid_final_create(pts_simple_evid_final_flag_t flags
,
163 pts_meas_algorithms_t comp_hash_algorithm
,
165 chunk_t tpm_quote_sign
,
169 * Creates an tcg_pts_attr_simple_evid_final_t object from received data
171 * @param value unparsed attribute value
173 pa_tnc_attr_t
* tcg_pts_attr_simple_evid_final_create_from_data(chunk_t value
);
175 #endif /** TCG_PTS_ATTR_SIMPLE_EVID_FINAL_H_ @}*/