Commit Graph

14039 Commits

Author SHA1 Message Date
Tobias Brunner 48087e0944 libtnccs: Fix apidoc category for split IF-TNCCS 2.0 header files
Fixes 80322d2cee ("Split IF-TNCCS 2.0 protocol processing into
separate TNC client and server handlers").
2015-03-25 12:00:20 +01:00
Tobias Brunner a2ec3b0546 Fixed some typos, courtesy of codespell 2015-03-25 12:00:20 +01:00
Tobias Brunner a3c2edb19c kernel-netlink: Copy current usage stats to new SA in update_sa()
This is needed to fix usage stats sent via RADIUS Accounting if clients
use MOBIKE or e.g. the kernel notifies us about a changed NAT mapping.
The upper layers won't expect the stats to get reset if only the IPs have
changed (and some kernel interface might actually allow such updates
without reset).

It also fixes traffic based lifetimes in such situations.

Fixes #799.
2015-03-25 12:00:20 +01:00
Tobias Brunner 70728eb1b6 child-sa: Add a new state to track rekeyed IKEv1 CHILD_SAs
This is needed to handle DELETEs properly, which was previously done via
CHILD_REKEYING, which we don't use anymore since 5c6a62ceb6 as it prevents
reauthentication.
2015-03-25 12:00:20 +01:00
Martin Willi 66147ef670 ikev1: Inverse check when applying received KE value during Quick Mode
Fixes Quick Mode negotiation when PFS is in use.
2015-03-24 09:37:38 +01:00
Andreas Steffen cf9befcba4 Version bump to 5.3.0rc1 2015-03-23 23:15:31 +01:00
Andreas Steffen be04f90815 testing: added tnc/tnccs-20-mutual scenario 2015-03-23 23:01:13 +01:00
Andreas Steffen 7b4a96b2f7 Implemented PB-TNC mutual half-duplex protocol 2015-03-23 22:25:43 +01:00
Andreas Steffen c6aed8aa21 Optionally announce PB-TNC mutual protocol capability 2015-03-23 22:25:43 +01:00
Andreas Steffen 80322d2cee Split IF-TNCCS 2.0 protocol processing into separate TNC client and server handlers 2015-03-23 22:25:42 +01:00
Martin Willi e64ddb5daf Merge branch 'dh-checks'
Extend the diffie-hellman interface by success return values, and do some
basic length checks for DH public values.
2015-03-23 18:24:39 +01:00
Martin Willi 41fc94c924 encoding: Remove DH public value verification from KE payload
This commit reverts 84738b1a and 2ed5f569.

As we have no DH group available in the KE payload for IKEv1, the verification
can't work in that stage. Instead, we now verify DH groups in the DH backends,
which works for any IKE version or any other purpose.
2015-03-23 17:54:03 +01:00
Martin Willi 0356089d0f diffie-hellman: Verify public DH values in backends 2015-03-23 17:54:03 +01:00
Martin Willi a777155ffe diffie-hellman: Add a bool return value to set_other_public_value() 2015-03-23 17:54:03 +01:00
Martin Willi 42431690e0 diffie-hellman: Add a bool return value to get_my_public_value() 2015-03-23 17:54:03 +01:00
Martin Willi 8a7dbf3c2a libimcv: Allow pts_t.set_peer_public_value() to fail 2015-03-23 17:54:02 +01:00
Martin Willi 83cda57e2d libimcv: Allow pts_t.get_my_public_value() to fail 2015-03-23 17:54:02 +01:00
Martin Willi 520d58e010 encoding: Allow ke_payload_create_from_diffie_hellman() to fail 2015-03-23 17:54:02 +01:00
Martin Willi bace1d6479 diffie-hellman: Use bool instead of status_t as get_shared_secret() return value
While such a change is not unproblematic, keeping status_t makes the API
inconsistent once we introduce return values for the public value operations.
2015-03-23 17:54:02 +01:00
Martin Willi 4909612c3b load-tester: Migrate NULL DH implementation to INIT/METHOD macros 2015-03-23 17:54:02 +01:00
Tobias Brunner a7172ddaff ikev1: Make sure SPIs in an IKEv1 DELETE payload match the current SA
OpenBSD's isakmpd uses the latest ISAKMP SA to delete other expired SAs.
This caused strongSwan to delete e.g. a rekeyed SA even though isakmpd
meant to delete the old one.

What isakmpd does might not be standard compliant. As RFC 2408 puts
it:

  Deletion which is concerned with an ISAKMP SA will contain a
  Protocol-Id of ISAKMP and the SPIs are the initiator and responder
  cookies from the ISAKMP Header.

This could either be interpreted as "copy the SPIs from the ISAKMP
header of the current message to the DELETE payload" (which is what
strongSwan assumed, and the direction IKEv2 took it, by not sending SPIs
for IKE), or as clarification that ISAKMP "cookies" are actually the
SPIs meant to be put in the payload (but that any ISAKMP SA may be
deleted).
2015-03-23 17:23:57 +01:00
Tobias Brunner 8a0cc3f362 encoding: Add getter for IKE SPIs in IKEv1 DELETE payloads 2015-03-23 17:23:57 +01:00
Tobias Brunner 2872f77829 pki: Choose default digest based on the signature key 2015-03-23 17:22:31 +01:00
Tobias Brunner ae0604f583 pki: Use SHA-256 as default for signatures
Since the BLISS private key supports this we don't do any special
handling anymore (if the user choses a digest that is not supported,
signing will simply fail later because no signature scheme will be found).
2015-03-23 17:22:31 +01:00
Tobias Brunner 7fa03b308c trap-manager: Add option to ignore traffic selectors from acquire events
The specific traffic selectors from the acquire events, which are derived
from the triggering packet, are usually prepended to those from the
config.  Some implementations might not be able to handle these properly.

References #860.
2015-03-23 15:55:28 +01:00
Tobias Brunner cb461de2a2 unit-tests: Fix settings test after merging multi-line strings 2015-03-23 10:46:32 +01:00
Martin Willi d143e7b04b swanctl: Append /ESN to proposal for a CHILD_SA using Extended Sequence Numbers
We previously printed just the value for the "esn" keyword, which is "1", and
not helpful as such.

Fixes #904.
2015-03-23 10:15:07 +01:00
Martin Willi e284a861b8 unit-tests: Depend on SHA1/SHA256 features for mgf1 test cases 2015-03-23 09:53:34 +01:00
Tobias Brunner a83d1245d8 man: More accurately describe features of the new parser in ipsec.conf(5) 2015-03-20 18:37:22 +01:00
Tobias Brunner d148c7ab6c settings: Merge quoted strings that span multiple lines 2015-03-20 18:37:22 +01:00
Tobias Brunner 79ebdc0788 starter: Merge quoted strings that span multiple lines 2015-03-20 18:37:22 +01:00
Tobias Brunner 2ed5f5693d encoding: Don't verify length of IKEv1 KE payloads
The verification introduced with 84738b1aed ("encoding: Verify the length
of KE payload data for known groups") can't be done for IKEv1 as the KE
payload does not contain the DH group.
2015-03-20 16:37:59 +01:00
Tobias Brunner d2f4345b03 charon-systemd: Optionally load plugin list from charon-systemd.load 2015-03-19 18:37:24 +01:00
Martin Willi 945fdeb918 apidoc: Limit INPUT to src subdirectory and README.md
While 0909bf6c explicitly includes the whole source tree (to cover README.md),
this has the unpleasant side effect of covering a workspace under "testing"
with all its sources, or any other potential subdirectory that exists.
2015-03-19 12:17:03 +01:00
Martin Willi b546a98e0a utils: Fix enum_flags_to_string parameter name to match Doxygen description 2015-03-19 12:14:30 +01:00
Martin Willi fd6cc7f243 attr-sql: Rename sql_attribute_t to attr_sql_provider_t
As the plugin has its origins in the sql plugin, it still uses the naming
scheme for the attribute provider implementation. Rename the class to better
match the naming scheme we use in any other plugin
2015-03-19 11:24:31 +01:00
Tobias Brunner 31be582399 ikev1: Adopt virtual IPs on new IKE_SA during re-authentication
Some clients like iOS/Mac OS X don't do a mode config exchange on the
new SA during re-authentication.  If we don't adopt the previous virtual
IP Quick Mode rekeying will later fail.

If a client does do Mode Config we directly reassign the VIPs we migrated
from the old SA, without querying the attributes framework.

Fixes #807, #810.
2015-03-19 10:32:06 +01:00
Tobias Brunner 5c6a62ceb6 ikev1: Mark rekeyed CHILD_SAs as INSTALLED
Since we keep them around until they finally expire they otherwise would block
IKE_SA rekeying/reauthentication.
2015-03-19 10:24:15 +01:00
Tobias Brunner 7d02f8dbf4 mem-pool: Remove entries without online or offline leases
This avoids filling up the hash table with unused/old identities.

References #841.
2015-03-19 09:55:56 +01:00
Tobias Brunner f30be6a92f kernel-handler: Log new endpoint if NAT mapping changed 2015-03-19 09:54:10 +01:00
Tobias Brunner 46188b0eb0 child-sa: Remove policies before states to avoid acquire events for untrapped policies 2015-03-19 09:54:03 +01:00
Martin Willi c5f4e7c69e Merge branch 'vici-python'
Introduce a Python Egg for the vici plugin, contributed by Björn Schuberg.
2015-03-18 15:03:28 +01:00
Martin Willi 2185c29b65 NEWS: Introduce vici Python Egg 2015-03-18 14:29:46 +01:00
Martin Willi 75a8457922 travis: Install pip to install pytest in "all" tests
This allows ./configure to detect py.test, and execute python unit tests we
provide in the vici python egg.
2015-03-18 14:29:45 +01:00
Björn Schuberg 2e74aa0a91 vici: Add support for python 3 2015-03-18 13:59:15 +01:00
Martin Willi c7e3c5943f vici: Execute python tests during "check" if py.test is available 2015-03-18 13:59:15 +01:00
Martin Willi 07302b2f7c configure: Check optional py.test availability when building with python eggs 2015-03-18 13:59:15 +01:00
Björn Schuberg c193b5947a vici: Add test of Packet layer in python library 2015-03-18 13:59:15 +01:00
Björn Schuberg 9b97029a5f vici: Add test of Message (de)serialization in python library 2015-03-18 13:59:15 +01:00
Martin Willi b5d17e55d7 vici: Evaluate Python streamed command results, and raise CommandException 2015-03-18 13:59:14 +01:00