/hal_espressif-latest/components/wpa_supplicant/src/rsn_supp/ |
D | wpa_ie.c | 52 u8 *pos; in wpa_gen_wpa_ie_wpa() local 64 pos = (u8 *) (hdr + 1); in wpa_gen_wpa_ie_wpa() 72 RSN_SELECTOR_PUT(pos, suite); in wpa_gen_wpa_ie_wpa() 73 pos += WPA_SELECTOR_LEN; in wpa_gen_wpa_ie_wpa() 75 *pos++ = 1; in wpa_gen_wpa_ie_wpa() 76 *pos++ = 0; in wpa_gen_wpa_ie_wpa() 85 RSN_SELECTOR_PUT(pos, suite); in wpa_gen_wpa_ie_wpa() 86 pos += WPA_SELECTOR_LEN; in wpa_gen_wpa_ie_wpa() 88 *pos++ = 1; in wpa_gen_wpa_ie_wpa() 89 *pos++ = 0; in wpa_gen_wpa_ie_wpa() [all …]
|
D | pmksa_cache.c | 111 struct rsn_pmksa_cache_entry *entry, *pos, *prev; in pmksa_cache_add() local 144 pos = pmksa->pmksa; in pmksa_cache_add() 146 while (pos) { in pmksa_cache_add() 147 if (os_memcmp(aa, pos->aa, ETH_ALEN) == 0) { in pmksa_cache_add() 148 if (pos->pmk_len == pmk_len && in pmksa_cache_add() 149 os_memcmp_const(pos->pmk, pmk, pmk_len) == 0 && in pmksa_cache_add() 150 os_memcmp_const(pos->pmkid, entry->pmkid, in pmksa_cache_add() 155 return pos; in pmksa_cache_add() 158 pmksa->pmksa = pos->next; in pmksa_cache_add() 160 prev->next = pos->next; in pmksa_cache_add() [all …]
|
/hal_espressif-latest/components/wpa_supplicant/src/tls/ |
D | tlsv1_server_write.c | 45 u8 *pos, *rhdr, *hs_start, *hs_length, *ext_start; in tls_write_server_hello() local 49 pos = *msgpos; in tls_write_server_hello() 52 rhdr = pos; in tls_write_server_hello() 53 pos += TLS_RECORD_HEADER_LEN; in tls_write_server_hello() 80 hs_start = pos; in tls_write_server_hello() 82 *pos++ = TLS_HANDSHAKE_TYPE_SERVER_HELLO; in tls_write_server_hello() 84 hs_length = pos; in tls_write_server_hello() 85 pos += 3; in tls_write_server_hello() 88 WPA_PUT_BE16(pos, conn->rl.tls_version); in tls_write_server_hello() 89 pos += 2; in tls_write_server_hello() [all …]
|
D | tlsv1_client_write.c | 47 u8 *hello, *end, *pos, *hs_length, *hs_start, *rhdr; in tls_send_client_hello() local 82 pos = rhdr + TLS_RECORD_HEADER_LEN; in tls_send_client_hello() 87 hs_start = pos; in tls_send_client_hello() 89 *pos++ = TLS_HANDSHAKE_TYPE_CLIENT_HELLO; in tls_send_client_hello() 91 hs_length = pos; in tls_send_client_hello() 92 pos += 3; in tls_send_client_hello() 95 WPA_PUT_BE16(pos, tls_version); in tls_send_client_hello() 96 pos += 2; in tls_send_client_hello() 98 os_memcpy(pos, conn->client_random, TLS_RANDOM_LEN); in tls_send_client_hello() 99 pos += TLS_RANDOM_LEN; in tls_send_client_hello() [all …]
|
D | tlsv1_cred.c | 110 const u8 *pos, *end; in tlsv1_add_cert() local 114 pos = search_tag(pem_cert_begin, buf, len); in tlsv1_add_cert() 115 if (!pos) { in tlsv1_add_cert() 124 while (pos) { in tlsv1_add_cert() 125 pos += os_strlen(pem_cert_begin); in tlsv1_add_cert() 126 end = search_tag(pem_cert_end, pos, buf + len - pos); in tlsv1_add_cert() 133 der = base64_decode((const char *) pos, end - pos, &der_len); in tlsv1_add_cert() 150 pos = search_tag(pem_cert_begin, end, buf + len - end); in tlsv1_add_cert() 199 const char *pos = cert + 7; in tlsv1_set_ca_cert() local 200 if (os_strncmp(pos, "server/sha256/", 14) != 0) { in tlsv1_set_ca_cert() [all …]
|
D | x509v3.c | 186 const u8 *pos, *end; in x509_parse_algorithm_identifier() local 202 pos = hdr.payload; in x509_parse_algorithm_identifier() 203 end = pos + hdr.length; in x509_parse_algorithm_identifier() 207 if (asn1_get_oid(pos, end - pos, &id->oid, &pos)) in x509_parse_algorithm_identifier() 221 const u8 *pos, *end; in x509_parse_public_key() local 230 pos = buf; in x509_parse_public_key() 233 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in x509_parse_public_key() 239 pos = hdr.payload; in x509_parse_public_key() 241 if (hdr.length > end - pos) in x509_parse_public_key() 243 end = pos + hdr.length; in x509_parse_public_key() [all …]
|
D | tlsv1_client_read.c | 42 const u8 *pos, size_t len) in tls_process_server_hello_extensions() argument 44 const u8 *end = pos + len; in tls_process_server_hello_extensions() 47 pos, len); in tls_process_server_hello_extensions() 48 while (pos < end) { in tls_process_server_hello_extensions() 51 if (end - pos < 4) { in tls_process_server_hello_extensions() 58 ext = WPA_GET_BE16(pos); in tls_process_server_hello_extensions() 62 pos += 2; in tls_process_server_hello_extensions() 63 elen = WPA_GET_BE16(pos); in tls_process_server_hello_extensions() 64 pos += 2; in tls_process_server_hello_extensions() 66 if (elen > end - pos) { in tls_process_server_hello_extensions() [all …]
|
D | tlsv1_client_ocsp.c | 117 const u8 *pos, *end; in tls_process_ocsp_single_response() local 145 pos = hdr.payload; in tls_process_ocsp_single_response() 157 if (x509_parse_algorithm_identifier(pos, end - pos, &alg, &pos)) in tls_process_ocsp_single_response() 161 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in tls_process_ocsp_single_response() 171 pos = hdr.payload + hdr.length; in tls_process_ocsp_single_response() 186 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in tls_process_ocsp_single_response() 195 pos = hdr.payload + hdr.length; in tls_process_ocsp_single_response() 208 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in tls_process_ocsp_single_response() 231 pos = end; in tls_process_ocsp_single_response() 241 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in tls_process_ocsp_single_response() [all …]
|
D | pkcs1.c | 23 u8 *pos; in pkcs1_generate_encryption_block() local 44 pos = out; in pkcs1_generate_encryption_block() 45 *pos++ = 0x00; in pkcs1_generate_encryption_block() 46 *pos++ = block_type; /* BT */ in pkcs1_generate_encryption_block() 50 os_memset(pos, 0x00, ps_len); in pkcs1_generate_encryption_block() 51 pos += ps_len; in pkcs1_generate_encryption_block() 54 os_memset(pos, 0xff, ps_len); in pkcs1_generate_encryption_block() 55 pos += ps_len; in pkcs1_generate_encryption_block() 58 if (os_get_random(pos, ps_len) < 0) { in pkcs1_generate_encryption_block() 64 if (*pos == 0x00) in pkcs1_generate_encryption_block() [all …]
|
D | tlsv1_server_read.c | 52 const u8 *pos, *end; in tls_process_status_request_item() local 55 pos = req; in tls_process_status_request_item() 72 if (end - pos < 1) in tls_process_status_request_item() 75 status_type = *pos++; in tls_process_status_request_item() 83 wpa_hexdump(MSG_DEBUG, "TLSv1: OCSPStatusRequest", pos, end - pos); in tls_process_status_request_item() 93 const u8 *pos, *end; in tls_process_status_request_v2() local 97 pos = ext; in tls_process_status_request_v2() 108 while (end - pos >= 2) { in tls_process_status_request_v2() 111 len = WPA_GET_BE16(pos); in tls_process_status_request_v2() 112 pos += 2; in tls_process_status_request_v2() [all …]
|
D | rsa.c | 31 static const u8 * crypto_rsa_parse_integer(const u8 *pos, const u8 *end, in crypto_rsa_parse_integer() argument 36 if (pos == NULL) in crypto_rsa_parse_integer() 39 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in crypto_rsa_parse_integer() 65 const u8 *pos, *end; in crypto_rsa_import_public_key() local 90 pos = hdr.payload; in crypto_rsa_import_public_key() 91 end = pos + hdr.length; in crypto_rsa_import_public_key() 93 pos = crypto_rsa_parse_integer(pos, end, key->n); in crypto_rsa_import_public_key() 94 pos = crypto_rsa_parse_integer(pos, end, key->e); in crypto_rsa_import_public_key() 96 if (pos == NULL) in crypto_rsa_import_public_key() 99 if (pos != end) { in crypto_rsa_import_public_key() [all …]
|
D | pkcs8.c | 22 const u8 *pos, *end; in pkcs8_key_import() local 35 pos = hdr.payload; in pkcs8_key_import() 36 end = pos + hdr.length; in pkcs8_key_import() 39 if (asn1_get_next(pos, end - pos, &hdr) < 0 || !asn1_is_integer(&hdr)) { in pkcs8_key_import() 53 pos = hdr.payload + hdr.length; in pkcs8_key_import() 66 if (asn1_get_next(pos, len, &hdr) < 0 || !asn1_is_sequence(&hdr)) { in pkcs8_key_import() 72 if (asn1_get_oid(hdr.payload, hdr.length, &oid, &pos)) { in pkcs8_key_import() 94 pos = hdr.payload + hdr.length; in pkcs8_key_import() 97 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in pkcs8_key_import() 114 const u8 *pos, *end, *enc_alg; in pkcs8_enc_key_import() local [all …]
|
/hal_espressif-latest/components/wpa_supplicant/src/ap/ |
D | wpa_auth_ie.c | 28 u8 *pos, *count; in wpa_write_wpa_ie() local 35 pos = (u8 *) (hdr + 1); in wpa_write_wpa_ie() 43 RSN_SELECTOR_PUT(pos, suite); in wpa_write_wpa_ie() 44 pos += WPA_SELECTOR_LEN; in wpa_write_wpa_ie() 46 count = pos; in wpa_write_wpa_ie() 47 pos += 2; in wpa_write_wpa_ie() 49 num_suites = wpa_cipher_put_suites(pos, conf->wpa_pairwise); in wpa_write_wpa_ie() 55 pos += num_suites * WPA_SELECTOR_LEN; in wpa_write_wpa_ie() 59 count = pos; in wpa_write_wpa_ie() 60 pos += 2; in wpa_write_wpa_ie() [all …]
|
D | pmksa_cache_auth.c | 51 struct rsn_pmksa_cache_entry *pos, *prev; in pmksa_cache_free_entry() local 59 pos = pmksa->pmkid[hash]; in pmksa_cache_free_entry() 61 while (pos) { in pmksa_cache_free_entry() 62 if (pos == entry) { in pmksa_cache_free_entry() 69 prev = pos; in pmksa_cache_free_entry() 70 pos = pos->hnext; in pmksa_cache_free_entry() 74 pos = pmksa->pmksa; in pmksa_cache_free_entry() 76 while (pos) { in pmksa_cache_free_entry() 77 if (pos == entry) { in pmksa_cache_free_entry() 84 prev = pos; in pmksa_cache_free_entry() [all …]
|
/hal_espressif-latest/components/wpa_supplicant/src/wps/ |
D | wps_attr_parse.c | 21 u8 id, u8 len, const u8 *pos) in wps_set_vendor_ext_wfa_subelem() argument 32 attr->version2 = pos; in wps_set_vendor_ext_wfa_subelem() 35 attr->authorized_macs = pos; in wps_set_vendor_ext_wfa_subelem() 44 attr->network_key_shareable = pos; in wps_set_vendor_ext_wfa_subelem() 52 attr->request_to_enroll = pos; in wps_set_vendor_ext_wfa_subelem() 60 attr->settings_delay_time = pos; in wps_set_vendor_ext_wfa_subelem() 68 attr->registrar_configuration_methods = pos; in wps_set_vendor_ext_wfa_subelem() 77 attr->multi_ap_ext = *pos; in wps_set_vendor_ext_wfa_subelem() 91 static int wps_parse_vendor_ext_wfa(struct wps_parse_attr *attr, const u8 *pos, in wps_parse_vendor_ext_wfa() argument 94 const u8 *end = pos + len; in wps_parse_vendor_ext_wfa() [all …]
|
D | wps.c | 342 const u8 *pos; in wps_is_addr_authorized() local 371 pos = attr->authorized_macs; in wps_is_addr_authorized() 373 if (os_memcmp(pos, addr, ETH_ALEN) == 0) { in wps_is_addr_authorized() 377 if (os_memcmp(pos, bcast, ETH_ALEN) == 0) { in wps_is_addr_authorized() 381 pos += ETH_ALEN; in wps_is_addr_authorized() 627 char *pos = buf; in wps_attr_text() local 641 ret = snprintf(pos, end - pos, in wps_attr_text() 644 ret = snprintf(pos, end - pos, in wps_attr_text() 648 if (ret < 0 || ret >= end - pos) { in wps_attr_text() 649 ret = pos - buf; in wps_attr_text() [all …]
|
/hal_espressif-latest/components/wpa_supplicant/src/eap_peer/ |
D | eap_fast_pac.c | 182 const char *pos; member 191 char *pos; in eap_fast_read_line() local 200 if (rc->pos >= rc->end) in eap_fast_read_line() 202 l_end = rc->pos; in eap_fast_read_line() 205 len = l_end - rc->pos; in eap_fast_read_line() 208 os_memcpy(rc->buf, rc->pos, len); in eap_fast_read_line() 210 rc->pos = l_end + 1; in eap_fast_read_line() 214 pos = rc->buf; in eap_fast_read_line() 215 while (*pos != '\0') { in eap_fast_read_line() 216 if (*pos == '\n' || *pos == '\r') { in eap_fast_read_line() [all …]
|
/hal_espressif-latest/components/wpa_supplicant/src/common/ |
D | ieee802_11_common.c | 93 int ieee802_11_parse_candidate_list(const char *pos, u8 *nei_rep, in ieee802_11_parse_candidate_list() argument 104 while (pos) { in ieee802_11_parse_candidate_list() 109 pos = os_strstr(pos, " neighbor="); in ieee802_11_parse_candidate_list() 110 if (!pos) in ieee802_11_parse_candidate_list() 117 pos += 10; in ieee802_11_parse_candidate_list() 123 if (hwaddr_aton2(pos, nei_pos) < 0) { in ieee802_11_parse_candidate_list() 128 pos += 17; in ieee802_11_parse_candidate_list() 129 if (*pos != ',') { in ieee802_11_parse_candidate_list() 133 pos++; in ieee802_11_parse_candidate_list() 135 val = strtol(pos, &endptr, 0); in ieee802_11_parse_candidate_list() [all …]
|
D | wpa_common.c | 33 u8 *buf, *pos; in wpa_ft_mic() local 47 pos = buf; in wpa_ft_mic() 48 os_memcpy(pos, sta_addr, ETH_ALEN); in wpa_ft_mic() 49 pos += ETH_ALEN; in wpa_ft_mic() 50 os_memcpy(pos, ap_addr, ETH_ALEN); in wpa_ft_mic() 51 pos += ETH_ALEN; in wpa_ft_mic() 52 *pos++ = transaction_seqnum; in wpa_ft_mic() 54 os_memcpy(pos, rsnie, rsnie_len); in wpa_ft_mic() 55 pos += rsnie_len; in wpa_ft_mic() 58 os_memcpy(pos, mdie, mdie_len); in wpa_ft_mic() [all …]
|
D | sae_pk.c | 153 int pos; in sae_pk_valid_password() local 170 for (pos = 0; pw[pos]; pos++) { in sae_pk_valid_password() 171 if (pos && pos % 5 == 4) { in sae_pk_valid_password() 172 if (pw[pos] != '-') { in sae_pk_valid_password() 179 if (dtable[(u8) pw[pos]] == 0x80) { in sae_pk_valid_password() 206 static char *add_char(const char *start, char *pos, u8 idx, size_t *bits) in add_char() argument 209 return pos; in add_char() 217 if ((pos - start) % 5 == 4) { in add_char() 218 *pos++ = '-'; in add_char() 220 *pos++ = sae_pk_base32_table[idx]; in add_char() [all …]
|
/hal_espressif-latest/components/wpa_supplicant/src/utils/ |
D | common.c | 53 const char *pos = txt; in hwaddr_aton2() local 58 while (*pos == ':' || *pos == '.' || *pos == '-') in hwaddr_aton2() 59 pos++; in hwaddr_aton2() 61 a = hex2num(*pos++); in hwaddr_aton2() 64 b = hex2num(*pos++); in hwaddr_aton2() 70 return pos - txt; in hwaddr_aton2() 111 int pos = len - 1; in inc_byte_array() local 112 while (pos >= 0) { in inc_byte_array() 113 counter[pos]++; in inc_byte_array() 114 if (counter[pos] != 0) in inc_byte_array() [all …]
|
D | uuid.c | 16 const char *pos; in uuid_str2bin() local 19 pos = str; in uuid_str2bin() 22 if (hexstr2bin(pos, opos, 4)) in uuid_str2bin() 24 pos += 8; in uuid_str2bin() 27 if (*pos++ != '-' || hexstr2bin(pos, opos, 2)) in uuid_str2bin() 29 pos += 4; in uuid_str2bin() 32 if (*pos++ != '-' || hexstr2bin(pos, opos, 2)) in uuid_str2bin() 34 pos += 4; in uuid_str2bin() 37 if (*pos++ != '-' || hexstr2bin(pos, opos, 2)) in uuid_str2bin() 39 pos += 4; in uuid_str2bin() [all …]
|
D | base64.c | 24 char *out, *pos; in base64_gen_encode() local 43 pos = out; in base64_gen_encode() 46 *pos++ = table[(in[0] >> 2) & 0x3f]; in base64_gen_encode() 47 *pos++ = table[(((in[0] & 0x03) << 4) | (in[1] >> 4)) & 0x3f]; in base64_gen_encode() 48 *pos++ = table[(((in[1] & 0x0f) << 2) | (in[2] >> 6)) & 0x3f]; in base64_gen_encode() 49 *pos++ = table[in[2] & 0x3f]; in base64_gen_encode() 53 *pos++ = '\n'; in base64_gen_encode() 59 *pos++ = table[(in[0] >> 2) & 0x3f]; in base64_gen_encode() 61 *pos++ = table[((in[0] & 0x03) << 4) & 0x3f]; in base64_gen_encode() 63 *pos++ = '='; in base64_gen_encode() [all …]
|
D | json.c | 66 const char *pos = *json_pos; in json_parse_string() local 71 pos++; /* skip starting quote */ in json_parse_string() 73 max_len = end - pos + 1; in json_parse_string() 81 for (; pos < end; pos++) { in json_parse_string() 98 switch (*pos) { in json_parse_string() 102 *json_pos = pos; in json_parse_string() 105 pos++; in json_parse_string() 106 if (pos >= end) { in json_parse_string() 111 switch (*pos) { in json_parse_string() 115 *spos++ = *pos; in json_parse_string() [all …]
|
/hal_espressif-latest/components/wpa_supplicant/src/crypto/ |
D | ccmp.c | 24 u8 *pos; in ccmp_aad_nonce() local 51 pos = aad + 2; in ccmp_aad_nonce() 52 os_memcpy(pos, hdr->addr1, 3 * ETH_ALEN); in ccmp_aad_nonce() 53 pos += 3 * ETH_ALEN; in ccmp_aad_nonce() 56 WPA_PUT_LE16(pos, seq); in ccmp_aad_nonce() 57 pos += 2; in ccmp_aad_nonce() 59 os_memcpy(pos, hdr + 1, addr4 * ETH_ALEN + qos * 2); in ccmp_aad_nonce() 60 pos += addr4 * ETH_ALEN; in ccmp_aad_nonce() 62 pos[0] &= ~0x70; in ccmp_aad_nonce() 64 pos[0] &= ~0x80; in ccmp_aad_nonce() [all …]
|