Commit Graph

14781 Commits

Author SHA1 Message Date
Denis Volpato Martins 337cf81aef duplicheck: Include required headers for FreeBSD
Closes strongswan/strongswan#34.
2016-03-03 09:34:03 +01:00
Thomas Egerer 2080c7e1e2 charon: Add custom logger to daemon
This logger can be used to easily register custom logging instances
using __attribute__((constructor)) benefiting from the global reload
mechanism (with reset of log levels).

Note that this is not intended to be used from plugins, which are loaded
after loggers have already been initialized.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2016-03-01 11:48:52 +01:00
Tobias Brunner fedb16236c vici: Correctly document 'up' key for updown events
Instead of sending 'no' it is omitted when an SA goes down.
2016-03-01 11:05:34 +01:00
Thomas Egerer 7823393926 ikev2: Use config value for sending of vendor IDs
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2016-03-01 10:52:59 +01:00
Chris Patterson b84e905482 swanctl: Fix minor typos in documentation
"UPD" should be "UDP".

Signed-off-by: Chris Patterson <pattersonc@ainfosec.com>
2016-02-29 11:05:44 +01:00
Andreas Steffen efefa0c6a1 testing: Added swanctl/shunt-policies-nat-rw 2016-02-28 22:25:50 +01:00
Andreas Steffen 13891e2a4f testing: Some minor fixes in test scenarios 2016-02-28 22:25:21 +01:00
Andreas Steffen 794cfbad71 Version bump to 5.4.0dr7 2016-02-28 15:56:06 +01:00
Andreas Steffen 68c9f0bb80 testing: Added swanctl/protoport-dual scenario 2016-02-28 14:33:48 +01:00
Andreas Steffen ddf1fc7692 testing: converted af-alg scenarios to swanctl 2016-02-26 13:31:36 +01:00
Tobias Brunner 4625113b1a testing: Use absolute path to the _updown script in SQL scenarios
/usr/local/sbin is not included in PATH set by the charon init script and
since the ipsec script is obsolete when using swanctl it makes sense to
change this anyway.
2016-02-17 12:00:20 +01:00
Tobias Brunner c674233804 ike-sa-manager: Store a reference to the thread that checked out an IKE_SA
This could be helpful when debugging deadlocks that manifest around
wait_for_entry(), as it helps identifying other involved threads (the
thread object is seen in the thread_main() call in each thread's backtrace).
2016-02-17 11:21:42 +01:00
Andreas Steffen 963b080810 testing: Increased ping interval in ikev2/trap-any scenario 2016-02-16 18:21:19 +01:00
Andreas Steffen fc0f8466db Version bump to 5.4.0dr6 2016-02-16 18:17:44 +01:00
Andreas Steffen 726a45b2f2 Corrected the description of the swanctl/dhcp-dynamic scenario 2016-02-16 18:17:17 +01:00
Andreas Steffen 4d83c5b4a6 Fix of the mutual TNC measurement use case
If the IKEv2 initiator acting as a TNC server receives invalid TNC measurements
from the IKEv2 responder acting as a TNC clienti, the exchange of PB-TNC batches
is continued until the IKEv2 responder acting as a TNC server has also finished
its TNC measurements.

In the past if these measurements in the other direction were correct
the IKEv2 responder acting as EAP server declared the IKEv2 EAP authentication
successful and the IPsec connection was established even though the TNC
measurement verification on the EAP peer side failed.

The fix adds an "allow" group membership on each endpoint if the corresponding
TNC measurements of the peer are successful. By requiring a "allow" group
membership in the IKEv2 connection definition the IPsec connection succeeds
only if the TNC measurements on both sides are valid.
2016-02-16 18:00:27 +01:00
Tobias Brunner 70934d9436 kernel-netlink: Allow Netlink send buffer size to be configured via compile option
The receive buffer size can already be changed via strongswan.conf if
necessary.
2016-02-12 15:08:34 +01:00
Tobias Brunner 10c5981d3b utils: Add enum name for pseudo log group 'any' 2016-02-05 15:41:39 +01:00
Tobias Brunner e8140531fc libipsec: Pass the same data to del_policy() as to add_policy()
We already do this for the other kernel interfaces.

Fixes e1e88d5add ("libipsec: Don't attempt deletion of any non-IPsec policies")
2016-02-04 11:02:59 +01:00
Tobias Brunner e1e88d5add libipsec: Don't attempt deletion of any non-IPsec policies
An example are the fallback drop policies installed when updating SAs.
We ignore such policies in add_policy() so there is no point in attempting
to remove them.  Since they use different priorities than regular policies
this did not result in policies getting deleted unintentionally but there
was an irritating log message on level 2 that indicated otherwise.
2016-02-04 10:30:56 +01:00
Andreas Steffen ac134b470a testing: Added swanctl/dhcp-dynamic scenario 2016-02-03 12:10:59 +01:00
Thomas Egerer 3d15269af9 ikev2: Add debug message about failed IKE authentication
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2016-02-02 16:16:49 +01:00
Thomas Egerer beb4a07ea8 ikev1: Log successful authentication with signature scheme
Output is now identical to that of the IKEv2 pubkey authenticator.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2016-02-01 15:58:53 +01:00
Tobias Brunner b4ae9e81f5 peer-cfg: Set DPD timeout to at least DPD delay
If DPD timeout is set but to a value smaller than the DPD delay the code
in task_manager_v1.c:queue_liveliness_check will run into an integer
underrun.
2016-02-01 15:29:25 +01:00
Tobias Brunner 24ab8530e5 ikev1: Always enable charon.reuse_ikesa
With IKEv1 we have to reuse IKE_SAs as otherwise the responder might
detect the new SA as reauthentication and will "adopt" the CHILD_SAs of
the original IKE_SA, while the initiator will not do so.  This could
cause CHILD_SA rekeying to fail later.

Fixes #1236.
2016-02-01 11:37:41 +01:00
Tobias Brunner db57f5702b load-tester: Register kernel-ipsec implementation as plugin feature
Otherwise, libcharon's dependency on kernel-ipsec can't be satisfied.

This changed with db61c37690 ("kernel-interface: Return bool for
kernel interface registration") as the registration of further
kernel-ipsec implementations now fails and therefore even if other
plugins are loaded the dependency will not be satisfied anymore.

References #953.
2016-02-01 11:22:56 +01:00
Tobias Brunner 7f2a20a4f4 child-rekey: Suppress updown event when deleting redundant CHILD_SAs
When handling a rekey collision we might have to delete an already
installed redundant CHILD_SA (or expect the other peer to do so).
We don't want to trigger updown events for these as neither do we do
so for successfully rekeyed CHILD_SAs.

Fixes #853.
2016-02-01 11:04:16 +01:00
Tobias Brunner 4cfcbe97a4 testing: Don't attempt to start the daemon twice in ha/active-passive scenario 2016-02-01 10:51:12 +01:00
Tobias Brunner 9c773f8d11 ha: Properly sync IKEv1 IV if gateway is initiator
To handle Phase 2 exchanges on the other HA host we need to sync the last
block of the last Phase 1 message (or the last expected IV).  If the
gateway is the initiator of a Main Mode SA the last message is an
inbound message.  When handling such messages the expected IV is not
updated until it is successfully decrypted so we can't sync the IV
when processing the still encrypted (!plain) message.  However, as responder,
i.e. if the last message is an outbound message, the reverse applies, that
is, we get the next IV after successfully encrypting the message, not
while handling the plain message.

Fixes #1267.
2016-02-01 10:51:02 +01:00
Tobias Brunner b5c2ed5016 ha: Add DH group to CHILD_ADD message
References #1267.
2016-02-01 10:50:53 +01:00
Tobias Brunner f1e908837a ha: Add DH group to IKE_ADD message
It is required for IKEv1 to determine the DH group of the CHILD SAs
during rekeying. It also fixes the status output for HA SAs, which so
far haven't shown the DH group on the passive side.

Fixes #1267.
2016-02-01 10:50:41 +01:00
Tobias Brunner e663d8e2bf ike-sa-manager: Don't update entries for init messages after unlocking segment
If the retransmit of an initial message is processed concurrently with the
original message it might not have been handled as intended as the
thread processing the retransmit might not have seen the correct value
of entry->processing set by the thread handling the original request.

For IKEv1, i.e. without proper message IDs, there might still be races e.g.
when receiving a retransmit of the initial IKE message while processing the
initiator's second request.

Fixes #1269.
2016-02-01 10:39:29 +01:00
Tobias Brunner fbbbe43ec1 unit-tests: The pseudonym RDN is now recognized, so use something more exotic 2016-01-28 16:01:24 +01:00
Andreas Steffen 927f733159 Version bump to 5.4.0dr5 2016-01-28 09:41:05 +01:00
Andreas Steffen 7c81942357 Support pseudonym RDN 2016-01-27 11:38:18 +01:00
Andreas Steffen 67a38ac6f1 testing: Added swanctl/config-payload scenario 2016-01-14 06:31:28 +01:00
Andreas Steffen e7b5171e43 testing: Use include statement in swanctl/rw-pubkey-keyid scenario 2016-01-14 01:44:17 +01:00
Andreas Steffen 9492e12e61 Version bump to 5.4.0dr4 2016-01-10 01:39:08 +01:00
Andreas Steffen ffd29ab30a vici: Support multiple named raw ublic keys 2016-01-10 00:12:57 +01:00
Andreas Steffen 2aa2b17d41 testing: swanctl/rw-pubkey-anon uses anonymous public keys in remote access scenario 2016-01-09 07:23:30 +01:00
Andreas Steffen abe6d07463 swanctl: Load pubkeys with load-creds 2016-01-09 07:23:30 +01:00
Andreas Steffen b83cef2412 testing: added swanctl scenarios net2net-pubkey, rw-pubkey-keyid and rw-dnssec 2016-01-09 07:23:30 +01:00
Andreas Steffen 4c38c79452 vici: list-cert sends subject, not-before and not-after attributes for pubkeys 2016-01-09 07:23:30 +01:00
Andreas Steffen 87371460f6 vici: Support of raw public keys 2016-01-09 07:23:29 +01:00
Andreas Steffen bffbf2f5fd testing: Fixed description of swanctl/frags-iv4 scenario 2016-01-09 00:17:31 +01:00
Andreas Steffen e333d4c0f1 swanctl.conf: IKEv2 fragmentation supported 2016-01-09 00:06:12 +01:00
Andreas Steffen 1990eeebfe Version bump to 5.4.0dr3 2016-01-03 06:28:49 +01:00
Andreas Steffen 9121f6cce1 vici: Enable transport encoding of CERT_TRUSTED_PUBKEY objects 2016-01-03 06:28:49 +01:00
Andreas Steffen 9db530493f testing: Change sql scenarios to swanctl 2016-01-03 06:28:48 +01:00
Tobias Brunner 1a79525559 testing: Fix some IKEv1 scenarios after listing DH groups for CHILD_SAs 2015-12-21 12:14:12 +01:00