Commit Graph
14214 Commits
Author SHA1 Message Date
Tobias Brunner 87caf36bb9 task: Add optional post_build() method
This will allow tasks to do some work after the message has been
generated.
2022-06-29 10:28:50 +02:00
Tobias Brunner 28b33d7cac ike-auth: Support exchange between IKE_SA_INIT and IKE_AUTH 2022-06-29 10:28:50 +02:00
Tobias Brunner 09a4aed3a2 child-create: Support exchange between IKE_SA_INIT and IKE_AUTH 2022-06-29 10:28:50 +02:00
Tobias Brunner 3a8ea08686 ike-mobike: Support exchange between IKE_SA_INIT and IKE_AUTH
This changes the MID of the first IKE_AUTH message.
2022-06-29 10:28:50 +02:00
Tobias Brunner 366fce8f03 ike-config: Support exchange between IKE_SA_INIT and IKE_AUTH
This changes the MID of the first IKE_AUTH message.
2022-06-29 10:28:50 +02:00
Tobias Brunner 09d4497536 ike-cert-post: Make absolutely sure certificates are only added to IKE_AUTH
The AUTH payload check in build_certs() should be fine, but add some
extra checks just to make really sure and also for clarification.
2022-06-29 10:28:50 +02:00
Tobias Brunner f2e79bf334 ike-cert-pre: Support exchange between IKE_SA_INIT and IKE_AUTH
The first IKE_AUTH does not have MID 1 if that's the case.
2022-06-29 10:28:50 +02:00
Tobias Brunner f00e80d759 status: Add return_need_more() utility function 2022-06-29 10:28:50 +02:00
Tobias Brunner ec350ebb78 child-cfg: Generalize get_ke_method() method 2022-06-29 10:28:50 +02:00
Tobias Brunner 093fc1ac63 ike-cfg: Generalize get_ke_method() method 2022-06-29 10:28:50 +02:00
Tobias Brunner 3bebf5bf8d proposal: Generalize KE methods 2022-06-29 10:28:50 +02:00
Andreas Steffen b7c167f972 Rename MODP_NONE to KE_NONE 2022-06-29 10:28:50 +02:00
Tobias Brunner 3af7c6db87 Rename diffie_hellman_t to key_exchange_t and change the interface etc.
This makes it more generic so we can use it for QSKE methods.
2022-06-29 10:28:50 +02:00
Tobias Brunner ec95fd9b93 bliss: Remove stray URLs from headers 2022-06-29 10:28:17 +02:00
Tobias Brunner df18934d20 Replace or remove wiki.strongswan.org URLs 2022-06-28 13:33:51 +02:00
Tobias Brunner 19ef2aec15 Update copyright headers after acquisition by secunet 2022-06-28 10:22:56 +02:00
Tobias Brunner c05fdf387b Remove obsolete _copyright utility 2022-06-28 10:22:55 +02:00
Tobias Brunner 8dbcff1e8b openssl: Use dynamically allocated array to determine EC curves
This avoids the use of a variable length array, which should probably
be avoided in general due to potential performance, portability and
security issues (not in this particular case, though).

Closes strongswan/strongswan#1095
2022-06-27 15:54:23 +02:00
Tobias Brunner 4a19a5e056 ita-comp-ima: Change validation URI parsing to avoid GCC 12 compiler warning
The compiler warned that a dangling pointer might be used because `name`,
which is returned from the function via `ima_name`, might point into the
locally determined `uri`.  Determining the URI outside and passing it to
the function fixes this.
2022-06-27 14:09:11 +02:00
Tobias Brunner 1c198bf22b fips-prf: Add explicit bound check to avoid GCC 12 compile warning
GCC assumes this->b is zero (or may be zero) and spits out the following
warning (or error with -Werror):

src/libstrongswan/plugins/fips_prf/fips_prf.c:124:12: error: array subscript 18446744073709551615 is above array bounds of ‘uint8_t[<U8090>]’ {aka ‘unsigned char[<U8090>]’} [-Werror=array-bounds]
  124 |         one[this->b - 1] = 0x01;
      |         ~~~^~~~~~~~~~~~~
2022-06-27 14:09:11 +02:00
Tobias Brunner 585666aa97 hashtable: Avoid compiler warning with GCC 12
Even though the assignment of `removed` to `out_row` is tied to the
`found_removed` flag, which is only set if `removed` is set, the
compiler complains that it may be used uninitialized.
2022-06-27 14:09:11 +02:00
Tobias Brunner 993ea32825 object: Fix CALLBACK macros with GCC 12
GCC 12 produces weird code when a callback is called directly (e.g.
parse_bool() via parse_option() in vici_config.c).  Instead of the actual
pointer, it explicitly passes 0 as first argument, which likely causes
a segmentation fault.  It doesn't happen when called indirectly via
function pointer that has void* as first argument, which this patch
kinda replicates for direct calls to avoid the issue.

Closes strongswan/strongswan#1053
2022-06-27 14:03:32 +02:00
Tobias Brunner 735515b3a7 credential-manager: Log subject of trusted cert before building trust chain
This should make it clearer to what the log messages generated by
verify_trust_chain() are related (in particular if building the chain
fails or the cert has expired).
2022-06-02 11:25:19 +02:00
Andreas Steffen 3f19a951cf TCG TNC attribute name changes
The TCG TNC IF-M Segmentation standard was implemented based on a
draft version. The attribute names are updated to comply with the
final TCG IF-M Segmentation Specification Version 1.0 Rev. 5
dated 4 April 2016
2022-05-26 17:37:43 +02:00
Tobias Brunner 14f082177e nm: Version bump to 1.6.0 2022-05-16 14:18:48 +02:00
Tobias Brunner 790e0b1cd4 nm: Add support for GTK4 2022-05-16 14:18:48 +02:00
Tobias Brunner 49e30dbed4 nm: Change layout of file chooser dialog
GTK4 does not support buttons at the bottom, so we put them in a header
bar, which is the preferred layout by current desktop environments. And
while it doesn't look ideal on older desktops, it also works with GTK3
and changing it avoids having to maintain multiple UI files.

Note that this layout is not supported by glade, so we generally can't
use it to edit the GUI anymore (it also doesn't support GTK4 in general).
2022-05-16 14:18:48 +02:00
Tobias Brunner b404440192 nm: Split NM plugin and editor widget into separate libs
This will allow the plugin to load the editor widget matching the current
GTK version dynamically.
2022-05-16 14:18:48 +02:00
Tobias Brunner 4f4778d792 nm: Replace GtkFileChooserButton
GTK4 does not provide that widget anymore, so we replace it with buttons,
labels and a GtkFileChooserDialog widgets.
2022-05-16 11:46:22 +02:00
Tobias Brunner 7740e8bb0f nm: Update Glade file 2022-05-16 11:46:22 +02:00
Tobias Brunner 94e0ef33db nm: Load GtkBuilder data from resource instead of file
This makes it easier to build a GTK4 version later.
2022-05-16 11:46:22 +02:00
Tobias Brunner 085daf4743 nm: Remove old libnm-glib compat stuff
This shouldn't be necessary anymore.
2022-05-16 11:46:22 +02:00
Tobias Brunner 64d73235c4 adopt-children-job: Avoid reordering CHILD_SAs
References strongswan/strongswan#1041
2022-05-10 09:08:17 +02:00
Xiao Liang 3b742c75ab quick-mode: Remove outbound SA/policy of rekeyed CHILD_SA
Remove outbound SA and policy of rekeyed CHILD_SA since only one is valid.
Otherwise, during update-SA job (when NAT mapping changed), CHILD_SA are
updated and installed one by one, leaving a window where old SAs are being
used. There are also circumstances where the new SA is not processed last.

Closes strongswan/strongswan#1041
2022-05-10 09:07:37 +02:00
Tobias Brunner 5cf82de69a proposal: Demote AES-XCBC/CMAC PRFs in default proposal
These are rarely used, so strictly propose HMAC-based PRFs first.

References strongswan/strongswan#1026
References strongswan/strongswan#1044
2022-05-10 09:04:42 +02:00
Tobias Brunner af9c78d393 plugin-loader: Print an error message if plugin constructor is not found 2022-05-06 12:02:45 +02:00
Tobias Brunner 4de8b81dea keymat_v2: Fix error message if KDF can't be created
Fixes: f619b833ac ("keymat_v2: Use plugin-provided KDF_PRF to derive SKEYSEED")
References strongswan/strongswan#1026
2022-05-06 11:45:10 +02:00
Tobias Brunner d23c0ea81e enum: Fix compiler warning
Closes strongswan/strongswan#1025
2022-05-02 09:31:49 +02:00
Tobias Brunner c9d471091f Use mallinfo2() if available
mallinfo() is deprecated because it uses `int` for the members of the
returned struct, whereas mallinfo2() uses `size_t`.  It's available
since glibc 2.33.
2022-04-25 14:16:20 +02:00
Tobias Brunner a6a0fa980f tls-crypto: Initialize cipher suites arrays to avoid warnings 2022-04-22 09:49:37 +02:00
Tobias Brunner 352fa96dfc gcrypt: Initialize variables when en-/decrypting with RSA to avoid warnings 2022-04-22 09:49:37 +02:00
Tobias Brunner 2283a19b80 kdf: Fix Doxygen comments 2022-04-22 09:49:37 +02:00
Tobias Brunner c508b904b8 openssl: Fix typo in comment 2022-04-21 11:06:30 +02:00
Tobias Brunner f4d6539b49 ikev2: Maintain labels during make-before-break reauthentication 2022-04-20 14:45:41 +02:00
Tobias Brunner 76ff49b761 unit-tests: Add environment variable to skip IPv6 stream tests
This is an issue e.g. when running tests in default Docker containers.
2022-04-14 19:05:45 +02:00
Tobias Brunner 7d99b29b99 unit-tests: Add support for more than one warning per test case
Warnings are usually short (as compared to failures that contain data
dumps), so the buffer size can be reduced.
2022-04-14 19:05:44 +02:00
Tobias Brunner a8bab0ee15 openssl: Move ENGINE-specific code into a separate file
This way we can compile it with OPENSSL_SUPPRESS_DEPRECATED for
OpenSSL 3.0, which deprecated the ENGINE API.
2022-04-14 19:05:44 +02:00
Tobias Brunner f26639de2c openssl: Remove checks and legacy compatibility code for OpenSSL < 1.0.2
More of this code was already removed with previous commits.

While versions < 1.1.1 are not officially supported anymore, 1.0.2 might
still be in use because before 3.x that was the latest version with
official FIPS support (OpenSSL apparently also provides extended commercial
support for it).
2022-04-14 19:05:44 +02:00
Tobias Brunner db0c53c207 openssl: Fixes for HMAC with OpenSSL 3.0 2022-04-14 19:05:44 +02:00
Tobias Brunner 293a912c7d openssl: Fixes for ECDSA with OpenSSL 3.0 2022-04-14 19:05:44 +02:00