Some whitespace fixes

Didn't change some of the larger testing scripts that use an inconsistent
indentation style.
This commit is contained in:
Tobias Brunner
2019-08-22 15:18:06 +02:00
parent 68346b6962
commit b9949e98c2
92 changed files with 554 additions and 552 deletions
+2 -2
View File
@@ -24,7 +24,7 @@
typedef struct private_generic_attr_bool_t private_generic_attr_bool_t;
/**
* Generic PA-TNC attribute containing boolean status value in 32 bit encoding
* Generic PA-TNC attribute containing boolean status value in 32 bit encoding
*
* 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
@@ -123,7 +123,7 @@ METHOD(pa_tnc_attr_t, process, status_t,
enum_name_t *pa_attr_names;
bio_reader_t *reader;
uint32_t status;
*offset = 0;
if (this->value.len < this->length)
+1 -1
View File
@@ -28,7 +28,7 @@ typedef struct generic_attr_bool_t generic_attr_bool_t;
/**
* Class implementing a generic PA-TNC attribute containing a boolean status
* value encoded as a 32 bit unsigned integer (0,1) in network order
* value encoded as a 32 bit unsigned integer (0,1) in network order
*/
struct generic_attr_bool_t {
+1 -1
View File
@@ -32,7 +32,7 @@
typedef struct imv_database_t imv_database_t;
/**
* IMV database interface
* IMV database interface
*/
struct imv_database_t {
+1 -1
View File
@@ -78,7 +78,7 @@ METHOD(imv_os_info_t, set_name, void,
this->info = NULL;
}
this->name = chunk_clone(name);
this->type = os_type_from_name(name);
this->type = os_type_from_name(name);
}
METHOD(imv_os_info_t, get_name, chunk_t,
+1 -1
View File
@@ -154,7 +154,7 @@ METHOD(imv_remediation_string_t, add_instruction, void,
items ? items : "");
free(header);
free(items);
this->instructions = chunk_cat("mm", this->instructions,
this->instructions = chunk_cat("mm", this->instructions,
chunk_create(instruction, strlen(instruction)));
}
+1 -1
View File
@@ -31,7 +31,7 @@
typedef struct imv_session_manager_t imv_session_manager_t;
/**
* IMV session manager interface
* IMV session manager interface
*/
struct imv_session_manager_t {
+1 -1
View File
@@ -160,7 +160,7 @@ METHOD(imv_workitem_t, set_result, TNC_IMV_Action_Recommendation,
TNC_IMV_Action_Recommendation_names, this->rec_final,
strlen(result) ? " - " : "", result);
return this->rec_final;
return this->rec_final;
}
METHOD(imv_workitem_t, get_result, TNC_IMV_Action_Recommendation,
+4 -4
View File
@@ -51,12 +51,12 @@ enum imv_workitem_type_t {
extern enum_name_t *imv_workitem_type_names;
/**
* IMV database interface
* IMV database interface
*/
struct imv_workitem_t {
/**
* Get primary workitem key
* Get primary workitem key
*
* @return Primary workitem key
*/
@@ -104,7 +104,7 @@ struct imv_workitem_t {
* @param eval Evaluation Result
* @return Action Recommendation
*/
TNC_IMV_Action_Recommendation (*set_result)(imv_workitem_t *this,
TNC_IMV_Action_Recommendation (*set_result)(imv_workitem_t *this,
char *result, TNC_IMV_Evaluation_Result eval);
/**
@@ -113,7 +113,7 @@ struct imv_workitem_t {
* @param result Result string
* @return Action Recommendatino
*/
TNC_IMV_Action_Recommendation (*get_result)(imv_workitem_t *this,
TNC_IMV_Action_Recommendation (*get_result)(imv_workitem_t *this,
char **result);
/**
@@ -2,7 +2,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/libstrongswan \
-I$(top_srcdir)/src/libtncif \
-I$(top_srcdir)/src/libimcv \
-I$(top_srcdir)/src/libtpmtss
-I$(top_srcdir)/src/libtpmtss
AM_CFLAGS = \
$(PLUGIN_CFLAGS)
+4 -4
View File
@@ -176,7 +176,7 @@ static TNC_Result receive_msg(private_imv_hcd_agent_t *this, imv_state_t *state,
imv_msg_t *out_msg;
imv_hcd_state_t *hcd_state;
pa_tnc_attr_t *attr;
enum_name_t *pa_subtype_names;
enum_name_t *pa_subtype_names;
pen_type_t type, msg_type;
TNC_Result result;
bool fatal_error = FALSE, assessment = FALSE;
@@ -328,7 +328,7 @@ static TNC_Result receive_msg(private_imv_hcd_agent_t *this, imv_state_t *state,
{
/* do not request user applications */
hcd_state->set_user_app_disabled(hcd_state);
}
}
break;
}
case PWG_HCD_FORWARDING_ENABLED:
@@ -543,7 +543,7 @@ METHOD(imv_agent_if_t, batch_ending, TNC_Result,
/* Determine maximum PA-TNC attribute segment size */
max_seg_size = state->get_max_msg_len(state)
- PA_TNC_HEADER_SIZE
- PA_TNC_HEADER_SIZE
- PA_TNC_ATTR_HEADER_SIZE
- TCG_SEG_ATTR_SEG_ENV_HEADER
- PA_TNC_ATTR_HEADER_SIZE
@@ -565,7 +565,7 @@ METHOD(imv_agent_if_t, batch_ending, TNC_Result,
TRUE);
out_msg->add_attribute(out_msg, attr);
hcd_state->set_subtype(hcd_state, msg_types[i].type);
hcd_state->set_subtype(hcd_state, msg_types[i].type);
received = state->get_action_flags(state);
if ((received & IMV_HCD_ATTR_MUST) != IMV_HCD_ATTR_MUST)
@@ -48,7 +48,7 @@ enum pts_pcr_transform_t {
* PTS Component Evidence Validation Result Flags
*/
enum pts_comp_evid_validation_t {
/** No Validation was attempted */
/** No Validation was attempted */
PTS_COMP_EVID_VALIDATION_NONE = 0x00,
/** Attempted validation, unable to verify */
PTS_COMP_EVID_VALIDATION_UNABLE = 0x20,
@@ -59,7 +59,7 @@ enum pts_comp_evid_validation_t {
};
/**
* PTS Functional Component Interface
* PTS Functional Component Interface
*/
struct pts_comp_evidence_t {
@@ -140,7 +140,7 @@ struct pts_comp_evidence_t {
/**
* Creates a pts_comp_evidence_t object
*
*
* @param name Component Functional Name
* @param depth Sub-component depth
* @param extended_pcr PCR the measurement was extended into
@@ -160,7 +160,7 @@ pts_comp_evidence_t* pts_comp_evidence_create(pts_comp_func_name_t *name,
/**
* Determine transform to fit measurement hash into PCR register
*
* @param algo Measurement hash algorithm
* @param algo Measurement hash algorithm
* @param pcr_len Length of the PCR registers in bytes
* @return PCR transform type
*/
+1 -1
View File
@@ -33,7 +33,7 @@ typedef struct pts_component_t pts_component_t;
#include <bio/bio_writer.h>
/**
* PTS Functional Component Interface
* PTS Functional Component Interface
*/
struct pts_component_t {
@@ -29,7 +29,7 @@ typedef enum pts_tcg_comp_func_name_t pts_tcp_comp_func_name_t;
/**
* PTS Component Functional Name Qualifier Flags for the TCG namespace
* see section 5.2 of PTS Protocol: Binding to TNC IF-M Specification
*
*
* 0 1 2 3 4 5
* +-+-+-+-+-+-+
* |K|S| Type |
+1 -1
View File
@@ -62,7 +62,7 @@ enum pts_dh_group_t {
* @param dh_groups returns set of available DH groups
* @param mandatory_dh_groups if TRUE enforce mandatory PTS DH groups
* @return TRUE if mandatory DH groups are available
* or at least one optional DH group if
* or at least one optional DH group if
* mandatory_dh_groups is set to FALSE.
*/
bool pts_dh_group_probe(pts_dh_group_t *dh_groups, bool mandatory_dh_groups);
+1 -1
View File
@@ -57,7 +57,7 @@ struct pts_ima_event_list_t {
*
* @param measurement Measurement hash
* @param algo Algorithm used to hash files
" @param name Event name (absolute filename or boot_aggregate)
" @param name Event name (absolute filename or boot_aggregate)
* @return Return code
*/
status_t (*get_next)(pts_ima_event_list_t *this, chunk_t *measurement,
+2 -2
View File
@@ -47,11 +47,11 @@ extern enum_name_t *pts_meas_algorithm_names;
* see section 3.8.5 of PTS Protocol: Binding to TNC IF-M Specification
*
* 1
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* |1|2|3|R|R|R|R|R|R|R|R|R|R|R|R|R|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
*
*/
/**
+2 -2
View File
@@ -65,14 +65,14 @@ METHOD(swid_gen_t, generate_tag, char*,
/* Compose the SWID generator command */
if (full || !package || !version)
{
{
snprintf(command, BUF_LEN, "%s swid --entity-name \"%s\" "
"--regid %s --software-id %s%s%s",
this->generator, this->entity, this->regid, sw_id,
full ? " --full" : "", pretty ? " --pretty" : "");
}
else
{
{
snprintf(command, BUF_LEN, "%s swid --entity-name \"%s\" "
"--regid %s --name %s --version-string %s%s",
this->generator, this->entity, this->regid, package,
+1 -1
View File
@@ -39,7 +39,7 @@ struct swima_collector_t {
* @return Software [Identity] Inventory
*/
swima_inventory_t* (*collect_inventory)(swima_collector_t *this,
bool sw_id_only,
bool sw_id_only,
swima_inventory_t *targets);
/**
+1 -1
View File
@@ -31,7 +31,7 @@
*/
/**
* SW_RESPONSE_TOO_LARGE_ERROR
* SW_RESPONSE_TOO_LARGE_ERROR
*
* 1 2 3
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+1 -1
View File
@@ -219,7 +219,7 @@ pa_tnc_attr_t* tcg_seg_attr_seg_env_create(chunk_t segment, uint8_t flags,
*this->value.ptr = flags;
memcpy(this->value.ptr + TCG_SEG_ATTR_SEG_ENV_HEADER,
segment.ptr, segment.len);
return &this->public.pa_tnc_attribute;
}