]> git.ipfire.org Git - thirdparty/strongswan.git/log
thirdparty/strongswan.git
2 years agotls: Only return EAP MSK if TLS handshake is complete
Tobias Brunner [Mon, 13 Mar 2023 12:26:25 +0000 (13:26 +0100)] 
tls: Only return EAP MSK if TLS handshake is complete

The MSK is generated when the keys are derived.  For TLS 1.3 that's also
when the handshake is complete.  However, for TLS 1.2 it happens when
generating or processing the ClientKeyExchange message, which, on the
client, happens before the final Finished handshake message has been
received from the server.  This caused the EAP-TLS client to accept an
EAP-Success message instead of the server's final TLS handshake
messages, unintentionally allowing servers to cut the exchange short by
two EAP messages (in the regular exchange the response to the server's
final handshake messages is an empty EAP-Response, which is then
followed by the server's EAP-Success).

While this is not correct, it does not seem to pose a security issue.
If DH is used as key exchange, the server signs the ServerKeyExchange
message and the client is sure to communicate with a trusted server
before it derives the MSK.  If RSA encryption is used as key exchange,
the client sends the premaster secret, on which the MSK is based,
encrypted with the server's public key (as extracted from the trusted
certificate).  An attacker won't be able to decrypt this and, therefore,
can't derive the same MSK to generate a valid AUTH payload and the IKE
authentication will fail.

2 years agogithub: Add LSan workaround for tests on Ubuntu 20.04 again
Tobias Brunner [Thu, 16 Mar 2023 13:11:12 +0000 (14:11 +0100)] 
github: Add LSan workaround for tests on Ubuntu 20.04 again

This was removed with 0fea6a7f8e7e ("github: Adapt to switch to Ubuntu
22.04 for ubuntu-latest") as it didn't seem necessary anymore.  But
recently there have been such random crashes again with the 20.04 image.

2 years agogithub: Use OpenSSL 3.1.0 for tests
Tobias Brunner [Tue, 14 Mar 2023 16:03:05 +0000 (17:03 +0100)] 
github: Use OpenSSL 3.1.0 for tests

2 years agovici: Generalize timeout support in Python bindings
Jean-Tiare Le Bigot [Thu, 2 Mar 2023 22:20:13 +0000 (23:20 +0100)] 
vici: Generalize timeout support in Python bindings

Since 3dd5dc50119d ("Merge branch 'vici-python-timeout'"), any timeout
set directly on the socket is reset by `vici.Transport.receive()` unless
called by `vici.Session.listen()`. This prevents configuring a default
timeout directly on the socket.

However, setting a timeout directly on the socket also had drawbacks
since it can cause `vici.Transport.receive()` to raise a timeout error
while a subset of the data have been received, with no way to recover.

This commit merges both approaches by considering the timeout configured
on the socket by default (when no timeout is explicitly set) and
keeping the switch to blocking receive once the first byte has been
received. When the full expected data have been received, the timeout
configured on the socket is restored.

Co-authored-by: Tobias Brunner <tobias@strongswan.org>
Signed-off-by: Jean-Tiare Le Bigot <jt@yadutaf.fr>
Closes strongswan/strongswan#1562

2 years agogithub: Don't build on Ubuntu 18.04 anymore
Tobias Brunner [Tue, 7 Mar 2023 13:51:10 +0000 (14:51 +0100)] 
github: Don't build on Ubuntu 18.04 anymore

The Ubuntu 18.04 image is deprecated and builds will start to fail
temporarily during four 24 hour periods from now until the final
deprecation on April 1st.  So better remove these runs now.

2 years agoappveyor: Fix LDFLAGS for Windows build
Tobias Brunner [Fri, 3 Mar 2023 12:02:44 +0000 (13:02 +0100)] 
appveyor: Fix LDFLAGS for Windows build

With newer OpenSSL builds, the DLL files contain parts of the version
number and the architecture in their name, e.g. for OpenSSL 1.1.1 the
DLL for libcrypto is called libcrypto-1_1-x64.dll.  So referencing that
directly could be kinda tricky.  And by using `-lcrypto` we therefore
didn't link those DLLs but the OpenSSL version installed by msys2.
Since the latter ships OpenSSL 3 since January and the VS 2019 image
was updated recently, our builds broke as we used the headers from
the 1.1.1 installation but then tried to link OpenSSL 3.

Luckily, in the lib/ directory of the OpenSSL installation, there is a
libcrypto.lib file, which is an import library (containing the symbols
and a reference to the DLL).  We can use that to link the right library
via `-lcrypto`.

With the old OpenSSL 1.0.2 build on the VS 2015 image, there is also
such a .lib file but it seems the linker is too old or otherwise incapable
of finding the DLL.  But since the DLL is just called libeay32.dll there,
we use that directly and don't reference the lib/ dir.

Also removed a superfluous AC_MSG_RESULT() if libeay32 isn't found.

2 years agoappveyor: Install gperf manually on newer versions of msys2
Tobias Brunner [Thu, 2 Mar 2023 10:44:59 +0000 (11:44 +0100)] 
appveyor: Install gperf manually on newer versions of msys2

2 years agoVersion bump to 5.9.10 5.9.10
Andreas Steffen [Thu, 2 Mar 2023 08:58:24 +0000 (09:58 +0100)] 
Version bump to 5.9.10

2 years agoNEWS: Add info about CVE-2023-26463
Tobias Brunner [Fri, 24 Feb 2023 15:07:38 +0000 (16:07 +0100)] 
NEWS: Add info about CVE-2023-26463

2 years agoeap-peap: Initiate Phase 2 immediately for TLS 1.3
Tobias Brunner [Wed, 1 Mar 2023 14:51:38 +0000 (15:51 +0100)] 
eap-peap: Initiate Phase 2 immediately for TLS 1.3

Before TLS 1.3, the server sent the last handshake message and had the
option to piggyback the EAP-Identity request directly onto the packet
with the TLS Finished message, or wait for the empty message by the
client that acknowledges the completion of the handshake.  With TLS 1.3,
the client finishes the handshake after the server.  So this option
is irrelevant there and we immediately start with Phase 2.

2 years agotesting: Negotiate TLS 1.3 for part of the EAP-TLS scenarios
Andreas Steffen [Wed, 1 Mar 2023 09:42:06 +0000 (10:42 +0100)] 
testing: Negotiate TLS 1.3 for part of the EAP-TLS scenarios

2 years agoNEWS: Add news for 5.9.10
Tobias Brunner [Fri, 24 Feb 2023 15:03:07 +0000 (16:03 +0100)] 
NEWS: Add news for 5.9.10

2 years agopki: Add possibility to add/remove flags in requests when issuing certificates
Tobias Brunner [Thu, 23 Feb 2023 16:03:05 +0000 (17:03 +0100)] 
pki: Add possibility to add/remove flags in requests when issuing certificates

2 years agopki: Allow overriding EKU flags from certificate request via command line
Tobias Brunner [Thu, 23 Feb 2023 15:54:51 +0000 (16:54 +0100)] 
pki: Allow overriding EKU flags from certificate request via command line

The flags encoded in the PKCS#10 structure (or derived from the encoded
profile name) might not be appropriate in some instances. This allows
overriding them without having to issue a new certificate request.

2 years agoVersion bump to 5.9.10rc1 5.9.10rc1
Andreas Steffen [Wed, 22 Feb 2023 19:00:18 +0000 (20:00 +0100)] 
Version bump to 5.9.10rc1

2 years agotesting: Add a failing client to the ikev2/rw-eap-tls-only scenario
Tobias Brunner [Wed, 22 Feb 2023 16:10:03 +0000 (17:10 +0100)] 
testing: Add a failing client to the ikev2/rw-eap-tls-only scenario

2 years agolibvici: Fix Doxygen comment for vici_on_close()
Tobias Brunner [Wed, 22 Feb 2023 13:08:24 +0000 (14:08 +0100)] 
libvici: Fix Doxygen comment for vici_on_close()

Fixes: 9e5533fef940 ("libvici: Add callback invoked if connection is closed by daemon")
2 years agoswanctl: Fix Windows build of --monitor-sas command
Tobias Brunner [Wed, 22 Feb 2023 13:01:59 +0000 (14:01 +0100)] 
swanctl: Fix Windows build of --monitor-sas command

Fixes: 4784c92c557f ("swanctl: Terminate --monitor-sa command if daemon closes connection")
2 years agoutils: Add counterpart to wait_sigint() to explicitly stop waiting
Tobias Brunner [Wed, 22 Feb 2023 13:29:39 +0000 (14:29 +0100)] 
utils: Add counterpart to wait_sigint() to explicitly stop waiting

2 years agoMerge branch 'nm-xfrmi'
Tobias Brunner [Wed, 22 Feb 2023 12:44:10 +0000 (13:44 +0100)] 
Merge branch 'nm-xfrmi'

Use XFRM interfaces instead of dummy TUN devices to avoid issues with
name resolution if supported by the kernel.

Closes strongswan/strongswan#1048

2 years agocharon-nm: Use an XFRM interface if available
Tobias Brunner [Mon, 9 Jan 2023 14:19:43 +0000 (15:19 +0100)] 
charon-nm: Use an XFRM interface if available

This allows NM more freedom in regards to how it wants to use the passed
device.  In particular, if dnsmasq is used with NM as that binds to the
interface to send requests via VPN.

Installing the VIPs on lo avoids weird address removal/addition events
that happen for IPv6 on the physical interface (which would cause the VIP
to get incorrectly detected as non-VIP address and ignored during
deletion).

We could let NM install routes via XFRM interface, however, that causes
problems with e.g. the bypass-lan plugin (the throw routes in table 220
wouldn't have any effect).  We could let it install regular routes in
the main table, but determining the physical interface would be tricky
as the routes installed by NM, also in the main table, would conflict.

So instead we let the kernel-netlink interface install routes via XFRM
interface and to avoid routing the IKE traffic that way, we set a mark
on the IKE socket and exclude traffic with that mark from our routing
table.

2 years agokernel-netlink: Add an option to install routes for SAs with XFRM interfaces
Tobias Brunner [Mon, 9 Jan 2023 14:10:55 +0000 (15:10 +0100)] 
kernel-netlink: Add an option to install routes for SAs with XFRM interfaces

Since these might conflict with IKE traffic, this requires special care.
One option is to install bypass policies for the peer, which install
appropriate (throw) routes.  However, that won't work if the traffic to
the gateway itself should be protected, in particular, for host-to-host
tunnels.  So an alternative is to set a mark for the IKE socket and then
exclude that traffic from table 220 via the kernel-netlink plugin's
fwmark option.

2 years agokernel-netlink: Automatically bring up XFRM interfaces after creation
Tobias Brunner [Mon, 9 Jan 2023 13:54:28 +0000 (14:54 +0100)] 
kernel-netlink: Automatically bring up XFRM interfaces after creation

2 years agokernel-netlink: Add manager for XFRM interfaces
Tobias Brunner [Mon, 11 Jul 2022 11:12:46 +0000 (13:12 +0200)] 
kernel-netlink: Add manager for XFRM interfaces

The manager will allow charon-nm to create XFRM interfaces if supported
by the kernel instead of creating an unused dummy TUN interface.

The xfrmi tool is mostly obsolete nowadays as iproute2 supports creating
XFRM interfaces since 5.1.0 (2019-05).  Older Debians don't ship that and
early versions didn't list the interface IDs.  So there might still be
some uses for this tool.

2 years agocharon-nm: Tie lifetime of dummy TUN device to connection
Tobias Brunner [Thu, 5 Jan 2023 15:24:42 +0000 (16:24 +0100)] 
charon-nm: Tie lifetime of dummy TUN device to connection

NM doesn't terminate charon-nm after disconnecting, so the TUN device
previously stayed around even if no connection was established.  This
might be a bit more what users expect.

2 years agoeap-tls: Add support for TLS 1.3
Tobias Brunner [Tue, 17 Jan 2023 14:06:40 +0000 (15:06 +0100)] 
eap-tls: Add support for TLS 1.3

As defined in RFC 9190, a "protected success indication" (0x00) is sent
from the server to the client over the TLS connection when using TLS 1.3.

The client responds with an empty EAP message, which is interpreted as
acknowledgement in our stack.

If we ever support session resumption with tunneled methods such as
EAP-TTLS, we'd have to send such an indication there too.

2 years agotls-crypto: Fix MSK calculation for TLS 1.3
Tobias Brunner [Fri, 12 Feb 2021 12:25:05 +0000 (13:25 +0100)] 
tls-crypto: Fix MSK calculation for TLS 1.3

As noted in 121ac4b9e37e ("tls-crypto: Generate MSK for TLS 1.3"), the
calculation was only preliminary.  It is now fixed according to RFC 9190
and draft-ietf-emu-tls-eap-types (soon to become an RFC, currently in
the RFC editor queue).

Fixes: 121ac4b9e37e ("tls-crypto: Generate MSK for TLS 1.3")
2 years agoMerge branch 'kernel-netlink-sa-lastused'
Tobias Brunner [Wed, 22 Feb 2023 12:21:31 +0000 (13:21 +0100)] 
Merge branch 'kernel-netlink-sa-lastused'

Adds support for a change in Linux kernel 6.2 that allows retrieving
the last use time of an SA from the SA itself instead of having to query
the policies.

2 years agokernel-netlink: Increase log level for dumped Netlink messages
Tobias Brunner [Wed, 11 Jan 2023 16:05:37 +0000 (17:05 +0100)] 
kernel-netlink: Increase log level for dumped Netlink messages

Some of these contain key material so they should be logged on level 4.

2 years agoandroid: Announce support for TFC padding
Tobias Brunner [Thu, 23 Jun 2022 14:38:02 +0000 (16:38 +0200)] 
android: Announce support for TFC padding

Has been supported by libipsec for a long time (since 5.1.1).  UDP encap
is already enforced via config, this just makes the flags the same as
in kernel-libipsec.

2 years agokernel-netlink: Read last use time from SA if possible
Tobias Brunner [Thu, 23 Jun 2022 14:15:45 +0000 (16:15 +0200)] 
kernel-netlink: Read last use time from SA if possible

Since 6.2 the Linux kernel updates the last use time per SA.  In
previous releases the attribute was only updated and reported for
specific outbound IPv6 SAs.

Using this reduces the number of kernel queries per CHILD_SA: for DPDs
from two policy queries (IN/FWD) to a single query of the inbound SA,
and for status reports the three policy queries (IN/FWD/OUT) can be
omitted and only the two SAs have to be queried.  For NAT keepalives the
number of queries doesn't change but a policy query (OUT) is replaced by
a query for the outbound SA.

While we could use the existence of the attribute as indicator for its
support, we don't know this until we queried an SA.  By using a version
check we can announce the feature from the start.

2 years agochild-sa: Query policies only if querying SAs doesn't update the use time
Tobias Brunner [Thu, 23 Jun 2022 14:13:02 +0000 (16:13 +0200)] 
child-sa: Query policies only if querying SAs doesn't update the use time

2 years agokernel-interface: Add feature to indicate if query_sa() returns last use time
Tobias Brunner [Thu, 23 Jun 2022 13:59:56 +0000 (15:59 +0200)] 
kernel-interface: Add feature to indicate if query_sa() returns last use time

Currently supported by libipsec and PF_KEY on macOS (FreeBSD, like Linux,
reports the time the SA was first used in sadb_lifetime_usetime - it also
triggers rekeyings based on that, which Linux doesn't, it also triggers
them if an SA is never used).

2 years agoikev2: Add option to prefer childless IKE_SAs as initiator
Tobias Brunner [Fri, 3 Feb 2023 08:46:37 +0000 (09:46 +0100)] 
ikev2: Add option to prefer childless IKE_SAs as initiator

2 years agoswanctl: Terminate --monitor-sa command if daemon closes connection
Tobias Brunner [Thu, 26 Jan 2023 10:17:30 +0000 (11:17 +0100)] 
swanctl: Terminate --monitor-sa command if daemon closes connection

2 years agolibvici: Add callback invoked if connection is closed by daemon
Tobias Brunner [Thu, 26 Jan 2023 10:16:11 +0000 (11:16 +0100)] 
libvici: Add callback invoked if connection is closed by daemon

2 years agogithub: Explicitly install pkg-config in macOS build
Tobias Brunner [Mon, 20 Feb 2023 13:24:29 +0000 (14:24 +0100)] 
github: Explicitly install pkg-config in macOS build

Apparently not installed anymore in the latest build image.  If it's
missing, we see errors like these:

  configure.ac:38: error: possibly undefined macro: AC_DEFINE

2 years agoandroid: Update the README for the build via NDK
Tobias Brunner [Mon, 20 Feb 2023 13:11:29 +0000 (14:11 +0100)] 
android: Update the README for the build via NDK

2 years agoandroid: New release after OpenSSL plugin fix android-2.4.1-1
Tobias Brunner [Fri, 17 Feb 2023 15:59:13 +0000 (16:59 +0100)] 
android: New release after OpenSSL plugin fix

2 years agoopenssl: Fix size of plugin feature array
Tobias Brunner [Fri, 17 Feb 2023 15:58:19 +0000 (16:58 +0100)] 
openssl: Fix size of plugin feature array

Fixes: 312847e1a322 ("openssl: Add curve25519 and curve448 after ECDH groups")
2 years agoandroid: New release after fixing interoperability issue with Zyxel firewalls android-2.4.1
Tobias Brunner [Fri, 17 Feb 2023 15:36:28 +0000 (16:36 +0100)] 
android: New release after fixing interoperability issue with Zyxel firewalls

2 years agoopenssl: Add curve25519 and curve448 after ECDH groups
Tobias Brunner [Fri, 17 Feb 2023 15:28:07 +0000 (16:28 +0100)] 
openssl: Add curve25519 and curve448 after ECDH groups

This was the order before 46a6b062822c ("openssl: Only announce ECDH
groups actually supported by OpenSSL") but that's not really the reason
for this change.  It's related to the Android app, where we previously
didn't support these DH groups in BoringSSL and added the curve25519
plugin after the openssl plugin instead.  This resulted in the same
order, i.e. ECDH groups before curve25519.  With the switch to OpenSSL
and the mentioned commit, this changed and curve25519 was now the first
group that was proposed and used for the KE payload.  Not really an
issue you'd think, however, there are apparently Zyxel Firewalls with
older firmware versions (some forum posts mentioned a fix in V5.31) that
can't handle KE payloads with DH groups > 21 (ecp521). So with
curve25519 (31) proposed in the KE payload, they silently dropped the
IKE_SA_INIT request and no connection could be established.

2 years agolibtls: Fix double-free for untrusted peer certificates
Tobias Brunner [Fri, 17 Feb 2023 14:07:20 +0000 (15:07 +0100)] 
libtls: Fix double-free for untrusted peer certificates

`public` is returned, but previously only if a trusted key was found.
We obviously don't want to return untrusted keys and since the reference
was correctly destroyed after determining the key type, this later caused
a double-free.

Fixes: 63fd718915b5 ("libtls: call create_public_enumerator() with key_type")
2 years agoenum: Add functions to add and remove mappings from enum names
Tobias Brunner [Thu, 16 Feb 2023 16:04:40 +0000 (17:04 +0100)] 
enum: Add functions to add and remove mappings from enum names

Co-authored-by: Thomas Egerer <thomas.egerer@secunet.com>
2 years agoMerge branch 'hw-packet-offload'
Tobias Brunner [Fri, 17 Feb 2023 12:27:37 +0000 (13:27 +0100)] 
Merge branch 'hw-packet-offload'

This adds support for the new "packet" hardware offload feature that's
added to the Linux kernel with 6.2.  In this mode, the device handles
the complete framing of the ESP packet as well as the policy checks,
in addition to the crypto.

For the IKE sockets, port-based bypass policies are automatically
offloaded to devices that support it.

Closes strongswan/strongswan#1462

2 years agokernel-netlink: Offload bypass policies for IKE ports on interfaces
Tobias Brunner [Fri, 27 Jan 2023 13:08:41 +0000 (14:08 +0100)] 
kernel-netlink: Offload bypass policies for IKE ports on interfaces

While this uses the same mechanism, it's not necessary to explicitly
enable port_bypass, the regular socket policies work fine to bypass any
software policies.

2 years agokernel-netlink: Use event socket wrapper for XFRM and networking events
Tobias Brunner [Thu, 26 Jan 2023 16:50:51 +0000 (17:50 +0100)] 
kernel-netlink: Use event socket wrapper for XFRM and networking events

2 years agokernel-netlink: Add simple wrapper for Netlink event sockets
Tobias Brunner [Thu, 26 Jan 2023 16:43:18 +0000 (17:43 +0100)] 
kernel-netlink: Add simple wrapper for Netlink event sockets

2 years agokernel-pfkey: Always register for events
Tobias Brunner [Thu, 26 Jan 2023 15:21:07 +0000 (16:21 +0100)] 
kernel-pfkey: Always register for events

The starter-specific code path isn't necessary anymore since
d8fdd1018e16 ("starter: Don't flush SAs in the kernel").

2 years agokernel-pfroute: Always listen for events
Tobias Brunner [Thu, 26 Jan 2023 15:19:22 +0000 (16:19 +0100)] 
kernel-pfroute: Always listen for events

The starter-specific code path isn't necessary anymore since
d8fdd1018e16 ("starter: Don't flush SAs in the kernel").

2 years agokernel-netlink: Always register for events
Tobias Brunner [Thu, 26 Jan 2023 15:17:15 +0000 (16:17 +0100)] 
kernel-netlink: Always register for events

The starter-specific code path isn't necessary anymore since
d8fdd1018e16 ("starter: Don't flush SAs in the kernel").

2 years agostarter: Remove starter-specific plugin lists
Tobias Brunner [Thu, 26 Jan 2023 15:09:32 +0000 (16:09 +0100)] 
starter: Remove starter-specific plugin lists

It hasn't loaded any plugins since d8fdd1018e16 ("starter: Don't flush
SAs in the kernel"), which was released with 5.3.3.

2 years agokernel-netlink: Fallback to configured interface when HW offloading policies
Tobias Brunner [Thu, 26 Jan 2023 12:25:11 +0000 (13:25 +0100)] 
kernel-netlink: Fallback to configured interface when HW offloading policies

This allows offloading bypass and drop policies to a specific interface
by configuring `interface` and `hw_offload=packet` (`auto` works too).

2 years agoshunt-manager: Pass HW offload mode when installing policies
Tobias Brunner [Wed, 25 Jan 2023 13:40:39 +0000 (14:40 +0100)] 
shunt-manager: Pass HW offload mode when installing policies

2 years agovici: Update offloading configuration for full packet HW offloading
Tobias Brunner [Thu, 15 Dec 2022 15:41:59 +0000 (16:41 +0100)] 
vici: Update offloading configuration for full packet HW offloading

2 years agokernel-netlink: Add support for full packet and policy HW offloading
Tobias Brunner [Thu, 15 Dec 2022 15:41:43 +0000 (16:41 +0100)] 
kernel-netlink: Add support for full packet and policy HW offloading

2 years agochild-sa: Pass HW offload mode for policies
Tobias Brunner [Mon, 19 Dec 2022 11:50:54 +0000 (12:50 +0100)] 
child-sa: Pass HW offload mode for policies

2 years agokernel-ipsec: Add HW offload mode to policies
Tobias Brunner [Mon, 19 Dec 2022 10:44:48 +0000 (11:44 +0100)] 
kernel-ipsec: Add HW offload mode to policies

2 years agoMerge branch 'android-updates' android-2.4.0
Tobias Brunner [Wed, 15 Feb 2023 13:50:12 +0000 (14:50 +0100)] 
Merge branch 'android-updates'

Switched from BoringSSL to OpenSSL. A script is provided to build the
library as needed.

2 years agoandroid: New release after switching to OpenSSL
Tobias Brunner [Mon, 13 Feb 2023 10:31:09 +0000 (11:31 +0100)] 
android: New release after switching to OpenSSL

2 years agoandroid: Use correct language code for Ukrainian
Tobias Brunner [Mon, 13 Feb 2023 13:25:17 +0000 (14:25 +0100)] 
android: Use correct language code for Ukrainian

While UA is the country code, the language code is apparently uk.

2 years agoandroid: Clean up plugin list after switching to OpenSSL
Tobias Brunner [Fri, 10 Feb 2023 09:36:50 +0000 (10:36 +0100)] 
android: Clean up plugin list after switching to OpenSSL

Keep the kdf plugin because of AES-XCBC (and CAMELLIA-XCBC, which is now
supported due to OpenSSL).  Other plugins like fips-prf, pubkey or pkcs8
were never actually used by the app.  The random plugin might have been
necessary with early versions.

2 years agoandroid: Use custom-built OpenSSL for GH action
Tobias Brunner [Thu, 9 Feb 2023 16:06:47 +0000 (17:06 +0100)] 
android: Use custom-built OpenSSL for GH action

2 years agoandroid: Increase minSdkVersion to 21 (Android 5.0)
Tobias Brunner [Thu, 9 Feb 2023 14:40:58 +0000 (15:40 +0100)] 
android: Increase minSdkVersion to 21 (Android 5.0)

Newer NDKs haven't supported the version(s) we used for a while. Also,
versions < 21 will be removed with the next version of the NDK.

2 years agoandroid: Add a script to build OpenSSL's libcrypto as needed by the app
Tobias Brunner [Thu, 9 Feb 2023 15:39:08 +0000 (16:39 +0100)] 
android: Add a script to build OpenSSL's libcrypto as needed by the app

The build script requires the paths to the NDK and OpenSSL sources.

It runs the build in a Docker container, by default. But if the required
tools are installed on the system (currently jq, make and perl) it can
also be run directly on the system by defining NO_DOCKER.

A relatively recent version of the NDK is required (the pre-built
toolchains are required).

2 years agoandroid: Add the application ID to the log
Tobias Brunner [Fri, 10 Feb 2023 10:24:02 +0000 (11:24 +0100)] 
android: Add the application ID to the log

2 years agoandroid: Update screenshots and add more with advanced settings
Tobias Brunner [Tue, 13 Dec 2022 14:28:12 +0000 (15:28 +0100)] 
android: Update screenshots and add more with advanced settings

2 years agoandroid: Update Gradle plugin
Tobias Brunner [Mon, 3 Oct 2022 08:48:18 +0000 (10:48 +0200)] 
android: Update Gradle plugin

2 years agogithub: Use OpenSSL 3.0.8 for tests
Tobias Brunner [Tue, 7 Feb 2023 17:06:16 +0000 (18:06 +0100)] 
github: Use OpenSSL 3.0.8 for tests

2 years agogithub: Use tpm2-tss 3.2.2 for tests
Tobias Brunner [Tue, 31 Jan 2023 16:22:44 +0000 (17:22 +0100)] 
github: Use tpm2-tss 3.2.2 for tests

2 years agoRevert "libipsec: Added Windows tun device support"
Andreas Steffen [Tue, 31 Jan 2023 14:19:58 +0000 (15:19 +0100)] 
Revert "libipsec: Added Windows tun device support"

This reverts commit 77b91e6d0eaffb3c69b47221c3de3bb8ff80e01a.

2 years agolibipsec: Added Windows tun device support libipsec-wintun
Andreas Steffen [Tue, 31 Jan 2023 13:59:57 +0000 (14:59 +0100)] 
libipsec: Added Windows tun device support

2 years agochild-sa: Fix typo in comment
xujielong [Mon, 30 Jan 2023 08:34:19 +0000 (16:34 +0800)] 
child-sa: Fix typo in comment

Closes strongswan/strongswan#1527

2 years agocurl: Add an option to select the SSL/TLS backend (if available)
Tobias Brunner [Fri, 13 Jan 2023 16:17:06 +0000 (17:17 +0100)] 
curl: Add an option to select the SSL/TLS backend (if available)

If libcurl is built with MultiSSL support (not the case for e.g.
Debian/Ubuntu, which ship separate, conflicting libraries), this allows
selecting the SSL/TLS backend libcurl uses.

2 years agocurl: Don't ignore unknown SSL/TLS backends
Tobias Brunner [Fri, 13 Jan 2023 16:11:50 +0000 (17:11 +0100)] 
curl: Don't ignore unknown SSL/TLS backends

Only older versions of OpenSSL and GnuTLS need special treatment, so we
now accept all other backends (e.g. "(SecureTransport) OpenSSL/1.1.1s"
on macOS).

Whenever we remove support for the affected versions of the mentioned
libraries, we can remove the corresponding *-threading plugin feature
and the code here.

2 years agoMerge branch 'man-sysconfdir'
Tobias Brunner [Mon, 16 Jan 2023 10:41:17 +0000 (11:41 +0100)] 
Merge branch 'man-sysconfdir'

Closes strongswan/strongswan#1511

2 years agoswanctl: Don't use hard-coded path to sysconfdir
Tobias Brunner [Mon, 16 Jan 2023 10:39:29 +0000 (11:39 +0100)] 
swanctl: Don't use hard-coded path to sysconfdir

2 years agoconf: Add swanctl.conf and swanctl man pages to SEE ALSO
Tobias Brunner [Mon, 16 Jan 2023 10:37:27 +0000 (11:37 +0100)] 
conf: Add swanctl.conf and swanctl man pages to SEE ALSO

2 years agoconf: Replace hard-coded /etc where appropriate
Tobias Brunner [Mon, 16 Jan 2023 10:35:42 +0000 (11:35 +0100)] 
conf: Replace hard-coded /etc where appropriate

Also document the actual value of ${sysconfdir}.

2 years agoman: Use configured path for config files in man pages
Petr Menšík [Sun, 15 Jan 2023 15:55:45 +0000 (16:55 +0100)] 
man: Use configured path for config files in man pages

2 years agoipsec: Include IPSEC_CONFDIR variable replacement in man page
Petr Menšík [Sun, 15 Jan 2023 15:17:07 +0000 (16:17 +0100)] 
ipsec: Include IPSEC_CONFDIR variable replacement in man page

Fedora has chosena different default directory to avoid conflicts with
libreswan. Use ${sysconfdir} variable to provide the correct location.

2 years agopki: Use X.509v3 EKU extension in CSR
Andreas Steffen [Wed, 11 Jan 2023 16:44:15 +0000 (17:44 +0100)] 
pki: Use X.509v3 EKU extension in CSR

2 years agokernel-netlink: Define SOL_NETLINK for old versions of socket.h
Tobias Brunner [Mon, 9 Jan 2023 15:57:53 +0000 (16:57 +0100)] 
kernel-netlink: Define SOL_NETLINK for old versions of socket.h

While the kernel defines it since 2005 (2.6.14), some older versions of
socket.h shipped with C libraries might not.  In particular, glibc only
added it with 2.24 in 2016.

Closes strongswan/strongswan#1503

2 years agogithub: Workaround for Python conflict in macOS image
Tobias Brunner [Fri, 6 Jan 2023 13:17:29 +0000 (14:17 +0100)] 
github: Workaround for Python conflict in macOS image

The Python versions installed in the system image in
`/Library/Frameworks/Python.framework/` have symlinks in `/usr/local/bin/`
that conflict with symlinks that `brew` tries to create, which causes
errors like these:

    ==> Pouring python@3.11--3.11.1.monterey.bottle.tar.gz
    Error: The `brew link` step did not complete successfully
    The formula built, but is not symlinked into /usr/local
    Could not symlink bin/2to3-3.11
    Target /usr/local/bin/2to3-3.11
    already exists. You may want to remove it:
      rm '/usr/local/bin/2to3-3.11'

    To force the link and overwrite all conflicting files:
      brew link --overwrite python@3.11

    To list all files that would be deleted:
      brew link --overwrite --dry-run python@3.11

    Possible conflicting files are:
    /usr/local/bin/2to3-3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/2to3-3.11
    /usr/local/bin/idle3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/idle3.11
    /usr/local/bin/pydoc3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/pydoc3.11
    /usr/local/bin/python3.11 -> /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11
    /usr/local/bin/python3.11-config -> /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11-config

2 years agodh-speed: Add wolfssl and BP ECDH to test script
Tobias Brunner [Fri, 6 Jan 2023 11:01:56 +0000 (12:01 +0100)] 
dh-speed: Add wolfssl and BP ECDH to test script

2 years agodh-speed: Dynamically look up KE method
Tobias Brunner [Fri, 6 Jan 2023 11:00:55 +0000 (12:00 +0100)] 
dh-speed: Dynamically look up KE method

2 years agodh-speed: Don't reuse DH object
Tobias Brunner [Fri, 6 Jan 2023 10:28:37 +0000 (11:28 +0100)] 
dh-speed: Don't reuse DH object

Since the changes to the DH implementations that were merged with
30faf04e92dc ("Merge branch 'multi-ke-backport'"), most implementations
don't support deriving different shared secrets for the same private key
by calling set_public_key() with another public key anymore (some prevent
it explicitly, but reusing DH private keys is not something we want to
support anyway).  So we can't reuse the DH object on one side for every
round.

2 years agoVersion bump to 5.9.9 5.9.9
Andreas Steffen [Sun, 1 Jan 2023 10:55:50 +0000 (11:55 +0100)] 
Version bump to 5.9.9

2 years agoVersion bump to 5.9.9rc2 5.9.9rc2
Andreas Steffen [Fri, 23 Dec 2022 10:19:06 +0000 (11:19 +0100)] 
Version bump to 5.9.9rc2

2 years agotesting: Abort kernel build if patch can't be applied
Tobias Brunner [Fri, 23 Dec 2022 09:31:14 +0000 (10:31 +0100)] 
testing: Abort kernel build if patch can't be applied

2 years agoNEWS: Add news for 5.9.9
Tobias Brunner [Thu, 22 Dec 2022 18:58:49 +0000 (19:58 +0100)] 
NEWS: Add news for 5.9.9

2 years agokernel-netlink: Explicitly ignore the result of setsockopt()
Tobias Brunner [Thu, 22 Dec 2022 11:55:05 +0000 (12:55 +0100)] 
kernel-netlink: Explicitly ignore the result of setsockopt()

2 years agoFixed some typos, courtesy of codespell
Tobias Brunner [Thu, 22 Dec 2022 10:08:20 +0000 (11:08 +0100)] 
Fixed some typos, courtesy of codespell

2 years agoVersion bump to 5.9.9rc1 5.9.9rc1
Andreas Steffen [Thu, 22 Dec 2022 12:24:34 +0000 (13:24 +0100)] 
Version bump to 5.9.9rc1

2 years agoMake format string a string literal in some debug statements
Thomas Egerer [Thu, 20 Oct 2022 16:10:29 +0000 (16:10 +0000)] 
Make format string a string literal in some debug statements

Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2 years agoUse wolfSSL 5.5.4 for tests
Tobias Brunner [Wed, 21 Dec 2022 15:41:36 +0000 (16:41 +0100)] 
Use wolfSSL 5.5.4 for tests

2 years agokernel-netlink: Log extended ACK error/warning messages
Tobias Brunner [Tue, 20 Dec 2022 16:36:51 +0000 (17:36 +0100)] 
kernel-netlink: Log extended ACK error/warning messages

With newer kernels (basic support for extended ACKs is there since 4.12
but some messages for XFRM were only added with 6.1) this gives more
detailed error messages to the user than e.g. a generic EINVAL or ENOSYS
error would.

Also enabled omitting the request payload in NLMSG_ERROR messages.

2 years agoresolve: Don't install individual servers via resolvconf
Tobias Brunner [Tue, 13 Dec 2022 09:50:06 +0000 (10:50 +0100)] 
resolve: Don't install individual servers via resolvconf

The resolvconf implementation provided by systemd via resolvectl strips
everything after the interface name, so each additional server that's
installed replaces the previous one.  And even for other resolvconf
implementations installing them individually doesn't seem necessary as
we track and refcount them anyway.

Closes strongswan/strongswan#1353

2 years agoresolve: Avoid dots in protocol part of interface names when using resolvconf
Tobias Brunner [Wed, 19 Oct 2022 13:55:04 +0000 (15:55 +0200)] 
resolve: Avoid dots in protocol part of interface names when using resolvconf

Newer releases of systemd contain a change that removes not the part
after the first dot but the part after the last when determining the
interface name (apparently some interface names actually contain a dot).

This changes the default prefix to only contain one dot and avoids the
dots added by IPv4 addresses to create a unique interface/protocol for
each DNS server (it also replaces the `:` in IPv6 addresses with
something that might cause less conflicts).

References strongswan/strongswan#1353

2 years agoresolve: Make path to resolvconf(8) configurable
Tobias Brunner [Mon, 15 Nov 2021 14:19:07 +0000 (15:19 +0100)] 
resolve: Make path to resolvconf(8) configurable

Prefer the configured command over finding it at the default location
over installing in the configured file.

References strongswan/strongswan#744