charon-nm: Correctly set remote auth class for PSK authentication
Fixes: bc3eda99ba ("charon-nm: Add support for EAP-TLS")
This commit is contained in:
@@ -605,7 +605,6 @@ static gboolean connect_(NMVpnServicePlugin *plugin, NMConnection *connection,
|
|||||||
traffic_selector_t *ts;
|
traffic_selector_t *ts;
|
||||||
ike_sa_t *ike_sa;
|
ike_sa_t *ike_sa;
|
||||||
auth_cfg_t *auth;
|
auth_cfg_t *auth;
|
||||||
auth_class_t auth_class = AUTH_CLASS_EAP;
|
|
||||||
certificate_t *cert = NULL;
|
certificate_t *cert = NULL;
|
||||||
x509_t *x509;
|
x509_t *x509;
|
||||||
bool loose_gateway_id = FALSE;
|
bool loose_gateway_id = FALSE;
|
||||||
@@ -799,7 +798,7 @@ static gboolean connect_(NMVpnServicePlugin *plugin, NMConnection *connection,
|
|||||||
}
|
}
|
||||||
|
|
||||||
auth = auth_cfg_create();
|
auth = auth_cfg_create();
|
||||||
if (auth_class == AUTH_CLASS_PSK)
|
if (streq(method, "psk"))
|
||||||
{
|
{
|
||||||
auth->add(auth, AUTH_RULE_AUTH_CLASS, AUTH_CLASS_PSK);
|
auth->add(auth, AUTH_RULE_AUTH_CLASS, AUTH_CLASS_PSK);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user