/hostap-latest/src/wps/ |
D | wps_attr_parse.c | 21 u8 id, u8 len, const u8 *pos) in wps_set_vendor_ext_wfa_subelem() argument 24 id, len); in wps_set_vendor_ext_wfa_subelem() 27 if (len != 1) { in wps_set_vendor_ext_wfa_subelem() 29 "%u", len); in wps_set_vendor_ext_wfa_subelem() 36 attr->authorized_macs_len = len; in wps_set_vendor_ext_wfa_subelem() 39 if (len != 1) { in wps_set_vendor_ext_wfa_subelem() 41 "Shareable length %u", len); in wps_set_vendor_ext_wfa_subelem() 47 if (len != 1) { in wps_set_vendor_ext_wfa_subelem() 49 "length %u", len); in wps_set_vendor_ext_wfa_subelem() 55 if (len != 1) { in wps_set_vendor_ext_wfa_subelem() [all …]
|
/hostap-latest/src/ap/ |
D | ctrl_iface_ap.c | 34 size_t len = curr_len; in hostapd_write_ht_mcs_bitmask() local 36 ret = os_snprintf(buf + len, buflen - len, in hostapd_write_ht_mcs_bitmask() 38 if (os_snprintf_error(buflen - len, ret)) in hostapd_write_ht_mcs_bitmask() 39 return len; in hostapd_write_ht_mcs_bitmask() 40 len += ret; in hostapd_write_ht_mcs_bitmask() 43 len += wpa_snprintf_hex(buf + len, buflen - len, mcs_set, 10); in hostapd_write_ht_mcs_bitmask() 45 ret = os_snprintf(buf + len, buflen - len, "\n"); in hostapd_write_ht_mcs_bitmask() 46 if (os_snprintf_error(buflen - len, ret)) in hostapd_write_ht_mcs_bitmask() 48 len += ret; in hostapd_write_ht_mcs_bitmask() 50 return len; in hostapd_write_ht_mcs_bitmask() [all …]
|
/hostap-latest/src/tls/ |
D | asn1.c | 17 .len = 6 22 .len = 9 27 .len = 6 32 .len = 7 37 .len = 5 42 .len = 5 47 .len = 10 52 .len = 10 57 .len = 10 62 .len = 9 [all …]
|
D | x509v3.c | 181 int x509_parse_algorithm_identifier(const u8 *buf, size_t len, in x509_parse_algorithm_identifier() argument 195 if (asn1_get_next(buf, len, &hdr) < 0 || !asn1_is_sequence(&hdr)) { in x509_parse_algorithm_identifier() 200 if (hdr.length > buf + len - hdr.payload) in x509_parse_algorithm_identifier() 216 static int x509_parse_public_key(const u8 *buf, size_t len, in x509_parse_public_key() argument 231 end = buf + len; in x509_parse_public_key() 285 int x509_parse_name(const u8 *buf, size_t len, struct x509_name *name, in x509_parse_name() argument 305 if (asn1_get_next(buf, len, &hdr) < 0 || !asn1_is_sequence(&hdr)) { in x509_parse_name() 312 if (hdr.length > buf + len - pos) in x509_parse_name() 371 if (oid.len == 4 && in x509_parse_name() 400 } else if (oid.len == 7 && in x509_parse_name() [all …]
|
D | tlsv1_cred.c | 46 const u8 *buf, size_t len) in tlsv1_add_cert_der() argument 51 cert = x509_certificate_parse(buf, len); in tlsv1_add_cert_der() 90 static const u8 * search_tag(const char *tag, const u8 *buf, size_t len) in search_tag() argument 95 if (len < plen) in search_tag() 98 for (i = 0; i < len - plen; i++) { in search_tag() 108 const u8 *buf, size_t len) in tlsv1_add_cert() argument 114 pos = search_tag(pem_cert_begin, buf, len); in tlsv1_add_cert() 118 return tlsv1_add_cert_der(chain, buf, len); in tlsv1_add_cert() 126 end = search_tag(pem_cert_end, pos, buf + len - pos); in tlsv1_add_cert() 150 pos = search_tag(pem_cert_begin, end, buf + len - end); in tlsv1_add_cert() [all …]
|
/hostap-latest/src/p2p/ |
D | p2p_parse.c | 36 static int p2p_parse_attribute(u8 id, const u8 *data, u16 len, in p2p_parse_attribute() argument 45 if (len < 2) { in p2p_parse_attribute() 47 "attribute (length %d)", len); in p2p_parse_attribute() 56 if (len < ETH_ALEN) { in p2p_parse_attribute() 58 "attribute (length %d)", len); in p2p_parse_attribute() 66 if (len < 1) { in p2p_parse_attribute() 68 "attribute (length %d)", len); in p2p_parse_attribute() 76 if (len < 1) { in p2p_parse_attribute() 78 "attribute (length %d)", len); in p2p_parse_attribute() 85 if (len == 0) { in p2p_parse_attribute() [all …]
|
/hostap-latest/src/utils/ |
D | wpa_debug_zephyr.c | 28 int len; in wpa_printf_impl() local 40 len = strlen(buffer); in wpa_printf_impl() 41 if (len > 0 && buffer[len - 1] == '\n') { in wpa_printf_impl() 42 buffer[len - 1] = '\0'; in wpa_printf_impl() 67 static void _wpa_hexdump(int level, const char *title, const u8 *buf, size_t len, int show) in _wpa_hexdump() argument 79 content = content_buf = os_malloc(3 * len + 1); in _wpa_hexdump() 86 for (i = 0; i < len; i++) { in _wpa_hexdump() 93 wpa_printf(level, "%s - hexdump(len=%lu):%s", title, (unsigned long)len, content); in _wpa_hexdump() 94 bin_clear_free(content_buf, 3 * len + 1); in _wpa_hexdump() 97 void wpa_hexdump_impl(int level, const char *title, const void *buf, size_t len) in wpa_hexdump_impl() argument [all …]
|
D | pcsc_funcs.c | 262 unsigned char *data, size_t len, 293 unsigned char type, len; in scard_parse_fsp_templ() local 296 len = pos[1]; in scard_parse_fsp_templ() 298 type, len); in scard_parse_fsp_templ() 301 if (len > (unsigned int) (end - pos)) in scard_parse_fsp_templ() 307 pos, len); in scard_parse_fsp_templ() 311 pos, len); in scard_parse_fsp_templ() 315 pos, len); in scard_parse_fsp_templ() 319 "information TLV", pos, len); in scard_parse_fsp_templ() 323 "Integer TLV", pos, len); in scard_parse_fsp_templ() [all …]
|
D | wpa_debug.c | 259 size_t len, int show, int only_syslog) in _wpa_hexdump() argument 267 level, title, (unsigned long) len); in _wpa_hexdump() 273 for (i = 0; i < len; i++) in _wpa_hexdump() 287 size_t slen = len; in _wpa_hexdump() 290 } else if (len == 0) { in _wpa_hexdump() 292 } else if (show && len) { in _wpa_hexdump() 315 title, (long unsigned int) len, display, in _wpa_hexdump() 316 len > slen ? " ..." : ""); in _wpa_hexdump() 328 } else if (len == 0) { in _wpa_hexdump() 330 } else if (show && len) { in _wpa_hexdump() [all …]
|
D | common.c | 171 int hexstr2bin(const char *hex, u8 *buf, size_t len) in hexstr2bin() argument 178 for (i = 0; i < len; i++) { in hexstr2bin() 189 int hwaddr_mask_txt(char *buf, size_t len, const u8 *addr, const u8 *mask) in hwaddr_mask_txt() argument 203 res = os_snprintf(buf, len, MACSTR "/" MACSTR, in hwaddr_mask_txt() 206 res = os_snprintf(buf, len, MACSTR, MAC2STR(addr)); in hwaddr_mask_txt() 207 if (os_snprintf_error(len, res)) in hwaddr_mask_txt() 222 void inc_byte_array(u8 *counter, size_t len) in inc_byte_array() argument 224 int pos = len - 1; in inc_byte_array() 234 void buf_shift_right(u8 *buf, size_t len, size_t bits) in buf_shift_right() argument 238 for (i = len - 1; i > 0; i--) in buf_shift_right() [all …]
|
D | wpabuf.c | 30 static void wpabuf_overflow(const struct wpabuf *buf, size_t len) in wpabuf_overflow() argument 41 (unsigned long) len); in wpabuf_overflow() 113 struct wpabuf * wpabuf_alloc(size_t len) in wpabuf_alloc() argument 117 sizeof(struct wpabuf) + len); in wpabuf_alloc() 124 struct wpabuf *buf = os_zalloc(sizeof(struct wpabuf) + len); in wpabuf_alloc() 129 buf->size = len; in wpabuf_alloc() 135 struct wpabuf * wpabuf_alloc_ext_data(u8 *data, size_t len) in wpabuf_alloc_ext_data() argument 151 buf->size = len; in wpabuf_alloc_ext_data() 152 buf->used = len; in wpabuf_alloc_ext_data() 160 struct wpabuf * wpabuf_alloc_copy(const void *data, size_t len) in wpabuf_alloc_copy() argument [all …]
|
D | base64.c | 26 static char * base64_gen_encode(const unsigned char *src, size_t len, in base64_gen_encode() argument 34 if (len >= SIZE_MAX / 4) in base64_gen_encode() 36 olen = len * 4 / 3 + 4; /* 3-byte blocks to 4-byte */ in base64_gen_encode() 40 if (olen < len) in base64_gen_encode() 46 end = src + len; in base64_gen_encode() 89 static unsigned char * base64_gen_decode(const char *src, size_t len, in base64_gen_decode() argument 103 for (i = 0; i < len; i++) { in base64_gen_decode() 118 for (i = 0; i < len + extra_pad; i++) { in base64_gen_decode() 121 if (i >= len) in base64_gen_decode() 170 char * hostap_base64_encode(const void *src, size_t len, size_t *out_len) in hostap_base64_encode() argument [all …]
|
/hostap-latest/src/drivers/ |
D | priv_netlink.h | 49 #define NLMSG_ALIGN(len) (((len) + NLMSG_ALIGNTO - 1) & ~(NLMSG_ALIGNTO - 1)) argument 51 #define NLMSG_LENGTH(len) ((len) + NLMSG_ALIGN(sizeof(struct nlmsghdr))) argument 52 #define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len)) argument 54 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \ argument 57 #define NLMSG_OK(nlh,len) ((len) >= (int) sizeof(struct nlmsghdr) && \ argument 59 (int) (nlh)->nlmsg_len <= (len)) 60 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) argument 63 #define RTA_ALIGN(len) (((len) + RTA_ALIGNTO - 1) & ~(RTA_ALIGNTO - 1)) argument 64 #define RTA_OK(rta,len) \ argument 65 ((len) > 0 && (rta)->rta_len >= sizeof(struct rtattr) && \ [all …]
|
/hostap-latest/wlantest/ |
D | process.c | 22 size_t len, int *to_ap) in rx_get_sta() argument 35 if (len < 24) in rx_get_sta() 49 if (len < 24) in rx_get_sta() 72 len >= 16) { in rx_get_sta() 91 size_t len, struct wlantest_sta *sta, int to_ap) in rx_update_ps() argument 143 size_t len, struct wlantest_sta *sta, int to_ap) in rx_duplicate() argument 154 (WLAN_FC_GET_STYPE(fc) & 0x08) && len >= 26) { in rx_duplicate() 200 static void rx_frame(struct wlantest *wt, const u8 *data, size_t len) in rx_frame() argument 207 wpa_hexdump(MSG_EXCESSIVE, "RX frame", data, len); in rx_frame() 208 if (len < 2) in rx_frame() [all …]
|
D | wired.c | 69 u32 src, const u8 *data, size_t len) in process_radius_access_request() argument 74 msg = radius_msg_parse(data, len); in process_radius_access_request() 105 const u8 *data, size_t len) in process_radius_access_accept() argument 119 msg = radius_msg_parse(data, len); in process_radius_access_accept() 168 u16 sport, const u8 *data, size_t len) in process_radius() argument 175 if (len < sizeof(*hdr)) in process_radius() 179 if (len < rlen) in process_radius() 181 if (len > rlen) in process_radius() 182 len = rlen; in process_radius() 194 process_radius_access_request(wt, dst, src, data, len); in process_radius() [all …]
|
/hostap-latest/src/eap_common/ |
D | eap_sake_common.c | 19 u8 attr_id, u8 len, const u8 *data) in eap_sake_parse_add_attr() argument 26 if (len != EAP_SAKE_RAND_LEN) { in eap_sake_parse_add_attr() 28 "invalid payload length %d", len); in eap_sake_parse_add_attr() 35 if (len != EAP_SAKE_RAND_LEN) { in eap_sake_parse_add_attr() 37 "invalid payload length %d", len); in eap_sake_parse_add_attr() 44 if (len != EAP_SAKE_MIC_LEN) { in eap_sake_parse_add_attr() 46 "invalid payload length %d", len); in eap_sake_parse_add_attr() 53 if (len != EAP_SAKE_MIC_LEN) { in eap_sake_parse_add_attr() 55 "invalid payload length %d", len); in eap_sake_parse_add_attr() 63 attr->serverid_len = len; in eap_sake_parse_add_attr() [all …]
|
D | eap_fast_common.c | 19 void eap_fast_put_tlv_hdr(struct wpabuf *buf, u16 type, u16 len) in eap_fast_put_tlv_hdr() argument 23 hdr.len = host_to_be16(len); in eap_fast_put_tlv_hdr() 29 u16 len) in eap_fast_put_tlv() argument 31 eap_fast_put_tlv_hdr(buf, type, len); in eap_fast_put_tlv() 32 wpabuf_put_data(buf, data, len); in eap_fast_put_tlv() 96 u8 * eap_fast_derive_key(void *ssl_ctx, struct tls_connection *conn, size_t len) in eap_fast_derive_key() argument 100 out = os_malloc(len); in eap_fast_derive_key() 104 if (tls_connection_get_eap_fast_key(ssl_ctx, conn, out, len)) { in eap_fast_derive_key() 149 int tlv_type, u8 *pos, size_t len) in eap_fast_parse_tlv() argument 154 pos, len); in eap_fast_parse_tlv() [all …]
|
/hostap-latest/src/crypto/ |
D | crypto_libtomcrypt.c | 25 int md4_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) in md4_vector() argument 32 md4_process(&md, addr[i], len[i]); in md4_vector() 60 int md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) in md5_vector() argument 67 md5_process(&md, addr[i], len[i]); in md5_vector() 73 int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) in sha1_vector() argument 80 sha1_process(&md, addr[i], len[i]); in sha1_vector() 86 void * aes_encrypt_init(const u8 *key, size_t len) in aes_encrypt_init() argument 92 if (aes_setup(key, len, 0, skey) != CRYPT_OK) { in aes_encrypt_init() 115 void * aes_decrypt_init(const u8 *key, size_t len) in aes_decrypt_init() argument 121 if (aes_setup(key, len, 0, skey) != CRYPT_OK) { in aes_decrypt_init() [all …]
|
D | crypto_internal.c | 143 void crypto_hash_update(struct crypto_hash *ctx, const u8 *data, size_t len) in crypto_hash_update() argument 151 MD5Update(&ctx->u.md5, data, len); in crypto_hash_update() 155 SHA1Update(&ctx->u.sha1, data, len); in crypto_hash_update() 160 sha256_process(&ctx->u.sha256, data, len); in crypto_hash_update() 165 sha384_process(&ctx->u.sha384, data, len); in crypto_hash_update() 170 sha512_process(&ctx->u.sha512, data, len); in crypto_hash_update() 179 int crypto_hash_finish(struct crypto_hash *ctx, u8 *mac, size_t *len) in crypto_hash_finish() argument 187 if (mac == NULL || len == NULL) { in crypto_hash_finish() 194 if (*len < 16) { in crypto_hash_finish() 195 *len = 16; in crypto_hash_finish() [all …]
|
D | crypto_mbedtls_alt.c | 172 static int wm_wrap_entropy_poll(void *data, unsigned char *output, size_t len, size_t *olen) in wm_wrap_entropy_poll() argument 175 os_get_random(output, len); in wm_wrap_entropy_poll() 176 *olen = len; in wm_wrap_entropy_poll() 242 size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac, mbedtls_md_type_t md_type) in md_vector() argument 245 return md_vector_psa(num_elem, addr, len, mac, md_type); in md_vector() 259 mbedtls_md_update(&ctx, addr[i], len[i]); in md_vector() 266 int sha512_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) in sha512_vector() argument 268 return md_vector(num_elem, addr, len, mac, MBEDTLS_MD_SHA512); in sha512_vector() 271 int sha384_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) in sha384_vector() argument 273 return md_vector(num_elem, addr, len, mac, MBEDTLS_MD_SHA384); in sha384_vector() [all …]
|
D | crypto_nettle.c | 52 const u8 *addr[], const size_t *len, u8 *mac) in nettle_digest_vector() argument 65 alg->update(ctx, len[i], addr[i]); in nettle_digest_vector() 72 int md4_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) in md4_vector() argument 74 return nettle_digest_vector(&nettle_md4, num_elem, addr, len, mac); in md4_vector() 78 int md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) in md5_vector() argument 80 return nettle_digest_vector(&nettle_md5, num_elem, addr, len, mac); in md5_vector() 84 int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) in sha1_vector() argument 86 return nettle_digest_vector(&nettle_sha1, num_elem, addr, len, mac); in sha1_vector() 90 int sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) in sha256_vector() argument 92 return nettle_digest_vector(&nettle_sha256, num_elem, addr, len, mac); in sha256_vector() [all …]
|
D | crypto_module_tests.c | 90 size_t len[3]; in test_siv() local 94 len[0] = sizeof(ad); in test_siv() 97 1, addr, len, out)) { in test_siv() 108 1, addr, len, out)) { in test_siv() 120 len[0] = sizeof(ad1_2); in test_siv() 122 len[1] = sizeof(ad2_2); in test_siv() 124 len[2] = sizeof(nonce_2); in test_siv() 128 3, addr, len, out)) { in test_siv() 139 3, addr, len, out)) { in test_siv() 228 size_t len[3]; in test_omac1_vector() local [all …]
|
/hostap-latest/src/radius/ |
D | radius_das.c | 61 size_t len; in radius_das_disconnect() local 79 &buf, &len, NULL) == 0) { in radius_das_disconnect() 80 if (len != 4) { in radius_das_disconnect() 91 &buf, &len, NULL) == 0) { in radius_das_disconnect() 92 if (len != 16) { in radius_das_disconnect() 103 &buf, &len, NULL) == 0) { in radius_das_disconnect() 105 attrs.nas_identifier_len = len; in radius_das_disconnect() 109 &buf, &len, NULL) == 0) { in radius_das_disconnect() 110 if (len >= sizeof(tmp)) in radius_das_disconnect() 111 len = sizeof(tmp) - 1; in radius_das_disconnect() [all …]
|
D | radius.c | 320 int len; in radius_msg_dump_attr() local 344 len = ext->length - sizeof(struct radius_attr_hdr_ext); in radius_msg_dump_attr() 351 len = hdr->length - sizeof(struct radius_attr_hdr); in radius_msg_dump_attr() 359 printf_encode(buf, sizeof(buf), pos, len); in radius_msg_dump_attr() 364 if (len == 4) { in radius_msg_dump_attr() 371 len); in radius_msg_dump_attr() 377 if (len == 16) { in radius_msg_dump_attr() 385 len); in radius_msg_dump_attr() 392 wpa_snprintf_hex(buf, sizeof(buf), pos, len); in radius_msg_dump_attr() 397 if (len == 4) in radius_msg_dump_attr() [all …]
|
/hostap-latest/wpa_supplicant/ |
D | wifi_display.c | 42 size_t len; in wifi_display_get_wfd_ie() local 48 len = 0; in wifi_display_get_wfd_ie() 51 len += wpabuf_len(global->wfd_subelem[i]); in wifi_display_get_wfd_ie() 54 ie = wpabuf_alloc(len); in wifi_display_get_wfd_ie() 70 size_t len, plen; in wifi_display_update_wfd_ie() local 135 len = 0; in wifi_display_update_wfd_ie() 137 len += wpabuf_len(global->wfd_subelem[ in wifi_display_update_wfd_ie() 141 len += wpabuf_len(global->wfd_subelem[ in wifi_display_update_wfd_ie() 145 len += wpabuf_len(global->wfd_subelem[ in wifi_display_update_wfd_ie() 148 len += wpabuf_len(global->wfd_subelem[ in wifi_display_update_wfd_ie() [all …]
|