18637 Commits

Author SHA1 Message Date
Tobias Brunner
f959157d31 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.
2023-02-13 15:30:58 +01:00
Tobias Brunner
7e5c4bbb32 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).
2023-02-13 15:30:58 +01:00
Tobias Brunner
2fc8b14918 android: Add the application ID to the log 2023-02-10 11:27:44 +01:00
Tobias Brunner
12c925a7e7 android: Update screenshots and add more with advanced settings 2023-02-09 18:04:07 +01:00
Tobias Brunner
7361078d3d android: Update Gradle plugin 2023-02-09 18:04:07 +01:00
Tobias Brunner
77bd5ab1a8 github: Use OpenSSL 3.0.8 for tests 2023-02-07 18:06:16 +01:00
Tobias Brunner
1a8106ee0d github: Use tpm2-tss 3.2.2 for tests 2023-01-31 17:22:44 +01:00
Andreas Steffen
bf3e4c85d0 Revert "libipsec: Added Windows tun device support"
This reverts commit 77b91e6d0eaffb3c69b47221c3de3bb8ff80e01a.
2023-01-31 15:19:58 +01:00
Andreas Steffen
77b91e6d0e libipsec: Added Windows tun device support 2023-01-31 14:59:57 +01:00
xujielong
ba5b5f03b6 child-sa: Fix typo in comment
Closes strongswan/strongswan#1527
2023-01-30 11:29:02 +01:00
Tobias Brunner
805cc3a69f 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.
2023-01-23 11:17:33 +01:00
Tobias Brunner
d11868fb38 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.
2023-01-23 11:17:33 +01:00
Tobias Brunner
e99de2aee9 Merge branch 'man-sysconfdir'
Closes strongswan/strongswan#1511
2023-01-16 11:41:17 +01:00
Tobias Brunner
29e3247097 swanctl: Don't use hard-coded path to sysconfdir 2023-01-16 11:39:29 +01:00
Tobias Brunner
1c0b14baa3 conf: Add swanctl.conf and swanctl man pages to SEE ALSO 2023-01-16 11:37:27 +01:00
Tobias Brunner
7e43a5f3d2 conf: Replace hard-coded /etc where appropriate
Also document the actual value of ${sysconfdir}.
2023-01-16 11:36:58 +01:00
Petr Menšík
ee046552bb man: Use configured path for config files in man pages 2023-01-16 11:21:15 +01:00
Petr Menšík
ab4ed21b5c 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.
2023-01-16 11:20:44 +01:00
Andreas Steffen
8effb06d6c pki: Use X.509v3 EKU extension in CSR 2023-01-11 19:19:09 +01:00
Tobias Brunner
41b0dff92b 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
2023-01-10 16:34:07 +01:00
Tobias Brunner
7dbe702269 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
2023-01-06 15:31:03 +01:00
Tobias Brunner
632834af91 dh-speed: Add wolfssl and BP ECDH to test script 2023-01-06 15:31:03 +01:00
Tobias Brunner
e396dbeca5 dh-speed: Dynamically look up KE method 2023-01-06 15:31:00 +01:00
Tobias Brunner
a59a6d4783 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.
2023-01-06 12:13:12 +01:00
Andreas Steffen
0c7bfec7af Version bump to 5.9.9 5.9.9 2023-01-01 11:55:50 +01:00
Andreas Steffen
7928deece1 Version bump to 5.9.9rc2 5.9.9rc2 2022-12-23 11:19:06 +01:00
Tobias Brunner
a6312f2ae9 testing: Abort kernel build if patch can't be applied 2022-12-23 10:31:14 +01:00
Tobias Brunner
613cd016ee NEWS: Add news for 5.9.9 2022-12-22 19:59:51 +01:00
Tobias Brunner
ac190ce6c9 kernel-netlink: Explicitly ignore the result of setsockopt() 2022-12-22 19:03:37 +01:00
Tobias Brunner
cf6f56f619 Fixed some typos, courtesy of codespell 2022-12-22 19:03:37 +01:00
Andreas Steffen
4aa5868d8e Version bump to 5.9.9rc1 5.9.9rc1 2022-12-22 13:24:34 +01:00
Thomas Egerer
5e9f5fb32e Make format string a string literal in some debug statements
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2022-12-21 17:33:37 +01:00
Tobias Brunner
cb6516cc0a Use wolfSSL 5.5.4 for tests 2022-12-21 16:41:36 +01:00
Tobias Brunner
7988aea7d8 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.
2022-12-21 16:21:49 +01:00
Tobias Brunner
17fd304e60 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
2022-12-19 16:14:25 +01:00
Tobias Brunner
bd6014a97b 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
2022-12-19 16:14:01 +01:00
Tobias Brunner
dee1916e4c 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
2022-12-19 16:12:46 +01:00
Tobias Brunner
2c7f6cd93f github: Adapt TKM build to changed plugin list 2022-12-14 16:35:03 +01:00
Tobias Brunner
b1ce877236 charon-tkm: Use built-in plugins instead of OpenSSL
Since the encryption has been moved into the TKM we don't rely on many
cryptographic operations.  Mainly SHA-1 that's used in IKEv2 (NAT-D) and
for some internal hashes (cookies, message duplicate detection), and
certificate and public key parsing (not the actual signature/chain
verification, which is done by the TKM).
2022-12-14 16:25:19 +01:00
Tobias Brunner
98be74914d sha1: Clarify license of the implementation 2022-12-14 13:38:38 +01:00
Tobias Brunner
2192bfb9ec github: Use tpm2-tss 3.2.1 for tests 2022-12-13 16:32:02 +01:00
Tobias Brunner
da0d0ecc45 vici: Add Python 3.10 and 3.11 2022-12-12 16:57:01 +01:00
Tobias Brunner
03541c73a0 github: Fix Python build with custom OpenSSL version 2022-12-12 16:57:01 +01:00
Tobias Brunner
3dd5dc5011 Merge branch 'vici-python-timeout'
Closes strongswan/strongswan#1416
2022-12-12 14:38:46 +01:00
Martin Willi
484c0f8dd0 vici: Gracefully consume/ignore incoming events in Python event deregistration
When issuing a deregistration message, some last events may still be sent
by the daemon before deregistration completes. Ignore such event messages
silently during deregistration, avoiding exceptions like:

  vici.exception.SessionException:
    Unexpected response type 7, expected '5' (EVENT_CONFIRM)
2022-12-12 14:38:09 +01:00
Martin Willi
254d4075fe vici: Add some initial session level unit-tests 2022-12-12 14:38:09 +01:00
Martin Willi
aa0da01fde vici: Add simple Python transport layer tests, including timeout 2022-12-12 14:38:09 +01:00
Martin Willi
248a188d21 vici: Allow the Python event listen() operation to optionally time out
The architecture of the Python client is completely blocking, which is fine
for many simple scripts. For more complex applications that do other I/O
and listen for vici events, the most feasible way to integrate the client is
to use a dedicated thread.

Unfortunately, Python has no simple support for thread cancellation. And
having that thread in a blocking recv() does not allow to terminate the
thread gracefully with an Event or the like.

As a way out, add a timeout to the listen() call, so the thread can
periodically do other things, like checking for termination Event and
react on it. Returning from listen() on timeout can be suboptimal, though,
as it involves registration/deregistration for events, including the risk
for missing events while not registered. So return a (None, None) tuple
instead on timeout, allowing the caller to periodically do other things
while staying registered for the events and continue in listen().

The timeout applies to the socket recv() for the start of the header, only,
so a message is either read in full or times out, avoiding the risk
of breaking message framing on the stream with partial reads.
2022-12-12 14:38:09 +01:00
Martin Willi
11b18f65b1 vici: Remove support for Python 2
Python 2 is dead and unmaintained for a while now. Time to stop carrying
on its support.
2022-12-12 14:38:09 +01:00
Tobias Brunner
a2b1e06f07 vici: Base default soft lifetime on hard lifetime if configured
Depending on the configured hard lifetime the default soft lifetime
might not make sense and could even cause rekeying to get disabled.
To avoid that, derive the soft lifetime from the hard lifetime so it's
10% higher than the soft lifetime.

References strongswan/strongswan#1414
2022-12-12 14:24:50 +01:00