From: Tobias Brunner Date: Tue, 14 Oct 2014 08:37:55 +0000 (+0200) Subject: android: Implement get_contracts() method in IMC state object X-Git-Tag: 5.2.1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3307de1f8dad3ac5cd397ae691cf1aedaec85c9d;p=thirdparty%2Fstrongswan.git android: Implement get_contracts() method in IMC state object --- 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 d429b90b7a..ea4f92defa 100644 --- a/src/frontends/android/jni/libandroidbridge/byod/imc_android_state.c +++ b/src/frontends/android/jni/libandroidbridge/byod/imc_android_state.c @@ -62,6 +62,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) */ @@ -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), );