android: Android IMC state provides a Platform Trust Service (PTS) instance
This commit is contained in:
@@ -61,6 +61,11 @@ struct private_imc_android_state_t {
|
|||||||
* Maximum PA-TNC message size for this TNCCS connection
|
* Maximum PA-TNC message size for this TNCCS connection
|
||||||
*/
|
*/
|
||||||
u_int32_t max_msg_len;
|
u_int32_t max_msg_len;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TCG Platform Trust Service (PTS)
|
||||||
|
*/
|
||||||
|
pts_t *pts;
|
||||||
};
|
};
|
||||||
|
|
||||||
METHOD(imc_state_t, get_connection_id, TNC_ConnectionID,
|
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,
|
METHOD(imc_state_t, destroy, void,
|
||||||
private_imc_android_state_t *this)
|
private_imc_android_state_t *this)
|
||||||
{
|
{
|
||||||
|
this->pts->destroy(this->pts);
|
||||||
free(this);
|
free(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
METHOD(imc_android_state_t, get_pts, pts_t*,
|
||||||
|
private_imc_android_state_t *this)
|
||||||
|
{
|
||||||
|
return this->pts;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Described in header.
|
* Described in header.
|
||||||
*/
|
*/
|
||||||
@@ -149,10 +161,12 @@ imc_state_t *imc_android_state_create(TNC_ConnectionID connection_id)
|
|||||||
.get_result = _get_result,
|
.get_result = _get_result,
|
||||||
.destroy = _destroy,
|
.destroy = _destroy,
|
||||||
},
|
},
|
||||||
|
.get_pts = _get_pts,
|
||||||
},
|
},
|
||||||
.state = TNC_CONNECTION_STATE_CREATE,
|
.state = TNC_CONNECTION_STATE_CREATE,
|
||||||
.result = TNC_IMV_EVALUATION_RESULT_DONT_KNOW,
|
.result = TNC_IMV_EVALUATION_RESULT_DONT_KNOW,
|
||||||
.connection_id = connection_id,
|
.connection_id = connection_id,
|
||||||
|
.pts = pts_create(TRUE),
|
||||||
);
|
);
|
||||||
|
|
||||||
return &this->public.interface;
|
return &this->public.interface;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#define IMC_ANDROID_STATE_H_
|
#define IMC_ANDROID_STATE_H_
|
||||||
|
|
||||||
#include <imc/imc_state.h>
|
#include <imc/imc_state.h>
|
||||||
|
#include <pts/pts.h>
|
||||||
|
|
||||||
typedef struct imc_android_state_t imc_android_state_t;
|
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
|
||||||
*/
|
*/
|
||||||
imc_state_t interface;
|
imc_state_t interface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get TCG Platform Trust Service (PTS) object
|
||||||
|
*/
|
||||||
|
pts_t *(*get_pts)(imc_android_state_t *this);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user