Some whitespace fixes

Didn't change some of the larger testing scripts that use an inconsistent
indentation style.
laforge/swu
Tobias Brunner 3 years ago
parent 68346b6962
commit b9949e98c2
  1. 4
      Android.mk
  2. 2
      conf/options/imv_policy_manager.opt
  3. 14
      conf/plugins/imc-attestation.opt
  4. 2
      conf/plugins/imc-hcd.opt
  5. 8
      conf/plugins/imc-os.opt
  6. 6
      conf/plugins/tnccs-20.opt
  7. 46
      src/conftest/README
  8. 12
      src/ipsec/_ipsec.in
  9. 2
      src/libcharon/Android.mk
  10. 2
      src/libcharon/plugins/medsrv/test.sql
  11. 2
      src/libcharon/plugins/tnc_ifmap/tnc_ifmap_http.h
  12. 2
      src/libcharon/plugins/tnc_ifmap/tnc_ifmap_listener.h
  13. 2
      src/libcharon/plugins/tnc_ifmap/tnc_ifmap_plugin.c
  14. 2
      src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap_msg.h
  15. 4
      src/libcharon/plugins/vici/perl/Vici-Session/README.pod
  16. 2
      src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Message.pm
  17. 18
      src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Packet.pm
  18. 6
      src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Session.pm
  19. 2
      src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Transport.pm
  20. 8
      src/libcharon/plugins/vici/ruby/vici.gemspec.in
  21. 6
      src/libcharon/sa/eap/eap_inner_method.h
  22. 4
      src/libimcv/generic/generic_attr_bool.c
  23. 2
      src/libimcv/generic/generic_attr_bool.h
  24. 2
      src/libimcv/imv/imv_database.h
  25. 2
      src/libimcv/imv/imv_os_info.c
  26. 2
      src/libimcv/imv/imv_remediation_string.c
  27. 2
      src/libimcv/imv/imv_session_manager.h
  28. 2
      src/libimcv/imv/imv_workitem.c
  29. 8
      src/libimcv/imv/imv_workitem.h
  30. 2
      src/libimcv/plugins/imc_attestation/Makefile.am
  31. 8
      src/libimcv/plugins/imv_hcd/imv_hcd_agent.c
  32. 8
      src/libimcv/pts/components/pts_comp_evidence.h
  33. 2
      src/libimcv/pts/components/pts_component.h
  34. 2
      src/libimcv/pts/components/tcg/tcg_comp_func_name.h
  35. 2
      src/libimcv/pts/pts_dh_group.h
  36. 2
      src/libimcv/pts/pts_ima_event_list.h
  37. 4
      src/libimcv/pts/pts_meas_algo.h
  38. 4
      src/libimcv/swid_gen/swid_gen.c
  39. 2
      src/libimcv/swima/swima_collector.h
  40. 2
      src/libimcv/swima/swima_error.c
  41. 2
      src/libimcv/tcg/seg/tcg_seg_attr_seg_env.c
  42. 2
      src/libstrongswan/crypto/xofs/mgf1.h
  43. 6
      src/libstrongswan/math/libnttfft/ntt_fft.c
  44. 2
      src/libstrongswan/math/libnttfft/ntt_fft_params.c
  45. 2
      src/libstrongswan/math/libnttfft/ntt_fft_reduce.h
  46. 6
      src/libstrongswan/math/libnttfft/tests/suites/test_ntt_fft.c
  47. 2
      src/libstrongswan/plugins/bliss/bliss_huffman_coder.c
  48. 2
      src/libstrongswan/plugins/bliss/bliss_sampler.c
  49. 2
      src/libstrongswan/plugins/bliss/bliss_signature.c
  50. 10
      src/libstrongswan/plugins/chapoly/chapoly_xof.c
  51. 2
      src/libstrongswan/plugins/newhope/newhope_noise.c
  52. 4
      src/libstrongswan/plugins/newhope/newhope_reconciliation.c
  53. 2
      src/libstrongswan/plugins/newhope/newhope_reconciliation.h
  54. 10
      src/libstrongswan/plugins/newhope/tests/suites/test_newhope_noise.c
  55. 102
      src/libstrongswan/plugins/newhope/tests/suites/test_newhope_reconciliation.c
  56. 2
      src/libstrongswan/plugins/ntru/ntru_convert.h
  57. 2
      src/libstrongswan/plugins/ntru/ntru_poly.c
  58. 2
      src/libstrongswan/plugins/ntru/ntru_poly.h
  59. 16
      src/libstrongswan/plugins/ntru/ntru_private_key.c
  60. 2
      src/libstrongswan/plugins/ntru/ntru_trits.c
  61. 2
      src/libstrongswan/plugins/ntru/ntru_trits.h
  62. 8
      src/libstrongswan/plugins/test_vectors/test_vectors/chacha20_xof.c
  63. 4
      src/libstrongswan/tests/suites/test_asn1_parser.c
  64. 2
      src/libstrongswan/tests/suites/test_crypter.c
  65. 2
      src/libtnccs/plugins/tnccs_20/batch/pb_tnc_batch.c
  66. 2
      src/libtnccs/plugins/tnccs_20/messages/ietf/pb_error_msg.h
  67. 2
      src/libtnccs/plugins/tnccs_20/messages/ietf/pb_pa_msg.h
  68. 2
      src/libtnccs/plugins/tnccs_20/messages/tcg/pb_pdp_referral_msg.c
  69. 2
      src/libtnccs/plugins/tnccs_20/messages/tcg/pb_pdp_referral_msg.h
  70. 2
      src/libtncif/tncif_identity.c
  71. 2
      src/libtpmtss/plugins/tpm/tpm_rng.c
  72. 2
      src/libtpmtss/tpm_tss_tss2_names_v1.c
  73. 12
      src/manager/templates/config/list.cs
  74. 2
      src/manager/templates/footer.cs
  75. 2
      src/manager/templates/header.cs
  76. 46
      src/manager/templates/ikesa/list.cs
  77. 386
      src/manager/templates/static/jquery.js
  78. 2
      src/manager/templates/static/style.css
  79. 2
      src/medsrv/templates/footer.cs
  80. 2
      src/medsrv/templates/header.cs
  81. 2
      src/medsrv/templates/peer/add.cs
  82. 2
      src/medsrv/templates/peer/edit.cs
  83. 4
      src/medsrv/templates/user/edit.cs
  84. 2
      src/sec-updater/Makefile.am
  85. 2
      src/sw-collector/sw_collector_dpkg.c
  86. 4
      src/sw-collector/sw_collector_history.h
  87. 2
      src/sw-collector/sw_collector_rest_api.c
  88. 2
      src/swanctl/commands/list_authorities.c
  89. 2
      testing/scripts/build-guestimages
  90. 24
      testing/scripts/function.sh
  91. 172
      testing/scripts/load-testconfig
  92. 12
      testing/scripts/restore-defaults

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -51,12 +51,12 @@ enum imv_workitem_type_t {
extern enum_name_t *imv_workitem_type_names;
/**
* IMV database interface
* IMV database interface
*/
struct imv_workitem_t {
/**
* Get primary workitem key
* Get primary workitem key
*
* @return Primary workitem key
*/
@ -104,7 +104,7 @@ struct imv_workitem_t {
* @param eval Evaluation Result
* @return Action Recommendation
*/
TNC_IMV_Action_Recommendation (*set_result)(imv_workitem_t *this,
TNC_IMV_Action_Recommendation (*set_result)(imv_workitem_t *this,
char *result, TNC_IMV_Evaluation_Result eval);
/**
@ -113,7 +113,7 @@ struct imv_workitem_t {
* @param result Result string
* @return Action Recommendatino
*/
TNC_IMV_Action_Recommendation (*get_result)(imv_workitem_t *this,
TNC_IMV_Action_Recommendation (*get_result)(imv_workitem_t *this,
char **result);
/**

@ -2,7 +2,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/libstrongswan \
-I$(top_srcdir)/src/libtncif \
-I$(top_srcdir)/src/libimcv \
-I$(top_srcdir)/src/libtpmtss
-I$(top_srcdir)/src/libtpmtss
AM_CFLAGS = \
$(PLUGIN_CFLAGS)

@ -176,7 +176,7 @@ static TNC_Result receive_msg(private_imv_hcd_agent_t *this, imv_state_t *state,
imv_msg_t *out_msg;
imv_hcd_state_t *hcd_state;
pa_tnc_attr_t *attr;
enum_name_t *pa_subtype_names;
enum_name_t *pa_subtype_names;
pen_type_t type, msg_type;
TNC_Result result;
bool fatal_error = FALSE, assessment = FALSE;
@ -328,7 +328,7 @@ static TNC_Result receive_msg(private_imv_hcd_agent_t *this, imv_state_t *state,
{
/* do not request user applications */
hcd_state->set_user_app_disabled(hcd_state);
}
}
break;
}
case PWG_HCD_FORWARDING_ENABLED:
@ -543,7 +543,7 @@ METHOD(imv_agent_if_t, batch_ending, TNC_Result,
/* Determine maximum PA-TNC attribute segment size */
max_seg_size = state->get_max_msg_len(state)
- PA_TNC_HEADER_SIZE
- PA_TNC_HEADER_SIZE
- PA_TNC_ATTR_HEADER_SIZE
- TCG_SEG_ATTR_SEG_ENV_HEADER
- PA_TNC_ATTR_HEADER_SIZE
@ -565,7 +565,7 @@ METHOD(imv_agent_if_t, batch_ending, TNC_Result,
TRUE);
out_msg->add_attribute(out_msg, attr);
hcd_state->set_subtype(hcd_state, msg_types[i].type);
hcd_state->set_subtype(hcd_state, msg_types[i].type);
received = state->get_action_flags(state);
if ((received & IMV_HCD_ATTR_MUST) != IMV_HCD_ATTR_MUST)

@ -48,7 +48,7 @@ enum pts_pcr_transform_t {
* PTS Component Evidence Validation Result Flags
*/
enum pts_comp_evid_validation_t {
/** No Validation was attempted */
/** No Validation was attempted */
PTS_COMP_EVID_VALIDATION_NONE = 0x00,
/** Attempted validation, unable to verify */
PTS_COMP_EVID_VALIDATION_UNABLE = 0x20,
@ -59,7 +59,7 @@ enum pts_comp_evid_validation_t {
};
/**
* PTS Functional Component Interface
* PTS Functional Component Interface
*/
struct pts_comp_evidence_t {
@ -140,7 +140,7 @@ struct pts_comp_evidence_t {
/**
* Creates a pts_comp_evidence_t object
*
*
* @param name Component Functional Name
* @param depth Sub-component depth
* @param extended_pcr PCR the measurement was extended into
@ -160,7 +160,7 @@ pts_comp_evidence_t* pts_comp_evidence_create(pts_comp_func_name_t *name,
/**
* Determine transform to fit measurement hash into PCR register
*
* @param algo Measurement hash algorithm
* @param algo Measurement hash algorithm
* @param pcr_len Length of the PCR registers in bytes
* @return PCR transform type
*/

@ -33,7 +33,7 @@ typedef struct pts_component_t pts_component_t;
#include <bio/bio_writer.h>
/**
* PTS Functional Component Interface
* PTS Functional Component Interface
*/
struct pts_component_t {

@ -29,7 +29,7 @@ typedef enum pts_tcg_comp_func_name_t pts_tcp_comp_func_name_t;
/**
* PTS Component Functional Name Qualifier Flags for the TCG namespace
* see section 5.2 of PTS Protocol: Binding to TNC IF-M Specification
*
*
* 0 1 2 3 4 5
* +-+-+-+-+-+-+
* |K|S| Type |

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -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, 2,
3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 1, 0, 2, 3, 2, 1, 2, 0, 3, 0,
2, 2, 1, 1, 2, 1, 2, 0, 1, 2, 1, 3, 0, 0, 2, 3, 0, 3, 1, 0,
2, 2, 2, 1, 2, 0, 3, 1, 0, 0, 3, 0, 2, 3, 1, 0, 2, 3, 3, 0,
0, 0, 3, 0, 2, 3, 2, 0, 2, 2, 1, 0, 1, 2, 1, 3, 3, 3, 1, 2,
1, 2, 3, 1, 1, 2, 2, 0, 3, 0, 3, 3, 1, 3, 3, 3, 1, 3, 0, 3,
0, 0, 1, 2, 1, 0, 3, 0, 0, 2, 1, 3, 3, 3, 1, 1, 2, 3, 1, 0,
1, 1, 3, 3, 0, 3, 1, 3, 1, 2, 2, 2, 1, 3, 1, 2, 1, 3, 0, 1,
2, 2, 2, 3, 3, 2, 2, 3, 1, 2, 2, 1, 2, 1, 0, 0, 0, 1, 3, 2,
0, 3, 1, 1, 2, 1, 3, 2, 3, 2, 0, 1, 0, 1, 3, 0, 2, 3, 1, 3,
0, 1, 1, 3, 1, 1, 1, 0, 2, 3, 2, 1, 2, 0, 3, 3, 2, 0, 1, 0,
3, 3, 3, 1, 2, 2, 1, 0, 3, 3, 0, 2, 3, 1, 1, 1, 3, 3, 1, 3,
3, 0, 1, 0, 2, 0, 1, 1, 0, 0, 3, 2, 2, 3, 0, 2, 2, 0, 1, 1,
1, 3, 1, 1, 1, 0, 1, 2, 3, 2, 2, 3, 1, 1, 3, 3, 3, 1, 2, 0,
0, 0, 2, 2, 2, 3, 2, 0, 0, 1, 3, 0, 0, 0, 2, 0, 1, 0, 3, 0,
3, 1, 0, 1, 1, 1, 2, 2, 2, 0, 0, 2, 2, 0, 3, 1, 0, 2, 2, 0,
2, 0, 0, 1, 1, 0, 1, 2, 3, 2, 3, 2, 3, 3, 3, 0, 2, 1, 2, 2,
1, 0, 1, 1, 1, 2, 1, 3, 2, 0, 3, 3, 0, 0, 1, 1, 1, 2, 2, 2,