]> git.ipfire.org Git - thirdparty/strongswan.git/log
thirdparty/strongswan.git
3 years agotime: Allow using different clocks
Tobias Brunner [Thu, 19 Mar 2020 13:19:22 +0000 (14:19 +0100)] 
time: Allow using different clocks

On some systems it might be preferable to use e.g. CLOCK_BOOTTIME
instead of CLOCK_MONOTONIC, which is also not affected by time
adjustments but includes times when the system was suspended.

3 years agomutex: Don't use ...timedwait_monotonic() if clock is set via attribute
Tobias Brunner [Wed, 1 Apr 2020 08:17:27 +0000 (10:17 +0200)] 
mutex: Don't use ...timedwait_monotonic() if clock is set via attribute

This allows using clocks other than CLOCK_MONOTONIC.

3 years agoike: Track NAT-keepalives as outbound packets
Tobias Brunner [Thu, 19 Mar 2020 10:25:37 +0000 (11:25 +0100)] 
ike: Track NAT-keepalives as outbound packets

3 years agoandroid: Fix app icon on Android versions < 5.0
Tobias Brunner [Wed, 15 Jan 2020 13:12:07 +0000 (14:12 +0100)] 
android: Fix app icon on Android versions < 5.0

XML resources are apparently not supported there.  Moving the icon to
the mipmap folders should fix that.  Aliases are defined for the icons on
Android < 8.0.

3 years agoandroid: Update Gradle plugin
Tobias Brunner [Wed, 15 Jan 2020 12:58:47 +0000 (13:58 +0100)] 
android: Update Gradle plugin

3 years agoandroid: Again change how data source is handled in TileService
Tobias Brunner [Mon, 21 Oct 2019 13:12:05 +0000 (15:12 +0200)] 
android: Again change how data source is handled in TileService

Evidently, onClick() may be called either before onStartListening() or
after onStopListening() has been called, which causes a crash when
trying to load a VpnProfile via mDataSource.

This partially reverts 3716af079e21 ("android: Avoid crash related to
TileService on Huawei devices").

3 years agotravis: Bump tpm2-tss to 2.4.1
Tobias Brunner [Mon, 25 May 2020 12:29:44 +0000 (14:29 +0200)] 
travis: Bump tpm2-tss to 2.4.1

Manually built dependencies are now built in a separate step after
packages have been installed as they might depend themselves on some
packages (e.g. tpm2-tss, which now requires libjson-c).

3 years agocharon-nm: Allow configurable remote traffic selectors
Thomas [Sun, 24 May 2020 11:54:31 +0000 (13:54 +0200)] 
charon-nm: Allow configurable remote traffic selectors

This change allows to customize the previously hard-coded remote traffic
selectors.

This does not actually write the newly added "remote-ts" configuration option
into NetworkManager's configuration file, but will use an existing value.
Exposing the config setting in the GUI could be done later if this is a
desired change.

Use case:  remote firewall appliance wrongly accepts the `0.0.0.0/0` TS but
does not actually route external traffic, leaving the user with a partially
working internet connection.

Closes strongswan/strongswan#173.

3 years agoikev2: Return to the original host if connection fails after redirection
Tobias Brunner [Tue, 19 May 2020 08:07:18 +0000 (10:07 +0200)] 
ikev2: Return to the original host if connection fails after redirection

If we fail connecting to the host we got redirected to, we should restart
with the original host where we might get redirected to a different host.

We must not reset this when retrying due to INVALID_KE_PAYLOAD or COOKIE
notifies.  Since we keep the initiator SPI in those cases, we use that
flag as indicator.

Since we don't store the original remote_host value, we can't restore
that.  So there is a potential conflict with MIPv6.

Closes strongswan/strongswan#171.

3 years agonm: Version bump to 1.5.2
Tobias Brunner [Tue, 19 May 2020 14:14:49 +0000 (16:14 +0200)] 
nm: Version bump to 1.5.2

3 years agonm: Move server port to options tab and position tabs to the left
Tobias Brunner [Mon, 18 May 2020 14:38:51 +0000 (16:38 +0200)] 
nm: Move server port to options tab and position tabs to the left

Also shortened the title of the proposal tab.  This saves some additional
screen space.

Fixes #3448.

3 years agonm: Use tabs for options/proposals to save screen space
Tobias Brunner [Mon, 18 May 2020 09:26:08 +0000 (11:26 +0200)] 
nm: Use tabs for options/proposals to save screen space

The height of the dialog increased due to the recently added additional
fields for certificate selection and identities.  On some screens the
fields to configure custom proposals were not visible anymore.
Together with less spacing on the top level GtkBox this change reduces
the height by about 80 pixels.

Fixes #3448.

3 years agonm: Migrate appdata to metainfo
Tobias Brunner [Mon, 11 May 2020 07:48:27 +0000 (09:48 +0200)] 
nm: Migrate appdata to metainfo

The path '/usr/share/appdata' is deprecated as is the .appdata.xml
extension, files should be in installed in '/usr/share/metainfo' with
a .metainfo.xml extension.

According to the docs, the metainfo path should be well supported even
by older distros like Ubuntu 16.04.

Reference: 2.1.2. Filesystem locations
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html

3 years agonm: Version bump to 1.5.1
Tobias Brunner [Fri, 8 May 2020 16:09:32 +0000 (18:09 +0200)] 
nm: Version bump to 1.5.1

3 years agocharon-nm: Clear secrets when disconnecting
Tobias Brunner [Fri, 8 May 2020 08:33:55 +0000 (10:33 +0200)] 
charon-nm: Clear secrets when disconnecting

The need_secrets() method is called before connect() (where we clear the
previous secrets too), so e.g. a password-protected private could be
decrypted with the cached password from earlier but if the password was not
stored with the connection, it would later fail as no password was requested
from the user that could be passed to connect().

References #3428.

3 years agonm: Fix password entry for private keys and allow saving it
Tobias Brunner [Tue, 28 Apr 2020 17:09:15 +0000 (19:09 +0200)] 
nm: Fix password entry for private keys and allow saving it

On newer desktops the auth dialog is called with --external-ui-mode and
it seems that the password flag has to be set, otherwise the password is
not stored temporarily in the profile and passed to charon-nm (not sure
how this works exactly as need_secrets() is called multiple times even
after the password was already entered, only before doing so the last
time is the password available in that callback, but only if the flag
was set).  This now also allows storing the password for the private key
with the profile.

Fixes #3428.

3 years agoike: Properly support high number of retransmission tries
Tobias Brunner [Thu, 2 Apr 2020 13:48:31 +0000 (15:48 +0200)] 
ike: Properly support high number of retransmission tries

Due to the exponential backoff a high number of retransmits only
makes sense if retransmit_limit is set.  However, even with that there
was a problem.

We first calculated the timeout for the next retransmit and only then
compared that to the configured limit.  Depending on the configured
base and timeout the calculation overflowed the range of uint32_t after
a relatively low number of retransmits (with the default values after 23)
causing the timeout to first get lower (on a high level) before constantly
resulting in 0 (with the default settings after 60 retransmits).

Since that's obviously lower than any configured limit, all remaining
retransmits were then sent without any delay, causing a lot of concurrent
messages if the number of retransmits was high.

This change determines the maximum number of retransmits until an
overflow occurs based on the configuration and defaults to UINT32_MAX
if that value is exceeded.  Note that since the timeout is in milliseconds
UINT32_MAX equals nearly 50 days.

The calculation in task_manager_total_retransmit_timeout() uses a double
variable and the result is in seconds so the maximum number would be higher
there (with the default settings 1205).  However, we want its result to
be based on the actual IKE retransmission behavior.

3 years agoike-auth: Add option to use EAP-only authentication without notify
Tobias Brunner [Tue, 7 Apr 2020 16:49:00 +0000 (18:49 +0200)] 
ike-auth: Add option to use EAP-only authentication without notify

Some peers apparently don't send the notify and still expect to
authenticate with EAP-only authentication.  This option allows forcing
the configured use of EAP-only authentication in that scenario.

3 years agochild-create: Properly handle DH group during migration when reestablishing
Tobias Brunner [Wed, 1 Apr 2020 07:48:56 +0000 (09:48 +0200)] 
child-create: Properly handle DH group during migration when reestablishing

If such a task was active while reestablishing it will get queued on the
new IKE_SA.  If the DH group is already set, the DH groups won't be
stripped from the proposals and a KE payload will be sent, which is invalid
during IKE_AUTH.  We don't want to reset the group if the task is part of a
child-rekey task.

3 years agoikev1: Use actual local identity as initiator or aggressive mode responder
Tobias Brunner [Thu, 9 Apr 2020 08:14:42 +0000 (10:14 +0200)] 
ikev1: Use actual local identity as initiator or aggressive mode responder

If none is configured, there is a fallback to the IP address, which is
not stored on the static auth config, but is set on the IKE_SA.

Fixes #3394.

3 years agoikev1: Store fallback identity (IP address) on IKE_SA's auth-cfg
Tobias Brunner [Tue, 7 Apr 2020 14:59:28 +0000 (16:59 +0200)] 
ikev1: Store fallback identity (IP address) on IKE_SA's auth-cfg

The other auth-cfg object is shared via peer-cfg, so we must not
modify it.  It's only stored to simplify memory management.

Fixes #3394.

3 years agolookip: Use line buffering for stdout
Tobias Brunner [Wed, 8 Apr 2020 14:39:28 +0000 (16:39 +0200)] 
lookip: Use line buffering for stdout

Otherwise, the output is buffered when e.g. piping the output to another
command (or file).  And it avoids having to call fflush() in the
interactive mode.

Fixes #3404.

3 years agotravis: Bump wolfSSL to 4.4.0
Tobias Brunner [Thu, 23 Apr 2020 06:58:41 +0000 (08:58 +0200)] 
travis: Bump wolfSSL to 4.4.0

SHA-3 is only automatically enabled on x86/x64.  The tests are disabled
because we don't need them and they currently cause a compile warning/error
when built with clang on x64 (sizeof() on a pointer to an array).  If the
examples are enabled, another test suite is built, which includes the
disabled crypto tests.

3 years agowolfssl: Add support for Ed448
Tobias Brunner [Thu, 23 Apr 2020 08:39:55 +0000 (10:39 +0200)] 
wolfssl: Add support for Ed448

3 years agowolfssl: Add support for x448 Diffie-Hellman
Tobias Brunner [Thu, 23 Apr 2020 08:26:33 +0000 (10:26 +0200)] 
wolfssl: Add support for x448 Diffie-Hellman

3 years agofile-logger: Set owner/group of log file
Tobias Brunner [Tue, 14 Apr 2020 08:31:49 +0000 (10:31 +0200)] 
file-logger: Set owner/group of log file

The file is usually opened/created by root, however, if user/group IDs
are configured and the configuration is reloaded, the file will be reopened
as configured user.  Like with UNIX sockets we only attempt to change
the user if we have CAP_CHOWN allowing a start as regular user.

We don't have chown() on Windows, so check for it.

3 years agoxfrmi: Only build if libcharon is built
Tobias Brunner [Tue, 14 Apr 2020 08:44:19 +0000 (10:44 +0200)] 
xfrmi: Only build if libcharon is built

The kernel-netlink plugin is only built if libcharon is.

Closes strongswan/strongswan#167.

3 years agopkcs11: Optionally hash data for PKCS#1 v1.5 RSA signatures in software
Tobias Brunner [Mon, 4 May 2020 07:45:39 +0000 (09:45 +0200)] 
pkcs11: Optionally hash data for PKCS#1 v1.5 RSA signatures in software

If cards/libraries don't support signature mechanisms with hashing, we fall
back to do it ourselves in software and pass the PKCS#1 digestInfo ASN.1
structure to sign via CKM_RSA_PKCS mechanism.

Closes strongswan/strongswan#168.

3 years agoscripts: Initialize libstrongswan in id2sql to fix a crash
Tobias Brunner [Mon, 4 May 2020 14:56:47 +0000 (16:56 +0200)] 
scripts: Initialize libstrongswan in id2sql to fix a crash

Since 770f4ccee12d ("identification: Optionally match RDNs in any order
and accept missing RDNs") the DN parser requires lib->settings.

4 years agovici: Allow maximum vici message size configuration via compile option
Thomas Egerer [Tue, 7 Apr 2020 18:35:57 +0000 (20:35 +0200)] 
vici: Allow maximum vici message size configuration via compile option

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
4 years agoUse Botan 2.14.0 for tests
Tobias Brunner [Tue, 7 Apr 2020 08:07:30 +0000 (10:07 +0200)] 
Use Botan 2.14.0 for tests

Requires at least GCC 5.0 to build with `--amalgamation`, so it's
disabled for our Ubuntu 16.04 build.

4 years agoVersion bump to 5.8.4 5.8.4
Andreas Steffen [Sun, 29 Mar 2020 10:49:13 +0000 (12:49 +0200)] 
Version bump to 5.8.4

4 years agoopenssl: Allow squeezing multiple times from SHAKE128/256 XOFs
Tobias Brunner [Thu, 26 Mar 2020 12:52:47 +0000 (13:52 +0100)] 
openssl: Allow squeezing multiple times from SHAKE128/256 XOFs

OpenSSL currently doesn't support squeezing bytes out of an XOF multiple
times.  Unfortunately, EVP_DigestFinalXOF() completely resets the context
and later calls not simply fail, they cause a null-pointer dereference in
libcrypto.  This fixes the crash at the cost of repeating initializing
the whole state and allocating too much data for subsequent calls.

There is an open issue and PR that might add a function that allows
squeezing more data from an XOF in a future version of OpenSSL.

4 years agocharon-nm: Allow using fixed source ports
Tobias Brunner [Thu, 26 Mar 2020 07:55:36 +0000 (08:55 +0100)] 
charon-nm: Allow using fixed source ports

This could be useful in cases a client behind a NAT has to be made reachable
via port forwarding.

Closes strongswan/strongswan#166.

4 years agosettings: Use strtoul(3) for settings to int conversion
Thomas Egerer [Wed, 25 Mar 2020 17:01:37 +0000 (18:01 +0100)] 
settings: Use strtoul(3) for settings to int conversion

strtol(3) accepts values in the range of [LONG_MIN;LONG_MAX].  Based
on the architecture (32 or 64 bits), these values expand to either
0x8000000000000000/0x7fffffffffffffff for 64-bit builds, or
0x80000000/0x7fffffff for 32-bit builds.

The behavior when retrieving non-default values for charon.spi_min or
charon.spi_max, for example, depends on the architecture of the target
platform.  While 0xC000001/0xCFFFFFFE work fine on a 64-bit build, on a
32-bit build, due to the use of strtol(3), an ERANGE causes get_int()
to return the default values.

By using strtoul(3) the default is only returned if the input value
exceeds 32 or 64 bits, based on the platform.  Negative values are still
parsed correctly.

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
4 years agoquick-mode: Make sure we have a proposal before determining lifetimes
Tobias Brunner [Thu, 26 Mar 2020 07:41:00 +0000 (08:41 +0100)] 
quick-mode: Make sure we have a proposal before determining lifetimes

Fixes: e0dd36c9c730 ("ikev1: Get and set the lifetimes of the selected proposal/transform")
4 years agounit-tests: Update expired certificates for TLS tests
Tobias Brunner [Wed, 25 Mar 2020 14:31:07 +0000 (15:31 +0100)] 
unit-tests: Update expired certificates for TLS tests

4 years agonm: Version bump to 1.5.0
Tobias Brunner [Wed, 25 Mar 2020 09:14:46 +0000 (10:14 +0100)] 
nm: Version bump to 1.5.0

4 years agoVersion bump to 5.8.3 5.8.3
Andreas Steffen [Tue, 24 Mar 2020 15:01:04 +0000 (16:01 +0100)] 
Version bump to 5.8.3

4 years agocharon-nm: Correctly set remote auth class for PSK authentication
Tobias Brunner [Fri, 20 Mar 2020 14:53:37 +0000 (15:53 +0100)] 
charon-nm: Correctly set remote auth class for PSK authentication

Fixes: bc3eda99bac0 ("charon-nm: Add support for EAP-TLS")
4 years agoVersion bump to 5.8.3rc1 5.8.3rc1
Andreas Steffen [Thu, 19 Mar 2020 07:43:10 +0000 (08:43 +0100)] 
Version bump to 5.8.3rc1

4 years agoNEWS: Add news for 5.8.3
Tobias Brunner [Thu, 12 Mar 2020 18:32:43 +0000 (19:32 +0100)] 
NEWS: Add news for 5.8.3

4 years agoopenssl: Add support for SHAKE128/256
Tobias Brunner [Tue, 10 Mar 2020 11:16:26 +0000 (12:16 +0100)] 
openssl: Add support for SHAKE128/256

4 years agoopenssl: Add support for SHA-3
Tobias Brunner [Tue, 10 Mar 2020 10:22:12 +0000 (11:22 +0100)] 
openssl: Add support for SHA-3

4 years agoMerge branch 'throw-type-routes'
Tobias Brunner [Tue, 10 Mar 2020 11:49:53 +0000 (12:49 +0100)] 
Merge branch 'throw-type-routes'

Implements simpler routes for passthrough policies on Linux, which
basically act as fallbacks on routes in other routing tables.  This way
they require less information (e.g. no interface or source IP) and can
be installed earlier and are not affected by updates.

Closes strongswan/strongswan#165.
Fixes #3118.

4 years agokernel-netlink: Extract shared route handling code in net/ipsec
Tobias Brunner [Mon, 9 Mar 2020 15:41:28 +0000 (16:41 +0100)] 
kernel-netlink: Extract shared route handling code in net/ipsec

4 years agokernel-netlink: Don't require an interface name for passthrough policies
Tobias Brunner [Wed, 26 Feb 2020 15:53:06 +0000 (16:53 +0100)] 
kernel-netlink: Don't require an interface name for passthrough policies

4 years agokernel-netlink: Allow blank source address in routes for passthrough policies
Tobias Brunner [Tue, 25 Feb 2020 15:39:35 +0000 (16:39 +0100)] 
kernel-netlink: Allow blank source address in routes for passthrough policies

4 years agokernel-netlink: Implement passthrough type routes and use them on Linux
Noel Kuntze [Sun, 9 Feb 2020 13:52:32 +0000 (14:52 +0100)] 
kernel-netlink: Implement passthrough type routes and use them on Linux

Enables us to ignore any future kernel features for routes unless
we actually need to consider them for the source IP routes.

Also enables us to actually really skip IPsec processing for those networks
(because even the routes don't touch those packets). It's more what
users expect.

Co-authored-by: Tobias Brunner <tobias@strongswan.org>
4 years agokernel-interface: Reallocate previously used reqids
Tobias Brunner [Fri, 13 Dec 2019 15:46:47 +0000 (16:46 +0100)] 
kernel-interface: Reallocate previously used reqids

This is mainly an issue on FreeBSD where the current kernel still only
allows the daemon to use reqids < IPSEC_MANUAL_REQID_MAX (0x3fff = 16383).

Fixes #2315.

4 years agoike: Optionally allow private algorithms for IKE/CHILD_SAs
Thomas Egerer [Thu, 12 Sep 2019 14:58:46 +0000 (16:58 +0200)] 
ike: Optionally allow private algorithms for IKE/CHILD_SAs

Charon refuses to make use of algorithms IDs from the private space
for unknown peer implementations [1]. If you chose to ignore and violate
that section of the RFC since you *know* your peers *must* support those
private IDs, there's no way to disable that behavior.

With this commit a strongswan.conf option is introduced which allows to
deliberately ignore parts of section 3.12 from the standard.

[1] http://tools.ietf.org/html/rfc7296#section-3.12

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
4 years agoopenssl: Don't check signature if issuer doesn't match always
Tobias Brunner [Wed, 4 Mar 2020 18:26:55 +0000 (19:26 +0100)] 
openssl: Don't check signature if issuer doesn't match always

Doing this for the self-signed check also (i.e. if this and issuer are
the same) is particularly useful if the issuer uses a different key type.
Otherwise, we'd try to verify the signature with an incompatible key
that would result in a log message.

Fixes #3357.

4 years agonm: Update NEWS for next release
Tobias Brunner [Tue, 25 Feb 2020 10:38:43 +0000 (11:38 +0100)] 
nm: Update NEWS for next release

4 years agoMerge branch 'ikev1-transform-nr'
Tobias Brunner [Fri, 6 Mar 2020 09:47:34 +0000 (10:47 +0100)] 
Merge branch 'ikev1-transform-nr'

With these changes we return the lifetimes of the actually selected
transform back to the client, which is an issue if the peer uses
different lifetimes for different proposals.  We now also return the
correct transform and proposal IDs.

Fixes #3329.

4 years agoikev1: Get and set the lifetimes of the selected proposal/transform
Tobias Brunner [Thu, 6 Feb 2020 14:52:06 +0000 (15:52 +0100)] 
ikev1: Get and set the lifetimes of the selected proposal/transform

Previously, we simply used the lifetimes of the first
proposal/transform, which is not correct if the initiator uses different
lifetimes in its proposals/transforms.

4 years agoproposal-substructure: Start numbering IKEv1 proposals with 1
Tobias Brunner [Fri, 7 Feb 2020 08:45:56 +0000 (09:45 +0100)] 
proposal-substructure: Start numbering IKEv1 proposals with 1

4 years agoproposal-substructure: Encode transform number of selected IKEv1 proposal
Tobias Brunner [Thu, 6 Feb 2020 14:46:27 +0000 (15:46 +0100)] 
proposal-substructure: Encode transform number of selected IKEv1 proposal

4 years agoproposal-substructure: Store transform number for IKEv1 proposals
Tobias Brunner [Thu, 6 Feb 2020 14:46:05 +0000 (15:46 +0100)] 
proposal-substructure: Store transform number for IKEv1 proposals

4 years agoproposal: Add IKEv1 transform number on which a proposal is based
Tobias Brunner [Thu, 6 Feb 2020 14:39:45 +0000 (15:39 +0100)] 
proposal: Add IKEv1 transform number on which a proposal is based

4 years agolibtls: Remove unused variable in TLS socket implementation
Tobias Brunner [Mon, 2 Mar 2020 15:37:36 +0000 (16:37 +0100)] 
libtls: Remove unused variable in TLS socket implementation

Not used anymore since c43e8fdec400 ("Block TLS read when sending data,
but have to wait for the handshake data first").

4 years agoVersion bump to 5.8.3dr1
Andreas Steffen [Wed, 4 Mar 2020 21:24:54 +0000 (22:24 +0100)] 
Version bump to 5.8.3dr1

4 years agoscript: Fix upper bounds
Tobias Brunner [Wed, 4 Mar 2020 16:07:32 +0000 (17:07 +0100)] 
script: Fix upper bounds

^ is the XOR operator.

4 years agopubkey-speed: Add sanity check for the number of rounds
Tobias Brunner [Mon, 2 Mar 2020 16:37:54 +0000 (17:37 +0100)] 
pubkey-speed: Add sanity check for the number of rounds

The allocated buffer for the signatures is based on this, which LGTM
doesn't like.

4 years agocrypt-burn: Add sanity check for buffer length
Tobias Brunner [Mon, 2 Mar 2020 16:36:33 +0000 (17:36 +0100)] 
crypt-burn: Add sanity check for buffer length

This value is passed to chunk_alloc(), which LGTM complains about.

4 years agoconfigure: Make sure Python is available for static builds
Tobias Brunner [Fri, 28 Feb 2020 09:39:15 +0000 (10:39 +0100)] 
configure: Make sure Python is available for static builds

We need Python to create files that reference the plugin constructors.
Without it, empty files are created and plugins can't be loaded.

Fixes #3349.

4 years agotravis: Enable caching for sonarcloud scan
Tobias Brunner [Fri, 21 Feb 2020 14:23:22 +0000 (15:23 +0100)] 
travis: Enable caching for sonarcloud scan

4 years agoike: Don't reestablish IKE_SAs for which a deletion is queued
Tobias Brunner [Thu, 13 Feb 2020 09:48:49 +0000 (10:48 +0100)] 
ike: Don't reestablish IKE_SAs for which a deletion is queued

If an IKE_SA is terminated while a task is active, the delete task is
simply queued (unless the deletion is forced).  If the active task times
out before any optional timeout associated with the termination hits, the
IKE_SA previously was reestablished without considering the termination
request.

Fixes #3335.

4 years agoRemove obsolete packages directory
Tobias Brunner [Wed, 19 Feb 2020 16:38:57 +0000 (17:38 +0100)] 
Remove obsolete packages directory

These Debian package sources have not been updated for years and are
severely out-of-date.  Since the Debian packages are properly
maintained nowadays, we don't have to provide our own package sources
to serve as examples.

References #3344.

4 years agotravis: Bump tpm2-tss to 2.3.3
Tobias Brunner [Wed, 19 Feb 2020 09:52:57 +0000 (10:52 +0100)] 
travis: Bump tpm2-tss to 2.3.3

4 years agotravis: Remove deprecated `sudo` option, set default OS
Tobias Brunner [Wed, 19 Feb 2020 10:50:26 +0000 (11:50 +0100)] 
travis: Remove deprecated `sudo` option, set default OS

Also replaces `matrix` with the current official name `jobs`.

4 years agocharon-nm: Use better default directory for D-Bus policy file
Tobias Brunner [Thu, 13 Feb 2020 16:53:17 +0000 (17:53 +0100)] 
charon-nm: Use better default directory for D-Bus policy file

Also makes it configurable via configure script.  Depending on `$datadir` is
not ideal as package maintainers might set that to a custom value.  Depending
on `$datarootdir` might have been better, the default if pkg-config fails is
now based on that.

References #3339.

4 years agotravis: Add build tests for NM plugin
Tobias Brunner [Wed, 12 Feb 2020 14:41:36 +0000 (15:41 +0100)] 
travis: Add build tests for NM plugin

4 years agonm: Ignore generated POT file
Tobias Brunner [Wed, 12 Feb 2020 14:57:35 +0000 (15:57 +0100)] 
nm: Ignore generated POT file

4 years agonm: Only check PSK length if one is actually stored
Tobias Brunner [Wed, 12 Feb 2020 13:04:45 +0000 (14:04 +0100)] 
nm: Only check PSK length if one is actually stored

4 years agoMerge commit 'nm-client-id'
Tobias Brunner [Fri, 14 Feb 2020 13:47:34 +0000 (14:47 +0100)] 
Merge commit 'nm-client-id'

Makes the client's IKE identity configurable in the NM GUI.  For PSK
authentication the identity is now configured via that new field
and not the username anymore (old configs still work and are migrated
when edited).  The client identity now also defaults to the IP address
if not configured when using EAP/PSK.

Fixes #2581.

4 years agonm: Make local identity configurable
Tobias Brunner [Wed, 12 Feb 2020 10:39:07 +0000 (11:39 +0100)] 
nm: Make local identity configurable

For PSK authentication we now use the local identity and not the username
field.

4 years agocharon-nm: Add support for custom local IKE identities
Tobias Brunner [Wed, 12 Feb 2020 10:35:53 +0000 (11:35 +0100)] 
charon-nm: Add support for custom local IKE identities

4 years agoMerge branch 'nm-reauth'
Tobias Brunner [Fri, 14 Feb 2020 12:58:50 +0000 (13:58 +0100)] 
Merge branch 'nm-reauth'

With these changes, the NM service should be able to handle
reauthentication (and redirection) by switching to the new IKE_SA and
not considering the old SA going down an error.

Fixes #852.

4 years agocharon-nm: Keep listener registered even on failures
Tobias Brunner [Fri, 7 Feb 2020 14:22:31 +0000 (15:22 +0100)] 
charon-nm: Keep listener registered even on failures

NM doesn't seem to terminate the daemon on failures, so we might not get
further events for later retries.

4 years agocharon-nm: Support reauthentication and redirection
Tobias Brunner [Thu, 6 Feb 2020 16:36:46 +0000 (17:36 +0100)] 
charon-nm: Support reauthentication and redirection

4 years agoMerge branch 'nm-eap-tls'
Tobias Brunner [Fri, 14 Feb 2020 12:51:44 +0000 (13:51 +0100)] 
Merge branch 'nm-eap-tls'

Adds support for EAP-TLS to the NM plugin.  The certificates/key
source (file, smartcard, agent) can now be selected independently of
the authentication method (i.e. for both certificate and EAP-TLS auth).

Fixes #2097.

4 years agonm: Make EAP-TLS configurable
Tobias Brunner [Wed, 5 Feb 2020 15:01:08 +0000 (16:01 +0100)] 
nm: Make EAP-TLS configurable

A new combo field allows selecting where the certificate/key is stored.

4 years agocharon-nm: Add support for EAP-TLS
Tobias Brunner [Wed, 5 Feb 2020 15:00:10 +0000 (16:00 +0100)] 
charon-nm: Add support for EAP-TLS

The code is structured similar to that in the Android client, but two-round
authentication (cert+EAP) is not supported as that might require multiple
secrets ("password" is currently the only secret field used for every
method) and other details are currently missing too (like configurable
client identities).

4 years agoMerge branch 'nm-server-port'
Tobias Brunner [Fri, 14 Feb 2020 12:36:25 +0000 (13:36 +0100)] 
Merge branch 'nm-server-port'

Adds the option to use a custom server port in the NM plugin.

Fixes #625.

4 years agonm: Make server port configurable in GUI
Tobias Brunner [Thu, 19 Dec 2019 13:40:47 +0000 (14:40 +0100)] 
nm: Make server port configurable in GUI

4 years agocharon-nm: Add support for custom server ports
Tobias Brunner [Thu, 19 Dec 2019 13:40:11 +0000 (14:40 +0100)] 
charon-nm: Add support for custom server ports

4 years agoMerge branch 'nm-remote-id'
Tobias Brunner [Fri, 14 Feb 2020 12:29:10 +0000 (13:29 +0100)] 
Merge branch 'nm-remote-id'

This adds an optional field to the NM plugin to configure the server
identity, so it can differ from the address or certificate subject,
which are used by default.

It also updates the Glade file to GTK+ 3.2.

Closes strongswan/strongswan#57.

4 years agonm: Update German translation
Tobias Brunner [Tue, 17 Dec 2019 16:20:36 +0000 (17:20 +0100)] 
nm: Update German translation

4 years agonm: Make remote identity editable in GUI
Tobias Brunner [Tue, 17 Dec 2019 15:28:00 +0000 (16:28 +0100)] 
nm: Make remote identity editable in GUI

4 years agocharon-nm: Add support for a specific remote identity
Tobias Brunner [Tue, 17 Dec 2019 15:26:34 +0000 (16:26 +0100)] 
charon-nm: Add support for a specific remote identity

4 years agonm: Add hint regarding password storage policy
Tobias Brunner [Tue, 17 Dec 2019 15:16:08 +0000 (16:16 +0100)] 
nm: Add hint regarding password storage policy

Requires targeting GTK 3.2.

4 years agonm: Replace the term "gateway" with "server"
Tobias Brunner [Tue, 17 Dec 2019 15:03:08 +0000 (16:03 +0100)] 
nm: Replace the term "gateway" with "server"

4 years agonm: Update Glade file for GTK 3.0
Tobias Brunner [Tue, 17 Dec 2019 11:30:22 +0000 (12:30 +0100)] 
nm: Update Glade file for GTK 3.0

That's the version we check for in the configure script.

4 years agoconfigure: Depend on libip4tc instead of libiptc
Tobias Brunner [Thu, 13 Feb 2020 08:52:31 +0000 (09:52 +0100)] 
configure: Depend on libip4tc instead of libiptc

The libiptc meta-package apparently will be removed e.g. from Debian.
We currently only need IPv4 support in the connmark and forecast plugins.

Fixes #3338.

4 years agounit-tests: Increase timeout for test vectors suite
Tobias Brunner [Thu, 13 Feb 2020 15:42:13 +0000 (16:42 +0100)] 
unit-tests: Increase timeout for test vectors suite

These occasionally fail due to the current timeout on IBM Power on Travis.

4 years agoRevert "travis: Add workaround for a tox/virtualenv/six issue"
Tobias Brunner [Thu, 13 Feb 2020 15:34:27 +0000 (16:34 +0100)] 
Revert "travis: Add workaround for a tox/virtualenv/six issue"

This reverts commit d450e926de65e5517293d38ec3ad2a1a17020d05.

Was fixed by making tox depend on newer versions of six so the package
gets installed/updated automatically now when installing tox.  There is
also some ongoing work that tries to make virtualenv work with older
versions of six.

4 years agoenumerator: Fall back to lstat() if stat() fails when enumerating dirs/files
Tobias Brunner [Wed, 12 Feb 2020 16:37:34 +0000 (17:37 +0100)] 
enumerator: Fall back to lstat() if stat() fails when enumerating dirs/files

This happens e.g. if the path is for an invalid symlink.

4 years agocirrus: Remove bashisms from test script to make it compatible with /bin/sh
Tobias Brunner [Wed, 12 Feb 2020 16:49:14 +0000 (17:49 +0100)] 
cirrus: Remove bashisms from test script to make it compatible with /bin/sh

Bash is not installed on the FreeBSD images here and the location would
be different anyway (`/usr/local/bin/bash`, so we'd have to change the
hashbang to e.g. `/usr/bin/env bash`).

4 years agotravis: Add workaround for a tox/virtualenv/six issue
Tobias Brunner [Mon, 10 Feb 2020 13:48:02 +0000 (14:48 +0100)] 
travis: Add workaround for a tox/virtualenv/six issue

virtualenv is installed as dependency of tox and 20.0.0 added a
dependency on a newer version of six, which is not automatically
installed/updated.

4 years agoikev2: Fix spelling of routability
Josh Soref [Wed, 5 Feb 2020 09:13:22 +0000 (04:13 -0500)] 
ikev2: Fix spelling of routability

References strongswan/strongswan#164.