Commit Graph
19290 Commits
Author SHA1 Message Date
Tobias Brunner ff50db8758 cirrus: Use FreeBSD 13.4 and 14.2 2025-02-20 16:30:11 +01:00
Tobias Brunner 1f0dd8d585 github: Use OpenSSL 3.4.1 for tests
There was an issue with OPENSSL_armcap_P in Android's static build for
OpenSSL 3.1.1+. This was finally fixed with this release (and was also
backported to older versions).
2025-02-20 16:30:11 +01:00
Tobias Brunner 827c572efd github: Use AWS-LC 1.46.1 for tests 2025-02-20 11:59:55 +01:00
Tobias Brunner e4d6bcef48 android: Move annotation to method where startActivityAndCollapse() is called
Fixes: 5237bf3a5c ("android: Suppress deprecation warning because of startActivityAndCollapse()")
2025-02-20 11:59:55 +01:00
Tobias Brunner b93141985b Merge branch 'android-passwords'
Adds support to import passwords via managed configuration and profile
files. Also fixes several deprecation warnings.

Closes strongswan/strongswan#2589
Closes strongswan/strongswan#2642
Closes strongswan/strongswan#2643
2025-02-20 11:08:29 +01:00
Tobias Brunner f0f986c55d android: New release after adding support for passwords in managed configs and profile files
Also fixes some bugs and deprecation warnings.
2025-02-18 14:19:40 +01:00
Tobias Brunner a47e282d09 android: Imported VPN profile files may contain passwords
A warning is displayed to the users, reminding them that there is a
cleartext password in the file.
2025-02-18 14:12:43 +01:00
Tobias Brunner 0b6d42661d android: Consistently use *Start/End in layouts and remove redundant old settings 2025-02-18 14:12:43 +01:00
Tobias Brunner b021406f6b android: Suppress deprecation warning because of stopForeground() 2025-02-18 14:12:43 +01:00
Tobias Brunner 5237bf3a5c android: Suppress deprecation warning because of startActivityAndCollapse() 2025-02-18 14:12:43 +01:00
Tobias Brunner 4e2c88f7ed android: Handle deprecated getParcelable* and getSerializable methods 2025-02-18 14:12:43 +01:00
Tobias Brunner 288bd41aca android: Suppress warning in implementation only used for Android < 33 2025-02-18 14:12:43 +01:00
Tobias Brunner 26eef1f095 android: Replace deprecated onBackPressed() and enable predictive back gestures
Doesn't really make a difference it seems.
2025-02-18 14:12:43 +01:00
Tobias Brunner 9a92088bb4 android: Replace deprecated fragment menu APIs 2025-02-18 14:12:43 +01:00
Tobias Brunner 10d8b66f05 android: Ignore empty strings for settings in managed profiles
Unspecified settings should be set to null, while some MDMs might send
them as empty strings, which could cause issues (like an empty password
or trying to parse an empty DNS server address).
2025-02-18 14:12:43 +01:00
Tobias Brunner 4f808cb2b0 android: Allow setting the password in managed profiles
To avoid complicated changes in the UI, users can still update it.  But
the default, if they clear the field, will be the managed password.
2025-02-18 14:12:43 +01:00
Tobias Brunner 87610799f2 android: Properly deinit library if parsing an IP fails
This can happen with empty strings, which might be set for managed
profiles, which caused the refcounting to be askew and the resolver not
to work after connecting once because it was flushed and disabled.
2025-02-18 14:12:43 +01:00
Tobias Brunner ff2010c8da android: Update NDK version and enable support for 16KiB page tables 2025-02-18 14:12:43 +01:00
Tobias Brunner e6b040265d android: Fix updating password for managed profiles
Without data source set on the profile, this caused the app to crash
with a null pointer dereference when it is updated.
2025-02-18 14:12:43 +01:00
Tobias Brunner 19925fd893 unit-tests: Document additional supported env variables 2025-02-10 15:41:52 +01:00
Tobias Brunner e0fc0adc93 Merge branch 'nm-gui-ts'
Adds fields for local and remote TS to the GUI.

Closes strongswan/strongswan#2580
2025-02-07 13:27:37 +01:00
Tobias Brunner 4e634f4511 nm: Add German translation for traffic selector fields 2025-02-07 12:01:00 +01:00
Jiří Matěják 418ef2a7a1 nm: Expose local-ts
Signed-off-by: Jiří Matěják <matejak@merica.cz>
2025-02-06 21:01:50 +01:00
Jiří Matěják d0dd7b561b nm: Expose remote-ts
Signed-off-by: Jiří Matěják <matejak@merica.cz>
2025-02-06 21:00:48 +01:00
Tobias Brunner 9aa2be8411 charon-nm: Add option to configure local traffic selectors
Closes strongswan/strongswan#2084
2025-02-06 17:20:25 +01:00
Tobias Brunner 941b7194a5 github: Use AWS-LC 1.45.0 for tests 2025-02-06 08:29:09 +01:00
Tobias Brunner 36c1cb4f8c Use Botan 3.7.1 for tests 2025-02-05 14:14:40 +01:00
Tobias Brunner c2e5c00df3 Merge branch 'dhcp-receive'
This fixes a regression introduced with pf_handler_t in 5.9.14.  It also
binds the packet sockets correctly to the configured interface, and adds
an option for the dhcp plugin that allows binding the send and receive
sockets to different interfaces.
2025-01-31 11:21:04 +01:00
Tobias Brunner a50ed3006e dhcp: Add option to bind the receive socket to a different interface
This can be useful if the DHCP server runs on the same server. On Linux,
the response is then sent via `lo`, so packets won't be received if both
sockets are bound to e.g. a bridge interface.
2025-01-31 11:20:42 +01:00
Tobias Brunner 00d8c36d6f pf-handler: Correctly bind packet socket to an interface
Binding such sockets via SO_BINDTODEVICE does not work at all. Instead,
bind() has to be used, as described in the packet(7) man page.
2025-01-31 11:20:32 +01:00
Tobias Brunner abbf9d28b0 pf-handler: Accept loopback interfaces as packet source
In some setups the responses from the DHCP server are sent via lo, which
does not have an address of type `ARPHRD_ETHER` (the address length is
the same, though, just all zeros, by default).  Note that the dhcp plugin
doesn't actually care for the MAC address or interface details, that's
only used by the farp plugin.

Fixes: 187c72d1af ("dhcp: Port the plugin to FreeBSD/macOS")
2025-01-31 11:19:42 +01:00
Nathan Tran 543a4c86f9 ikev2: Handle INVALID_SYNTAX after IKE_AUTH by deleting IKE_SA
When serving as a responder and receiving an INFORMATIONAL exchange
containing INVALID_SYNTAX after IKE_AUTH, the IKE_SA should be deleted.
Currently, it only gets deleted after receiving AUTHENTICATION_FAILED.
RFC7296 section 2.21.2 says:

 In an IKE_AUTH exchange, or in the INFORMATIONAL exchange immediately
 following it (in case an error happened when processing a response to
 IKE_AUTH), the UNSUPPORTED_CRITICAL_PAYLOAD, INVALID_SYNTAX, and
 AUTHENTICATION_FAILED notifications are the only ones to cause the
 IKE SA to be deleted or not created, without a Delete payload.

Closes strongswan/strongswan#2636
2025-01-29 17:31:40 +01:00
Tobias Brunner d38eaa6dd7 sonarcloud: Ignore that we don't define loop variables inside the loop
Also add the official description for the other ignored rules.
2025-01-21 15:16:33 +01:00
Nathan TranandTobias Brunner 1d5c5a1d72 openssl: Require min version 3.0.0 for HKDF to support larger MODP groups and nonces
Also enables the `kdf` plugin automatically if building against an older
version of OpenSSL.

Closes strongswan/strongswan#2602

Co-authored-by: Tobias Brunner <tobias@strongswan.org>
2025-01-15 18:11:18 +01:00
Tobias Brunner d860c26e95 plugin-loader: Properly support compilation without dlopen()/dlsym() etc.
This only works if plugins are built monolithically and linked statically.

Closes strongswan/strongswan#2615
2025-01-13 17:51:14 +01:00
Tobias Brunner 41538cf259 sw-collector: Fix build with DEBUG_LEVEL < 1 2025-01-13 15:33:33 +01:00
Tobias Brunner 0784ebdd2d pts: Fix build with DEBUG_LEVEL < 1 2025-01-13 15:04:13 +01:00
Tobias Brunner e248f0f3c2 libtnccs: Fix build with DEBUG_LEVEL < 1 2025-01-13 15:04:13 +01:00
Tobias Brunner 47d5adc96a eap-sim-file: Fix build with DEBUG_LEVEL < 1 2025-01-13 15:04:13 +01:00
Tobias Brunner 52771c1392 simaka-manager: Fix build with DEBUG_LEVEL < 1 2025-01-13 12:02:17 +01:00
Tobias Brunner a0353af6df gmp: Fix build with DEBUG_LEVEL < 1 2025-01-13 11:36:32 +01:00
Tobias Brunner 504e6033d9 optionsfrom: Fix build with DEBUG_LEVEL < 1 2025-01-10 18:53:57 +01:00
Tobias Brunner 4cf0a5b631 credential-factory: Fix build with DEBUG_LEVEL < 1
Newer versions of clang complain here.
2025-01-10 18:53:57 +01:00
Tobias Brunner 227d7ef9a2 tnc-imv: Add missing argument to IMV recommendations constructor
This avoids the following warning/error:

tnc_imv_manager.c:244:39: error: passing arguments to 'tnc_imv_recommendations_create' without a prototype is deprecated in all versions of C and is not supported in C23 [-Werror,-Wdeprecated-non-prototype]
  244 |         return tnc_imv_recommendations_create(this->imvs);
      |                                              ^
2025-01-10 18:53:57 +01:00
Tobias Brunner f1f0bd9de6 ctr: Remove parameter-less constructor prototype
Useless and causes a compiler warning/error:

  error: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a subsequent declaration [-Werror,-Wdeprecated-non-prototype]
2025-01-10 18:53:57 +01:00
Tobias Brunner 7af260a5f1 coverage: Exclude generated static proposal keywords
The lines in the gperf-generated proposal_keywords_static.c are now
mapped to the (much shorter) .txt source file, which causes mismatches
like these:

  genhtml: ERROR: no data for line:190, TLA:GNC, file:/home/runner/work/strongswan/strongswan/src/libstrongswan/crypto/proposal/proposal_keywords_static.txt

We could ignore "unmapped" errors in genhtml, but since the file is
generated anyway, we can also exclude it from the results and still
get such errors in case this happens for other files.  Another alternative
would be to remove the `#line` macros in the generated file.  Then the
coverage of the actual C file would get reported (but again, it's
generated, so there isn't much value in it).

Also updated the branch coverage option as the one with `lcov_` prefix
is deprecated.
2025-01-10 18:53:57 +01:00
Tobias Brunner 71f4c3dc4e coverage: Use atomic profiling updates to avoid issues with multi-threaded test cases 2025-01-10 18:53:39 +01:00
Tobias Brunner 24c20803a3 library: Exclude the check_memwipe() function from AddressSanitizer
Newer versions of AddressSanitizer (e.g. in Ubuntu 24.04) will report
this now as stack-use-after-return.
2025-01-10 16:53:37 +01:00
Tobias Brunner 6f912345c1 github: Don't install the NDK as root
On the Ubuntu 24.04 image, this causes the /home/runner/.config/.android
directory to be owned by root, which lets the build fail later.
2025-01-10 16:53:37 +01:00
Tobias Brunner 90dac35927 github: Enable SRP in OpenSSL build for clang AddressSanitizer build
On Ubuntu 24.04, llvm-symbolizer-18, which is used to resolve symbols
in backtraces, links libcurl.so.4 for some reason.  And that in turn
requires SRP.  If our custom build doesn't provide it, we get stuff
like this

  /usr/bin/llvm-symbolizer-18: symbol lookup error: /lib/x86_64-linux-gnu/libcurl.so.4: undefined symbol: SSL_CTX_set_srp_password, version OPENSSL_3.0.0

and the symbols are not resolved and can't be whitelisted.

This also makes sure ASan is actually disabled if our own leak-detective
is used.
2025-01-10 16:52:39 +01:00