pcsc: Allow T1 protocol to be enabled

The previous implementation was hardcoding only T0 protocol to be
acceptable. Allow T1 to be selected, too.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2012-02-26 13:14:46 +02:00
parent f64adcd71e
commit 6bcf537833

View file

@ -516,7 +516,8 @@ struct scard_data * scard_init(scard_sim_type sim_type, const char *reader)
#endif /* UNICODE */ #endif /* UNICODE */
ret = SCardConnect(scard->ctx, &readers[pos], SCARD_SHARE_SHARED, ret = SCardConnect(scard->ctx, &readers[pos], SCARD_SHARE_SHARED,
SCARD_PROTOCOL_T0, &scard->card, &scard->protocol); SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1,
&scard->card, &scard->protocol);
if (ret != SCARD_S_SUCCESS) { if (ret != SCARD_S_SUCCESS) {
if (ret == (long) SCARD_E_NO_SMARTCARD) if (ret == (long) SCARD_E_NO_SMARTCARD)
wpa_printf(MSG_INFO, "No smart card inserted."); wpa_printf(MSG_INFO, "No smart card inserted.");