aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSansar Choinyambuu <schoinya@hsr.ch>2011-10-21 10:43:59 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2011-11-28 19:10:24 +0100
commit97280c7a473f0b17a3bdca19613e1ee999ed512c (patch)
tree115d1ade3c762aaa3f9357029b3a70aa78d70606 /src
parentdb15e3a0d9fb9f4a84f08845f7ed1f96c669de3d (diff)
downloadstrongswan-97280c7a473f0b17a3bdca19613e1ee999ed512c.tar.bz2
strongswan-97280c7a473f0b17a3bdca19613e1ee999ed512c.tar.xz
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
Diffstat (limited to 'src')
-rw-r--r--src/libpts/pts/pts.c4
-rw-r--r--src/libpts/pts/pts.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/libpts/pts/pts.c b/src/libpts/pts/pts.c
index 1178a0f90..becfdae0a 100644
--- a/src/libpts/pts/pts.c
+++ b/src/libpts/pts/pts.c
@@ -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;
}
diff --git a/src/libpts/pts/pts.h b/src/libpts/pts/pts.h
index 41f81e40f..6de36158b 100644
--- a/src/libpts/pts/pts.h
+++ b/src/libpts/pts/pts.h
@@ -396,12 +396,12 @@ struct pts_t {
bool (*does_pcr_value_match)(pts_t *this, chunk_t pcr_after_value);
/**
- * Constructs and returns PCR Quote Digest structure expected from IMC
+ * Constructs and returns TPM Quote Info structure expected from IMC
*
* @param digest Output variable to store quote digest
* @return FALSE in case of any error, TRUE otherwise
*/
- bool (*get_quote_digest)(pts_t *this, chunk_t *digest);
+ bool (*get_quote_info)(pts_t *this, chunk_t *quote_info);
/**
* Constructs and returns PCR Quote Digest structure expected from IMC