Defined functional components within ITA namespace
[strongswan.git] / src / libimcv / plugins / imc_attestation / imc_attestation_process.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 #define _GNU_SOURCE
17
18 #include <stdio.h>
19
20 #include "imc_attestation_process.h"
21
22 #include <ietf/ietf_attr_pa_tnc_error.h>
23 #include <pts/pts.h>
24
25 #include <tcg/tcg_pts_attr_proto_caps.h>
26 #include <tcg/tcg_pts_attr_meas_algo.h>
27 #include <tcg/tcg_pts_attr_dh_nonce_params_req.h>
28 #include <tcg/tcg_pts_attr_dh_nonce_params_resp.h>
29 #include <tcg/tcg_pts_attr_dh_nonce_finish.h>
30 #include <tcg/tcg_pts_attr_get_tpm_version_info.h>
31 #include <tcg/tcg_pts_attr_tpm_version_info.h>
32 #include <tcg/tcg_pts_attr_get_aik.h>
33 #include <tcg/tcg_pts_attr_aik.h>
34 #include <tcg/tcg_pts_attr_req_funct_comp_evid.h>
35 #include <tcg/tcg_pts_attr_gen_attest_evid.h>
36 #include <tcg/tcg_pts_attr_simple_comp_evid.h>
37 #include <tcg/tcg_pts_attr_simple_evid_final.h>
38 #include <tcg/tcg_pts_attr_req_file_meas.h>
39 #include <tcg/tcg_pts_attr_file_meas.h>
40 #include <tcg/tcg_pts_attr_req_file_meta.h>
41 #include <tcg/tcg_pts_attr_unix_file_meta.h>
42
43 #include <debug.h>
44
45 #define DEFAULT_NONCE_LEN 20
46
47 /**
48 * Set parameters of Simple Component Evidence
49 */
50 static bool set_simple_comp_evid_params(pts_ita_funct_comp_name_t name,
51 tcg_pts_attr_simple_comp_evid_params_t *out)
52 {
53 tcg_pts_attr_simple_comp_evid_params_t params;
54 pts_qualifier_t qualifier;
55 time_t measurement_time_t;
56 struct tm *time_now;
57 char *utc_time;
58
59 params.name = name;
60 params.pcr_info_included = TRUE;
61 params.flags = PTS_SIMPLE_COMP_EVID_FLAG_NO_VALID;
62 params.depth = 0;
63 params.vendor_id = PEN_ITA;
64
65 qualifier.kernel = FALSE;
66 qualifier.sub_component = FALSE;
67 qualifier.type = PTS_ITA_FUNC_COMP_TYPE_TRUSTED;
68 params.qualifier = qualifier;
69 /* The measurements done by tboot and trustedGRUB are SHA1 hashes */
70 params.hash_algorithm = TRUSTED_HASH_ALGO;
71 params.transformation = PTS_PCR_TRANSFORM_NO;
72
73 measurement_time_t = time(NULL);
74 if (!measurement_time_t)
75 {
76 params.measurement_time = chunk_create("0000-00-00T00:00:00Z", 20);
77 params.measurement_time = chunk_clone(params.measurement_time);
78 }
79 else
80 {
81 time_now = localtime(&measurement_time_t);
82 if (asprintf(&utc_time,
83 "%d-%2.2d-%2.2dT%2.2d:%2.2d:%2.2dZ",
84 time_now->tm_year + 1900,
85 time_now->tm_mon + 1,
86 time_now->tm_mday,
87 time_now->tm_hour,
88 time_now->tm_min,
89 time_now->tm_sec) < 0)
90 {
91 DBG1(DBG_IMC, "could not format local time to UTC");
92 return FALSE;
93 }
94 params.measurement_time = chunk_create(utc_time, 20);
95 params.measurement_time = chunk_clone(params.measurement_time);
96 free(utc_time);
97 }
98 params.policy_uri = chunk_empty;
99 params.measurement = chunk_empty;
100
101 params.pcr_before = chunk_alloc(PCR_LEN);
102 memset(params.pcr_before.ptr, 0, PCR_LEN);
103
104 /* Set extended PCR, which varies from component to component */
105 if (params.name == PTS_ITA_FUNC_COMP_NAME_TBOOT_POLICY)
106 {
107 params.extended_pcr = PCR_TBOOT_POLICY;
108 }
109 else if (params.name == PTS_ITA_FUNC_COMP_NAME_TBOOT_MLE)
110 {
111 params.extended_pcr = PCR_TBOOT_MLE;
112 }
113 else if (params.name == PTS_ITA_FUNC_COMP_NAME_TGRUB_MBR_STAGE1)
114 {
115 params.extended_pcr = PCR_TGRUB_MBR_STAGE1;
116 }
117 else if (params.name == PTS_ITA_FUNC_COMP_NAME_TGRUB_STAGE2_PART1)
118 {
119 params.extended_pcr = PCR_TGRUB_STAGE2_PART1;
120 }
121 else if (params.name == PTS_ITA_FUNC_COMP_NAME_TGRUB_STAGE2_PART2)
122 {
123 params.extended_pcr = PCR_TGRUB_STAGE2_PART2;
124 }
125 else if (params.name == PTS_ITA_FUNC_COMP_NAME_TGRUB_CMD_LINE_ARGS)
126 {
127 params.extended_pcr = PCR_TGRUB_CMD_LINE_ARGS;
128 }
129 else if (params.name == PTS_ITA_FUNC_COMP_NAME_TGRUB_CHECKFILE)
130 {
131 params.extended_pcr = PCR_TGRUB_CHECKFILE;
132 }
133 else if (params.name == PTS_ITA_FUNC_COMP_NAME_TGRUB_LOADED_FILES)
134 {
135 params.extended_pcr = PCR_TGRUB_LOADED_FILES;
136 }
137 else
138 {
139 DBG1(DBG_IMC, "unsupported Functional Component Name: %d", params.name);
140 return FALSE;
141 }
142
143 *out = params;
144 return TRUE;
145 }
146
147 bool imc_attestation_process(pa_tnc_attr_t *attr, linked_list_t *attr_list,
148 imc_attestation_state_t *attestation_state,
149 pts_meas_algorithms_t supported_algorithms,
150 pts_dh_group_t supported_dh_groups,
151 linked_list_t *evidences)
152 {
153 chunk_t attr_info;
154 pts_t *pts;
155 pts_error_code_t pts_error;
156 bool valid_path;
157
158 pts = attestation_state->get_pts(attestation_state);
159 switch (attr->get_type(attr))
160 {
161 case TCG_PTS_REQ_PROTO_CAPS:
162 {
163 tcg_pts_attr_proto_caps_t *attr_cast;
164 pts_proto_caps_flag_t imc_caps, imv_caps;
165
166 attr_cast = (tcg_pts_attr_proto_caps_t*)attr;
167 imv_caps = attr_cast->get_flags(attr_cast);
168 imc_caps = pts->get_proto_caps(pts);
169 pts->set_proto_caps(pts, imc_caps & imv_caps);
170
171 /* Send PTS Protocol Capabilities attribute */
172 attr = tcg_pts_attr_proto_caps_create(imc_caps & imv_caps, FALSE);
173 attr_list->insert_last(attr_list, attr);
174 break;
175 }
176 case TCG_PTS_MEAS_ALGO:
177 {
178 tcg_pts_attr_meas_algo_t *attr_cast;
179 pts_meas_algorithms_t offered_algorithms, selected_algorithm;
180
181 attr_cast = (tcg_pts_attr_meas_algo_t*)attr;
182 offered_algorithms = attr_cast->get_algorithms(attr_cast);
183 selected_algorithm = pts_meas_algo_select(supported_algorithms,
184 offered_algorithms);
185 if (selected_algorithm == PTS_MEAS_ALGO_NONE)
186 {
187 attr = pts_hash_alg_error_create(supported_algorithms);
188 attr_list->insert_last(attr_list, attr);
189 break;
190 }
191
192 /* Send Measurement Algorithm Selection attribute */
193 pts->set_meas_algorithm(pts, selected_algorithm);
194 attr = tcg_pts_attr_meas_algo_create(selected_algorithm, TRUE);
195 attr_list->insert_last(attr_list, attr);
196 break;
197 }
198 case TCG_PTS_DH_NONCE_PARAMS_REQ:
199 {
200 tcg_pts_attr_dh_nonce_params_req_t *attr_cast;
201 pts_dh_group_t offered_dh_groups, selected_dh_group;
202 chunk_t responder_value, responder_nonce;
203 int nonce_len, min_nonce_len;
204
205 nonce_len = lib->settings->get_int(lib->settings,
206 "libimcv.plugins.imc-attestation.nonce_len",
207 DEFAULT_NONCE_LEN);
208
209 attr_cast = (tcg_pts_attr_dh_nonce_params_req_t*)attr;
210 min_nonce_len = attr_cast->get_min_nonce_len(attr_cast);
211 if (nonce_len < PTS_MIN_NONCE_LEN ||
212 (min_nonce_len > 0 && nonce_len < min_nonce_len))
213 {
214 attr = pts_dh_nonce_error_create(nonce_len, PTS_MAX_NONCE_LEN);
215 attr_list->insert_last(attr_list, attr);
216 break;
217 }
218
219 offered_dh_groups = attr_cast->get_dh_groups(attr_cast);
220 selected_dh_group = pts_dh_group_select(supported_dh_groups,
221 offered_dh_groups);
222 if (selected_dh_group == PTS_DH_GROUP_NONE)
223 {
224 attr = pts_dh_group_error_create(supported_dh_groups);
225 attr_list->insert_last(attr_list, attr);
226 break;
227 }
228
229 /* Create own DH factor and nonce */
230 if (!pts->create_dh_nonce(pts, selected_dh_group, nonce_len))
231 {
232 return FALSE;
233 }
234 pts->get_my_public_value(pts, &responder_value, &responder_nonce);
235
236 /* Send DH Nonce Parameters Response attribute */
237 attr = tcg_pts_attr_dh_nonce_params_resp_create(selected_dh_group,
238 supported_algorithms, responder_nonce, responder_value);
239 attr_list->insert_last(attr_list, attr);
240 break;
241 }
242 case TCG_PTS_DH_NONCE_FINISH:
243 {
244 tcg_pts_attr_dh_nonce_finish_t *attr_cast;
245 pts_meas_algorithms_t selected_algorithm;
246 chunk_t initiator_nonce, initiator_value;
247 int nonce_len;
248
249 attr_cast = (tcg_pts_attr_dh_nonce_finish_t*)attr;
250 selected_algorithm = attr_cast->get_hash_algo(attr_cast);
251 if (!(selected_algorithm & supported_algorithms))
252 {
253 DBG1(DBG_IMC, "PTS-IMV selected unsupported DH hash algorithm");
254 return FALSE;
255 }
256 pts->set_dh_hash_algorithm(pts, selected_algorithm);
257
258 initiator_value = attr_cast->get_initiator_value(attr_cast);
259 initiator_nonce = attr_cast->get_initiator_nonce(attr_cast);
260
261 nonce_len = lib->settings->get_int(lib->settings,
262 "libimcv.plugins.imc-attestation.nonce_len",
263 DEFAULT_NONCE_LEN);
264 if (nonce_len != initiator_nonce.len)
265 {
266 DBG1(DBG_IMC, "initiator and responder DH nonces "
267 "have differing lengths");
268 return FALSE;
269 }
270
271 pts->set_peer_public_value(pts, initiator_value, initiator_nonce);
272 if (!pts->calculate_secret(pts))
273 {
274 return FALSE;
275 }
276 break;
277 }
278 case TCG_PTS_GET_TPM_VERSION_INFO:
279 {
280 chunk_t tpm_version_info, attr_info;
281
282 if (!pts->get_tpm_version_info(pts, &tpm_version_info))
283 {
284 attr_info = attr->get_value(attr);
285 attr = ietf_attr_pa_tnc_error_create(PEN_TCG,
286 TCG_PTS_TPM_VERS_NOT_SUPPORTED, attr_info);
287 attr_list->insert_last(attr_list, attr);
288 break;
289 }
290
291 /* Send TPM Version Info attribute */
292 attr = tcg_pts_attr_tpm_version_info_create(tpm_version_info);
293 attr_list->insert_last(attr_list, attr);
294 break;
295 }
296 case TCG_PTS_GET_AIK:
297 {
298 certificate_t *aik;
299
300 aik = pts->get_aik(pts);
301 if (!aik)
302 {
303 DBG1(DBG_IMC, "no AIK certificate or public key available");
304 break;
305 }
306
307 /* Send AIK attribute */
308 attr = tcg_pts_attr_aik_create(aik);
309 attr_list->insert_last(attr_list, attr);
310 break;
311 }
312 case TCG_PTS_REQ_FUNCT_COMP_EVID:
313 {
314 tcg_pts_attr_req_funct_comp_evid_t *attr_cast;
315 pts_proto_caps_flag_t negotiated_caps;
316 pts_attr_req_funct_comp_evid_flag_t flags;
317 u_int32_t sub_comp_depth;
318 u_int32_t comp_name_vendor_id;
319 u_int8_t family;
320 pts_qualifier_t qualifier;
321 pts_ita_funct_comp_name_t name;
322
323 attr_info = attr->get_value(attr);
324 attr_cast = (tcg_pts_attr_req_funct_comp_evid_t*)attr;
325 negotiated_caps = pts->get_proto_caps(pts);
326 flags = attr_cast->get_flags(attr_cast);
327
328 if (flags & PTS_REQ_FUNC_COMP_FLAG_TTC)
329 {
330 attr = ietf_attr_pa_tnc_error_create(PEN_TCG,
331 TCG_PTS_UNABLE_DET_TTC, attr_info);
332 attr_list->insert_last(attr_list, attr);
333 break;
334 }
335 if (flags & PTS_REQ_FUNC_COMP_FLAG_VER &&
336 !(negotiated_caps & PTS_PROTO_CAPS_V))
337 {
338 attr = ietf_attr_pa_tnc_error_create(PEN_TCG,
339 TCG_PTS_UNABLE_LOCAL_VAL, attr_info);
340 attr_list->insert_last(attr_list, attr);
341 break;
342 }
343 if (flags & PTS_REQ_FUNC_COMP_FLAG_CURR &&
344 !(negotiated_caps & PTS_PROTO_CAPS_C))
345 {
346 attr = ietf_attr_pa_tnc_error_create(PEN_TCG,
347 TCG_PTS_UNABLE_CUR_EVID, attr_info);
348 attr_list->insert_last(attr_list, attr);
349 break;
350 }
351 if (flags & PTS_REQ_FUNC_COMP_FLAG_PCR &&
352 !(negotiated_caps & PTS_PROTO_CAPS_T))
353 {
354 attr = ietf_attr_pa_tnc_error_create(PEN_TCG,
355 TCG_PTS_UNABLE_DET_PCR, attr_info);
356 attr_list->insert_last(attr_list, attr);
357 break;
358 }
359
360 sub_comp_depth = attr_cast->get_sub_component_depth(attr_cast);
361 if (sub_comp_depth != 0)
362 {
363 DBG1(DBG_IMC, "current version of Attestation IMC does not "
364 "support sub component measurement deeper than "
365 "zero. Measuring top level component only.");
366 return FALSE;
367 }
368
369 comp_name_vendor_id = attr_cast->get_comp_funct_name_vendor_id(
370 attr_cast);
371 if (comp_name_vendor_id != PEN_ITA)
372 {
373 DBG1(DBG_IMC, "current version of Attestation IMC supports"
374 "only functional component namings by ITA");
375 return FALSE;
376 }
377
378 family = attr_cast->get_family(attr_cast);
379 if (family)
380 {
381 attr = ietf_attr_pa_tnc_error_create(PEN_TCG,
382 TCG_PTS_INVALID_NAME_FAM, attr_info);
383 attr_list->insert_last(attr_list, attr);
384 break;
385 }
386
387 qualifier = attr_cast->get_qualifier(attr_cast);
388
389 /* Check if Unknown or Wildcard was set for qualifier */
390 if (qualifier.kernel && qualifier.sub_component &&
391 (qualifier.type & PTS_ITA_FUNC_COMP_TYPE_ALL))
392 {
393 DBG2(DBG_IMC, "wildcard was set for the qualifier of functional"
394 " component. Identifying the component with "
395 "name binary enumeration");
396 }
397 else if (!qualifier.kernel && !qualifier.sub_component &&
398 (qualifier.type & PTS_ITA_FUNC_COMP_TYPE_UNKNOWN))
399 {
400 DBG2(DBG_IMC, "unknown was set for the qualifier of functional"
401 " component. Identifying the component with "
402 "name binary enumeration");
403 }
404 else if (qualifier.type & PTS_ITA_FUNC_COMP_TYPE_TRUSTED)
405 {
406 tcg_pts_attr_simple_comp_evid_params_t params;
407
408 /* Set parameters of Simple Component Evidence */
409 name = attr_cast->get_comp_funct_name(attr_cast);
410 if (!set_simple_comp_evid_params(name, &params))
411 {
412 DBG1(DBG_IMC, "error occured while setting parameters"
413 "for Simple Component Evidence");
414 return FALSE;
415 }
416
417 if (!pts->read_pcr(pts, params.extended_pcr, &params.pcr_after))
418 {
419 DBG1(DBG_IMC, "error occured while reading PCR: %d",
420 params.extended_pcr);
421 return FALSE;
422 }
423
424 /* Buffer Simple Component Evidence attribute */
425 attr = tcg_pts_attr_simple_comp_evid_create(params);
426 evidences->insert_last(evidences, attr);
427 break;
428 }
429 else
430 {
431 DBG1(DBG_IMC, "Functional Component with unsupported type: %d"
432 "was requested for evidence", qualifier.type);
433 break;
434 }
435
436 break;
437 }
438 case TCG_PTS_GEN_ATTEST_EVID:
439 {
440 enumerator_t *e;
441 pts_simple_evid_final_flag_t flags;
442 pts_meas_algorithms_t composite_algorithm = 0;
443 chunk_t pcr_composite, quote_signature;
444 u_int32_t num_of_evidences, i = 0;
445 u_int32_t *pcrs;
446
447 /* Send buffered Simple Component Evidences */
448 num_of_evidences = evidences->get_count(evidences);
449 pcrs = (u_int32_t*)malloc(sizeof(u_int32_t)*num_of_evidences);
450
451 e = evidences->create_enumerator(evidences);
452 while (e->enumerate(e, &attr))
453 {
454 tcg_pts_attr_simple_comp_evid_t *attr_cast;
455 u_int32_t extended_pcr;
456
457 attr_cast = (tcg_pts_attr_simple_comp_evid_t*)attr;
458 extended_pcr = attr_cast->get_extended_pcr(attr_cast);
459
460 /* Add extended PCR number to PCR list to quote */
461 /* Duplicated PCR numbers have no influence */
462 pcrs[i] = extended_pcr;
463 i++;
464 /* Send Simple Compoenent Evidence */
465 attr_list->insert_last(attr_list, attr);
466 }
467
468 /* Quote */
469 if (!pts->quote_tpm(pts, pcrs, num_of_evidences,
470 &pcr_composite, &quote_signature))
471 {
472 DBG1(DBG_IMC, "error occured during TPM quote operation");
473 DESTROY_IF(e);
474 DESTROY_IF(evidences);
475 return FALSE;
476 }
477
478 /* Send Simple Evidence Final attribute */
479 flags = PTS_SIMPLE_EVID_FINAL_FLAG_TPM_QUOTE_INFO;
480 composite_algorithm |= PTS_MEAS_ALGO_SHA1;
481
482 attr = tcg_pts_attr_simple_evid_final_create(FALSE, flags,
483 composite_algorithm, pcr_composite,
484 quote_signature, chunk_empty);
485 attr_list->insert_last(attr_list, attr);
486
487 DESTROY_IF(e);
488 DESTROY_IF(evidences);
489
490 break;
491 }
492 case TCG_PTS_REQ_FILE_META:
493 {
494 tcg_pts_attr_req_file_meta_t *attr_cast;
495 char *pathname;
496 bool is_directory;
497 u_int8_t delimiter;
498 pts_file_meta_t *metadata;
499
500 attr_info = attr->get_value(attr);
501 attr_cast = (tcg_pts_attr_req_file_meta_t*)attr;
502 is_directory = attr_cast->get_directory_flag(attr_cast);
503 delimiter = attr_cast->get_delimiter(attr_cast);
504 pathname = attr_cast->get_pathname(attr_cast);
505
506 valid_path = pts->is_path_valid(pts, pathname, &pts_error);
507 if (valid_path && pts_error)
508 {
509 attr = ietf_attr_pa_tnc_error_create(PEN_TCG,
510 pts_error, attr_info);
511 attr_list->insert_last(attr_list, attr);
512 break;
513 }
514 else if (!valid_path)
515 {
516 break;
517 }
518 if (delimiter != SOLIDUS_UTF && delimiter != REVERSE_SOLIDUS_UTF)
519 {
520 attr = ietf_attr_pa_tnc_error_create(PEN_TCG,
521 TCG_PTS_INVALID_DELIMITER, attr_info);
522 attr_list->insert_last(attr_list, attr);
523 break;
524 }
525 /* Get File Metadata and send them to PTS-IMV */
526 DBG2(DBG_IMC, "metadata request for %s '%s'",
527 is_directory ? "directory" : "file",
528 pathname);
529 metadata = pts->get_metadata(pts, pathname, is_directory);
530
531 if (!metadata)
532 {
533 /* TODO handle error codes from measurements */
534 return FALSE;
535 }
536 attr = tcg_pts_attr_unix_file_meta_create(metadata);
537 attr->set_noskip_flag(attr, TRUE);
538 attr_list->insert_last(attr_list, attr);
539
540 break;
541 }
542 case TCG_PTS_REQ_FILE_MEAS:
543 {
544 tcg_pts_attr_req_file_meas_t *attr_cast;
545 char *pathname;
546 u_int16_t request_id;
547 bool is_directory;
548 u_int32_t delimiter;
549 pts_file_meas_t *measurements;
550
551 attr_info = attr->get_value(attr);
552 attr_cast = (tcg_pts_attr_req_file_meas_t*)attr;
553 is_directory = attr_cast->get_directory_flag(attr_cast);
554 request_id = attr_cast->get_request_id(attr_cast);
555 delimiter = attr_cast->get_delimiter(attr_cast);
556 pathname = attr_cast->get_pathname(attr_cast);
557 valid_path = pts->is_path_valid(pts, pathname, &pts_error);
558
559 if (valid_path && pts_error)
560 {
561 attr = ietf_attr_pa_tnc_error_create(PEN_TCG,
562 pts_error, attr_info);
563 attr_list->insert_last(attr_list, attr);
564 break;
565 }
566 else if (!valid_path)
567 {
568 break;
569 }
570
571 if (delimiter != SOLIDUS_UTF && delimiter != REVERSE_SOLIDUS_UTF)
572 {
573 attr = ietf_attr_pa_tnc_error_create(PEN_TCG,
574 TCG_PTS_INVALID_DELIMITER, attr_info);
575 attr_list->insert_last(attr_list, attr);
576 break;
577 }
578
579 /* Do PTS File Measurements and send them to PTS-IMV */
580 DBG2(DBG_IMC, "measurement request %d for %s '%s'",
581 request_id, is_directory ? "directory" : "file",
582 pathname);
583 measurements = pts->do_measurements(pts, request_id,
584 pathname, is_directory);
585 if (!measurements)
586 {
587 /* TODO handle error codes from measurements */
588 return FALSE;
589 }
590 attr = tcg_pts_attr_file_meas_create(measurements);
591 attr->set_noskip_flag(attr, TRUE);
592 attr_list->insert_last(attr_list, attr);
593 break;
594 }
595 /* TODO: Not implemented yet */
596 case TCG_PTS_REQ_INTEG_MEAS_LOG:
597 /* Attributes using XML */
598 case TCG_PTS_REQ_TEMPL_REF_MANI_SET_META:
599 case TCG_PTS_UPDATE_TEMPL_REF_MANI:
600 /* On Windows only*/
601 case TCG_PTS_REQ_REGISTRY_VALUE:
602 /* Received on IMV side only*/
603 case TCG_PTS_PROTO_CAPS:
604 case TCG_PTS_DH_NONCE_PARAMS_RESP:
605 case TCG_PTS_MEAS_ALGO_SELECTION:
606 case TCG_PTS_TPM_VERSION_INFO:
607 case TCG_PTS_TEMPL_REF_MANI_SET_META:
608 case TCG_PTS_AIK:
609 case TCG_PTS_SIMPLE_COMP_EVID:
610 case TCG_PTS_SIMPLE_EVID_FINAL:
611 case TCG_PTS_VERIFICATION_RESULT:
612 case TCG_PTS_INTEG_REPORT:
613 case TCG_PTS_UNIX_FILE_META:
614 case TCG_PTS_FILE_MEAS:
615 case TCG_PTS_INTEG_MEAS_LOG:
616 default:
617 DBG1(DBG_IMC, "received unsupported attribute '%N'",
618 tcg_attr_names, attr->get_type(attr));
619 break;
620 }
621 return TRUE;
622 }