Commit Graph
12886 Commits
Author SHA1 Message Date
Martin Willi db18495514 vici: Add some convenience getters on message 2014-05-07 14:13:35 +02:00
Martin Willi b40a12a96f vici: Raise events with an optional identifier for specific connections 2014-05-07 14:13:35 +02:00
Martin Willi 293431269b vici: Invoke dispatcher outside of connection log, allowing events from commands 2014-05-07 14:13:35 +02:00
Martin Willi 252025210f vici: Add a query class, currently implementing a list-sas command 2014-05-07 14:13:35 +02:00
Martin Willi eb4fd014b8 vici: Add a libvici low-level client library 2014-05-07 14:13:35 +02:00
Martin Willi 8383d626b9 vici: Provide a command dispatcher handling request and event registration 2014-05-07 14:13:34 +02:00
Martin Willi 8457da7528 vici: Add a fully asynchronous IPC socket segmenting messages on/from stream 2014-05-07 14:13:34 +02:00
Martin Willi 1e39454214 vici: Add a test runner for plugin 2014-05-07 14:13:34 +02:00
Martin Willi 6770cfe34a vici: Add a plugin stub for the "Versatile IKE Control Interface" plugin 2014-05-07 14:13:34 +02:00
Martin Willi d4368689a0 mem-cred: Replace existing equal shared keys during add_shared() 2014-05-07 14:13:34 +02:00
Martin Willi f8223f5f7e mem-cred: Replace existing equal private keys during add_key() 2014-05-07 14:13:34 +02:00
Martin Willi d2b07d3187 watcher: Don't wait for running callback once watcher thread cancelled
During shutdown, waiting for callbacks might never complete, as queued
callbacks might not get executed under certain conditions. Not the clean fix,
but works good enough for now.

Seen on Windows in vici tests.
2014-05-07 14:13:34 +02:00
Martin Willi d16d5a245f watcher: Avoid queueing multiple watcher callbacks at the same time
While we don't add FDs with an active callback to the watched FDSET, we still
can get notifications for callbacks active due the asynchronous processing
of the same.

To avoid queue multiple callbacks, we check for queued callbacks before
activating new ones.
2014-05-07 14:13:34 +02:00
Martin Willi 874e212f71 processor: Flush pending jobs during cancel(), not destroy
During shutdown, cancel queued jobs earlier to avoid having cleanup functions
accessing infrastructure not available anymore, for example watcher.
2014-05-07 14:13:34 +02:00
Martin Willi 9e93251397 utils: Provide a CALLBACK macro, similar to METHOD, but for void* callbacks
Using the same mechanism as the METHOD macro, the CALLBACK macro defines
a hybrid function signature. It strictly uses a weak void* for the first
function parameter, in contrast to the dynamic METHOD object "this" type.
2014-05-07 14:13:34 +02:00
Martin Willi dba3c649da travis: --disable-aikgen in "all" tests
aikgen has a hard dependency on TrouSerS, which we currently don't have in the
travis build.
2014-05-07 14:12:13 +02:00
Andreas Steffen 41a4d5a4a6 Updated NEWS for 5.2.0dr2 release 2014-05-04 21:37:05 +02:00
Tobias Brunner a0c2370ea5 utils: Enable __atomic* built-ins based on the GCC version
This solves a problem with GNAT when compiling charon-tkm as __atomic*
built-ins are only provided in GCC 4.7 and newer.

Currently GNAT 4.6 and GCC 4.7.2 is shipped with Debian wheezy (stable),
as used in the testing environment.  So while the configure script correctly
detected the __atomic* built-ins, and defined HAVE_GCC_ATOMIC_OPERATIONS,
this define turned out to be incorrect when charon-tkm was later built
with GNAT.
2014-05-04 19:16:46 +02:00
Andreas Steffen 9be1c8d175 aikgen generates AIK private/public key pairs
aikgen outputs a binary AIK private key blob and the AIK public key.
Optionally the Identity Request encrypted with the public key of
the Privacy CA can be output.
2014-05-03 15:28:17 +02:00
Andreas Steffen a81bd670b0 Added PUBKEY_RSA_MODULUS encoding type 2014-05-02 19:50:43 +02:00
Andreas Steffen 60634df383 Extended Ubuntu 14.04 database build 2014-05-02 07:30:17 +02:00
Andreas Steffen 48064815ea Moved BIOS and IMA measurement lists into classes of their own 2014-05-02 07:30:17 +02:00
Andreas Steffen 9b9d522303 Added NEWS for 5.2.0dr2 2014-05-01 17:00:50 +02:00
Andreas Steffen ab6e7d6975 Fixed typo 2014-05-01 17:00:50 +02:00
Andreas Steffen 7bd8ea2fdd Use global status variable for IMA runtime 2014-05-01 16:58:59 +02:00
Andreas Steffen 887a88d55b Similar statistics for packages and file measurements 2014-05-01 09:17:33 +02:00
Andreas Steffen 660f3200ad Updated build_database.sh to Ubuntu 14.04 2014-05-01 09:17:33 +02:00
Andreas Steffen eebc1e75b2 Updated ITA-IMA finalize messages 2014-05-01 08:16:50 +02:00
Andreas Steffen bc2721b2f2 Implemented IMA-NG support 2014-05-01 08:16:49 +02:00
Martin Willi f91c7d85c4 Merge branch 'unit-tests'
Bring some minor improvements to unit testing, including more flexible
configuration.
2014-04-30 17:23:55 +02:00
Martin Willi 523dd96558 unit-tests: Document the supported env variables 2014-04-30 17:22:48 +02:00
Thomas Egerer 1b9b228c41 unit-tests: Support strongswan.conf defined plugin list and base directory
tests.load and tests.plugindir to allow the specification of the plugins
to be loaded and the directory to load them from.

Signed-off-by: Thomas Egerer <[email protected]>
2014-04-30 17:22:48 +02:00
Thomas Egerer f406a5bf72 unit-tests: Allow configuration of libstrongswan via config
By setting the environment variable TESTS_STRONGSWAN_CONF, the unit tests can
be asked to load a configuration file, thus enabling the tester to make use of
the usual configuration settings.

Signed-off-by: Thomas Egerer <[email protected]>
2014-04-30 17:22:48 +02:00
Martin Willi 20924ae28f unit-tests: Add a ck_assert_chunk_eq() convenience macro 2014-04-30 17:22:48 +02:00
Martin Willi 0456aa616f unit-tests: Silence a literal signedness warning raised by GCC 4.6.3 2014-04-30 17:22:48 +02:00
Tobias Brunner 24ea377458 sqlite: Allow query arguments to be freed before starting the enumeration
By marking the string/blob arguments as transient, SQLite will copy and
free them automatically.
2014-04-30 09:37:32 +02:00
Andreas Steffen f2eb226653 Version bump to 5.2.0dr2 2014-04-27 19:15:11 +02:00
Andreas Steffen f5b0558b15 Improved finalize messages in ITA-IMA component 2014-04-27 19:13:15 +02:00
Tobias Brunner c478dfe617 child-cfg: Fix removal of redundant traffic selectors
We have to make sure we compare every selected traffic selector with every
other in the list.

Fixes #577.
2014-04-25 19:04:35 +02:00
Tobias Brunner 446c036794 android: New release based on 5.1.3
Also links OpenSSL statically and doesn't limit the number of packets
during EAP-TTLS.
2014-04-25 14:39:22 +02:00
Tobias Brunner 711af588f9 libcharon: Added AEAD sources of libtls to Android.mk 2014-04-25 14:27:49 +02:00
Tobias Brunner 289456d26a libimcv: Updated Android.mk 2014-04-25 14:26:31 +02:00
Tobias Brunner 8064764070 android: Use static version of libcrypto
System.loadLibrary() searches in system directories first (at least in
recent releases), that is, our own build wouldn't actually get used.
2014-04-25 14:26:31 +02:00
Tobias Brunner acc042fa7b tun-device: Use SIOCAIFADDR to set IP address on FreeBSD 10
FreeBSD 10 deprecated the SIOCSIFADDR etc. commands, so we use this
newer command to set the address and netmask.  A destination address
is now also required.

Fixes #566.
2014-04-25 12:18:06 +02:00
Tobias Brunner 502eeb7f76 Merge branch 'atomic-ref'
Adds support for GCC's __atomic* built-ins and improves the performance
of logging (for ignored log levels) and half-open IKE_SA checking under
high loads.

Also fixes two potential race conditions in the load-tester plugin.
2014-04-24 18:00:11 +02:00
Tobias Brunner 73c33ff423 bus: Add a fast-path if log messages don't have to be logged
For some rwlock_t implementations acquiring the read lock could be quite
expensive even if there are no writers (e.g. because the implementation
requires acquiring a mutex to check for writers) particularly if the
lock is highly contended, like it is for the vlog() method.
2014-04-24 17:54:15 +02:00
Christophe Gouault 7b08063e70 load-tester: Fix race condition issuing same SPI
Due to an unprotected incrementation, two load-tester initiators occasionally
use the same SPI under high load, and hence generate 2 IPsec SAs with the same
identifier. The responder IPsec stack will refuse to configure the second SA.

Use an atomic incrementation to avoid this race condition.

Signed-off-by: Christophe Gouault <[email protected]>
2014-04-24 17:54:15 +02:00
Christophe Gouault 2cbaa63295 load-tester: Fix race condition issuing same identity
Due to an unprotected incrementation, two load-tester initiators occasionally
use the same identifier under high load. The responder typically drops one of
the connections.

Use an atomic incrementation to avoid this race condition.

Signed-off-by: Christophe Gouault <[email protected]>
2014-04-24 17:54:15 +02:00
Tobias Brunner a68454bd68 ike-sa-manager: Improve scalability of half-open IKE_SA checking
This patch is based on one by Christoph Gouault.

Currently, to count the total number of half_open IKE_SAs,
get_half_open_count sums up the count of each segment in the SA hash
table (acquiring a lock for each segment).  This procedure does not scale
well when the number of segments increases, as the method is called for
each new negotiation.

Instead, lets maintain a global atomic counter.

This optimization allows the use of big values for charon.ikesa_table_size
and charon.ikesa_table_segments.
2014-04-24 17:54:14 +02:00
Tobias Brunner 0f603d425d utils: Use GCC's __atomic built-ins if available
These are available since GCC 4.7 and will eventually replace the __sync
operations.  They support the memory model defined by C++11. For instance,
by using __ATOMIC_RELAXED for some operations on the reference counters we
can avoid memory barriers, which are required by __sync operations (whose
memory model essentially is __ATOMIC_SEQ_CST).
2014-04-24 17:54:14 +02:00