aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-10-14 10:37:55 +0200
committerTobias Brunner <tobias@strongswan.org>2014-10-14 10:37:55 +0200
commit3307de1f8dad3ac5cd397ae691cf1aedaec85c9d (patch)
tree63dacdc0130a96804900f10c1c9036f081df80dd
parentf4e6f89aa9d483c8c1e82ded8f6bd1b0721cf84c (diff)
downloadstrongswan-3307de1f8dad3ac5cd397ae691cf1aedaec85c9d.tar.bz2
strongswan-3307de1f8dad3ac5cd397ae691cf1aedaec85c9d.tar.xz
android: Implement get_contracts() method in IMC state object
-rw-r--r--src/frontends/android/jni/libandroidbridge/byod/imc_android_state.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/frontends/android/jni/libandroidbridge/byod/imc_android_state.c b/src/frontends/android/jni/libandroidbridge/byod/imc_android_state.c
index d429b90b7..ea4f92def 100644
--- a/src/frontends/android/jni/libandroidbridge/byod/imc_android_state.c
+++ b/src/frontends/android/jni/libandroidbridge/byod/imc_android_state.c
@@ -63,6 +63,11 @@ struct private_imc_android_state_t {
u_int32_t max_msg_len;
/**
+ * PA-TNC attribute segmentation contracts associated with TNCCS connection
+ */
+ seg_contract_manager_t *contracts;
+
+ /**
* TCG Platform Trust Service (PTS)
*/
pts_t *pts;
@@ -105,6 +110,12 @@ METHOD(imc_state_t, get_max_msg_len, u_int32_t,
return this->max_msg_len;
}
+METHOD(imc_state_t, get_contracts, seg_contract_manager_t*,
+ private_imc_android_state_t *this)
+{
+ return this->contracts;
+}
+
METHOD(imc_state_t, change_state, void,
private_imc_android_state_t *this, TNC_ConnectionState new_state)
{
@@ -130,6 +141,7 @@ METHOD(imc_state_t, get_result, bool,
METHOD(imc_state_t, destroy, void,
private_imc_android_state_t *this)
{
+ this->contracts->destroy(this->contracts);
this->pts->destroy(this->pts);
free(this);
}
@@ -156,6 +168,7 @@ imc_state_t *imc_android_state_create(TNC_ConnectionID connection_id)
.set_flags = _set_flags,
.set_max_msg_len = _set_max_msg_len,
.get_max_msg_len = _get_max_msg_len,
+ .get_contracts = _get_contracts,
.change_state = _change_state,
.set_result = _set_result,
.get_result = _get_result,
@@ -166,6 +179,7 @@ imc_state_t *imc_android_state_create(TNC_ConnectionID connection_id)
.state = TNC_CONNECTION_STATE_CREATE,
.result = TNC_IMV_EVALUATION_RESULT_DONT_KNOW,
.connection_id = connection_id,
+ .contracts = seg_contract_manager_create(),
.pts = pts_create(TRUE),
);