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-07-09 17:03:23 +02:00
parent 68346b6962
commit b9949e98c2
92 changed files with 554 additions and 552 deletions

View File

@ -29,8 +29,8 @@ strongswan_STARTER_PLUGINS := kernel-netlink
# list of all plugins - used to enable them with the function below
strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \
$(strongswan_STARTER_PLUGINS) \
$(strongswan_SCEPCLIENT_PLUGINS))
$(strongswan_STARTER_PLUGINS) \
$(strongswan_SCEPCLIENT_PLUGINS))
include $(LOCAL_PATH)/Android.common.mk

View File

@ -10,4 +10,4 @@ imv_policy_manager.command_allow =
Shell command to be executed with recommendation allow.
imv_policy_manager.command_block =
Shell command to be executed with all other recommendations.
Shell command to be executed with all other recommendations.

View File

@ -26,19 +26,21 @@ libimcv.plugins.imc-attestation.pcr_info = no
Whether to send pcr_before and pcr_after info.
libimcv.plugins.imc-attestation.pcr17_before =
PCR17 value before measurement.
PCR17 value before measurement.
libimcv.plugins.imc-attestation.pcr17_meas =
Dummy measurement value extended into PCR17 if the TBOOT log is not available.
Dummy measurement value extended into PCR17 if the TBOOT log is not
available.
libimcv.plugins.imc-attestation.pcr17_after =
PCR17 value after measurement.
PCR17 value after measurement.
libimcv.plugins.imc-attestation.pcr18_before =
PCR18 value before measurement.
PCR18 value before measurement.
libimcv.plugins.imc-attestation.pcr18_meas =
Dummy measurement value extended into PCR17 if the TBOOT log is not available.
Dummy measurement value extended into PCR17 if the TBOOT log is not
available.
libimcv.plugins.imc-attestation.pcr18_after =
PCR18 value after measurement.
PCR18 value after measurement.

View File

@ -6,7 +6,7 @@ libimcv.plugins.imc-hcd.subtypes
libimcv.plugins.imc-hcd.subtypes.<section>
Defines a PWG HCD PA subtype section. Recognized subtype section names are
_system_, _control_, _marker_, _finisher_, _interface_ and _scanner_.
_system_, _control_, _marker_, _finisher_, _interface_ and _scanner_.
libimcv.plugins.imc-hcd.subtypes.<section>.attributes_natural_language = en
Variable length natural language tag conforming to RFC 5646 specifies

View File

@ -1,18 +1,18 @@
libimcv.plugins.imc-os.device_cert =
Manually set the path to the client device certificate
(e.g. /etc/pts/aikCert.der)
(e.g. /etc/pts/aikCert.der)
libimcv.plugins.imc-os.device_id =
Manually set the client device ID in hexadecimal format
(e.g. 1083f03988c9762703b1c1080c2e46f72b99cc31)
(e.g. 1083f03988c9762703b1c1080c2e46f72b99cc31)
libimcv.plugins.imc-os.device_handle =
Manually set handle to a private key bound to a smartcard or TPM
(e.g. 0x81010004)
(e.g. 0x81010004)
libimcv.plugins.imc-os.device_pubkey =
Manually set the path to the client device public key
(e.g. /etc/pts/aikPub.der)
(e.g. /etc/pts/aikPub.der)
libimcv.plugins.imc-os.push_info = yes
Send operating system info without being prompted.

View File

@ -5,10 +5,10 @@ charon.plugins.tnccs-20.max_message_size = 65490
Maximum size of a PA-TNC message (upper limit via PT-EAP = 65497).
charon.plugins.tnccs-20.mutual = no
Enable PB-TNC mutual protocol.
Enable PB-TNC mutual protocol.
charon.plugins.tnccs-20.tests.pb_tnc_noskip = no
Send an unsupported PB-TNC message type with the NOSKIP flag set.
Send an unsupported PB-TNC message type with the NOSKIP flag set.
charon.plugins.tnccs-20.tests.pb_tnc_version = 2
Send a PB-TNC batch with a modified PB-TNC version.
Send a PB-TNC batch with a modified PB-TNC version.

View File

@ -1,7 +1,7 @@
conftest - an IKEv2 conformance testing framework
=================================================
conftest - an IKEv2 conformance testing framework
=================================================
1. Introduction
@ -40,9 +40,9 @@ strongSwan software suite.
The syntax is as follows:
settings := (section|keyvalue)*
section := name { settings }
keyvalue := key = value\n
settings := (section|keyvalue)*
section := name { settings }
keyvalue := key = value\n
Settings contain zero or more sub-sections or key/value pairs. A section
consists of a name, followed by curly open and close brackets. The value in the
@ -150,24 +150,24 @@ The actions section in the test specific configuration file defines
the IKEv2 protocol actions to trigger. Currently, the following actions
are supported and take these arguments (as key/value pairs):
initiate: Initiate an IKE- and CHILD_SA
config: name of the CHILD_SA configuration to initiate
delay: Delay to trigger action after startup
rekey_ike: Rekey an IKE_SA
config: name of originating IKE_SA configuration
delay: Delay to trigger action after startup
rekey_child: Rekey an CHILD_SA
config: name of originating CHILD_SA configuration
delay: Delay to trigger action after startup
liveness: Do a liveness check (DPD) on the IKE_SA
config: name of originating IKE_SA configuration
delay: Delay to trigger action after startup
close_ike: Close an IKE_SA
config: name of originating IKE_SA configuration
delay: Delay to trigger action after startup
close_child: Close a CHILD_SA
config: name of originating IKE_SA configuration
delay: Delay to trigger action after startup
initiate: Initiate an IKE- and CHILD_SA
config: name of the CHILD_SA configuration to initiate
delay: Delay to trigger action after startup
rekey_ike: Rekey an IKE_SA
config: name of originating IKE_SA configuration
delay: Delay to trigger action after startup
rekey_child: Rekey an CHILD_SA
config: name of originating CHILD_SA configuration
delay: Delay to trigger action after startup
liveness: Do a liveness check (DPD) on the IKE_SA
config: name of originating IKE_SA configuration
delay: Delay to trigger action after startup
close_ike: Close an IKE_SA
config: name of originating IKE_SA configuration
delay: Delay to trigger action after startup
close_child: Close a CHILD_SA
config: name of originating IKE_SA configuration
delay: Delay to trigger action after startup
To trigger the same action multiple times, the action sections must be named
uniquely. Append an arbitrary string to the action name. The following example

View File

@ -100,8 +100,8 @@ down)
shift
if [ "$#" -ne 1 ]
then
echo "Usage: $IPSEC_SCRIPT down <connection name>"
exit 2
echo "Usage: $IPSEC_SCRIPT down <connection name>"
exit 2
fi
rc=7
if [ -e $IPSEC_CHARON_PID ]
@ -115,8 +115,8 @@ down-srcip)
shift
if [ "$#" -lt 1 ]
then
echo "Usage: $IPSEC_SCRIPT down-srcip <start> [<end>]"
exit 2
echo "Usage: $IPSEC_SCRIPT down-srcip <start> [<end>]"
exit 2
fi
rc=7
if [ -e $IPSEC_CHARON_PID ]
@ -283,8 +283,8 @@ up)
shift
if [ "$#" -ne 1 ]
then
echo "Usage: $IPSEC_SCRIPT up <connection name>"
exit 2
echo "Usage: $IPSEC_SCRIPT up <connection name>"
exit 2
fi
rc=7
if [ -e $IPSEC_CHARON_PID ]

View File

@ -140,7 +140,7 @@ processing/jobs/dpd_timeout_job.c processing/jobs/dpd_timeout_job.h \
processing/jobs/adopt_children_job.c processing/jobs/adopt_children_job.h
libcharon_la_SOURCES += \
bus/listeners/sys_logger.c bus/listeners/sys_logger.h
bus/listeners/sys_logger.c bus/listeners/sys_logger.h
LOCAL_SRC_FILES := $(filter %.c,$(libcharon_la_SOURCES))

View File

@ -2,7 +2,7 @@
INSERT INTO `Peer` (
`IdPeer`, `IdUser`, `Alias`, `KeyId`, `PublicKey`
) VALUES (
1, 0, 'sidv150',
1, 0, 'sidv150',
X'ed90e64feca21f4b6897992422e0de21b9d62629',
X'30820122300d06092a864886f70d01010105000382010f003082010a0282010100cd946c229f7d52b21da1cb5384e7dcaf6529f760534a56355efd49e87a9c6f1ddd5ff303bd7eb49c23de03adc487456f41eb5f92947bdc8ff8dbe443f8d112e0da2c98145e7c4d1cd15cddd08577f4d4f3d0a2e1da3c08c94cd819758751931e7a9724cc43d73a11b8e176a268b4cdbbf3995cb09723abc9bfc477c25e714a4661a84c078be7404d8986be55f20437e3a6b278a3cc89aec085941f1a1aafaf4b22ae146fe4684d5567dc30658a32087d01b98515070cb1653311cb6102f82a83c638c2a79985dbb9600752e9cbc272014a5c547b4ab59130c3a948658bff794b6f202cf95939ffa73b10521f05c060cecb15f8597ed95d72b9e405ee31f1b5d90203010001'
);

View File

@ -15,7 +15,7 @@
/**
* @defgroup tnc_ifmap_http tnc_ifmap_http
* @{ @ingroup tnc_ifmap
* @{ @ingroup tnc_ifmap
*/
#ifndef TNC_IFMAP_HTTP_H_

View File

@ -15,7 +15,7 @@
/**
* @defgroup tnc_ifmap_listener tnc_ifmap_listener
* @{ @ingroup tnc_ifmap
* @{ @ingroup tnc_ifmap
*/
#ifndef TNC_IFMAP_LISTENER_H_

View File

@ -17,7 +17,7 @@
#include "tnc_ifmap_listener.h"
#include <daemon.h>
typedef struct private_tnc_ifmap_plugin_t private_tnc_ifmap_plugin_t;
/**

View File

@ -15,7 +15,7 @@
/**
* @defgroup tnc_ifmap_soap_msg tnc_ifmap_soap_msg
* @{ @ingroup tnc_ifmap
* @{ @ingroup tnc_ifmap
*/
#ifndef TNC_IFMAP_SOAP_MSG_H_

View File

@ -64,7 +64,7 @@ my $moon_key = "-----BEGIN RSA PRIVATE KEY-----\n" .
"YeivMDc9hj0YLXA47ryQHTx4vB5Nv3TI/LoUG6VrCvZvocQOXe/n7TguwAjJj7ef" .
"E55Gy8lXDRENyJMP1vif3N2iH8eQ1ASf8k/+gnBNkjSlYSSQUDfV\n" .
"-----END RSA PRIVATE KEY-----\n";
my $moon_cert = "-----BEGIN CERTIFICATE-----\n" .
"MIIEIjCCAwqgAwIBAgIBKzANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDSDEZ" .
"MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS" .
@ -283,7 +283,7 @@ my %child = (
local_ts => \@l_ts,
remote_ts => \@r_ts,
esp_proposals => \@esp,
);
);
my %children = ( 'net-net' => \%child );
my @l_addrs = ( '192.168.0.1' );
my @r_addrs = ( '192.168.0.2' );

View File

@ -229,7 +229,7 @@ Vici::Message - Perl extension for building and parsing strongSwan VICI messages
=head1 SYNOPSIS
use Vici::Message;
use Vici::Message;
=head1 DESCRIPTION

View File

@ -21,7 +21,7 @@ sub new {
my $class = shift;
my $socket = shift;
my $self = {
Transport => Vici::Transport->new($socket),
Transport => Vici::Transport->new($socket),
};
bless($self, $class);
return $self;
@ -98,7 +98,7 @@ sub streamed_request {
my ($self, $command, $event, $vars) = @_;
my $out = defined $vars ? $vars->encode() : '';
$self->register($event);
$self->register($event);
my $request = pack('CC/a*a*', CMD_REQUEST, $command, $out);
$self->{'Transport'}->send($request);
@ -112,13 +112,13 @@ sub streamed_request {
if ( $type == EVENT )
{
(my $event_name, $data) = unpack('C/a*a*', $data);
(my $event_name, $data) = unpack('C/a*a*', $data);
if ($event_name eq $event)
{
my $msg = Vici::Message->from_data($data);
push(@list, $msg);
}
if ($event_name eq $event)
{
my $msg = Vici::Message->from_data($data);
push(@list, $msg);
}
}
elsif ( $type == CMD_RESPONSE )
{
@ -142,7 +142,7 @@ Vici::Packet - Perl extension for sending and receiving strongSwan VICI packets
=head1 SYNOPSIS
use Vici::Packet;
use Vici::Packet;
=head1 DESCRIPTION

View File

@ -25,7 +25,7 @@ sub stats {
}
sub reload_settings {
return request_res('reload-settings', @_);
return request_res('reload-settings', @_);
}
sub initiate {
@ -125,7 +125,7 @@ sub flush_certs {
}
sub clear_creds {
return request_res('clear-creds', @_);
return request_res('clear-creds', @_);
}
sub load_authority {
@ -197,7 +197,7 @@ Vici::Session - Perl binding for the strongSwan VICI configuration interface
=head1 SYNOPSIS
use Vici::Session;
use Vici::Session;
=head1 DESCRIPTION

View File

@ -53,7 +53,7 @@ Vici::Transport - Perl extension for communicating via a strongSwan VICI socket
=head1 SYNOPSIS
use Vici::Transport;
use Vici::Transport;
=head1 DESCRIPTION

View File

@ -4,10 +4,10 @@ Gem::Specification.new do |s|
s.authors = ["strongSwan Project"]
s.email = ["info@strongswan.org"]
s.description = %q{
The strongSwan VICI protocol allows external application to monitor,
configure and control the IKE daemon charon. This Ruby Gem provides a
native client side implementation of the VICI protocol, well suited to
script automated tasks in a relaible way.
The strongSwan VICI protocol allows external application to monitor,
configure and control the IKE daemon charon. This Ruby Gem provides a
native client side implementation of the VICI protocol, well suited to
script automated tasks in a relaible way.
}
s.summary = "Native Ruby interface for strongSwan VICI"
s.homepage = "https://wiki.strongswan.org/projects/strongswan/wiki/Vici"

View File

@ -29,7 +29,7 @@ typedef struct eap_inner_method_t eap_inner_method_t;
/**
* Interface of a weak inner EAP method like EAP-TNC or PT-EAP
* that must be encapsulated in a strong TLS-based EAP method
* that must be encapsulated in a strong TLS-based EAP method
*/
struct eap_inner_method_t {
@ -43,14 +43,14 @@ struct eap_inner_method_t {
*
* @return outer EAP authentication type
*/
eap_type_t (*get_auth_type)(eap_inner_method_t *this);
eap_type_t (*get_auth_type)(eap_inner_method_t *this);
/*
* Set type of outer EAP Client/Server authentication
*
* @param type outer EAP authentication type
*/
void (*set_auth_type)(eap_inner_method_t *this, eap_type_t type);
void (*set_auth_type)(eap_inner_method_t *this, eap_type_t type);
};

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)

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 {

View File

@ -32,7 +32,7 @@
typedef struct imv_database_t imv_database_t;
/**
* IMV database interface
* IMV database interface
*/
struct imv_database_t {

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,

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)));
}

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 {

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,

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);
/**

View File

@ -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)

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)

View File

@ -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
*/

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 {

View File

@ -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 |

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);

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,

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|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
*
*/
/**

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,

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);
/**

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

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;
}

View File

@ -38,7 +38,7 @@ struct mgf1_t {
/**
* Hash the seed before using it as a seed for MGF1
*
*
* @param yes TRUE if seed has to be hashed first
*/
void (*set_hash_seed)(mgf1_t *this, bool yes);

View File

@ -60,7 +60,7 @@ METHOD(ntt_fft_t, get_modulus, uint16_t,
*
* x[i1] ---|+|------- x[i1]
* \/
* /\ w[iw]
* /\ w[iw]
* x[i2] ---|-|--|*|-- x[i2]
*
*/
@ -147,7 +147,7 @@ METHOD(ntt_fft_t, transform, void,
{
iw = s * (inverse ? (n - i * k) : (i * k));
butterfly(this, b, t + i, t + i + m, iw);
}
}
}
t += 2*m;
}
@ -169,7 +169,7 @@ METHOD(ntt_fft_t, transform, void,
/**
* Compensate the linear phase needed for negative wrapped convolution
* and normalize the output array with 1/n mod q after the inverse FFT.
* and normalize the output array with 1/n mod q after the inverse FFT.
*/
if (inverse)
{

View File

@ -563,7 +563,7 @@ static const uint16_t wi_12289_512[] = {
* Bit-reversed indices for n = 512
*/
static const uint16_t rev_512[] = {
0, 256, 128, 384, 64, 320, 192, 448, 32, 288,
0, 256, 128, 384, 64, 320, 192, 448, 32, 288,
160, 416, 96, 352, 224, 480, 16, 272, 144, 400,
80, 336, 208, 464, 48, 304, 176, 432, 112, 368,
240, 496, 8, 264, 136, 392, 72, 328, 200, 456,

View File

@ -32,7 +32,7 @@
static inline uint32_t ntt_fft_mreduce(uint32_t x, const ntt_fft_params_t *p)
{
uint32_t m, t;
m = (x * p->q_inv) & p->rmask;
t = (x + m * p->q) >> p->rlog;

View File

@ -39,7 +39,7 @@ START_TEST(test_ntt_fft_impulse)
x[i] = 0;
}
x[0] = 1;
fft = ntt_fft_create(fft_params[_i]);
fft->transform(fft, x, X, FALSE);
@ -72,7 +72,7 @@ START_TEST(test_ntt_fft_wrap)
}
fft = ntt_fft_create(fft_params[_i]);
ck_assert(fft->get_size(fft) == n);
ck_assert(fft->get_modulus(fft) == q);
ck_assert(fft->get_modulus(fft) == q);
fft->transform(fft, x, X, FALSE);
for (j = 0; j < n; j++)
@ -92,7 +92,7 @@ START_TEST(test_ntt_fft_wrap)
}
y[j] = 0;
}
fft->destroy(fft);
fft->destroy(fft);
}
END_TEST

View File

@ -131,7 +131,7 @@ bliss_huffman_coder_t *bliss_huffman_coder_create(bliss_huffman_code_t *code,
},
.packer = packer,
.code = code,
.index_max = (2*code->n_z2 - 1) * code->n_z1,
.index_max = (2*code->n_z2 - 1) * code->n_z1,
);
return &this->public;

View File

@ -185,7 +185,7 @@ METHOD(bliss_sampler_t, gaussian, bool,
return FALSE;
}
if (x || y || u)
{
{
break;
}
}

View File

@ -102,7 +102,7 @@ METHOD(bliss_signature_t, get_encoding, chunk_t,
encoding = packer->extract_buf(packer);
DBG2(DBG_LIB, "efficiency of Huffman coder is %6.4f bits/tuple (%u bits)",
coder->get_bits(coder)/(double)(this->set->n),
coder->get_bits(coder)/(double)(this->set->n),
coder->get_bits(coder));
DBG2(DBG_LIB, "generated BLISS signature (%u bits encoded in %u bytes)",
packer->get_bits(packer), encoding.len);

View File

@ -65,7 +65,7 @@ METHOD(xof_t, get_bytes, bool,
}
/* copy whole stream blocks directly to output buffer */
blocks = (out_len - index) / CHACHA_BLOCK_SIZE;
blocks = (out_len - index) / CHACHA_BLOCK_SIZE;
while (blocks--)
{
if (!this->drv->chacha(this->drv, buffer + index))
@ -73,8 +73,8 @@ METHOD(xof_t, get_bytes, bool,
return FALSE;
}
index += CHACHA_BLOCK_SIZE;
}
}
/* refill the stream buffer if some more output bytes are needed */
len = out_len - index;
if (len)
@ -85,8 +85,8 @@ METHOD(xof_t, get_bytes, bool,
}
memcpy(buffer + index, this->stream, len);
this->stream_index = len;
}
}
return TRUE;
}

View File

@ -140,7 +140,7 @@ newhope_noise_t *newhope_noise_create(chunk_t seed)
{
DBG1(DBG_LIB, "could not instantiate ChaCha20 stream");
return NULL;
}
}
INIT(this,
.public = {

View File

@ -14,7 +14,7 @@
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
*
*/
#include "newhope_reconciliation.h"
@ -166,7 +166,7 @@ METHOD(newhope_reconciliation_t, reconcile, chunk_t,
i2 = i1 + this->n4;
i3 = i2 + this->n4;
tmp[0] = this->q16 + 8 * (int32_t)v[i0] -
tmp[0] = this->q16 + 8 * (int32_t)v[i0] -
this->q * (2*r[i0] + r[i3]);
tmp[1] = this->q16 + 8 * (int32_t)v[i1] -
this->q * (2*r[i1] + r[i3]);

View File

@ -35,7 +35,7 @@ struct newhope_reconciliation_t {
* Generate reconciliation polynomial
*
* @param v polynomial v
* @param rbits pseudo random bit array
* @param rbits pseudo random bit array
* @return return array with reconciliation polynomial
*/
uint8_t* (*help_reconcile)(newhope_reconciliation_t *this,

View File

@ -151,7 +151,7 @@ static noise_t noises[] = {
0x98, 0x10, 0x39, 0xce, 0x17, 0x66, 0xaa, 0x25, 0x42, 0xb0,
0x5d, 0xb3, 0xbd, 0x80, 0x9a, 0xb1, 0x42, 0x48, 0x9d, 0x5d,
0xbf, 0xe1, 0x27, 0x3e, 0x73, 0x99, 0x63, 0x7b, 0x4b, 0x32,
0x13, 0x76, 0x8a, 0xaa },
0x13, 0x76, 0x8a, 0xaa },
{ 12283, 1, 12288, 4, 0, 12285, 5, 1, 1, 2,
3, 4, 12288, 0, 3, 1, 1, 0, 12286, 6,
1, 0, 1, 0, 4, 2, 12288, 3, 0, 5,
@ -263,7 +263,7 @@ static noise_t noises[] = {
0xaa, 0x5a, 0x8e, 0xca, 0x00, 0xbb, 0xb4, 0xa7, 0x3b, 0xda,
0xd1, 0x92, 0xb5, 0xc4, 0x2f, 0x73, 0xf2, 0xfd, 0x4e, 0x27,
0x36, 0x44, 0xc8, 0xb3, 0x61, 0x25, 0xa6, 0x4a, 0xdd, 0xeb,
0x00, 0x6c, 0x13, 0xa0 },
0x00, 0x6c, 0x13, 0xa0 },
{ 5, 4, 4, 12288, 12286, 1, 12287, 12288, 2, 12288,
12288, 12287, 2, 2, 12284, 12288, 12288, 3, 2, 3,
12287, 2, 2, 0, 0, 2, 5, 12285, 5, 12287,
@ -366,7 +366,7 @@ static noise_t noises[] = {
0, 12287, 12288, 2, 12288, 12284, 12288, 12285, 4, 1,
12288, 12284, 12287, 4, 12284, 1, 3, 12284, 12282, 0,
12286, 12287, 2, 12286, 3, 4, 2, 12288, 3, 3,
1, 3, 12287, 12283 }
1, 3, 12287, 12283 }
},
{ 0x01, 0x01, /* polynomial e' */
{ 0x58, 0xd8, 0x6a, 0xcd, 0xe2, 0x79, 0x61, 0x98, 0xfd, 0xea,
@ -375,7 +375,7 @@ static noise_t noises[] = {
0x41, 0x2b, 0x78, 0x88, 0x58, 0x6d, 0x58, 0x47, 0x3e, 0xb7,
0x46, 0x60, 0xd8, 0x2f, 0xa0, 0x83, 0xe4, 0xbc, 0x81, 0xdd,
0xc6, 0x29, 0x8b, 0xee, 0xf9, 0xec, 0x90, 0x39, 0x9d, 0x46,
0xbf, 0x2d, 0x7c, 0xdf },
0xbf, 0x2d, 0x7c, 0xdf },
{ 12287, 3, 3, 1, 12285, 4, 1, 5, 12287, 12285,
12285, 12285, 1, 12288, 12287, 12288, 2, 3, 12283, 12288,
12285, 0, 0, 12286, 12287, 12288, 12288, 12288, 12288, 1,
@ -487,7 +487,7 @@ static noise_t noises[] = {
0xd1, 0x25, 0xf2, 0x84, 0xd7, 0xee, 0xd5, 0x53, 0x86, 0x5b,
0xa3, 0x93, 0x4e, 0xee, 0xc7, 0x5b, 0xe5, 0x52, 0x68, 0x19,
0xdf, 0x63, 0xfb, 0x91, 0x3d, 0xe9, 0x5d, 0xd6, 0xeb, 0x81,
0x3d, 0xac, 0xf1, 0xad },
0x3d, 0xac, 0xf1, 0xad },
{ 12286, 12286, 1, 12287, 1, 12286, 12287, 12287, 12284, 1,
12287, 2, 12284, 0, 2, 12288, 0, 1, 0, 12285,
12288, 4, 2, 12287, 12282, 12288, 12285, 12288, 2, 12288,

View File

@ -242,57 +242,57 @@ static uint8_t rbits[] = {
};
static uint8_t r_ref[] = {
0, 3, 3, 1, 1, 1, 0, 1, 0, 3, 2, 0, 1, 1, 3, 0, 2, 1, 0, 3,
2, 1, 2, 3, 3, 0, 2, 0, 1, 3, 3, 2, 3, 3, 0, 3, 0, 2, 2, 0,
1, 1, 2, 0, 1, 1, 2, 1, 3, 0, 0, 3, 1, 1, 0, 0, 0, 2, 0, 1,
0, 2, 3, 1, 3, 0, 3, 1, 0, 0, 2, 1, 3, 3, 1, 3, 2, 1, 0, 2,
0, 0, 3, 3, 0, 1, 2, 2, 0, 1, 0, 3, 2, 2, 1, 1, 3, 0, 3, 3,
2, 2, 0, 2, 1, 0, 0, 0, 3, 0, 3, 1, 2, 1, 1, 0, 3, 3, 2, 1,
3, 3, 2, 2, 1, 3, 0, 0, 2, 2, 3, 1, 1, 2, 2, 2, 0, 2, 0, 2,
0, 0, 1, 2, 2, 2, 3, 1, 2, 0, 3, 0, 1, 3, 2, 3, 3, 1, 1, 2,
0, 0, 2, 1, 2, 2, 0, 2, 2, 2, 2, 1, 1, 3, 1, 3, 3, 1, 2, 2,
3, 0, 1, 0, 0, 2, 2, 1, 3, 2, 2, 2, 3, 1, 1, 0, 0, 3, 2, 3,
0, 0, 3, 3, 2, 2, 2, 2, 1, 1, 0, 1, 2, 1, 3, 2, 0, 3, 0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0, 3, 0, 1, 2, 0, 2, 2, 3, 2, 0, 0, 0, 3, 0,
2, 0, 0, 2, 2, 2, 3, 1, 3, 2, 3, 2, 0, 1, 2, 1, 1, 3, 0, 3,
2, 0, 2, 2, 3, 2, 1, 0, 1, 1, 0, 2, 0, 3, 2, 0, 2, 3, 1, 3,
2, 2, 2, 2, 3, 1, 0, 2, 3, 3, 3, 2, 0, 0, 3, 3, 1, 2, 2, 3,
0, 1, 1, 1, 3, 2, 1, 0, 0, 1, 2, 3, 3, 0, 1, 1, 1, 1, 0, 1,
0, 2, 3, 3, 3, 3, 0, 2, 3, 0, 1, 0, 0, 1, 1, 3, 2, 2, 0, 0,
2, 2, 1, 3
};

View File

@ -91,7 +91,7 @@ void ntru_indices_2_trits(uint16_t in_len, uint16_t const *in, bool plus1,
uint8_t *out);
/**
* Unpacks an array of N trits and creates a list of array indices
* Unpacks an array of N trits and creates a list of array indices
* corresponding to trits = +1, and list of array indices corresponding to
* trits = -1.
*

View File

@ -321,7 +321,7 @@ ntru_poly_t *ntru_poly_create_from_seed(ext_out_function_t mgf1_type,
/* generate indices for a single polynomial */
while (num_indices)
{
/* generate a random candidate index with a size of c_bits */
/* generate a random candidate index with a size of c_bits */
do
{
if (!bitspender->get_bits(bitspender, c_bits, &index))

View File

@ -27,7 +27,7 @@ typedef struct ntru_poly_t ntru_poly_t;
#include <crypto/xofs/xof.h>
/**
* Implements a trinary polynomial storing the indices of non-zero coefficients
* Implements a trinary polynomial storing the indices of non-zero coefficients
*/
struct ntru_poly_t {

View File

@ -146,7 +146,7 @@ METHOD(ntru_private_key_t, get_encoding, chunk_t,
return this->encoding;
}
/**
/**
* Checks that the number of 0, +1, and -1 trinary ring elements meet or exceed
* a minimum weight.
*
@ -596,7 +596,7 @@ static bool ring_inv(uint16_t *a, uint16_t N, uint16_t q, uint16_t *t,
f[i] ^= g[i];
}
if (deg_c > deg_b)
{
{
deg_b = deg_c;
}
for (i = 0; i <= deg_c; i++)
@ -633,7 +633,7 @@ static bool ring_inv(uint16_t *a, uint16_t N, uint16_t q, uint16_t *t,
t[0] = t[0] + 2;
ring_mult_c(t2, t, N, q, a_inv);
}
return TRUE;
}
@ -692,7 +692,7 @@ ntru_private_key_t *ntru_private_key_create(ntru_drbg_t *drbg,
t = malloc(t_len);
t1 = t + 2 * params->N;
/* extend sparse private key polynomial f to N array elements */
/* extend sparse private key polynomial f to N array elements */
this->privkey->get_array(this->privkey, t1);
/* set mask for large modulus */
@ -707,7 +707,7 @@ ntru_private_key_t *ntru_private_key_create(ntru_drbg_t *drbg,
/* use the public key array as a temporary buffer */
t2 = this->pubkey;
/* find f^-1 in (Z/qZ)[X]/(X^N - 1) */
if (!ring_inv(t1, params->N, params->q, t, t2))
{
@ -743,7 +743,7 @@ ntru_private_key_t *ntru_private_key_create(ntru_drbg_t *drbg,
chunk_clear(&seed);
memwipe(t, t_len);
free(t);
/* generate private key encoding */
generate_encoding(this);
@ -821,7 +821,7 @@ ntru_private_key_t *ntru_private_key_create_from_data(ntru_drbg_t *drbg,
privkey_packed_indices_len <= privkey_packed_trits_len)
{
tag = NTRU_PRIVKEY_INDICES_TAG;
}
}
else
{
tag = NTRU_PRIVKEY_TRITS_TAG;
@ -858,7 +858,7 @@ ntru_private_key_t *ntru_private_key_create_from_data(ntru_drbg_t *drbg,
indices = malloc(2 * dF * sizeof(uint16_t));
/* unpack the private key */
privkey_packed = data.ptr + header_len + pubkey_packed_len;
privkey_packed = data.ptr + header_len + pubkey_packed_len;
if (tag == NTRU_PRIVKEY_TRITS_TAG)
{
ntru_packed_trits_2_indices(privkey_packed, params->N,

View File

@ -103,7 +103,7 @@ ntru_trits_t *ntru_trits_create(size_t len, ext_out_function_t alg,
return NULL;
}
if (octet < 243) /* 243 = 3^5 */
{
{
ntru_octet_2_trits(octet, (trits_needed < 5) ? buf : trits);
if (trits_needed < 5)
{

View File

@ -27,7 +27,7 @@ typedef struct ntru_trits_t ntru_trits_t;
#include <crypto/xofs/xof.h>
/**
* Implements an array of trinary elements (trits)
* Implements an array of trinary elements (trits)
*/
struct ntru_trits_t {

View File

@ -16,7 +16,7 @@
#include <crypto/crypto_tester.h>
/**
* ChaCha20 Stream Test Vector from RFC 7539, Section 2.3.2
* ChaCha20 Stream Test Vector from RFC 7539, Section 2.3.2
*/
xof_test_vector_t chacha20_xof_1 = {
.alg = XOF_CHACHA20, .len = 44,
@ -31,7 +31,7 @@ xof_test_vector_t chacha20_xof_1 = {
};
/**
* ChaCha20 Stream Test Vector from RFC 7539, Section 2.4.2
* ChaCha20 Stream Test Vector from RFC 7539, Section 2.4.2
*/
xof_test_vector_t chacha20_xof_2 = {
.alg = XOF_CHACHA20, .len = 44,
@ -50,7 +50,7 @@ xof_test_vector_t chacha20_xof_2 = {
};
/**
* ChaCha20 Stream Test Vector #2 from RFC 7539, Section A1.
* ChaCha20 Stream Test Vector #2 from RFC 7539, Section A1.
*/
xof_test_vector_t chacha20_xof_3 = {
.alg = XOF_CHACHA20, .len = 44,
@ -65,7 +65,7 @@ xof_test_vector_t chacha20_xof_3 = {
};
/**
* ChaCha20 Stream Test Vector #3 from RFC 7539, Section A1.
* ChaCha20 Stream Test Vector #3 from RFC 7539, Section A1.
*/
xof_test_vector_t chacha20_xof_4 = {
.alg = XOF_CHACHA20, .len = 44,

View File

@ -125,7 +125,7 @@ static const asn1Object_t defaultObjects[] = {
{ 1, "explicit int1", ASN1_CONTEXT_C_1, ASN1_DEF }, /* 1 */
{ 2, "int1", ASN1_INTEGER, ASN1_BODY }, /* 2 */
{ 1, "int2", ASN1_INTEGER, ASN1_DEF|ASN1_BODY }, /* 3 */
{ 1, "implicit int3", ASN1_CONTEXT_S_3, ASN1_DEF|ASN1_BODY }, /* 4 */
{ 1, "implicit int3", ASN1_CONTEXT_S_3, ASN1_DEF|ASN1_BODY }, /* 4 */
{ 0, "exit", ASN1_EOC, ASN1_EXIT }
};
@ -204,7 +204,7 @@ static const asn1Object_t optionObjects[] = {
{ 1, "end opt", ASN1_EOC, ASN1_END }, /* 4 */
{ 1, "int2", ASN1_INTEGER, ASN1_OPT|ASN1_BODY }, /* 5 */
{ 1, "end opt", ASN1_EOC, ASN1_END }, /* 6 */
{ 1, "implicit int3", ASN1_CONTEXT_S_3, ASN1_OPT|ASN1_BODY }, /* 7 */
{ 1, "implicit int3", ASN1_CONTEXT_S_3, ASN1_OPT|ASN1_BODY }, /* 7 */
{ 1, "end opt", ASN1_EOC, ASN1_END }, /* 8 */
{ 0, "exit", ASN1_EOC, ASN1_EXIT }
};

View File

@ -78,7 +78,7 @@ static crypter_aead_t aead[] = {
{ ENCR_AES_CBC, FALSE },
{ ENCR_CAMELLIA_CBC, FALSE }
};
START_TEST(test_crypter_is_aead)
{
ck_assert(encryption_algorithm_is_aead(aead[_i].alg) == aead[_i].is_aead);

View File

@ -443,7 +443,7 @@ static status_t process_tnc_msg(private_pb_tnc_batch_t *this)
}
if (msg_len < msg_infos[msg_type].min_size ||
(msg_infos[msg_type].exact_size &&
(msg_infos[msg_type].exact_size &&
msg_len != msg_infos[msg_type].min_size))
{
DBG1(DBG_TNC, "%N/%N message length must be %s %u bytes but is %u bytes",

View File

@ -104,7 +104,7 @@ struct pb_error_msg_t {
*/
pb_tnc_msg_t* pb_error_msg_create(bool fatal, uint32_t vendor_id,
pb_tnc_error_code_t error_code);
/**
* Create a PB-Error message from parameters with offset field
*

View File

@ -80,7 +80,7 @@ struct pb_pa_msg_t {
* Create a PB-PA message from parameters
*
* @param vendor_id PA Message Vendor ID
* @param subtype PA Subtype
* @param subtype PA Subtype
* @param collector_id Posture Collector ID
* @param validator_id Posture Validator ID
* @param excl Exclusive Flag

View File

@ -62,7 +62,7 @@ typedef struct private_pb_pdp_referral_msg_t private_pb_pdp_referral_msg_t;
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
* Section 3.1.1.2.3 IPv6 Identifier
*
*
* 0 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
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

View File

@ -92,7 +92,7 @@ pb_tnc_msg_t* pb_pdp_referral_msg_create(pen_type_t identifier_type,
* Create a PB-PDP-Referral message of TCG Type PDP FQDN Identifier
*
* @param fqdn Fully Qualified Domain Name of PDP
* @param port PT-TLS port the PDP is listening on
* @param port PT-TLS port the PDP is listening on
*/
pb_tnc_msg_t* pb_pdp_referral_msg_create_from_fqdn(chunk_t fqdn, uint16_t port);

View File

@ -144,7 +144,7 @@ METHOD(tncif_identity_t, process, bool,
reader->read_uint8 (reader, &reserved);
reader->read_uint24(reader, &vendor_id);
reader->read_uint32(reader, &type);
this->subject_type = pen_type_create(vendor_id, type);
this->subject_type = pen_type_create(vendor_id, type);
reader->read_uint8 (reader, &reserved);
reader->read_uint24(reader, &vendor_id);

View File

@ -75,7 +75,7 @@ tpm_rng_t *tpm_rng_create(rng_quality_t quality)
if (!tpm)
{
DBG1(DBG_LIB, "no TPM 2.0 found");
return NULL;
return NULL;
}
INIT(this,

View File

@ -104,7 +104,7 @@ ENUM_END(tpm_ecc_curve_names, TPM_ECC_SM2_P256);
#else /* TSS_TSS2_V1 */
#ifndef TSS_TSS2_V2
#ifndef TSS_TSS2_V2
/**
* TPM 2.0 algorithm ID names

View File

@ -2,16 +2,16 @@
<?cs each:peercfg = peercfgs ?>
<div class="expand" id="peercfg-<?cs name:peercfg ?>">
<h1><?cs name:peercfg ?>:
<span><?cs var:peercfg.local ?></span> &lt;-&gt;
<span><?cs var:peercfg.remote ?></span>
<span><?cs var:peercfg.local ?></span> &lt;-&gt;
<span><?cs var:peercfg.remote ?></span>
</h1>
<div class="controls">
<?cs if:peercfg.remote != "%any" ?>
<a title="initiate SA" href="<?cs var:base ?>/control/initiateike/<?cs name:peercfg ?>">
<img src="<?cs var:base ?>/static/initiate.png"/>
</a>
<?cs else ?>
&nbsp;
<?cs else ?>
&nbsp;
<?cs /if ?>
</div>
<div class="expander">
@ -79,9 +79,9 @@
<tr class="images">
<td colspan="2">
<?cs each:net = childcfg.local.networks ?>
<p><?cs var:net ?></p>
<p><?cs var:net ?></p>
<?cs /each ?>
</td>
</td>
<td style="background-image:url(<?cs var:base ?>/static/pipe-thin-left.png)">
<br/><br/><br/>
</td>

View File

@ -1,4 +1,4 @@
</div>
</div>
</div>
</body>
</html>

View File

@ -1,4 +1,4 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

View File

@ -2,9 +2,9 @@
<?cs each:ikesa = ikesas ?>
<div class="expand" id="ikesa-<?cs name:ikesa ?>">
<h1>
<?cs var:ikesa.peerconfig ?> [IKE #<?cs name:ikesa ?>]:
<span><?cs var:ikesa.local.identification ?></span> &lt;-&gt;
<span><?cs var:ikesa.remote.identification ?></span>
<?cs var:ikesa.peerconfig ?> [IKE #<?cs name:ikesa ?>]:
<span><?cs var:ikesa.local.identification ?></span> &lt;-&gt;
<span><?cs var:ikesa.remote.identification ?></span>
</h1>
<div class="controls">
<a title="close IKE_SA" href="<?cs var:base ?>/control/terminateike/<?cs name:ikesa ?>">
@ -33,8 +33,8 @@
<?cs /if ?>
</td>
<td style="background-image:url(<?cs var:base ?>/static/pipe.png)">
<?cs var:ikesa.local.spi ?><br/><br/><br/>
<?cs var:ikesa.local.address ?>
<?cs var:ikesa.local.spi ?><br/><br/><br/>
<?cs var:ikesa.local.address ?>
</td>
<td>
<?cs if:ikesa.local.nat == "true" ?>
@ -58,8 +58,8 @@
<?cs /if ?>
</td>
<td class="right" style="background-image:url(<?cs var:base ?>/static/pipe.png)">
<?cs var:ikesa.remote.spi ?><br/><br/><br/>
<?cs var:ikesa.remote.address ?>
<?cs var:ikesa.remote.spi ?><br/><br/><br/>
<?cs var:ikesa.remote.address ?>
</td>
<td>
<?cs if:ikesa.role == "responder" ?>
@ -71,11 +71,11 @@
</tr>
<?cs each:childsa = ikesa.childsas ?>
<tr>
<td colspan="6" class="expand">
<h1><?cs var:childsa.childconfig ?> [IPsec #<?cs name:childsa ?>]:</h1>
<td colspan="6" class="expand">
<h1><?cs var:childsa.childconfig ?> [IPsec #<?cs name:childsa ?>]:</h1>
</td>
<td class="controls">
<a title="close CHILD_SA" href="<?cs var:base ?>/control/terminatechild/<?cs name:childsa ?>">
<td class="controls">
<a title="close CHILD_SA" href="<?cs var:base ?>/control/terminatechild/<?cs name:childsa ?>">
<img src="<?cs var:base ?>/static/close.png"/>
</a>
</td>
@ -84,24 +84,24 @@
<td colspan="7"><hr/></td>
</tr>
<tr class="images">
<td colspan="2">
<td colspan="2">
<?cs each:net = childsa.local.networks ?>
<p><?cs var:net ?></p>
<p><?cs var:net ?></p>
<?cs /each ?>
</td>
<td style="background-image:url(<?cs var:base ?>/static/pipe-thin-left-green.png)">
</td>
<td style="background-image:url(<?cs var:base ?>/static/pipe-thin-left-green.png)">
<?cs var:childsa.local.spi ?> &lt;-<br/><br/><br/>
</td>
<td style="background-image:url(<?cs var:base ?>/static/pipe-thin-green.png)">
</td>
<td class="right" style="background-image:url(<?cs var:base ?>/static/pipe-thin-right-green.png)">
</td>
<td style="background-image:url(<?cs var:base ?>/static/pipe-thin-green.png)">
</td>
<td class="right" style="background-image:url(<?cs var:base ?>/static/pipe-thin-right-green.png)">
-&gt; <?cs var:childsa.remote.spi ?><br/><br/><br/>
</td>
<td class="right" colspan="2">
</td>
<td class="right" colspan="2">
<?cs each:net = childsa.remote.networks ?>
<p><?cs var:net ?></p>
<p><?cs var:net ?></p>
<?cs /each ?>
</td>
</td>
</tr>
<?cs /each ?>
</table>

File diff suppressed because it is too large Load Diff

View File

@ -39,7 +39,7 @@ a {
h1 {
margin-top: 1em;
}
hr {

View File

@ -1,4 +1,4 @@
</div>
</div>
</div>
</body>
</html>

View File

@ -16,7 +16,7 @@
</div>
<div class="menu">
<?cs if:?login ?>
Logged in as <i><?cs var:login ?></i>
Logged in as <i><?cs var:login ?></i>
| <a href="<?cs var:base ?>/user/edit">Edit</a>
| <a href="<?cs var:base ?>/user/logout">Logout</a>
| <a href="<?cs var:base ?>/user/help">Help</a>

View File

@ -15,7 +15,7 @@
<tr>
<td></td>
<td class="right">
<input type="submit" value="Back" name="back"/>
<input type="submit" value="Back" name="back"/>
<input type="submit" value="Add" name="add"/>
</td>
</tr>

View File

@ -16,7 +16,7 @@
<td></td>
<td align="right">
<input type="submit" value="Back" name="back"/>
<input type="submit" value="Delete" name="delete" onclick="return confirm('Permanently delete this peer?')"/>
<input type="submit" value="Delete" name="delete" onclick="return confirm('Permanently delete this peer?')"/>
<input type="submit" value="Save" name="save"/>
</td>
</tr>

View File

@ -25,8 +25,8 @@
<tr>
<td></td>
<td class="right">
<input type="submit" value="Back" name="back"/>
<input type="submit" value="Delete" name="delete" onclick="return confirm('Permanently delete your account?')"/>
<input type="submit" value="Back" name="back"/>
<input type="submit" value="Delete" name="delete" onclick="return confirm('Permanently delete your account?')"/>
<input type="submit" value="Save" name="save"/>
</td>
</tr>

View File

@ -1,6 +1,6 @@
if !USE_WINDOWS
sbin_PROGRAMS = sec-updater
sbin_PROGRAMS = sec-updater
AM_CPPFLAGS = \
-I$(top_srcdir)/src/libstrongswan \

View File

@ -98,7 +98,7 @@ METHOD(enumerator_t, enumerator_destroy, void,
dpkg_enumerator_t *this)
{
pclose(this->file);
free(this);
free(this);
}
METHOD(sw_collector_dpkg_t, create_sw_enumerator, enumerator_t*,

View File

@ -55,11 +55,11 @@ struct sw_collector_history_t {
char *buf);
/**
* Extract packages from event in installation history
* Extract packages from event in installation history
*
* @param args Arguments to be processed
* @param eid Primary key pointing to current event
* @param op Extraction operation
* @param op Extraction operation
* @return TRUE if extraction succeeded
*/
bool (*extract_packages)(sw_collector_history_t *this, chunk_t args,

View File

@ -109,7 +109,7 @@ METHOD(enumerator_t, enumerator_destroy, void,
json_array_enumerator_t *this)
{
json_object_put(this->jarray);
free(this);
free(this);
}
METHOD(sw_collector_rest_api_t, create_sw_enumerator, enumerator_t*,

View File

@ -48,7 +48,7 @@ CALLBACK(authority_list, int,
if (streq(name, "crl_uris"))
{
printf(" %s %.*s\n",
(*labeled & LABELED_CRL_URI) ? " " : "crl_uris: ",
(*labeled & LABELED_CRL_URI) ? " " : "crl_uris: ",
len, value);
*labeled |= LABELED_CRL_URI;
}

View File

@ -56,7 +56,7 @@ do
execute_chroot "chgrp www-data /etc/pts" 0
execute_chroot "chmod g+w /etc/pts" 0
fi
if [ "$host" = "winnetou" ]
if [ "$host" = "winnetou" ]
then
execute "mkdir $LOOPDIR/var/log/apache2/ocsp" 0
execute "cp -rf $DIR/../images $LOOPDIR/var/www/" 0

View File

@ -183,21 +183,21 @@ running_any()
function searchandreplace {
SEARCHSTRING="$1"
REPLACESTRING="$2"
DESTDIR="$3"
SEARCHSTRING="$1"
REPLACESTRING="$2"
DESTDIR="$3"
[ -d "$DESTDIR" ] || die "$DESTDIR is not a directory!"
[ -d "$DESTDIR" ] || die "$DESTDIR is not a directory!"
###########################################
# search and replace in each found file the
# given string
#
###########################################
# search and replace in each found file the
# given string
#
for eachfoundfile in `find $DESTDIR -type f`
do
sed -i -e "s/$SEARCHSTRING/$REPLACESTRING/g" "$eachfoundfile"
done
for eachfoundfile in `find $DESTDIR -type f`
do
sed -i -e "s/$SEARCHSTRING/$REPLACESTRING/g" "$eachfoundfile"
done
}

View File

@ -45,37 +45,37 @@ cp -rfp $DEFAULTTESTSDIR/${testname}/* $TESTDIR
for host in $STRONGSWANHOSTS
do
eval ipv4_${host}="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
eval ipv6_${host}="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
eval ipv4_${host}="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
eval ipv6_${host}="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
case $host in
moon)
eval ipv4_moon1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_moon1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;;
sun)
eval ipv4_sun1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_sun1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;;
alice)
eval ipv4_alice1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_alice1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;;
venus)
;;
bob)
;;
carol)
eval ipv4_carol1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_carol1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;;
dave)
eval ipv4_dave1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_dave1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;;
winnetou)
;;
esac
case $host in
moon)
eval ipv4_moon1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_moon1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;;
sun)
eval ipv4_sun1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_sun1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;;
alice)
eval ipv4_alice1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_alice1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;;
venus)
;;
bob)
;;
carol)
eval ipv4_carol1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_carol1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;;
dave)
eval ipv4_dave1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
eval ipv6_dave1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
;;
winnetou)
;;
esac
done
##############################################################################
@ -84,50 +84,50 @@ done
for host in $STRONGSWANHOSTS
do
case $host in
moon)
searchandreplace PH_IP_MOON1 $ipv4_moon1 $TESTDIR
searchandreplace PH_IP_MOON $ipv4_moon $TESTDIR
searchandreplace PH_IP6_MOON1 $ipv6_moon1 $TESTDIR
searchandreplace PH_IP6_MOON $ipv6_moon $TESTDIR
;;
sun)
searchandreplace PH_IP_SUN1 $ipv4_sun1 $TESTDIR
searchandreplace PH_IP_SUN $ipv4_sun $TESTDIR
searchandreplace PH_IP6_SUN1 $ipv6_sun1 $TESTDIR
searchandreplace PH_IP6_SUN $ipv6_sun $TESTDIR
;;
alice)
searchandreplace PH_IP_ALICE1 $ipv4_alice1 $TESTDIR
searchandreplace PH_IP_ALICE $ipv4_alice $TESTDIR
searchandreplace PH_IP6_ALICE1 $ipv6_alice1 $TESTDIR
searchandreplace PH_IP6_ALICE $ipv6_alice $TESTDIR
;;
venus)
searchandreplace PH_IP_VENUS $ipv4_venus $TESTDIR
searchandreplace PH_IP6_VENUS $ipv6_venus $TESTDIR
;;
bob)
searchandreplace PH_IP_BOB $ipv4_bob $TESTDIR
searchandreplace PH_IPV6_BOB $ipv6_bob $TESTDIR
;;
carol)
searchandreplace PH_IP_CAROL1 $ipv4_carol1 $TESTDIR
searchandreplace PH_IP_CAROL $ipv4_carol $TESTDIR
searchandreplace PH_IP6_CAROL1 $ipv6_carol1 $TESTDIR
searchandreplace PH_IP6_CAROL $ipv6_carol $TESTDIR
;;
dave)
searchandreplace PH_IP_DAVE1 $ipv4_dave1 $TESTDIR
searchandreplace PH_IP_DAVE $ipv4_dave $TESTDIR
searchandreplace PH_IP6_DAVE1 $ipv6_dave1 $TESTDIR
searchandreplace PH_IP6_DAVE $ipv6_dave $TESTDIR
;;
winnetou)
searchandreplace PH_IP_WINNETOU $ipv4_winnetou $TESTDIR
searchandreplace PH_IP6_WINNETOU $ipv6_winnetou $TESTDIR
;;
esac
case $host in
moon)
searchandreplace PH_IP_MOON1 $ipv4_moon1 $TESTDIR
searchandreplace PH_IP_MOON $ipv4_moon $TESTDIR
searchandreplace PH_IP6_MOON1 $ipv6_moon1 $TESTDIR
searchandreplace PH_IP6_MOON $ipv6_moon $TESTDIR
;;
sun)
searchandreplace PH_IP_SUN1 $ipv4_sun1 $TESTDIR
searchandreplace PH_IP_SUN $ipv4_sun $TESTDIR
searchandreplace PH_IP6_SUN1 $ipv6_sun1 $TESTDIR
searchandreplace PH_IP6_SUN $ipv6_sun $TESTDIR
;;
alice)
searchandreplace PH_IP_ALICE1 $ipv4_alice1 $TESTDIR
searchandreplace PH_IP_ALICE $ipv4_alice $TESTDIR
searchandreplace PH_IP6_ALICE1 $ipv6_alice1 $TESTDIR
searchandreplace PH_IP6_ALICE $ipv6_alice $TESTDIR
;;
venus)
searchandreplace PH_IP_VENUS $ipv4_venus $TESTDIR
searchandreplace PH_IP6_VENUS $ipv6_venus $TESTDIR
;;
bob)
searchandreplace PH_IP_BOB $ipv4_bob $TESTDIR
searchandreplace PH_IPV6_BOB $ipv6_bob $TESTDIR
;;
carol)
searchandreplace PH_IP_CAROL1 $ipv4_carol1 $TESTDIR
searchandreplace PH_IP_CAROL $ipv4_carol $TESTDIR
searchandreplace PH_IP6_CAROL1 $ipv6_carol1 $TESTDIR
searchandreplace PH_IP6_CAROL $ipv6_carol $TESTDIR
;;
dave)
searchandreplace PH_IP_DAVE1 $ipv4_dave1 $TESTDIR
searchandreplace PH_IP_DAVE $ipv4_dave $TESTDIR
searchandreplace PH_IP6_DAVE1 $ipv6_dave1 $TESTDIR
searchandreplace PH_IP6_DAVE $ipv6_dave $TESTDIR
;;
winnetou)
searchandreplace PH_IP_WINNETOU $ipv4_winnetou $TESTDIR
searchandreplace PH_IP6_WINNETOU $ipv6_winnetou $TESTDIR
;;
esac
done
source $TESTDIR/test.conf
@ -138,11 +138,11 @@ source $TESTDIR/test.conf
if [ -d $TESTDIR/hosts ]
then
for host in `ls $TESTDIR/hosts`
do
eval HOSTLOGIN=root@\$ipv4_${host}
scp $SSHCONF -r $TESTDIR/hosts/$host/etc $HOSTLOGIN:/ > /dev/null 2>&1
done
for host in `ls $TESTDIR/hosts`
do
eval HOSTLOGIN=root@\$ipv4_${host}
scp $SSHCONF -r $TESTDIR/hosts/$host/etc $HOSTLOGIN:/ > /dev/null 2>&1
done
fi
@ -152,9 +152,9 @@ fi
for host in $IPSECHOSTS
do
eval HOSTLOGIN=root@\$ipv4_${host}
ssh $SSHCONF $HOSTLOGIN 'rm -f /var/log/auth.log /var/log/daemon.log; \
kill -SIGHUP `cat /var/run/rsyslogd.pid`' > /dev/null 2>&1
eval HOSTLOGIN=root@\$ipv4_${host}
ssh $SSHCONF $HOSTLOGIN 'rm -f /var/log/auth.log /var/log/daemon.log; \
kill -SIGHUP `cat /var/run/rsyslogd.pid`' > /dev/null 2>&1
done
@ -164,7 +164,7 @@ done
for host in $RADIUSHOSTS
do
eval HOSTLOGIN=root@\$ipv4_${host}
ssh $SSHCONF $HOSTLOGIN 'rm -f /var/log/daemon.log /var/log/freeradius/radius.log; \
kill -SIGHUP `cat /var/run/rsyslogd.pid`' > /dev/null 2>&1
eval HOSTLOGIN=root@\$ipv4_${host}
ssh $SSHCONF $HOSTLOGIN 'rm -f /var/log/daemon.log /var/log/freeradius/radius.log; \
kill -SIGHUP `cat /var/run/rsyslogd.pid`' > /dev/null 2>&1
done

View File

@ -32,10 +32,10 @@ TESTSDIR=$BUILDDIR/tests
if [ -d $TESTSDIR/${testname}/hosts ]
then
for host in `ls $TESTSDIR/${testname}/hosts`
do
eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
scp $SSHCONF -r $HOSTCONFIGDIR/${host}/etc $HOSTLOGIN:/ > /dev/null 2>&1
scp $SSHCONF -r $HOSTCONFIGDIR/default/etc $HOSTLOGIN:/ > /dev/null 2>&1
done
for host in `ls $TESTSDIR/${testname}/hosts`
do
eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
scp $SSHCONF -r $HOSTCONFIGDIR/${host}/etc $HOSTLOGIN:/ > /dev/null 2>&1
scp $SSHCONF -r $HOSTCONFIGDIR/default/etc $HOSTLOGIN:/ > /dev/null 2>&1
done
fi