Home
last modified time | relevance | path

Searched refs:plen (Results 1 – 25 of 63) sorted by relevance

123

/hostap-latest/wlantest/
Dbip.c24 size_t plen; in bip_protect() local
26 plen = len + (igtk_len == 32 ? 26 : 18); in bip_protect()
27 prot = os_malloc(plen); in bip_protect()
40 buf = os_malloc(plen + 20 - 24); in bip_protect()
52 os_memcpy(buf + 20, prot + 24, plen - 24); in bip_protect()
53 wpa_hexdump(MSG_MSGDUMP, "BIP: AAD|Body(masked)", buf, plen + 20 - 24); in bip_protect()
55 if (omac1_aes_128(igtk, buf, plen + 20 - 24, mic) < 0) { in bip_protect()
65 *prot_len = plen; in bip_protect()
82 size_t plen, mic_len, element_len, buf_len; in bip_protect_s1g_beacon() local
91 plen = len + element_len; /* add element length */ in bip_protect_s1g_beacon()
[all …]
Dccmp.c212 size_t aad_len, plen; in ccmp_encrypt() local
218 plen = len - hdrlen; in ccmp_encrypt()
220 crypt = os_malloc(hdrlen + 8 + plen + 8 + AES_BLOCK_SIZE); in ccmp_encrypt()
242 if (aes_ccm_ae(tk, 16, nonce, 8, frame + hdrlen, plen, aad, aad_len, in ccmp_encrypt()
243 pos, pos + plen) < 0) { in ccmp_encrypt()
248 wpa_hexdump(MSG_EXCESSIVE, "CCMP encrypted", crypt + hdrlen + 8, plen); in ccmp_encrypt()
250 *encrypted_len = hdrlen + 8 + plen + 8; in ccmp_encrypt()
262 size_t aad_len, plen; in ccmp_encrypt_pv1() local
268 plen = len - hdrlen; in ccmp_encrypt_pv1()
270 crypt = os_malloc(hdrlen + plen + 8 + AES_BLOCK_SIZE); in ccmp_encrypt_pv1()
[all …]
Dgcmp.c131 size_t aad_len, plen; in gcmp_encrypt() local
136 plen = len - hdrlen; in gcmp_encrypt()
138 crypt = os_malloc(hdrlen + 8 + plen + 16 + AES_BLOCK_SIZE); in gcmp_encrypt()
159 if (aes_gcm_ae(tk, tk_len, nonce, sizeof(nonce), frame + hdrlen, plen, in gcmp_encrypt()
160 aad, aad_len, pos, pos + plen) < 0) { in gcmp_encrypt()
165 wpa_hexdump(MSG_EXCESSIVE, "GCMP MIC", pos + plen, 16); in gcmp_encrypt()
166 wpa_hexdump(MSG_EXCESSIVE, "GCMP encrypted", pos, plen); in gcmp_encrypt()
168 *encrypted_len = hdrlen + 8 + plen + 16; in gcmp_encrypt()
Dwired.c209 size_t plen; in process_udp() local
225 plen = len - sizeof(*udp); in process_udp()
228 process_radius(wt, dst, dport, src, sport, payload, plen); in process_udp()
236 size_t plen; in process_ipv4() local
264 plen = len - 4 * ip->ip_hl; in process_ipv4()
265 if (payload + plen > data + len) in process_ipv4()
271 payload, plen); in process_ipv4()
Drx_ip.c125 size_t plen; in rx_data_ip() local
174 plen = len - 4 * ip.ip_hl; in rx_data_ip()
180 ip.ip_src.s_addr, payload, plen, peer_addr); in rx_data_ip()
/hostap-latest/src/tls/
Dtlsv1_record.c356 size_t plen; in tlsv1_record_receive() local
362 plen = in_len; in tlsv1_record_receive()
364 "data", out_data, plen); in tlsv1_record_receive()
380 if (plen < rl->iv_size) { in tlsv1_record_receive()
387 plen - rl->iv_size); in tlsv1_record_receive()
388 plen -= rl->iv_size; in tlsv1_record_receive()
392 if (plen == 0) { in tlsv1_record_receive()
398 padlen = out_data[plen - 1]; in tlsv1_record_receive()
399 if (padlen >= plen) { in tlsv1_record_receive()
403 padlen, (unsigned long) plen); in tlsv1_record_receive()
[all …]
/hostap-latest/src/eap_peer/
Dikev2.c317 int plen; in ikev2_process_sai1() local
323 plen = ikev2_parse_proposal(&prop, pos, end); in ikev2_process_sai1()
324 if (plen < 0) in ikev2_process_sai1()
334 pos += plen; in ikev2_process_sai1()
845 size_t plen; in ikev2_build_sar1() local
870 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) t; in ikev2_build_sar1()
871 WPA_PUT_BE16(t->transform_length, plen); in ikev2_build_sar1()
890 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) p; in ikev2_build_sar1()
891 WPA_PUT_BE16(p->proposal_length, plen); in ikev2_build_sar1()
893 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) phdr; in ikev2_build_sar1()
[all …]
Deap_gtc.c51 size_t password_len, identity_len, len, plen; in eap_gtc_process() local
98 plen = password_len; in eap_gtc_process()
103 plen += 9 + identity_len + 1; in eap_gtc_process()
104 resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_GTC, plen, in eap_gtc_process()
116 1, plen); in eap_gtc_process()
/hostap-latest/src/crypto/
Dsha256-prf.c59 size_t pos, plen; in sha256_prf_bits() local
78 plen = buf_len - pos; in sha256_prf_bits()
80 if (plen >= SHA256_MAC_LEN) { in sha256_prf_bits()
89 os_memcpy(&buf[pos], hash, plen); in sha256_prf_bits()
90 pos += plen; in sha256_prf_bits()
Dsha384-prf.c59 size_t pos, plen; in sha384_prf_bits() local
78 plen = buf_len - pos; in sha384_prf_bits()
80 if (plen >= SHA384_MAC_LEN) { in sha384_prf_bits()
89 os_memcpy(&buf[pos], hash, plen); in sha384_prf_bits()
90 pos += plen; in sha384_prf_bits()
Dsha512-prf.c59 size_t pos, plen; in sha512_prf_bits() local
78 plen = buf_len - pos; in sha512_prf_bits()
80 if (plen >= SHA512_MAC_LEN) { in sha512_prf_bits()
89 os_memcpy(&buf[pos], hash, plen); in sha512_prf_bits()
90 pos += plen; in sha512_prf_bits()
Dsha1-pbkdf2.c79 size_t left = buflen, plen; in pbkdf2_sha1() local
87 plen = left > SHA1_MAC_LEN ? SHA1_MAC_LEN : left; in pbkdf2_sha1()
88 os_memcpy(pos, digest, plen); in pbkdf2_sha1()
89 pos += plen; in pbkdf2_sha1()
90 left -= plen; in pbkdf2_sha1()
Dsha1-prf.c34 size_t pos, plen; in sha1_prf() local
49 plen = buf_len - pos; in sha1_prf()
50 if (plen >= SHA1_MAC_LEN) { in sha1_prf()
59 os_memcpy(&buf[pos], hash, plen); in sha1_prf()
Dsha1-tprf.c33 size_t pos, plen; in sha1_t_prf() local
56 plen = buf_len - pos; in sha1_t_prf()
59 if (plen >= SHA1_MAC_LEN) { in sha1_t_prf()
63 os_memcpy(&buf[pos], hash, plen); in sha1_t_prf()
/hostap-latest/src/eap_server/
Dikev2.c323 int plen; in ikev2_process_sar1() local
329 plen = ikev2_parse_proposal(data, &prop, pos, end); in ikev2_process_sar1()
330 if (plen < 0) in ikev2_process_sar1()
338 pos += plen; in ikev2_process_sar1()
907 size_t plen; in ikev2_build_sai() local
933 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) t; in ikev2_build_sai()
934 WPA_PUT_BE16(t->transform_length, plen); in ikev2_build_sai()
953 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) p; in ikev2_build_sai()
954 WPA_PUT_BE16(p->proposal_length, plen); in ikev2_build_sai()
956 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) phdr; in ikev2_build_sai()
[all …]
Deap_server_sake.c95 size_t plen; in eap_sake_build_msg() local
97 plen = sizeof(struct eap_sake_hdr) + length; in eap_sake_build_msg()
99 msg = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_SAKE, plen, in eap_sake_build_msg()
121 size_t plen; in eap_sake_build_identity() local
125 plen = 4; in eap_sake_build_identity()
126 plen += 2 + sm->cfg->server_id_len; in eap_sake_build_identity()
127 msg = eap_sake_build_msg(data, id, plen, EAP_SAKE_SUBTYPE_IDENTITY); in eap_sake_build_identity()
149 size_t plen; in eap_sake_build_challenge() local
161 plen = 2 + EAP_SAKE_RAND_LEN + 2 + sm->cfg->server_id_len; in eap_sake_build_challenge()
162 msg = eap_sake_build_msg(data, id, plen, EAP_SAKE_SUBTYPE_CHALLENGE); in eap_sake_build_challenge()
Deap_server_md5.c103 size_t plen; in eap_md5_process() local
114 pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_MD5, respData, &plen); in eap_md5_process()
115 if (pos == NULL || *pos != CHAP_MD5_LEN || plen < 1 + CHAP_MD5_LEN) in eap_md5_process()
Deap_server_eke.c115 size_t plen; in eap_eke_build_msg() local
117 plen = 1 + length; in eap_eke_build_msg()
119 msg = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_EKE, plen, in eap_eke_build_msg()
185 size_t plen; in eap_eke_build_identity() local
189 plen = 2 + 4 * 4 + 1 + sm->cfg->server_id_len; in eap_eke_build_identity()
190 msg = eap_eke_build_msg(data, id, plen, EAP_EKE_ID); in eap_eke_build_identity()
308 size_t plen, prot_len; in eap_eke_build_confirm() local
314 plen = data->sess.pnonce_ps_len + data->sess.prf_len; in eap_eke_build_confirm()
315 msg = eap_eke_build_msg(data, id, plen, EAP_EKE_CONFIRM); in eap_eke_build_confirm()
/hostap-latest/src/eap_common/
Deap_peap_common.c20 size_t pos, plen; in peap_prfplus() local
71 plen = buf_len - pos; in peap_prfplus()
74 if (plen >= SHA1_MAC_LEN) { in peap_prfplus()
78 os_memcpy(&buf[pos], hash, plen); in peap_prfplus()
Dikev2_common.c253 unsigned int plen, pdatalen, left; in ikev2_parse_payloads() local
267 plen = WPA_GET_BE16(phdr->payload_length); in ikev2_parse_payloads()
268 if (plen < sizeof(*phdr) || plen > left) { in ikev2_parse_payloads()
270 "length %d", plen); in ikev2_parse_payloads()
276 phdr->next_payload, phdr->flags, plen); in ikev2_parse_payloads()
279 pdatalen = plen - sizeof(*phdr); in ikev2_parse_payloads()
345 pos + plen == end) { in ikev2_parse_payloads()
356 pos += plen; in ikev2_parse_payloads()
535 size_t plen; in ikev2_build_encrypted() local
595 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) phdr; in ikev2_build_encrypted()
[all …]
Deap_sim_common.c499 size_t alen, plen, i, list_len; in eap_sim_parse_attr() local
620 plen = WPA_GET_BE16(apos); in eap_sim_parse_attr()
623 if (plen > alen) { in eap_sim_parse_attr()
627 (unsigned long) plen, in eap_sim_parse_attr()
633 attr->identity_len = plen; in eap_sim_parse_attr()
758 plen = apos[0] * 256 + apos[1]; in eap_sim_parse_attr()
759 if (plen > alen - 2) { in eap_sim_parse_attr()
763 (unsigned long) plen, in eap_sim_parse_attr()
768 attr->next_pseudonym_len = plen; in eap_sim_parse_attr()
778 plen = apos[0] * 256 + apos[1]; in eap_sim_parse_attr()
[all …]
Deap_common.c67 const struct wpabuf *msg, size_t *plen) in eap_hdr_validate() argument
99 *plen = len - sizeof(*hdr) - 8; in eap_hdr_validate()
106 *plen = len - sizeof(*hdr) - 1; in eap_hdr_validate()
Deap_sake_common.c222 size_t pos, plen; in eap_sake_kdf() local
239 plen = buf_len - pos; in eap_sake_kdf()
240 if (plen >= SHA1_MAC_LEN) { in eap_sake_kdf()
249 os_memcpy(&buf[pos], hash, plen); in eap_sake_kdf()
/hostap-latest/src/eapol_supp/
Deapol_supp_sm.c706 size_t plen; in eapol_sm_processKey() local
723 plen = be_to_host16(hdr->length); in eapol_sm_processKey()
724 if (sizeof(*hdr) + plen > sm->last_rx_key_len || plen < sizeof(*key)) { in eapol_sm_processKey()
790 key_len = plen - sizeof(*key); in eapol_sm_processKey()
1295 size_t plen; in eapol_sm_rx_eapol() local
1318 plen = be_to_host16(hdr->length); in eapol_sm_rx_eapol()
1319 if (plen > len - sizeof(*hdr)) { in eapol_sm_rx_eapol()
1325 plen < len - sizeof(*hdr) && in eapol_sm_rx_eapol()
1333 if (elen > plen && elen <= len - sizeof(*hdr)) { in eapol_sm_rx_eapol()
1343 "%d -> %d", (int) plen, elen); in eapol_sm_rx_eapol()
[all …]
/hostap-latest/hostapd/
Dhostapd_cli_zephyr.c255 size_t plen = MAX_CTRL_MSG_LEN; in hostapd_cli_recv_pending() local
259 plen = *((int *)buf); in hostapd_cli_recv_pending()
265 if (wpa_ctrl_recv(ctrl, buf + sizeof(int), &plen) == 0) { in hostapd_cli_recv_pending()
270 plen, msg->msg_len, msg->msg); in hostapd_cli_recv_pending()

123