diff options
Diffstat (limited to 'src/libimcv/pts/components')
-rw-r--r-- | src/libimcv/pts/components/ita/ita_comp_ima.h | 2 | ||||
-rw-r--r-- | src/libimcv/pts/components/ita/ita_comp_tboot.c | 20 | ||||
-rw-r--r-- | src/libimcv/pts/components/ita/ita_comp_tboot.h | 2 | ||||
-rw-r--r-- | src/libimcv/pts/components/ita/ita_comp_tgrub.c | 20 | ||||
-rw-r--r-- | src/libimcv/pts/components/ita/ita_comp_tgrub.h | 2 | ||||
-rw-r--r-- | src/libimcv/pts/components/pts_comp_evidence.c | 14 | ||||
-rw-r--r-- | src/libimcv/pts/components/pts_comp_evidence.h | 10 | ||||
-rw-r--r-- | src/libimcv/pts/components/pts_comp_func_name.c | 22 | ||||
-rw-r--r-- | src/libimcv/pts/components/pts_comp_func_name.h | 12 | ||||
-rw-r--r-- | src/libimcv/pts/components/pts_component.h | 10 | ||||
-rw-r--r-- | src/libimcv/pts/components/pts_component_manager.c | 10 | ||||
-rw-r--r-- | src/libimcv/pts/components/pts_component_manager.h | 8 |
12 files changed, 66 insertions, 66 deletions
diff --git a/src/libimcv/pts/components/ita/ita_comp_ima.h b/src/libimcv/pts/components/ita/ita_comp_ima.h index 546d0a4b2..0577eccd9 100644 --- a/src/libimcv/pts/components/ita/ita_comp_ima.h +++ b/src/libimcv/pts/components/ita/ita_comp_ima.h @@ -29,7 +29,7 @@ * @param depth Sub-component depth * @param pts_db PTS measurement database */ -pts_component_t* pts_ita_comp_ima_create(u_int32_t depth, +pts_component_t* pts_ita_comp_ima_create(uint32_t depth, pts_database_t *pts_db); #endif /** PTS_ITA_COMP_IMA_H_ @}*/ diff --git a/src/libimcv/pts/components/ita/ita_comp_tboot.c b/src/libimcv/pts/components/ita/ita_comp_tboot.c index 3d990f6f2..324c41f12 100644 --- a/src/libimcv/pts/components/ita/ita_comp_tboot.c +++ b/src/libimcv/pts/components/ita/ita_comp_tboot.c @@ -43,7 +43,7 @@ struct pts_ita_comp_tboot_t { /** * Sub-component depth */ - u_int32_t depth; + uint32_t depth; /** * PTS measurement database @@ -93,20 +93,20 @@ METHOD(pts_component_t, get_comp_func_name, pts_comp_func_name_t*, return this->name; } -METHOD(pts_component_t, get_evidence_flags, u_int8_t, +METHOD(pts_component_t, get_evidence_flags, uint8_t, pts_ita_comp_tboot_t *this) { return PTS_REQ_FUNC_COMP_EVID_PCR; } -METHOD(pts_component_t, get_depth, u_int32_t, +METHOD(pts_component_t, get_depth, uint32_t, pts_ita_comp_tboot_t *this) { return this->depth; } METHOD(pts_component_t, measure, status_t, - pts_ita_comp_tboot_t *this, u_int8_t qualifier, pts_t *pts, + pts_ita_comp_tboot_t *this, uint8_t qualifier, pts_t *pts, pts_comp_evidence_t **evidence) { @@ -117,7 +117,7 @@ METHOD(pts_component_t, measure, status_t, pts_comp_evidence_t *evid; char *meas_hex, *pcr_before_hex, *pcr_after_hex; chunk_t measurement, pcr_before, pcr_after; - u_int32_t extended_pcr; + uint32_t extended_pcr; switch (this->seq_no++) { @@ -183,11 +183,11 @@ METHOD(pts_component_t, measure, status_t, } METHOD(pts_component_t, verify, status_t, - pts_ita_comp_tboot_t *this, u_int8_t qualifier,pts_t *pts, + pts_ita_comp_tboot_t *this, uint8_t qualifier,pts_t *pts, pts_comp_evidence_t *evidence) { bool has_pcr_info; - u_int32_t extended_pcr, vid, name; + uint32_t extended_pcr, vid, name; enum_name_t *names; pts_meas_algorithms_t algo; pts_pcr_transform_t transform; @@ -264,7 +264,7 @@ METHOD(pts_component_t, verify, status_t, } METHOD(pts_component_t, finalize, bool, - pts_ita_comp_tboot_t *this, u_int8_t qualifier, bio_writer_t *result) + pts_ita_comp_tboot_t *this, uint8_t qualifier, bio_writer_t *result) { char result_buf[BUF_LEN]; @@ -304,7 +304,7 @@ METHOD(pts_component_t, destroy, void, pts_ita_comp_tboot_t *this) { int count; - u_int32_t vid, name; + uint32_t vid, name; enum_name_t *names; if (ref_put(&this->ref)) @@ -328,7 +328,7 @@ METHOD(pts_component_t, destroy, void, /** * See header */ -pts_component_t *pts_ita_comp_tboot_create(u_int32_t depth, +pts_component_t *pts_ita_comp_tboot_create(uint32_t depth, pts_database_t *pts_db) { pts_ita_comp_tboot_t *this; diff --git a/src/libimcv/pts/components/ita/ita_comp_tboot.h b/src/libimcv/pts/components/ita/ita_comp_tboot.h index 1e1a14831..0459500cc 100644 --- a/src/libimcv/pts/components/ita/ita_comp_tboot.h +++ b/src/libimcv/pts/components/ita/ita_comp_tboot.h @@ -29,7 +29,7 @@ * @param depth Sub-component depth * @param pts_db PTS measurement database */ -pts_component_t* pts_ita_comp_tboot_create(u_int32_t depth, +pts_component_t* pts_ita_comp_tboot_create(uint32_t depth, pts_database_t *pts_db); #endif /** PTS_ITA_COMP_TBOOT_H_ @}*/ diff --git a/src/libimcv/pts/components/ita/ita_comp_tgrub.c b/src/libimcv/pts/components/ita/ita_comp_tgrub.c index e9555726a..a5a1a9b96 100644 --- a/src/libimcv/pts/components/ita/ita_comp_tgrub.c +++ b/src/libimcv/pts/components/ita/ita_comp_tgrub.c @@ -42,7 +42,7 @@ struct pts_ita_comp_tgrub_t { /** * Sub-component depth */ - u_int32_t depth; + uint32_t depth; /** * PTS measurement database @@ -62,27 +62,27 @@ METHOD(pts_component_t, get_comp_func_name, pts_comp_func_name_t*, return this->name; } -METHOD(pts_component_t, get_evidence_flags, u_int8_t, +METHOD(pts_component_t, get_evidence_flags, uint8_t, pts_ita_comp_tgrub_t *this) { return PTS_REQ_FUNC_COMP_EVID_PCR; } -METHOD(pts_component_t, get_depth, u_int32_t, +METHOD(pts_component_t, get_depth, uint32_t, pts_ita_comp_tgrub_t *this) { return this->depth; } METHOD(pts_component_t, measure, status_t, - pts_ita_comp_tgrub_t *this, u_int8_t qualifier, pts_t *pts, + pts_ita_comp_tgrub_t *this, uint8_t qualifier, pts_t *pts, pts_comp_evidence_t **evidence) { size_t pcr_len; pts_pcr_transform_t pcr_transform; pts_meas_algorithms_t hash_algo; pts_comp_evidence_t *evid; - u_int32_t extended_pcr; + uint32_t extended_pcr; time_t measurement_time; chunk_t measurement, pcr_before, pcr_after; @@ -90,7 +90,7 @@ METHOD(pts_component_t, measure, status_t, extended_pcr = PCR_DEBUG; time(&measurement_time); - if (!pts->read_pcr(pts, extended_pcr, &pcr_after)) + if (!pts->read_pcr(pts, extended_pcr, &pcr_after, HASH_SHA1)) { DBG1(DBG_PTS, "error occurred while reading PCR: %d", extended_pcr); return FAILED; @@ -116,11 +116,11 @@ METHOD(pts_component_t, measure, status_t, } METHOD(pts_component_t, verify, status_t, - pts_ita_comp_tgrub_t *this, u_int8_t qualifier, pts_t *pts, + pts_ita_comp_tgrub_t *this, uint8_t qualifier, pts_t *pts, pts_comp_evidence_t *evidence) { bool has_pcr_info; - u_int32_t extended_pcr; + uint32_t extended_pcr; pts_meas_algorithms_t algo; pts_pcr_transform_t transform; pts_pcr_t *pcrs; @@ -155,7 +155,7 @@ METHOD(pts_component_t, verify, status_t, } METHOD(pts_component_t, finalize, bool, - pts_ita_comp_tgrub_t *this, u_int8_t qualifier, bio_writer_t *result) + pts_ita_comp_tgrub_t *this, uint8_t qualifier, bio_writer_t *result) { return FALSE; } @@ -180,7 +180,7 @@ METHOD(pts_component_t, destroy, void, /** * See header */ -pts_component_t *pts_ita_comp_tgrub_create(u_int32_t depth, +pts_component_t *pts_ita_comp_tgrub_create(uint32_t depth, pts_database_t *pts_db) { pts_ita_comp_tgrub_t *this; diff --git a/src/libimcv/pts/components/ita/ita_comp_tgrub.h b/src/libimcv/pts/components/ita/ita_comp_tgrub.h index 59913c82d..7c856ebb9 100644 --- a/src/libimcv/pts/components/ita/ita_comp_tgrub.h +++ b/src/libimcv/pts/components/ita/ita_comp_tgrub.h @@ -29,7 +29,7 @@ * @param depth Sub-component depth * @param pts_db PTS measurement database */ -pts_component_t* pts_ita_comp_tgrub_create(u_int32_t depth, +pts_component_t* pts_ita_comp_tgrub_create(uint32_t depth, pts_database_t *pts_db); #endif /** PTS_ITA_COMP_TGRUB_H_ @}*/ diff --git a/src/libimcv/pts/components/pts_comp_evidence.c b/src/libimcv/pts/components/pts_comp_evidence.c index 08c3d5e9a..f039deb7a 100644 --- a/src/libimcv/pts/components/pts_comp_evidence.c +++ b/src/libimcv/pts/components/pts_comp_evidence.c @@ -37,7 +37,7 @@ struct private_pts_comp_evidence_t { /** * Sub-Component Depth */ - u_int32_t depth; + uint32_t depth; /** * Measurement Time @@ -62,7 +62,7 @@ struct private_pts_comp_evidence_t { /** * PCR the measurement was extended into */ - u_int32_t extended_pcr; + uint32_t extended_pcr; /** * PCR value before extension @@ -92,7 +92,7 @@ struct private_pts_comp_evidence_t { }; METHOD(pts_comp_evidence_t, get_comp_func_name, pts_comp_func_name_t*, - private_pts_comp_evidence_t *this, u_int32_t *depth) + private_pts_comp_evidence_t *this, uint32_t *depth) { if (depth) { @@ -101,14 +101,14 @@ METHOD(pts_comp_evidence_t, get_comp_func_name, pts_comp_func_name_t*, return this->name; } -METHOD(pts_comp_evidence_t, get_extended_pcr, u_int32_t, +METHOD(pts_comp_evidence_t, get_extended_pcr, uint32_t, private_pts_comp_evidence_t *this) { return this->extended_pcr; } METHOD(pts_comp_evidence_t, get_measurement, chunk_t, - private_pts_comp_evidence_t *this, u_int32_t *extended_pcr, + private_pts_comp_evidence_t *this, uint32_t *extended_pcr, pts_meas_algorithms_t *algo, pts_pcr_transform_t *transform, time_t *measurement_time) { @@ -193,8 +193,8 @@ METHOD(pts_comp_evidence_t, destroy, void, * See header */ pts_comp_evidence_t *pts_comp_evidence_create(pts_comp_func_name_t *name, - u_int32_t depth, - u_int32_t extended_pcr, + uint32_t depth, + uint32_t extended_pcr, pts_meas_algorithms_t algo, pts_pcr_transform_t transform, time_t measurement_time, diff --git a/src/libimcv/pts/components/pts_comp_evidence.h b/src/libimcv/pts/components/pts_comp_evidence.h index 55776ce8b..6178c2abd 100644 --- a/src/libimcv/pts/components/pts_comp_evidence.h +++ b/src/libimcv/pts/components/pts_comp_evidence.h @@ -70,14 +70,14 @@ struct pts_comp_evidence_t { * @result Component Functional Name */ pts_comp_func_name_t* (*get_comp_func_name)(pts_comp_evidence_t *this, - u_int32_t *depth); + uint32_t *depth); /** * Gets the PCR the measurement was extended into * * @result PCR the measurement was extended into */ - u_int32_t (*get_extended_pcr)(pts_comp_evidence_t *this); + uint32_t (*get_extended_pcr)(pts_comp_evidence_t *this); /** * Gets the measurement and the algorithms used @@ -89,7 +89,7 @@ struct pts_comp_evidence_t { * @result Measurement hash value */ chunk_t (*get_measurement)(pts_comp_evidence_t *this, - u_int32_t *extended_pcr, + uint32_t *extended_pcr, pts_meas_algorithms_t *algo, pts_pcr_transform_t *transform, time_t *measurement_time); @@ -150,8 +150,8 @@ struct pts_comp_evidence_t { * @param measurement Measurement hash value */ pts_comp_evidence_t* pts_comp_evidence_create(pts_comp_func_name_t *name, - u_int32_t depth, - u_int32_t extended_pcr, + uint32_t depth, + uint32_t extended_pcr, pts_meas_algorithms_t algo, pts_pcr_transform_t transform, time_t measurement_time, diff --git a/src/libimcv/pts/components/pts_comp_func_name.c b/src/libimcv/pts/components/pts_comp_func_name.c index e12522ed1..00494e1ad 100644 --- a/src/libimcv/pts/components/pts_comp_func_name.c +++ b/src/libimcv/pts/components/pts_comp_func_name.c @@ -35,40 +35,40 @@ struct private_pts_comp_func_name_t { /** * PTS Component Functional Name Vendor ID */ - u_int32_t vid; + uint32_t vid; /** * PTS Component Functional Name */ - u_int32_t name; + uint32_t name; /** * PTS Component Functional Name Qualifier */ - u_int8_t qualifier; + uint8_t qualifier; }; -METHOD(pts_comp_func_name_t, get_vendor_id, u_int32_t, +METHOD(pts_comp_func_name_t, get_vendor_id, uint32_t, private_pts_comp_func_name_t *this) { return this->vid; } -METHOD(pts_comp_func_name_t, get_name, u_int32_t, +METHOD(pts_comp_func_name_t, get_name, uint32_t, private_pts_comp_func_name_t *this) { return this->name; } -METHOD(pts_comp_func_name_t, get_qualifier, u_int8_t, +METHOD(pts_comp_func_name_t, get_qualifier, uint8_t, private_pts_comp_func_name_t *this) { return this->qualifier; } METHOD(pts_comp_func_name_t, set_qualifier, void, - private_pts_comp_func_name_t *this, u_int8_t qualifier) + private_pts_comp_func_name_t *this, uint8_t qualifier) { this->qualifier = qualifier; } @@ -117,12 +117,12 @@ METHOD(pts_comp_func_name_t, log_, void, if (names && types) { - DBG2(DBG_PTS, "%s%N functional component '%N' [%s] '%N'", + DBG3(DBG_PTS, "%s%N functional component '%N' [%s] '%N'", label, pen_names, this->vid, names, this->name, flags, types, type); } else { - DBG2(DBG_PTS, "%s0x%06x functional component 0x%08x 0x%02x", + DBG3(DBG_PTS, "%s0x%06x functional component 0x%08x 0x%02x", label, this->vid, this->name, this->qualifier); } } @@ -136,8 +136,8 @@ METHOD(pts_comp_func_name_t, destroy, void, /** * See header */ -pts_comp_func_name_t* pts_comp_func_name_create(u_int32_t vid, u_int32_t name, - u_int8_t qualifier) +pts_comp_func_name_t* pts_comp_func_name_create(uint32_t vid, uint32_t name, + uint8_t qualifier) { private_pts_comp_func_name_t *this; diff --git a/src/libimcv/pts/components/pts_comp_func_name.h b/src/libimcv/pts/components/pts_comp_func_name.h index 90ad7083f..cb069c404 100644 --- a/src/libimcv/pts/components/pts_comp_func_name.h +++ b/src/libimcv/pts/components/pts_comp_func_name.h @@ -38,28 +38,28 @@ struct pts_comp_func_name_t { * * @return PTS Component Functional Name Vendor ID */ - u_int32_t (*get_vendor_id)(pts_comp_func_name_t *this); + uint32_t (*get_vendor_id)(pts_comp_func_name_t *this); /** * Get the PTS Component Functional Name * * @return PTS Component Functional Name */ - u_int32_t (*get_name)(pts_comp_func_name_t *this); + uint32_t (*get_name)(pts_comp_func_name_t *this); /** * Get the PTS Component Functional Name Qualifier * * @return PTS Component Functional Name Qualifier */ - u_int8_t (*get_qualifier)(pts_comp_func_name_t *this); + uint8_t (*get_qualifier)(pts_comp_func_name_t *this); /** * Set the PTS Component Functional Name Qualifier * * @param qualifier PTS Component Functional Name Qualifier to be set */ - void (*set_qualifier)(pts_comp_func_name_t *this, u_int8_t qualifier); + void (*set_qualifier)(pts_comp_func_name_t *this, uint8_t qualifier); /** * Check to PTS Component Functional Names for equality @@ -97,7 +97,7 @@ struct pts_comp_func_name_t { * @param name PTS Component Functional Name * @param qualifier PTS Component Functional Name Qualifier */ -pts_comp_func_name_t* pts_comp_func_name_create(u_int32_t vid, u_int32_t name, - u_int8_t qualifier); +pts_comp_func_name_t* pts_comp_func_name_create(uint32_t vid, uint32_t name, + uint8_t qualifier); #endif /** PTS_FUNC_COMP_NAME_H_ @}*/ diff --git a/src/libimcv/pts/components/pts_component.h b/src/libimcv/pts/components/pts_component.h index 71b1ad59c..1ca4458bf 100644 --- a/src/libimcv/pts/components/pts_component.h +++ b/src/libimcv/pts/components/pts_component.h @@ -49,14 +49,14 @@ struct pts_component_t { * * @return PTS Component Functional Name */ - u_int8_t (*get_evidence_flags)(pts_component_t *this); + uint8_t (*get_evidence_flags)(pts_component_t *this); /** * Get the PTS Sub-component Depth * * @return PTS Sub-component Depth */ - u_int32_t (*get_depth)(pts_component_t *this); + uint32_t (*get_depth)(pts_component_t *this); /** * Do evidence measurements on the PTS Functional Component @@ -67,7 +67,7 @@ struct pts_component_t { * @param measurements additional file measurements (NULL if not present) * @return status return code */ - status_t (*measure)(pts_component_t *this, u_int8_t qualifier, pts_t *pts, + status_t (*measure)(pts_component_t *this, uint8_t qualifier, pts_t *pts, pts_comp_evidence_t** evidence); /** @@ -78,7 +78,7 @@ struct pts_component_t { * @param evidence component evidence measurement to be verified * @return status return code */ - status_t (*verify)(pts_component_t *this, u_int8_t qualifier, pts_t *pts, + status_t (*verify)(pts_component_t *this, uint8_t qualifier, pts_t *pts, pts_comp_evidence_t *evidence); /** @@ -89,7 +89,7 @@ struct pts_component_t { * @param result writer appending concise measurement result * @return TRUE if finalization successful */ - bool (*finalize)(pts_component_t *this, u_int8_t qualifier, + bool (*finalize)(pts_component_t *this, uint8_t qualifier, bio_writer_t *result); /** diff --git a/src/libimcv/pts/components/pts_component_manager.c b/src/libimcv/pts/components/pts_component_manager.c index 9c1375b79..4f0004fe8 100644 --- a/src/libimcv/pts/components/pts_component_manager.c +++ b/src/libimcv/pts/components/pts_component_manager.c @@ -77,7 +77,7 @@ struct component_entry_t { /** * Vendor-Specific Component Functional Name */ - u_int32_t name; + uint32_t name; /** * Functional Component creation method @@ -165,7 +165,7 @@ METHOD(pts_component_manager_t, get_qualifier_type_names, enum_name_t*, } METHOD(pts_component_manager_t, add_component, void, - private_pts_component_manager_t *this, pen_t vendor_id, u_int32_t name, + private_pts_component_manager_t *this, pen_t vendor_id, uint32_t name, pts_component_create_t create) { enumerator_t *enumerator; @@ -210,13 +210,13 @@ METHOD(pts_component_manager_t, remove_vendor, void, enumerator->destroy(enumerator); } -METHOD(pts_component_manager_t, get_qualifier, u_int8_t, +METHOD(pts_component_manager_t, get_qualifier, uint8_t, private_pts_component_manager_t *this, pts_comp_func_name_t *name, char *flags) { enumerator_t *enumerator; vendor_entry_t *entry; - u_int8_t qualifier, size, flag, type = 0; + uint8_t qualifier, size, flag, type = 0; int i; enumerator = this->list->create_enumerator(this->list); @@ -252,7 +252,7 @@ METHOD(pts_component_manager_t, get_qualifier, u_int8_t, METHOD(pts_component_manager_t, create, pts_component_t*, private_pts_component_manager_t *this, - pts_comp_func_name_t *name, u_int32_t depth, pts_database_t *pts_db) + pts_comp_func_name_t *name, uint32_t depth, pts_database_t *pts_db) { enumerator_t *enumerator, *e2; vendor_entry_t *entry; diff --git a/src/libimcv/pts/components/pts_component_manager.h b/src/libimcv/pts/components/pts_component_manager.h index 00f8765ca..bd1974b92 100644 --- a/src/libimcv/pts/components/pts_component_manager.h +++ b/src/libimcv/pts/components/pts_component_manager.h @@ -30,7 +30,7 @@ typedef struct pts_component_manager_t pts_component_manager_t; #include <library.h> #include <pen/pen.h> -typedef pts_component_t* (*pts_component_create_t)(u_int32_t depth, +typedef pts_component_t* (*pts_component_create_t)(uint32_t depth, pts_database_t *pts_db); /** @@ -61,7 +61,7 @@ struct pts_component_manager_t { * @param create Functional Component creation method */ void (*add_component)(pts_component_manager_t *this, pen_t vendor_id, - u_int32_t name, pts_component_create_t create); + uint32_t name, pts_component_create_t create); /** * Remove vendor-specific components and associated namespace @@ -95,7 +95,7 @@ struct pts_component_manager_t { * @param flags Qualifier Flags as a string in a char buffer * @return Qualifier Type */ - u_int8_t (*get_qualifier)(pts_component_manager_t *this, + uint8_t (*get_qualifier)(pts_component_manager_t *this, pts_comp_func_name_t *name, char *flags); /** @@ -107,7 +107,7 @@ struct pts_component_manager_t { * @return Component object if supported, NULL else */ pts_component_t* (*create)(pts_component_manager_t *this, - pts_comp_func_name_t *name, u_int32_t depth, + pts_comp_func_name_t *name, uint32_t depth, pts_database_t *pts_db); /** |