Commit Graph

13483 Commits

Author SHA1 Message Date
Tobias Brunner 144b40e07c testing: Update ikev1/net2net-fragmentation scenario 2014-10-10 09:32:42 +02:00
Tobias Brunner 8dbe128c8c message: Limit maximum number of IKEv2 fragments
The maximum for IKEv1 is already 255 due to the 8-bit fragment number.

With an overhead of 17 bytes (x64) per fragment and a default maximum
of 10000 bytes per packet the maximum memory required is 14 kB
for a fragmented message.
2014-10-10 09:32:42 +02:00
Tobias Brunner f00a9c1715 packet: Define a global default maximum size for IKE packets 2014-10-10 09:32:42 +02:00
Tobias Brunner 03512c47bf message: Ensure a minimum fragment length 2014-10-10 09:32:41 +02:00
Tobias Brunner f1aa18b2e8 ikev2: Send retransmits using the latest known addresses
For instance, if a DPD exchange is initiated by the gateway when a
mobile client is roaming and it then gets a new IP address and sends
an address update via MOBIKE, the DPD retransmits would still be sent
to the old address and the SA would eventually get closed.
2014-10-10 09:32:41 +02:00
Tobias Brunner b678d9e14f ikev2: Send and receive fragmented IKE messages
If a fragmented message is retransmitted only the first packet is passed
to the alert() hook.
2014-10-10 09:32:41 +02:00
Tobias Brunner 1446fd8ac9 ike: IKE_SA may fragment IKEv2 messages 2014-10-10 09:32:41 +02:00
Tobias Brunner 7a53fe5511 ike: Do not cache MID of IKEv2 fragments
This fails if there are unencrypted payloads before an encrypted
fragment payload in the first fragment.
2014-10-10 09:32:41 +02:00
Tobias Brunner c0f4936a23 message: Fragment and reassemble IKEv2 messages 2014-10-10 09:32:41 +02:00
Tobias Brunner e8ffb256b3 message: Handle encrypted fragment payload similar to the encrypted payload 2014-10-10 09:32:41 +02:00
Tobias Brunner 4c345b15c7 ikev2: Add encrypted fragment payload 2014-10-10 09:32:37 +02:00
Tobias Brunner edfd33455c encrypted_payload: Encrypted payload can be constructed from plaintext 2014-10-10 09:31:17 +02:00
Tobias Brunner 1e0d8f3ec0 encrypted_payload: Expose generate() to generate the plaintext 2014-10-10 09:31:17 +02:00
Tobias Brunner 44996b5866 encrypted_payload: Extract some utility functions 2014-10-10 09:31:17 +02:00
Tobias Brunner 41751a70d9 message: Split generate() in multiple functions 2014-10-10 09:31:16 +02:00
Tobias Brunner 34dc37f3cb ikev2: Negotiate support for IKEv2 fragmentation 2014-10-10 09:31:16 +02:00
Tobias Brunner 7223b642a7 ikev2: Add notify for IKEv2 fragmentation 2014-10-10 09:31:13 +02:00
Tobias Brunner 70e0be072b ikev1: Move defragmentation to message_t 2014-10-10 09:30:26 +02:00
Tobias Brunner 40bab9a176 ike: Move fragmentation to ike_sa_t
The message() hook on bus_t is now called exactly once before (plain) and
once after fragmenting (!plain), not twice for the complete message and again
for each individual fragment, as was the case in earlier iterations.

For inbound messages the hook is called once for each fragment (!plain)
and twice for the reassembled message.
2014-10-10 09:30:26 +02:00
Tobias Brunner 2e7a2c06a1 message: fragment() generates message and fragments and caches them 2014-10-10 09:30:26 +02:00
Tobias Brunner e0b35142c1 message: Make packet argument optional in generate() 2014-10-10 09:30:26 +02:00
Tobias Brunner 127a98dc90 ikev1: Move fragment generation to message_t 2014-10-10 09:30:26 +02:00
Tobias Brunner 147fe503af ike: Rename encryption_payload to encrypted_payload 2014-10-10 09:30:25 +02:00
Tobias Brunner 7fb363c8f7 ipsec: Remove unsupported listcards and rereadgroups commands 2014-10-08 18:44:23 +02:00
Tobias Brunner 5bc6947738 ipsec: Document missing commands 2014-10-08 18:44:23 +02:00
Tobias Brunner 92cea9c368 ipsec: Update usage output 2014-10-08 18:44:23 +02:00
Tobias Brunner 4279bfdb40 ipsec: Remove duplicate check for internal commands 2014-10-08 18:44:23 +02:00
Tobias Brunner 249aa67f87 ipsec: Only set PATH if it is not already set
The comment indicated this but it was always set anyway.  All internal
commands are called via their absolute paths, so the script only uses PATH for
the uname command, but if that is not located in one of the configured
directories the script will fail.

Also, since the internal commands are called via their absolute paths there is
no need to add the directories to PATH.
2014-10-08 18:44:23 +02:00
Tobias Brunner d52b8738b5 ikev1: Fix handling of UNITY_LOAD_BALANCE
The re-authentication is now handled within the original IKE_SA if it has not
yet been established, so we don't want to destroy it.
2014-10-07 13:46:18 +02:00
Tobias Brunner d4828f51e0 ikev1: Don't queue more than one mode config or XAuth task
At the time we reset an IKE_SA (e.g. when re-authenticating a not yet
established SA due to a roaming event) such tasks might already be queued
by one of the phase 1 tasks.  If the SA is initiated again another task will
get queued by the phase 1 task.  This results in e.g. multiple mode config
requests, which most gateways will have problems with.
2014-10-07 13:45:01 +02:00
Tobias Brunner 89e953797d testing: Don't check for the actual number of SWID tags in PDP scenarios
The number of SWID tags varies depending on the base image, but lets
assume the number is in the hundreds.
2014-10-07 12:18:36 +02:00
Tobias Brunner 8f9016b1e2 testing: Make TNC scenarios agnostic to the actual Debian version
The scenarios will work with new or old base images as long as the version
in use is included as product in the master data (src/libimcv/imv/data.sql).
2014-10-07 12:18:25 +02:00
Tobias Brunner 93fac61da5 testing: Make TKM related build recipes future-proof
The tkm scenarios recently failed due to a segmentation fault on my host
because I had an old build of the tkm library already built in the build
directory.  Because the stamp file was not versioned the new release was
never checked out or built and charon-tkm was linked against the old
version causing a segmentation fault during key derivation.
2014-10-07 10:47:06 +02:00
Andreas Steffen f83215bbdb version bump to 5.2.1rc1 2014-10-06 23:14:13 +02:00
Martin Willi 7d3c58a511 Merge branch 'ext-auth'
Integrates the ext-auth plugin by Vyronas Tsingaras. The new child process
abstraction simplifies implementation in both the new ext-auth and the existing
updown plugin, and makes them available on the Windows platform.
2014-10-06 18:31:14 +02:00
Martin Willi 9180c921e8 NEWS: Mention new ext-auth plugin 2014-10-06 18:30:46 +02:00
Martin Willi b2c1973ffb ext-auth: Add an ext-auth plugin invoking an external authorization script
Original patch courtesy of Vyronas Tsingaras.
2014-10-06 18:30:46 +02:00
Martin Willi 6890bdc7a0 updown: Use process abstraction to invoke updown script 2014-10-06 18:24:39 +02:00
Martin Willi 7dd06d274d process: Add a wrapper to invoke a command under the system default shell 2014-10-06 18:24:39 +02:00
Martin Willi 02e4dedce5 process: Port child process spawning to the Windows platform 2014-10-06 18:24:39 +02:00
Martin Willi 1fea589c1f process: Provide an abstraction to spawn child processes with redirected I/O 2014-10-06 18:24:39 +02:00
Andreas Steffen 100c1a4bf1 testing: Updated certificates and keys in sql scenarios 2014-10-06 09:42:58 +02:00
Andreas Steffen e9a93cb772 Added IF-M Segmentation support to NEWS 2014-10-05 23:00:19 +02:00
Andreas Steffen b95b664644 Incremental parsing fixes 2014-10-05 22:52:59 +02:00
Andreas Steffen 73af3a1b04 Updated revoked certificate in ikev2/ocsp-revoked scenario 2014-10-05 21:33:35 +02:00
Andreas Steffen 006518e859 The critical-extension scenarios need the old private keys 2014-10-05 20:58:03 +02:00
Andreas Steffen 1bea00651d Added add_segment() method to TCG/PTS attributes 2014-10-05 19:43:27 +02:00
Andreas Steffen 01be87d086 Added add_segment() method to TCG/SEG attributes 2014-10-05 19:14:38 +02:00
Andreas Steffen a5dfe7a29a OS IMV proposes IF-M segmentation contract
The OS IMV sends a TCG IF-M Segmentation contract request.
All IETF standard attributes support segmentation. Additionally
the IETF Installed Packages standard attributes supports
incremental processing while segments are received.
2014-10-05 18:43:55 +02:00
Andreas Steffen fc47211740 SWID IMC proposes IF-M segmentation contracts 2014-10-05 18:43:55 +02:00