Commit Graph

9719 Commits

Author SHA1 Message Date
Martin Willi e49b299867 stream: Make sure no watcher callback is active while changing stream callbacks
When changing async callbacks on streams, we have to make sure the watcher
callback is not currently active and has temporarily disabled callbacks. This
could have been the case, as we didn't explicitly removed any pending
watcher registration if both callbacks are NULL.

By enforcing the watcher unregistration, we are sure the watcher callback is
not active and currently is not mangling the callback hooks. This should make
sure we avoid any races for the callback variables.
2014-01-22 15:34:53 +01:00
Tobias Brunner a40c66194e checksum: Read executables from DESTDIR
This allows to recreate the checksums after the installed binaries have
been modified e.g. with strip.

Fixes #491.
2014-01-21 14:53:46 +01:00
Thomas Egerer 3711f66e54 dhcp: Allow binding of socket to particular interface
In certain situations it is desirable to bind the send/receive sockets
for the DHCP address allocation to a particular interface. With this
patch the strongswan.conf option charon.plugins.dhcp.interface can be
used to restrict the DHCP communication to a configurable interface.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2014-01-20 16:40:34 +01:00
Thomas Egerer 568e302260 proposal: Add possibility to register custom proposal keyword parser
If a proposal string cannot be matched to a token using strcmp (e.g. if
you want to register a whole class of algorithms containing their ID,
like my_alg_2342), you can use the provided function to register a
parser that transforms the given string into a proposal token.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2014-01-20 16:40:34 +01:00
Tobias Brunner 303ec3956c unit-tests: Add environment variable to reduce the number of generated keys
If TESTS_REDUCED_KEYLENGTHS is set RSA and ECDSA keys are only generated
for the lowest configured key length.

Fixes #474.
2014-01-20 15:40:15 +01:00
Tobias Brunner 3d097e1024 unit-tests: Generate RSA key with 768 bits not 786 2014-01-20 15:40:09 +01:00
Thomas Egerer b190899473 ike_sa: Defer task manager destruction after child destruction
This patch exports the task manager's flush to allow flushing of all
queues with one function call from ike_sa->destroy. It allows the
access of intact children during task destructoin (see git-commit
e44ebdcf) and allows the access of the task manager in
child_state_change hook.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2014-01-16 14:16:13 +01:00
Andreas Steffen eeaa8a2417 Added TPMRA workitem support in PTS database 2014-01-16 01:46:55 +01:00
Martin Willi 2e89bc4b66 printf-hook-builtin: Correctly calculate written bytes in print_in_hook()
The hook data counts remaining buffer bytes, not used ones. Counting them
correctly fixes a crash for long hexdumps.

Further, print_in_hook() must return the number of bytes that would have been
written, not the actually written bytes. This is important, as we allocate a
dynamic buffer in bus that relies on the exact byte count. Fixes long hexdumps
that got truncated.
2014-01-15 18:28:43 +01:00
Andreas Steffen a48d19a3bf Do PTS measurements only if session initialisation was successful 2014-01-15 12:06:22 +01:00
Andreas Steffen 8b36021b5b Catch AIK errors 2014-01-13 12:06:18 +01:00
Andreas Steffen fbddf52c80 Do TPM measurements only if there is a TPMRA workitem 2014-01-13 12:06:18 +01:00
Andreas Steffen 81d49c5cfd Allow reason strings to be used as workitem result string 2014-01-13 12:06:17 +01:00
Andreas Steffen 6009b6e0dd Attestation IMV processes TPMRA workitem 2014-01-13 12:06:17 +01:00
Andreas Steffen 3254f8b00a Added TPM Remote Attestation (TPMRA) workitem 2014-01-10 11:55:21 +01:00
Tobias Brunner 2ff62bee04 checksum: Set rpath including DESTDIR for checksum_builder
This way libraries to which checksum_builder does not itself link,
like libtls and libradius, are found during DESTDIR installs.

Fixes #476.
2014-01-08 11:24:24 +01:00
Tobias Brunner 94e10f15e5 test-asn1: Fix skipping of >2038 tests on i386
The two constants overflow time_t on i386 (they also produced a compiler
warning without type suffix) so the comparison with TIME_32_BIT_SIGNED_MAX
did not work as intended.

Fixes #477.
2014-01-06 18:23:40 +01:00
Tobias Brunner d62a6ec3f9 chunk: Fix chunk_mac/hash tests on big-endian systems
Our SipHash-2-4 implementation returns the result in host order, while
the test vectors are little-endian.  Use a custom comparison function to
account for this.

Fixes #478.
2014-01-06 17:31:07 +01:00
Tobias Brunner 13f2d3a2f6 utils: Fix %T printf hook on big-endian systems
The cast to a bool* cut of the actual value on big-endian systems
if bool was shorter than int because the bool argument to printf gets
promoted to an int.

Fixes #479.
2014-01-06 15:30:02 +01:00
Tobias Brunner 0773c7fd71 checksum: Delay building of checksum_builder until required by make install
This ensures PLUGINDIR includes any DESTDIR set during make install.
2014-01-06 14:38:34 +01:00
Tobias Brunner 5d826357b8 checksum: Remove unnecessary pluto symbol 2014-01-06 13:37:12 +01:00
Tobias Brunner 261fd9d33b stroke: Fix error message if parsing leftsourceip fails 2014-01-06 12:55:45 +01:00
Andreas Steffen 6810388064 Update PCR even if measurement does not equal reference value 2013-12-21 00:40:45 +01:00
Tobias Brunner bfa2201537 tun-device: Include system headers before our own
On CentOS 6.5 the sys/capability.h header file defines _LINUX_TYPES_H
without actually including that header, preventing its later inclusion
here.

As library.h (via which the capabilities headers are included) is not
actually required in tun_device.[ch], moving the inclusion of tun_device.h
would not strictly be necessary.  But it's probably a good idea to
include our own headers after system headers anyway, for if one of the
recursively included files at a later point includes library.h we'd have
the same problem again.
2013-12-20 11:33:16 +01:00
Andreas Steffen f5fd12b932 Fixed check_file_measurement method in pts_database_t 2013-12-13 14:37:31 +01:00
Andreas Steffen 953a922e9b unit-tests: NTRU test to check a special branch 2013-12-08 10:18:33 +01:00
Andreas Steffen 84814a6b7c min_MGF_hash_calls parameter is not needed anymore 2013-12-07 23:54:53 +01:00
Andreas Steffen 5da659523e Optimized MGF1 implementation 2013-12-07 23:29:04 +01:00
Andreas Steffen abd4797dc1 Implemented ntru_trits class 2013-12-07 23:27:59 +01:00
Andreas Steffen a978a8194d Streamlined DRBG and MGF1 debug output 2013-12-07 00:21:28 +01:00
Andreas Steffen 933f3c6e8f unit-tests: Added crypter tests 2013-12-06 10:09:36 +01:00
Andreas Steffen fdc6c682b2 Added own MGF1 mask generating function 2013-12-05 22:55:47 +01:00
Andreas Steffen 78affed0a0 unit-tests: Added hasher tests 2013-12-04 23:09:32 +01:00
Andreas Steffen 2006709ec5 Moved test_rng to a test suite of its own 2013-12-04 21:23:30 +01:00
Tobias Brunner f1e12da7ef unit-tests: Don't use priority for destructor that unregisters testable functions
This fixes coverage reports, at least if leak detective is disabled.
If it is enabled the plugins are not unloaded so the destructor is not
executed until the process is destroyed, which seems not to be covered
by gcov.
2013-12-04 20:33:00 +01:00
Tobias Brunner d5a0abfa92 unit-tests: Export ntru_drbg_create as testable function so no linking is required
This way the plugin does not have to be linked explicitly to the test
runner, which otherwise would require that the plugin is either always
enabled to build the tests or that ifdefs are added to the Makefile.
2013-12-04 20:32:59 +01:00
Tobias Brunner 4cea186b64 unit-tests: Add facility to register testable functions
These can be defined in plugins, or other parts of the tested libraries.
They can even be static.
2013-12-04 20:32:59 +01:00
Tobias Brunner a24eec4649 unit-tests: Move ntru_test_rng_t to a utility class in libtest 2013-12-04 20:32:59 +01:00
Tobias Brunner 6354466a5b unit-tests: Fix apidoc for libtest 2013-12-04 20:32:59 +01:00
Tobias Brunner 3e8a44c2aa ntru: Fix compiler warning caused by ++/-- on righthand side of an assignment
The behavior of stuff like x = --x; (or x++) is not defined.
2013-12-04 20:32:59 +01:00
Adrian-Ken Rueegsegger 6db7feacf6 charon-tkm: Implement IANA DH Id to TKM Id mapping
The TKM Diffie-Hellman plugin now maps IANA DH identifiers to TKM DH
algorithm identifiers. The mapping is specified in the daemon's
'dh_mapping' section in the strongswan.conf file:

dh_mapping {
	iana_id1 = tkm_id1
	iana_id2 = tkm_id2
	iana_id3 = tkm_id3
	...
}

Only the mapped IANA IDs are registered as supported DH groups.
2013-12-03 11:58:53 +01:00
Adrian-Ken Rueegsegger 9e8a52003a charon-tkm: Drop unnecessary include 2013-12-03 11:58:53 +01:00
Tobias Brunner 7c7148b038 ike: Log SK_p consistently on level 4 2013-11-28 19:04:47 +01:00
Andreas Steffen 7d5b9e81a4 Added DRBG automatic reseeding tests 2013-11-27 20:21:41 +01:00
Andreas Steffen 5443762491 Use strongSwan hash plugins for SHA-1 and SHA-256 2013-11-27 20:21:41 +01:00
Andreas Steffen d993a567b7 Extended NIST SP 800-90A HMAC_DRBG test cases 2013-11-27 20:21:41 +01:00
Andreas Steffen a7047cda59 Cleaned up ntru-crypto library 2013-11-27 20:21:41 +01:00
Andreas Steffen 98c6421674 Implemented NIST SP 800-90A DRBG_HMAC with SHA-256 2013-11-27 20:21:41 +01:00
Andreas Steffen 798a36dc14 Added NTRU key exchange to default IKE proposal 2013-11-27 20:21:41 +01:00
Andreas Steffen 9013973cc8 unit-tests: Added ntru wrong ciphertext test 2013-11-27 20:21:41 +01:00
Andreas Steffen 885e699b58 unit-tests: Added ntru entropy, retransmission and ciphertext tests 2013-11-27 20:21:41 +01:00
Andreas Steffen 802eaf3789 Any of the four NTRU parameter sets can be selected 2013-11-27 20:21:41 +01:00
Andreas Steffen 1f73969eb5 Make the NTRU parameter set configurable 2013-11-27 20:21:41 +01:00
Andreas Steffen 2c620cb089 unit-tests: first NTRU test case 2013-11-27 20:21:40 +01:00
Andreas Steffen 146ad86be5 Prototype implementation of IKE key exchange via NTRU encryption 2013-11-27 20:21:40 +01:00
Tobias Brunner 0b506edb19 nm: Require the PSK to be at least 20 characters long 2013-11-27 18:36:58 +01:00
Tobias Brunner 692a421aa0 nm: German translation updated 2013-11-27 18:36:58 +01:00
Tobias Brunner 5ae822cfcd nm: Handle PSK option in NM backend 2013-11-27 18:36:58 +01:00
Tobias Brunner 594878e552 nm: Add PSK option to auth-dialog 2013-11-27 18:36:58 +01:00
Tobias Brunner 63528ebd3f nm: Add pre-shared key option in GUI 2013-11-27 18:36:58 +01:00
Tobias Brunner cfaec93111 nm: Make intltool recognize glade files properly 2013-11-27 18:36:58 +01:00
Tobias Brunner f5feeb04f3 charon-tkm: Don't run tests automatically during 'make check'
Due to the external dependencies these tests are quite inconvenient.
They can be run from the charon-tkm directory with 'make check-tkm'.
2013-11-27 18:35:44 +01:00
Reto Buerki 5221a16391 charon-tkm: Add Binder switches to test project to enable exception backtraces 2013-11-27 18:35:44 +01:00
Tobias Brunner d6032bff8b charon-tkm: Migrate tests to our own test runner
Due to problems with the external libraries tkm_init/deinit can't be
called for each test case.  Because of this leak detective has to be
disabled for these tests.
2013-11-27 18:35:44 +01:00
Tobias Brunner 70f4461359 charon-tkm: Support for out-of-tree build added 2013-11-27 18:35:44 +01:00
Tobias Brunner 20a48e4be3 chunk: Fix signedness warnings caused by chunk_from_* macros
There are countless other such warnings because e.g. chunk_create() is called
with char*, but at least we prevent users from causing such warnings
inadvertently when using these macros.
2013-11-27 18:28:44 +01:00
Martin Willi 1cbe4e6ce4 tun-device: Include <linux/types.h> before <linux/if_tun.h>
Fixes a build error on CentOS 6.4.
2013-11-22 09:09:06 +01:00
Tobias Brunner c61ca66a39 trap-manager: Reset IKE_SA on bus_t if initiating fails 2013-11-21 13:43:31 +01:00
Tobias Brunner bb492d80b5 trap-manager: Prevent deadlock when installing trap policies
Because the write lock was held while calling add_policies() on
child_sa_t, which finishes with a call to child_state_change() on bus_t,
a deadlock would ensue if CHILD_SAs are concurrently being established,
which also causes a call to child_state_change() that will require
the read lock in trap_manager_t.

No locks are now being held while creating the CHILD_SA and installing the
trap policies.
2013-11-21 11:12:59 +01:00
Martin Willi 07ca25909b printf-hook-builtin: Don't use %P to print uppercase hex pointers
We use %P as custom printf specifier for proposals.
2013-11-20 16:57:28 +01:00
Tobias Brunner 3bff80aee3 openssl: Verify that a peer's ECDH public value is a point on the elliptic curve
This check is mandated by RFC 6989.  Since we don't reuse DH secrets,
it is mostly a sanity check.
2013-11-19 15:00:28 +01:00
Tobias Brunner 38a4f1964e kernel-netlink: Enable TFC padding only for tunnel mode ESP SAs
The kernel does not allow them for transport mode SAs or IPComp SAs (and
of course not for AH SAs).

Fixes #446.
2013-11-19 12:44:16 +01:00
Andreas Steffen b63246c5db Implemented libstrongswan.plugins.random.strong_equals_true option 2013-11-16 00:11:40 +01:00
Tobias Brunner 85adb98daf android: New release based on 5.1.1
This fixes issues with IVs and padding in ESP handling and removes the
Vstr dependency.
2013-11-13 17:41:24 +01:00
Tobias Brunner 20c99edab9 android: Remove dependency on libvstr 2013-11-13 11:40:47 +01:00
Tobias Brunner 334f44cd29 unit-tests: Initialize tests with a callback 2013-11-06 10:31:07 +01:00
Tobias Brunner 8d2450d8b8 plugin-loader: Convenience function added to add plugin dirs in build tree 2013-11-06 10:31:07 +01:00
Martin Willi 09d0c9030a unit-tests: Separate test runner to a library, reusable by other tests
Other users may make use of the noinst libtest.la helper library to implement
unit tests. For libstrongswan, tests.[ch] provide the configuration for test
runner to perform unit tests in a simple manner.
2013-11-06 10:31:07 +01:00
Martin Willi 5a3230a250 unit-tests: Use some include magic to define test suite constructors
Avoid editing of several files when creating test suites by using a single
header file to define test suite constructor functions.
2013-11-06 10:31:07 +01:00
Martin Willi d9d0eef92b unit-tests: Check printing of strings having zero length 2013-11-06 10:31:07 +01:00
Martin Willi 61934203e2 unit-tests: Add some basic tests if PRI* printf specifiers work as expected 2013-11-06 10:31:06 +01:00
Martin Willi a4cbda35ce unit-tests: Add a semaphore wait cancel test 2013-11-06 10:31:06 +01:00
Martin Willi fae1b85223 unit-tests: Add a semaphore absolute timed wait test 2013-11-06 10:31:06 +01:00
Martin Willi a14935ea4b unit-tests: Add a semaphore timed wait test case 2013-11-06 10:31:06 +01:00
Martin Willi ffab2e0c95 unit-tests: Add a simple semaphore test 2013-11-06 10:31:06 +01:00
Martin Willi b1bfe59560 unit-tests: Add a spinlock test case 2013-11-06 10:31:06 +01:00
Martin Willi 478dc0257c unit-tests: Add a rwlock condvar thread cancel test 2013-11-06 10:31:05 +01:00
Martin Willi b92c173b28 unit-tests: Add a rwlock condvar absolute timed wait test 2013-11-06 10:31:05 +01:00
Martin Willi af19213c54 unit-tests: Add a rwlock condvar wait test 2013-11-06 10:31:05 +01:00
Martin Willi 1032f52d68 unit-tests: Add a rwlock condvar broadcast test 2013-11-06 10:31:05 +01:00
Martin Willi f644b9e853 unit-tests: Add a rwlock condvar test 2013-11-06 10:31:05 +01:00
Martin Willi dac31fe1a0 unit-tests: Add a rwlock test case 2013-11-06 10:31:05 +01:00
Martin Willi 8b25b5c36f unit-tests: Add a condvar test where wait gets cancelled 2013-11-06 10:31:04 +01:00
Martin Willi b7db393d01 unit-tests: Add a condvar test working on a recursive mutex 2013-11-06 10:31:04 +01:00
Martin Willi 8699a32b74 unit-tests: Add a condvar absolute timed wait test 2013-11-06 10:31:04 +01:00
Martin Willi 31f9f777b3 unit-tests: Add a condvar timed wait test 2013-11-06 10:31:04 +01:00
Martin Willi 9a0a891e6b unit-tests: Add condvar broadcast test 2013-11-06 10:31:04 +01:00
Martin Willi 13183a74d4 unit-tests: Add a simple condvar test 2013-11-06 10:31:04 +01:00
Martin Willi 21df985148 unit-tests: Add a thread local storage cleanup test 2013-11-06 10:31:03 +01:00
Martin Willi 0b00e63e49 unit-tests: Add a thread local storage fuzzer test 2013-11-06 10:31:03 +01:00
Martin Willi fd26b7ff1b unit-tests: Add a thread cleanup pop test 2013-11-06 10:31:03 +01:00
Martin Willi 4aec0c5543 unit-tests: Add cleanup test cases for different thread exit situations 2013-11-06 10:31:03 +01:00
Martin Willi e5b34086f1 unit-tests: Add a test for thread_cancellation_point() 2013-11-06 10:31:03 +01:00
Martin Willi 49e6848bd0 unit-tests: Add thread cancellability testing 2013-11-06 10:31:03 +01:00
Martin Willi 855747eab7 unit-tests: Add a simple thread_cancel() test 2013-11-06 10:31:02 +01:00
Martin Willi c320c61160 unit-tests: Add thread_exit() tests to both join and detach test cases 2013-11-06 10:31:02 +01:00
Martin Willi 274e6beb00 unit-tests: Add a simple thread detach test 2013-11-06 10:31:02 +01:00
Martin Willi 5d4a882f45 unit-tests: Add a simple thread join() test 2013-11-06 10:31:02 +01:00
Martin Willi b942528419 unit-tests: Add test suite for streams and services 2013-11-06 10:31:02 +01:00
Martin Willi 8eda87af86 unit-tests: Add a few test cases for watcher 2013-11-06 10:31:02 +01:00
Martin Willi 23b8f9bf86 unit-tests: Support testing multi-threaded code 2013-11-06 10:31:01 +01:00
Martin Willi f23fd4c59b unit-tests: Use a home-brew thread barrier to remove pthread dependency 2013-11-06 10:31:01 +01:00
Martin Willi b74b8addf8 unit-tests: Show how many test vectors have failed on test failure 2013-11-06 10:31:01 +01:00
Martin Willi b4d43a542f unit-tests: Skip fmemopen() based printf() tests if not available 2013-11-06 10:31:01 +01:00
Martin Willi 45766923b8 unit-tests: Avoid name clash with clone() from <sched.h> 2013-11-06 10:31:01 +01:00
Martin Willi 1254ad01b9 unit-tests: Fix a compiler warning in identification tests 2013-11-06 10:31:01 +01:00
Martin Willi 382fa8b419 unit-tests: Clean up memory in new asn1 unit tests
Test runner checks for leaks when leak detective is enabled.
2013-11-06 10:31:00 +01:00
Martin Willi 712940d161 unit-tests: Pass linked_list->invoke* varargs as uintptr_t
Passing integers of unspecified length may result in passing an integer shorter
than uintptr_t. When reading them back, we might get more data than passed,
resulting in a failure.
2013-11-06 10:31:00 +01:00
Martin Willi f7b8396af0 unit-tests: Initialize backtracing before printing any backtraces 2013-11-06 10:31:00 +01:00
Martin Willi bbb62267e0 thread: Note that tread_cancellation_point temporarily activates cancelability 2013-11-06 10:31:00 +01:00
Martin Willi 7a13990964 backtrace: Support backtracing even if library is not initialized
But of course backtracing must be initialized anyway using backtrace_init().
2013-11-06 10:31:00 +01:00
Martin Willi a5860cddae unit-tests: Enable libstrongswan tests even if --enable-unit-tests not set
As we don't depend on the check framework anymore, we can enable the unit tests
by default. These are built/executed with "make check" only, so it makes no
sense to disable them.
2013-11-06 10:31:00 +01:00
Martin Willi 35e8eb93a0 unit-tests: Implement testing framework without "check" 2013-11-06 10:30:59 +01:00
Martin Willi 56866ecf3d leak-detective: Call {gm,local}time_r() to allocate static buffer
On OS X Mavericks, these functions use a static allocation and are hard
to whitelist using other means.
2013-11-06 10:30:59 +01:00
Martin Willi ef6d78d6ef leak-detective: Register OS X specific hooks just once
If we initialize libstrongswan more than once in the same process, we may
not register the hooks twice.
2013-11-06 10:30:59 +01:00
Martin Willi f192526c3f leak-detective: Reset leak list during cleanup
This resets leak detective state should it get created/destroyed more than once.
2013-11-06 10:30:59 +01:00
Martin Willi a426851f63 leak-detective: Use callback functions to report leaks and usage information
This is more flexible than printing reports to a FILE.
2013-11-06 10:30:59 +01:00
Martin Willi 9ae1140118 unit-tests: Move test suites to its own subfolder 2013-11-06 10:30:58 +01:00
Tobias Brunner c49c3f3208 ikev2: Properly free DH secret in case of errors during IKE key derivation
Fixes #437.
2013-11-06 10:24:19 +01:00
Andreas Steffen 2da887da35 unit-tests: completed asn1_suite 2013-11-04 18:35:25 +01:00
Andreas Steffen 79b8a384b5 Updated test_runner.h with new suites 2013-11-03 21:34:42 +01:00
Andreas Steffen 7817d88e1a unit-tests: 100% function coverage for asn1.c 2013-11-03 17:40:51 +01:00
Andreas Steffen 54bce665c4 unit-tests: 12 asn1 functions tested 2013-11-02 21:20:04 +01:00
Andreas Steffen c3103700fc Some minor refactoring in asn1.c 2013-11-02 21:17:46 +01:00
Andreas Steffen 1347c936bd Do not free zero-length integer 2013-11-02 02:11:32 +01:00
Andreas Steffen a40c4bc28c unit-tests: Added tests for pen_type_t 2013-11-01 22:29:29 +01:00
Andreas Steffen 6db81edac3 Added IFOM_CAPABILITY notify message type 2013-11-01 14:07:11 +01:00
Andreas Steffen dc4dd88c42 Updated copyright statement 2013-11-01 13:46:58 +01:00
Martin Willi 10900ed7e7 charon-xpc: Set AUTH_RULE_IDENTITY_LOOSE on responder config
This allows the server to use a different IKE identity as long as the
configured hostname is contained in the certificate.
2013-11-01 12:05:48 +01:00
Martin Willi b76e96e2ef ike: Don't immediately DPD after deferred DELETEs following IKE_SA rekeying
Some peers seem to defer DELETEs a few seconds after rekeying the IKE_SA, which
is perfectly valid. For short(er) DPD delays, this leads to the situation where
we send a DPD request during set_state(), but the IKE_SA has no hosts set yet.
Avoid that DPD by resetting the INBOUND timestamp during set_state().
2013-11-01 11:33:29 +01:00
Volker Rümelin 643da9d2e6 ikev1: Properly initialize list of fragments in case fragment ID is 0
Fixes CVE-2013-6076.
2013-10-31 21:58:42 +01:00
Martin Willi 7f4a13fffb identification: Properly check length before comparing for binary DN equality
Fixes CVE-2013-6075.
2013-10-31 21:57:07 +01:00
Martin Willi ed3eb62723 unit-tests: Additionally do reverse match checking with empty identities 2013-10-31 21:57:07 +01:00
Martin Willi e02b12e374 unit-tests: Test matching against some empty data identities 2013-10-31 21:57:07 +01:00
Martin Willi df12b3a61f unit-tests: Test for equality against some empty data identities 2013-10-31 21:57:07 +01:00
Martin Willi c409be2506 unit-tests: Let identity equality test fail if a->equals(b) != b->equals(a) 2013-10-31 21:57:07 +01:00
Andreas Steffen 2590cd20d3 PB-TNC PDP_REFERRAL message doesn't have to be in RESULT batch 2013-10-31 12:01:47 +01:00
Ansis Atteka 4334735605 updown: fix segfault when interface name can't be resolved
The child_updown() function sets up environment variables to the updown
script. Sometimes call to hydra->kernel_interface->get_interface() could
fail and iface variable could be left uninitialized. This patch fixes
this issue by passing "unknown" as interface name.

Here is the stacktrace:

0  0x00007fa90791f445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
1  0x00007fa907922bab in abort () from /lib/x86_64-linux-gnu/libc.so.6
2  0x0000000000401ed7 in segv_handler (signal=11) at charon.c:183
3  <signal handler called>
4  0x00007fa90793221f in vfprintf () from /lib/x86_64-linux-gnu/libc.so.6
5  0x00007fa9079f0580 in __vsnprintf_chk () from /lib/x86_64-linux-gnu/libc.so.6
6  0x00007fa9079f04c8 in __snprintf_chk () from /lib/x86_64-linux-gnu/libc.so.6
7  0x00007fa8f9b95b86 in snprintf (
    __fmt=0x7fa8f9b961b8 "2>&1 PLUTO_VERSION='1.1' PLUTO_VERB='%s%s%s' PLUTO_CONNECTION='%s' PLUTO_INTERFACE='%s' PLUTO_REQID='%u' PLUTO_ME='%H' PLUTO_MY_ID='%Y' PLUTO_MY_CLIENT='%H/%u' PLUTO_MY_PORT='%u' PLUTO_MY_PROTOCOL='%u"..., __n=1024, __s=0x7fa8f7923440 "2>&1 PLUTO_VERSION='1.1' PLUTO_VERB='up-host' PLUTO_CONNECTION='remote-40.0.0.40' PLUTO_INTERFACE='\367\250\177")
    at /usr/include/x86_64-linux-gnu/bits/stdio2.h:65
8  child_updown (this=0x8486b0, ike_sa=0x7fa8e4005f80, child_sa=0x7fa8d4008290, up=true) at updown_listener.c:308
9  0x00007fa907ecc11c in ?? () from /usr/lib/strongswan/libcharon.so.0
10 0x00007fa907ef89bf in ?? () from /usr/lib/strongswan/libcharon.so.0
11 0x00007fa907ef2fc8 in ?? () from /usr/lib/strongswan/libcharon.so.0
12 0x00007fa907ee84ff in ?? () from /usr/lib/strongswan/libcharon.so.0
13 0x00007fa907ee3067 in ?? () from /usr/lib/strongswan/libcharon.so.0
14 0x00007fa90835e8fb in ?? () from /usr/lib/strongswan/libstrongswan.so.0
15 0x00007fa908360d30 in ?? () from /usr/lib/strongswan/libstrongswan.so.0
16 0x00007fa907cade9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
17 0x00007fa9079db4bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
18 0x0000000000000000 in ?? ()

Signed-Off-By: Ansis Atteka <aatteka@nicira.com>
2013-10-30 09:29:41 +01:00
Tobias Brunner 19046552b6 ipsec: Updated ipsec(8) 2013-10-29 17:22:45 +01:00
Tobias Brunner 71687f4fad ipsec: Remove unused distro.txt 2013-10-29 16:34:10 +01:00