Andreas Steffen [Thu, 16 Jan 2014 00:47:34 +0000 (01:47 +0100)]
Version bump to 5.1.2rc1
Andreas Steffen [Thu, 16 Jan 2014 00:46:55 +0000 (01:46 +0100)]
Added TPMRA workitem support in PTS database
Martin Willi [Wed, 15 Jan 2014 17:18:24 +0000 (18:18 +0100)]
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.
Andreas Steffen [Wed, 15 Jan 2014 11:06:22 +0000 (12:06 +0100)]
Do PTS measurements only if session initialisation was successful
Andreas Steffen [Wed, 15 Jan 2014 01:14:08 +0000 (02:14 +0100)]
Starting with 3.1.7 replaced bz2 with xz format
Andreas Steffen [Mon, 13 Jan 2014 11:12:52 +0000 (12:12 +0100)]
Version bump to 5.1.2dr3
Andreas Steffen [Mon, 13 Jan 2014 07:19:10 +0000 (08:19 +0100)]
Catch AIK errors
Andreas Steffen [Fri, 10 Jan 2014 10:53:50 +0000 (11:53 +0100)]
Do TPM measurements only if there is a TPMRA workitem
Andreas Steffen [Tue, 31 Dec 2013 12:13:32 +0000 (13:13 +0100)]
Allow reason strings to be used as workitem result string
Andreas Steffen [Thu, 26 Dec 2013 16:39:05 +0000 (17:39 +0100)]
Attestation IMV processes TPMRA workitem
Andreas Steffen [Thu, 26 Dec 2013 10:28:51 +0000 (11:28 +0100)]
Added TPM Remote Attestation (TPMRA) workitem
Tobias Brunner [Wed, 8 Jan 2014 10:24:24 +0000 (11:24 +0100)]
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.
Tobias Brunner [Mon, 6 Jan 2014 17:01:06 +0000 (18:01 +0100)]
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.
Tobias Brunner [Mon, 6 Jan 2014 16:31:07 +0000 (17:31 +0100)]
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.
Tobias Brunner [Mon, 6 Jan 2014 14:30:02 +0000 (15:30 +0100)]
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.
Tobias Brunner [Mon, 6 Jan 2014 13:17:20 +0000 (14:17 +0100)]
checksum: Delay building of checksum_builder until required by make install
This ensures PLUGINDIR includes any DESTDIR set during make install.
Tobias Brunner [Mon, 6 Jan 2014 12:37:12 +0000 (13:37 +0100)]
checksum: Remove unnecessary pluto symbol
Tobias Brunner [Mon, 6 Jan 2014 11:55:10 +0000 (12:55 +0100)]
stroke: Fix error message if parsing leftsourceip fails
Andreas Steffen [Fri, 20 Dec 2013 23:39:40 +0000 (00:39 +0100)]
Update PCR even if measurement does not equal reference value
Tobias Brunner [Fri, 20 Dec 2013 10:24:02 +0000 (11:24 +0100)]
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.
Tobias Brunner [Thu, 19 Dec 2013 10:02:23 +0000 (11:02 +0100)]
aes-test: Fix compiler warnings from older versions of GCC
Andreas Steffen [Fri, 13 Dec 2013 13:37:31 +0000 (14:37 +0100)]
Fixed check_file_measurement method in pts_database_t
Andreas Steffen [Sun, 8 Dec 2013 09:18:33 +0000 (10:18 +0100)]
unit-tests: NTRU test to check a special branch
Andreas Steffen [Sat, 7 Dec 2013 22:54:53 +0000 (23:54 +0100)]
min_MGF_hash_calls parameter is not needed anymore
Andreas Steffen [Sat, 7 Dec 2013 22:29:04 +0000 (23:29 +0100)]
Optimized MGF1 implementation
Andreas Steffen [Sat, 7 Dec 2013 22:27:59 +0000 (23:27 +0100)]
Implemented ntru_trits class
Andreas Steffen [Fri, 6 Dec 2013 23:21:28 +0000 (00:21 +0100)]
Streamlined DRBG and MGF1 debug output
Andreas Steffen [Fri, 6 Dec 2013 09:10:24 +0000 (10:10 +0100)]
Version bump to 5.1.2dr2
Andreas Steffen [Fri, 6 Dec 2013 09:09:36 +0000 (10:09 +0100)]
unit-tests: Added crypter tests
Andreas Steffen [Thu, 5 Dec 2013 21:55:47 +0000 (22:55 +0100)]
Added own MGF1 mask generating function
Andreas Steffen [Wed, 4 Dec 2013 22:09:32 +0000 (23:09 +0100)]
unit-tests: Added hasher tests
Andreas Steffen [Wed, 4 Dec 2013 20:23:30 +0000 (21:23 +0100)]
Moved test_rng to a test suite of its own
Tobias Brunner [Mon, 2 Dec 2013 10:16:04 +0000 (11:16 +0100)]
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.
Tobias Brunner [Thu, 28 Nov 2013 17:06:09 +0000 (18:06 +0100)]
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.
Tobias Brunner [Thu, 28 Nov 2013 17:02:18 +0000 (18:02 +0100)]
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.
Tobias Brunner [Thu, 28 Nov 2013 17:00:33 +0000 (18:00 +0100)]
unit-tests: Move ntru_test_rng_t to a utility class in libtest
Tobias Brunner [Thu, 28 Nov 2013 16:54:06 +0000 (17:54 +0100)]
unit-tests: Fix apidoc for libtest
Tobias Brunner [Thu, 28 Nov 2013 16:31:46 +0000 (17:31 +0100)]
ntru: Fix compiler warning caused by ++/-- on righthand side of an assignment
The behavior of stuff like x = --x; (or x++) is not defined.
Reto Buerki [Thu, 28 Nov 2013 12:51:33 +0000 (13:51 +0100)]
testing: Fix status output in build-baseimage script
Reto Buerki [Thu, 28 Nov 2013 08:36:52 +0000 (09:36 +0100)]
Remove check library from HACKING document
Reto Buerki [Thu, 28 Nov 2013 08:37:55 +0000 (09:37 +0100)]
charon-tkm: Abort if gprbuild binary is not found
Reto Buerki [Tue, 26 Nov 2013 16:20:59 +0000 (17:20 +0100)]
charon-tkm: Update integration tests
Adrian-Ken Rueegsegger [Tue, 26 Nov 2013 15:20:24 +0000 (16:20 +0100)]
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.
Adrian-Ken Rueegsegger [Tue, 26 Nov 2013 10:30:57 +0000 (11:30 +0100)]
charon-tkm: Drop unnecessary include
Andreas Steffen [Tue, 3 Dec 2013 07:17:39 +0000 (08:17 +0100)]
Fixed formatting in strongswan.conf
Tobias Brunner [Thu, 28 Nov 2013 18:04:47 +0000 (19:04 +0100)]
ike: Log SK_p consistently on level 4
Andreas Steffen [Wed, 27 Nov 2013 19:37:11 +0000 (20:37 +0100)]
Updated NEWS for 5.1.2dr1
Andreas Steffen [Mon, 25 Nov 2013 12:48:31 +0000 (13:48 +0100)]
Added DRBG automatic reseeding tests
Andreas Steffen [Sun, 24 Nov 2013 14:31:19 +0000 (15:31 +0100)]
Use strongSwan hash plugins for SHA-1 and SHA-256
Andreas Steffen [Sun, 24 Nov 2013 10:49:41 +0000 (11:49 +0100)]
Extended NIST SP 800-90A HMAC_DRBG test cases
Andreas Steffen [Sun, 24 Nov 2013 10:47:57 +0000 (11:47 +0100)]
Cleaned up ntru-crypto library
Andreas Steffen [Sun, 24 Nov 2013 01:22:25 +0000 (02:22 +0100)]
Implemented NIST SP 800-90A DRBG_HMAC with SHA-256
Andreas Steffen [Fri, 22 Nov 2013 20:24:51 +0000 (21:24 +0100)]
Added NTRU key exchange to default IKE proposal
Andreas Steffen [Fri, 22 Nov 2013 19:38:05 +0000 (20:38 +0100)]
unit-tests: Added ntru wrong ciphertext test
Andreas Steffen [Thu, 21 Nov 2013 22:51:02 +0000 (23:51 +0100)]
unit-tests: Added ntru entropy, retransmission and ciphertext tests
Andreas Steffen [Thu, 21 Nov 2013 21:08:16 +0000 (22:08 +0100)]
Any of the four NTRU parameter sets can be selected
Andreas Steffen [Wed, 20 Nov 2013 23:15:59 +0000 (00:15 +0100)]
Make the NTRU parameter set configurable
Andreas Steffen [Tue, 19 Nov 2013 23:14:07 +0000 (00:14 +0100)]
unit-tests: first NTRU test case
Andreas Steffen [Mon, 18 Nov 2013 20:18:11 +0000 (21:18 +0100)]
Added ikev2/net2net-ntru-cert and ikev2/rw-ntru-psk scenarios
Andreas Steffen [Mon, 18 Nov 2013 20:11:03 +0000 (21:11 +0100)]
Prototype implementation of IKE key exchange via NTRU encryption
Tobias Brunner [Wed, 27 Nov 2013 17:37:11 +0000 (18:37 +0100)]
Merge branch 'nm-psk'
This adds support for PSK authentication to the NetworkManager frontend.
Tobias Brunner [Mon, 25 Nov 2013 17:17:58 +0000 (18:17 +0100)]
nm: Require the PSK to be at least 20 characters long
Tobias Brunner [Fri, 22 Nov 2013 13:03:53 +0000 (14:03 +0100)]
nm: German translation updated
Tobias Brunner [Fri, 22 Nov 2013 13:02:56 +0000 (14:02 +0100)]
nm: Handle PSK option in NM backend
Tobias Brunner [Fri, 22 Nov 2013 13:02:24 +0000 (14:02 +0100)]
nm: Add PSK option to auth-dialog
Tobias Brunner [Fri, 22 Nov 2013 13:01:33 +0000 (14:01 +0100)]
nm: Add pre-shared key option in GUI
Tobias Brunner [Fri, 22 Nov 2013 11:31:51 +0000 (12:31 +0100)]
nm: Make intltool recognize glade files properly
Tobias Brunner [Thu, 14 Nov 2013 14:34:50 +0000 (15:34 +0100)]
configure: Remove obsolete --enable-unit-tests option
Tobias Brunner [Thu, 14 Nov 2013 14:27:40 +0000 (15:27 +0100)]
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'.
Reto Buerki [Wed, 6 Nov 2013 10:10:40 +0000 (11:10 +0100)]
charon-tkm: Add Binder switches to test project to enable exception backtraces
Tobias Brunner [Tue, 5 Nov 2013 17:29:40 +0000 (18:29 +0100)]
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.
Tobias Brunner [Tue, 5 Nov 2013 15:29:35 +0000 (16:29 +0100)]
charon-tkm: Support for out-of-tree build added
Tobias Brunner [Wed, 27 Nov 2013 16:52:10 +0000 (17:52 +0100)]
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.
Martin Willi [Tue, 19 Nov 2013 09:06:42 +0000 (10:06 +0100)]
tun-device: Include <linux/types.h> before <linux/if_tun.h>
Fixes a build error on CentOS 6.4.
Tobias Brunner [Thu, 21 Nov 2013 12:43:31 +0000 (13:43 +0100)]
trap-manager: Reset IKE_SA on bus_t if initiating fails
Tobias Brunner [Thu, 7 Nov 2013 08:50:12 +0000 (09:50 +0100)]
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.
Tobias Brunner [Thu, 21 Nov 2013 10:05:21 +0000 (11:05 +0100)]
coverage: Report branch coverage
Martin Willi [Tue, 19 Nov 2013 10:18:07 +0000 (11:18 +0100)]
printf-hook-builtin: Don't use %P to print uppercase hex pointers
We use %P as custom printf specifier for proposals.
Tobias Brunner [Tue, 19 Nov 2013 16:09:18 +0000 (17:09 +0100)]
testing: Config for Linux kernel 3.12
The most significant change is that CONFIG_ACPI_PROC_EVENT is now
finally removed (after being deprecated for a long time).
So to successfully shutdown the guests via ACPI the CONFIG_INPUT_EVDEV
option is now enabled.
Tobias Brunner [Tue, 19 Nov 2013 14:00:28 +0000 (15:00 +0100)]
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.
Tobias Brunner [Tue, 19 Nov 2013 11:41:31 +0000 (12:41 +0100)]
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.
Andreas Steffen [Tue, 19 Nov 2013 09:27:07 +0000 (10:27 +0100)]
Version bump to 5.1.2dr1
Andreas Steffen [Fri, 15 Nov 2013 23:11:40 +0000 (00:11 +0100)]
Implemented libstrongswan.plugins.random.strong_equals_true option
Tobias Brunner [Wed, 13 Nov 2013 16:41:24 +0000 (17:41 +0100)]
android: New release based on 5.1.1
This fixes issues with IVs and padding in ESP handling and removes the
Vstr dependency.
Tobias Brunner [Wed, 13 Nov 2013 10:29:59 +0000 (11:29 +0100)]
android: Remove dependency on libvstr
Martin Willi [Wed, 6 Nov 2013 09:16:56 +0000 (10:16 +0100)]
Merge branch 'unit-tests'
Replace the "check" based libstrongswan unit test framework with our own,
giving us more flexibility for our specific needs.
The new framework is more portable and uses complete libstrongswan init/deinit
cycles for each test to properly catch leaks. It fully supports multi-threaded
tests, and brings many of them for all threading primitives, watcher and
streams.
The --enable-unit-tests option is not required anymore for libstrongswan tests,
but still is for the still "check" based charon-tkm tests.
Tobias Brunner [Tue, 5 Nov 2013 16:45:20 +0000 (17:45 +0100)]
unit-tests: Initialize tests with a callback
Tobias Brunner [Tue, 5 Nov 2013 16:43:20 +0000 (17:43 +0100)]
plugin-loader: Convenience function added to add plugin dirs in build tree
Martin Willi [Tue, 5 Nov 2013 13:40:03 +0000 (14:40 +0100)]
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.
Martin Willi [Mon, 4 Nov 2013 15:41:22 +0000 (16:41 +0100)]
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.
Martin Willi [Fri, 25 Oct 2013 12:41:28 +0000 (14:41 +0200)]
unit-tests: Check printing of strings having zero length
Martin Willi [Fri, 25 Oct 2013 12:38:05 +0000 (14:38 +0200)]
unit-tests: Add some basic tests if PRI* printf specifiers work as expected
Martin Willi [Wed, 23 Oct 2013 13:44:22 +0000 (15:44 +0200)]
unit-tests: Add a semaphore wait cancel test
Martin Willi [Wed, 23 Oct 2013 13:23:42 +0000 (15:23 +0200)]
unit-tests: Add a semaphore absolute timed wait test
Martin Willi [Wed, 23 Oct 2013 13:18:59 +0000 (15:18 +0200)]
unit-tests: Add a semaphore timed wait test case
Martin Willi [Wed, 23 Oct 2013 12:54:00 +0000 (14:54 +0200)]
unit-tests: Add a simple semaphore test
Martin Willi [Wed, 23 Oct 2013 12:14:21 +0000 (14:14 +0200)]
unit-tests: Add a spinlock test case
Martin Willi [Tue, 22 Oct 2013 15:44:57 +0000 (17:44 +0200)]
unit-tests: Add a rwlock condvar thread cancel test
Martin Willi [Tue, 22 Oct 2013 15:41:37 +0000 (17:41 +0200)]
unit-tests: Add a rwlock condvar absolute timed wait test
Martin Willi [Tue, 22 Oct 2013 15:39:29 +0000 (17:39 +0200)]
unit-tests: Add a rwlock condvar wait test