]> git.ipfire.org Git - thirdparty/strongswan.git/log
thirdparty/strongswan.git
3 years agopem: Support PEM-encoded PKCS#7 container
Andreas Steffen [Wed, 6 Jul 2022 18:38:00 +0000 (20:38 +0200)] 
pem: Support PEM-encoded PKCS#7 container

3 years agoVersion bump to 5.9.7dr2 5.9.7dr2
Andreas Steffen [Wed, 29 Jun 2022 09:33:34 +0000 (11:33 +0200)] 
Version bump to 5.9.7dr2

3 years agoMerge branch 'multi-ke-backport'
Tobias Brunner [Wed, 29 Jun 2022 08:29:16 +0000 (10:29 +0200)] 
Merge branch 'multi-ke-backport'

This merge includes changes that were created for the upcoming IKEv2
extension for multiple key exchanges over the last four years, but which
are not directly related to the actual protocol changes.

Changes include renaming diffie_hellman_t to the more generic
key_exchange_t (also renamed are some of the interface's methods),
making utility functions that deal with DH groups more generic, and let
tasks handle the first IKE_AUTH message more reliably by not depending
on e.g. specific message IDs.

One significant change is delaying the IKEv2 key derivation until
the keys are actually needed to process or send the next message.  So
instead of deriving the keys directly while processing an IKE_SA_INIT
request (which could come from a spoofed address), this is delayed until
the corresponding IKE_AUTH request is received.  Implementations of the
key_exchange_t interface are now expected to do the key derivation and
any costly public key validation in get_shared_secret() and not
set_public_key().

Sent IKE_SA_INIT messages are now also not pre-generated anymore to collect
their encoding for the authentication.  Instead, a new post_build() hook
allows the ike-auth task to do so after the actual message has been built,
which allows later tasks and plugins (via message() hook) to modify the
message (e.g. add notifies) after the ike-auth task's build() method
already ran.

Also changed is how inbound requests are processed and retransmits are
detected.  Instead of parsing all inbound messages right away (which
might trigger a key derivation or require keys we don't have anymore in
the multi-KE use case), we now first check a request's message ID and
compare its hash to that of the previous request to decide if it's a
valid retransmit.  For fragmented messages, we only keep track of the
first fragment so we can send the corresponding response immediately if
a retransmit of it is received, instead of waiting for all fragments
and reconstructing the message, which we did before.

3 years agounit-tests: Allow configuring log levels for individual groups
Tobias Brunner [Tue, 27 Jul 2021 16:37:26 +0000 (18:37 +0200)] 
unit-tests: Allow configuring log levels for individual groups

3 years agodebug: Support configuring different log levels for groups in default logger
Tobias Brunner [Mon, 26 Jul 2021 16:16:00 +0000 (18:16 +0200)] 
debug: Support configuring different log levels for groups in default logger

3 years agowolfssl: Move shared secret calculation to get_shared_secret()
Tobias Brunner [Fri, 23 Jul 2021 15:29:41 +0000 (17:29 +0200)] 
wolfssl: Move shared secret calculation to get_shared_secret()

The ECDH implementation gets a bit simpler since we removed the
ecp_x_coordinate_only option a while ago.

Also added calls to verify public keys.

3 years agopkcs11: Move shared secret calculation to get_shared_secret()
Tobias Brunner [Fri, 23 Jul 2021 15:25:19 +0000 (17:25 +0200)] 
pkcs11: Move shared secret calculation to get_shared_secret()

3 years agogcrypt: Move shared secret calculation to get_shared_secret()
Tobias Brunner [Fri, 23 Jul 2021 14:29:44 +0000 (16:29 +0200)] 
gcrypt: Move shared secret calculation to get_shared_secret()

3 years agocurve25519: Move shared secret calculation to get_shared_secret()
Tobias Brunner [Fri, 23 Jul 2021 13:38:27 +0000 (15:38 +0200)] 
curve25519: Move shared secret calculation to get_shared_secret()

3 years agobotan: Move shared secret calculation to get_shared_secret()
Tobias Brunner [Fri, 23 Jul 2021 12:53:15 +0000 (14:53 +0200)] 
botan: Move shared secret calculation to get_shared_secret()

3 years agogmp: Move shared secret calculation to get_shared_secret()
Tobias Brunner [Mon, 19 Jul 2021 15:27:53 +0000 (17:27 +0200)] 
gmp: Move shared secret calculation to get_shared_secret()

This avoids doing costly operations when just setting the public key.
For the same reason the optional extended public key check is moved.

3 years agokey-exchange: Warn about costly operations in set_public_key()
Tobias Brunner [Mon, 19 Jul 2021 15:46:58 +0000 (17:46 +0200)] 
key-exchange: Warn about costly operations in set_public_key()

3 years agoike-auth: Move packet collection to post_build() method
Tobias Brunner [Mon, 19 Jul 2021 14:36:16 +0000 (16:36 +0200)] 
ike-auth: Move packet collection to post_build() method

This way we avoid having to pre-generate the message when it could
theoretically still get modified by a task that follows or from a plugin
via message() hook.

3 years agoikev2: Delay IKE key derivation until next message
Tobias Brunner [Fri, 16 Jul 2021 15:39:12 +0000 (17:39 +0200)] 
ikev2: Delay IKE key derivation until next message

In particular as responder, this delays costly cryptographic operations
until the IKE_AUTH request is received, which is preferable to reduce
the impact of DoS attacks.

Another advantage is that the key material is not changed until all tasks
built or processed a message.

3 years agoikev2: Use hashes to detect retransmits
Tobias Brunner [Mon, 23 Jul 2018 15:49:15 +0000 (17:49 +0200)] 
ikev2: Use hashes to detect retransmits

This way we avoid parsing messages with unexpected message IDs, which
might not even be possible if we don't have the keys anymore.  However,
the next commit should avoid the latter and this way we avoid deriving
keys for retransmits or unexpected messages.

This also changes how retransmits for fragmented messages are triggered.
Previously, we waited for all fragments and reconstructed the message
before retransmitting the response.  Now we only track the first
fragment and if we receive a retransmit of it respond immediately
without waiting for other fragments (which are now ignored).  This is in
compliance with RFC 7383, section 2.6.1, and can avoid issues if there
are lots of fragments.

3 years agochild-sa: Cache and forward actual initiator flag for outbound SA
Tobias Brunner [Tue, 18 Aug 2020 07:40:17 +0000 (09:40 +0200)] 
child-sa: Cache and forward actual initiator flag for outbound SA

Kernel interfaces (e.g. TKM) might rely on this flag to be correct.

3 years agoikev2: Send deletes also for rekeyed SAs
Tobias Brunner [Wed, 17 Jun 2020 14:04:10 +0000 (16:04 +0200)] 
ikev2: Send deletes also for rekeyed SAs

This way we can use the IKE_REKEYED state for both redundant and old SAs
to suppress ike_updown().

In the ike-delete task we don't suppress events in state IKE_REKEYING as
that's the case when we delete an SA the peer is currently rekeying with
multiple key exchanges.

3 years agoikev2: Let ike/child-rekey tasks indicate if the passive task was adopted
Tobias Brunner [Fri, 12 Jun 2020 09:24:18 +0000 (11:24 +0200)] 
ikev2: Let ike/child-rekey tasks indicate if the passive task was adopted

This gives us more flexibility with tasks that return NEED_MORE (currently
none of the colliding tasks do, but that will change with multi-KE
rekeyings).  The active task has to check itself if the passive task is
done and should be removed from the task manager.

3 years agoike-rekey: Remove collision task type checks
Tobias Brunner [Thu, 11 Jun 2020 13:06:24 +0000 (15:06 +0200)] 
ike-rekey: Remove collision task type checks

Since f67199378df9 ("ike-rekey: Handle undetected collisions also if
delete is delayed") we only ever track tasks of type TASK_IKE_REKEY, so
there is no need to check the type or use the generic task_t interface.

Also changed some of the comments to clarify collision handling.

3 years agoike-rekey: Don't actively rekey already rekeyed SAs
Tobias Brunner [Thu, 11 Jun 2020 12:33:22 +0000 (14:33 +0200)] 
ike-rekey: Don't actively rekey already rekeyed SAs

If the peer successfully rekeyed the SA it gets marked as IKE_REKEYED
and it remains until the peer deletes it (or a timeout).  There is no
point in rekeying such SAs again.

IKE_REKEYING will be relevant if we have multi-KE rekeyings and are
waiting for followup key exchanges for a passive rekeying.

3 years agoike-init: Ignore COOKIE payloads during rekeying
Tobias Brunner [Thu, 9 Apr 2020 16:42:22 +0000 (18:42 +0200)] 
ike-init: Ignore COOKIE payloads during rekeying

This ensures that process_i() only returns NEED_MORE due to multiple
key exchanges or an INVALID_KE_PAYLOAD notify.

3 years agoike-sa-manager: Log SPIs when checking in an IKE_SA
Tobias Brunner [Mon, 16 Jul 2018 13:48:30 +0000 (15:48 +0200)] 
ike-sa-manager: Log SPIs when checking in an IKE_SA

3 years agomessage: Fix payload type in last unprotected payload of a fragmented message
Tobias Brunner [Fri, 5 Jul 2019 09:01:42 +0000 (11:01 +0200)] 
message: Fix payload type in last unprotected payload of a fragmented message

3 years agoike-rekey: Reset IKE_SA after processing CREATE_CHILD_SA request
Tobias Brunner [Tue, 10 Jul 2018 12:36:28 +0000 (14:36 +0200)] 
ike-rekey: Reset IKE_SA after processing CREATE_CHILD_SA request

This probably didn't cause any problems, as there wasn't really anything
happening between the calls, but reset it anyway, just to be safe.

3 years agoikev2: Allow tasks to do work after processing requests/responses
Tobias Brunner [Thu, 22 Aug 2019 12:23:44 +0000 (14:23 +0200)] 
ikev2: Allow tasks to do work after processing requests/responses

3 years agotask: Add optional post_process() method
Tobias Brunner [Thu, 22 Aug 2019 12:22:48 +0000 (14:22 +0200)] 
task: Add optional post_process() method

This will allows tasks to do some work after a message has been
processed.

3 years agoikev2: Allow tasks to do work after generating requests/responses
Tobias Brunner [Thu, 28 Jun 2018 08:44:40 +0000 (10:44 +0200)] 
ikev2: Allow tasks to do work after generating requests/responses

3 years agotask: Add optional post_build() method
Tobias Brunner [Thu, 28 Jun 2018 08:44:03 +0000 (10:44 +0200)] 
task: Add optional post_build() method

This will allow tasks to do some work after the message has been
generated.

3 years agoike-auth: Support exchange between IKE_SA_INIT and IKE_AUTH
Tobias Brunner [Mon, 25 Jun 2018 12:27:16 +0000 (14:27 +0200)] 
ike-auth: Support exchange between IKE_SA_INIT and IKE_AUTH

3 years agochild-create: Support exchange between IKE_SA_INIT and IKE_AUTH
Tobias Brunner [Mon, 25 Jun 2018 12:14:59 +0000 (14:14 +0200)] 
child-create: Support exchange between IKE_SA_INIT and IKE_AUTH

3 years agoike-mobike: Support exchange between IKE_SA_INIT and IKE_AUTH
Tobias Brunner [Mon, 25 Jun 2018 12:03:56 +0000 (14:03 +0200)] 
ike-mobike: Support exchange between IKE_SA_INIT and IKE_AUTH

This changes the MID of the first IKE_AUTH message.

3 years agoike-config: Support exchange between IKE_SA_INIT and IKE_AUTH
Tobias Brunner [Mon, 25 Jun 2018 10:32:27 +0000 (12:32 +0200)] 
ike-config: Support exchange between IKE_SA_INIT and IKE_AUTH

This changes the MID of the first IKE_AUTH message.

3 years agoike-cert-post: Make absolutely sure certificates are only added to IKE_AUTH
Tobias Brunner [Mon, 25 Jun 2018 10:23:50 +0000 (12:23 +0200)] 
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.

3 years agoike-cert-pre: Support exchange between IKE_SA_INIT and IKE_AUTH
Tobias Brunner [Mon, 25 Jun 2018 10:07:50 +0000 (12:07 +0200)] 
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.

3 years agostatus: Add return_need_more() utility function
Tobias Brunner [Fri, 13 Jul 2018 12:52:05 +0000 (14:52 +0200)] 
status: Add return_need_more() utility function

3 years agochild-cfg: Generalize get_ke_method() method
Tobias Brunner [Fri, 20 Jul 2018 09:11:00 +0000 (11:11 +0200)] 
child-cfg: Generalize get_ke_method() method

3 years agoike-cfg: Generalize get_ke_method() method
Tobias Brunner [Thu, 19 Jul 2018 14:53:01 +0000 (16:53 +0200)] 
ike-cfg: Generalize get_ke_method() method

3 years agoproposal: Generalize KE methods
Tobias Brunner [Mon, 9 Jul 2018 14:27:04 +0000 (16:27 +0200)] 
proposal: Generalize KE methods

3 years agoRename MODP_NONE to KE_NONE
Andreas Steffen [Thu, 1 Jul 2021 17:42:55 +0000 (19:42 +0200)] 
Rename MODP_NONE to KE_NONE

3 years agoRename diffie_hellman_t to key_exchange_t and change the interface etc.
Tobias Brunner [Thu, 24 Oct 2019 07:49:14 +0000 (09:49 +0200)] 
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.

3 years agobliss: Remove stray URLs from headers
Tobias Brunner [Wed, 29 Jun 2022 08:27:54 +0000 (10:27 +0200)] 
bliss: Remove stray URLs from headers

3 years agoReplace or remove wiki.strongswan.org URLs
Tobias Brunner [Tue, 28 Jun 2022 11:33:51 +0000 (13:33 +0200)] 
Replace or remove wiki.strongswan.org URLs

3 years agoUpdate copyright headers after acquisition by secunet
Tobias Brunner [Fri, 3 Jun 2022 15:52:43 +0000 (17:52 +0200)] 
Update copyright headers after acquisition by secunet

3 years agoRemove obsolete _copyright utility
Tobias Brunner [Fri, 3 Jun 2022 16:57:27 +0000 (18:57 +0200)] 
Remove obsolete _copyright utility

3 years agoopenssl: Use dynamically allocated array to determine EC curves
Tobias Brunner [Wed, 15 Jun 2022 08:34:52 +0000 (10:34 +0200)] 
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

3 years agoita-comp-ima: Change validation URI parsing to avoid GCC 12 compiler warning
Tobias Brunner [Thu, 16 Jun 2022 16:40:25 +0000 (18:40 +0200)] 
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.

3 years agofips-prf: Add explicit bound check to avoid GCC 12 compile warning
Tobias Brunner [Thu, 16 Jun 2022 16:18:26 +0000 (18:18 +0200)] 
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;
      |         ~~~^~~~~~~~~~~~~

3 years agohashtable: Avoid compiler warning with GCC 12
Tobias Brunner [Thu, 16 Jun 2022 08:23:16 +0000 (10:23 +0200)] 
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.

3 years agoobject: Fix CALLBACK macros with GCC 12
Tobias Brunner [Thu, 19 May 2022 09:10:07 +0000 (11:10 +0200)] 
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

3 years agoconf: Fix documentation for leak detective's usage thresholds
Tobias Brunner [Tue, 21 Jun 2022 13:44:59 +0000 (15:44 +0200)] 
conf: Fix documentation for leak detective's usage thresholds

These only apply to the usage reports that are available via
`stroke memusage`, not to leak reports when executables are terminated,
which always include all non-whitelisted leaks.

3 years agocredential-manager: Log subject of trusted cert before building trust chain
Tobias Brunner [Thu, 2 Jun 2022 09:25:19 +0000 (11:25 +0200)] 
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).

3 years agoVersion bump to 5.9.7dr1 5.9.7dr1
Andreas Steffen [Thu, 26 May 2022 15:41:14 +0000 (17:41 +0200)] 
Version bump to 5.9.7dr1

3 years agoTCG TNC attribute name changes
Andreas Steffen [Tue, 24 May 2022 15:40:06 +0000 (17:40 +0200)] 
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

3 years agotesting: Use sans-serif font for test results
Tobias Brunner [Thu, 5 May 2022 07:31:28 +0000 (09:31 +0200)] 
testing: Use sans-serif font for test results

We could later extend the stylesheet more or even add something similar
to actual templates (e.g. a shared header/footer).

3 years agoMerge branch 'nm-gtk4'
Tobias Brunner [Mon, 16 May 2022 12:40:42 +0000 (14:40 +0200)] 
Merge branch 'nm-gtk4'

Adds support for GTK 4.  Two versions of the UI are built as shared
objects, the plugin dynamically loads and instantiates the appropriate one
based on the determined GTK version.

Closes strongswan/strongswan#961

3 years agonm: Version bump to 1.6.0
Tobias Brunner [Mon, 16 May 2022 12:14:40 +0000 (14:14 +0200)] 
nm: Version bump to 1.6.0

3 years agonm: Add support for GTK4
Tobias Brunner [Wed, 20 Apr 2022 12:19:54 +0000 (14:19 +0200)] 
nm: Add support for GTK4

3 years agonm: Change layout of file chooser dialog
Tobias Brunner [Thu, 14 Apr 2022 08:49:45 +0000 (10:49 +0200)] 
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).

3 years agonm: Split NM plugin and editor widget into separate libs
Tobias Brunner [Wed, 20 Apr 2022 07:50:03 +0000 (09:50 +0200)] 
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.

3 years agonm: Replace GtkFileChooserButton
Tobias Brunner [Wed, 20 Apr 2022 07:39:04 +0000 (09:39 +0200)] 
nm: Replace GtkFileChooserButton

GTK4 does not provide that widget anymore, so we replace it with buttons,
labels and a GtkFileChooserDialog widgets.

3 years agonm: Update Glade file
Tobias Brunner [Wed, 20 Apr 2022 07:37:44 +0000 (09:37 +0200)] 
nm: Update Glade file

3 years agonm: Load GtkBuilder data from resource instead of file
Tobias Brunner [Wed, 20 Apr 2022 07:34:31 +0000 (09:34 +0200)] 
nm: Load GtkBuilder data from resource instead of file

This makes it easier to build a GTK4 version later.

3 years agonm: Remove old libnm-glib compat stuff
Tobias Brunner [Wed, 20 Apr 2022 07:28:18 +0000 (09:28 +0200)] 
nm: Remove old libnm-glib compat stuff

This shouldn't be necessary anymore.

3 years agoadopt-children-job: Avoid reordering CHILD_SAs
Tobias Brunner [Mon, 9 May 2022 11:33:49 +0000 (13:33 +0200)] 
adopt-children-job: Avoid reordering CHILD_SAs

References strongswan/strongswan#1041

3 years agoquick-mode: Remove outbound SA/policy of rekeyed CHILD_SA
Xiao Liang [Sat, 7 May 2022 12:42:27 +0000 (20:42 +0800)] 
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

3 years agoproposal: Demote AES-XCBC/CMAC PRFs in default proposal
Tobias Brunner [Mon, 9 May 2022 09:49:50 +0000 (11:49 +0200)] 
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

3 years agoconfigure: Auto-enable kdf plugin if necessary
Tobias Brunner [Fri, 6 May 2022 12:24:26 +0000 (14:24 +0200)] 
configure: Auto-enable kdf plugin if necessary

This ensures the plugin is available if AES-based PRFs could get used or
none of the third-party crypto plugins is enabled and it's required for
HMAC-based PRFs as well.

References strongswan/strongswan#1026

3 years agogithub: Update automatic labels in issue templates
Tobias Brunner [Fri, 6 May 2022 11:11:53 +0000 (13:11 +0200)] 
github: Update automatic labels in issue templates

3 years agoUse wolfSSL 5.3.0 for tests
Tobias Brunner [Thu, 5 May 2022 07:41:21 +0000 (09:41 +0200)] 
Use wolfSSL 5.3.0 for tests

3 years agoplugin-loader: Print an error message if plugin constructor is not found
Tobias Brunner [Thu, 5 May 2022 08:21:10 +0000 (10:21 +0200)] 
plugin-loader: Print an error message if plugin constructor is not found

3 years agokeymat_v2: Fix error message if KDF can't be created
Tobias Brunner [Fri, 6 May 2022 09:38:08 +0000 (11:38 +0200)] 
keymat_v2: Fix error message if KDF can't be created

Fixes: f619b833accf ("keymat_v2: Use plugin-provided KDF_PRF to derive SKEYSEED")
References strongswan/strongswan#1026

3 years agotesting: Fix 'unsafe repository' error when accessing Git repository
Tobias Brunner [Mon, 2 May 2022 08:51:25 +0000 (10:51 +0200)] 
testing: Fix 'unsafe repository' error when accessing Git repository

A recent security fix for Git added a fatal error if the directory that
contains the .git directory is not owned by the user that runs git in
that directory tree:

  Determine strongSwan version fatal: unsafe repository ('...' is owned by someone else)

To avoid this, we call the git commands as owner of the source
directory (the script has to run as root, so this is no problem).

The user/group ID and name is now also determined via `stat(1)` so it
directly depends on the actual source dir and should work even when not
using sudo.

3 years agoenum: Fix compiler warning
Tobias Brunner [Mon, 2 May 2022 07:31:49 +0000 (09:31 +0200)] 
enum: Fix compiler warning

Closes strongswan/strongswan#1025

3 years agoVersion bump to 5.9.6 5.9.6
Andreas Steffen [Thu, 28 Apr 2022 20:38:10 +0000 (22:38 +0200)] 
Version bump to 5.9.6

3 years agoUse mallinfo2() if available
Tobias Brunner [Mon, 25 Apr 2022 11:30:27 +0000 (13:30 +0200)] 
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.

3 years agoNEWS: Add news for 5.9.6
Tobias Brunner [Fri, 22 Apr 2022 08:55:55 +0000 (10:55 +0200)] 
NEWS: Add news for 5.9.6

3 years agotls-crypto: Initialize cipher suites arrays to avoid warnings
Tobias Brunner [Thu, 21 Apr 2022 13:42:24 +0000 (15:42 +0200)] 
tls-crypto: Initialize cipher suites arrays to avoid warnings

3 years agogcrypt: Initialize variables when en-/decrypting with RSA to avoid warnings
Tobias Brunner [Thu, 21 Apr 2022 13:40:12 +0000 (15:40 +0200)] 
gcrypt: Initialize variables when en-/decrypting with RSA to avoid warnings

3 years agokdf: Fix Doxygen comments
Tobias Brunner [Thu, 21 Apr 2022 12:52:25 +0000 (14:52 +0200)] 
kdf: Fix Doxygen comments

3 years agoopenssl: Fix typo in comment
Tobias Brunner [Thu, 21 Apr 2022 09:06:30 +0000 (11:06 +0200)] 
openssl: Fix typo in comment

3 years agoikev2: Maintain labels during make-before-break reauthentication
Tobias Brunner [Wed, 20 Apr 2022 12:45:41 +0000 (14:45 +0200)] 
ikev2: Maintain labels during make-before-break reauthentication

3 years agogithub: Use run_number instead run_id as external-id for LGTM
Tobias Brunner [Tue, 19 Apr 2022 14:56:06 +0000 (16:56 +0200)] 
github: Use run_number instead run_id as external-id for LGTM

The external-id parameter takes an int32 and the generated run_id was
apparently not valid lately, resulting in undocumented 404 errors when
submitting patches (the API endpoint probably doesn't like negative numbers
because the last accepted id was 2059658094, rejected ids were e.g.
2167472705 or 2168792083).

3 years agoVersion bump to 5.9.6rc1 5.9.6rc1
Andreas Steffen [Sat, 16 Apr 2022 08:23:35 +0000 (10:23 +0200)] 
Version bump to 5.9.6rc1

3 years agoMerge branch 'openssl-3.0'
Tobias Brunner [Thu, 14 Apr 2022 17:06:12 +0000 (19:06 +0200)] 
Merge branch 'openssl-3.0'

This provides compatibility changes for OpenSSL 3.0.

3 years agogithub: Add a build against OpenSSL 3.0
Tobias Brunner [Fri, 4 Mar 2022 13:04:15 +0000 (14:04 +0100)] 
github: Add a build against OpenSSL 3.0

3 years agounit-tests: Add environment variable to skip IPv6 stream tests
Tobias Brunner [Wed, 16 Mar 2022 15:45:16 +0000 (16:45 +0100)] 
unit-tests: Add environment variable to skip IPv6 stream tests

This is an issue e.g. when running tests in default Docker containers.

3 years agounit-tests: Add support for more than one warning per test case
Tobias Brunner [Fri, 4 Mar 2022 14:16:12 +0000 (15:16 +0100)] 
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.

3 years agoopenssl: Move ENGINE-specific code into a separate file
Tobias Brunner [Fri, 4 Mar 2022 10:26:52 +0000 (11:26 +0100)] 
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.

3 years agoopenssl: Remove checks and legacy compatibility code for OpenSSL < 1.0.2
Tobias Brunner [Fri, 4 Mar 2022 09:57:20 +0000 (10:57 +0100)] 
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).

3 years agoopenssl: Fixes for HMAC with OpenSSL 3.0
Tobias Brunner [Fri, 4 Mar 2022 09:49:04 +0000 (10:49 +0100)] 
openssl: Fixes for HMAC with OpenSSL 3.0

3 years agoopenssl: Fixes for ECDSA with OpenSSL 3.0
Tobias Brunner [Thu, 3 Mar 2022 13:19:03 +0000 (14:19 +0100)] 
openssl: Fixes for ECDSA with OpenSSL 3.0

3 years agoconfigure: Move pkcs8 plugin after plugins that can parse PKCS#8 directly
Tobias Brunner [Thu, 14 Apr 2022 09:57:30 +0000 (11:57 +0200)] 
configure: Move pkcs8 plugin after plugins that can parse PKCS#8 directly

With such plugins we only need the pkcs8 plugin to load encrypted files.

3 years agopkcs8: Parse the decrypted PKCS#8 structure via regular builders
Tobias Brunner [Fri, 4 Mar 2022 07:21:42 +0000 (08:21 +0100)] 
pkcs8: Parse the decrypted PKCS#8 structure via regular builders

This allows other plugins to parse such structures directly.  The pkcs8
plugin is called recursively again if necessary.

3 years agoopenssl: Fixes for RSA with OpenSSL 3.0
Tobias Brunner [Mon, 28 Feb 2022 13:28:18 +0000 (14:28 +0100)] 
openssl: Fixes for RSA with OpenSSL 3.0

3 years agoopenssl: Fixes for DH with OpenSSL 3.0
Tobias Brunner [Fri, 25 Feb 2022 16:05:24 +0000 (17:05 +0100)] 
openssl: Fixes for DH with OpenSSL 3.0

While we could assign the DH object to a EVP_PKEY object, this won't work
with BoringSSL as it doesn't seem to support EVP_PKEY_derive() for DH.

3 years agoopenssl: Fixes for ECDH with OpenSSL 3.0
Tobias Brunner [Thu, 24 Feb 2022 16:29:09 +0000 (17:29 +0100)] 
openssl: Fixes for ECDH with OpenSSL 3.0

Uses new and non-deprecated APIs to create/generate key pairs.

3 years agoopenssl: PRF_KEYED_SHA1 might not be supported
Tobias Brunner [Thu, 24 Feb 2022 13:50:25 +0000 (14:50 +0100)] 
openssl: PRF_KEYED_SHA1 might not be supported

The old API has been deprecated with OpenSSL 3 and direct access to the
state isn't possible via EVP API.  In the future we might just remove this
implementation but we'd probably have to implement EAP-AKA' first, which
uses HMAC-SHA-256 with IKEv2's prf+ construct to derive keys instead
of this weird construct (plus what fips-prf builds around it) that's used
by EAP-AKA.

3 years agoleak-detective: Whitelist OpenSSL 3.0 functions
Tobias Brunner [Wed, 23 Feb 2022 16:39:39 +0000 (17:39 +0100)] 
leak-detective: Whitelist OpenSSL 3.0 functions

3 years agoopenssl: Move shared secret calculation to get_shared_secret()
Tobias Brunner [Fri, 23 Jul 2021 14:44:07 +0000 (16:44 +0200)] 
openssl: Move shared secret calculation to get_shared_secret()

This is a change from the multi-KE branch.

3 years agoMerge branch 'ikev2-kdf-modularization'
Tobias Brunner [Thu, 14 Apr 2022 17:03:03 +0000 (19:03 +0200)] 
Merge branch 'ikev2-kdf-modularization'

This modularizes the IKEv2 key derivation, which makes certification (e.g.
FIPS) easier because it allows the two steps (PRF/prf+) to be implemented
by already certified third-party libraries.

For the existing third-party libraries, the two KDFs are implemented via
the respective library's HKDF implementation.  A generic implementation,
based on existing PRFs, is provided by the new kdf plugin.