Commit Graph
11228 Commits
Author SHA1 Message Date
Andreas Steffen e6952442f2 Exempt ignored PA-TNC attributes from error handling 2015-05-20 06:13:15 +02:00
Tobias Brunner 95faeaa7ed starter: Ensure the daemon executable exists when starting up
The only purpose of starter is to control the IKE daemon, so we
terminate it if the daemon executable is not found (e.g. because
DAEMON_NAME is incorrect).

This removes the charonstart setting (it was not actually configurable
anymore).
2015-05-08 19:05:26 +02:00
Tobias Brunner 5923abc6bf starter: Remove START_CHARON compile flag
Since the removal of pluto this is quite superfluous. The flag itself
might be useful to avoid starting charon if the executable does not
exist for some reason (e.g. if DAEMON_NAME is incorrect).
2015-05-05 17:56:46 +02:00
Tobias Brunner 9b4f6cfa23 charon-nm: Disable leak-detective in charon-nm
It segfaults immediately if it is enabled, at least on Ubuntu 14.04.
2015-05-05 17:53:47 +02:00
Tobias Brunner 32df0d81fb child-create: Destroy nonceg in migrate()
Since another nonce gets allocated later (if any was allocated already)
this would have resulted in a leaked nonce context ID when used in charon-tkm.
2015-05-05 10:55:14 +02:00
Tobias Brunner 252f2ef885 child-create: Fix error handling if nonceg can't be created
As with ike-init we can't return NULL in the task constructor.
2015-05-05 10:55:14 +02:00
Tobias Brunner 59565ebf60 ike-init: Fix error handling if nonceg can't be created
Returning FAILED in the constructor is wrong, but returning NULL doesn't work
either as it's currently assumed tasks always can be created.
Therefore, delay this check until we actually try to allocate a nonce.
2015-05-05 10:55:13 +02:00
Tobias Brunner d648d61375 ike-init: Fix compiler warning 2015-05-05 10:55:13 +02:00
Martin Willi 54d0d20bda swanctl: Fix --uri option
As we now pass the vici connection to the command dispatcher callback, we can't
parse the --uri option to create the connection from the same callback. Instead
pre-process the common command options in a separate loop, and ignore the same
options while processing the actual command.
2015-05-05 10:46:48 +02:00
Adrian-Ken Rueegsegger 38b65d7186 charon-tkm: Also store local SPI in SAD 2015-05-04 18:07:52 +02:00
Reto Buerki 0b308faf6d ike-init: Make nonceg a member of ike_init struct
This allows to control the life-cycle of a nonce in the context of the
ike init task. In the TKM use-case the nonce generator cannot be
destroyed before the ike init task is finalized, otherwise the created
nonce is detected as stale.
2015-05-04 18:07:51 +02:00
Reto Buerki 72376234cb child-create: Make nonceg a member of child_create struct
This allows to control the life-cycle of a nonce in the context of the
child create task. In the TKM use-case, it is required to reset the
nonce context if the created nonce is not consumed. This happens if the
child SA negotiation fails and it is detected before the SA is
established via the TKM kernel plugin (i.e. rekey collision).
2015-05-04 18:07:51 +02:00
Reto Buerki 8cdc563258 charon-tkm: Reset stale nonce contexts
If the nonce generator detects a stale nonce upon destroy(), it resets
the context in the TKM and releases associated resources in the ID
manager and chunk map.

Also, do not acquire the nonce context ID in tkm_nonceg_create function
but rather when the nonce is actually created by get_nonce().

The nonces created with get_nonce must also be registered in the chunk map.
2015-05-04 18:07:51 +02:00
Reto Buerki a8ca50e635 charon-tkm: Drop unneeded nonceg get_id function 2015-05-04 18:07:51 +02:00
Adrian-Ken Rueegsegger 5460098cce charon-tkm: Remove ESA nonce mappings from chunk map 2015-05-04 18:07:51 +02:00
Reto Buerki a0cf92a650 charon-tkm: Drop obsolete TKM_LIMIT define 2015-05-04 18:07:51 +02:00
Adrian-Ken Rueegsegger 2783bd17a4 charon-tkm: Select other ESA if any is present upon deletion
In the case that multiple ESAs exist (e.g. rekey collision) for a
security policy, make sure to select one of the remaining ESAs.
2015-05-04 18:07:51 +02:00
Adrian-Ken Rueegsegger c7ce0d96cd charon-tkm: Add get_other_esa_id function to TKM kernel SAD
The function gets the ESA id for another entry associated with the same
security policy as the specified ESA.
2015-05-04 18:07:50 +02:00
Adrian-Ken Rueegsegger ded14df603 charon-tkm: Only skip creation of first child SA
Use the new is_first boolean parameter of the
ALERT_KEEP_ON_CHILD_SA_FAILURE alert to determine if the failure was
caused by the first CHILD SA.
2015-05-04 18:07:50 +02:00
Adrian-Ken Rueegsegger 8262be3cdc Add bool param to ALERT_KEEP_ON_CHILD_SA_FAILURE alert
The parameter indicates if the alert is raised upon failure to establish
the first CHILD SA of an IKE SA.
2015-05-04 18:07:29 +02:00
Adrian-Ken Rueegsegger 9ae6b507b9 charon-tkm: Fix SAD insertion when adding ESA
Commit f5fc592 added the reqid to the SAD. The insert call swapped the
order of the esa_id and reqid parameters.
2015-05-04 17:23:51 +02:00
Timo Teräs 17d3435693 vici: Default to certificate subject for identity
If id is not specified and certificate authentication is used, use the
certificate subject name as identity. Simplifies configuration as in most cases
this is the right thing to do.

Signed-off-by: Timo Teräs <[email protected]>
2015-05-04 13:42:51 +02:00
Timo Teräs acbdf8c806 swanctl: Implement monitoring of IKE_SA and CHILD_SA changes
Signed-off-by: Timo Teräs <[email protected]>
2015-05-04 13:39:08 +02:00
Timo Teräs a7e4a2d6c2 vici: Add support for ike_sa and child_sa updown notifications
Useful for monitoring and management purposes.

Signed-off-by: Timo Teräs <[email protected]>
2015-05-04 13:38:39 +02:00
Timo Teräs 8d96f90a79 vici: Add function to test if an event should be generated
Useful to avoid generating vici messages if they are not needed and their
generation is heavy operation.

Signed-off-by: Timo Teräs <[email protected]>
2015-05-04 13:35:18 +02:00
Romain Francoise ea79cd6ade swanctl: Add missing unit in install-time log 2015-05-04 13:25:30 +02:00
Andreas Steffen 79b5a33c11 imv_policy_manager: Added capability to execute an allow or block shell command string 2015-04-26 10:55:24 +02:00
Andreas Steffen c1c6506391 Fixed PB-TNC directionality debug message 2015-04-24 11:16:16 +02:00
Tobias Brunner c5a41c9162 ike-vendor: Add some Microsoft vendor IDs 2015-04-21 15:30:51 +02:00
Tobias Brunner e4d2c9f187 leak-detective: Use passed callback to report leaks
This prevented `stroke memusage` from reporting the leaks on the
console.  Instead, they were sent to the callbacks set up by libstrongswan.

Fixes a426851f63 ("leak-detective: Use callback functions to report
leaks and usage information").
2015-04-20 11:22:55 +02:00
Tobias Brunner f9342fac8f openssl: Don't refer to EVP_des_ecb() if OpenSSL is built without DES support
While DES-ECB is not registered by the plugin in this case (so the
function will never actually be called), the compiler still warns
about the implicitly declared function.
2015-04-17 17:43:58 +02:00
Martin Willi b3811cfd52 strerror: Move to its own Doxygen subgroup 2015-04-16 14:50:41 +02:00
Martin Willi 80e05dc8fd utils: Clean up includes 2015-04-16 14:50:41 +02:00
Martin Willi 04f12ecd29 align: Move min/max/padding/alignment functions to separate files 2015-04-16 14:50:40 +02:00
Martin Willi eaa02bc925 time: Move time related functions to separate files 2015-04-16 14:50:24 +02:00
Martin Willi 1f2326ce58 object: Move OO programming helper macros to a separate header file 2015-04-16 14:50:05 +02:00
Martin Willi 1e02eddb72 status: Move status_t type and functions to separate files 2015-04-16 14:50:05 +02:00
Martin Willi 001a22e2c1 path: Move path related utility functions to separate files 2015-04-16 14:50:04 +02:00
Martin Willi 7585a85f1a tty: Move tty related functions to separate files 2015-04-16 14:50:04 +02:00
Martin Willi 7802ab88a1 memory: Move memory manipulation related functions to separate files 2015-04-16 14:50:02 +02:00
Martin Willi bbfe7a80b1 string: Move string related utility functions to separate files 2015-04-16 14:49:19 +02:00
Martin Willi 03cf888277 byteorder: Move byte order related functions to separate header file 2015-04-16 14:49:19 +02:00
Martin Willi 95726f7617 types: Use generic type definitions to separate header file 2015-04-16 14:49:19 +02:00
Martin Willi 717313c542 atomics: Move atomics/recounting support to separate files 2015-04-16 14:49:19 +02:00
Martin Willi 31a171f5c4 unit-tests: Further increase the test vector testing timeout
Some build bots running make check seem to have longer for the DH testing.
2015-04-16 10:15:13 +02:00
Martin Willi 7d1ffe013d test-vectors: Define test vector symbols as extern
We don't actually define a vector, but only prototype the test vector
implemented in a different file. GCC uses the correct symbol during testing,
but clang correctly complains about duplicated symbols during linking.
2015-04-16 09:38:14 +02:00
Tobias Brunner d1e7b31e80 Fix years in some copyright statements 2015-04-16 09:21:00 +02:00
Martin Willi 23947b2a4f aesni: Fix doxygen groups 2015-04-15 17:29:56 +02:00
Martin Willi 22458c18ff kernel-netlink: Don't mangle verbosity during test initialization
We now properly manage thread verbosity in the test framework, and don't need
to silence thread spawning messages.
2015-04-15 14:38:44 +02:00
Martin Willi 432d712048 unit-tests: Set test verbosity just after test suite loading
We see any plugin startup messages during suite configuration, where
initialization is called once to query plugin features. No need to be verbose
and show these messages once again in the first test.
2015-04-15 14:38:43 +02:00