Improved implementation of Read PCR/ Extend PCR/ Quote_TPM functions
authorSansar Choinyambuu <schoinya@hsr.ch>
Fri, 7 Oct 2011 13:15:56 +0000 (15:15 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Mon, 28 Nov 2011 16:53:34 +0000 (17:53 +0100)
Implemented creating/handling of Simple Evidence Final attribute (incomplete)

src/libimcv/plugins/imc_attestation/imc_attestation.c
src/libpts/pts/pts.c
src/libpts/pts/pts.h

index 0109c29..b676eac 100644 (file)
@@ -310,6 +310,10 @@ TNC_Result TNC_IMC_ReceiveMessage(TNC_IMCID imc_id,
 
        attr_list->destroy(attr_list);
        return result;
+
+       err:
+       DESTROY_IF(attr_list);
+       return TNC_RESULT_FATAL;
 }
 
 /**
index 0f850f2..118585c 100644 (file)
@@ -875,6 +875,7 @@ METHOD(pts_t, quote_tpm, bool,
                        goto err3;
                }
        }
+       enumerator->destroy(enumerator);
 
        /* Set the Validation Data */
        valData.ulExternalDataLength = this->secret.len;
index 8706a14..c7c43ac 100644 (file)
@@ -386,14 +386,13 @@ struct pts_t {
         * Quote over PCR's
         * Expects owner and SRK secret to be WELL_KNOWN_SECRET and no password set for AIK
         *
-        * @param pcrs                                  Set of PCR's to make quotation over
-        * @param num_of_pcr                    Number of PCR's
+        * @param pcrs                                  List of PCR's to make quotation over
         * @param pcr_composite                 Chunk to save pcr composite structure
         * @param quote_signature               Chunk to save quote operation output
         *                                                              without external data (anti-replay protection)
         * @return                                              FALSE in case of TSS error, TRUE otherwise
         */
-        bool (*quote_tpm)(pts_t *this, u_int32_t *pcrs, u_int32_t num_of_pcrs,
+        bool (*quote_tpm)(pts_t *this, linked_list_t *pcrs,
                                           chunk_t *pcr_composite, chunk_t *quote_signature);
 
        /**