diff options
author | Tobias Brunner <tobias@strongswan.org> | 2013-05-02 18:48:05 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-07-08 18:49:28 +0200 |
commit | fd3aa004e448a9dd72b765de81fe45317f9039f3 (patch) | |
tree | 66881ec094de1c96d8e551293295980d94e0cdcf | |
parent | 0e53beda323bcf1583c457fe8cf33a24d257ab9b (diff) | |
download | strongswan-fd3aa004e448a9dd72b765de81fe45317f9039f3.tar.bz2 strongswan-fd3aa004e448a9dd72b765de81fe45317f9039f3.tar.xz |
android: Android IMC state provides a Platform Trust Service (PTS) instance
-rw-r--r-- | src/frontends/android/jni/libandroidbridge/byod/imc_android_state.c | 14 | ||||
-rw-r--r-- | src/frontends/android/jni/libandroidbridge/byod/imc_android_state.h | 6 |
2 files changed, 20 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 2018f9d9b..d429b90b7 100644 --- a/src/frontends/android/jni/libandroidbridge/byod/imc_android_state.c +++ b/src/frontends/android/jni/libandroidbridge/byod/imc_android_state.c @@ -61,6 +61,11 @@ struct private_imc_android_state_t { * Maximum PA-TNC message size for this TNCCS connection */ u_int32_t max_msg_len; + + /** + * TCG Platform Trust Service (PTS) + */ + pts_t *pts; }; METHOD(imc_state_t, get_connection_id, TNC_ConnectionID, @@ -125,9 +130,16 @@ METHOD(imc_state_t, get_result, bool, METHOD(imc_state_t, destroy, void, private_imc_android_state_t *this) { + this->pts->destroy(this->pts); free(this); } +METHOD(imc_android_state_t, get_pts, pts_t*, + private_imc_android_state_t *this) +{ + return this->pts; +} + /** * Described in header. */ @@ -149,10 +161,12 @@ imc_state_t *imc_android_state_create(TNC_ConnectionID connection_id) .get_result = _get_result, .destroy = _destroy, }, + .get_pts = _get_pts, }, .state = TNC_CONNECTION_STATE_CREATE, .result = TNC_IMV_EVALUATION_RESULT_DONT_KNOW, .connection_id = connection_id, + .pts = pts_create(TRUE), ); return &this->public.interface; diff --git a/src/frontends/android/jni/libandroidbridge/byod/imc_android_state.h b/src/frontends/android/jni/libandroidbridge/byod/imc_android_state.h index 51bff32cf..68197f331 100644 --- a/src/frontends/android/jni/libandroidbridge/byod/imc_android_state.h +++ b/src/frontends/android/jni/libandroidbridge/byod/imc_android_state.h @@ -22,6 +22,7 @@ #define IMC_ANDROID_STATE_H_ #include <imc/imc_state.h> +#include <pts/pts.h> typedef struct imc_android_state_t imc_android_state_t; @@ -34,6 +35,11 @@ struct imc_android_state_t { * imc_state_t interface */ imc_state_t interface; + + /** + * Get TCG Platform Trust Service (PTS) object + */ + pts_t *(*get_pts)(imc_android_state_t *this); }; /** |