/hostap-latest/src/tls/ |
D | tlsv1_cred.c | 110 const u8 *pos, *end; in tlsv1_add_cert() local 126 end = search_tag(pem_cert_end, pos, buf + len - pos); in tlsv1_add_cert() 127 if (end == NULL) { in tlsv1_add_cert() 133 der = hostap_base64_decode((const char *) pos, end - pos, &der_len); in tlsv1_add_cert() 149 end += os_strlen(pem_cert_end); in tlsv1_add_cert() 150 pos = search_tag(pem_cert_begin, end, buf + len - end); in tlsv1_add_cert() 268 const u8 *pos, *end; in tlsv1_set_key_pem() local 279 end = search_tag(pem_key2_end, pos, key + len - pos); in tlsv1_set_key_pem() 280 if (!end) in tlsv1_set_key_pem() 285 end = search_tag(pem_key_end, pos, key + len - pos); in tlsv1_set_key_pem() [all …]
|
D | tlsv1_client_ocsp.c | 117 const u8 *pos, *end; in tls_process_ocsp_single_response() local 146 end = hdr.payload + hdr.length; 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() 186 if (asn1_get_next(pos, end - pos, &hdr) < 0 || 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() 232 end = resp + len; in tls_process_ocsp_single_response() 241 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in tls_process_ocsp_single_response() 254 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in tls_process_ocsp_single_response() [all …]
|
D | tlsv1_server_read.c | 52 const u8 *pos, *end; in tls_process_status_request_item() local 56 end = req + req_len; in tls_process_status_request_item() 72 if (end - pos < 1) 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 98 end = ext + ext_len; in tls_process_status_request_v2() 108 while (end - pos >= 2) { in tls_process_status_request_v2() 113 if (len > end - pos) in tls_process_status_request_v2() 124 const u8 *pos, *end, *c; in tls_process_client_hello() local 173 end = pos + len; in tls_process_client_hello() [all …]
|
D | x509v3.c | 186 const u8 *pos, *end; in x509_parse_algorithm_identifier() local 203 end = pos + hdr.length; in x509_parse_algorithm_identifier() 205 *next = end; 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 231 end = buf + len; in x509_parse_public_key() 233 if (asn1_get_next(pos, end - pos, &hdr) < 0 || 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() 244 *next = end; in x509_parse_public_key() [all …]
|
D | tlsv1_client_read.c | 44 const u8 *end = pos + len; in tls_process_server_hello_extensions() local 48 while (pos < end) { in tls_process_server_hello_extensions() 51 if (end - pos < 4) { in tls_process_server_hello_extensions() 61 if (elen > end - pos) { in tls_process_server_hello_extensions() 81 const u8 *pos, *end; in tls_process_server_hello() local 121 end = pos + len; in tls_process_server_hello() 124 if (end - pos < 2) in tls_process_server_hello() 142 if (end - pos < TLS_RANDOM_LEN) in tls_process_server_hello() 151 if (end - pos < 1) in tls_process_server_hello() 153 if (end - pos < 1 + *pos || *pos > TLS_SESSION_ID_MAX_LEN) in tls_process_server_hello() [all …]
|
D | rsa.c | 31 static const u8 * crypto_rsa_parse_integer(const u8 *pos, const u8 *end, in crypto_rsa_parse_integer() argument 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 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() 99 if (pos != end) { in crypto_rsa_import_public_key() 102 pos, end - pos); in crypto_rsa_import_public_key() 149 const u8 *pos, *end; in crypto_rsa_import_private_key() local 194 end = pos + hdr.length; in crypto_rsa_import_private_key() [all …]
|
D | tlsv1_server_write.c | 43 u8 **msgpos, u8 *end) in tls_write_server_hello() argument 174 rhdr, end - rhdr, hs_start, pos - hs_start, in tls_write_server_hello() 190 u8 **msgpos, u8 *end) in tls_write_server_certificate() argument 205 if (TLS_RECORD_HEADER_LEN + 1 + 3 + 3 > end - pos) { in tls_write_server_certificate() 230 if (3 + cert->cert_len > (size_t) (end - pos)) { in tls_write_server_certificate() 234 (unsigned long) (end - pos)); in tls_write_server_certificate() 264 rhdr, end - rhdr, hs_start, pos - hs_start, in tls_write_server_certificate() 282 u8 **msgpos, u8 *end, in tls_write_server_certificate_status() argument 300 (unsigned int) (end - pos)) { in tls_write_server_certificate_status() 351 rhdr, end - rhdr, hs_start, pos - hs_start, in tls_write_server_certificate_status() [all …]
|
D | tlsv1_client_write.c | 47 u8 *hello, *end, *pos, *hs_length, *hs_start, *rhdr; in tls_send_client_hello() local 79 end = hello + len; in tls_send_client_hello() 237 rhdr, end - rhdr, hs_start, pos - hs_start, in tls_send_client_hello() 253 u8 **msgpos, u8 *end) in tls_write_client_certificate() argument 260 if (TLS_RECORD_HEADER_LEN + 1 + 3 + 3 > end - pos) { in tls_write_client_certificate() 285 if (3 + cert->cert_len > (size_t) (end - pos)) { in tls_write_client_certificate() 289 (unsigned long) (end - pos)); in tls_write_client_certificate() 319 rhdr, end - rhdr, hs_start, pos - hs_start, in tls_write_client_certificate() 336 static int tlsv1_key_x_dh(struct tlsv1_client *conn, u8 **pos, u8 *end) in tlsv1_key_x_dh() argument 396 if (end - *pos < 2) { in tlsv1_key_x_dh() [all …]
|
/hostap-latest/src/utils/ |
D | config.c | 41 char *pos, *end, *sstart; in wpa_config_get_line() local 70 end = os_strchr(sstart, '#'); in wpa_config_get_line() 71 while (end) { in wpa_config_get_line() 73 if (!sstart || sstart > end) in wpa_config_get_line() 79 if (sstart > end) in wpa_config_get_line() 80 end = os_strchr(sstart, '#'); in wpa_config_get_line() 83 if (end) in wpa_config_get_line() 84 *end-- = '\0'; in wpa_config_get_line() 86 end = pos + os_strlen(pos) - 1; in wpa_config_get_line() 89 while (end > pos && in wpa_config_get_line() [all …]
|
D | common.c | 297 char *pos = buf, *end = buf + buf_size; in wpa_snprintf_hex_sep() local 304 ret = os_snprintf(pos, end - pos, "%02x%c", in wpa_snprintf_hex_sep() 306 if (os_snprintf_error(end - pos, ret)) { in wpa_snprintf_hex_sep() 307 end[-1] = '\0'; in wpa_snprintf_hex_sep() 321 char *pos = buf, *end = buf + buf_size; in _wpa_snprintf_hex() local 326 ret = os_snprintf(pos, end - pos, uppercase ? "%02X" : "%02x", in _wpa_snprintf_hex() 328 if (os_snprintf_error(end - pos, ret)) { in _wpa_snprintf_hex() 329 end[-1] = '\0'; in _wpa_snprintf_hex() 334 end[-1] = '\0'; in _wpa_snprintf_hex() 479 char *end = txt + maxlen; in printf_encode() local [all …]
|
/hostap-latest/src/ap/ |
D | fils_hlp.c | 39 u8 *pos, *end; in fils_dhcp_request() local 54 end = pos + wpabuf_len(sta->hlp_dhcp_discover); in fils_dhcp_request() 58 while (pos < end && *pos != DHCP_OPT_END) { in fils_dhcp_request() 64 if (pos >= end) in fils_dhcp_request() 67 if (olen > end - pos) in fils_dhcp_request() 80 os_memmove(pos, pos + 2 + olen, end - pos - 2 - olen); in fils_dhcp_request() 81 end -= 2 + olen; in fils_dhcp_request() 87 if (pos >= end || *pos != DHCP_OPT_END) { in fils_dhcp_request() 95 end = dhcpofferend; in fils_dhcp_request() 97 while (pos < end && *pos != DHCP_OPT_END) { in fils_dhcp_request() [all …]
|
D | mbo_ap.c | 37 char channels[200], *pos, *end; in mbo_ap_parse_non_pref_chan() local 64 end = pos + sizeof(channels); in mbo_ap_parse_non_pref_chan() 67 ret = os_snprintf(pos, end - pos, "%s%u", in mbo_ap_parse_non_pref_chan() 69 if (os_snprintf_error(end - pos, ret)) { in mbo_ap_parse_non_pref_chan() 86 const u8 *pos, *attr, *end; in mbo_ap_check_sta_assoc() local 101 end = pos + len; in mbo_ap_check_sta_assoc() 102 while (end - pos > 1) { in mbo_ap_check_sta_assoc() 105 if (2 + ie_len > end - pos) in mbo_ap_check_sta_assoc() 117 char *pos = buf, *end = buf + buflen; in mbo_ap_get_info() local 126 ret = os_snprintf(pos, end - pos, "mbo_cell_capa=%u\n", sta->cell_capa); in mbo_ap_get_info() [all …]
|
/hostap-latest/src/common/ |
D | dpp_backup.c | 539 const u8 *end = pos + len; in dpp_parse_recipient_infos() local 559 if (asn1_get_next(pos, end - pos, &hdr) < 0 || !hdr.constructed || in dpp_parse_recipient_infos() 567 end = pos + hdr.length; in dpp_parse_recipient_infos() 580 if (asn1_get_sequence(pos, end - pos, &hdr, &end) < 0) in dpp_parse_recipient_infos() 584 if (asn1_get_integer(pos, end - pos, &val, &pos) < 0) in dpp_parse_recipient_infos() 592 pos, end - pos); in dpp_parse_recipient_infos() 594 if (asn1_get_next(pos, end - pos, &hdr) < 0 || !hdr.constructed || in dpp_parse_recipient_infos() 694 if (asn1_get_alg_id(pos, end - pos, &oid, NULL, NULL, &pos) < 0) in dpp_parse_recipient_infos() 713 if (asn1_get_next(pos, end - pos, &hdr) < 0 || in dpp_parse_recipient_infos() 728 static int dpp_parse_encrypted_content_info(const u8 *pos, const u8 *end, in dpp_parse_encrypted_content_info() argument [all …]
|
D | cli.c | 106 const char *end; in cli_txt_list_del_word() local 109 end = os_strchr(txt, separator); in cli_txt_list_del_word() 110 if (end == NULL) in cli_txt_list_del_word() 111 end = txt + os_strlen(txt); in cli_txt_list_del_word() 112 buf = dup_binstr(txt, end - txt); in cli_txt_list_del_word() 155 const char *end; in cli_txt_list_add_word() local 159 end = os_strchr(txt, separator); in cli_txt_list_add_word() 160 if (end == NULL) in cli_txt_list_add_word() 161 end = txt + os_strlen(txt); in cli_txt_list_add_word() 162 buf = dup_binstr(txt, end - txt); in cli_txt_list_add_word() [all …]
|
/hostap-latest/wpa_supplicant/ |
D | ctrl_iface.c | 157 char *end; in set_disallow_aps() local 160 end = pos; in set_disallow_aps() 161 while (*end) { in set_disallow_aps() 162 if (*end == '\0' || *end == ' ') in set_disallow_aps() 164 end++; in set_disallow_aps() 176 if ((end - pos) & 0x01 || in set_disallow_aps() 177 end - pos > 2 * SSID_MAX_LEN || in set_disallow_aps() 179 (end - pos) / 2) < 0) { in set_disallow_aps() 186 ssid[ssid_count].ssid_len = (end - pos) / 2; in set_disallow_aps() 191 pos = end; in set_disallow_aps() [all …]
|
D | config.c | 206 char *end; in wpa_config_parse_int_impl() local 209 val = strtol(value, &end, 0); in wpa_config_parse_int_impl() 210 if (*end) { in wpa_config_parse_int_impl() 341 char *value, *end, *pos; in wpa_config_write_addr_list() local 352 end = value + 2 * 20 * num; in wpa_config_write_addr_list() 360 res = hwaddr_mask_txt(pos, end - pos, a, m); in wpa_config_write_addr_list() 674 char *start, *end, *buf; in wpa_config_parse_proto() local 686 end = start; in wpa_config_parse_proto() 687 while (*end != ' ' && *end != '\t' && *end != '\0') in wpa_config_parse_proto() 688 end++; in wpa_config_parse_proto() [all …]
|
/hostap-latest/src/eapol_auth/ |
D | eapol_auth_dump.c | 124 char *pos, *end; in eapol_auth_dump_state() local 128 end = pos + buflen; in eapol_auth_dump_state() 130 ret = os_snprintf(pos, end - pos, "aWhile=%d\nquietWhile=%d\n" in eapol_auth_dump_state() 133 if (os_snprintf_error(end - pos, ret)) in eapol_auth_dump_state() 138 ret = os_snprintf(pos, end - pos, in eapol_auth_dump_state() 176 if (os_snprintf_error(end - pos, ret)) in eapol_auth_dump_state() 180 ret = os_snprintf(pos, end - pos, in eapol_auth_dump_state() 218 if (os_snprintf_error(end - pos, ret)) in eapol_auth_dump_state() 222 ret = os_snprintf(pos, end - pos, in eapol_auth_dump_state() 243 if (os_snprintf_error(end - pos, ret)) in eapol_auth_dump_state() [all …]
|
/hostap-latest/wlantest/ |
D | wlantest_cli.c | 61 static u8 * attr_hdr_add(u8 *pos, u8 *end, enum wlantest_ctrl_attr attr, in attr_hdr_add() argument 64 if (pos == NULL || end - pos < 8 + len) in attr_hdr_add() 74 static u8 * attr_add_str(u8 *pos, u8 *end, enum wlantest_ctrl_attr attr, in attr_add_str() argument 79 if (pos == NULL || end - pos < 8 + len) in attr_add_str() 91 static u8 * attr_add_be32(u8 *pos, u8 *end, enum wlantest_ctrl_attr attr, in attr_add_be32() argument 94 if (pos == NULL || end - pos < 12) in attr_add_be32() 176 u8 buf[100], *pos, *end; in get_sta_list() local 183 end = buf + sizeof(buf); in get_sta_list() 186 pos = attr_hdr_add(pos, end, WLANTEST_ATTR_BSSID, ETH_ALEN); in get_sta_list() 545 u8 buf[100], *end, *pos; in cmd_get_sta_counter() local [all …]
|
D | ctrl.c | 72 static u8 * attr_add_str(u8 *pos, u8 *end, enum wlantest_ctrl_attr attr, in attr_add_str() argument 77 if (pos == NULL || end - pos < 8 + len) in attr_add_str() 89 static u8 * attr_add_be32(u8 *pos, u8 *end, enum wlantest_ctrl_attr attr, in attr_add_be32() argument 92 if (pos == NULL || end - pos < 12) in attr_add_be32() 348 u8 buf[4 + 12], *end, *pos; in ctrl_get_sta_counter() local 367 end = buf + sizeof(buf); in ctrl_get_sta_counter() 370 pos = attr_add_be32(pos, end, WLANTEST_ATTR_COUNTER, in ctrl_get_sta_counter() 383 u8 buf[4 + 12], *end, *pos; in ctrl_get_bss_counter() local 401 end = buf + sizeof(buf); in ctrl_get_bss_counter() 404 pos = attr_add_be32(pos, end, WLANTEST_ATTR_COUNTER, in ctrl_get_bss_counter() [all …]
|
/hostap-latest/src/wps/ |
D | upnp_xml.c | 79 const char **out_tagname, const char **end) in xml_next_tag() argument 97 *end = ++in; in xml_next_tag() 194 const char *tag, *tagname, *end; in xml_get_first_item() local 203 if (xml_next_tag(doc, &tag, &tagname, &end)) in xml_get_first_item() 205 doc = end; in xml_get_first_item() 213 end = doc; in xml_get_first_item() 214 while (*end && *end != '<') in xml_get_first_item() 215 end++; in xml_get_first_item() 216 value = os_zalloc(1 + (end - doc)); in xml_get_first_item() 219 os_memcpy(value, doc, end - doc); in xml_get_first_item()
|
/hostap-latest/src/eap_peer/ |
D | eap_gpsk.c | 144 const u8 *pos, const u8 *end) in eap_gpsk_process_id_server() argument 148 if (end - pos < 2) { in eap_gpsk_process_id_server() 154 if (end - pos < alen) { in eap_gpsk_process_id_server() 174 const u8 *pos, const u8 *end) in eap_gpsk_process_rand_server() argument 179 if (end - pos < EAP_GPSK_RAND_LEN) { in eap_gpsk_process_rand_server() 237 const u8 *pos, const u8 *end) in eap_gpsk_process_csuite_list() argument 244 if (end - pos < 2) { in eap_gpsk_process_csuite_list() 250 if (len > (size_t) (end - pos)) { in eap_gpsk_process_csuite_list() 279 const u8 *csuite_list, *pos, *end; in eap_gpsk_process_gpsk_1() local 289 end = payload + payload_len; in eap_gpsk_process_gpsk_1() [all …]
|
D | eap_teap_pac.c | 182 const char *end; member 200 if (rc->pos >= rc->end) in eap_teap_read_line() 203 while (l_end < rc->end && *l_end != '\n') in eap_teap_read_line() 276 rc->end = (char *) blob->data + blob->len; in eap_teap_init_pac_data() 319 struct eap_teap_pac *end = *pac_root; in eap_teap_parse_end() local 321 while (end->next) in eap_teap_parse_end() 322 end = end->next; in eap_teap_parse_end() 323 end->next = *pac; in eap_teap_parse_end() 484 char *end; in eap_teap_write() local 505 end = *buf + *buf_len; in eap_teap_write() [all …]
|
D | eap_fast_pac.c | 182 const char *end; member 199 if (rc->pos >= rc->end) in eap_fast_read_line() 202 while (l_end < rc->end && *l_end != '\n') in eap_fast_read_line() 274 rc->end = (char *) blob->data + blob->len; in eap_fast_init_pac_data() 317 struct eap_fast_pac *end = *pac_root; in eap_fast_parse_end() local 318 while (end->next) in eap_fast_parse_end() 319 end = end->next; in eap_fast_parse_end() 320 end->next = *pac; in eap_fast_parse_end() 483 char *end; in eap_fast_write() local 504 end = *buf + *buf_len; in eap_fast_write() [all …]
|
D | tncc.c | 688 char *buf, *start, *end, *pos, *pos2, *payload; in tncc_process_if_tnccs() local 702 end = os_strstr(buf, "</TNCCS-Batch>"); in tncc_process_if_tnccs() 703 if (start == NULL || end == NULL || start > end) { in tncc_process_if_tnccs() 711 *end = '\0'; in tncc_process_if_tnccs() 758 end = os_strstr(start, "</IMC-IMV-Message>"); in tncc_process_if_tnccs() 759 if (end == NULL) in tncc_process_if_tnccs() 761 *end = '\0'; in tncc_process_if_tnccs() 762 endpos = end; in tncc_process_if_tnccs() 763 end += 18; in tncc_process_if_tnccs() 767 start = end; in tncc_process_if_tnccs() [all …]
|
/hostap-latest/src/eap_server/ |
D | eap_sim_db.c | 247 char cmd[2000], *pos, *end; in db_add_reauth() local 256 end = pos + sizeof(cmd); in db_add_reauth() 257 pos += os_snprintf(pos, end - pos, "INSERT OR REPLACE INTO reauth " in db_add_reauth() 268 pos += os_snprintf(pos, end - pos, ", '"); in db_add_reauth() 269 pos += wpa_snprintf_hex(pos, end - pos, mk, EAP_SIM_MK_LEN); in db_add_reauth() 270 pos += os_snprintf(pos, end - pos, "'"); in db_add_reauth() 274 pos += os_snprintf(pos, end - pos, ", '"); in db_add_reauth() 275 pos += wpa_snprintf_hex(pos, end - pos, k_encr, in db_add_reauth() 277 pos += os_snprintf(pos, end - pos, "'"); in db_add_reauth() 281 pos += os_snprintf(pos, end - pos, ", '"); in db_add_reauth() [all …]
|