Tobias Brunner [Wed, 10 Jul 2013 08:56:08 +0000 (10:56 +0200)]
kernel-pfkey: Correctly handle IPSEC_PROTO_ANY in an acquire
Tobias Brunner [Tue, 16 Jul 2013 13:25:51 +0000 (15:25 +0200)]
linked-list: Remove barely used has_more() method
This required some refactoring when handling encrypted payloads.
Also changed log messages so that "encrypted payload" is logged instead
of "encryption payload" (even if we internally still call it that) as
that's the name used in RFC 5996.
Tobias Brunner [Tue, 16 Jul 2013 12:46:43 +0000 (14:46 +0200)]
linked-list: Don't require an argument for the item when enumerating
Tobias Brunner [Tue, 16 Jul 2013 10:07:00 +0000 (12:07 +0200)]
linked-list: Remove unused clone_function() method
Tobias Brunner [Tue, 16 Jul 2013 10:00:57 +0000 (12:00 +0200)]
linked-list: Remove barely used find_last() method
Tobias Brunner [Tue, 16 Jul 2013 09:53:30 +0000 (11:53 +0200)]
linked-list: Remove unused replace() method
Its functionality can be replicated by calling insert_before() followed
by remove_at(). Not the other way around, though, because remove_at()
changes the enumerator position.
Martin Willi [Wed, 17 Jul 2013 15:28:18 +0000 (17:28 +0200)]
Merge branch 'array'
Introduces a new lightweight array collection having minimal memory overhead.
The new class replaces various linked lists that are used during the full
lifetime of an SA, reducing memory requirements by about 5KB or more per tunnel.
Martin Willi [Wed, 17 Jul 2013 08:28:45 +0000 (10:28 +0200)]
child-sa: refactor proxy transport mode address lookup
Martin Willi [Wed, 17 Jul 2013 08:08:19 +0000 (10:08 +0200)]
child-sa: replace traffic selector lists by arrays
Saves up to another 0.5KB of memory per CHILD_SA.
Martin Willi [Wed, 17 Jul 2013 08:01:22 +0000 (10:01 +0200)]
child-sa: replace get_traffic_selectors() with create_ts_enumerator()
Not directly returning a linked list allows us to change the internals of
the CHILD_SA transparently.
Martin Willi [Thu, 11 Jul 2013 15:20:48 +0000 (17:20 +0200)]
ikev2: replace linked lists by arrays in task manager
Eliminates another three lists, 0.5KB per IKE_SA.
Martin Willi [Thu, 11 Jul 2013 14:54:15 +0000 (16:54 +0200)]
auth-cfg: use array instead of linked list
Saves another 4 linked lists (1KB) per IKE_SA
Martin Willi [Thu, 11 Jul 2013 14:36:10 +0000 (16:36 +0200)]
proposal: use array to store proposal list
Removes another two linked lists (0.5KB) of memory per IKE/CHILD_SA pair.
Martin Willi [Wed, 10 Jul 2013 12:16:46 +0000 (14:16 +0200)]
proposal: use a single list to store all transforms
Beside that it makes the code actually simpler, it reduces the number of lists
stored by each IKE_SA and each CHILD_SA by 4, which can be up to 1KB per SA.
Martin Willi [Thu, 11 Jul 2013 13:58:15 +0000 (15:58 +0200)]
ike-sa: use arrays instead of linked lists in long lived collections
This saves about 1.5KB of memory per IKE_SA.
Martin Willi [Thu, 11 Jul 2013 13:09:30 +0000 (15:09 +0200)]
unit-tests: implement tests for array collection
Martin Willi [Thu, 11 Jul 2013 09:44:33 +0000 (11:44 +0200)]
array: introduce an array collection storing elements very efficiently
Currently we use the very versatile linked-list collection to store elements
with variable count. This is fine, but very inefficient: Due to the many
methods in the linked list, on 64-bit platforms an empty list alone is more
than 200 bytes. As we currently have about 50 lists per IKE_SA/CHILD_SA pair,
this takes up to 10KB just for managing the empty lists. This is about the
half of memory used by an IKE_SA/CHILD_SA pair, and obviously way too much.
The new array type is not an object, but a collection of functions on an
abstract type.
The following lists are per IKE_SA and should be considered for a replacement
with more efficient arrays (this uses load-testers on-demand created dynamic
configurations, other scenarios have different lists):
14 -> ike_sa_create() @ src/libcharon/sa/ike_sa.c:2198
10 -> auth_cfg_create() @ src/libstrongswan/credentials/auth_cfg.c:1088
6 -> task_manager_v2_create() @ src/libcharon/sa/ikev2/task_manager_v2.c:1505
6 -> proposal_create() @ src/libcharon/config/proposal.c:592
5 -> peer_cfg_create() @ src/libcharon/config/peer_cfg.c:657
4 -> child_sa_create() @ src/libcharon/sa/child_sa.c:1090
2 -> child_cfg_create() @ src/libcharon/config/child_cfg.c:536
1 -> ike_cfg_create() @ src/libcharon/config/ike_cfg.c:330
1 -> put_connected_peers() @ src/libcharon/sa/ike_sa_manager.c:854
Tobias Brunner [Mon, 15 Jul 2013 12:37:31 +0000 (14:37 +0200)]
kernel-libipsec: Log error if no local address is found when installing routes
Tobias Brunner [Mon, 15 Jul 2013 12:37:05 +0000 (14:37 +0200)]
dumm: Sort templates by name
Tobias Brunner [Mon, 15 Jul 2013 09:19:27 +0000 (11:19 +0200)]
testing: Don't load certificates explicitly and delete CA certificates in PKCS#12 scenarios
Certificates are now properly extracted from PKCS#12 files.
Tobias Brunner [Mon, 15 Jul 2013 08:59:13 +0000 (10:59 +0200)]
stroke: Add certificates extracted from PKCS#12 files to correct credential set
Only keys and shared secrets are moved from the temporary credential set after
loading all secrets.
Tobias Brunner [Mon, 15 Jul 2013 08:48:19 +0000 (10:48 +0200)]
pkcs12: Add plugin dependencies with soft dependencies on the most common algorithms
Martin Willi [Fri, 12 Jul 2013 17:58:02 +0000 (19:58 +0200)]
leak-detective: remove hdr entry when reallocating zero bytes
Martin Willi [Fri, 12 Jul 2013 17:57:17 +0000 (19:57 +0200)]
leak-detective: print total of allocated/leaked bytes in usage/report
Martin Willi [Fri, 12 Jul 2013 16:19:32 +0000 (18:19 +0200)]
dumm: add include for in.h, if_bridge.h now uses struct in6_addr
Andreas Steffen [Fri, 12 Jul 2013 07:00:47 +0000 (09:00 +0200)]
Recognize critical IssuingDistributionPoint CRL extension
Andreas Steffen [Thu, 11 Jul 2013 08:34:00 +0000 (10:34 +0200)]
Override policy recommendation in enforcement
Andreas Steffen [Wed, 10 Jul 2013 18:38:07 +0000 (20:38 +0200)]
openssl plugin can replace random, hmac, and gcm plugins
Andreas Steffen [Wed, 10 Jul 2013 18:25:49 +0000 (20:25 +0200)]
Added openssl-ikev2/net2net-pkcs12 scenario
Andreas Steffen [Wed, 10 Jul 2013 18:17:44 +0000 (20:17 +0200)]
Added ikev2/net2net-pkcs12 scenario
Andreas Steffen [Wed, 10 Jul 2013 15:50:20 +0000 (17:50 +0200)]
Version bump to 5.1.0dr3
Andreas Steffen [Wed, 10 Jul 2013 15:07:56 +0000 (17:07 +0200)]
conntrack -F makes ikev2/nat-rw scenario to work always
Martin Willi [Wed, 10 Jul 2013 15:27:31 +0000 (17:27 +0200)]
leak-detective: add a usage threshold option based on the number of allocations
Martin Willi [Wed, 10 Jul 2013 15:16:49 +0000 (17:16 +0200)]
leak-detective: set_state() only affects the calling thread
The only user (bfd backtraces) is fine with that, and we really should not
mess the enable flag while doing allocations with other threads.
Martin Willi [Wed, 10 Jul 2013 15:15:00 +0000 (17:15 +0200)]
leak-detective: take a copy of backtrace while printing traces
As we don't want to hold the lock, we must make sure backtraces keep valid
while printing them.
Martin Willi [Wed, 10 Jul 2013 15:14:20 +0000 (17:14 +0200)]
backtrace: add a clone() method
Martin Willi [Wed, 10 Jul 2013 14:29:18 +0000 (16:29 +0200)]
leak-detective: remove hdr from the allocation list during realloc()
If realloc moves an allocation, the original allocation gets freed. We
therefore must remove the hdr from the list, as it is invalid. We can add it
afterwards once it has been updated, allowing us to unlock the list during
reallocation.
Andreas Steffen [Wed, 10 Jul 2013 09:37:22 +0000 (11:37 +0200)]
Fixed alignment of device ID column
Tobias Brunner [Mon, 8 Jul 2013 16:45:46 +0000 (18:45 +0200)]
android: New release after adding support for EAP-TNC
Also disabled listening on IPv6 because the Linux kernel currently does
not support UDP encapsulation for IPv6.
Tobias Brunner [Mon, 8 Jul 2013 16:50:09 +0000 (18:50 +0200)]
Merge branch 'android-byod'
Adds support for EAP-TNC with a custom Android-specific IMC that
collects data such as installed packages, file hashes or system
settings.
Some parts of the implementation are based on the bachelor semester
project 'strongSwan Android 4 Client with Endpoint Assessment' by
Christoph Bühler and Patrick Lötscher.
Tobias Brunner [Mon, 8 Jul 2013 13:38:47 +0000 (15:38 +0200)]
android: Properly handle dotted-quad notation of IPv6 addresses
For nestat output like ::ffff:127.0.0.1:9876 we shall not treat 127 as
port but 9876 instead.
Tobias Brunner [Fri, 5 Jul 2013 15:20:21 +0000 (17:20 +0200)]
android: Allow IMC state to be dismissed with a swipe gesture
Tobias Brunner [Wed, 3 Jul 2013 14:30:44 +0000 (16:30 +0200)]
android: Use explicit locale when converting settings names
Apparently, these functions use the user's default locale which might not
yield the expected result (e.g. lowercase I is not i in the Turkish
locale but ı instead).
Tobias Brunner [Wed, 3 Jul 2013 14:27:36 +0000 (16:27 +0200)]
android: Add information about transmitted data if EAP-TNC is selected
Tobias Brunner [Wed, 3 Jul 2013 08:58:25 +0000 (10:58 +0200)]
android: Reuse certificate selector as generic two line button
Tobias Brunner [Mon, 24 Jun 2013 13:58:34 +0000 (15:58 +0200)]
android: Add device ID in BeginHandshake
Tobias Brunner [Wed, 19 Jun 2013 10:41:09 +0000 (12:41 +0200)]
android: Add new VpnType to enable BYOD features
Tobias Brunner [Wed, 19 Jun 2013 10:39:12 +0000 (12:39 +0200)]
Use strpfx() helper where appropriate
Tobias Brunner [Wed, 19 Jun 2013 10:24:40 +0000 (12:24 +0200)]
utils: Add helper function to check a string for a given prefix
Tobias Brunner [Wed, 19 Jun 2013 10:22:29 +0000 (12:22 +0200)]
utils: Convert string helper macros to static inline functions
Tobias Brunner [Wed, 19 Jun 2013 10:00:04 +0000 (12:00 +0200)]
android: Use a different set of plugins if BYOD features are enabled
Tobias Brunner [Thu, 30 May 2013 10:16:30 +0000 (12:16 +0200)]
android: IMC state fragment is a button that shows remediation instructions or log
Tobias Brunner [Thu, 30 May 2013 10:04:59 +0000 (12:04 +0200)]
android: Show remediation instructions instead of log on failure
Tobias Brunner [Thu, 30 May 2013 09:57:39 +0000 (11:57 +0200)]
android: Properly hide the IMC state fragment initially
Tobias Brunner [Thu, 30 May 2013 09:55:44 +0000 (11:55 +0200)]
android: Add activity that displays a list of remediation instructions
On large displays a two-pane layout is used that displays the list next
to the actual instructions.
Tobias Brunner [Thu, 30 May 2013 09:47:01 +0000 (11:47 +0200)]
android: Add fragment for a list of remediation instructions
This fragment can later be used in one- or two-pane layouts.
Tobias Brunner [Thu, 30 May 2013 09:38:05 +0000 (11:38 +0200)]
android: Add adapter for remediation instructions
Tobias Brunner [Thu, 30 May 2013 09:18:24 +0000 (11:18 +0200)]
android: Add fragment that displays a single remediation instruction
Tobias Brunner [Thu, 30 May 2013 09:11:28 +0000 (11:11 +0200)]
android: RemediationInstruction implements Parcelable interface
Tobias Brunner [Thu, 30 May 2013 08:50:08 +0000 (10:50 +0200)]
android: Background for state panels provides separator
Tobias Brunner [Fri, 17 May 2013 16:18:07 +0000 (18:18 +0200)]
android: Add fragment that displays the IMC state
The fragment hides itself if the state is unknown or the assessment
succeeded.
Tobias Brunner [Fri, 17 May 2013 11:15:14 +0000 (13:15 +0200)]
android: Handle and store IETF remediation instructions
Tobias Brunner [Fri, 17 May 2013 11:08:54 +0000 (13:08 +0200)]
android: Add a parser for XML remediation instructions
Tobias Brunner [Thu, 16 May 2013 11:32:50 +0000 (13:32 +0200)]
android: Show different error message depending on IMC state
Tobias Brunner [Wed, 15 May 2013 16:35:00 +0000 (18:35 +0200)]
android: Clear error only when the user explicitly dismisses the dialog
The previous code worked fine on rotation changes as the fragment is
destroyed and recreated causing onCreate to be called, which restores the
saved error state. But if the user switches to a different application
and then back this is not the case. The dialog still gets dismissed (as
we have to do so to avoid nasty exceptions on rotation changes) but since
that implicitly cleared the error state the UI was never fully restored.
Tobias Brunner [Wed, 15 May 2013 13:52:16 +0000 (15:52 +0200)]
android: Add state of IMC to VpnStateService and update it via JNI
Tobias Brunner [Thu, 2 May 2013 16:49:26 +0000 (18:49 +0200)]
android: Handle TCG file measurement related attributes using PTS
Tobias Brunner [Thu, 2 May 2013 16:48:05 +0000 (18:48 +0200)]
android: Android IMC state provides a Platform Trust Service (PTS) instance
Tobias Brunner [Thu, 2 May 2013 16:47:05 +0000 (18:47 +0200)]
android: Provide a public interface for Android IMC state
Tobias Brunner [Thu, 2 May 2013 12:43:28 +0000 (14:43 +0200)]
libimcv: Properly deinitialize libimcv
Other users of imcv_pa_tnc_attributes (libpts) check if it is NULL before
removing vendor IDs.
Tobias Brunner [Thu, 2 May 2013 12:41:55 +0000 (14:41 +0200)]
android: Define IMC functions static and with lower-case names
Tobias Brunner [Thu, 2 May 2013 12:13:40 +0000 (14:13 +0200)]
libpts: Skip unreadable files when measuring directories
Tobias Brunner [Mon, 24 Jun 2013 13:50:48 +0000 (15:50 +0200)]
android: Add measurement collector for ITA Device ID
Tobias Brunner [Fri, 26 Apr 2013 16:17:32 +0000 (18:17 +0200)]
android: Add measurement collector for ITA Settings
Tobias Brunner [Fri, 26 Apr 2013 16:17:07 +0000 (18:17 +0200)]
android: Handle ITA PA-TNC attributes
Tobias Brunner [Fri, 26 Apr 2013 16:12:21 +0000 (18:12 +0200)]
android: Overload for getMeasurement() that takes a String array as argument
Tobias Brunner [Fri, 26 Apr 2013 15:11:15 +0000 (17:11 +0200)]
android: Add measurement collector for Port Filter
This collector reports all listening TCP and UDP sockets/ports.
Tobias Brunner [Fri, 26 Apr 2013 15:10:20 +0000 (17:10 +0200)]
android: Enum type for transport protocols added
Tobias Brunner [Fri, 26 Apr 2013 13:36:03 +0000 (15:36 +0200)]
android: Add measurement collector for Installed Packages
Tobias Brunner [Fri, 26 Apr 2013 12:29:00 +0000 (14:29 +0200)]
android: Add measurement collector for Product Information
Tobias Brunner [Fri, 26 Apr 2013 12:27:52 +0000 (14:27 +0200)]
android: Also support writing of 24-bit values
Tobias Brunner [Thu, 25 Apr 2013 17:43:56 +0000 (19:43 +0200)]
android: Add measurement collector for String Version
Tobias Brunner [Thu, 25 Apr 2013 17:07:34 +0000 (19:07 +0200)]
android: Interfaces for measurement collectors and attributes added
Tobias Brunner [Thu, 25 Apr 2013 16:54:40 +0000 (18:54 +0200)]
android: Add a Java utility class similar to bio_writer_t
Tobias Brunner [Thu, 25 Apr 2013 15:31:54 +0000 (17:31 +0200)]
android: Add enum types for PENs and attribute types
Tobias Brunner [Thu, 25 Apr 2013 15:20:15 +0000 (17:20 +0200)]
android: Add a generic handler for PA-TNC attribute requests
The idea is that the Android IMC will return attributes in their binary
encoding. This keeps the JNI interface to the IMC pretty simple.
Tobias Brunner [Thu, 25 Apr 2013 10:43:23 +0000 (12:43 +0200)]
imv-scanner: Only add a reason string if there is something to report
Tobias Brunner [Wed, 24 Apr 2013 14:24:14 +0000 (16:24 +0200)]
android: Added a Java part to the Android IMC
Tobias Brunner [Wed, 24 Apr 2013 13:28:13 +0000 (15:28 +0200)]
android: Don't attempt loading IMCs from /etc/tnc_config
Tobias Brunner [Wed, 24 Apr 2013 13:27:31 +0000 (15:27 +0200)]
libtnccs: Don't try to load IMCs/IMVs from a file if there is no filename
Tobias Brunner [Tue, 23 Apr 2013 16:19:34 +0000 (18:19 +0200)]
Ignore Eclipse project/workspace files
Students seem to like Eclipse to work on strongSwan.
Tobias Brunner [Wed, 24 Apr 2013 16:36:59 +0000 (18:36 +0200)]
android: Build libpts and init/deinit libpts in BYOD IMC
Tobias Brunner [Wed, 24 Apr 2013 16:36:23 +0000 (18:36 +0200)]
libpts: Android.mk added
Tobias Brunner [Thu, 11 Oct 2012 13:26:19 +0000 (15:26 +0200)]
android: Added a sample IMC that sends some dummy OS data
Tobias Brunner [Thu, 11 Oct 2012 11:50:18 +0000 (13:50 +0200)]
android: Build option added to load BYOD related plugins and libraries in the Android app
Tobias Brunner [Thu, 11 Oct 2012 09:28:45 +0000 (11:28 +0200)]
android: Added support to build tnc-imc plugin
Tobias Brunner [Thu, 11 Oct 2012 09:10:19 +0000 (11:10 +0200)]
android: Added support to build eap-tnc, tnc-tnccs and tnccs-20 plugins
Tobias Brunner [Thu, 11 Oct 2012 09:06:35 +0000 (11:06 +0200)]
android: Added function to include source files from plugin subdirectories
Tobias Brunner [Thu, 11 Oct 2012 07:35:45 +0000 (09:35 +0200)]
libimcv: Android.mk added
Andreas Steffen [Mon, 8 Jul 2013 15:58:14 +0000 (17:58 +0200)]
Cosmetics