aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-12-18 12:44:03 (GMT)
committerJouni Malinen <j@w1.fi>2011-12-18 12:44:03 (GMT)
commitf2fe5b366337a274a42ab049e0b5673f527d3c5d (patch)
treef9ff31a299e0c964794e72324bfbeec648636647 /src
parent90b8fc8f4eeb8f8aa90efb6d76361f55e66d67c2 (diff)
downloadhostap-f2fe5b366337a274a42ab049e0b5673f527d3c5d.zip
hostap-f2fe5b366337a274a42ab049e0b5673f527d3c5d.tar.gz
hostap-f2fe5b366337a274a42ab049e0b5673f527d3c5d.tar.bz2
PCSC: Accept 0x67 (Wrong length) as a response to READ RECORD
It looks like some USIM cards respond with 0x67 (Wrong length) instead of 0x6c to 00 b2 01 04 ff. This was getting rejected in scard_get_record_len(). ETSI TS 102 221 is not very clear on this detail, but it looks fine to accept the 0x67 error value, too, to learn the record length. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src')
-rw-r--r--src/utils/pcsc_funcs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/pcsc_funcs.c b/src/utils/pcsc_funcs.c
index bf9f04a..c36193e 100644
--- a/src/utils/pcsc_funcs.c
+++ b/src/utils/pcsc_funcs.c
@@ -812,7 +812,7 @@ static int scard_get_record_len(struct scard_data *scard, unsigned char recnum,
wpa_hexdump(MSG_DEBUG, "SCARD: file length determination response",
buf, blen);
- if (blen < 2 || buf[0] != 0x6c) {
+ if (blen < 2 || (buf[0] != 0x6c && buf[0] != 0x67)) {
wpa_printf(MSG_DEBUG, "SCARD: unexpected response to file "
"length determination");
return -1;