diff --git a/Android.mk b/Android.mk index 0ca462ee3..69869dfe6 100644 --- a/Android.mk +++ b/Android.mk @@ -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 diff --git a/conf/options/imv_policy_manager.opt b/conf/options/imv_policy_manager.opt index 6ed0efc2a..82983e821 100644 --- a/conf/options/imv_policy_manager.opt +++ b/conf/options/imv_policy_manager.opt @@ -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. diff --git a/conf/plugins/imc-attestation.opt b/conf/plugins/imc-attestation.opt index 925ac4eaf..82af6b649 100644 --- a/conf/plugins/imc-attestation.opt +++ b/conf/plugins/imc-attestation.opt @@ -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. diff --git a/conf/plugins/imc-hcd.opt b/conf/plugins/imc-hcd.opt index d69b06c4a..e2e2f5d5d 100644 --- a/conf/plugins/imc-hcd.opt +++ b/conf/plugins/imc-hcd.opt @@ -6,7 +6,7 @@ libimcv.plugins.imc-hcd.subtypes libimcv.plugins.imc-hcd.subtypes.
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.
.attributes_natural_language = en Variable length natural language tag conforming to RFC 5646 specifies diff --git a/conf/plugins/imc-os.opt b/conf/plugins/imc-os.opt index 6c1da5e89..b72470ba2 100644 --- a/conf/plugins/imc-os.opt +++ b/conf/plugins/imc-os.opt @@ -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. diff --git a/conf/plugins/tnccs-20.opt b/conf/plugins/tnccs-20.opt index 8d16d1cb2..ccbb25876 100644 --- a/conf/plugins/tnccs-20.opt +++ b/conf/plugins/tnccs-20.opt @@ -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. diff --git a/src/conftest/README b/src/conftest/README index 404b2d1e5..ad3339835 100644 --- a/src/conftest/README +++ b/src/conftest/README @@ -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 diff --git a/src/ipsec/_ipsec.in b/src/ipsec/_ipsec.in index 29b323284..c1de833fb 100644 --- a/src/ipsec/_ipsec.in +++ b/src/ipsec/_ipsec.in @@ -100,8 +100,8 @@ down) shift if [ "$#" -ne 1 ] then - echo "Usage: $IPSEC_SCRIPT down " - exit 2 + echo "Usage: $IPSEC_SCRIPT down " + 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 []" - exit 2 + echo "Usage: $IPSEC_SCRIPT down-srcip []" + 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 " - exit 2 + echo "Usage: $IPSEC_SCRIPT up " + exit 2 fi rc=7 if [ -e $IPSEC_CHARON_PID ] diff --git a/src/libcharon/Android.mk b/src/libcharon/Android.mk index d1fb33702..cefab67cf 100644 --- a/src/libcharon/Android.mk +++ b/src/libcharon/Android.mk @@ -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)) diff --git a/src/libcharon/plugins/medsrv/test.sql b/src/libcharon/plugins/medsrv/test.sql index 8ba33647c..cd964300d 100644 --- a/src/libcharon/plugins/medsrv/test.sql +++ b/src/libcharon/plugins/medsrv/test.sql @@ -2,7 +2,7 @@ INSERT INTO `Peer` ( `IdPeer`, `IdUser`, `Alias`, `KeyId`, `PublicKey` ) VALUES ( - 1, 0, 'sidv150', + 1, 0, 'sidv150', X'ed90e64feca21f4b6897992422e0de21b9d62629', X'30820122300d06092a864886f70d01010105000382010f003082010a0282010100cd946c229f7d52b21da1cb5384e7dcaf6529f760534a56355efd49e87a9c6f1ddd5ff303bd7eb49c23de03adc487456f41eb5f92947bdc8ff8dbe443f8d112e0da2c98145e7c4d1cd15cddd08577f4d4f3d0a2e1da3c08c94cd819758751931e7a9724cc43d73a11b8e176a268b4cdbbf3995cb09723abc9bfc477c25e714a4661a84c078be7404d8986be55f20437e3a6b278a3cc89aec085941f1a1aafaf4b22ae146fe4684d5567dc30658a32087d01b98515070cb1653311cb6102f82a83c638c2a79985dbb9600752e9cbc272014a5c547b4ab59130c3a948658bff794b6f202cf95939ffa73b10521f05c060cecb15f8597ed95d72b9e405ee31f1b5d90203010001' ); diff --git a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_http.h b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_http.h index 3d3084744..25bd45a8f 100644 --- a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_http.h +++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_http.h @@ -15,7 +15,7 @@ /** * @defgroup tnc_ifmap_http tnc_ifmap_http - * @{ @ingroup tnc_ifmap + * @{ @ingroup tnc_ifmap */ #ifndef TNC_IFMAP_HTTP_H_ diff --git a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_listener.h b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_listener.h index 4ecccf4df..3ee26e15f 100644 --- a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_listener.h +++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_listener.h @@ -15,7 +15,7 @@ /** * @defgroup tnc_ifmap_listener tnc_ifmap_listener - * @{ @ingroup tnc_ifmap + * @{ @ingroup tnc_ifmap */ #ifndef TNC_IFMAP_LISTENER_H_ diff --git a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.c b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.c index 85ad49bd8..9927cafea 100644 --- a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.c +++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.c @@ -17,7 +17,7 @@ #include "tnc_ifmap_listener.h" #include - + typedef struct private_tnc_ifmap_plugin_t private_tnc_ifmap_plugin_t; /** diff --git a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap_msg.h b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap_msg.h index 4f809ba1a..9d6e25e7f 100644 --- a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap_msg.h +++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap_msg.h @@ -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_ diff --git a/src/libcharon/plugins/vici/perl/Vici-Session/README.pod b/src/libcharon/plugins/vici/perl/Vici-Session/README.pod index d19739709..1f5ff5962 100644 --- a/src/libcharon/plugins/vici/perl/Vici-Session/README.pod +++ b/src/libcharon/plugins/vici/perl/Vici-Session/README.pod @@ -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' ); diff --git a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Message.pm b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Message.pm index d0700fa97..8ea97c242 100644 --- a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Message.pm +++ b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Message.pm @@ -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 diff --git a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Packet.pm b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Packet.pm index 9e2b77fa5..09f5fc2e6 100644 --- a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Packet.pm +++ b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Packet.pm @@ -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 diff --git a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Session.pm b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Session.pm index 27c023e52..20207d195 100644 --- a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Session.pm +++ b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Session.pm @@ -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 diff --git a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Transport.pm b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Transport.pm index b0a7b6285..ae0e88a22 100644 --- a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Transport.pm +++ b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Transport.pm @@ -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 diff --git a/src/libcharon/plugins/vici/ruby/vici.gemspec.in b/src/libcharon/plugins/vici/ruby/vici.gemspec.in index 7a1e8ee56..8602ae14a 100644 --- a/src/libcharon/plugins/vici/ruby/vici.gemspec.in +++ b/src/libcharon/plugins/vici/ruby/vici.gemspec.in @@ -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" diff --git a/src/libcharon/sa/eap/eap_inner_method.h b/src/libcharon/sa/eap/eap_inner_method.h index 500852965..b2efe520b 100644 --- a/src/libcharon/sa/eap/eap_inner_method.h +++ b/src/libcharon/sa/eap/eap_inner_method.h @@ -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); }; diff --git a/src/libimcv/generic/generic_attr_bool.c b/src/libimcv/generic/generic_attr_bool.c index 5668b94fd..619a63819 100644 --- a/src/libimcv/generic/generic_attr_bool.c +++ b/src/libimcv/generic/generic_attr_bool.c @@ -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) diff --git a/src/libimcv/generic/generic_attr_bool.h b/src/libimcv/generic/generic_attr_bool.h index 93754bf9d..ac96c15da 100644 --- a/src/libimcv/generic/generic_attr_bool.h +++ b/src/libimcv/generic/generic_attr_bool.h @@ -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 { diff --git a/src/libimcv/imv/imv_database.h b/src/libimcv/imv/imv_database.h index d0b2db2b4..4e31c3422 100644 --- a/src/libimcv/imv/imv_database.h +++ b/src/libimcv/imv/imv_database.h @@ -32,7 +32,7 @@ typedef struct imv_database_t imv_database_t; /** - * IMV database interface + * IMV database interface */ struct imv_database_t { diff --git a/src/libimcv/imv/imv_os_info.c b/src/libimcv/imv/imv_os_info.c index dfab19434..c38d75ea8 100644 --- a/src/libimcv/imv/imv_os_info.c +++ b/src/libimcv/imv/imv_os_info.c @@ -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, diff --git a/src/libimcv/imv/imv_remediation_string.c b/src/libimcv/imv/imv_remediation_string.c index af82e1cdd..d7bfc461c 100644 --- a/src/libimcv/imv/imv_remediation_string.c +++ b/src/libimcv/imv/imv_remediation_string.c @@ -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))); } diff --git a/src/libimcv/imv/imv_session_manager.h b/src/libimcv/imv/imv_session_manager.h index cfae23bc9..7c335014e 100644 --- a/src/libimcv/imv/imv_session_manager.h +++ b/src/libimcv/imv/imv_session_manager.h @@ -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 { diff --git a/src/libimcv/imv/imv_workitem.c b/src/libimcv/imv/imv_workitem.c index 8784a0ccf..07c8c51fc 100644 --- a/src/libimcv/imv/imv_workitem.c +++ b/src/libimcv/imv/imv_workitem.c @@ -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, diff --git a/src/libimcv/imv/imv_workitem.h b/src/libimcv/imv/imv_workitem.h index 93a4b5874..2b4ebc030 100644 --- a/src/libimcv/imv/imv_workitem.h +++ b/src/libimcv/imv/imv_workitem.h @@ -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); /** diff --git a/src/libimcv/plugins/imc_attestation/Makefile.am b/src/libimcv/plugins/imc_attestation/Makefile.am index 14b1646e5..4f944975d 100644 --- a/src/libimcv/plugins/imc_attestation/Makefile.am +++ b/src/libimcv/plugins/imc_attestation/Makefile.am @@ -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) diff --git a/src/libimcv/plugins/imv_hcd/imv_hcd_agent.c b/src/libimcv/plugins/imv_hcd/imv_hcd_agent.c index e15eeb10a..bca195822 100644 --- a/src/libimcv/plugins/imv_hcd/imv_hcd_agent.c +++ b/src/libimcv/plugins/imv_hcd/imv_hcd_agent.c @@ -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) diff --git a/src/libimcv/pts/components/pts_comp_evidence.h b/src/libimcv/pts/components/pts_comp_evidence.h index 6178c2abd..ee7909178 100644 --- a/src/libimcv/pts/components/pts_comp_evidence.h +++ b/src/libimcv/pts/components/pts_comp_evidence.h @@ -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 */ diff --git a/src/libimcv/pts/components/pts_component.h b/src/libimcv/pts/components/pts_component.h index 1ca4458bf..286061a51 100644 --- a/src/libimcv/pts/components/pts_component.h +++ b/src/libimcv/pts/components/pts_component.h @@ -33,7 +33,7 @@ typedef struct pts_component_t pts_component_t; #include /** - * PTS Functional Component Interface + * PTS Functional Component Interface */ struct pts_component_t { diff --git a/src/libimcv/pts/components/tcg/tcg_comp_func_name.h b/src/libimcv/pts/components/tcg/tcg_comp_func_name.h index 9708ad09d..8200e4f00 100644 --- a/src/libimcv/pts/components/tcg/tcg_comp_func_name.h +++ b/src/libimcv/pts/components/tcg/tcg_comp_func_name.h @@ -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 | diff --git a/src/libimcv/pts/pts_dh_group.h b/src/libimcv/pts/pts_dh_group.h index f5d951e9a..6e8c989cc 100644 --- a/src/libimcv/pts/pts_dh_group.h +++ b/src/libimcv/pts/pts_dh_group.h @@ -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); diff --git a/src/libimcv/pts/pts_ima_event_list.h b/src/libimcv/pts/pts_ima_event_list.h index bf5478a51..9b7015392 100644 --- a/src/libimcv/pts/pts_ima_event_list.h +++ b/src/libimcv/pts/pts_ima_event_list.h @@ -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, diff --git a/src/libimcv/pts/pts_meas_algo.h b/src/libimcv/pts/pts_meas_algo.h index d70310679..36d0ab1f5 100644 --- a/src/libimcv/pts/pts_meas_algo.h +++ b/src/libimcv/pts/pts_meas_algo.h @@ -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| * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * + * */ /** diff --git a/src/libimcv/swid_gen/swid_gen.c b/src/libimcv/swid_gen/swid_gen.c index 206d41d11..94edf074d 100644 --- a/src/libimcv/swid_gen/swid_gen.c +++ b/src/libimcv/swid_gen/swid_gen.c @@ -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, diff --git a/src/libimcv/swima/swima_collector.h b/src/libimcv/swima/swima_collector.h index 848dc1696..2e0d32968 100644 --- a/src/libimcv/swima/swima_collector.h +++ b/src/libimcv/swima/swima_collector.h @@ -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); /** diff --git a/src/libimcv/swima/swima_error.c b/src/libimcv/swima/swima_error.c index bce4645f0..7f847d8c5 100644 --- a/src/libimcv/swima/swima_error.c +++ b/src/libimcv/swima/swima_error.c @@ -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 diff --git a/src/libimcv/tcg/seg/tcg_seg_attr_seg_env.c b/src/libimcv/tcg/seg/tcg_seg_attr_seg_env.c index 7cd585a04..46acf2adf 100644 --- a/src/libimcv/tcg/seg/tcg_seg_attr_seg_env.c +++ b/src/libimcv/tcg/seg/tcg_seg_attr_seg_env.c @@ -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; } diff --git a/src/libstrongswan/crypto/xofs/mgf1.h b/src/libstrongswan/crypto/xofs/mgf1.h index 5ad3a518a..f06fc293c 100644 --- a/src/libstrongswan/crypto/xofs/mgf1.h +++ b/src/libstrongswan/crypto/xofs/mgf1.h @@ -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); diff --git a/src/libstrongswan/math/libnttfft/ntt_fft.c b/src/libstrongswan/math/libnttfft/ntt_fft.c index f83dbfc7e..565af505f 100644 --- a/src/libstrongswan/math/libnttfft/ntt_fft.c +++ b/src/libstrongswan/math/libnttfft/ntt_fft.c @@ -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) { diff --git a/src/libstrongswan/math/libnttfft/ntt_fft_params.c b/src/libstrongswan/math/libnttfft/ntt_fft_params.c index 4daac272a..fc3afc224 100644 --- a/src/libstrongswan/math/libnttfft/ntt_fft_params.c +++ b/src/libstrongswan/math/libnttfft/ntt_fft_params.c @@ -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, diff --git a/src/libstrongswan/math/libnttfft/ntt_fft_reduce.h b/src/libstrongswan/math/libnttfft/ntt_fft_reduce.h index 5ff2b9588..b027fc04b 100644 --- a/src/libstrongswan/math/libnttfft/ntt_fft_reduce.h +++ b/src/libstrongswan/math/libnttfft/ntt_fft_reduce.h @@ -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; diff --git a/src/libstrongswan/math/libnttfft/tests/suites/test_ntt_fft.c b/src/libstrongswan/math/libnttfft/tests/suites/test_ntt_fft.c index 2a0f3bd55..d23b5bd39 100644 --- a/src/libstrongswan/math/libnttfft/tests/suites/test_ntt_fft.c +++ b/src/libstrongswan/math/libnttfft/tests/suites/test_ntt_fft.c @@ -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 diff --git a/src/libstrongswan/plugins/bliss/bliss_huffman_coder.c b/src/libstrongswan/plugins/bliss/bliss_huffman_coder.c index 018ae0efa..b894abf22 100644 --- a/src/libstrongswan/plugins/bliss/bliss_huffman_coder.c +++ b/src/libstrongswan/plugins/bliss/bliss_huffman_coder.c @@ -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; diff --git a/src/libstrongswan/plugins/bliss/bliss_sampler.c b/src/libstrongswan/plugins/bliss/bliss_sampler.c index fb29d6622..84de486a1 100644 --- a/src/libstrongswan/plugins/bliss/bliss_sampler.c +++ b/src/libstrongswan/plugins/bliss/bliss_sampler.c @@ -185,7 +185,7 @@ METHOD(bliss_sampler_t, gaussian, bool, return FALSE; } if (x || y || u) - { + { break; } } diff --git a/src/libstrongswan/plugins/bliss/bliss_signature.c b/src/libstrongswan/plugins/bliss/bliss_signature.c index f4e1bff30..948c6418d 100644 --- a/src/libstrongswan/plugins/bliss/bliss_signature.c +++ b/src/libstrongswan/plugins/bliss/bliss_signature.c @@ -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); diff --git a/src/libstrongswan/plugins/chapoly/chapoly_xof.c b/src/libstrongswan/plugins/chapoly/chapoly_xof.c index 2740a55b4..3b8127ef2 100644 --- a/src/libstrongswan/plugins/chapoly/chapoly_xof.c +++ b/src/libstrongswan/plugins/chapoly/chapoly_xof.c @@ -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; } diff --git a/src/libstrongswan/plugins/newhope/newhope_noise.c b/src/libstrongswan/plugins/newhope/newhope_noise.c index 5ba9f94bd..e7bcbe37f 100644 --- a/src/libstrongswan/plugins/newhope/newhope_noise.c +++ b/src/libstrongswan/plugins/newhope/newhope_noise.c @@ -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 = { diff --git a/src/libstrongswan/plugins/newhope/newhope_reconciliation.c b/src/libstrongswan/plugins/newhope/newhope_reconciliation.c index 4aed60e30..1021d10ec 100644 --- a/src/libstrongswan/plugins/newhope/newhope_reconciliation.c +++ b/src/libstrongswan/plugins/newhope/newhope_reconciliation.c @@ -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]); diff --git a/src/libstrongswan/plugins/newhope/newhope_reconciliation.h b/src/libstrongswan/plugins/newhope/newhope_reconciliation.h index 7cbf0d208..4c1239efc 100644 --- a/src/libstrongswan/plugins/newhope/newhope_reconciliation.h +++ b/src/libstrongswan/plugins/newhope/newhope_reconciliation.h @@ -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, diff --git a/src/libstrongswan/plugins/newhope/tests/suites/test_newhope_noise.c b/src/libstrongswan/plugins/newhope/tests/suites/test_newhope_noise.c index 96dd16787..7d5942a7e 100644 --- a/src/libstrongswan/plugins/newhope/tests/suites/test_newhope_noise.c +++ b/src/libstrongswan/plugins/newhope/tests/suites/test_newhope_noise.c @@ -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, diff --git a/src/libstrongswan/plugins/newhope/tests/suites/test_newhope_reconciliation.c b/src/libstrongswan/plugins/newhope/tests/suites/test_newhope_reconciliation.c index 4432e34d6..dec316a5d 100644 --- a/src/libstrongswan/plugins/newhope/tests/suites/test_newhope_reconciliation.c +++ b/src/libstrongswan/plugins/newhope/tests/suites/test_newhope_reconciliation.c @@ -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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2, 0, 2, 2, 3, 1, 0, + 3, 3, 1, 2, 3, 0, 1, 1, 0, 3, 3, 1, 1, 3, 0, 2, 1, 2, 2, 2, + 2, 3, 2, 3, 0, 0, 3, 1, 1, 0, 3, 2, 3, 2, 3, 3, 2, 2, 3, 1, + 3, 2, 1, 0, 1, 0, 2, 2, 1, 3, 1, 2, 3, 3, 1, 3, 2, 1, 3, 2, + 2, 3, 1, 1, 3, 3, 3, 3, 2, 0, 0, 3, 3, 3, 2, 3, 2, 0, 3, 0, + 3, 1, 2, 0, 3, 0, 2, 2, 2, 3, 1, 2, 2, 1, 3, 3, 0, 1, 3, 0, + 0, 1, 3, 2, 1, 1, 0, 1, 3, 3, 1, 1, 0, 1, 2, 2, 2, 0, 2, 3, + 1, 2, 1, 1, 3, 2, 3, 3, 1, 0, 1, 3, 2, 3, 2, 2, 1, 2, 3, 1, + 3, 2, 3, 1, 3, 3, 0, 3, 1, 1, 3, 2, 1, 2, 2, 0, 1, 1, 2, 3, + 1, 3, 0, 0, 3, 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 }; diff --git a/src/libstrongswan/plugins/ntru/ntru_convert.h b/src/libstrongswan/plugins/ntru/ntru_convert.h index 31594b1f6..25b2f6daf 100644 --- a/src/libstrongswan/plugins/ntru/ntru_convert.h +++ b/src/libstrongswan/plugins/ntru/ntru_convert.h @@ -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. * diff --git a/src/libstrongswan/plugins/ntru/ntru_poly.c b/src/libstrongswan/plugins/ntru/ntru_poly.c index b2fca2f7f..3ab5db409 100644 --- a/src/libstrongswan/plugins/ntru/ntru_poly.c +++ b/src/libstrongswan/plugins/ntru/ntru_poly.c @@ -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)) diff --git a/src/libstrongswan/plugins/ntru/ntru_poly.h b/src/libstrongswan/plugins/ntru/ntru_poly.h index 642384feb..b1bcc7588 100644 --- a/src/libstrongswan/plugins/ntru/ntru_poly.h +++ b/src/libstrongswan/plugins/ntru/ntru_poly.h @@ -27,7 +27,7 @@ typedef struct ntru_poly_t ntru_poly_t; #include /** - * 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 { diff --git a/src/libstrongswan/plugins/ntru/ntru_private_key.c b/src/libstrongswan/plugins/ntru/ntru_private_key.c index 642a35ca5..1acab3b15 100644 --- a/src/libstrongswan/plugins/ntru/ntru_private_key.c +++ b/src/libstrongswan/plugins/ntru/ntru_private_key.c @@ -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, diff --git a/src/libstrongswan/plugins/ntru/ntru_trits.c b/src/libstrongswan/plugins/ntru/ntru_trits.c index 0bbbcc178..17bd2ac02 100644 --- a/src/libstrongswan/plugins/ntru/ntru_trits.c +++ b/src/libstrongswan/plugins/ntru/ntru_trits.c @@ -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) { diff --git a/src/libstrongswan/plugins/ntru/ntru_trits.h b/src/libstrongswan/plugins/ntru/ntru_trits.h index e489aae7a..8e040ce29 100644 --- a/src/libstrongswan/plugins/ntru/ntru_trits.h +++ b/src/libstrongswan/plugins/ntru/ntru_trits.h @@ -27,7 +27,7 @@ typedef struct ntru_trits_t ntru_trits_t; #include /** - * Implements an array of trinary elements (trits) + * Implements an array of trinary elements (trits) */ struct ntru_trits_t { diff --git a/src/libstrongswan/plugins/test_vectors/test_vectors/chacha20_xof.c b/src/libstrongswan/plugins/test_vectors/test_vectors/chacha20_xof.c index 2c602c6a3..989c542da 100644 --- a/src/libstrongswan/plugins/test_vectors/test_vectors/chacha20_xof.c +++ b/src/libstrongswan/plugins/test_vectors/test_vectors/chacha20_xof.c @@ -16,7 +16,7 @@ #include /** - * 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, diff --git a/src/libstrongswan/tests/suites/test_asn1_parser.c b/src/libstrongswan/tests/suites/test_asn1_parser.c index ebbe7ddaf..36c9cc0d0 100644 --- a/src/libstrongswan/tests/suites/test_asn1_parser.c +++ b/src/libstrongswan/tests/suites/test_asn1_parser.c @@ -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 } }; diff --git a/src/libstrongswan/tests/suites/test_crypter.c b/src/libstrongswan/tests/suites/test_crypter.c index 321feedd1..644f41202 100644 --- a/src/libstrongswan/tests/suites/test_crypter.c +++ b/src/libstrongswan/tests/suites/test_crypter.c @@ -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); diff --git a/src/libtnccs/plugins/tnccs_20/batch/pb_tnc_batch.c b/src/libtnccs/plugins/tnccs_20/batch/pb_tnc_batch.c index 2663e3985..227fa8029 100644 --- a/src/libtnccs/plugins/tnccs_20/batch/pb_tnc_batch.c +++ b/src/libtnccs/plugins/tnccs_20/batch/pb_tnc_batch.c @@ -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", diff --git a/src/libtnccs/plugins/tnccs_20/messages/ietf/pb_error_msg.h b/src/libtnccs/plugins/tnccs_20/messages/ietf/pb_error_msg.h index 34fc20886..8fdc0d24c 100644 --- a/src/libtnccs/plugins/tnccs_20/messages/ietf/pb_error_msg.h +++ b/src/libtnccs/plugins/tnccs_20/messages/ietf/pb_error_msg.h @@ -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 * diff --git a/src/libtnccs/plugins/tnccs_20/messages/ietf/pb_pa_msg.h b/src/libtnccs/plugins/tnccs_20/messages/ietf/pb_pa_msg.h index f73f11627..91b803b19 100644 --- a/src/libtnccs/plugins/tnccs_20/messages/ietf/pb_pa_msg.h +++ b/src/libtnccs/plugins/tnccs_20/messages/ietf/pb_pa_msg.h @@ -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 diff --git a/src/libtnccs/plugins/tnccs_20/messages/tcg/pb_pdp_referral_msg.c b/src/libtnccs/plugins/tnccs_20/messages/tcg/pb_pdp_referral_msg.c index 7c518e8d5..3b50d9d98 100644 --- a/src/libtnccs/plugins/tnccs_20/messages/tcg/pb_pdp_referral_msg.c +++ b/src/libtnccs/plugins/tnccs_20/messages/tcg/pb_pdp_referral_msg.c @@ -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 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ diff --git a/src/libtnccs/plugins/tnccs_20/messages/tcg/pb_pdp_referral_msg.h b/src/libtnccs/plugins/tnccs_20/messages/tcg/pb_pdp_referral_msg.h index 0923c8ba4..8161b10b1 100644 --- a/src/libtnccs/plugins/tnccs_20/messages/tcg/pb_pdp_referral_msg.h +++ b/src/libtnccs/plugins/tnccs_20/messages/tcg/pb_pdp_referral_msg.h @@ -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); diff --git a/src/libtncif/tncif_identity.c b/src/libtncif/tncif_identity.c index 5eecb9cca..6a35b31ed 100644 --- a/src/libtncif/tncif_identity.c +++ b/src/libtncif/tncif_identity.c @@ -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); diff --git a/src/libtpmtss/plugins/tpm/tpm_rng.c b/src/libtpmtss/plugins/tpm/tpm_rng.c index d96bc4936..a31d6f04d 100644 --- a/src/libtpmtss/plugins/tpm/tpm_rng.c +++ b/src/libtpmtss/plugins/tpm/tpm_rng.c @@ -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, diff --git a/src/libtpmtss/tpm_tss_tss2_names_v1.c b/src/libtpmtss/tpm_tss_tss2_names_v1.c index d2a4b5b57..a9cbe99d4 100644 --- a/src/libtpmtss/tpm_tss_tss2_names_v1.c +++ b/src/libtpmtss/tpm_tss_tss2_names_v1.c @@ -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 diff --git a/src/manager/templates/config/list.cs b/src/manager/templates/config/list.cs index e71830d4d..547a4aee7 100644 --- a/src/manager/templates/config/list.cs +++ b/src/manager/templates/config/list.cs @@ -2,16 +2,16 @@

: - <-> - + <-> +

- -   + +  
@@ -79,9 +79,9 @@ -

+

- +


diff --git a/src/manager/templates/footer.cs b/src/manager/templates/footer.cs index db3601961..9b151ee89 100644 --- a/src/manager/templates/footer.cs +++ b/src/manager/templates/footer.cs @@ -1,4 +1,4 @@ -
+
diff --git a/src/manager/templates/header.cs b/src/manager/templates/header.cs index ee46dbb3c..5d174c4c8 100644 --- a/src/manager/templates/header.cs +++ b/src/manager/templates/header.cs @@ -1,4 +1,4 @@ - diff --git a/src/manager/templates/ikesa/list.cs b/src/manager/templates/ikesa/list.cs index f9a8e5c68..88a88c175 100644 --- a/src/manager/templates/ikesa/list.cs +++ b/src/manager/templates/ikesa/list.cs @@ -2,9 +2,9 @@

- [IKE #]: - <-> - + [IKE #]: + <-> +

@@ -33,8 +33,8 @@ -


- +


+ @@ -58,8 +58,8 @@ -


- +


+ @@ -71,11 +71,11 @@ - -

[IPsec #]:

+ +

[IPsec #]:

- -
+ + @@ -84,24 +84,24 @@
- + -

+

- - + + <-


- - - - + + + + ->


- - + + -

+

- + diff --git a/src/manager/templates/static/jquery.js b/src/manager/templates/static/jquery.js index dccc5be90..aad352b54 100644 --- a/src/manager/templates/static/jquery.js +++ b/src/manager/templates/static/jquery.js @@ -18,14 +18,14 @@ var jQuery = window.jQuery = function(a,c) { // If the context is global, return a new object if ( window == this || !this.init ) return new jQuery(a,c); - + return this.init(a,c); }; // Map over the $ in case of overwrite if ( typeof $ != "undefined" ) var _$ = $; - + // Map the jQuery namespace to the '$' one window.$ = jQuery; @@ -81,13 +81,13 @@ jQuery.fn = jQuery.prototype = { // HANDLE: $(*) [ a ] ); }, - + jquery: "1.2", size: function() { return this.length; }, - + length: 0, get: function( num ) { @@ -99,13 +99,13 @@ jQuery.fn = jQuery.prototype = { // Return just the object this[num]; }, - + pushStack: function( a ) { var ret = jQuery(a); ret.prevObject = this; return ret; }, - + setArray: function( a ) { this.length = 0; Array.prototype.push.apply( this, a ); @@ -126,7 +126,7 @@ jQuery.fn = jQuery.prototype = { attr: function( key, value, type ) { var obj = key; - + // Look for the case where we're accessing a style value if ( key.constructor == String ) if ( value == undefined ) @@ -135,7 +135,7 @@ jQuery.fn = jQuery.prototype = { obj = {}; obj[ key ] = value; } - + // Check to see if we're setting style values return this.each(function(index){ // Set all the styles @@ -206,7 +206,7 @@ jQuery.fn = jQuery.prototype = { this.insertBefore( a, this.firstChild ); }); }, - + before: function() { return this.domManip(arguments, false, 1, function(a){ this.parentNode.insertBefore( a, this ); @@ -234,7 +234,7 @@ jQuery.fn = jQuery.prototype = { var ret = this.map(function(){ return this.outerHTML ? jQuery(this.outerHTML)[0] : this.cloneNode(true); }); - + if (events === true) { var clone = ret.find("*").andSelf(); @@ -290,19 +290,19 @@ jQuery.fn = jQuery.prototype = { hasClass: function(expr) { return this.is("." + expr); }, - + val: function( val ) { if ( val == undefined ) { if ( this.length ) { var elem = this[0]; - + // We need to handle select boxes special if ( jQuery.nodeName(elem, "select") ) { var index = elem.selectedIndex, a = [], options = elem.options, one = elem.type == "select-one"; - + // Nothing was selected if ( index < 0 ) return null; @@ -313,18 +313,18 @@ jQuery.fn = jQuery.prototype = { if ( option.selected ) { // Get the specific value for the option var val = jQuery.browser.msie && !option.attributes["value"].specified ? option.text : option.value; - + // We don't need an array for one selects if ( one ) return val; - + // Multi-Selects return an array a.push(val); } } - + return a; - + // Everything else, we just grab the value } else return this[0].value.replace(/\r/g, ""); @@ -348,7 +348,7 @@ jQuery.fn = jQuery.prototype = { this.value = val; }); }, - + html: function( val ) { return val == undefined ? ( this.length ? this[0].innerHTML : null ) : @@ -372,9 +372,9 @@ jQuery.fn = jQuery.prototype = { andSelf: function() { return this.add( this.prevObject ); }, - + domManip: function(args, table, dir, fn) { - var clone = this.length > 1, a; + var clone = this.length > 1, a; return this.each(function(){ if ( !a ) { @@ -454,10 +454,10 @@ jQuery.extend({ // This may seem like some crazy code, but trust me when I say that this // is the only cross-browser way to do this. --John isFunction: function( fn ) { - return !!fn && typeof fn != "string" && !fn.nodeName && + return !!fn && typeof fn != "string" && !fn.nodeName && fn.constructor != Array && /function/i.test( fn + "" ); }, - + // check if an element is in a XML document isXMLDoc: function(elem) { return elem.documentElement && !elem.body || @@ -482,31 +482,31 @@ jQuery.extend({ nodeName: function( elem, name ) { return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); }, - + cache: {}, - + data: function( elem, name, data ) { elem = elem == window ? win : elem; var id = elem[ expando ]; // Compute a unique ID for the element - if ( !id ) + if ( !id ) id = elem[ expando ] = ++uuid; // Only generate the data cache if we're // trying to access or manipulate it if ( name && !jQuery.cache[ id ] ) jQuery.cache[ id ] = {}; - + // Prevent overriding the named cache with undefined values if ( data != undefined ) jQuery.cache[ id ][ name ] = data; - - // Return the named cache data, or the ID for the element + + // Return the named cache data, or the ID for the element return name ? jQuery.cache[ id ][ name ] : id; }, - + removeData: function( elem, name ) { elem = elem == window ? win : elem; @@ -558,18 +558,18 @@ jQuery.extend({ for ( var i in obj ) fn.call( obj[i], i, obj[i] ); else - for ( var i = 0, ol = obj.length, val = obj[0]; + for ( var i = 0, ol = obj.length, val = obj[0]; i < ol && fn.call(val,i,val) !== false; val = obj[++i] ){} } return obj; }, - + prop: function(elem, value, type, index, prop){ // Handle executable functions if ( jQuery.isFunction( value ) ) value = value.call( elem, [index] ); - + // exclude the following css properties to add px var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i; @@ -592,7 +592,7 @@ jQuery.extend({ remove: function( elem, c ){ elem.className = c != undefined ? jQuery.grep( elem.className.split(/\s+/), function(cur){ - return !jQuery.className.has( c, cur ); + return !jQuery.className.has( c, cur ); }).join(" ") : ""; }, @@ -668,7 +668,7 @@ jQuery.extend({ ret = jQuery.attr(elem.style, "opacity"); return ret == "" ? "1" : ret; } - + if (prop.match(/float/i)) prop = styleFloat; @@ -738,7 +738,7 @@ jQuery.extend({ return ret; }, - + clean: function(a, doc) { var r = []; doc = doc || document; @@ -748,7 +748,7 @@ jQuery.extend({ if ( arg.constructor == Number ) arg = arg.toString(); - + // Convert html string into DOM nodes if ( typeof arg == "string" ) { // Fix "XHTML"-style tags in all browsers @@ -763,43 +763,43 @@ jQuery.extend({ // option or optgroup !s.indexOf("", ""] || - + !s.indexOf("", ""] || - + s.match(/^<(thead|tbody|tfoot|colg|cap)/) && [1, "", "
"] || - + !s.indexOf("", ""] || - + // matched above (!s.indexOf("", ""] || - + !s.indexOf("", ""] || // IE can't serialize and