]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
pubkey-authenticator: Avoid conflict with config switch based on EAP-Identity master
authorTobias Brunner <tobias@strongswan.org>
Thu, 8 Jan 2026 07:59:11 +0000 (08:59 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 28 Jan 2026 13:16:23 +0000 (14:16 +0100)
The referenced commit ignored that INVALID_ARG was returned by this
authenticator if an unsupported signature scheme is encountered.  This
caused a crash in find_alternative_eap_cfg() as no EAP identity is
stored in the current auth config.

Since we don't distinguish the situation outside of the authenticator,
we can just return FAILED.

Closes strongswan/strongswan#2979

Fixes: 2f2e4abe3c52 ("ikev2: Add support to switch peer configs based on EAP-Identities")
src/libcharon/sa/ikev2/authenticators/pubkey_authenticator.c

index 3f53bc1b242edbe7ddd3da156c772ca6bd420cef..392a61d9d9ae67e6001b8eba855a9dcdb993bfec 100644 (file)
@@ -631,7 +631,7 @@ METHOD(authenticator_t, process, status_t,
                        DBG1(DBG_IKE, "%N authentication %s", auth_method_names,
                                 auth_method, reason);
                        signature_params_destroy(params);
-                       return INVALID_ARG;
+                       return FAILED;
        }
        id = this->ike_sa->get_other_id(this->ike_sa);
        if (!get_auth_octets_scheme(this, TRUE, id, this->ppk, &octets, &params))