Commit Graph

13987 Commits

Author SHA1 Message Date
Martin Willi a47e431ba9 vici: Return a Python generator instead of a list for streamed responses
In addition that it may reduce memory usage and improve performance for large
responses, it returns immediate results. This is important for longer lasting
commands, such as initiate/terminate, where immediate log feedback is preferable
when interactively calling such commands.
2015-03-18 13:59:14 +01:00
Martin Willi 90e16837ba vici: Raise a Python CommandException instead of returning a CommandResult 2015-03-18 13:59:14 +01:00
Martin Willi 871cffa141 vici: Add initial Python egg documentation to README 2015-03-18 13:59:14 +01:00
Martin Willi 305023a27d vici: Use OrderedDict to handle vici responses in Python library
The default Python dictionaries are unordered, but order is important for some
vici trees (for example the order of authentication rounds).
2015-03-18 13:59:14 +01:00
Martin Willi 94bb26fae3 vici: Return authentication rounds with unique names
To simplify handling of authentication rounds in dictionaries/hashtables on the
client side, we assign unique names to each authentication round when listing
connection.
2015-03-18 13:59:14 +01:00
Martin Willi d1ad65f7b2 vici: Rebuild ruby gem on source file changes 2015-03-18 13:59:14 +01:00
Martin Willi fb8b119cfa vici: Use default Unix vici socket if none passed to ruby constructor
While we currently have a static path instead of one generated with Autotools,
this at least is congruent to what we have in the Python library.
2015-03-18 13:59:14 +01:00
Martin Willi 61fb10c8cf vici: Support non-Unix sockets for vici connections using Python 2015-03-18 13:59:14 +01:00
Martin Willi 358793389a vici: Add python egg setuptools building and installation using easy_install
An uninstall target is currently not supported, as there is no trivial way with
either plain setuptools or with easy_install. pip would probably be the best
choice, but we currently don't depend on it.
2015-03-18 13:59:14 +01:00
Martin Willi 1e2ec9f96a vici: Generate a version specific setup.py for setuptools installation 2015-03-18 13:59:14 +01:00
Martin Willi 2c8c52c4e2 vici: Include python package in distribution 2015-03-18 13:59:14 +01:00
Martin Willi 374b3db191 configure: Add --enable-python-eggs and --with-pythoneggdir options
Detect easy_install for Python egg installation to install any egg we provide
in strongSwan.
2015-03-18 13:59:13 +01:00
Björn Schuberg 163e15a571 vici: Add python package MIT license 2015-03-18 13:59:13 +01:00
Björn Schuberg b269c1a89a vici: Expose Session as a top-level symbol in python package 2015-03-18 13:59:13 +01:00
Björn Schuberg 6a31a0f60c vici: Introduce main API Session class in python package 2015-03-18 13:59:13 +01:00
Björn Schuberg 8c089cddef vici: Add a python vici command execution handler 2015-03-18 13:59:13 +01:00
Björn Schuberg b26e142863 vici: Add vici python protocol handler 2015-03-18 13:59:13 +01:00
Martin Willi c7bb1dc3d9 Merge branch 'swanctl-pkcs12'
Add support for loading PKCS#12 containers from a swanctl/pkcs12 directory.

Fixes #815.
2015-03-18 13:36:50 +01:00
Martin Willi 1e366429fd swanctl: Cache entered PKCS#12 decryption secret
It is usually used more than once, but most likely the same for decryption and
MAC verification.
2015-03-18 13:34:22 +01:00
Martin Willi 54cdf847cc swanctl: Support loading PKCS#12 containers from a pkcs12 swanctl directory 2015-03-18 13:34:22 +01:00
Martin Willi a1fb5251e0 swanctl: Generalize private key decryption to support other credential types 2015-03-18 13:34:22 +01:00
Martin Willi 84738b1aed encoding: Verify the length of KE payload data for known groups
IKE is very strict in the length of KE payloads, and it should be safe to
strictly verify their length. Not doing so is no direct threat, but allows DDoS
amplification by sending short KE payloads for large groups using the target
as the source address.
2015-03-18 13:33:25 +01:00
Martin Willi b8ecdfd895 ikev2: Migrate MOBIKE additional peer addresses to new SA after IKE_SA rekeying 2015-03-18 13:32:27 +01:00
Martin Willi 80a1ebb1d9 ikev2: Immediately initiate queued tasks after establishing rekeyed IKE_SA
If additional tasks get queued before/while rekeying an IKE_SA, these get
migrated to the new IKE_SA. We previously did not trigger initiation of these
tasks, though, leaving the task unexecuted until a new task gets queued.
2015-03-18 13:28:34 +01:00
Andreas Steffen afc1b67344 Version bump to 5.3.0dr2 2015-03-16 17:15:58 +01:00
Andreas Steffen 08feb4548a Replace kid by aik_id in ITA TBOOT functional component 2015-03-16 17:15:28 +01:00
Andreas Steffen d35143bb8d Fixed two BLISS key type identifier strings 2015-03-16 17:08:14 +01:00
Martin Willi 9c3c41f29b charon-systemd: Add missing semicolon
References #887, fixes f3c83322.
2015-03-16 09:31:17 +01:00
Martin Willi 219821a78a osx: Include eap-gtc plugin in build instructions 2015-03-16 09:27:18 +01:00
Andreas Steffen e035935068 Added availability of TNC AR IP address to IMVs to NEWS 2015-03-15 12:30:32 +01:00
Andreas Steffen b6685211fb Create TPM TBOOT Measurement group 2015-03-15 12:24:05 +01:00
Tobias Brunner 6d41927b42 vici: Use %u to print stats returned by mallinfo(3)
Fixes #886.
2015-03-13 15:26:01 +01:00
Tobias Brunner 8286e2050b stroke: Use %u to print stats returned by mallinfo(3)
References #886.
2015-03-13 15:25:53 +01:00
Tobias Brunner f3c8332220 charon-systemd: Add support to configure user and group via strongswan.conf
Fixes #887.
2015-03-13 14:34:53 +01:00
Martin Willi c4b6332211 eap-radius: Increase Acct-Session-ID string buffer
As the startup timestamp needs 10 characters, we only have left 4 characters
for the IKE_SA unique identifier. This is insufficient when having 10000 IKE_SAs
or more established, resulting in non-unique session identifiers.

Fixes #889.
2015-03-13 09:42:03 +01:00
Tobias Brunner 3d964213f5 testing: Remove obsolete leftnexthop option from configs 2015-03-12 15:51:25 +01:00
Martin Willi 799f4c5db9 ikev2: Don't set old IKE_SA to REKEYING state during make-before-break reauth
We are actually not in rekeying state, but just trigger a separate, new IKE_SA
as a replacement for the current IKE_SA. Switching to the REKEYING state
disables the invocation of both IKE and CHILD_SA updown hooks as initiator,
preventing the removal of any firewall rules.

Fixes #885.
2015-03-11 14:48:08 +01:00
Martin Willi 438318c6c3 ha: Destroy synced IKE_SA if no configuration is found during update 2015-03-10 15:08:58 +01:00
Martin Willi eb3e339a3c ikev1: Don't handle DPD timeout job if IKE_SA got passive
While a passively installed IKE_SA does not queue a DPD timeout job, one that
switches from active to passive might execute it. Ignore such a queued job if
the IKE_SA is in passive state.
2015-03-10 14:02:22 +01:00
Martin Willi 2b0f34a2ef testing: Don't check for exact IKEv1 fragment size
Similar to 7a9c0d51, the exact packet size depends on many factors we don't
want to consider in this test case.
2015-03-10 10:21:16 +01:00
Martin Willi 58c3e09918 testing: Fix active/passive role description in ha/both-active test case 2015-03-10 10:02:21 +01:00
Martin Willi 607eebcfcf libipsec: Pass separate inbound/update flags to the IPsec SA manager
Similar to other kernel interfaces, the libipsec backends uses the flag for
different purposes, and therefore should get separate flags.
2015-03-09 18:18:20 +01:00
Martin Willi 942797a5b5 kernel-interface: Add a separate "update" flag to add_sa()
The current "inbound" flag is used for two purposes: To define the actual
direction of the SA, but also to determine the operation used for SA
installation. If an SPI has been allocated, an update operation is required
instead of an add.

While the inbound flag normally defines the kind of operation required, this
is not necessarily true in all cases. On the HA passive node, we install inbound
SAs without prior SPI allocation.
2015-03-09 18:18:20 +01:00
Martin Willi 68e5ada005 tkm: Use the inbound flag do determine peer role in CHILD_SA exchange
This was not available during initial implementation, but fits just fine to
avoid reconstructing the peer role.
2015-03-09 18:18:20 +01:00
Martin Willi acad5e9f51 Revert "child-sa: Remove the obsolete update logic"
While the the meaning of the "inbound" flag on the kernel_interface->add_sa()
call is not very clear, we still need that update logic to allow installation of
inbound SAs without SPI allocation. This is used in the HA plugin as a passive
node.

This reverts commit 698ed656.
2015-03-09 18:18:20 +01:00
Martin Willi 8be21ae7ef Revert "ha: Always install the CHILD_SAs with the inbound flag set to FALSE"
While this change results in the correct add/update flag during installation,
it exchanges all other values in the child_sa->install() call. We should pass
the correct flag, but determine the add/update flag by other means.

This reverts commit e722ee5d.
2015-03-09 18:18:20 +01:00
Tobias Brunner ab65a3e8fc tkm: Disable RFC 7427 signature authentication
TKM can't verify such signatures so we'd fail in the authorize hook.
Skipping the algorithm identifier doesn't help if the peer uses
anything other than SHA-1, so config changes would be required.
2015-03-09 16:59:07 +01:00
Tobias Brunner 708dff0700 ikev2: Move code in pubkey authenticator's build() method into separate functions 2015-03-09 16:59:07 +01:00
Tobias Brunner 03a340c6c6 ikev2: Try all eligible signature schemes
Previously, we failed without recovery if a private key did not support
a selected signature scheme (based on key strength and the other peer's
supported hash algorithms).
2015-03-09 16:59:07 +01:00
Tobias Brunner 1735d80f38 files: Add simple plugin to load files from file:// URIs 2015-03-09 16:08:52 +01:00