send TCG_PTS_TPM_VERS_NOT_SUPPORTED error code
authorAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 1 Sep 2011 19:22:51 +0000 (21:22 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 8 Sep 2011 10:08:15 +0000 (12:08 +0200)
src/libimcv/plugins/imc_attestation/imc_attestation.c

index 11a9a94..7c41e56 100644 (file)
@@ -269,11 +269,14 @@ TNC_Result TNC_IMC_ReceiveMessage(TNC_IMCID imc_id,
                                        
                                case TCG_PTS_GET_TPM_VERSION_INFO:
                                {
-                                       chunk_t tpm_version_info;
+                                       chunk_t tpm_version_info, attr_info;
 
                                        if (!pts->get_tpm_version_info(pts, &tpm_version_info))
                                        {
-                                               /* TODO return TCG_PTS_TPM_VERS_NOT_SUPPORTED error attribute */
+                                               attr_info = attr->get_value(attr);
+                                               attr = ietf_attr_pa_tnc_error_create(PEN_TCG,
+                                                                       TCG_PTS_TPM_VERS_NOT_SUPPORTED, attr_info);
+                                               attr_list->insert_last(attr_list, attr);
                                                break;
                                        }