Debugged TCG PTS attributes implementations
[strongswan.git] / src / libimcv / tcg / tcg_pts_attr_get_tpm_version_info.c
index 5fbd918..56cf34b 100644 (file)
@@ -38,12 +38,12 @@ typedef struct private_tcg_pts_attr_get_tpm_version_info_t private_tcg_pts_attr_
 #define PTS_GET_TPM_VER_INFO_RESERVED          0x00
 
 /**
- * Private data of an private_tcg_pts_attr_get_tpm_version_info_t object.
+ * Private data of an tcg_pts_attr_get_tpm_version_info_t object.
  */
 struct private_tcg_pts_attr_get_tpm_version_info_t {
 
        /**
-        * Public members of private_tcg_pts_attr_req_proto_caps_t
+        * Public members of tcg_pts_attr_get_tpm_version_info_t
         */
        tcg_pts_attr_get_tpm_version_info_t public;
 
@@ -111,7 +111,7 @@ METHOD(pa_tnc_attr_t, build, void,
 }
 
 METHOD(pa_tnc_attr_t, process, status_t,
-       private_tcg_pts_attr_get_tpm_version_info_t *this)
+       private_tcg_pts_attr_get_tpm_version_info_t *this, u_int32_t *offset)
 {
        bio_reader_t *reader;
        u_int32_t reserved;
@@ -119,13 +119,14 @@ METHOD(pa_tnc_attr_t, process, status_t,
        if (this->value.len < PTS_GET_TPM_VER_INFO_SIZE)
        {
                DBG1(DBG_TNC, "insufficient data for Get TPM Version Information");
+               *offset = 0;
                return FAILED;
        }
        reader = bio_reader_create(this->value);
        reader->read_uint32 (reader, &reserved);
        reader->destroy(reader);
 
-       return SUCCESS; 
+       return SUCCESS;
 }
 
 METHOD(pa_tnc_attr_t, destroy, void,