Fixed calculate quote info function -> initialize PCR bit mask array with zeroes

Return TPM Quote Info only, hash of it is calculated in IMV Process
Renamed digest with quote info
This commit is contained in:
Sansar Choinyambuu
2011-11-28 19:10:24 +01:00
committed by Andreas Steffen
parent db15e3a0d9
commit 97280c7a47
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -1001,7 +1001,7 @@ METHOD(pts_t, does_pcr_value_match, bool,
e = entries->create_enumerator(entries);
while (e->enumerate(e, &pcr_entry))
{
if (chunk_equals(chunk_create(pcr_entry->pcr_value, PCR_LEN), pcr_after_value))
if (strncmp(pcr_entry->pcr_value, pcr_after_value.ptr, PCR_LEN) == 0)
{
DBG1(DBG_PTS, "PCR %d value matched with configured value",
pcr_entry->pcr_number);
@@ -1170,6 +1170,7 @@ METHOD(pts_t, get_quote_info, bool,
METHOD(pts_t, verify_quote_signature, bool,
private_pts_t *this, chunk_t data, chunk_t signature)
{
/** Implementation using strongswan -> not working */
public_key_t *aik_pub_key;
aik_pub_key = this->aik->get_public_key(this->aik);
@@ -1188,6 +1189,7 @@ METHOD(pts_t, verify_quote_signature, bool,
}
aik_pub_key->destroy(aik_pub_key);
return TRUE;
}