mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 10:18:21 -05:00
Interworking: Init scard when a credential requires SIM access
When an ANQP fetch is triggered and ANQP_3GPP_CELLULAR_NETWORK info is required, initialize scard to be ready when comparing ANQP and credentials. Signed-off-by: Jean Trivelly <jean.trivelly@intel.com>
This commit is contained in:
parent
729897a388
commit
62f736dd04
@ -303,11 +303,11 @@ int wpa_supplicant_scard_init(struct wpa_supplicant *wpa_s,
|
||||
#ifdef PCSC_FUNCS
|
||||
int aka = 0, sim = 0;
|
||||
|
||||
if (ssid->eap.pcsc == NULL || wpa_s->scard != NULL ||
|
||||
wpa_s->conf->external_sim)
|
||||
if ((ssid != NULL && ssid->eap.pcsc == NULL) ||
|
||||
wpa_s->scard != NULL || wpa_s->conf->external_sim)
|
||||
return 0;
|
||||
|
||||
if (ssid->eap.eap_methods == NULL) {
|
||||
if (ssid == NULL || ssid->eap.eap_methods == NULL) {
|
||||
sim = 1;
|
||||
aka = 1;
|
||||
} else {
|
||||
|
@ -260,8 +260,10 @@ static int interworking_anqp_send_req(struct wpa_supplicant *wpa_s,
|
||||
info_ids[num_info_ids++] = ANQP_IP_ADDR_TYPE_AVAILABILITY;
|
||||
if (all || cred_with_nai_realm(wpa_s))
|
||||
info_ids[num_info_ids++] = ANQP_NAI_REALM;
|
||||
if (all || cred_with_3gpp(wpa_s))
|
||||
if (all || cred_with_3gpp(wpa_s)) {
|
||||
info_ids[num_info_ids++] = ANQP_3GPP_CELLULAR_NETWORK;
|
||||
wpa_supplicant_scard_init(wpa_s, NULL);
|
||||
}
|
||||
if (all || cred_with_domain(wpa_s))
|
||||
info_ids[num_info_ids++] = ANQP_DOMAIN_NAME;
|
||||
wpa_hexdump(MSG_DEBUG, "Interworking: ANQP Query info",
|
||||
|
Loading…
Reference in New Issue
Block a user