transport IMA file info via PTS Component Evidence Policy URI
This commit is contained in:
@@ -321,7 +321,6 @@ bool imc_attestation_process(pa_tnc_attr_t *attr, linked_list_t *attr_list,
|
||||
{
|
||||
tcg_pts_attr_req_func_comp_evid_t *attr_cast;
|
||||
pts_proto_caps_flag_t negotiated_caps;
|
||||
pts_file_meas_t *measurements;
|
||||
pts_comp_func_name_t *name;
|
||||
pts_comp_evidence_t *evid;
|
||||
pts_component_t *comp;
|
||||
@@ -386,23 +385,15 @@ bool imc_attestation_process(pa_tnc_attr_t *attr, linked_list_t *attr_list,
|
||||
continue;
|
||||
}
|
||||
|
||||
/* do the component evidence measurement[s] */
|
||||
/* do the component evidence measurement[s] and cache them */
|
||||
do
|
||||
{
|
||||
status = comp->measure(comp, pts, &evid, &measurements);
|
||||
status = comp->measure(comp, pts, &evid);
|
||||
if (status == FAILED)
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (measurements)
|
||||
{
|
||||
DBG2(DBG_IMC, "collected %d file measurements",
|
||||
measurements->get_file_count(measurements));
|
||||
attr = tcg_pts_attr_file_meas_create(measurements);
|
||||
attestation_state->add_attr(attestation_state, attr);
|
||||
}
|
||||
attr = tcg_pts_attr_simple_comp_evid_create(evid);
|
||||
attestation_state->add_attr(attestation_state, attr);
|
||||
attestation_state->add_evidence(attestation_state, evid);
|
||||
}
|
||||
while (status == NEED_MORE);
|
||||
comp->destroy(comp);
|
||||
@@ -414,12 +405,14 @@ bool imc_attestation_process(pa_tnc_attr_t *attr, linked_list_t *attr_list,
|
||||
{
|
||||
pts_simple_evid_final_flag_t flags;
|
||||
pts_meas_algorithms_t comp_hash_algorithm;
|
||||
pts_comp_evidence_t *evid;
|
||||
chunk_t pcr_composite, quote_sig;
|
||||
bool use_quote2;
|
||||
|
||||
/* Send buffered PA-TNC attributes */
|
||||
while (attestation_state->next_attr(attestation_state, &attr))
|
||||
/* Send cached Component Evidence entries */
|
||||
while (attestation_state->next_evidence(attestation_state, &evid))
|
||||
{
|
||||
attr = tcg_pts_attr_simple_comp_evid_create(evid);
|
||||
attr_list->insert_last(attr_list, attr);
|
||||
}
|
||||
|
||||
|
||||
@@ -125,16 +125,16 @@ METHOD(imc_attestation_state_t, get_pts, pts_t*,
|
||||
return this->pts;
|
||||
}
|
||||
|
||||
METHOD(imc_attestation_state_t, add_attr, void,
|
||||
private_imc_attestation_state_t *this, pa_tnc_attr_t *attr)
|
||||
METHOD(imc_attestation_state_t, add_evidence, void,
|
||||
private_imc_attestation_state_t *this, pts_comp_evidence_t *evid)
|
||||
{
|
||||
this->list->insert_last(this->list, attr);
|
||||
this->list->insert_last(this->list, evid);
|
||||
}
|
||||
|
||||
METHOD(imc_attestation_state_t, next_attr, bool,
|
||||
private_imc_attestation_state_t *this, pa_tnc_attr_t **attr)
|
||||
METHOD(imc_attestation_state_t, next_evidence, bool,
|
||||
private_imc_attestation_state_t *this, pts_comp_evidence_t **evid)
|
||||
{
|
||||
return this->list->remove_first(this->list, (void**)attr) == SUCCESS;
|
||||
return this->list->remove_first(this->list, (void**)evid) == SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -158,8 +158,8 @@ imc_state_t *imc_attestation_state_create(TNC_ConnectionID connection_id)
|
||||
.destroy = _destroy,
|
||||
},
|
||||
.get_pts = _get_pts,
|
||||
.add_attr = _add_attr,
|
||||
.next_attr = _next_attr,
|
||||
.add_evidence = _add_evidence,
|
||||
.next_evidence = _next_evidence,
|
||||
},
|
||||
.connection_id = connection_id,
|
||||
.state = TNC_CONNECTION_STATE_CREATE,
|
||||
|
||||
@@ -47,19 +47,19 @@ struct imc_attestation_state_t {
|
||||
pts_t* (*get_pts)(imc_attestation_state_t *this);
|
||||
|
||||
/**
|
||||
* Add an entry to the PA-TNC attribute cache list
|
||||
* Add an entry to the Component Evidence cache list
|
||||
*
|
||||
* @param attr PA-TNC attribute entry
|
||||
* @param evid Component Evidence entry
|
||||
*/
|
||||
void (*add_attr)(imc_attestation_state_t *this, pa_tnc_attr_t *attr);
|
||||
void (*add_evidence)(imc_attestation_state_t *this, pts_comp_evidence_t *evid);
|
||||
|
||||
/**
|
||||
* Removes next entry from the PA-TNC attribute cash list and returns it
|
||||
* Removes next entry from the Component Evidence cache list and returns it
|
||||
*
|
||||
* @param attr Next PA-TNC attribute entry
|
||||
* @param evid Next Component Evidence entry
|
||||
* @return TRUE if next entry is available
|
||||
*/
|
||||
bool (*next_attr)(imc_attestation_state_t *this, pa_tnc_attr_t** attr);
|
||||
bool (*next_evidence)(imc_attestation_state_t *this, pts_comp_evidence_t** evid);
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user