Defined functional components within ITA namespace
Implemented handling of functional components evidence request/response
This commit is contained in:
parent
95e37555c3
commit
2e84538299
|
@ -27,10 +27,6 @@
|
|||
#include <sys/utsname.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <openssl/rsa.h>
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
#define PTS_BUF_SIZE 4096
|
||||
|
||||
typedef struct private_pts_t private_pts_t;
|
||||
|
@ -934,20 +930,6 @@ METHOD(pts_t, quote_tpm, bool,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Comparison function for pcr_entry_t struct
|
||||
*/
|
||||
static int pcr_entry_compare(const pcr_entry_t *a, const pcr_entry_t *b)
|
||||
{
|
||||
return (a->pcr_number - b->pcr_number);
|
||||
}
|
||||
|
||||
static int pcr_entry_compare_qsort(const void *a, const void *b)
|
||||
{
|
||||
return pcr_entry_compare(*(const pcr_entry_t *const *)a
|
||||
, *(const pcr_entry_t *const *)b);
|
||||
}
|
||||
|
||||
METHOD(pts_t, add_pcr_entry, void,
|
||||
private_pts_t *this, pcr_entry_t *new)
|
||||
{
|
||||
|
@ -1026,11 +1008,7 @@ METHOD(pts_t, does_pcr_value_match, bool,
|
|||
}
|
||||
}
|
||||
DESTROY_IF(e);
|
||||
|
||||
this->pcrs->insert_last(this->pcrs, new);
|
||||
|
||||
qsort(this->pcrs, this->pcrs->get_count(this->pcrs),
|
||||
sizeof(pcr_entry_t *), pcr_entry_compare_qsort);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1166,7 +1144,7 @@ METHOD(pts_t, get_quote_info, bool,
|
|||
else
|
||||
{
|
||||
*out_pcr_composite = chunk_clone(pcr_composite);
|
||||
DBG4(DBG_PTS, "calculated PCR Composite: %B", out_pcr_composite);
|
||||
DBG3(DBG_PTS, "calculated PCR Composite: %B", out_pcr_composite);
|
||||
}
|
||||
|
||||
/* SHA1 hash of PCR Composite to construct TPM_QUOTE_INFO */
|
||||
|
|
|
@ -303,7 +303,7 @@ pa_tnc_attr_t *tcg_pts_attr_req_funct_comp_evid_create(
|
|||
pts_attr_req_funct_comp_evid_flag_t flags,
|
||||
u_int32_t depth, u_int32_t vendor_id,
|
||||
pts_qualifier_t qualifier,
|
||||
pts_funct_comp_name_t name)
|
||||
pts_ita_funct_comp_name_t name)
|
||||
{
|
||||
private_tcg_pts_attr_req_funct_comp_evid_t *this;
|
||||
|
||||
|
|
|
@ -484,7 +484,7 @@ METHOD(tcg_pts_attr_simple_comp_evid_t, get_qualifier, pts_qualifier_t,
|
|||
return this->qualifier;
|
||||
}
|
||||
|
||||
METHOD(tcg_pts_attr_simple_comp_evid_t, get_comp_funct_name, pts_funct_comp_name_t,
|
||||
METHOD(tcg_pts_attr_simple_comp_evid_t, get_comp_funct_name, pts_ita_funct_comp_name_t,
|
||||
private_tcg_pts_attr_simple_comp_evid_t *this)
|
||||
{
|
||||
return this->name;
|
||||
|
|
|
@ -68,7 +68,7 @@ struct tcg_pts_attr_simple_comp_evid_params_t {
|
|||
u_int32_t depth;
|
||||
u_int32_t vendor_id;
|
||||
pts_qualifier_t qualifier;
|
||||
pts_funct_comp_name_t name;
|
||||
pts_ita_funct_comp_name_t name;
|
||||
u_int32_t extended_pcr;
|
||||
pts_meas_algorithms_t hash_algorithm;
|
||||
pts_pcr_transform_t transformation;
|
||||
|
@ -137,7 +137,7 @@ struct tcg_pts_attr_simple_comp_evid_t {
|
|||
*
|
||||
* @return Component Functional Name
|
||||
*/
|
||||
pts_funct_comp_name_t (*get_comp_funct_name)(tcg_pts_attr_simple_comp_evid_t *this);
|
||||
pts_ita_funct_comp_name_t (*get_comp_funct_name)(tcg_pts_attr_simple_comp_evid_t *this);
|
||||
|
||||
/**
|
||||
* Get Measurement Type
|
||||
|
|
Loading…
Reference in New Issue