aboutsummaryrefslogtreecommitdiffstats
path: root/src/libimcv/tcg/tcg_pts_attr_proto_caps.c
diff options
context:
space:
mode:
authorSansar Choinyambuu <schoinya@hsr.ch>2011-08-08 13:34:13 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2011-09-08 12:08:09 +0200
commit1f3f3021d549c69e41a72d1c3cf2eb0ae51a3621 (patch)
treecf58cc95a5c3c9a4a9f48ea169f1a2a234c1f43a /src/libimcv/tcg/tcg_pts_attr_proto_caps.c
parent793d31279b16064401ec4205d4fd04c1fa35cae6 (diff)
downloadstrongswan-1f3f3021d549c69e41a72d1c3cf2eb0ae51a3621.tar.bz2
strongswan-1f3f3021d549c69e41a72d1c3cf2eb0ae51a3621.tar.xz
Debugged TCG PTS attributes implementations
Diffstat (limited to 'src/libimcv/tcg/tcg_pts_attr_proto_caps.c')
-rw-r--r--src/libimcv/tcg/tcg_pts_attr_proto_caps.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/libimcv/tcg/tcg_pts_attr_proto_caps.c b/src/libimcv/tcg/tcg_pts_attr_proto_caps.c
index 1a7107658..cee10f2a0 100644
--- a/src/libimcv/tcg/tcg_pts_attr_proto_caps.c
+++ b/src/libimcv/tcg/tcg_pts_attr_proto_caps.c
@@ -38,12 +38,12 @@ typedef struct private_tcg_pts_attr_proto_caps_t private_tcg_pts_attr_proto_caps
#define PTS_PROTO_CAPS_RESERVED 0x00
/**
- * Private data of an private_tcg_pts_attr_proto_caps_t object.
+ * Private data of an tcg_pts_attr_proto_caps_t object.
*/
struct private_tcg_pts_attr_proto_caps_t {
/**
- * Public members of private_tcg_pts_attr_proto_caps_t
+ * Public members of tcg_pts_attr_proto_caps_t
*/
tcg_pts_attr_proto_caps_t public;
@@ -126,15 +126,16 @@ METHOD(pa_tnc_attr_t, build, void,
}
METHOD(pa_tnc_attr_t, process, status_t,
- private_tcg_pts_attr_proto_caps_t *this)
+ private_tcg_pts_attr_proto_caps_t *this, u_int32_t *offset)
{
bio_reader_t *reader;
- u_int24_t reserved;
+ u_int32_t reserved;
u_int8_t flags;
if (this->value.len < PTS_PROTO_CAPS_SIZE)
{
DBG1(DBG_TNC, "insufficient data for PTS Protocol Capabilities");
+ *offset = 0;
return FAILED;
}
reader = bio_reader_create(this->value);
@@ -169,7 +170,7 @@ METHOD(tcg_pts_attr_proto_caps_t, set_flags, void,
private_tcg_pts_attr_proto_caps_t *this,
pts_attr_proto_caps_flag_t flags)
{
- return this->flags = flags;
+ this->flags = flags;
}
/**
@@ -191,8 +192,8 @@ pa_tnc_attr_t *tcg_pts_attr_proto_caps_create(pts_attr_proto_caps_flag_t flags)
.process = _process,
.destroy = _destroy,
},
- .get_flags = get_flags,
- .set_flags = set_flags,
+ .get_flags = _get_flags,
+ .set_flags = _set_flags,
},
.vendor_id = PEN_TCG,
.type = TCG_PTS_PROTO_CAPS,
@@ -222,8 +223,8 @@ pa_tnc_attr_t *tcg_pts_attr_proto_caps_create_from_data(chunk_t data)
.process = _process,
.destroy = _destroy,
},
- .get_flags = get_flags,
- .set_flags = set_flags,
+ .get_flags = _get_flags,
+ .set_flags = _set_flags,
},
.vendor_id = PEN_TCG,
.type = TCG_PTS_PROTO_CAPS,