Write/Read flags field directly to/from variable
[strongswan.git] / src / libpts / tcg / tcg_pts_attr_simple_comp_evid.c
1 /*
2 * Copyright (C) 2011 Sansar Choinyambuu
3 * HSR Hochschule fuer Technik Rapperswil
4 *
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>.
9 *
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
13 * for more details.
14 */
15
16 #include "tcg_pts_attr_simple_comp_evid.h"
17
18 #include <pa_tnc/pa_tnc_msg.h>
19 #include <bio/bio_writer.h>
20 #include <bio/bio_reader.h>
21 #include <debug.h>
22
23 typedef struct private_tcg_pts_attr_simple_comp_evid_t private_tcg_pts_attr_simple_comp_evid_t;
24
25 /**
26 * Simple Component Evidence
27 * see section 3.15.1 of PTS Protocol: Binding to TNC IF-M Specification
28 *
29 * 1 2 3
30 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
31 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
32 * | Flags | Sub-Component Depth |
33 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
34 * | Specific Functional Component |
35 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
36 * | Specific Functional Component |
37 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
38 * | Measure. Type | Extended into PCR |
39 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
40 * | Hash Algorithm | PCR Transform | Reserved |
41 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
42 * | Measurement Date/Time |
43 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
44 * | Measurement Date/Time |
45 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
46 * | Measurement Date/Time |
47 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
48 * | Measurement Date/Time |
49 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
50 * | Measurement Date/Time |
51 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
52 * | Optional Policy URI Length | Opt. Verification Policy URI ~
53 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
54 * ~ Optional Verification Policy URI ~
55 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
56 * | Optional PCR Length | Optional PCR Before Value ~
57 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
58 * ~ Optional PCR Before Value (Variable Length) ~
59 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
60 * ~ Optional PCR After Value (Variable Length) ~
61 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
62 * ~ Component Measurement (Variable Length) ~
63 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
64 */
65
66 /**
67 * Specific Functional Component -> Component Functional Name Structure
68 * see section 5.1 of PTS Protocol: Binding to TNC IF-M Specification
69 *
70 * 1 2 3
71 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
72 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
73 * | Component Functional Name Vendor ID |Fam| Qualifier |
74 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
75 * | Component Functional Name |
76 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
77 *
78 */
79
80 /**
81 * Qualifier for Functional Component
82 * see section 5.2 of PTS Protocol: Binding to TNC IF-M Specification
83 *
84 *
85 * 0 1 2 3 4 5
86 * +-+-+-+-+-+-+
87 * |K|S| Type |
88 * +-+-+-+-+-+-+
89 */
90
91
92
93 #define PTS_SIMPLE_COMP_EVID_SIZE 40
94 #define PTS_SIMPLE_COMP_EVID_MEASUREMENT_TIME_SIZE 20
95 #define PTS_SIMPLE_COMP_EVID_RESERVED 0x00
96 #define PTS_REQ_FUNCT_COMP_FAM_BIN_ENUM 0x00
97
98 /**
99 * Private data of an tcg_pts_attr_simple_comp_evid_t object.
100 */
101 struct private_tcg_pts_attr_simple_comp_evid_t {
102
103 /**
104 * Public members of tcg_pts_attr_simple_comp_evid_t
105 */
106 tcg_pts_attr_simple_comp_evid_t public;
107
108 /**
109 * Attribute vendor ID
110 */
111 pen_t vendor_id;
112
113 /**
114 * Attribute type
115 */
116 u_int32_t type;
117
118 /**
119 * Attribute value
120 */
121 chunk_t value;
122
123 /**
124 * Noskip flag
125 */
126 bool noskip_flag;
127
128 /**
129 * Set of flags for Simple Component Evidence
130 */
131 pts_attr_simple_comp_evid_flag_t flags;
132
133 /**
134 * PCR Information included
135 */
136 bool pcr_info_included;
137
138 /**
139 * Sub-component Depth
140 */
141 u_int32_t depth;
142
143 /**
144 * Component Functional Name Vendor ID
145 */
146 u_int32_t comp_vendor_id;
147
148 /**
149 * Functional Name Encoding Family
150 */
151 u_int8_t family;
152
153 /**
154 * Functional Name Category Qualifier
155 */
156 pts_qualifier_t qualifier;
157
158 /**
159 * Component Functional Name
160 */
161 pts_ita_funct_comp_name_t name;
162
163 /**
164 * Measurement type
165 */
166 u_int8_t measurement_type;
167
168 /**
169 * Which PCR the functional component is extended into
170 */
171 u_int32_t extended_pcr;
172
173 /**
174 * Hash Algorithm
175 */
176 pts_meas_algorithms_t hash_algorithm;
177
178 /**
179 * Transformation type for PCR
180 */
181 pts_pcr_transform_t transformation;
182
183 /**
184 * Measurement time
185 */
186 chunk_t measurement_time;
187
188 /**
189 * Optional Policy URI
190 */
191 chunk_t policy_uri;
192
193 /**
194 * Optional PCR before value
195 */
196 chunk_t pcr_before;
197
198 /**
199 * Optional PCR after value
200 */
201 chunk_t pcr_after;
202
203 /**
204 * Component Measurement
205 */
206 chunk_t measurement;
207
208 };
209
210 METHOD(pa_tnc_attr_t, get_vendor_id, pen_t,
211 private_tcg_pts_attr_simple_comp_evid_t *this)
212 {
213 return this->vendor_id;
214 }
215
216 METHOD(pa_tnc_attr_t, get_type, u_int32_t,
217 private_tcg_pts_attr_simple_comp_evid_t *this)
218 {
219 return this->type;
220 }
221
222 METHOD(pa_tnc_attr_t, get_value, chunk_t,
223 private_tcg_pts_attr_simple_comp_evid_t *this)
224 {
225 return this->value;
226 }
227
228 METHOD(pa_tnc_attr_t, get_noskip_flag, bool,
229 private_tcg_pts_attr_simple_comp_evid_t *this)
230 {
231 return this->noskip_flag;
232 }
233
234 METHOD(pa_tnc_attr_t, set_noskip_flag,void,
235 private_tcg_pts_attr_simple_comp_evid_t *this, bool noskip)
236 {
237 this->noskip_flag = noskip;
238 }
239
240 METHOD(pa_tnc_attr_t, build, void,
241 private_tcg_pts_attr_simple_comp_evid_t *this)
242 {
243 bio_writer_t *writer;
244 u_int8_t qualifier = 0;
245
246 writer = bio_writer_create(PTS_SIMPLE_COMP_EVID_SIZE);
247 writer->write_uint8(writer, this->flags);
248 writer->write_uint24 (writer, this->depth);
249 writer->write_uint24 (writer, this->comp_vendor_id);
250
251 if (this->family != PTS_REQ_FUNCT_COMP_FAM_BIN_ENUM)
252 {
253 DBG1(DBG_TNC, "Functional Name Encoding Family is not set to 00");
254 }
255
256 qualifier += this->qualifier.type;
257 if (this->qualifier.kernel)
258 {
259 qualifier += 16;
260 }
261 if (this->qualifier.sub_component)
262 {
263 qualifier += 32;
264 }
265
266 /* Unknown or Wildcard should not be used for Qualification*/
267 if (!qualifier || qualifier == 63)
268 {
269 DBG1(DBG_TNC, "Unknown or Wildcard should not be used for"
270 " Functional Name Qualifier");
271 }
272
273 writer->write_uint8 (writer, qualifier);
274 writer->write_uint32(writer, this->name);
275
276 writer->write_uint8 (writer, (this->measurement_type << 7));
277 writer->write_uint24(writer, this->extended_pcr);
278 writer->write_uint16(writer, this->hash_algorithm);
279 writer->write_uint8 (writer, this->transformation);
280 writer->write_data (writer, this->measurement_time);
281
282 /* Optional fields */
283 if (this->policy_uri.ptr && this->policy_uri.len > 0)
284 {
285 writer->write_uint16(writer, this->policy_uri.len);
286 writer->write_data (writer, this->policy_uri);
287 }
288 if (this->pcr_before.ptr && this->pcr_after.ptr &&
289 this->pcr_before.len == this->pcr_after.len &&
290 this->pcr_before.len > 0 && this->pcr_after.len > 0)
291 {
292 writer->write_uint16(writer, this->pcr_before.len);
293 writer->write_data (writer, this->pcr_before);
294 writer->write_data (writer, this->pcr_after);
295 }
296
297 if (this->measurement.ptr && this->measurement.len > 0)
298 {
299 writer->write_data (writer, this->measurement);
300 }
301
302 this->value = chunk_clone(writer->get_buf(writer));
303 writer->destroy(writer);
304 }
305
306 METHOD(pa_tnc_attr_t, process, status_t,
307 private_tcg_pts_attr_simple_comp_evid_t *this, u_int32_t *offset)
308 {
309 bio_reader_t *reader;
310 u_int8_t flags;
311 u_int8_t fam_and_qualifier;
312 u_int8_t measurement_type;
313 u_int16_t algorithm;
314 u_int8_t transformation;
315 u_int32_t measurement_len;
316
317 if (this->value.len < PTS_SIMPLE_COMP_EVID_SIZE)
318 {
319 DBG1(DBG_TNC, "insufficient data for Simple Component Evidence");
320 *offset = 0;
321 return FAILED;
322 }
323 reader = bio_reader_create(this->value);
324
325 reader->read_uint8(reader, &flags);
326 this->flags = flags;
327
328 reader->read_uint24(reader, &this->depth);
329 reader->read_uint24(reader, &this->comp_vendor_id);
330 reader->read_uint8(reader, &fam_and_qualifier);
331
332 if (((fam_and_qualifier >> 6) & 1) )
333 {
334 this->family += 1;
335 }
336 if (((fam_and_qualifier >> 7) & 1) )
337 {
338 this->family += 2;
339 }
340
341 if (((fam_and_qualifier >> 5) & 1) )
342 {
343 this->qualifier.kernel = true;
344 }
345 if (((fam_and_qualifier >> 4) & 1) )
346 {
347 this->qualifier.sub_component = true;
348 }
349 this->qualifier.type = ( fam_and_qualifier & 0xF );
350
351 /* Unknown or Wildcard should not be used for Qualification*/
352 if (!(fam_and_qualifier & 0x3F) || (fam_and_qualifier & 0x3F) == 0x3F)
353 {
354 DBG1(DBG_TNC, "Unknown or Wildcard should not be used for"
355 " Functional Name Qualifier");
356 }
357
358 reader->read_uint32(reader, &this->name);
359 reader->read_uint8(reader, &measurement_type);
360 this->measurement_type = (measurement_type >> 7 ) & 1;
361
362 reader->read_uint24(reader, &this->extended_pcr);
363 reader->read_uint16(reader, &algorithm);
364 this->hash_algorithm = algorithm;
365
366 reader->read_uint8(reader, &transformation);
367 this->transformation = transformation;
368
369 reader->read_data(reader, PTS_SIMPLE_COMP_EVID_MEASUREMENT_TIME_SIZE,
370 &this->measurement_time);
371 this->measurement_time = chunk_clone(this->measurement_time);
372
373 /* Optional Policy URI field is included */
374 if ((this->flags == PTS_SIMPLE_COMP_EVID_FLAG_VER_FAIL) ||
375 (this->flags == PTS_SIMPLE_COMP_EVID_FLAG_VER_PASS))
376 {
377 u_int16_t policy_uri_len;
378 reader->read_uint16(reader, &policy_uri_len);
379 reader->read_data(reader, policy_uri_len, &this->policy_uri);
380 this->policy_uri = chunk_clone(this->policy_uri);
381 }
382
383 /* Optional PCR value fields are included */
384 if (this->pcr_info_included)
385 {
386 u_int16_t pcr_value_len;
387 reader->read_uint16(reader, &pcr_value_len);
388 reader->read_data(reader, pcr_value_len, &this->pcr_before);
389 this->pcr_before = chunk_clone(this->pcr_before);
390 reader->read_data(reader, pcr_value_len, &this->pcr_after);
391 this->pcr_after = chunk_clone(this->pcr_after);
392 }
393 measurement_len = reader->remaining(reader);
394 reader->read_data(reader, measurement_len, &this->measurement);
395 this->measurement = chunk_clone(this->measurement);
396
397 reader->destroy(reader);
398 return SUCCESS;
399 }
400
401 METHOD(pa_tnc_attr_t, destroy, void,
402 private_tcg_pts_attr_simple_comp_evid_t *this)
403 {
404 free(this->value.ptr);
405 free(this->measurement_time.ptr);
406 free(this->policy_uri.ptr);
407 free(this->pcr_before.ptr);
408 free(this->pcr_after.ptr);
409 free(this->measurement.ptr);
410 free(this);
411 }
412
413 METHOD(tcg_pts_attr_simple_comp_evid_t, is_pcr_info_included, bool,
414 private_tcg_pts_attr_simple_comp_evid_t *this)
415 {
416 return this->pcr_info_included;
417 }
418
419 METHOD(tcg_pts_attr_simple_comp_evid_t, get_flags, pts_attr_simple_comp_evid_flag_t,
420 private_tcg_pts_attr_simple_comp_evid_t *this)
421 {
422 return this->flags;
423 }
424
425 METHOD(tcg_pts_attr_simple_comp_evid_t, get_sub_component_depth, u_int32_t,
426 private_tcg_pts_attr_simple_comp_evid_t *this)
427 {
428 return this->depth;
429 }
430
431 METHOD(tcg_pts_attr_simple_comp_evid_t, get_spec_comp_funct_name_vendor_id, u_int32_t,
432 private_tcg_pts_attr_simple_comp_evid_t *this)
433 {
434 return this->comp_vendor_id;
435 }
436
437 METHOD(tcg_pts_attr_simple_comp_evid_t, get_family, u_int8_t,
438 private_tcg_pts_attr_simple_comp_evid_t *this)
439 {
440 return this->family;
441 }
442
443 METHOD(tcg_pts_attr_simple_comp_evid_t, get_qualifier, pts_qualifier_t,
444 private_tcg_pts_attr_simple_comp_evid_t *this)
445 {
446 return this->qualifier;
447 }
448
449 METHOD(tcg_pts_attr_simple_comp_evid_t, get_comp_funct_name, pts_ita_funct_comp_name_t,
450 private_tcg_pts_attr_simple_comp_evid_t *this)
451 {
452 return this->name;
453 }
454
455 METHOD(tcg_pts_attr_simple_comp_evid_t, get_measurement_type, u_int8_t,
456 private_tcg_pts_attr_simple_comp_evid_t *this)
457 {
458 return this->measurement_type;
459 }
460
461 METHOD(tcg_pts_attr_simple_comp_evid_t, get_extended_pcr, u_int32_t,
462 private_tcg_pts_attr_simple_comp_evid_t *this)
463 {
464 return this->extended_pcr;
465 }
466
467 METHOD(tcg_pts_attr_simple_comp_evid_t, get_hash_algorithm, pts_meas_algorithms_t,
468 private_tcg_pts_attr_simple_comp_evid_t *this)
469 {
470 return this->hash_algorithm;
471 }
472
473 METHOD(tcg_pts_attr_simple_comp_evid_t, get_pcr_trans, pts_pcr_transform_t,
474 private_tcg_pts_attr_simple_comp_evid_t *this)
475 {
476 return this->transformation;
477 }
478
479 METHOD(tcg_pts_attr_simple_comp_evid_t, get_measurement_time, chunk_t,
480 private_tcg_pts_attr_simple_comp_evid_t *this)
481 {
482 return this->measurement_time;
483 }
484
485 METHOD(tcg_pts_attr_simple_comp_evid_t, get_policy_uri, chunk_t,
486 private_tcg_pts_attr_simple_comp_evid_t *this)
487 {
488 return this->policy_uri;
489 }
490
491 METHOD(tcg_pts_attr_simple_comp_evid_t, get_pcr_before_value, chunk_t,
492 private_tcg_pts_attr_simple_comp_evid_t *this)
493 {
494 return this->pcr_before;
495 }
496
497 METHOD(tcg_pts_attr_simple_comp_evid_t, get_pcr_after_value, chunk_t,
498 private_tcg_pts_attr_simple_comp_evid_t *this)
499 {
500 return this->pcr_after;
501 }
502
503 METHOD(tcg_pts_attr_simple_comp_evid_t, get_pcr_len, u_int16_t,
504 private_tcg_pts_attr_simple_comp_evid_t *this)
505 {
506 if (this->pcr_before.ptr && this->pcr_after.ptr &&
507 this->pcr_before.len == this->pcr_after.len &&
508 this->pcr_before.len > 0 && this->pcr_after.len > 0)
509 {
510 return this->pcr_before.len;
511 }
512 return 0;
513 }
514
515 METHOD(tcg_pts_attr_simple_comp_evid_t, get_comp_measurement, chunk_t,
516 private_tcg_pts_attr_simple_comp_evid_t *this)
517 {
518 return this->measurement;
519 }
520
521 /**
522 * Described in header.
523 */
524 pa_tnc_attr_t *tcg_pts_attr_simple_comp_evid_create(tcg_pts_attr_simple_comp_evid_params_t params)
525 {
526 private_tcg_pts_attr_simple_comp_evid_t *this;
527
528 INIT(this,
529 .public = {
530 .pa_tnc_attribute = {
531 .get_vendor_id = _get_vendor_id,
532 .get_type = _get_type,
533 .get_value = _get_value,
534 .get_noskip_flag = _get_noskip_flag,
535 .set_noskip_flag = _set_noskip_flag,
536 .build = _build,
537 .process = _process,
538 .destroy = _destroy,
539 },
540 .is_pcr_info_included = _is_pcr_info_included,
541 .get_flags= _get_flags,
542 .get_sub_component_depth = _get_sub_component_depth,
543 .get_spec_comp_funct_name_vendor_id = _get_spec_comp_funct_name_vendor_id,
544 .get_family = _get_family,
545 .get_qualifier = _get_qualifier,
546 .get_comp_funct_name = _get_comp_funct_name,
547 .get_measurement_type = _get_measurement_type,
548 .get_extended_pcr = _get_extended_pcr,
549 .get_hash_algorithm = _get_hash_algorithm,
550 .get_pcr_trans = _get_pcr_trans,
551 .get_measurement_time = _get_measurement_time,
552 .get_policy_uri = _get_policy_uri,
553 .get_pcr_before_value = _get_pcr_before_value,
554 .get_pcr_after_value = _get_pcr_after_value,
555 .get_pcr_len = _get_pcr_len,
556 .get_comp_measurement = _get_comp_measurement,
557 },
558 .vendor_id = PEN_TCG,
559 .type = TCG_PTS_SIMPLE_COMP_EVID,
560 .pcr_info_included = params.pcr_info_included,
561 .flags = params.flags,
562 .depth = params.depth,
563 .comp_vendor_id = params.vendor_id,
564 .family = PTS_REQ_FUNCT_COMP_FAM_BIN_ENUM,
565 .qualifier = params.qualifier,
566 .name = params.name,
567 .extended_pcr = params.extended_pcr,
568 .hash_algorithm = params.hash_algorithm,
569 .transformation = params.transformation,
570 .measurement_time = params.measurement_time,
571 .policy_uri = chunk_clone(params.policy_uri),
572 .pcr_before = params.pcr_before,
573 .pcr_after = params.pcr_after,
574 .measurement = chunk_clone(params.measurement),
575 );
576
577 return &this->public.pa_tnc_attribute;
578 }
579
580
581 /**
582 * Described in header.
583 */
584 pa_tnc_attr_t *tcg_pts_attr_simple_comp_evid_create_from_data(chunk_t data)
585 {
586 private_tcg_pts_attr_simple_comp_evid_t *this;
587
588 INIT(this,
589 .public = {
590 .pa_tnc_attribute = {
591 .get_vendor_id = _get_vendor_id,
592 .get_type = _get_type,
593 .get_value = _get_value,
594 .get_noskip_flag = _get_noskip_flag,
595 .set_noskip_flag = _set_noskip_flag,
596 .build = _build,
597 .process = _process,
598 .destroy = _destroy,
599 },
600 .is_pcr_info_included = _is_pcr_info_included,
601 .get_flags= _get_flags,
602 .get_sub_component_depth = _get_sub_component_depth,
603 .get_spec_comp_funct_name_vendor_id = _get_spec_comp_funct_name_vendor_id,
604 .get_family = _get_family,
605 .get_qualifier = _get_qualifier,
606 .get_comp_funct_name = _get_comp_funct_name,
607 .get_measurement_type = _get_measurement_type,
608 .get_extended_pcr = _get_extended_pcr,
609 .get_hash_algorithm = _get_hash_algorithm,
610 .get_pcr_trans = _get_pcr_trans,
611 .get_measurement_time = _get_measurement_time,
612 .get_policy_uri = _get_policy_uri,
613 .get_pcr_before_value = _get_pcr_before_value,
614 .get_pcr_after_value = _get_pcr_after_value,
615 .get_pcr_len = _get_pcr_len,
616 .get_comp_measurement = _get_comp_measurement,
617 },
618 .vendor_id = PEN_TCG,
619 .type = TCG_PTS_SIMPLE_COMP_EVID,
620 .family = PTS_REQ_FUNCT_COMP_FAM_BIN_ENUM,
621 .value = chunk_clone(data),
622 );
623
624 return &this->public.pa_tnc_attribute;
625 }