aboutsummaryrefslogtreecommitdiffstats
path: root/src/libimcv/plugins/imc_attestation/imc_attestation_state.c
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2011-08-20 23:37:37 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2011-09-08 12:08:12 +0200
commit8a2482c7c2e6ee0fa883495a9fd29071409534d5 (patch)
treea57a23fc9a130b23f7c2159f48d4c9e876f2c9e6 /src/libimcv/plugins/imc_attestation/imc_attestation_state.c
parent48f04107eae3d00e71f8101a1aebc3bd598c4894 (diff)
downloadstrongswan-8a2482c7c2e6ee0fa883495a9fd29071409534d5.tar.bz2
strongswan-8a2482c7c2e6ee0fa883495a9fd29071409534d5.tar.xz
moved TSS into pts object
Diffstat (limited to 'src/libimcv/plugins/imc_attestation/imc_attestation_state.c')
-rw-r--r--src/libimcv/plugins/imc_attestation/imc_attestation_state.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/libimcv/plugins/imc_attestation/imc_attestation_state.c b/src/libimcv/plugins/imc_attestation/imc_attestation_state.c
index 9ea722e95..30bc578b6 100644
--- a/src/libimcv/plugins/imc_attestation/imc_attestation_state.c
+++ b/src/libimcv/plugins/imc_attestation/imc_attestation_state.c
@@ -44,6 +44,11 @@ struct private_imc_attestation_state_t {
*/
imc_attestation_handshake_state_t handshake_state;
+ /**
+ * PTS object
+ */
+ pts_t *pts;
+
};
METHOD(imc_state_t, get_connection_id, TNC_ConnectionID,
@@ -61,6 +66,7 @@ METHOD(imc_state_t, change_state, void,
METHOD(imc_state_t, destroy, void,
private_imc_attestation_state_t *this)
{
+ this->pts->destroy(this->pts);
free(this);
}
@@ -71,11 +77,18 @@ METHOD(imc_attestation_state_t, get_handshake_state, imc_attestation_handshake_s
}
METHOD(imc_attestation_state_t, set_handshake_state, void,
- private_imc_attestation_state_t *this, imc_attestation_handshake_state_t new_state)
+ private_imc_attestation_state_t *this,
+ imc_attestation_handshake_state_t new_state)
{
this->handshake_state = new_state;
}
+METHOD(imc_attestation_state_t, get_pts, pts_t*,
+ private_imc_attestation_state_t *this)
+{
+ return this->pts;
+}
+
/**
* Described in header.
*/
@@ -92,10 +105,12 @@ imc_state_t *imc_attestation_state_create(TNC_ConnectionID connection_id)
},
.get_handshake_state = _get_handshake_state,
.set_handshake_state = _set_handshake_state,
+ .get_pts = _get_pts,
},
- .state = TNC_CONNECTION_STATE_CREATE,
.connection_id = connection_id,
+ .state = TNC_CONNECTION_STATE_CREATE,
.handshake_state = IMC_ATTESTATION_STATE_INIT,
+ .pts = pts_create(),
);
return &this->public.interface;