/hostap-latest/src/crypto/ |
D | aes-eax.c | 33 size_t buf_len; in aes_128_eax_encrypt() local 39 buf_len = nonce_len; in aes_128_eax_encrypt() 41 buf_len = data_len; in aes_128_eax_encrypt() 42 if (hdr_len > buf_len) in aes_128_eax_encrypt() 43 buf_len = hdr_len; in aes_128_eax_encrypt() 44 buf_len += 16; in aes_128_eax_encrypt() 46 buf = os_malloc(buf_len); in aes_128_eax_encrypt() 74 bin_clear_free(buf, buf_len); in aes_128_eax_encrypt() 97 size_t buf_len; in aes_128_eax_decrypt() local 103 buf_len = nonce_len; in aes_128_eax_decrypt() [all …]
|
D | sha1-tprf.c | 30 const u8 *seed, size_t seed_len, u8 *buf, size_t buf_len) in sha1_t_prf() argument 51 output_len[0] = (buf_len >> 8) & 0xff; in sha1_t_prf() 52 output_len[1] = buf_len & 0xff; in sha1_t_prf() 54 while (pos < buf_len) { in sha1_t_prf() 56 plen = buf_len - pos; in sha1_t_prf()
|
D | sha256-prf.c | 31 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha256_prf() argument 34 buf_len * 8); in sha256_prf() 64 size_t buf_len = (buf_len_bits + 7) / 8; in sha256_prf_bits() local 77 while (pos < buf_len) { in sha256_prf_bits() 78 plen = buf_len - pos; in sha256_prf_bits()
|
D | sha384-prf.c | 31 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha384_prf() argument 34 buf_len * 8); in sha384_prf() 64 size_t buf_len = (buf_len_bits + 7) / 8; in sha384_prf_bits() local 77 while (pos < buf_len) { in sha384_prf_bits() 78 plen = buf_len - pos; in sha384_prf_bits()
|
D | sha512-prf.c | 31 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha512_prf() argument 34 buf_len * 8); in sha512_prf() 64 size_t buf_len = (buf_len_bits + 7) / 8; in sha512_prf_bits() local 77 while (pos < buf_len) { in sha512_prf_bits() 78 plen = buf_len - pos; in sha512_prf_bits()
|
D | sha1-prf.c | 31 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha1_prf() argument 48 while (pos < buf_len) { in sha1_prf() 49 plen = buf_len - pos; in sha1_prf()
|
D | crypto_mbedtls_alt.c | 588 size_t buf_len = (buf_len_bits + 7) / 8; in hmac_prf_bits() local 589 for (ctr = 1; buf_len >= mac_len; buf_len -= mac_len, ++ctr) in hmac_prf_bits() 604 if (buf_len) in hmac_prf_bits() 613 os_memcpy(buf, hash, buf_len); in hmac_prf_bits() 614 buf += buf_len; in hmac_prf_bits() 627 … *key, size_t key_len, const char *label, const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha512_prf() argument 629 return hmac_prf_bits(key, key_len, label, data, data_len, buf, buf_len * 8, MBEDTLS_MD_SHA512); in sha512_prf() 633 … *key, size_t key_len, const char *label, const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha384_prf() argument 635 return hmac_prf_bits(key, key_len, label, data, data_len, buf, buf_len * 8, MBEDTLS_MD_SHA384); in sha384_prf() 656 size_t buf_len = (buf_len_bits + 7) / 8; in hmac_prf256() local [all …]
|
D | sha1.h | 19 const u8 *data, size_t data_len, u8 *buf, size_t buf_len); 21 const u8 *seed, size_t seed_len, u8 *buf, size_t buf_len);
|
D | tls_none.c | 206 int tls_get_library_version(char *buf, size_t buf_len) in tls_get_library_version() argument 208 return os_snprintf(buf, buf_len, "none"); in tls_get_library_version()
|
/hostap-latest/src/eap_peer/ |
D | eap_teap_pac.c | 185 size_t buf_len; member 194 if (fgets(rc->buf, rc->buf_len, rc->f) == NULL) in eap_teap_read_line() 206 if (len >= rc->buf_len) in eap_teap_read_line() 207 len = rc->buf_len - 1; in eap_teap_read_line() 213 rc->buf[rc->buf_len - 1] = '\0'; in eap_teap_read_line() 259 rc->buf_len = 2048; in eap_teap_init_pac_data() 260 rc->buf = os_malloc(rc->buf_len); in eap_teap_init_pac_data() 478 static void eap_teap_write(char **buf, char **pos, size_t *buf_len, in eap_teap_write() argument 493 if (*pos - *buf + need > *buf_len) { in eap_teap_write() 494 char *nbuf = os_realloc(*buf, *buf_len + need); in eap_teap_write() [all …]
|
D | eap_fast_pac.c | 185 size_t buf_len; member 194 if (fgets(rc->buf, rc->buf_len, rc->f) == NULL) in eap_fast_read_line() 205 if (len >= rc->buf_len) in eap_fast_read_line() 206 len = rc->buf_len - 1; in eap_fast_read_line() 212 rc->buf[rc->buf_len - 1] = '\0'; in eap_fast_read_line() 258 rc->buf_len = 2048; in eap_fast_init_pac_data() 259 rc->buf = os_malloc(rc->buf_len); in eap_fast_init_pac_data() 477 static void eap_fast_write(char **buf, char **pos, size_t *buf_len, in eap_fast_write() argument 493 if (*pos - *buf + need > *buf_len) { in eap_fast_write() 494 char *nbuf = os_realloc(*buf, *buf_len + need); in eap_fast_write() [all …]
|
D | mschapv2.c | 113 const u8 *buf, size_t buf_len) in mschapv2_verify_auth_response() argument 116 if (buf_len < 2 + 2 * MSCHAPV2_AUTH_RESPONSE_LEN || in mschapv2_verify_auth_response()
|
/hostap-latest/wpa_supplicant/ |
D | robust_av.c | 269 size_t buf_len; in wpas_send_mscs_req() local 288 buf_len = 3 + /* Action frame header */ in wpas_send_mscs_req() 296 buf = wpabuf_alloc(buf_len); in wpas_send_mscs_req() 324 size_t buf_len = 0; in tclas_elem_len() local 326 buf_len += 2 + /* TCLAS element header */ in tclas_elem_len() 333 buf_len += 1 + /* Classifier mask */ in tclas_elem_len() 341 buf_len += 4 + /* src_ip */ in tclas_elem_len() 346 buf_len += 16 + /* src_ip */ in tclas_elem_len() 356 buf_len += 1 + /* protocol instance */ in tclas_elem_len() 365 return buf_len; in tclas_elem_len() [all …]
|
D | p2p_supplicant_sd.c | 102 static int p2p_sd_dns_uncompress(char *buf, size_t buf_len, const u8 *msg, in p2p_sd_dns_uncompress() argument 112 if (buf_len < 2) in p2p_sd_dns_uncompress() 129 uend = buf + buf_len; in p2p_sd_dns_uncompress() 699 size_t buf_len; in wpas_sd_request() local 704 buf_len = 2 * tlvs_len + 1; in wpas_sd_request() 705 buf = os_malloc(buf_len); in wpas_sd_request() 707 wpa_snprintf_hex(buf, buf_len, tlvs, tlvs_len); in wpas_sd_request() 826 size_t buf_len; in wpas_sd_p2ps_serv_response() local 854 buf_len = WPA_GET_LE16(pos); in wpas_sd_p2ps_serv_response() 858 if (buf_len > (unsigned int) (tlv_end - pos)) in wpas_sd_p2ps_serv_response() [all …]
|
D | mesh_mpm.c | 222 size_t buf_len; in mesh_mpm_send_plink_action() local 227 buf_len = 2 + /* Category and Action */ in mesh_mpm_send_plink_action() 238 buf_len += 2 + 26 + /* HT capabilities */ in mesh_mpm_send_plink_action() 243 buf_len += 2 + 12 + /* VHT Capabilities */ in mesh_mpm_send_plink_action() 249 buf_len += 3 + in mesh_mpm_send_plink_action() 254 buf_len += 3 + sizeof(struct ieee80211_he_operation); in mesh_mpm_send_plink_action() 256 buf_len += sizeof(struct ieee80211_he_6ghz_oper_info) + in mesh_mpm_send_plink_action() 261 buf_len += conf->rsn_ie_len; /* RSN IE */ in mesh_mpm_send_plink_action() 265 buf_len += OCV_OCI_EXTENDED_LEN; in mesh_mpm_send_plink_action() 269 buf_len += 3 + 2 + EHT_PHY_CAPAB_LEN + EHT_MCS_NSS_CAPAB_LEN + in mesh_mpm_send_plink_action() [all …]
|
/hostap-latest/wlantest/ |
D | bip.c | 82 size_t plen, mic_len, element_len, buf_len; in bip_protect_s1g_beacon() local 115 buf_len = plen - 6 + bce_add_len; in bip_protect_s1g_beacon() 116 buf = os_malloc(buf_len); in bip_protect_s1g_beacon() 170 wpa_hexdump(MSG_MSGDUMP, "S1G BIP-CMAC AAD|Body(masked)", buf, buf_len); in bip_protect_s1g_beacon() 173 if (omac1_aes_128(igtk, buf, buf_len, mic) < 0) { in bip_protect_s1g_beacon() 262 size_t plen, mic_len, element_len, buf_len; in bip_gmac_protect_s1g_beacon() local 295 buf_len = plen - 6 + bce_add_len; in bip_gmac_protect_s1g_beacon() 296 buf = os_malloc(buf_len); in bip_gmac_protect_s1g_beacon() 349 wpa_hexdump(MSG_MSGDUMP, "S1G BIP-GMAC AAD|Body(masked)", buf, buf_len); in bip_gmac_protect_s1g_beacon() 363 if (aes_gmac(igtk, igtk_len, nonce, sizeof(nonce), buf, buf_len, pos) < in bip_gmac_protect_s1g_beacon()
|
/hostap-latest/src/pae/ |
D | ieee802_1x_key.c | 41 int lab_len, ctx_len, ret_len, buf_len; in aes_kdf() local 50 buf_len = lab_len + ctx_len + 4; in aes_kdf() 58 buf = os_zalloc(buf_len); in aes_kdf() 64 WPA_PUT_BE16(&buf[buf_len - 2], ret_bits); in aes_kdf() 71 res = omac1_aes_128(kdk, buf, buf_len, ret); in aes_kdf() 73 res = omac1_aes_256(kdk, buf, buf_len, ret); in aes_kdf()
|
/hostap-latest/src/eap_common/ |
D | eap_peap_common.c | 17 u8 *buf, size_t buf_len) in peap_prfplus() argument 60 extra[0] = buf_len & 0xff; in peap_prfplus() 69 while (pos < buf_len) { in peap_prfplus() 71 plen = buf_len - pos; in peap_prfplus()
|
D | eap_sake_common.c | 219 u8 *buf, size_t buf_len) in eap_sake_kdf() argument 238 while (pos < buf_len) { in eap_sake_kdf() 239 plen = buf_len - pos; in eap_sake_kdf()
|
D | eap_peap_common.h | 14 u8 *buf, size_t buf_len);
|
/hostap-latest/src/utils/ |
D | json.c | 68 size_t max_len, buf_len; in json_parse_string() local 74 buf_len = max_len > 10 ? 10 : max_len; in json_parse_string() 75 str = os_malloc(buf_len); in json_parse_string() 79 s_end = str + buf_len; in json_parse_string() 82 if (buf_len < max_len && s_end - spos < 3) { in json_parse_string() 87 buf_len *= 2; in json_parse_string() 88 if (buf_len > max_len) in json_parse_string() 89 buf_len = max_len; in json_parse_string() 90 tmp = os_realloc(str, buf_len); in json_parse_string() 95 s_end = str + buf_len; in json_parse_string()
|
D | pcsc_funcs.c | 253 unsigned char *buf, size_t *buf_len, 257 unsigned char *buf, size_t *buf_len); 266 static int scard_parse_fsp_templ(unsigned char *buf, size_t buf_len, in scard_parse_fsp_templ() argument 277 end = pos + buf_len; in scard_parse_fsp_templ() 807 unsigned char *buf, size_t *buf_len, in _scard_select_file() argument 875 rlen = *buf_len; in _scard_select_file() 878 *buf_len = resp[1] < rlen ? resp[1] : rlen; in _scard_select_file() 888 unsigned char *buf, size_t *buf_len) in scard_select_file() argument 890 return _scard_select_file(scard, file_id, buf, buf_len, in scard_select_file()
|
/hostap-latest/src/pasn/ |
D | pasn_initiator.c | 79 size_t buf_len; in wpas_pasn_wd_sae_rx() local 88 buf_len = wpabuf_len(wd); in wpas_pasn_wd_sae_rx() 91 if (buf_len < 2) { in wpas_pasn_wd_sae_rx() 97 if (len < 6 || buf_len - 2 < len) { in wpas_pasn_wd_sae_rx() 102 buf_len -= 2; in wpas_pasn_wd_sae_rx() 132 buf_len -= len; in wpas_pasn_wd_sae_rx() 136 if (buf_len < 2) { in wpas_pasn_wd_sae_rx() 142 if (len < 6 || buf_len - 2 < len) { in wpas_pasn_wd_sae_rx() 147 buf_len -= 2; in wpas_pasn_wd_sae_rx() 309 size_t buf_len; in wpas_pasn_wd_fils_rx() local [all …]
|
D | pasn_responder.c | 45 size_t buf_len; in pasn_wd_handle_sae_commit() local 54 buf_len = wpabuf_len(wd); in pasn_wd_handle_sae_commit() 56 if (buf_len < 6) { in pasn_wd_handle_sae_commit() 58 buf_len); in pasn_wd_handle_sae_commit() 96 res = sae_parse_commit(&pasn->sae, data + 6, buf_len - 6, NULL, 0, in pasn_wd_handle_sae_commit() 120 size_t buf_len; in pasn_wd_handle_sae_confirm() local 127 buf_len = wpabuf_len(wd); in pasn_wd_handle_sae_confirm() 129 if (buf_len < 6) { in pasn_wd_handle_sae_confirm() 131 buf_len); in pasn_wd_handle_sae_confirm() 147 res = sae_check_confirm(&pasn->sae, data + 6, buf_len - 6, NULL); in pasn_wd_handle_sae_confirm()
|
/hostap-latest/src/rsn_supp/ |
D | tdls.c | 128 int buf_len; /* length of TPK message for retransmission */ member 325 peer->sm_tmr.buf_len = msg_len; in wpa_tdls_tpk_send() 383 peer->sm_tmr.buf_len, -1)) { in wpa_tdls_tpk_retry_timeout() 419 peer->sm_tmr.buf_len = 0; in wpa_tdls_tpk_retry_timeout_cancel() 1103 size_t buf_len; in wpa_tdls_send_tpk_m1() local 1181 buf_len = 0; in wpa_tdls_send_tpk_m1() 1183 buf_len += peer->rsnie_i_len + sizeof(struct wpa_tdls_ftie) + in wpa_tdls_send_tpk_m1() 1188 buf_len += 170; in wpa_tdls_send_tpk_m1() 1190 buf_len += sizeof(struct wpa_tdls_lnkid); in wpa_tdls_send_tpk_m1() 1192 rbuf = os_zalloc(buf_len + 1); in wpa_tdls_send_tpk_m1() [all …]
|