Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching full:len

36  *   GET RESPONSE: C0 00 00 <len>
37 * RUN GSM ALG: 88 00 00 00 <RAND len = 10>
38 * RUN UMTS ALG: 88 00 81 <len=0x22> data: 0x10 | RAND | 0x10 | AUTN
41 * READ BINARY: B0 <offset high> <offset low> <len>
42 * READ RECORD: B2 <record number> <mode> <len>
236 unsigned char *data, size_t len,
268 "0x%02x len=%d", pos[0], pos[1]);
378 "template (len=%d rlen=%d)",
437 unsigned long len;
464 ret = SCardListReaders(scard->ctx, NULL, NULL, &len);
472 len *= 2;
474 readers = os_malloc(len);
480 ret = SCardListReaders(scard->ctx, NULL, readers, &len);
486 if (len < 3) {
711 size_t len, rlen;
726 cmd[4] = aidlen; /* len */
734 len = sizeof(resp);
735 ret = scard_transmit(scard, cmd, cmdlen, resp, &len);
742 if (len != 2) {
743 wpa_printf(MSG_WARNING, "SCARD: unexpected resp len "
744 "%d (expected 2)", (int) len);
794 unsigned char cmd[5] = { SIM_CMD_READ_RECORD /* , len */ };
826 unsigned char *data, size_t len,
829 unsigned char cmd[5] = { SIM_CMD_READ_RECORD /* , len */ };
830 size_t blen = len + 3;
838 cmd[4] = len;
849 if (blen != len + 2) {
852 (long) blen, (long) len + 2);
857 if (buf[len] != 0x90 || buf[len + 1] != 0x00) {
860 buf[len], buf[len + 1]);
865 os_memcpy(data, buf, len);
873 unsigned char *data, size_t len)
875 unsigned char cmd[5] = { SIM_CMD_READ_BIN /* , len */ };
876 size_t blen = len + 3;
880 cmd[4] = len;
893 if (blen != len + 2) {
896 (long) blen, (long) len + 2);
901 if (buf[len] != 0x90 || buf[len + 1] != 0x00) {
904 buf[len], buf[len + 1]);
909 os_memcpy(data, buf, len);
921 size_t len;
933 len = sizeof(resp);
934 ret = scard_transmit(scard, cmd, sizeof(cmd), resp, &len);
938 if (len != 2 || resp[0] != 0x90 || resp[1] != 0x00) {
952 * @len: Length of imsi buffer; set to IMSI length on success
955 * (USIM only), -4 if IMSI does not fit in the provided imsi buffer (len is set
962 int scard_get_imsi(struct scard_data *scard, char *imsi, size_t *len)
974 "header (len=%ld)", (long) blen);
995 if (blen < 2 || imsilen > *len) {
996 *len = imsilen;
1020 *len = imsilen;
1048 size_t len;
1066 len = sizeof(resp);
1067 ret = scard_transmit(scard, cmd, cmdlen, resp, &len);
1072 (len != 2 || resp[0] != 0x9f || resp[1] != 0x0c)) ||
1074 (len != 2 || resp[0] != 0x61 || resp[1] != 0x0e))) {
1076 "auth request (len=%ld resp=%02x %02x)",
1077 (long) len, resp[0], resp[1]);
1082 len = sizeof(buf);
1083 ret = scard_transmit(scard, get_resp, sizeof(get_resp), buf, &len);
1088 if (len != 4 + 8 + 2) {
1090 "length for GSM auth (len=%ld, expected 14)",
1091 (long) len);
1097 if (len != 1 + 4 + 1 + 8 + 2) {
1099 "length for USIM auth (len=%ld, "
1100 "expected 16)", (long) len);
1148 size_t len;
1167 len = sizeof(resp);
1168 ret = scard_transmit(scard, cmd, sizeof(cmd), resp, &len);
1172 if (len <= sizeof(resp))
1173 wpa_hexdump(MSG_DEBUG, "SCARD: UMTS alg response", resp, len);
1175 if (len == 2 && resp[0] == 0x98 && resp[1] == 0x62) {
1179 } else if (len != 2 || resp[0] != 0x61) {
1181 "auth request (len=%ld resp=%02x %02x)",
1182 (long) len, resp[0], resp[1]);
1187 len = sizeof(buf);
1188 ret = scard_transmit(scard, get_resp, sizeof(get_resp), buf, &len);
1189 if (ret != SCARD_S_SUCCESS || len > sizeof(buf))
1192 wpa_hexdump(MSG_DEBUG, "SCARD: UMTS get response result", buf, len);
1193 if (len >= 2 + AKA_AUTS_LEN && buf[0] == 0xdc &&
1199 } else if (len >= 6 + IK_LEN + CK_LEN && buf[0] == 0xdb) {
1201 end = buf + len;