Commit Graph
13403 Commits
Author SHA1 Message Date
Shea Levy 0efea2fd86 Don't fail to install if sysconfdir isn't writable 2014-09-26 10:52:37 +02:00
Martin Willi 55e85387bb ikev1: Be more verbose if a peer config would match, but is unusable for Mode 2014-09-25 17:21:54 +02:00
Tobias Brunner 9e3ab0d114 ikev2: Reorder task activation for established IKE SAs
We now prefer MOBIKE tasks over delete tasks then the rest.
2014-09-25 10:16:45 +02:00
Tobias Brunner b3a7ba14f1 Revert "ikev2: Insert MOBIKE tasks at the front of the queue"
This reverts commit 3293d14628.

The position of tasks in the queue does not actually determine the order
in which they are activated.  Instead this is determined by the
statements in task_manager_v2_t.initiate().
2014-09-25 10:16:45 +02:00
Martin Willi 0c8c965ca1 Merge branch 'curl-features'
Enable missing https:// support in the curl plugin by initializing libcurl
appropriately.

To initialize the SSL backend properly as required, we rely on our specific
crypto backends (openssl, gcrypt) that already provide this functionality.

Fixes #692.
2014-09-24 17:37:13 +02:00
Martin Willi ab23a0f86a travis: Disable soup in "all" test
On Ubuntu 12.04, there seems to be a resource leak related to pthread keys
when initializing glib or related libraries more than once. With our repeated
initialization for libstrongswan tests, we hit the following error:

  Lib (gthread-posix.c): Unexpected error from C library during
  'pthread_key_create': Resource temporarily unavailable.

The problem is not reproducible on a newer Gnome stack, hence we disable the
glib based soup plugin until we have a more recent Ubuntu on Travis.
2014-09-24 17:35:16 +02:00
Martin Willi a336aefa89 curl: For SSL features, depend on thread-safety provided by our crypto plugins
To use SSL in curl, we need to initialize the SSL library in a thread-safe
manner and provide the appropriate callbacks. As we already do that in our
crypto plugins using these libraries, we depend on these features.

This implies that we need the same plugin enabled (openssl, gcrypt) as the
curl backend is configured to use to fetch from HTTPS URIs.
2014-09-24 17:35:16 +02:00
Martin Willi 44b6a34d43 configure: Load fetcher plugins after crypto base plugins
Some fetcher plugins (such as curl) might build upon OpenSSL to implement
HTTPS fetching. As we set (and can't unset) threading callbacks in our
openssl plugin, we must ensure that OpenSSL functions don't get called after
openssl plugin unloading.

We achieve that by loading curl and all other fetcher plugins after the base
crypto plugins, including openssl.
2014-09-24 17:34:54 +02:00
Martin Willi d717b42b51 curl: Dynamically query supported protocols and register appropriate features 2014-09-24 11:35:59 +02:00
Martin Willi 6eaec1e349 leak-detective: Whitelist libssl SSL_COMP_get_compression_methods()
This function is called by libcurl initialization with SSL, and uses
a static allocation of compression algorithms not freed.
2014-09-24 11:35:59 +02:00
Martin Willi 85c95db17a curl: Try to initialize with SSL support to handle https:// URIs
If initialization fails, we fall back to the old behavior.
2014-09-24 11:35:59 +02:00
Martin Willi dcdcae0159 NEWS: Introduce charon-systemd 2014-09-24 11:35:03 +02:00
Martin Willi b3accbe2cb Merge branch 'netlink-cleanups'
In preparation for larger parallelization changes in kernel-netlink, this
merge does some general code cleanup in that plugin.
2014-09-24 11:20:53 +02:00
Martin Willi 5ea627bdfa watcher: Add a method to query the watcher state
This allows a user to check if the watcher is actually running, and potentially
perform read operations directly instead of relying on watcher.
2014-09-24 11:19:59 +02:00
Martin Willi 12c0bde689 kernel-netlink: Define and use rtnetlink message types 2014-09-24 11:19:59 +02:00
Martin Willi c94e93a7ab kernel-netlink: Pass protocol specific enum names to socket constructor
This avoid the hard dependency on enum names, and makes kernel_netlink_shared
independent of kernel_netlink_ipsec.
2014-09-24 11:19:59 +02:00
Martin Willi 5957e76b38 kernel-netlink: Clean up socket initialization, handle 0 as valid socket fd 2014-09-24 11:19:59 +02:00
Martin Willi 4c3aca273f kernel-netlink: Clean up response buffer management 2014-09-24 11:19:59 +02:00
Martin Willi de11d34abb kernel-netlink: Use recv() instead of recvfrom()
As we are not interested in the returned address, there is really no need
in passing that argument.
2014-09-24 11:19:59 +02:00
Martin Willi 4c438cf099 kernel-netlink: Avoid casting the NLMSG_DATA() return value
There is really no need for doing so, and it makes the code just unreadable.
2014-09-24 11:19:59 +02:00
Martin Willi 0404a29bfe kernel-netlink: Define netlink buffer as an union having a netlink header
This allows us to streamline the netlink buffers, and avoid extensive
casting.
2014-09-24 11:19:58 +02:00
Martin Willi 6fe02dda75 Merge branch 'systemd'
Introduces a systemd specific charon-systemd IKE daemon based on libcharon.
Uses systemd APIs for startup control and journal logging and a new systemd
service unit using swanctl as configuration backend.
2014-09-24 11:17:29 +02:00
Martin Willi 575d3ab19a travis: Disable build of native systemd IKE daemon
Travis still uses Ubuntu 12.04, where no systemd libraries are available. Skip
systemd support on Travis until we have a more recent Ubuntu distribution.
2014-09-22 14:19:38 +02:00
Martin Willi c59fad9dbd man: Skip installation of ipsec.conf/secrets manpages when not building starter 2014-09-22 14:19:38 +02:00
Martin Willi a3d03b4c71 init: Update starter systemd service to distinguish it from strongswan-swanctl 2014-09-22 14:19:38 +02:00
Martin Willi 0097141858 init: Provide a service file for charon-systemd using swanctl 2014-09-22 14:19:38 +02:00
Martin Willi b2f76c514d systemd: Check if ./configure detected a systemd system unit directory 2014-09-22 14:19:38 +02:00
Martin Willi db8ae75bf6 systemd: Discover and check systemd libraries with pkg-config during configure 2014-09-22 14:19:38 +02:00
Martin Willi e2d9f27c19 systemd: Add a native systemd journal logger 2014-09-22 14:19:37 +02:00
Martin Willi 5421092b75 plugin-loader: Support a reload() callback for static features 2014-09-22 13:55:12 +02:00
Martin Willi 73ed38e74f systemd: Provide a charon-systemd daemon targeting full systemd integration 2014-09-22 13:55:11 +02:00
Martin Willi d9a2f1330a swanctl: Complete --load-creds command summary 2014-09-22 13:55:11 +02:00
Martin Willi 71d85b33d9 swanctl: Fix description of load-pools command summary 2014-09-22 13:55:11 +02:00
Martin Willi 67402e67af swanctl: Add a --load-all command, performing --load-{creds,pools,conns} 2014-09-22 13:55:11 +02:00
Martin Willi 214a859cd6 swanctl: Add a --reload-settings command 2014-09-22 13:55:11 +02:00
Martin Willi 455e213cb0 vici: Add a command to reload strongswan.conf 2014-09-22 13:44:27 +02:00
Martin Willi 2dee0a85a6 encoding: Accept all exchange types for non IKEv1/IKEv2 major versions 2014-09-22 13:42:11 +02:00
Martin Willi d8ad0fc351 settings: Make loading a NULL or empty pattern a (nop-)success 2014-09-22 13:40:39 +02:00
Martin Willi 68da3bad57 settings: Use strongswan.conf used during library initialization for reload
Since 4b670a20 we require an explicit strongswan.conf to re-load configurations.
However, the define was missing in the build, breaking SIGHUP based config
reloading.

Fixes #651.
2014-09-22 13:40:39 +02:00
Martin Willi 9e783f6e89 library: Store the used root strongswan.conf configuration 2014-09-22 13:40:39 +02:00
Tobias Brunner 0bf2abf182 testing: Use multiple jobs to install strongSwan 2014-09-19 13:37:59 +02:00
Tobias Brunner 82136aa2cf testing: Add a script to build the current (or an arbitrary) source tree
This allows to (relatively) quickly (re-)build and install the current
or an arbitrary strongSwan source tree within the root image.

bindfs is used to bind mount the source directory using the regular user
and group (only works if sudo is used to run the script) so that newly
created files are not owned by root.

As with building the root image in general the guests must not be
running while executing this script.  The guest images are automatically
rebuilt after the root image has been updated so configuration files and
other modifications in guests will be lost.
2014-09-19 13:37:59 +02:00
Tobias Brunner f376503f41 testing: Add packages to rebuild strongSwan from the repository 2014-09-19 13:37:59 +02:00
Tobias Brunner ffcf8f4ea2 testing: Make strongSwan build recipe more configurable 2014-09-19 13:37:59 +02:00
Tobias Brunner bc9acd7b9e swanctl: Document --stats command 2014-09-19 11:30:08 +02:00
Reto Buerki e0d59e10f8 testing: Update certs and keys in tkm tests
References #705.
2014-09-17 17:08:35 +02:00
Reto Buerki 1004d395f5 testing: Update x509-ada version to 0.1.1
Fixes #705.
2014-09-17 17:07:29 +02:00
Tobias Brunner 22949c590f ikev2: Don't treat initial messages as MOBIKE exchanges
The MOBIKE task is active during the initial exchanges but we don't want
to treat them as actual MOBIKE exchanges (i.e. there is no path probing).
2014-09-16 15:05:12 +02:00
Tobias Brunner 8a6b01dd2a ikev1: Don't cache last block of INFORMATIONAL messages as IV
We don't expect a response with the same MID, but apparently some
devices (e.g. FRITZ!Box) do that for DPDs, while still treating the
response as a new exchange.  By storing the last message block as IV
we can't decrypt the first block of such a response.

Fixes #661.
2014-09-12 13:56:18 +02:00
Tobias Brunner 2e62f51bcc ikev1: Log IV when encrypting messages 2014-09-12 13:56:17 +02:00