android: Android IMC state provides a Platform Trust Service (PTS) instance

This commit is contained in:
Tobias Brunner 2013-05-02 18:48:05 +02:00
parent 0e53beda32
commit fd3aa004e4
2 changed files with 20 additions and 0 deletions

View File

@ -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;

View File

@ -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);
};
/**