# 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
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.
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.
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
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.
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.
- conftest - an IKEv2 conformance testing framework
- =================================================
+ conftest - an IKEv2 conformance testing framework
+ =================================================
1. Introduction
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
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
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 ]
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 ]
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 ]
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))
INSERT INTO `Peer` (
`IdPeer`, `IdUser`, `Alias`, `KeyId`, `PublicKey`
) VALUES (
- 1, 0, 'sidv150',
+ 1, 0, 'sidv150',
X'ed90e64feca21f4b6897992422e0de21b9d62629',
X'30820122300d06092a864886f70d01010105000382010f003082010a0282010100cd946c229f7d52b21da1cb5384e7dcaf6529f760534a56355efd49e87a9c6f1ddd5ff303bd7eb49c23de03adc487456f41eb5f92947bdc8ff8dbe443f8d112e0da2c98145e7c4d1cd15cddd08577f4d4f3d0a2e1da3c08c94cd819758751931e7a9724cc43d73a11b8e176a268b4cdbbf3995cb09723abc9bfc477c25e714a4661a84c078be7404d8986be55f20437e3a6b278a3cc89aec085941f1a1aafaf4b22ae146fe4684d5567dc30658a32087d01b98515070cb1653311cb6102f82a83c638c2a79985dbb9600752e9cbc272014a5c547b4ab59130c3a948658bff794b6f202cf95939ffa73b10521f05c060cecb15f8597ed95d72b9e405ee31f1b5d90203010001'
);
/**
* @defgroup tnc_ifmap_http tnc_ifmap_http
- * @{ @ingroup tnc_ifmap
+ * @{ @ingroup tnc_ifmap
*/
#ifndef TNC_IFMAP_HTTP_H_
/**
* @defgroup tnc_ifmap_listener tnc_ifmap_listener
- * @{ @ingroup tnc_ifmap
+ * @{ @ingroup tnc_ifmap
*/
#ifndef TNC_IFMAP_LISTENER_H_
#include "tnc_ifmap_listener.h"
#include <daemon.h>
-
+
typedef struct private_tnc_ifmap_plugin_t private_tnc_ifmap_plugin_t;
/**
/**
* @defgroup tnc_ifmap_soap_msg tnc_ifmap_soap_msg
- * @{ @ingroup tnc_ifmap
+ * @{ @ingroup tnc_ifmap
*/
#ifndef TNC_IFMAP_SOAP_MSG_H_
"YeivMDc9hj0YLXA47ryQHTx4vB5Nv3TI/LoUG6VrCvZvocQOXe/n7TguwAjJj7ef" .
"E55Gy8lXDRENyJMP1vif3N2iH8eQ1ASf8k/+gnBNkjSlYSSQUDfV\n" .
"-----END RSA PRIVATE KEY-----\n";
-
+
my $moon_cert = "-----BEGIN CERTIFICATE-----\n" .
"MIIEIjCCAwqgAwIBAgIBKzANBgkqhkiG9w0BAQsFADBFMQswCQYDVQQGEwJDSDEZ" .
"MBcGA1UEChMQTGludXggc3Ryb25nU3dhbjEbMBkGA1UEAxMSc3Ryb25nU3dhbiBS" .
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' );
=head1 SYNOPSIS
- use Vici::Message;
+use Vici::Message;
=head1 DESCRIPTION
my $class = shift;
my $socket = shift;
my $self = {
- Transport => Vici::Transport->new($socket),
+ Transport => Vici::Transport->new($socket),
};
bless($self, $class);
return $self;
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);
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 )
{
=head1 SYNOPSIS
- use Vici::Packet;
+use Vici::Packet;
=head1 DESCRIPTION
}
sub reload_settings {
- return request_res('reload-settings', @_);
+ return request_res('reload-settings', @_);
}
sub initiate {
}
sub clear_creds {
- return request_res('clear-creds', @_);
+ return request_res('clear-creds', @_);
}
sub load_authority {
=head1 SYNOPSIS
- use Vici::Session;
+use Vici::Session;
=head1 DESCRIPTION
=head1 SYNOPSIS
- use Vici::Transport;
+use Vici::Transport;
=head1 DESCRIPTION
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"
/**
* 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 {
*
* @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);
};
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
enum_name_t *pa_attr_names;
bio_reader_t *reader;
uint32_t status;
-
+
*offset = 0;
if (this->value.len < this->length)
/**
* 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 {
typedef struct imv_database_t imv_database_t;
/**
- * IMV database interface
+ * IMV database interface
*/
struct imv_database_t {
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,
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)));
}
typedef struct imv_session_manager_t imv_session_manager_t;
/**
- * IMV session manager interface
+ * IMV session manager interface
*/
struct imv_session_manager_t {
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,
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
*/
* @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);
/**
* @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);
/**
-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)
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;
{
/* do not request user applications */
hcd_state->set_user_app_disabled(hcd_state);
- }
+ }
break;
}
case PWG_HCD_FORWARDING_ENABLED:
/* 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
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)
* 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,
};
/**
- * PTS Functional Component Interface
+ * PTS Functional Component Interface
*/
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
/**
* 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
*/
#include <bio/bio_writer.h>
/**
- * PTS Functional Component Interface
+ * PTS Functional Component Interface
*/
struct pts_component_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 |
* @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);
*
* @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,
* 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|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- *
+ *
*/
/**
/* 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,
* @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);
/**
*/
/**
- * 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
*this->value.ptr = flags;
memcpy(this->value.ptr + TCG_SEG_ATTR_SEG_ENV_HEADER,
segment.ptr, segment.len);
-
+
return &this->public.pa_tnc_attribute;
}
/**
* 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);
*
* x[i1] ---|+|------- x[i1]
* \/
- * /\ w[iw]
+ * /\ w[iw]
* x[i2] ---|-|--|*|-- x[i2]
*
*/
{
iw = s * (inverse ? (n - i * k) : (i * k));
butterfly(this, b, t + i, t + i + m, iw);
- }
+ }
}
t += 2*m;
}
/**
* 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)
{
* 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,
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;
x[i] = 0;
}
x[0] = 1;
-
+
fft = ntt_fft_create(fft_params[_i]);
fft->transform(fft, x, X, FALSE);
}
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++)
}
y[j] = 0;
}
- fft->destroy(fft);
+ fft->destroy(fft);
}
END_TEST
},
.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;
return FALSE;
}
if (x || y || u)
- {
+ {
break;
}
}
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);
}
/* 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))
return FALSE;
}
index += CHACHA_BLOCK_SIZE;
- }
-
+ }
+
/* refill the stream buffer if some more output bytes are needed */
len = out_len - index;
if (len)
}
memcpy(buffer + index, this->stream, len);
this->stream_index = len;
- }
-
+ }
+
return TRUE;
}
{
DBG1(DBG_LIB, "could not instantiate ChaCha20 stream");
return NULL;
- }
+ }
INIT(this,
.public = {
* 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"
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]);
* 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,
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,
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,
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,
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,
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,
};
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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1, 3, 2, 2, 0, 0,
2, 2, 1, 3
};
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.
*
/* 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))
#include <crypto/xofs/xof.h>
/**
- * Implements a trinary polynomial storing the indices of non-zero coefficients
+ * Implements a trinary polynomial storing the indices of non-zero coefficients
*/
struct ntru_poly_t {
return this->encoding;
}
-/**
+/**
* Checks that the number of 0, +1, and -1 trinary ring elements meet or exceed
* a minimum weight.
*
f[i] ^= g[i];
}
if (deg_c > deg_b)
- {
+ {
deg_b = deg_c;
}
for (i = 0; i <= deg_c; i++)
t[0] = t[0] + 2;
ring_mult_c(t2, t, N, q, a_inv);
}
-
+
return TRUE;
}
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 */
/* 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))
{
chunk_clear(&seed);
memwipe(t, t_len);
free(t);
-
+
/* generate private key encoding */
generate_encoding(this);
privkey_packed_indices_len <= privkey_packed_trits_len)
{
tag = NTRU_PRIVKEY_INDICES_TAG;
- }
+ }
else
{
tag = NTRU_PRIVKEY_TRITS_TAG;
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,
return NULL;
}
if (octet < 243) /* 243 = 3^5 */
- {
+ {
ntru_octet_2_trits(octet, (trits_needed < 5) ? buf : trits);
if (trits_needed < 5)
{
#include <crypto/xofs/xof.h>
/**
- * Implements an array of trinary elements (trits)
+ * Implements an array of trinary elements (trits)
*/
struct ntru_trits_t {
#include <crypto/crypto_tester.h>
/**
- * ChaCha20 Stream Test Vector from RFC 7539, Section 2.3.2
+ * ChaCha20 Stream Test Vector from RFC 7539, Section 2.3.2
*/
xof_test_vector_t chacha20_xof_1 = {
.alg = XOF_CHACHA20, .len = 44,
};
/**
- * 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,
};
/**
- * 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,
};
/**
- * 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,
{ 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 }
};
{ 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 }
};
{ 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);
}
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",
*/
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
*
* 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
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
* 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
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* 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);
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);
if (!tpm)
{
DBG1(DBG_LIB, "no TPM 2.0 found");
- return NULL;
+ return NULL;
}
INIT(this,
#else /* TSS_TSS2_V1 */
-#ifndef TSS_TSS2_V2
+#ifndef TSS_TSS2_V2
/**
* TPM 2.0 algorithm ID names
<?cs each:peercfg = peercfgs ?>
<div class="expand" id="peercfg-<?cs name:peercfg ?>">
<h1><?cs name:peercfg ?>:
- <span><?cs var:peercfg.local ?></span> <->
- <span><?cs var:peercfg.remote ?></span>
+ <span><?cs var:peercfg.local ?></span> <->
+ <span><?cs var:peercfg.remote ?></span>
</h1>
<div class="controls">
<?cs if:peercfg.remote != "%any" ?>
<a title="initiate SA" href="<?cs var:base ?>/control/initiateike/<?cs name:peercfg ?>">
<img src="<?cs var:base ?>/static/initiate.png"/>
</a>
- <?cs else ?>
-
+ <?cs else ?>
+
<?cs /if ?>
</div>
<div class="expander">
<tr class="images">
<td colspan="2">
<?cs each:net = childcfg.local.networks ?>
- <p><?cs var:net ?></p>
+ <p><?cs var:net ?></p>
<?cs /each ?>
- </td>
+ </td>
<td style="background-image:url(<?cs var:base ?>/static/pipe-thin-left.png)">
<br/><br/><br/>
</td>
- </div>
+ </div>
</div>
</body>
</html>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?cs each:ikesa = ikesas ?>
<div class="expand" id="ikesa-<?cs name:ikesa ?>">
<h1>
- <?cs var:ikesa.peerconfig ?> [IKE #<?cs name:ikesa ?>]:
- <span><?cs var:ikesa.local.identification ?></span> <->
- <span><?cs var:ikesa.remote.identification ?></span>
+ <?cs var:ikesa.peerconfig ?> [IKE #<?cs name:ikesa ?>]:
+ <span><?cs var:ikesa.local.identification ?></span> <->
+ <span><?cs var:ikesa.remote.identification ?></span>
</h1>
<div class="controls">
<a title="close IKE_SA" href="<?cs var:base ?>/control/terminateike/<?cs name:ikesa ?>">
<?cs /if ?>
</td>
<td style="background-image:url(<?cs var:base ?>/static/pipe.png)">
- <?cs var:ikesa.local.spi ?><br/><br/><br/>
- <?cs var:ikesa.local.address ?>
+ <?cs var:ikesa.local.spi ?><br/><br/><br/>
+ <?cs var:ikesa.local.address ?>
</td>
<td>
<?cs if:ikesa.local.nat == "true" ?>
<?cs /if ?>
</td>
<td class="right" style="background-image:url(<?cs var:base ?>/static/pipe.png)">
- <?cs var:ikesa.remote.spi ?><br/><br/><br/>
- <?cs var:ikesa.remote.address ?>
+ <?cs var:ikesa.remote.spi ?><br/><br/><br/>
+ <?cs var:ikesa.remote.address ?>
</td>
<td>
<?cs if:ikesa.role == "responder" ?>
</tr>
<?cs each:childsa = ikesa.childsas ?>
<tr>
- <td colspan="6" class="expand">
- <h1><?cs var:childsa.childconfig ?> [IPsec #<?cs name:childsa ?>]:</h1>
+ <td colspan="6" class="expand">
+ <h1><?cs var:childsa.childconfig ?> [IPsec #<?cs name:childsa ?>]:</h1>
</td>
- <td class="controls">
- <a title="close CHILD_SA" href="<?cs var:base ?>/control/terminatechild/<?cs name:childsa ?>">
+ <td class="controls">
+ <a title="close CHILD_SA" href="<?cs var:base ?>/control/terminatechild/<?cs name:childsa ?>">
<img src="<?cs var:base ?>/static/close.png"/>
</a>
</td>
<td colspan="7"><hr/></td>
</tr>
<tr class="images">
- <td colspan="2">
+ <td colspan="2">
<?cs each:net = childsa.local.networks ?>
- <p><?cs var:net ?></p>
+ <p><?cs var:net ?></p>
<?cs /each ?>
- </td>
- <td style="background-image:url(<?cs var:base ?>/static/pipe-thin-left-green.png)">
+ </td>
+ <td style="background-image:url(<?cs var:base ?>/static/pipe-thin-left-green.png)">
<?cs var:childsa.local.spi ?> <-<br/><br/><br/>
- </td>
- <td style="background-image:url(<?cs var:base ?>/static/pipe-thin-green.png)">
- </td>
- <td class="right" style="background-image:url(<?cs var:base ?>/static/pipe-thin-right-green.png)">
+ </td>
+ <td style="background-image:url(<?cs var:base ?>/static/pipe-thin-green.png)">
+ </td>
+ <td class="right" style="background-image:url(<?cs var:base ?>/static/pipe-thin-right-green.png)">
-> <?cs var:childsa.remote.spi ?><br/><br/><br/>
- </td>
- <td class="right" colspan="2">
+ </td>
+ <td class="right" colspan="2">
<?cs each:net = childsa.remote.networks ?>
- <p><?cs var:net ?></p>
+ <p><?cs var:net ?></p>
<?cs /each ?>
- </td>
+ </td>
</tr>
<?cs /each ?>
</table>
// 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;
// HANDLE: $(*)
[ a ] );
},
-
+
jquery: "1.2",
size: function() {
return this.length;
},
-
+
length: 0,
get: function( num ) {
// 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 );
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 )
obj = {};
obj[ key ] = value;
}
-
+
// Check to see if we're setting style values
return this.each(function(index){
// Set all the styles
this.insertBefore( a, this.firstChild );
});
},
-
+
before: function() {
return this.domManip(arguments, false, 1, function(a){
this.parentNode.insertBefore( a, this );
var ret = this.map(function(){
return this.outerHTML ? jQuery(this.outerHTML)[0] : this.cloneNode(true);
});
-
+
if (events === true) {
var clone = ret.find("*").andSelf();
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;
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, "");
this.value = val;
});
},
-
+
html: function( val ) {
return val == undefined ?
( this.length ? this[0].innerHTML : null ) :
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 ) {
// 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 ||
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;
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;
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(" ") : "";
},
ret = jQuery.attr(elem.style, "opacity");
return ret == "" ? "1" : ret;
}
-
+
if (prop.match(/float/i))
prop = styleFloat;
return ret;
},
-
+
clean: function(a, doc) {
var r = [];
doc = doc || document;
if ( arg.constructor == Number )
arg = arg.toString();
-
+
// Convert html string into DOM nodes
if ( typeof arg == "string" ) {
// Fix "XHTML"-style tags in all browsers
// option or optgroup
!s.indexOf("<opt") &&
[1, "<select>", "</select>"] ||
-
+
!s.indexOf("<leg") &&
[1, "<fieldset>", "</fieldset>"] ||
-
+
s.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
[1, "<table>", "</table>"] ||
-
+
!s.indexOf("<tr") &&
[2, "<table><tbody>", "</tbody></table>"] ||
-
+
// <thead> matched above
(!s.indexOf("<td") || !s.indexOf("<th")) &&
[3, "<table><tbody><tr>", "</tr></tbody></table>"] ||
-
+
!s.indexOf("<col") &&
[2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"] ||
// IE can't serialize <link> and <script> tags normally
jQuery.browser.msie &&
[1, "div<div>", "</div>"] ||
-
+
[0,"",""];
// Go to html and back, then peel off extra wrappers
div.innerHTML = wrap[1] + arg + wrap[2];
-
+
// Move to the right depth
while ( wrap[0]-- )
div = div.lastChild;
-
+
// Remove IE's autoinserted <tbody> from table fragments
if ( jQuery.browser.msie ) {
-
+
// String was a <table>, *may* have spurious <tbody>
- if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 )
+ if ( !s.indexOf("<table") && s.indexOf("<tbody") < 0 )
tb = div.firstChild && div.firstChild.childNodes;
-
+
// String was a bare <thead> or <tfoot>
else if ( wrap[1] == "<table>" && s.indexOf("<tbody") < 0 )
tb = div.childNodes;
for ( var n = tb.length-1; n >= 0 ; --n )
if ( jQuery.nodeName(tb[n], "tbody") && !tb[n].childNodes.length )
tb[n].parentNode.removeChild(tb[n]);
-
- // IE completely kills leading whitespace when innerHTML is used
- if ( /^\s/.test(arg) )
+
+ // IE completely kills leading whitespace when innerHTML is used
+ if ( /^\s/.test(arg) )
div.insertBefore( doc.createTextNode( arg.match(/^\s*/)[0] ), div.firstChild );
}
-
+
arg = jQuery.makeArray( div.childNodes );
}
return r;
},
-
+
attr: function(elem, name, value){
var fix = jQuery.isXMLDoc(elem) ? {} : jQuery.props;
// Accessing the parent's selectedIndex property fixes it
if ( name == "selected" && jQuery.browser.safari )
elem.parentNode.selectedIndex;
-
+
// Certain attributes only work when accessed via the old DOM 0 way
if ( fix[name] ) {
if ( value != undefined ) elem[fix[name]] = value;
elem.setAttribute( name, value );
}
- if ( jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem) )
+ if ( jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem) )
return elem.getAttribute( name, 2 );
return elem.getAttribute( name );
if ( value != undefined ) {
// IE has trouble with opacity if it does not have layout
// Force it by setting the zoom level
- elem.zoom = 1;
-
+ elem.zoom = 1;
+
// Set the alpha filter to set the opacity
elem.filter = (elem.filter || "").replace(/alpha\([^)]*\)/,"") +
(parseFloat(value).toString() == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
}
-
- return elem.filter ?
+
+ return elem.filter ?
(parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100).toString() : "";
}
name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
return elem[name];
}
},
-
+
trim: function(t){
return (t||"").replace(/^\s+|\s+$/g, "");
},
};
var styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat";
-
+
jQuery.extend({
// Check to see if the W3C box model is being used
boxModel: !jQuery.browser.msie || document.compatMode == "CSS1Compat",
-
+
styleFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat",
-
+
props: {
"for": "htmlFor",
"class": "className",
jQuery.each( [ "Height", "Width" ], function(i,name){
var n = name.toLowerCase();
-
+
jQuery.fn[ n ] = function(h) {
return this[0] == window ?
jQuery.browser.safari && self["inner" + name] ||
jQuery.boxModel && Math.max(document.documentElement["client" + name], document.body["client" + name]) ||
document.body["client" + name] :
-
+
this[0] == document ?
Math.max( document.body["scroll" + name], document.body["offset" + name] ) :
-
+
h == undefined ?
( this.length ? jQuery.css( this[0], n ) : null ) :
this.css( n, h.constructor == String ? h : h + "px" );
animated: "jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"
}
},
-
+
// The regular expressions that power the parsing engine
parse: [
// Match: [@value='test'], [@foo]
var id = jQuery.data(n);
if ( m == "~" && merge[id] ) break;
-
+
if (!nodeName || n.nodeName.toUpperCase() == nodeName.toUpperCase() ) {
if ( m == "~" ) merge[id] = true;
r.push( n );
}
-
+
if ( m == "+" ) break;
}
}
// Optimize for the case nodeName#idName
var re2 = quickID;
var m = re2.exec(t);
-
+
// Re-organize the results, so that they're consistent
if ( m ) {
m = [ 0, m[2], m[3], m[1] ];
if ( m[1] == "#" && elem && elem.getElementById && !jQuery.isXMLDoc(elem) ) {
// Optimization for HTML document case
var oid = elem.getElementById(m[2]);
-
+
// Do a quick check for the existence of the actual ID attribute
// to avoid selecting by the name attribute in IE
// also check to insure id is a string to avoid selecting an element with the name of 'id' inside a form
else if ( m[1] == "[" ) {
var tmp = [], type = m[3];
-
+
for ( var i = 0, rl = r.length; i < rl; i++ ) {
var a = r[i], z = a[ jQuery.props[m[2]] || m[2] ];
-
+
if ( z == null || /href|src|selected/.test(m[2]) )
z = jQuery.attr(a,m[2]) || '';
(type == "*=" || type == "~=") && z.indexOf(m[5]) >= 0) ^ not )
tmp.push( a );
}
-
+
r = tmp;
// We can get a speed boost by handling nth-child here
}
return matched;
},
-
+
nth: function(cur,result,dir,elem){
result = result || 1;
var num = 0;
return cur;
},
-
+
sibling: function( n, elem ) {
var r = [];
});
/*
* A number of helper functions used for managing events.
- * Many of the ideas behind this code orignated from
+ * Many of the ideas behind this code orignated from
* Dean Edwards' addEvent library.
*/
jQuery.event = {
// Make sure that the function being executed has a unique ID
if ( !handler.guid )
handler.guid = this.guid++;
-
- // if data is passed, bind to handler
- if( data != undefined ) {
- // Create temporary function pointer to original handler
- var fn = handler;
-
- // Create unique handler function, wrapped around original handler
- handler = function() {
- // Pass arguments and context to original handler
- return fn.apply(this, arguments);
+
+ // if data is passed, bind to handler
+ if( data != undefined ) {
+ // Create temporary function pointer to original handler
+ var fn = handler;
+
+ // Create unique handler function, wrapped around original handler
+ handler = function() {
+ // Pass arguments and context to original handler
+ return fn.apply(this, arguments);
};
- // Store data in unique handler
+ // Store data in unique handler
handler.data = data;
- // Set the guid of unique handler to the same of original handler, so it can be removed
+ // Set the guid of unique handler to the same of original handler, so it can be removed
handler.guid = fn.guid;
}
// Init the element's event structure
var events = jQuery.data(element, "events") || jQuery.data(element, "events", {});
-
+
var handle = jQuery.data(element, "handle", function(){
// returned undefined or false
var val;
// an event is called after a page has unloaded
if ( typeof jQuery == "undefined" || jQuery.event.triggered )
return val;
-
+
val = jQuery.event.handle.apply(element, arguments);
-
+
return val;
});
// Init the event handler queue
if (!handlers) {
- handlers = events[type] = {};
-
+ handlers = events[type] = {};
+
// And bind the global event handler to the element
if (element.addEventListener)
element.addEventListener(type, handle, false);
handler = type.handler;
type = type.type;
}
-
+
if ( !type ) {
for ( type in events )
this.remove( element, type );
// remove the given handler for the given type
if ( handler )
delete events[type][handler.guid];
-
+
// remove all handlers for the given type
else
for ( handler in events[type] )
var val, ret, fn = jQuery.isFunction( element[ type ] || null ),
// Check to see if we need to provide a fake event, or not
evt = !data[0] || !data[0].preventDefault;
-
+
// Pass along a fake event
if ( evt )
data.unshift( this.fix({ type: type, target: element }) );
var val;
// Empty object is for triggered events with no data
- event = jQuery.event.fix( event || window.event || {} );
+ event = jQuery.event.fix( event || window.event || {} );
// Namespaced event handlers
var parts = event.type.split(".");
},
fix: function(event) {
- // store a copy of the original event object
+ // store a copy of the original event object
// and clone to set read-only properties
var originalEvent = event;
event = jQuery.extend({}, originalEvent);
-
- // add preventDefault and stopPropagation since
+
+ // add preventDefault and stopPropagation since
// they will not work on the clone
event.preventDefault = function() {
// if preventDefault exists run it on the original event
// otherwise set the cancelBubble property of the original event to true (IE)
originalEvent.cancelBubble = true;
};
-
+
// Fix target property, if necessary
if ( !event.target && event.srcElement )
event.target = event.srcElement;
-
+
// check if target is a textnode (safari)
if (jQuery.browser.safari && event.target.nodeType == 3)
event.target = originalEvent.target.parentNode;
event.pageX = event.clientX + (e && e.scrollLeft || b.scrollLeft || 0);
event.pageY = event.clientY + (e && e.scrollTop || b.scrollTop || 0);
}
-
+
// Add which for key events
if ( !event.which && (event.charCode || event.keyCode) )
event.which = event.charCode || event.keyCode;
-
+
// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
if ( !event.metaKey && event.ctrlKey )
event.metaKey = event.ctrlKey;
// Note: button is not normalized, so don't use it
if ( !event.which && event.button )
event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
-
+
return event;
}
};
jQuery.event.add( this, type, fn || data, fn && data );
});
},
-
+
one: function( type, data, fn ) {
return this.each(function(){
jQuery.event.add( this, type, function(event) {
return this.click(function(e) {
// Figure out which function to execute
this.lastToggle = 0 == this.lastToggle ? 1 : 0;
-
+
// Make sure that clicks stop
e.preventDefault();
-
+
// and execute the function
return a[this.lastToggle].apply( this, [e] ) || false;
});
},
hover: function(f,g) {
-
+
// A private function for handling mouse 'hovering'
function handleHover(e) {
// Check if mouse(over|out) are still within the same parent element
var p = e.relatedTarget;
-
+
// Traverse up the tree
while ( p && p != this ) try { p = p.parentNode; } catch(e) { p = this; };
-
+
// If we actually just moused on to a sub-element, ignore it
if ( p == this ) return false;
-
+
// Execute the right function
return (e.type == "mouseover" ? f : g).apply(this, [e]);
}
-
+
// Bind the function to the two event listeners
return this.mouseover(handleHover).mouseout(handleHover);
},
-
+
ready: function(f) {
// Attach the listeners
bindReady();
if ( jQuery.isReady )
// Execute the function immediately
f.apply( document, [jQuery] );
-
+
// Otherwise, remember the function for later
else
// Add the function to the wait list
jQuery.readyList.push( function() { return f.apply(this, [jQuery]); } );
-
+
return this;
}
});
*/
isReady: false,
readyList: [],
-
+
// Handle when the DOM is ready
ready: function() {
// Make sure that the DOM is not already loaded
if ( !jQuery.isReady ) {
// Remember that the DOM is ready
jQuery.isReady = true;
-
+
// If there are functions bound, to execute
if ( jQuery.readyList ) {
// Execute all of them
jQuery.each( jQuery.readyList, function(){
this.apply( document );
});
-
+
// Reset the list of functions
jQuery.readyList = null;
}
// Remove event listener to avoid memory leak
if ( jQuery.browser.mozilla || jQuery.browser.opera )
document.removeEventListener( "DOMContentLoaded", jQuery.ready, false );
-
+
// Remove script element used by IE hack
if( !window.frames.length ) // don't remove if frames are present (#1187)
jQuery(window).load(function(){ jQuery("#__ie_init").remove(); });
});
jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
- "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," +
+ "mousedown,mouseup,mousemove,mouseover,mouseout,change,select," +
"submit,keydown,keypress,keyup,error").split(","), function(i,o){
-
+
// Handle event binding
jQuery.fn[o] = function(f){
return f ? this.bind(o, f) : this.trigger(o);
if ( jQuery.browser.mozilla || jQuery.browser.opera )
// Use the handy event callback
document.addEventListener( "DOMContentLoaded", jQuery.ready, false );
-
+
// If IE is used, use the excellent hack by Matthias Miller
// http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited
else if ( jQuery.browser.msie ) {
-
+
// Only works if you document.write() it
- document.write("<scr" + "ipt id=__ie_init defer=true " +
+ document.write("<scr" + "ipt id=__ie_init defer=true " +
"src=//:><\/script>");
-
+
// Use the defer script hack
var script = document.getElementById("__ie_init");
-
+
// script does not exist if jQuery is loaded dynamically
- if ( script )
+ if ( script )
script.onreadystatechange = function() {
if ( this.readyState != "complete" ) return;
jQuery.ready();
};
-
+
// Clear from memory
script = null;
-
+
// If Safari is used
} else if ( jQuery.browser.safari )
// Continually check to see if the document.readyState is valid
jQuery.safariTimer = setInterval(function(){
// loaded and complete are both valid states
- if ( document.readyState == "loaded" ||
+ if ( document.readyState == "loaded" ||
document.readyState == "complete" ) {
-
+
// If either one are found, remove the timer
clearInterval( jQuery.safariTimer );
jQuery.safariTimer = null;
-
+
// and execute any waiting functions
jQuery.ready();
}
- }, 10);
+ }, 10);
// A fallback to window.onload, that will always work
jQuery.event.add( window, "load", jQuery.ready );
jQuery.makeArray(this.elements) : this;
})
.filter(function(){
- return this.name && !this.disabled &&
- (this.checked || /select|textarea/i.test(this.nodeName) ||
+ return this.name && !this.disabled &&
+ (this.checked || /select|textarea/i.test(this.nodeName) ||
/text|hidden|password/i.test(this.type));
})
.map(function(i, elem){
callback = data;
data = null;
}
-
+
return jQuery.ajax({
type: "GET",
url: url,
async: true,
data: null
},
-
+
// Last-Modified header cache for next request
lastModified: {},
// Attach handlers for all browsers
script.onload = script.onreadystatechange = function(){
- if ( !done && (!this.readyState ||
+ if ( !done && (!this.readyState ||
this.readyState == "loaded" || this.readyState == "complete") ) {
done = true;
success();
// Allow custom headers/mimetypes
if ( s.beforeSend )
s.beforeSend(xml);
-
+
if ( s.global )
jQuery.event.trigger("ajaxSend", [xml, s]);
// The transfer is complete and the data is available, or the request timed out
if ( !requestDone && xml && (xml.readyState == 4 || isTimeout == "timeout") ) {
requestDone = true;
-
+
// clear poll interval
if (ival) {
clearInterval(ival);
ival = null;
}
-
+
status = isTimeout == "timeout" && "timeout" ||
!jQuery.httpSuccess( xml ) && "error" ||
s.ifModified && jQuery.httpNotModified( xml, s.url ) && "notmodified" ||
try {
modRes = xml.getResponseHeader("Last-Modified");
} catch(e) {} // swallow exception thrown by FF if header is not available
-
+
if ( s.ifModified && modRes )
jQuery.lastModified[s.url] = modRes;
// JSONP handles its own success callback
if ( !jsonp )
- success();
+ success();
} else
jQuery.handleError(s, xml, status);
xml = null;
}
};
-
+
if ( s.async ) {
// don't attach the handler to the request, just poll it instead
- var ival = setInterval(onreadystatechange, 13);
+ var ival = setInterval(onreadystatechange, 13);
// Timeout checker
if ( s.timeout > 0 )
if ( xml ) {
// Cancel the request
xml.abort();
-
+
if( !requestDone )
onreadystatechange( "timeout" );
}
}, s.timeout);
}
-
+
// Send the data
try {
xml.send(s.data);
} catch(e) {
jQuery.handleError(s, xml, null, e);
}
-
+
// firefox 1.5 doesn't fire statechange for sync requests
if ( !s.async )
onreadystatechange();
-
+
// return XMLHttpRequest to allow aborting the request etc.
return xml;
this.animate({
height: "show", width: "show", opacity: "show"
}, speed, callback) :
-
+
this.filter(":hidden").each(function(){
this.style.display = this.oldblock ? this.oldblock : "";
if ( jQuery.css(this,"display") == "none" )
this.style.display = "block";
}).end();
},
-
+
hide: function(speed,callback){
return speed ?
this.animate({
height: "hide", width: "hide", opacity: "hide"
}, speed, callback) :
-
+
this.filter(":visible").each(function(){
this.oldblock = this.oldblock || jQuery.css(this,"display");
if ( this.oldblock == "none" )
// Save the old toggle function
_toggle: jQuery.fn.toggle,
-
+
toggle: function( fn, fn2 ){
return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
this._toggle( fn, fn2 ) :
jQuery(this)[ jQuery(this).is(":hidden") ? "show" : "hide" ]();
});
},
-
+
slideDown: function(speed,callback){
return this.animate({height: "show"}, speed, callback);
},
-
+
slideUp: function(speed,callback){
return this.animate({height: "hide"}, speed, callback);
},
slideToggle: function(speed, callback){
return this.animate({height: "toggle"}, speed, callback);
},
-
+
fadeIn: function(speed, callback){
return this.animate({opacity: "show"}, speed, callback);
},
-
+
fadeOut: function(speed, callback){
return this.animate({opacity: "hide"}, speed, callback);
},
-
+
fadeTo: function(speed,to,callback){
return this.animate({opacity: to}, speed, callback);
},
-
+
animate: function( prop, speed, easing, callback ) {
var opt = jQuery.speed(speed, easing, callback);
return this[ opt.queue === false ? "each" : "queue" ](function(){
opt = jQuery.extend({}, opt);
var hidden = jQuery(this).is(":hidden"), self = this;
-
+
for ( var p in prop ) {
if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
return jQuery.isFunction(opt.complete) && opt.complete.apply(this);
this.style.overflow = "hidden";
opt.curAnim = jQuery.extend({}, prop);
-
+
jQuery.each( prop, function(name, val){
var e = new jQuery.fx( self, opt, name );
return true;
});
},
-
+
queue: function(type, fn){
if ( !fn ) {
fn = type;
queue(this, type, fn);
else {
queue(this, type).push( fn );
-
+
if ( queue(this, type).length == 1 )
fn.apply(this);
}
var q = jQuery.data( elem, type + "queue" );
if ( !q || array )
- q = jQuery.data( elem, type + "queue",
+ q = jQuery.data( elem, type + "queue",
array ? jQuery.makeArray(array) : [] );
return q;
};
jQuery.extend({
-
+
speed: function(speed, easing, fn) {
var opt = speed && speed.constructor == Object ? speed : {
- complete: fn || !fn && easing ||
+ complete: fn || !fn && easing ||
jQuery.isFunction( speed ) && speed,
duration: speed,
easing: fn && easing || easing && easing.constructor != Function && easing
};
- opt.duration = (opt.duration && opt.duration.constructor == Number ?
- opt.duration :
+ opt.duration = (opt.duration && opt.duration.constructor == Number ?
+ opt.duration :
{ slow: 600, fast: 200 }[opt.duration]) || 400;
-
+
// Queueing
opt.old = opt.complete;
opt.complete = function(){
if ( jQuery.isFunction( opt.old ) )
opt.old.apply( this );
};
-
+
return opt;
},
-
+
easing: {
linear: function( p, n, firstNum, diff ) {
return firstNum + diff * p;
return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
}
},
-
+
timers: [],
fx: function( elem, options, prop ){
if ( jQuery.timers.length == 1 ) {
var timer = setInterval(function(){
var timers = jQuery.timers;
-
+
for ( var i = 0; i < timers.length; i++ )
if ( !timers[i]() )
timers.splice(i--, 1);
// flash of content
if ( this.prop == "width" || this.prop == "height" )
this.elem.style[this.prop] = "1px";
-
+
// Start by showing the element
jQuery(this.elem).show();
},
if ( this.options.display != null ) {
// Reset the overflow
this.elem.style.overflow = this.options.overflow;
-
+
// Reset the display
this.elem.style.display = this.options.display;
if ( jQuery.css(this.elem, "display") == "none" )
// http://jquery.com/plugins/project/dimensions
jQuery.fn.offset = function() {
var left = 0, top = 0, elem = this[0], results;
-
+
if ( elem ) with ( jQuery.browser ) {
- var absolute = jQuery.css(elem, "position") == "absolute",
- parent = elem.parentNode,
- offsetParent = elem.offsetParent,
+ var absolute = jQuery.css(elem, "position") == "absolute",
+ parent = elem.parentNode,
+ offsetParent = elem.offsetParent,
doc = elem.ownerDocument,
safari2 = safari && !absolute && parseInt(version) < 522;
-
+
// Use getBoundingClientRect if available
if ( elem.getBoundingClientRect ) {
box = elem.getBoundingClientRect();
-
+
// Add the document scroll offsets
add(
box.left + Math.max(doc.documentElement.scrollLeft, doc.body.scrollLeft),
box.top + Math.max(doc.documentElement.scrollTop, doc.body.scrollTop)
);
-
+
// IE adds the HTML element's border, by default it is medium which is 2px
// IE 6 and IE 7 quirks mode the border width is overwritable by the following css html { border: 0; }
// IE 7 standards mode, the border is always 2px
border = (border == "medium" || jQuery.boxModel && parseInt(version) >= 7) && 2 || border;
add( -border, -border );
}
-
+
// Otherwise loop through the offsetParents and parentNodes
} else {
-
+
// Initial element offsets
add( elem.offsetLeft, elem.offsetTop );
-
+
// Get parent offsets
while ( offsetParent ) {
// Add offsetParent offsets
add( offsetParent.offsetLeft, offsetParent.offsetTop );
-
+
// Mozilla and Safari > 2 does not include the border on offset parents
// However Mozilla adds the border for table cells
if ( mozilla && /^t[d|h]$/i.test(parent.tagName) || !safari2 )
border( offsetParent );
-
+
// Safari <= 2 doubles body offsets with an absolutely positioned element or parent
if ( safari2 && !absolute && jQuery.css(offsetParent, "position") == "absolute" )
absolute = true;
-
+
// Get next offsetParent
offsetParent = offsetParent.offsetParent;
}
-
+
// Get parent scroll offsets
while ( parent.tagName && /^body|html$/i.test(parent.tagName) ) {
// Work around opera inline/table scrollLeft/Top bug
if ( /^inline|table-row.*$/i.test(jQuery.css(parent, "display")) )
// Subtract parent scroll offsets
add( -parent.scrollLeft, -parent.scrollTop );
-
+
// Mozilla does not add the border for a parent that has overflow != visible
if ( mozilla && jQuery.css(parent, "overflow") != "visible" )
border( parent );
-
+
// Get next parent
parent = parent.parentNode;
}
-
+
// Safari doubles body offsets with an absolutely positioned element or parent
if ( safari && absolute )
add( -doc.body.offsetLeft, -doc.body.offsetTop );
h1 {
margin-top: 1em;
-
+
}
hr {
- </div>
+ </div>
</div>
</body>
</html>
</div>
<div class="menu">
<?cs if:?login ?>
- Logged in as <i><?cs var:login ?></i>
+ Logged in as <i><?cs var:login ?></i>
| <a href="<?cs var:base ?>/user/edit">Edit</a>
| <a href="<?cs var:base ?>/user/logout">Logout</a>
| <a href="<?cs var:base ?>/user/help">Help</a>
<tr>
<td></td>
<td class="right">
- <input type="submit" value="Back" name="back"/>
+ <input type="submit" value="Back" name="back"/>
<input type="submit" value="Add" name="add"/>
</td>
</tr>
<td></td>
<td align="right">
<input type="submit" value="Back" name="back"/>
- <input type="submit" value="Delete" name="delete" onclick="return confirm('Permanently delete this peer?')"/>
+ <input type="submit" value="Delete" name="delete" onclick="return confirm('Permanently delete this peer?')"/>
<input type="submit" value="Save" name="save"/>
</td>
</tr>
<tr>
<td></td>
<td class="right">
- <input type="submit" value="Back" name="back"/>
- <input type="submit" value="Delete" name="delete" onclick="return confirm('Permanently delete your account?')"/>
+ <input type="submit" value="Back" name="back"/>
+ <input type="submit" value="Delete" name="delete" onclick="return confirm('Permanently delete your account?')"/>
<input type="submit" value="Save" name="save"/>
</td>
</tr>
if !USE_WINDOWS
-sbin_PROGRAMS = sec-updater
+sbin_PROGRAMS = sec-updater
AM_CPPFLAGS = \
-I$(top_srcdir)/src/libstrongswan \
dpkg_enumerator_t *this)
{
pclose(this->file);
- free(this);
+ free(this);
}
METHOD(sw_collector_dpkg_t, create_sw_enumerator, enumerator_t*,
char *buf);
/**
- * Extract packages from event in installation history
+ * Extract packages from event in installation history
*
* @param args Arguments to be processed
* @param eid Primary key pointing to current event
- * @param op Extraction operation
+ * @param op Extraction operation
* @return TRUE if extraction succeeded
*/
bool (*extract_packages)(sw_collector_history_t *this, chunk_t args,
json_array_enumerator_t *this)
{
json_object_put(this->jarray);
- free(this);
+ free(this);
}
METHOD(sw_collector_rest_api_t, create_sw_enumerator, enumerator_t*,
if (streq(name, "crl_uris"))
{
printf(" %s %.*s\n",
- (*labeled & LABELED_CRL_URI) ? " " : "crl_uris: ",
+ (*labeled & LABELED_CRL_URI) ? " " : "crl_uris: ",
len, value);
*labeled |= LABELED_CRL_URI;
}
execute_chroot "chgrp www-data /etc/pts" 0
execute_chroot "chmod g+w /etc/pts" 0
fi
- if [ "$host" = "winnetou" ]
+ if [ "$host" = "winnetou" ]
then
execute "mkdir $LOOPDIR/var/log/apache2/ocsp" 0
execute "cp -rf $DIR/../images $LOOPDIR/var/www/" 0
function searchandreplace {
- SEARCHSTRING="$1"
- REPLACESTRING="$2"
- DESTDIR="$3"
+ SEARCHSTRING="$1"
+ REPLACESTRING="$2"
+ DESTDIR="$3"
- [ -d "$DESTDIR" ] || die "$DESTDIR is not a directory!"
+ [ -d "$DESTDIR" ] || die "$DESTDIR is not a directory!"
- ###########################################
- # search and replace in each found file the
- # given string
- #
+ ###########################################
+ # search and replace in each found file the
+ # given string
+ #
- for eachfoundfile in `find $DESTDIR -type f`
- do
- sed -i -e "s/$SEARCHSTRING/$REPLACESTRING/g" "$eachfoundfile"
- done
+ for eachfoundfile in `find $DESTDIR -type f`
+ do
+ sed -i -e "s/$SEARCHSTRING/$REPLACESTRING/g" "$eachfoundfile"
+ done
}
for host in $STRONGSWANHOSTS
do
- eval ipv4_${host}="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
- eval ipv6_${host}="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
-
- case $host in
- moon)
- eval ipv4_moon1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
- eval ipv6_moon1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
- ;;
- sun)
- eval ipv4_sun1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
- eval ipv6_sun1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
- ;;
- alice)
- eval ipv4_alice1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
- eval ipv6_alice1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
- ;;
- venus)
- ;;
- bob)
- ;;
- carol)
- eval ipv4_carol1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
- eval ipv6_carol1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
- ;;
- dave)
- eval ipv4_dave1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
- eval ipv6_dave1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
- ;;
- winnetou)
- ;;
- esac
+ eval ipv4_${host}="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
+ eval ipv6_${host}="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
+
+ case $host in
+ moon)
+ eval ipv4_moon1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ eval ipv6_moon1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ ;;
+ sun)
+ eval ipv4_sun1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ eval ipv6_sun1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ ;;
+ alice)
+ eval ipv4_alice1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ eval ipv6_alice1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ ;;
+ venus)
+ ;;
+ bob)
+ ;;
+ carol)
+ eval ipv4_carol1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ eval ipv6_carol1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ ;;
+ dave)
+ eval ipv4_dave1="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ eval ipv6_dave1="`echo $HOSTNAMEIPV6 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $2 }' | awk '{ print $1 }'`"
+ ;;
+ winnetou)
+ ;;
+ esac
done
##############################################################################
for host in $STRONGSWANHOSTS
do
- case $host in
- moon)
- searchandreplace PH_IP_MOON1 $ipv4_moon1 $TESTDIR
- searchandreplace PH_IP_MOON $ipv4_moon $TESTDIR
- searchandreplace PH_IP6_MOON1 $ipv6_moon1 $TESTDIR
- searchandreplace PH_IP6_MOON $ipv6_moon $TESTDIR
- ;;
- sun)
- searchandreplace PH_IP_SUN1 $ipv4_sun1 $TESTDIR
- searchandreplace PH_IP_SUN $ipv4_sun $TESTDIR
- searchandreplace PH_IP6_SUN1 $ipv6_sun1 $TESTDIR
- searchandreplace PH_IP6_SUN $ipv6_sun $TESTDIR
- ;;
- alice)
- searchandreplace PH_IP_ALICE1 $ipv4_alice1 $TESTDIR
- searchandreplace PH_IP_ALICE $ipv4_alice $TESTDIR
- searchandreplace PH_IP6_ALICE1 $ipv6_alice1 $TESTDIR
- searchandreplace PH_IP6_ALICE $ipv6_alice $TESTDIR
- ;;
- venus)
- searchandreplace PH_IP_VENUS $ipv4_venus $TESTDIR
- searchandreplace PH_IP6_VENUS $ipv6_venus $TESTDIR
- ;;
- bob)
- searchandreplace PH_IP_BOB $ipv4_bob $TESTDIR
- searchandreplace PH_IPV6_BOB $ipv6_bob $TESTDIR
- ;;
- carol)
- searchandreplace PH_IP_CAROL1 $ipv4_carol1 $TESTDIR
- searchandreplace PH_IP_CAROL $ipv4_carol $TESTDIR
- searchandreplace PH_IP6_CAROL1 $ipv6_carol1 $TESTDIR
- searchandreplace PH_IP6_CAROL $ipv6_carol $TESTDIR
- ;;
- dave)
- searchandreplace PH_IP_DAVE1 $ipv4_dave1 $TESTDIR
- searchandreplace PH_IP_DAVE $ipv4_dave $TESTDIR
- searchandreplace PH_IP6_DAVE1 $ipv6_dave1 $TESTDIR
- searchandreplace PH_IP6_DAVE $ipv6_dave $TESTDIR
- ;;
- winnetou)
- searchandreplace PH_IP_WINNETOU $ipv4_winnetou $TESTDIR
- searchandreplace PH_IP6_WINNETOU $ipv6_winnetou $TESTDIR
- ;;
- esac
+ case $host in
+ moon)
+ searchandreplace PH_IP_MOON1 $ipv4_moon1 $TESTDIR
+ searchandreplace PH_IP_MOON $ipv4_moon $TESTDIR
+ searchandreplace PH_IP6_MOON1 $ipv6_moon1 $TESTDIR
+ searchandreplace PH_IP6_MOON $ipv6_moon $TESTDIR
+ ;;
+ sun)
+ searchandreplace PH_IP_SUN1 $ipv4_sun1 $TESTDIR
+ searchandreplace PH_IP_SUN $ipv4_sun $TESTDIR
+ searchandreplace PH_IP6_SUN1 $ipv6_sun1 $TESTDIR
+ searchandreplace PH_IP6_SUN $ipv6_sun $TESTDIR
+ ;;
+ alice)
+ searchandreplace PH_IP_ALICE1 $ipv4_alice1 $TESTDIR
+ searchandreplace PH_IP_ALICE $ipv4_alice $TESTDIR
+ searchandreplace PH_IP6_ALICE1 $ipv6_alice1 $TESTDIR
+ searchandreplace PH_IP6_ALICE $ipv6_alice $TESTDIR
+ ;;
+ venus)
+ searchandreplace PH_IP_VENUS $ipv4_venus $TESTDIR
+ searchandreplace PH_IP6_VENUS $ipv6_venus $TESTDIR
+ ;;
+ bob)
+ searchandreplace PH_IP_BOB $ipv4_bob $TESTDIR
+ searchandreplace PH_IPV6_BOB $ipv6_bob $TESTDIR
+ ;;
+ carol)
+ searchandreplace PH_IP_CAROL1 $ipv4_carol1 $TESTDIR
+ searchandreplace PH_IP_CAROL $ipv4_carol $TESTDIR
+ searchandreplace PH_IP6_CAROL1 $ipv6_carol1 $TESTDIR
+ searchandreplace PH_IP6_CAROL $ipv6_carol $TESTDIR
+ ;;
+ dave)
+ searchandreplace PH_IP_DAVE1 $ipv4_dave1 $TESTDIR
+ searchandreplace PH_IP_DAVE $ipv4_dave $TESTDIR
+ searchandreplace PH_IP6_DAVE1 $ipv6_dave1 $TESTDIR
+ searchandreplace PH_IP6_DAVE $ipv6_dave $TESTDIR
+ ;;
+ winnetou)
+ searchandreplace PH_IP_WINNETOU $ipv4_winnetou $TESTDIR
+ searchandreplace PH_IP6_WINNETOU $ipv6_winnetou $TESTDIR
+ ;;
+ esac
done
source $TESTDIR/test.conf
if [ -d $TESTDIR/hosts ]
then
- for host in `ls $TESTDIR/hosts`
- do
- eval HOSTLOGIN=root@\$ipv4_${host}
- scp $SSHCONF -r $TESTDIR/hosts/$host/etc $HOSTLOGIN:/ > /dev/null 2>&1
- done
+ for host in `ls $TESTDIR/hosts`
+ do
+ eval HOSTLOGIN=root@\$ipv4_${host}
+ scp $SSHCONF -r $TESTDIR/hosts/$host/etc $HOSTLOGIN:/ > /dev/null 2>&1
+ done
fi
for host in $IPSECHOSTS
do
- eval HOSTLOGIN=root@\$ipv4_${host}
- ssh $SSHCONF $HOSTLOGIN 'rm -f /var/log/auth.log /var/log/daemon.log; \
- kill -SIGHUP `cat /var/run/rsyslogd.pid`' > /dev/null 2>&1
+ eval HOSTLOGIN=root@\$ipv4_${host}
+ ssh $SSHCONF $HOSTLOGIN 'rm -f /var/log/auth.log /var/log/daemon.log; \
+ kill -SIGHUP `cat /var/run/rsyslogd.pid`' > /dev/null 2>&1
done
for host in $RADIUSHOSTS
do
- eval HOSTLOGIN=root@\$ipv4_${host}
- ssh $SSHCONF $HOSTLOGIN 'rm -f /var/log/daemon.log /var/log/freeradius/radius.log; \
- kill -SIGHUP `cat /var/run/rsyslogd.pid`' > /dev/null 2>&1
+ eval HOSTLOGIN=root@\$ipv4_${host}
+ ssh $SSHCONF $HOSTLOGIN 'rm -f /var/log/daemon.log /var/log/freeradius/radius.log; \
+ kill -SIGHUP `cat /var/run/rsyslogd.pid`' > /dev/null 2>&1
done
if [ -d $TESTSDIR/${testname}/hosts ]
then
- for host in `ls $TESTSDIR/${testname}/hosts`
- do
- eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
- scp $SSHCONF -r $HOSTCONFIGDIR/${host}/etc $HOSTLOGIN:/ > /dev/null 2>&1
- scp $SSHCONF -r $HOSTCONFIGDIR/default/etc $HOSTLOGIN:/ > /dev/null 2>&1
- done
+ for host in `ls $TESTSDIR/${testname}/hosts`
+ do
+ eval HOSTLOGIN="root@`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
+ scp $SSHCONF -r $HOSTCONFIGDIR/${host}/etc $HOSTLOGIN:/ > /dev/null 2>&1
+ scp $SSHCONF -r $HOSTCONFIGDIR/default/etc $HOSTLOGIN:/ > /dev/null 2>&1
+ done
fi