diff options
Diffstat (limited to 'src/libpts/pts/components/ita')
-rw-r--r-- | src/libpts/pts/components/ita/ita_comp_ima.c | 16 | ||||
-rw-r--r-- | src/libpts/pts/components/ita/ita_comp_tboot.c | 8 | ||||
-rw-r--r-- | src/libpts/pts/components/ita/ita_comp_tgrub.c | 8 |
3 files changed, 17 insertions, 15 deletions
diff --git a/src/libpts/pts/components/ita/ita_comp_ima.c b/src/libpts/pts/components/ita/ita_comp_ima.c index a59732428..02470f5f5 100644 --- a/src/libpts/pts/components/ita/ita_comp_ima.c +++ b/src/libpts/pts/components/ita/ita_comp_ima.c @@ -20,7 +20,7 @@ #include "pts/pts_pcr.h" #include "pts/components/pts_component.h" -#include <debug.h> +#include <utils/debug.h> #include <pen/pen.h> #include <sys/types.h> @@ -96,12 +96,12 @@ struct pts_ita_comp_ima_t { int ima_cid; /** - * Component is registering IMA BIOS measurements + * Component is registering IMA BIOS measurements */ bool is_bios_registering; /** - * Component is registering IMA boot aggregate measurement + * Component is registering IMA boot aggregate measurement */ bool is_ima_registering; @@ -184,7 +184,7 @@ struct bios_entry_t { /** * SHA1 measurement hash - */ + */ chunk_t measurement; }; @@ -291,6 +291,7 @@ static bool load_bios_measurements(char *file, linked_list_t *list, DBG1(DBG_PTS, "loading bios measurements '%s' failed: %s", file, strerror(errno)); + free_bios_entry(entry); close(fd); return FALSE; } @@ -377,6 +378,7 @@ static bool load_runtime_measurements(char *file, linked_list_t *list, DBG1(DBG_PTS, "loading ima measurements '%s' failed: %s", file, strerror(errno)); + free_ima_entry(entry); close(fd); return FALSE; } @@ -526,7 +528,7 @@ METHOD(pts_component_t, measure, status_t, evid = extend_pcr(this, qualifier, pcrs, bios_entry->pcr, bios_entry->measurement); free(bios_entry); - + this->state = this->bios_list->get_count(this->bios_list) ? IMA_STATE_BIOS : IMA_STATE_INIT; break; @@ -821,7 +823,7 @@ METHOD(pts_component_t, finalize, bool, u_int32_t vid, name; enum_name_t *names; bool success = TRUE; - + this->name->set_qualifier(this->name, qualifier); vid = this->name->get_vendor_id(this->name); name = this->name->get_name(this->name); @@ -915,7 +917,7 @@ METHOD(pts_component_t, destroy, void, } this->bios_list->destroy_function(this->bios_list, (void *)free_bios_entry); - this->ima_list->destroy_function(this->ima_list, + this->ima_list->destroy_function(this->ima_list, (void *)free_ima_entry); this->name->destroy(this->name); free(this->keyid.ptr); diff --git a/src/libpts/pts/components/ita/ita_comp_tboot.c b/src/libpts/pts/components/ita/ita_comp_tboot.c index 9deeb19b5..8fb5abddf 100644 --- a/src/libpts/pts/components/ita/ita_comp_tboot.c +++ b/src/libpts/pts/components/ita/ita_comp_tboot.c @@ -19,7 +19,7 @@ #include "libpts.h" #include "pts/components/pts_component.h" -#include <debug.h> +#include <utils/debug.h> #include <pen/pen.h> typedef struct pts_ita_comp_tboot_t pts_ita_comp_tboot_t; @@ -66,7 +66,7 @@ struct pts_ita_comp_tboot_t { int kid; /** - * Component is registering measurements + * Component is registering measurements */ bool is_registering; @@ -123,7 +123,7 @@ METHOD(pts_component_t, measure, status_t, char *meas_hex, *pcr_before_hex, *pcr_after_hex; chunk_t measurement, pcr_before, pcr_after; u_int32_t extended_pcr; - + switch (this->seq_no++) { case 0: @@ -286,7 +286,7 @@ METHOD(pts_component_t, finalize, bool, { u_int32_t vid, name; enum_name_t *names; - + vid = this->name->get_vendor_id(this->name); name = this->name->get_name(this->name); names = pts_components->get_comp_func_names(pts_components, vid); diff --git a/src/libpts/pts/components/ita/ita_comp_tgrub.c b/src/libpts/pts/components/ita/ita_comp_tgrub.c index 986f7ace2..e3acd8774 100644 --- a/src/libpts/pts/components/ita/ita_comp_tgrub.c +++ b/src/libpts/pts/components/ita/ita_comp_tgrub.c @@ -18,7 +18,7 @@ #include "pts/components/pts_component.h" -#include <debug.h> +#include <utils/debug.h> #include <pen/pen.h> typedef struct pts_ita_comp_tgrub_t pts_ita_comp_tgrub_t; @@ -90,7 +90,7 @@ METHOD(pts_component_t, measure, status_t, /* Provisional implementation for TGRUB */ extended_pcr = PCR_DEBUG; time(&measurement_time); - + if (!pts->read_pcr(pts, extended_pcr, &pcr_after)) { DBG1(DBG_PTS, "error occurred while reading PCR: %d", extended_pcr); @@ -103,7 +103,7 @@ METHOD(pts_component_t, measure, status_t, measurement = chunk_alloc(pcr_len); memset(measurement.ptr, 0x00, measurement.len); - + pcr_before = chunk_alloc(pcr_len); memset(pcr_before.ptr, 0x00, pcr_before.len); @@ -150,7 +150,7 @@ METHOD(pts_component_t, verify, status_t, return SUCCESS; } } - + return SUCCESS; } |