From: Jouni Malinen Date: Tue, 17 Sep 2019 15:00:49 +0000 (+0300) Subject: Fix wpa_supplicant build with CONFIG_PCSC=y X-Git-Tag: hostap_2_10~2355 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fhostap.git;a=commitdiff_plain;h=3f2641e7ad9e88dbbc61acfa8e32a79c24b9a22c Fix wpa_supplicant build with CONFIG_PCSC=y This code block with dependency on PCSC_FUNCS was missed when conf->pin was moved to conf->cert.pin. Fix this to get rid of compilation issues with CONFIG_PCSC=y builds. Fixes: b99c4cadb7f8 ("EAP peer: Move certificate configuration params into shared struct") Signed-off-by: Jouni Malinen --- diff --git a/src/eap_peer/eap.c b/src/eap_peer/eap.c index a7c4cf666..c78b21482 100644 --- a/src/eap_peer/eap.c +++ b/src/eap_peer/eap.c @@ -1614,13 +1614,13 @@ static int eap_sm_imsi_identity(struct eap_sm *sm, static int eap_sm_set_scard_pin(struct eap_sm *sm, struct eap_peer_config *conf) { - if (scard_set_pin(sm->scard_ctx, conf->pin)) { + if (scard_set_pin(sm->scard_ctx, conf->cert.pin)) { /* * Make sure the same PIN is not tried again in order to avoid * blocking SIM. */ - os_free(conf->pin); - conf->pin = NULL; + os_free(conf->cert.pin); + conf->cert.pin = NULL; wpa_printf(MSG_WARNING, "PIN validation failed"); eap_sm_request_pin(sm);