15 months agocirrus: Run automated tests on FreeBSD via Cirrus CI
Tobias Brunner [Tue, 27 Aug 2019 16:22:33 +0000 (18:22 +0200)]
cirrus: Run automated tests on FreeBSD via Cirrus CI

15 months agoFix issue with $< automatic variable on FreeBSD
Tobias Brunner [Fri, 23 Aug 2019 07:40:59 +0000 (09:40 +0200)]
Fix issue with $< automatic variable on FreeBSD

BSD make only evaluates $< for implicit rules, so building from the
repository won't work unless GNU make is installed and used, or we
replace affected uses like this.

15 months agoMerge branch 'android-updates'
Tobias Brunner [Mon, 26 Aug 2019 09:28:43 +0000 (11:28 +0200)]
Merge branch 'android-updates'

Some fixes for Android 9 (28) and other issues.  Also migrated to

Closes strongswan/strongswan#148.

15 months agoandroid: Avoid crash related to TileService on Huawei devices
Tobias Brunner [Fri, 16 Aug 2019 15:04:28 +0000 (17:04 +0200)]
android: Avoid crash related to TileService on Huawei devices

No idea when exactly this happens but on many Huawei devices (and
only on them) it seems that onStartListening is sometimes called after
onDestroy i.e. when the database was already closed.  This caused an
InvalidStateException in getProfile via updateTile when retrieving the
current profile.  It's possible that it happens during shutdown (there
have been similar reports related to TileService implementations) so
users might not even notice, but it pollutes the Play Console, so this
workaround now makes sure the database is open when updateTile is called.

15 months agoandroid: Fix null pointer dereference in TextInputLayoutHelper
Tobias Brunner [Tue, 13 Aug 2019 13:26:22 +0000 (15:26 +0200)]
android: Fix null pointer dereference in TextInputLayoutHelper

The AndroidX/Material version of TextInputLayout actually supports a
helper text, but it is always shown, so we continue to use our version.

15 months agoandroid: Replace deprecated Html.fromHtml with version from AndroidX
Tobias Brunner [Tue, 13 Aug 2019 13:37:05 +0000 (15:37 +0200)]
android: Replace deprecated Html.fromHtml with version from AndroidX

15 months agoandroid: Migrate from support libraries to AndroidX
Tobias Brunner [Tue, 13 Aug 2019 13:01:31 +0000 (15:01 +0200)]
android: Migrate from support libraries to AndroidX

The support libraries will not be developed further.

15 months agoandroid: Request FOREGROUND_SERVICE permission
Tobias Brunner [Tue, 13 Aug 2019 12:42:39 +0000 (14:42 +0200)]
android: Request FOREGROUND_SERVICE permission

This is required since API 28 to call Service.startForeground.

15 months agoandroid: Switch to Loaders from the support library
Tobias Brunner [Tue, 13 Aug 2019 12:28:31 +0000 (14:28 +0200)]
android: Switch to Loaders from the support library

They are officially deprecated as of API 28 (recommended replacement is
a combination of ViewModels and LiveData, maybe something to look into

15 months agoandroid: Set compile-/targetSdkVersion to 28
Tobias Brunner [Tue, 13 Aug 2019 12:16:11 +0000 (14:16 +0200)]
android: Set compile-/targetSdkVersion to 28

This is mandatory for new apps since August 1, 2019 and will be for existing
apps in November 1, 2019.

15 months agoandroid: Update Gradle plugin
Tobias Brunner [Tue, 13 Aug 2019 12:07:28 +0000 (14:07 +0200)]
android: Update Gradle plugin

15 months agoidentification: Optionally match RDNs in any order and accept missing RDNs
Tobias Brunner [Thu, 9 May 2019 11:09:40 +0000 (13:09 +0200)]
identification: Optionally match RDNs in any order and accept missing RDNs

15 months agoRun gperf with --output-file instead of output redirection
Martin Willi [Mon, 15 Jul 2019 05:43:06 +0000 (07:43 +0200)]
Run gperf with --output-file instead of output redirection

When missing gperf, the redirection generates an empty file, which must
be manually removed after gperf has been installed. This is difficult
to diagnose, as the produced build error is cryptic.

Use --output-file of gperf instead to avoid creating an empty file if
gperf is missing. This still requires the user to re-run ./configure
after installing gperf, though.

15 months agoupdown: Pass the local interface the traffic to the peer actually takes
Tobias Brunner [Thu, 20 Jun 2019 08:02:21 +0000 (10:02 +0200)]
updown: Pass the local interface the traffic to the peer actually takes

If the local IP is not on the interface the peer is reached through,
firewall rules will be installed with the wrong interface.

Fixes #3095.

15 months agoattributes: Add definition of some additional configuration attributes
Tobias Brunner [Wed, 12 Jul 2017 08:59:41 +0000 (10:59 +0200)]
attributes: Add definition of some additional configuration attributes

15 months agoasn1: Fix a compiler warning with GCC 9.1
Tobias Brunner [Thu, 22 Aug 2019 14:27:19 +0000 (16:27 +0200)]
asn1: Fix a compiler warning with GCC 9.1

Compiling with GCC 9.1, as e.g. happens on AppVeyor, results in the
following warning:

asn1/asn1.c: In function 'asn1_integer':
asn1/asn1.c:871:24: error: '<Ucb40>' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  871 |  len = content.len + ((*content.ptr & 0x80) ? 1 : 0);
      |                        ^~~~~~~~~~~~

Some experiments showed that the problem was the chunk_from_chars()
assignment.  This might be because the temporary chunk_t that was assigned
to the variable was defined in a sub-block, so it might actually be
undefined later when *content.ptr is read.

15 months agoload-tester: Add digitalSignature keyUsage flag to test certificate
Tobias Brunner [Mon, 12 Aug 2019 16:10:06 +0000 (18:10 +0200)]
load-tester: Add digitalSignature keyUsage flag to test certificate

This allows using the certificate, which is technically a CA cert, as
end-entity certificate again after the RFC4945-related changes added
with 5.6.3.

Fixes #3139.

15 months agoSome whitespace fixes
Tobias Brunner [Tue, 9 Jul 2019 15:03:23 +0000 (17:03 +0200)]
Some whitespace fixes

Didn't change some of the larger testing scripts that use an inconsistent
indentation style.

15 months agoAdd an .editorconfig file
Tobias Brunner [Fri, 6 Jul 2018 12:07:55 +0000 (14:07 +0200)]
Add an .editorconfig file

It's currently not possible to configure our indentation scheme for
continuation lines (i.e. use 1-3 spaces to align with the upper line).
There is an issue open regarding this, see [1].  So we can't run e.g.
eclint over our codebase to detect issues without getting a lot of
false positives.

The main trigger was that this sets the preferred tab width in GitHub's
code browser.


References #3111.

15 months agomemory: Use explicit_bzero() as memwipe() if available
Tobias Brunner [Thu, 18 Jul 2019 12:25:32 +0000 (14:25 +0200)]
memory: Use explicit_bzero() as memwipe() if available

15 months agotravis: Bump wolfSSL to 4.1.0
Tobias Brunner [Mon, 12 Aug 2019 12:25:56 +0000 (14:25 +0200)]
travis: Bump wolfSSL to 4.1.0

16 months agofuzz: Support build with -fsanitize=fuzzer instead of libFuzzer.a
Tobias Brunner [Wed, 17 Jul 2019 09:16:19 +0000 (11:16 +0200)]
fuzz: Support build with -fsanitize=fuzzer instead of libFuzzer.a

Recent clang versions (6.0+) include libFuzzer and OSS-Fuzz switched to
that mode a while ago.

17 months agoUse Botan 2.11.0 for tests
Tobias Brunner [Tue, 2 Jul 2019 07:53:53 +0000 (09:53 +0200)]
Use Botan 2.11.0 for tests

17 months agobotan: Replace deprecated FFI function calls
Tobias Brunner [Tue, 2 Jul 2019 08:47:54 +0000 (10:47 +0200)]
botan: Replace deprecated FFI function calls

Several "wrapper" functions have been marked deprecated with 2.11.0.

17 months agoVersion bump to 5.8.1dr1 5.8.1dr1
Andreas Steffen [Wed, 26 Jun 2019 15:32:33 +0000 (17:32 +0200)]
Version bump to 5.8.1dr1

17 months agolibtpmtss: Protect TPM 2.0 context by mutex
krinfels [Wed, 26 Jun 2019 13:32:29 +0000 (15:32 +0200)]
libtpmtss: Protect TPM 2.0 context by mutex

Each private key object created to access a key residing in a TPM 2.0
creates a context structure used for communication with the TSS.
When multiple IKE SAs are established at the same time and using the
same private key, it is possible to make concurrent calls to the
TSS with the same context which results in multiple threads writing
to the same place in memory causing undefined behaviour.

Fix this by protecting calls to the TSS with a mutex unique for
each TPM 2.0 context object.

17 months agoandroid: Fix remote identity fallback after changing IKE config creation
Tobias Brunner [Tue, 18 Jun 2019 08:22:57 +0000 (10:22 +0200)]
android: Fix remote identity fallback after changing IKE config creation

Fixes: 9486a2e5b0b5 ("ike-cfg: Pass arguments as struct")

17 months agoandroid: Fix typo when building IKE config
Tobias Brunner [Tue, 18 Jun 2019 08:21:07 +0000 (10:21 +0200)]
android: Fix typo when building IKE config

Fixes: 9486a2e5b0b5 ("ike-cfg: Pass arguments as struct")

18 months agotravis: Bump OpenSSL to 1.1.1c
Tobias Brunner [Tue, 28 May 2019 13:28:06 +0000 (15:28 +0200)]
travis: Bump OpenSSL to 1.1.1c

18 months agoAdd compile option to disable internal handling of fatal signals
Sheena Mira-ato [Thu, 21 Mar 2019 03:28:08 +0000 (16:28 +1300)]
Add compile option to disable internal handling of fatal signals

By default, charon and its derivatives internally handle the SIGSEGV,
SIGILL, and SIGBUS signals raised by threads (segv_handler).  Add a compile
option so that the signal handling can optionally be done externally.

Closes strongswan/strongswan#132.

18 months agoikev1: Do a rekey check before installing CHILD_SAs as responder
Tobias Brunner [Thu, 16 May 2019 08:19:15 +0000 (10:19 +0200)]
ikev1: Do a rekey check before installing CHILD_SAs as responder

If CHILD_SAs are created while waiting for the third QM message we'd not
notice the redundancy and updown events would be triggered unevenly.
This is consistent with the behavior on the initiator, which already does
this check right before installation. Moving the existing check is not
possible due to the narrow hook and moving the installation changes which
peer installs the SAs first and could have other side-effects (e.g. in
error or conflict cases).  Still, this might result in CHILD_SA state
discrepancies between the two peers.

Fixes #3060.

18 months agoAvoid enumerating certificates with non-matching key type
SophieK [Tue, 21 May 2019 01:28:21 +0000 (09:28 +0800)]
Avoid enumerating certificates with non-matching key type

If the key type was specified but the ID was NULL or matched a subject, it
was possible that a certificate was returned that didn't actually match
the requested key type.

Closes strongswan/strongswan#141.

18 months agoVersion bump to 5.8.0 5.8.0
Andreas Steffen [Mon, 20 May 2019 10:31:08 +0000 (12:31 +0200)]
Version bump to 5.8.0

18 months agoproposal: Add missing curve448/x448 keywords
Tobias Brunner [Fri, 17 May 2019 15:15:38 +0000 (17:15 +0200)]
proposal: Add missing curve448/x448 keywords

Fixes #3064.

18 months agonm: Version bump to 1.4.5
Tobias Brunner [Tue, 14 May 2019 08:38:12 +0000 (10:38 +0200)]
nm: Version bump to 1.4.5

18 months agoVersion bump to 5.8.0rc1 5.8.0rc1
Andreas Steffen [Fri, 10 May 2019 10:55:48 +0000 (12:55 +0200)]
Version bump to 5.8.0rc1

18 months agotesting: Use strongswan systemd service
Andreas Steffen [Fri, 10 May 2019 10:55:09 +0000 (12:55 +0200)]
testing: Use strongswan systemd service

18 months agotesting: Load PEM keys in ikev2/net2-net-rsa scenario
Andreas Steffen [Fri, 10 May 2019 10:54:28 +0000 (12:54 +0200)]
testing: Load PEM keys in ikev2/net2-net-rsa scenario

18 months agotesting: Copy keys and certs to swanctl/rw-newhope-bliss scenario
Andreas Steffen [Fri, 10 May 2019 10:53:33 +0000 (12:53 +0200)]
testing: Copy keys and certs to swanctl/rw-newhope-bliss scenario

18 months agokeymat_v1: Avoid memory leak during IKE key derivation in some error cases
SophieK [Thu, 9 May 2019 07:20:30 +0000 (15:20 +0800)]
keymat_v1: Avoid memory leak during IKE key derivation in some error cases

Closes strongswan/strongswan#138.

18 months agoMerge branch 'build-certs'
Tobias Brunner [Wed, 8 May 2019 12:57:03 +0000 (14:57 +0200)]
Merge branch 'build-certs'

Adds a script to generate the keys and certificates used for regression
tests dynamically.  They are built with the pki version installed in the
root image so it's not necessary to have an up-to-date version with all
required plugins installed on the host system.

18 months agotesting: Return an error if any command in the certificate build script fails
Tobias Brunner [Wed, 8 May 2019 12:36:27 +0000 (14:36 +0200)]
testing: Return an error if any command in the certificate build script fails

18 months agotesting: Build certificates before guests after building strongSwan
Tobias Brunner [Tue, 7 May 2019 17:21:21 +0000 (19:21 +0200)]
testing: Build certificates before guests after building strongSwan

If the script is run on a clean working copy, building the guests will
fail if the certificates don't exist.

18 months agotesting: Automatically build guest images after generating certificates
Tobias Brunner [Tue, 7 May 2019 17:20:04 +0000 (19:20 +0200)]
testing: Automatically build guest images after generating certificates

This (re-)generates the CRLs on winnetou.

18 months agotesting: Use custom plugin configuration to build SHA-3 CA
Tobias Brunner [Tue, 7 May 2019 17:07:51 +0000 (19:07 +0200)]
testing: Use custom plugin configuration to build SHA-3 CA

18 months agopki: Plugins to load may be defined via PKI_PLUGINS env variable
Tobias Brunner [Tue, 7 May 2019 16:34:49 +0000 (18:34 +0200)]
pki: Plugins to load may be defined via PKI_PLUGINS env variable

18 months agotesting: Fix ikev2/net2net-rsa scenario
Tobias Brunner [Tue, 7 May 2019 14:06:28 +0000 (16:06 +0200)]
testing: Fix ikev2/net2net-rsa scenario

18 months agotesting: Add wrapper script to build certificates in root image
Tobias Brunner [Thu, 18 Apr 2019 13:10:10 +0000 (15:10 +0200)]
testing: Add wrapper script to build certificates in root image

This does not modify the root image but uses the strongSwan version
installed there (avoids build dependencies on version installed on the
host to use pki to generate all the keys and certificates).

18 months agotesting: Upgrade to Linux 5.1 kernel
Andreas Steffen [Mon, 6 May 2019 14:58:44 +0000 (16:58 +0200)]
testing: Upgrade to Linux 5.1 kernel

18 months agopki: Allow inclusion of [unsupported] critical X.509 extension
Andreas Steffen [Mon, 6 May 2019 12:33:49 +0000 (14:33 +0200)]
pki: Allow inclusion of [unsupported] critical X.509 extension

18 months agotesting: Updated build-certs script
Andreas Steffen [Sun, 5 May 2019 16:07:43 +0000 (18:07 +0200)]
testing: Updated build-certs script

18 months agotesting: Deleting dynamic test keys and certificates
Andreas Steffen [Sat, 4 May 2019 13:23:57 +0000 (15:23 +0200)]
testing: Deleting dynamic test keys and certificates

18 months agotesting: Exclude files that are ignored in Git from the distribution
Tobias Brunner [Mon, 29 Apr 2019 12:53:28 +0000 (14:53 +0200)]
testing: Exclude files that are ignored in Git from the distribution

Since the complete hosts and tests directories are part of the tarball
this would include generated certificates and keys.

18 months agotesting: Remove dynamic keys and certs from repository
Andreas Steffen [Sun, 28 Apr 2019 18:39:26 +0000 (20:39 +0200)]
testing: Remove dynamic keys and certs from repository

18 months agotesting: Build data.sql files for SQL test cases
Andreas Steffen [Sun, 28 Apr 2019 15:16:59 +0000 (17:16 +0200)]
testing: Build data.sql files for SQL test cases

18 months agopki: Add different output options for --keyid
Tobias Brunner [Thu, 18 Apr 2019 14:14:16 +0000 (16:14 +0200)]
pki: Add different output options for --keyid

Makes machine-processing these identifiers easier.

18 months agotesting: Build CERT and IPSECKEY RRs for zone
Tobias Brunner [Mon, 15 Apr 2019 16:25:13 +0000 (18:25 +0200)]
testing: Build CERT and IPSECKEY RRs for zone

Also copy generated keys to DNSSEC test cases.

18 months agotesting: Rename public keys in DNSSEC scenarios
Tobias Brunner [Mon, 15 Apr 2019 16:20:20 +0000 (18:20 +0200)]
testing: Rename public keys in DNSSEC scenarios

We will generate PEM-encoded public keys with the script.

18 months agotesting: Convert keys and certificates for all TKM scenarios
Tobias Brunner [Wed, 10 Apr 2019 09:27:11 +0000 (11:27 +0200)]
testing: Convert keys and certificates for all TKM scenarios

18 months agotesting: Disable leak detective in build-certs script
Tobias Brunner [Wed, 10 Apr 2019 07:34:26 +0000 (09:34 +0200)]
testing: Disable leak detective in build-certs script

18 months agotesting: Script building fresh certificates
Andreas Steffen [Mon, 1 Apr 2019 14:21:10 +0000 (16:21 +0200)]
testing: Script building fresh certificates

18 months agosmp: Use correct printf specifier to print SPIs
Tobias Brunner [Tue, 7 May 2019 12:50:11 +0000 (14:50 +0200)]
smp: Use correct printf specifier to print SPIs

18 months agofast: Use correct printf specifier to print content length
Tobias Brunner [Tue, 7 May 2019 12:48:19 +0000 (14:48 +0200)]
fast: Use correct printf specifier to print content length

18 months agolibimcv: Use proper printf specifier for unsigned issuer and responder IDs
Tobias Brunner [Tue, 7 May 2019 12:43:30 +0000 (14:43 +0200)]
libimcv: Use proper printf specifier for unsigned issuer and responder IDs

18 months agoswima-collector: Use proper type for field precision
Tobias Brunner [Tue, 7 May 2019 12:40:58 +0000 (14:40 +0200)]
swima-collector: Use proper type for field precision

18 months agoopenssl: Fix build with OpenSSL 1.1.1 without compatibility layer
Tobias Brunner [Tue, 7 May 2019 09:44:34 +0000 (11:44 +0200)]
openssl: Fix build with OpenSSL 1.1.1 without compatibility layer

If OpenSSL is built with --api, defines for deprecated functions in
OpenSSL's header files are not visible anymore.

Fixes #3045.

18 months agotravis: Build OpenSSL 1.1.1 without compatibility layer for older versions
Tobias Brunner [Tue, 7 May 2019 09:28:29 +0000 (11:28 +0200)]
travis: Build OpenSSL 1.1.1 without compatibility layer for older versions

Configuring 1.1.1 is not actually possible with 1.1.1b, not sure if
that's on purpose.

18 months agotravis: Make sure crypto plugins are actually loaded
Tobias Brunner [Tue, 7 May 2019 11:43:45 +0000 (13:43 +0200)]
travis: Make sure crypto plugins are actually loaded

18 months agostarter: Remove IPsec stack detection
Tobias Brunner [Tue, 7 May 2019 09:03:23 +0000 (11:03 +0200)]
starter: Remove IPsec stack detection

Checking specifically for /proc/net/pfkey is not ideal as af_key will
eventually be removed in Linux kernels.  Support for KLIPS is long gone.
The detection also wasn't used for anything anymore (failures were just
ignored since the ports to BSD-based systems).  And modprobing doesn't seem
to be necessary either (charon-systemd doesn't do that, for instance).

18 months agovici: Add Python command wrappers to tarball
Tobias Brunner [Mon, 6 May 2019 13:51:05 +0000 (15:51 +0200)]
vici: Add Python command wrappers to tarball

Fixes: e0f7da864481 ("vici: Extract command wrappers in Python bindings")

19 months agopki: Fix memory leaks in --signcrl if signature scheme is not found
Tobias Brunner [Tue, 30 Apr 2019 08:25:56 +0000 (10:25 +0200)]
pki: Fix memory leaks in --signcrl if signature scheme is not found

Fixes: dd4bd21c5a22 ("pki: Query private key for supported signature schemes")

19 months agotesting: Update documentation in headers of all updown scripts
Tobias Brunner [Mon, 29 Apr 2019 15:43:04 +0000 (17:43 +0200)]
testing: Update documentation in headers of all updown scripts

19 months agoswanctl: Move documentation of if_id_in/out after all mark-related options
Tobias Brunner [Mon, 29 Apr 2019 15:37:30 +0000 (17:37 +0200)]
swanctl: Move documentation of if_id_in/out after all mark-related options

Also fix a typo.

19 months agoFixed some typos, courtesy of codespell
Tobias Brunner [Mon, 29 Apr 2019 13:07:25 +0000 (15:07 +0200)]
Fixed some typos, courtesy of codespell

19 months agononce: Allow overriding the RNG quality used to generate nonces
Tobias Brunner [Tue, 23 Apr 2019 09:14:44 +0000 (11:14 +0200)]
nonce: Allow overriding the RNG quality used to generate nonces

Usually, changing this won't be necessary (actually, some plugins
specifically use different DRGBs for RNG_WEAK in order to separate
the public nonces from random data used for e.g. DH).
But for experts with special plugin configurations this might be
more flexible and avoids code changes.

19 months agounit-tests: Fix skipping of some ECDSA signature schemes
SophieK [Mon, 29 Apr 2019 06:33:47 +0000 (14:33 +0800)]
unit-tests: Fix skipping of some ECDSA signature schemes

Closes strongswan/strongswan#137.

19 months agoNEWS: Added some news for 5.8.0
Tobias Brunner [Fri, 26 Apr 2019 16:54:58 +0000 (18:54 +0200)]
NEWS: Added some news for 5.8.0

19 months agoMerge branch 'update-vici-bindings'
Tobias Brunner [Fri, 26 Apr 2019 08:19:21 +0000 (10:19 +0200)]
Merge branch 'update-vici-bindings'

Updates the command wrappers in all the bindings and simplifies calling
new commands (i.e. not yet wrapped) with the Python and Ruby bindings.

Fixes #3028.

19 months agovici: Update command wrappers in the Perl bindings
Tobias Brunner [Thu, 25 Apr 2019 09:09:20 +0000 (11:09 +0200)]
vici: Update command wrappers in the Perl bindings

Note that load_key() now returns the complete response (to get the key

19 months agovici: Update some data in the Ruby gemspec
Tobias Brunner [Thu, 25 Apr 2019 08:26:11 +0000 (10:26 +0200)]
vici: Update some data in the Ruby gemspec

19 months agovici: Some code style fixes in the Ruby bindings
Tobias Brunner [Wed, 24 Apr 2019 16:05:11 +0000 (18:05 +0200)]
vici: Some code style fixes in the Ruby bindings

As reported by rubocop (some issues were not fixed, in particular
related to class/method length metrics).

19 months agovici: Update command wrappers of the Ruby bindings
Tobias Brunner [Wed, 24 Apr 2019 14:37:11 +0000 (16:37 +0200)]
vici: Update command wrappers of the Ruby bindings

Also reorder them to match

19 months agovici: Refactor how commands are called in the Ruby bindings
Tobias Brunner [Wed, 24 Apr 2019 14:05:12 +0000 (16:05 +0200)]
vici: Refactor how commands are called in the Ruby bindings

Also expose a method to call arbitrary commands, which allows calling not
yet wrapped commands. Exceptions are raised for all commands if the response
includes a negative "success" key (similar to how it's done in the Python

19 months agovici: Fix formatting of return values for load-conn and load-authority commands
Tobias Brunner [Tue, 23 Apr 2019 17:56:22 +0000 (19:56 +0200)]
vici: Fix formatting of return values for load-conn and load-authority commands

19 months agovici: Add missing command wrappers for Python bindings
Tobias Brunner [Tue, 23 Apr 2019 14:13:19 +0000 (16:13 +0200)]
vici: Add missing command wrappers for Python bindings

Also change some for which the return value became relevant.

19 months agovici: Extract command wrappers in Python bindings
Tobias Brunner [Thu, 18 Apr 2019 08:56:15 +0000 (10:56 +0200)]
vici: Extract command wrappers in Python bindings

This simplifies the interface and allows calling not yet wrapped
commands more easily.

19 months agoeap-aka-3gpp2: Increase SQN after each authentication
Tobias Brunner [Wed, 24 Apr 2019 09:30:14 +0000 (11:30 +0200)]
eap-aka-3gpp2: Increase SQN after each authentication

19 months agoMerge branch 'childless'
Tobias Brunner [Thu, 25 Apr 2019 13:32:02 +0000 (15:32 +0200)]
Merge branch 'childless'

Adds support for childless initiation of IKE_SAs (RFC 6023) e.g. to
force a separate DH exchange for all CHILD_SAs including the first one.

Also allows the initiation of only the IKE_SA via swanctl --initiate if
the peer supports this extension.

Closes strongswan/strongswan#99.

19 months agotesting: Add swanctl/net2net-childless scenario
Tobias Brunner [Wed, 3 Apr 2019 09:15:50 +0000 (11:15 +0200)]
testing: Add swanctl/net2net-childless scenario

19 months agounit-tests: Add unit tests for childless IKE_SA initiation
Tobias Brunner [Tue, 2 Apr 2019 14:44:44 +0000 (16:44 +0200)]
unit-tests: Add unit tests for childless IKE_SA initiation

19 months agounit-tests: Make childless initiation configurable
Tobias Brunner [Tue, 2 Apr 2019 14:24:01 +0000 (16:24 +0200)]
unit-tests: Make childless initiation configurable

19 months agounit-tests: Add helper to create but not yet establish two IKE_SAs
Tobias Brunner [Tue, 2 Apr 2019 14:23:34 +0000 (16:23 +0200)]
unit-tests: Add helper to create but not yet establish two IKE_SAs

19 months agounit-tests: Add macros to assert certain payloads are (not) in a message
Tobias Brunner [Tue, 2 Apr 2019 14:22:21 +0000 (16:22 +0200)]
unit-tests: Add macros to assert certain payloads are (not) in a message

19 months agovici: Support initiation of IKE_SAs
Tobias Brunner [Fri, 29 Mar 2019 16:38:39 +0000 (17:38 +0100)]
vici: Support initiation of IKE_SAs

The configuration must allow the initiation of a childless IKE_SA (which
is already the case with the default of 'accept').

19 months agovici: Make childless initiation of IKE_SAs configurable
Tobias Brunner [Fri, 29 Mar 2019 16:13:49 +0000 (17:13 +0100)]
vici: Make childless initiation of IKE_SAs configurable

19 months agocontroller: Make child config optional for initiate()
Tobias Brunner [Fri, 29 Mar 2019 15:50:26 +0000 (16:50 +0100)]
controller: Make child config optional for initiate()

19 months agochild-create: Initiate and handle childless IKE_SAs according to RFC 6023
Tobias Brunner [Fri, 29 Mar 2019 15:46:59 +0000 (16:46 +0100)]
child-create: Initiate and handle childless IKE_SAs according to RFC 6023

19 months agoike-init: Notify initiator if childless IKE_SAs are accepted
Tobias Brunner [Fri, 29 Mar 2019 14:18:08 +0000 (15:18 +0100)]
ike-init: Notify initiator if childless IKE_SAs are accepted

19 months agoike-cfg: Add setting for childless IKE_SAs
Tobias Brunner [Fri, 29 Mar 2019 14:06:20 +0000 (15:06 +0100)]
ike-cfg: Add setting for childless IKE_SAs

19 months agoike-cfg: Pass arguments as struct
Tobias Brunner [Fri, 29 Mar 2019 11:11:10 +0000 (12:11 +0100)]
ike-cfg: Pass arguments as struct