]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix wpa_supplicant build with CONFIG_PCSC=y
authorJouni Malinen <jouni@codeaurora.org>
Tue, 17 Sep 2019 15:00:49 +0000 (18:00 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 18 Sep 2019 21:21:47 +0000 (00:21 +0300)
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 <jouni@codeaurora.org>
src/eap_peer/eap.c

index a7c4cf666bedbcee6d444c5d55016366af09a22b..c78b214820f007772fe4c94804d8143beaa6c3a6 100644 (file)
@@ -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);