From: Tobias Brunner Date: Fri, 20 Mar 2020 14:53:37 +0000 (+0100) Subject: charon-nm: Correctly set remote auth class for PSK authentication X-Git-Tag: 5.8.3~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=393e0167fdc12971be629408adb9884c32e86c36;p=thirdparty%2Fstrongswan.git charon-nm: Correctly set remote auth class for PSK authentication Fixes: bc3eda99bac0 ("charon-nm: Add support for EAP-TLS") --- diff --git a/src/charon-nm/nm/nm_service.c b/src/charon-nm/nm/nm_service.c index 1dcadb0411..dba12764d1 100644 --- a/src/charon-nm/nm/nm_service.c +++ b/src/charon-nm/nm/nm_service.c @@ -605,7 +605,6 @@ static gboolean connect_(NMVpnServicePlugin *plugin, NMConnection *connection, traffic_selector_t *ts; ike_sa_t *ike_sa; auth_cfg_t *auth; - auth_class_t auth_class = AUTH_CLASS_EAP; certificate_t *cert = NULL; x509_t *x509; bool loose_gateway_id = FALSE; @@ -799,7 +798,7 @@ static gboolean connect_(NMVpnServicePlugin *plugin, NMConnection *connection, } auth = auth_cfg_create(); - if (auth_class == AUTH_CLASS_PSK) + if (streq(method, "psk")) { auth->add(auth, AUTH_RULE_AUTH_CLASS, AUTH_CLASS_PSK); }