Commit Graph

12236 Commits

Author SHA1 Message Date
Tobias Brunner 62e050e0ef testing: Add ipv6/rw-compress-ikev2 scenario 2014-01-23 10:27:13 +01:00
Tobias Brunner 6055e347f8 testing: Add ikev2/compress-nat scenario 2014-01-23 10:27:13 +01:00
Tobias Brunner 1fde30cc23 testing: Enable firewall for ikev2/compress scenario
Additionally, send a regular (small) ping as the kernel does not
compress small packets and handles those differently inbound.
2014-01-23 10:27:13 +01:00
Tobias Brunner fe2a2d1885 kernel-netlink: Set selector on transport mode IPComp SAs 2014-01-23 10:27:13 +01:00
Tobias Brunner cc04a6db3e kernel-netlink: Selectively add selector on SAs that use IPComp
Don't add a selector to tunnel mode SAs, these might serve multiple
traffic selectors but with only one selector on the SA only the traffic
matching the first one would actually get tunneled.
2014-01-23 10:27:12 +01:00
Tobias Brunner 7e3bbcf77a updown: Increase buffer size for script and environment variables 2014-01-23 10:27:12 +01:00
Tobias Brunner 6d1198e71d updown: Allow IPIP traffic if IPComp was negotiated
The kernel implicitly creates an IPIP SA if an IPComp SA is installed.
This SA is used inbound for small packets that are not compressed.

Since the addresses are different (they are the tunnel addresses not
those of the tunneled traffic) additional rules are required if the
traffic selector does not cover the tunnel addresses (e.g. due to a NAT).

For SAs with multiple traffic selectors duplicate rules will get installed.
2014-01-23 10:27:12 +01:00
Tobias Brunner cf4a7395aa updown: Add PLUTO_IPCOMP to indicate if IPComp was negotiated 2014-01-23 10:27:12 +01:00
Tobias Brunner 72a92d4f7d curl: Replace spaces in URIs with %20
cURL requires the URIs to be URL-encoded. Apparently, some CAs encode CRL
URIs with spaces in them.

Fixes #454.
2014-01-23 10:19:30 +01:00
Tobias Brunner ccb6758e5b utils: Add strreplace function 2014-01-23 10:18:23 +01:00
Tobias Brunner f44b1eb444 stroke: Ensure the buffer of strings in a stroke_msg_t is null-terminated
Otherwise a malicious user could send an unterminated string to cause
unterminated reads.
2014-01-23 10:15:07 +01:00
Tobias Brunner 5ab03863b0 stroke: Add an option to prevent log level changes via stroke socket 2014-01-23 10:15:07 +01:00
Tobias Brunner 040cf911a6 pki: Make sure no command registers too many options 2014-01-23 10:12:24 +01:00
Tobias Brunner 079e6c2b04 pki: Increase MAX_COMMANDS to cover all currently available commands
Fixes #452.
2014-01-23 10:12:15 +01:00
Tobias Brunner 2b8224fce3 pki: Print a warning if MAX_COMMANDS is too low 2014-01-23 10:10:53 +01:00
Tobias Brunner b0e14fcba6 pki: Properly use ?: when defining option arrays 2014-01-23 10:10:53 +01:00
Tobias Brunner 2d7852d29a configure: Add -Wno-format-security to default CFLAGS
Either due to a change in Ubuntu 13.10 or GCC 4.8 -Wno-format has no
effect if -Wformat-security is enabled (which it is on Ubuntu) so we
also disable the latter by default.
2014-01-23 10:08:53 +01:00
Tobias Brunner 54ca25800c agent: Keep CAP_DAC_OVERRIDE to connect to ssh-agent socket
This is also required if charon-cmd is used with capability dropping.
2014-01-23 10:08:23 +01:00
Tobias Brunner 53d2164c5d ike: Simplify error handling if name resolution failed
This avoids a second name resolution attempt just to determine if %any
etc. was configured.

Fixes #440.
2014-01-23 10:04:19 +01:00
Tobias Brunner be8af56e7a ike: Use proper hostname(s) when name resolution failed
Was wrong since 0edce68767.

Fixes #440.
2014-01-23 10:03:50 +01:00
Tobias Brunner 72ffb20318 ikev2: Wipe (optional) shared secret during CHILD_SA key derivation 2014-01-23 09:54:18 +01:00
Tobias Brunner e465c006e5 checksum must be the last subdir included
Otherwise charon-cmd will not yet be installed when the checksums are
calculated (now from the install dir, not the build dir).

Fixes #496.
2014-01-23 09:43:45 +01:00
Martin Willi b034131555 unit-tests: Pass a test suite collection name to print during test execution
As we except to get more and more test runners for the different components,
we add a name to easily identify them on the test output.
2014-01-22 15:34:53 +01:00
Martin Willi 589fab2260 array: Add an array_get() function 2014-01-22 15:34:53 +01:00
Martin Willi 027cf7ddcf watcher: Don't complain if select() syscall got interrupted 2014-01-22 15:34:53 +01:00
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 50d292d7d8 man: Add documentation of the dhcp interface option
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2014-01-20 16:40:34 +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 800b361e19 Version bump to 5.1.2rc1 2014-01-16 01:47:34 +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 fde42c15fd Starting with 3.1.7 kernel.org replaced bz2 with xz format 2014-01-15 02:14:08 +01:00
Andreas Steffen f74c8be19b Version bump to 5.1.2dr3 2014-01-13 12:12:52 +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