19540 Commits

Author SHA1 Message Date
Tobias Brunner
4c85b9d21b credential-factory: Avoid deadlock during unit tests
If a unit test times out while generating a private key (e.g. because of
a lack of entropy), this avoids a deadlock by still releasing the read
lock that'd prevent acquiring the write lock when plugins are unloaded.

Closes strongswan/strongswan#2850
2025-08-21 16:13:24 +02:00
Tobias Brunner
135ed6aada openssl: Simplify wrapping private key objects 2025-08-21 16:11:13 +02:00
Tobias Brunner
0391450376 openssl: Support EdDSA keys in PKCS#12 containers
References strongswan/strongswan#2848
2025-08-21 16:10:58 +02:00
Tobias Brunner
f02033664e vici: Add support for P-CSCF server attributes
Was apparently forgotten when support was added to the attr plugin
with 98a3ba8a5a16 ("attr: Add p-cscf keyword for P-CSCF server addresses").

For consistency, using an underscore like the `split*` options and not a
dash like in the attr plugin.

References strongswan/strongswan#2396
2025-08-21 16:04:39 +02:00
Tobias Brunner
ea05033319 eap-authenticator: Assume IKE identity as EAP-Identity if client doesn't send one
Apparently, some clients (e.g. native Android) just send an empty
EAP-Identity response.  We silently ignored that previously and then
used the IKE identity for the actual EAP method.  This change tries to
do something similar (i.e. don't fail if the response is empty), but by
assuming the IKE identity as EAP-Identity, we match that and possibly
can switch configs.

Closes strongswan/strongswan#2833
Fixes: 2f2e4abe3c52 ("ikev2: Add support to switch peer configs based on EAP-Identities")
2025-08-21 16:02:36 +02:00
Tobias Brunner
2560146204 github: Use provided actions for SonarQube installation and scan
Also switch to the cloud cache (which doesn't seem to work either way
anyway).
2025-08-05 10:27:32 +02:00
Tobias Brunner
ff06159099 certexpire: Double size of internal buffer for identities
The error-notify, lookip, and whitelist (previous commit) plugins already
use the same buffer size for identities.
2025-07-23 18:50:53 +02:00
seantywork
ae2e0b6cf2 whitelist: Double the length of the id field in the messages
Closes strongswan/strongswan#2842
2025-07-23 18:50:33 +02:00
Tobias Brunner
6c813ddc13 Use wolfSSL 5.8.2 for tests 2025-07-19 12:11:29 +02:00
Tobias Brunner
011c346b00 wolfssl: Store RNG on object for curve25519
5.8.2 enables blinding for curve25519 by default, so the RNG set when
making the key is also used later on.
2025-07-19 12:10:25 +02:00
Rob Shearman
1b62e88980 ml: Disable versioning for shared object
Avoid generating versioned shared objects which would need to be
installed along with the version-independent symlink by specifying
"-avoid-version" in the libtool LDFLAGS for the plugin. Avoid any
unwanted surprises by also specifying the "-module" option, making the
LDFLAGS consistent with all other libstrongswan plugins.

Closes strongswan/strongswan#2844
2025-07-18 16:30:50 +02:00
Tobias Brunner
58c567da74 Merge branch 'whitelist-watcher'
Use watcher and non-blocking I/O for client connections to avoid issues
with clients that stay connected for a long time.

Closes strongswan/strongswan#2827
2025-07-18 16:16:17 +02:00
Tobias Brunner
85ebf6abd4 whitelist: Add error handling to socket reads and fix a memory leak
This now adds some state (basically a message buffer), but simplifies
error handling as we don't have to handle two potential failure paths
and could avoid some potential issues by still calling the blocking
read_all().

It also fixes a memory leak when clients disconnect.
2025-07-18 12:07:45 +02:00
Rob Shearman
412231eecd whitelist: Use a watcher for control socket reading rather than blocking
Performing a stream read_all call (which is a blocking read) from
within the accept callback has the issue that if a whitelist client is
still connected whilst a shutdown of the charon deamon is triggered
then that shutdown won't complete gracefully due to the accept task
never exiting.

So fix shutting down gracefully by using the socket watcher rather than
a blocking read upon connection accept. Fall back to a blocking read
for partial messages to avoid the complexity associated (i.e. storing
state) for incomplete reads, which shouldn't block and cause the
original problem if the client only sends whole messages.
2025-07-15 14:50:56 +02:00
Tobias Brunner
e98ea89d99 nm: Version bump to 1.6.3 2025-07-14 11:01:14 +02:00
Andreas Steffen
23eb1e0945 Version bump to 6.0.2 6.0.2 2025-07-13 09:56:49 +02:00
Tobias Brunner
4c54550352 testing: Use alternative approach for retransmits in ikev1/dpd-restart scenario
With a long delay, the retransmit might not get sent before further tests
are evaluated on faster machines, while more retransmits should still allow
the scenario to succeed on slower ones.
2025-07-11 14:15:40 +02:00
Tobias Brunner
bab415ec0a child-cfg: Actually force narrowing TS in transport mode only as initiator
Closes strongswan/strongswan#2830

Fixes: ad1ad2159f0b ("child-cfg: Use traffic selector list")
2025-07-11 14:15:06 +02:00
Tobias Brunner
43b805b2da openssl: Don't allocate salt if PRF/hash is unknown
This can happen if e.g. AES-XCBC is selected.

Fixes: 2dbeecfc029b ("openssl: Fix testing KDF_PRF in the constructor with OpenSSL 3.5.1")
2025-07-11 11:47:51 +02:00
Tobias Brunner
2c32412594 github: Shorten name for crypto-plugin job and reverse matrix arguments
This gives us more readable names in the UI.  Instead of

  crypto-plugins (ubuntu-latest, b...
  crypto-plugins (ubuntu-latest, b...
  crypto-plugins (ubuntu-latest, ...
  crypto-plugins (ubuntu-latest, ...
  crypto-plugins (ubuntu-latest, o...
  crypto-plugins (ubuntu-latest, o...

we now get

  crypto (botan, ubuntu-latest, no)
  crypto (botan, ubuntu-latest, yes)
  crypto (wolfssl, ubuntu-latest, no)
  crypto (wolfssl, ubuntu-latest, yes)
  crypto (openssl, ubuntu-latest, no)
  crypto (openssl, ubuntu-latest, yes)
2025-07-10 19:23:02 +02:00
Tobias Brunner
2dbeecfc02 openssl: Fix testing KDF_PRF in the constructor with OpenSSL 3.5.1
Setting the salt to NULL now fails, so we set it to hash length's zeroes,
which is the default value for HKDF-Extract if no salt is passed.

Fixes strongswan/strongswan#2828
2025-07-10 19:22:22 +02:00
Tobias Brunner
a8c2d125f1 Doxyfile: Don't hide set_seed() method 2025-07-08 13:13:06 +02:00
Tobias Brunner
f88d824114 Fixed some typos, courtesy of codespell 2025-07-08 10:54:49 +02:00
Andreas Steffen
bd65a21ce0 Version bump to 6.0.2rc1 6.0.2rc1 2025-07-07 18:25:37 +02:00
Tobias Brunner
85c6473a5e NEWS: Add news for 6.0.2 2025-07-07 18:04:34 +02:00
Tobias Brunner
36f7c98f4e github: Use AWS-LC 1.55.0 for tests 2025-07-07 18:04:19 +02:00
Tobias Brunner
b46960d80c github: Use OpenSSL 3.5.1 for tests 2025-07-07 18:04:19 +02:00
Thomas Egerer
a339468c93 vici: Allow backlog size configuration via compile option
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
2025-07-07 14:20:13 +02:00
Tobias Brunner
9eb5fcd6b6 github: Make sure at least one run with the same content is not skipped 2025-07-07 11:55:01 +02:00
Andreas Steffen
1f42640c43 Version bump to 6.0.2dr3 6.0.2dr3 2025-07-03 11:43:53 +02:00
orbea
979c57fc30 nm: Don't set DL_LIBS to 'none required' in configure script
This copies the AC_SEARCH_LIBS check from the main strongSwan
configure.ac.

When building networkmanager-strongswan with slibtool if fails.

  ld: cannot find none: No such file or directory
  ld: cannot find required: No such file or directory

This is because configure.ac uses AC_SEARCH_LIBS to find dlopen which
sets the value of $ac_cv_search_dlopen to 'none required' which then
gets set in DL_LIBS and passed to slibtool.

With GNU libtool it silently ignores the unknown arguments.

Gentoo issue: https://bugs.gentoo.org/914100

Closes strongswan/strongswan#2141

Signed-off-by: orbea <orbea@riseup.net>
2025-07-01 07:45:12 +02:00
Tobias Brunner
a666944e65 Merge branch 'android-http-proxy'
Adds support for HTTP proxy server.

Closes strongswan/strongswan#2789
android-2.5.6
2025-06-27 09:13:38 +02:00
Tobias Brunner
bd4cee82ac android: New release after adding HTTP proxy configuration 2025-06-27 08:57:45 +02:00
Tobias Brunner
dbcba117ae android: Apply proxy server setting when creating TUN device
This is only available with Android 10+ (SDK 29+).
2025-06-27 08:57:45 +02:00
Tobias Brunner
b944159fcf android: Avoid proxy settings in the internal fetcher 2025-06-27 08:57:45 +02:00
Tobias Brunner
c7307ccc52 android: Allow setting proxy settings in managed profiles 2025-06-27 08:57:45 +02:00
Tobias Brunner
0f2cd032e1 android: Import proxy server settings 2025-06-27 08:57:45 +02:00
Tobias Brunner
c80819c0ad android: Make proxy server configurable 2025-06-27 08:57:45 +02:00
Tobias Brunner
a7cb2fcbf6 android: Add properties to VPN profiles for proxy server configuration 2025-06-27 08:57:45 +02:00
Tobias Brunner
059c70e556 android: Don't mention IKEv1 and L2TP in app description
Also removed on Play so the app does not show up when people search
for these keywords (they tend to not read the actual description and
then are surprised that neither protocol is supported).
2025-06-27 08:57:45 +02:00
Tobias Brunner
4143e47462 android: Update dependencies 2025-06-27 08:57:38 +02:00
Tobias Brunner
a153626af7 identification: Clarify that ID_USER_FQDN is just an alias for ID_RFC822_ADDR
This means userfqdn: is a valid prefix for regular expressions.
2025-06-20 10:37:40 +02:00
Tobias Brunner
e58ef258b5 swanctl: Document that IP-TFS mode is subject to mode negotiation 2025-06-20 10:37:35 +02:00
Tobias Brunner
9a6aa2530e testing: Make sure ML-KEM scenarios use our ml plugin
We now support OpenSSL's implementation in the openssl plugin.  This
makes sure our plugin is used on at least one of the hosts if we ever
switch to an OpenSSL version that supports ML-KEM.

In the ikev2/rw-mlkem scenario the logic is reversed.  There the ml plugin
is preferred on moon to test the responder side (and carol for the
initiator) and dave will switch to OpenSSL if it ever provides ML-KEM.
2025-06-20 10:37:24 +02:00
Andreas Steffen
faf7ad2331 Version bump to 6.0.2dr2 6.0.2dr2 2025-06-05 13:43:21 +02:00
Andreas Steffen
f9985d72e4 testing: soup plugin removed from test environment 2025-06-05 13:42:41 +02:00
Andreas Steffen
2fa8f4a90f Version bump to 6.0.2dr1 6.0.2dr1 2025-06-04 19:58:23 +02:00
Tobias Brunner
b39311e19e Merge branch 'libsoup3'
Ports the soup plugin to libsoup 3.

Closes strongswan/strongswan#2788
2025-06-04 19:09:33 +02:00
Tobias Brunner
b8108a4c3c github: Use libsoup 3 for tests
Requires installing libxml2-dev explicitly for the alpine build as
libsoup-dev had a dependency on it.
2025-06-04 19:08:57 +02:00
Tobias Brunner
9dbb15dea9 leak-detective: Remove whitelisted libsoup2.x functions
As mentioned in 0f141fb095a41a9fdfe5c111269eb643dc643494, we can't
really whitelist the "leaks" in GLib, so don't even try to do anything
with libsoup3.x.
2025-06-04 19:08:57 +02:00