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