aboutsummaryrefslogtreecommitdiffstats
path: root/src/libimcv/pts
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2016-03-22 13:22:01 +0100
committerAndreas Steffen <andreas.steffen@strongswan.org>2016-03-24 18:52:48 +0100
commitb12c53ce77beb8e04b044d0c0dc9249ddba72200 (patch)
treefc73241398d3ee6850e4aee0d24a863d43abb010 /src/libimcv/pts
parentb210369314cd1e0f889fd1b73dae4d45baa968a8 (diff)
downloadstrongswan-b12c53ce77beb8e04b044d0c0dc9249ddba72200.tar.bz2
strongswan-b12c53ce77beb8e04b044d0c0dc9249ddba72200.tar.xz
Use standard unsigned integer types
Diffstat (limited to 'src/libimcv/pts')
-rw-r--r--src/libimcv/pts/components/ita/ita_comp_ima.h2
-rw-r--r--src/libimcv/pts/components/ita/ita_comp_tboot.c20
-rw-r--r--src/libimcv/pts/components/ita/ita_comp_tboot.h2
-rw-r--r--src/libimcv/pts/components/ita/ita_comp_tgrub.c18
-rw-r--r--src/libimcv/pts/components/ita/ita_comp_tgrub.h2
-rw-r--r--src/libimcv/pts/components/pts_comp_evidence.c14
-rw-r--r--src/libimcv/pts/components/pts_comp_evidence.h10
-rw-r--r--src/libimcv/pts/components/pts_comp_func_name.c18
-rw-r--r--src/libimcv/pts/components/pts_comp_func_name.h12
-rw-r--r--src/libimcv/pts/components/pts_component.h10
-rw-r--r--src/libimcv/pts/components/pts_component_manager.c10
-rw-r--r--src/libimcv/pts/components/pts_component_manager.h8
-rw-r--r--src/libimcv/pts/pts.c14
-rw-r--r--src/libimcv/pts/pts.h4
-rw-r--r--src/libimcv/pts/pts_file_meas.c8
-rw-r--r--src/libimcv/pts/pts_file_meas.h6
-rw-r--r--src/libimcv/pts/pts_file_meta.h12
-rw-r--r--src/libimcv/pts/pts_pcr.c32
-rw-r--r--src/libimcv/pts/pts_pcr.h10
19 files changed, 106 insertions, 106 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..8c22e9440 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;
@@ -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..257d205ae 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;
}
@@ -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);
/**
diff --git a/src/libimcv/pts/pts.c b/src/libimcv/pts/pts.c
index 1ca72098e..3c5359193 100644
--- a/src/libimcv/pts/pts.c
+++ b/src/libimcv/pts/pts.c
@@ -615,7 +615,7 @@ METHOD(pts_t, get_metadata, pts_file_meta_t*,
#ifdef TSS_TROUSERS
METHOD(pts_t, read_pcr, bool,
- private_pts_t *this, u_int32_t pcr_num, chunk_t *pcr_value)
+ private_pts_t *this, uint32_t pcr_num, chunk_t *pcr_value)
{
TSS_HCONTEXT hContext;
TSS_HTPM hTPM;
@@ -663,12 +663,12 @@ err:
}
METHOD(pts_t, extend_pcr, bool,
- private_pts_t *this, u_int32_t pcr_num, chunk_t input, chunk_t *output)
+ private_pts_t *this, uint32_t pcr_num, chunk_t input, chunk_t *output)
{
TSS_HCONTEXT hContext;
TSS_HTPM hTPM;
TSS_RESULT result;
- u_int32_t pcr_length;
+ uint32_t pcr_length;
chunk_t pcr_value = chunk_empty;
result = Tspi_Context_Create(&hContext);
@@ -734,7 +734,7 @@ METHOD(pts_t, quote_tpm, bool,
TSS_RESULT result;
chunk_t quote_info;
BYTE* versionInfo;
- u_int32_t versionInfoSize, pcr;
+ uint32_t versionInfoSize, pcr;
enumerator_t *enumerator;
bool success = FALSE;
@@ -876,13 +876,13 @@ err1:
#else /* TSS_TROUSERS */
METHOD(pts_t, read_pcr, bool,
- private_pts_t *this, u_int32_t pcr_num, chunk_t *pcr_value)
+ private_pts_t *this, uint32_t pcr_num, chunk_t *pcr_value)
{
return FALSE;
}
METHOD(pts_t, extend_pcr, bool,
- private_pts_t *this, u_int32_t pcr_num, chunk_t input, chunk_t *output)
+ private_pts_t *this, uint32_t pcr_num, chunk_t input, chunk_t *output)
{
return FALSE;
}
@@ -1086,7 +1086,7 @@ static bool has_tpm(private_pts_t *this)
TSS_HCONTEXT hContext;
TSS_HTPM hTPM;
TSS_RESULT result;
- u_int32_t version_info_len;
+ uint32_t version_info_len;
result = Tspi_Context_Create(&hContext);
if (result != TSS_SUCCESS)
diff --git a/src/libimcv/pts/pts.h b/src/libimcv/pts/pts.h
index d525306dd..1e07c4be3 100644
--- a/src/libimcv/pts/pts.h
+++ b/src/libimcv/pts/pts.h
@@ -243,7 +243,7 @@ struct pts_t {
* @param pcr_value Chunk to save pcr read output
* @return NULL in case of TSS error, PCR value otherwise
*/
- bool (*read_pcr)(pts_t *this, u_int32_t pcr_num, chunk_t *pcr_value);
+ bool (*read_pcr)(pts_t *this, uint32_t pcr_num, chunk_t *pcr_value);
/**
* Extends given PCR with given value
@@ -254,7 +254,7 @@ struct pts_t {
* @param output Chunk to save PCR value after extension
* @return FALSE in case of TSS error, TRUE otherwise
*/
- bool (*extend_pcr)(pts_t *this, u_int32_t pcr_num, chunk_t input,
+ bool (*extend_pcr)(pts_t *this, uint32_t pcr_num, chunk_t input,
chunk_t *output);
/**
diff --git a/src/libimcv/pts/pts_file_meas.c b/src/libimcv/pts/pts_file_meas.c
index 966d54ba2..6cfb86cb3 100644
--- a/src/libimcv/pts/pts_file_meas.c
+++ b/src/libimcv/pts/pts_file_meas.c
@@ -39,7 +39,7 @@ struct private_pts_file_meas_t {
/**
* ID of PTS File Measurement Request
*/
- u_int16_t request_id;
+ uint16_t request_id;
/**
* List of File Measurements
@@ -70,7 +70,7 @@ static void free_entry(entry_t *entry)
}
}
-METHOD(pts_file_meas_t, get_request_id, u_int16_t,
+METHOD(pts_file_meas_t, get_request_id, uint16_t,
private_pts_file_meas_t *this)
{
return this->request_id;
@@ -266,7 +266,7 @@ METHOD(pts_file_meas_t, destroy, void,
/**
* See header
*/
-pts_file_meas_t *pts_file_meas_create(u_int16_t request_id)
+pts_file_meas_t *pts_file_meas_create(uint16_t request_id)
{
private_pts_file_meas_t *this;
@@ -334,7 +334,7 @@ static bool hash_file(hasher_t *hasher, char *pathname, u_char *hash)
/**
* See header
*/
-pts_file_meas_t *pts_file_meas_create_from_path(u_int16_t request_id,
+pts_file_meas_t *pts_file_meas_create_from_path(uint16_t request_id,
char *pathname, bool is_dir, bool use_rel_name,
pts_meas_algorithms_t alg)
{
diff --git a/src/libimcv/pts/pts_file_meas.h b/src/libimcv/pts/pts_file_meas.h
index 4bf28e280..514006925 100644
--- a/src/libimcv/pts/pts_file_meas.h
+++ b/src/libimcv/pts/pts_file_meas.h
@@ -38,7 +38,7 @@ struct pts_file_meas_t {
*
* @return ID of PTS File Measurement Request
*/
- u_int16_t (*get_request_id)(pts_file_meas_t *this);
+ uint16_t (*get_request_id)(pts_file_meas_t *this);
/**
* Get the number of measured files
@@ -94,7 +94,7 @@ struct pts_file_meas_t {
*
* @param request_id ID of PTS File Measurement Request
*/
-pts_file_meas_t* pts_file_meas_create(u_int16_t request_id);
+pts_file_meas_t* pts_file_meas_create(uint16_t request_id);
/**
* Creates a pts_file_meas_t object measuring a file/directory
@@ -105,7 +105,7 @@ pts_file_meas_t* pts_file_meas_create(u_int16_t request_id);
* @param use_rel_name TRUE if relative filenames are to be used
* @param alg PTS hash measurement algorithm to be used
*/
-pts_file_meas_t* pts_file_meas_create_from_path(u_int16_t request_id,
+pts_file_meas_t* pts_file_meas_create_from_path(uint16_t request_id,
char* pathname, bool is_dir, bool use_rel_name,
pts_meas_algorithms_t alg);
diff --git a/src/libimcv/pts/pts_file_meta.h b/src/libimcv/pts/pts_file_meta.h
index 3f1813306..b02b142db 100644
--- a/src/libimcv/pts/pts_file_meta.h
+++ b/src/libimcv/pts/pts_file_meta.h
@@ -34,12 +34,12 @@ typedef struct pts_file_metadata_t pts_file_metadata_t;
*/
struct pts_file_metadata_t {
pts_file_type_t type;
- u_int64_t filesize;
- u_int64_t created;
- u_int64_t modified;
- u_int64_t accessed;
- u_int64_t owner;
- u_int64_t group;
+ uint64_t filesize;
+ uint64_t created;
+ uint64_t modified;
+ uint64_t accessed;
+ uint64_t owner;
+ uint64_t group;
char *filename;
};
diff --git a/src/libimcv/pts/pts_pcr.c b/src/libimcv/pts/pts_pcr.c
index 0af93b608..895c273bb 100644
--- a/src/libimcv/pts/pts_pcr.c
+++ b/src/libimcv/pts/pts_pcr.c
@@ -40,17 +40,17 @@ struct private_pts_pcr_t {
/**
* Number of extended PCR registers
*/
- u_int32_t pcr_count;
+ uint32_t pcr_count;
/**
* Highest extended PCR register
*/
- u_int32_t pcr_max;
+ uint32_t pcr_max;
/**
* Bitmap of extended PCR registers
*/
- u_int8_t pcr_select[PTS_PCR_MAX_NUM / 8];
+ uint8_t pcr_select[PTS_PCR_MAX_NUM / 8];
/**
* Hasher used to extend shadow PCRs
@@ -59,16 +59,16 @@ struct private_pts_pcr_t {
};
-METHOD(pts_pcr_t, get_count, u_int32_t,
+METHOD(pts_pcr_t, get_count, uint32_t,
private_pts_pcr_t *this)
{
return this->pcr_count;
}
METHOD(pts_pcr_t, select_pcr, bool,
- private_pts_pcr_t *this, u_int32_t pcr)
+ private_pts_pcr_t *this, uint32_t pcr)
{
- u_int32_t i, f;
+ uint32_t i, f;
if (pcr >= PTS_PCR_MAX_NUM)
{
@@ -106,7 +106,7 @@ typedef struct {
/** implements enumerator_t */
enumerator_t public;
/** current PCR */
- u_int32_t pcr;
+ uint32_t pcr;
/** back reference to parent */
private_pts_pcr_t *pcrs;
} pcr_enumerator_t;
@@ -116,11 +116,11 @@ typedef struct {
*/
static bool pcr_enumerator_enumerate(pcr_enumerator_t *this, ...)
{
- u_int32_t *pcr, i, f;
+ uint32_t *pcr, i, f;
va_list args;
va_start(args, this);
- pcr = va_arg(args, u_int32_t*);
+ pcr = va_arg(args, uint32_t*);
va_end(args);
while (this->pcr <= this->pcrs->pcr_max)
@@ -158,13 +158,13 @@ METHOD(pts_pcr_t, create_enumerator, enumerator_t*,
}
METHOD(pts_pcr_t, get, chunk_t,
- private_pts_pcr_t *this, u_int32_t pcr)
+ private_pts_pcr_t *this, uint32_t pcr)
{
return (pcr < PTS_PCR_MAX_NUM) ? this->pcrs[pcr] : chunk_empty;
}
METHOD(pts_pcr_t, set, bool,
- private_pts_pcr_t *this, u_int32_t pcr, chunk_t value)
+ private_pts_pcr_t *this, uint32_t pcr, chunk_t value)
{
if (value.len != PTS_PCR_LEN)
{
@@ -180,7 +180,7 @@ METHOD(pts_pcr_t, set, bool,
}
METHOD(pts_pcr_t, extend, chunk_t,
- private_pts_pcr_t *this, u_int32_t pcr, chunk_t measurement)
+ private_pts_pcr_t *this, uint32_t pcr, chunk_t measurement)
{
if (measurement.len != PTS_PCR_LEN)
{
@@ -205,8 +205,8 @@ METHOD(pts_pcr_t, get_composite, chunk_t,
{
chunk_t composite;
enumerator_t *enumerator;
- u_int16_t selection_size;
- u_int32_t pcr_field_size, pcr;
+ uint16_t selection_size;
+ uint32_t pcr_field_size, pcr;
u_char *pos;
selection_size = get_selection_size(this);
@@ -236,7 +236,7 @@ METHOD(pts_pcr_t, get_composite, chunk_t,
METHOD(pts_pcr_t, destroy, void,
private_pts_pcr_t *this)
{
- u_int32_t i;
+ uint32_t i;
for (i = 0; i < PTS_PCR_MAX_NUM; i++)
{
@@ -253,7 +253,7 @@ pts_pcr_t *pts_pcr_create(void)
{
private_pts_pcr_t *this;
hasher_t *hasher;
- u_int32_t i;
+ uint32_t i;
hasher = lib->crypto->create_hasher(lib->crypto, HASH_SHA1);
if (!hasher)
diff --git a/src/libimcv/pts/pts_pcr.h b/src/libimcv/pts/pts_pcr.h
index f638b5ee4..b6ca73edc 100644
--- a/src/libimcv/pts/pts_pcr.h
+++ b/src/libimcv/pts/pts_pcr.h
@@ -45,7 +45,7 @@ struct pts_pcr_t {
*
* @return number of selected PCRs
*/
- u_int32_t (*get_count)(pts_pcr_t *this);
+ uint32_t (*get_count)(pts_pcr_t *this);
/**
* Mark a PCR as selected
@@ -53,7 +53,7 @@ struct pts_pcr_t {
* @param pcr index of PCR
* @return TRUE if PCR index exists
*/
- bool (*select_pcr)(pts_pcr_t *this, u_int32_t pcr);
+ bool (*select_pcr)(pts_pcr_t *this, uint32_t pcr);
/**
* Get the size of the selection field in bytes
@@ -75,7 +75,7 @@ struct pts_pcr_t {
* @param pcr index of PCR
* @return content of PCR
*/
- chunk_t (*get)(pts_pcr_t *this, u_int32_t pcr);
+ chunk_t (*get)(pts_pcr_t *this, uint32_t pcr);
/**
* Set the content of a PCR
@@ -84,7 +84,7 @@ struct pts_pcr_t {
* @param value new value of PCR
* @return TRUE if value could be set
*/
- bool (*set)(pts_pcr_t *this, u_int32_t pcr, chunk_t value);
+ bool (*set)(pts_pcr_t *this, uint32_t pcr, chunk_t value);
/**
* Extend the content of a PCR
@@ -93,7 +93,7 @@ struct pts_pcr_t {
* @param measurement measurment value to be extended into PCR
* @return new content of PCR
*/
- chunk_t (*extend)(pts_pcr_t *this, u_int32_t pcr, chunk_t measurement);
+ chunk_t (*extend)(pts_pcr_t *this, uint32_t pcr, chunk_t measurement);
/**
* Create a PCR Composite object over all selected PCRs