eap-gtc: Fix reading secret from settings

This makes testEAP-PEAP-GTC pass for me by re-adding the check for the
GTC-Secret setting which was replaced with the check for the secrets
list in 3d2285ec7e.
This commit is contained in:
Andrew Zaborowski 2018-08-09 02:33:17 +02:00 committed by Denis Kenzior
parent 4ffb97faa1
commit 549021b5dd
1 changed files with 9 additions and 5 deletions

View File

@ -100,12 +100,16 @@ static int eap_gtc_check_settings(struct l_settings *settings,
return 0;
}
secret = l_queue_find(secrets, eap_secret_info_match, setting2);
/* identity found, but secret missing */
if (!secret)
eap_append_secret(out_missing, EAP_SECRET_REMOTE_PASSWORD,
setting2, NULL, identity,
EAP_CACHE_NEVER);
if (!l_settings_get_value(settings, "Security", setting2)) {
secret = l_queue_find(secrets, eap_secret_info_match, setting2);
if (!secret)
eap_append_secret(out_missing,
EAP_SECRET_REMOTE_PASSWORD,
setting2, NULL, identity,
EAP_CACHE_NEVER);
}
return 0;
}