input
stringlengths
16
454k
output
stringlengths
13
350k
function_name
stringlengths
1
100
repo_name
stringlengths
6
43
category
stringclasses
76 values
sample_id
stringlengths
22
88
decompiler
stringclasses
1 value
opt_level
stringclasses
1 value
int sha256_vector(size_t num_elem, const u8 **addr, const size_t *len, u8 *mac) { const EVP_MD *v4; v4 = (const EVP_MD *)EVP_sha256(num_elem, addr); return openssl_digest_vector(v4, num_elem, addr, len, mac); }
int sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) { return openssl_digest_vector(EVP_sha256(), num_elem, addr, len, mac); }
sha256_vector
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int sha384_prf(const u8 *key, size_t key_len, const char *label, const u8 *data, size_t data_len, u8 *buf, size_t buf_len) { return sha384_prf_bits(key, key_len, label, data, data_len, buf, 8 * buf_len); }
int sha384_prf(const u8 *key, size_t key_len, const char *label, const u8 *data, size_t data_len, u8 *buf, size_t buf_len) { return sha384_prf_bits(key, key_len, label, data, data_len, buf, buf_len * 8); }
sha384_prf
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int sha384_prf_bits(const u8 *key, size_t key_len, const char *label, const u8 *data, size_t data_len, u8 *buf, size_t buf_len_bits) { u16 counter; size_t pos; size_t buf_len; const u8 *addr[4]; size_t len[5]; u8 counter_le[2]; u8 length_le[2]; u8 hash[56]; unsi...
int sha384_prf_bits(const u8 *key, size_t key_len, const char *label, const u8 *data, size_t data_len, u8 *buf, size_t buf_len_bits) { u16 counter = 1; size_t pos, plen; u8 hash[SHA384_MAC_LEN]; const u8 *addr[4]; size_t len[4]; u8 counter_le[2], length_le[2]; size_...
sha384_prf_bits
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int sha512_prf(const u8 *key, size_t key_len, const char *label, const u8 *data, size_t data_len, u8 *buf, size_t buf_len) { return sha512_prf_bits(key, key_len, label, data, data_len, buf, 8 * buf_len); }
int sha512_prf(const u8 *key, size_t key_len, const char *label, const u8 *data, size_t data_len, u8 *buf, size_t buf_len) { return sha512_prf_bits(key, key_len, label, data, data_len, buf, buf_len * 8); }
sha512_prf
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int sha512_prf_bits(const u8 *key, size_t key_len, const char *label, const u8 *data, size_t data_len, u8 *buf, size_t buf_len_bits) { u16 counter; size_t pos; size_t buf_len; const u8 *addr[4]; size_t len[5]; u8 counter_le[2]; u8 length_le[2]; u8 hash[72]; unsi...
int sha512_prf_bits(const u8 *key, size_t key_len, const char *label, const u8 *data, size_t data_len, u8 *buf, size_t buf_len_bits) { u16 counter = 1; size_t pos, plen; u8 hash[SHA512_MAC_LEN]; const u8 *addr[4]; size_t len[4]; u8 counter_le[2], length_le[2]; size_...
sha512_prf_bits
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void show_version() { fprintf(stderr, "hostapd v%s\n" "User space daemon for IEEE 802.11 AP management,\n" "IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator\n" "Copyright (c) 2002-2022, Jouni Malinen <j@w1.fi> and contributors\n", "2.10"); }
static void show_version(void) { fprintf(stderr, "hostapd v%s\n" "User space daemon for IEEE 802.11 AP management,\n" "IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator\n" "Copyright (c) 2002-2022, Jouni Malinen <j@w1.fi> " "and contributors\n", VERSION_STR); }
show_version
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
char *sim_get_username(const u8 *identity, size_t identity_len) { size_t pos; if (!identity) return 0; for (pos = 0; pos < identity_len && identity[pos] != 64 && identity[pos]; ++pos) ; return dup_binstr(identity, pos); }
char *sim_get_username(const u8 *identity, size_t identity_len) { size_t pos; if (identity == NULL) return NULL; for (pos = 0; pos < identity_len; pos++) { if (identity[pos] == '@' || identity[pos] == '\0') break; } return dup_binstr(identity, pos); }
sim_get_username
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int sockaddr_compare(sockaddr_storage *a, socklen_t a_len, sockaddr_storage *b, socklen_t b_len) { if (a->ss_family != b->ss_family) return 1; if (a->ss_family != 1) return 1; return a_len != b_len || memcmp(a->__ss_padding, b->__ss_padding, a_len - 2LL); }
static int sockaddr_compare(struct sockaddr_storage *a, socklen_t a_len, struct sockaddr_storage *b, socklen_t b_len) { if (a->ss_family != b->ss_family) return 1; switch (a->ss_family) { #ifdef CONFIG_CTRL_IFACE_UDP case AF_INET: { struct sockaddr_in *in_a, *in_b; in_a =...
sockaddr_compare
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void sockaddr_print(int level, const char *msg, sockaddr_storage *sock, socklen_t socklen) { char addr_txt[200]; unsigned long v5; v5 = __readfsqword(0x28u); if (sock->ss_family == 1) { printf_encode(addr_txt, 0xC8u, (const u8 *)sock->__ss_padding, socklen - 2LL); ...
void sockaddr_print(int level, const char *msg, struct sockaddr_storage *sock, socklen_t socklen) { switch (sock->ss_family) { #ifdef CONFIG_CTRL_IFACE_UDP case AF_INET: case AF_INET6: { char host[NI_MAXHOST] = {0}; char service[NI_MAXSERV] = {0}; getnameinfo((struct sockaddr *)so...
sockaddr_print
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void srv_log(radius_session *sess, const char *fmt, ...) { long v2; long v3; long v4; long v5; int buflen; char *buf; va_list ap; unsigned long v9; long v10; long v11; long v12; long v13; va_start(ap, fmt); v2 = va_arg(ap, _QWORD); v3 = va_arg(ap, _QWORD); v4 = va_arg(ap, _QWORD); v5 ...
void srv_log(struct radius_session *sess, const char *fmt, ...) { va_list ap; char *buf; int buflen; va_start(ap, fmt); buflen = vsnprintf(NULL, 0, fmt, ap) + 1; va_end(ap); buf = os_malloc(buflen); if (buf == NULL) return; va_start(ap, fmt); vsnprintf(buf, buflen, fmt, ap); va_end(ap); R...
srv_log
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void ssdp_listener_handler(int sd, void *eloop_ctx, void *sock_ctx) { int v3; char *v4; socklen_t addr_len; int nread; upnp_wps_device_sm *sm; char *pos; sockaddr_in addr; char buf[1608]; unsigned long v11; v11 = __readfsqword(0x28u); sm = (upnp_wps_device_sm *)sock_ctx; addr_len = 16; nread ...
static void ssdp_listener_handler(int sd, void *eloop_ctx, void *sock_ctx) { struct upnp_wps_device_sm *sm = sock_ctx; struct sockaddr_in addr; socklen_t addr_len; int nread; char buf[MULTICAST_MAX_READ], *pos; addr_len = sizeof(addr); nread = recvfrom(sm->ssdp_sd, buf, sizeof(buf) - 1, 0, ...
ssdp_listener_handler
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int ssdp_listener_open() { unsigned char ttl; int on; int sd; ip_mreq mcast_addr; sockaddr_in addr; unsigned long v6; v6 = __readfsqword(0x28u); on = 1; ttl = 4; sd = socket(2, 2, 0); if (sd >= 0 && !fcntl(sd, 4, 2048) && !setsockopt(sd, 1, 2, &on, 4u)) { memset(&addr, 0, sizeof(addr)); a...
int ssdp_listener_open(void) { struct sockaddr_in addr; struct ip_mreq mcast_addr; int on = 1; unsigned char ttl = 4; int sd; sd = socket(AF_INET, SOCK_DGRAM, 0); if (sd < 0 || fcntl(sd, F_SETFL, O_NONBLOCK) != 0 || setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on))) goto fail; os_mem...
ssdp_listener_open
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int ssdp_listener_start(upnp_wps_device_sm *sm) { sm->ssdp_sd = ssdp_listener_open(); if (eloop_register_sock(sm->ssdp_sd, EVENT_TYPE_READ, (eloop_sock_handler)ssdp_listener_handler, 0, sm)) { wpa_printf(5, "WPS UPnP: ssdp_listener_start failed"); ssdp_listener_stop(sm); return...
int ssdp_listener_start(struct upnp_wps_device_sm *sm) { sm->ssdp_sd = ssdp_listener_open(); if (eloop_register_sock(sm->ssdp_sd, EVENT_TYPE_READ, ssdp_listener_handler, NULL, sm)) goto fail; sm->ssdp_sd_registered = 1; return 0; fail: wpa_printf(MSG_ERROR, "WPS UPnP: ssdp_lis...
ssdp_listener_start
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void ssdp_listener_stop(upnp_wps_device_sm *sm) { if (sm->ssdp_sd_registered) { eloop_unregister_sock(sm->ssdp_sd, EVENT_TYPE_READ); sm->ssdp_sd_registered = 0; } if (sm->ssdp_sd != -1) { close(sm->ssdp_sd); sm->ssdp_sd = -1; } eloop_cancel_timeout( (eloop_timeout_handler)msearchreply_st...
void ssdp_listener_stop(struct upnp_wps_device_sm *sm) { if (sm->ssdp_sd_registered) { eloop_unregister_sock(sm->ssdp_sd, EVENT_TYPE_READ); sm->ssdp_sd_registered = 0; } if (sm->ssdp_sd != -1) { close(sm->ssdp_sd); sm->ssdp_sd = -1; } eloop_cancel_timeout(msearchreply_state_machine_handler, ...
ssdp_listener_stop
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int ssdp_open_multicast(upnp_wps_device_sm *sm) { sm->multicast_sd = ssdp_open_multicast_sock(sm->ip_addr, 0); if (sm->multicast_sd >= 0) return 0; else return -1; }
int ssdp_open_multicast(struct upnp_wps_device_sm *sm) { sm->multicast_sd = ssdp_open_multicast_sock(sm->ip_addr, NULL); if (sm->multicast_sd < 0) return -1; return 0; }
ssdp_open_multicast
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int ssdp_open_multicast_sock(u32 ip_addr, const char *forced_ifname) { int *v3; char *v4; int *v5; char *v6; int *v7; int *v8; char *v9; int *v10; u32 ip_addra[3]; unsigned char ttl; int sd; ifreq req; unsigned long v15; ip_addra[0] = ip_addr; v15 = __readfsqword(0x28u); ttl = 4; sd =...
int ssdp_open_multicast_sock(u32 ip_addr, const char *forced_ifname) { int sd; unsigned char ttl = 4; sd = socket(AF_INET, SOCK_DGRAM, 0); if (sd < 0) return -1; if (forced_ifname) { #ifdef __linux__ struct ifreq req; os_memset(&req, 0, sizeof(req)); os_strlcpy(req.ifr_name, forced_ifname, ...
ssdp_open_multicast_sock
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void ssdp_parse_msearch(upnp_wps_device_sm *sm, sockaddr_in *client, const char *data) { dl_list *next; const char *dataa; const char *datab; const char *datac; const char *datad; int got_host; int got_st; int st_match; int got_man; int got_mx; int mx; char uuid_string[88...
static void ssdp_parse_msearch(struct upnp_wps_device_sm *sm, struct sockaddr_in *client, const char *data) { #ifndef CONFIG_NO_STDOUT_DEBUG const char *start = data; #endif int got_host = 0; int got_st = 0, st_match = 0; int got_man = 0; int got_mx = 0; int mx = 0; data +=...
ssdp_parse_msearch
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
ssid_match_result ssid_match(hostapd_data *hapd, const u8 *ssid, size_t ssid_len, const u8 *ssid_list, size_t ssid_list_len, const u8 *short_ssid_list, size_t short_ssid_list_len) { u32 short_ssid; _BOOL4 wildcard; const u8 *po...
static enum ssid_match_result ssid_match(struct hostapd_data *hapd, const u8 *ssid, size_t ssid_len, const u8 *ssid_list, size_t ssid_list_len, const u8 *short_ssid_list, size_t short_ssid_list_len) { const u8 *pos, *end; struct hostapd_iface *iface = hapd->iface; int wildcard = 0; size_t ...
ssid_match
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void ssl_info_cb(const SSL *ssl, int where, int ret) { const char *v3; const char *v4; const char *v5; const char *v6; const char *v7; const char *v8; const char *str; tls_connection *conn; tls_context *context; tls_event_data_0 ev; unsigned long v14; v14 = __readfsqword(0x28u); wpa_printf(2,...
static void ssl_info_cb(const SSL *ssl, int where, int ret) { const char *str; int w; wpa_printf(MSG_DEBUG, "SSL: (where=0x%x ret=0x%x)", where, ret); w = where & ~SSL_ST_MASK; if (w & SSL_ST_CONNECT) str = "SSL_connect"; else if (w & SSL_ST_ACCEPT) str = "SSL_accept"; else str = "undefined";...
ssl_info_cb
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
crypto_ec_point *sswu(crypto_ec *ec, int group, const crypto_bignum *u) { unsigned int is_zero; int v5; int is_one; int z_int; unsigned int m_is_zero; unsigned int is_qr; unsigned int is_eq; crypto_bignum *y; crypto_bignum *x1; crypto_bignum *v; crypto_ec_point *p; const crypto_bignum *prime; ...
static struct crypto_ec_point *sswu(struct crypto_ec *ec, int group, const struct crypto_bignum *u) { int z_int; const struct crypto_bignum *a, *b, *prime; struct crypto_bignum *u2, *t1, *t2, *z, *t, *zero, *one, *two, *three, *x1a, *x1b, *y = NULL; struct crypto_bignum...
sswu
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int sswu_curve_param(int group, int *z) { int result; switch (group) { case 19: *z = -10; result = 0; break; case 20: *z = -12; result = 0; break; case 21: *z = -4; result = 0; break; case 25: case 29: *z = -5; result = 0; break; case 26: *z = 31; ...
static int sswu_curve_param(int group, int *z) { switch (group) { case 19: *z = -10; return 0; case 20: *z = -12; return 0; case 21: *z = -4; return 0; case 25: case 29: *z = -5; return 0; case 26: *z = 31; return 0; case 28: *z = -2; return 0; case 30: ...
sswu_curve_param
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
u32 sta_flags_nl80211(int flags) { u32 f; f = 0; if ((flags & 1) != 0) f = 2; if ((flags & 2) != 0) f |= 8u; if ((flags & 4) != 0) f |= 4u; if ((flags & 8) != 0) f |= 0x10u; if ((flags & 0x10) != 0) f |= 0x40u; if ((flags & 0x20) != 0) f |= 0x20u; if ((flags & 0x40) != 0) ...
static u32 sta_flags_nl80211(int flags) { u32 f = 0; if (flags & WPA_STA_AUTHORIZED) f |= BIT(NL80211_STA_FLAG_AUTHORIZED); if (flags & WPA_STA_WMM) f |= BIT(NL80211_STA_FLAG_WME); if (flags & WPA_STA_SHORT_PREAMBLE) f |= BIT(NL80211_STA_FLAG_SHORT_PREAMBLE); if (flags & WPA_STA_MFP) f |= BIT...
sta_flags_nl80211
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int sta_has_ip6addr(sta_info *sta, in6_addr *addr) { ip6addr *ip6addr; for (ip6addr = (ip6addr *)&sta->ip6addr.next[-1]; &ip6addr->list != &sta->ip6addr; ip6addr = (ip6addr *)&ip6addr->list.next[-1]) { if (ip6addr->addr.__u6_addr32[0] == addr->__u6_addr32[0] && ip6addr->addr.__u6_addr32[1...
static int sta_has_ip6addr(struct sta_info *sta, struct in6_addr *addr) { struct ip6addr *ip6addr; dl_list_for_each(ip6addr, &sta->ip6addr, struct ip6addr, list) { if (ip6addr->addr.s6_addr32[0] == addr->s6_addr32[0] && ip6addr->addr.s6_addr32[1] == addr->s6_addr32[1] && ip6addr->addr.s6_addr32...
sta_has_ip6addr
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int sta_ip6addr_add(sta_info *sta, in6_addr *addr) { dl_list *v3; dl_list *ip6addr; ip6addr = (dl_list *)os_zalloc(0x20u); if (!ip6addr) return -1; v3 = *(dl_list **)&addr->__u6_addr32[2]; ip6addr->next = *(dl_list **)addr->__u6_addr8; ip6addr->prev = v3; dl_list_add_tail_9(&sta->ip6addr, ip6addr +...
static int sta_ip6addr_add(struct sta_info *sta, struct in6_addr *addr) { struct ip6addr *ip6addr; ip6addr = os_zalloc(sizeof(*ip6addr)); if (!ip6addr) return -1; os_memcpy(&ip6addr->addr, addr, sizeof(*addr)); dl_list_add_tail(&sta->ip6addr, &ip6addr->list); return 0; }
sta_ip6addr_add
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void sta_ip6addr_del(hostapd_data *hapd, sta_info *sta) { ip6addr *ip6addr; ip6addr *prev; ip6addr = (ip6addr *)&sta->ip6addr.next[-1]; prev = (ip6addr *)&sta->ip6addr.next->next[-1]; while (&ip6addr->list != &sta->ip6addr) { hostapd_drv_br_delete_ip_neigh_2(hapd, 6u, ip6addr->addr.__u6_addr8); free(...
void sta_ip6addr_del(struct hostapd_data *hapd, struct sta_info *sta) { struct ip6addr *ip6addr, *prev; dl_list_for_each_safe(ip6addr, prev, &sta->ip6addr, struct ip6addr, list) { hostapd_drv_br_delete_ip_neigh(hapd, 6, (u8 *)&ip6addr->addr); os_free(ip6addr); } }
sta_ip6addr_del
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void sta_track_add(hostapd_iface *iface, const u8 *addr, int ssi_signal) { hostapd_sta_info *info; hostapd_sta_info *infoa; info = sta_track_get(iface, addr); if (info) { dl_list_del_4(&info->list); dl_list_add_tail_1(&iface->sta_seen, &info->list); os_get_reltime(&info->last_seen); info->ssi_s...
void sta_track_add(struct hostapd_iface *iface, const u8 *addr, int ssi_signal) { struct hostapd_sta_info *info; info = sta_track_get(iface, addr); if (info) { dl_list_del(&info->list); dl_list_add_tail(&iface->sta_seen, &info->list); os_get_reltime(&info->last_seen); info->ss...
sta_track_add
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void sta_track_deinit(hostapd_iface *iface) { dl_list *v1; hostapd_sta_info *info; if (iface->num_sta_seen) { while (1) { v1 = dl_list_empty(&iface->sta_seen) ? 0LL : iface->sta_seen.next; info = (hostapd_sta_info *)v1; if (!v1) break; dl_list_del(v1); --iface->num_sta_s...
static void sta_track_deinit(struct hostapd_iface *iface) { struct hostapd_sta_info *info; if (!iface->num_sta_seen) return; while ( (info = dl_list_first(&iface->sta_seen, struct hostapd_sta_info, list))) { dl_list_del(&info->list); iface->num_sta_seen--; sta_track_del(info); } }
sta_track_deinit
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void sta_track_del(hostapd_sta_info *info) { free(info); }
void sta_track_del(struct hostapd_sta_info *info) { #ifdef CONFIG_TAXONOMY wpabuf_free(info->probe_ie_taxonomy); info->probe_ie_taxonomy = NULL; #endif os_free(info); }
sta_track_del
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void sta_track_expire(hostapd_iface *iface, int force) { dl_list *v2; hostapd_sta_info *info; os_reltime now; unsigned long v6; v6 = __readfsqword(0x28u); if (iface->num_sta_seen) { os_get_reltime(&now); while (1) { v2 = dl_list_empty_3(&iface->sta_seen) ? 0LL : iface->sta_seen.next; in...
void sta_track_expire(struct hostapd_iface *iface, int force) { struct os_reltime now; struct hostapd_sta_info *info; if (!iface->num_sta_seen) return; os_get_reltime(&now); while ( (info = dl_list_first(&iface->sta_seen, struct hostapd_sta_info, list))) { if (!force && !os_reltime_expired(&no...
sta_track_expire
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
hostapd_sta_info *sta_track_get(hostapd_iface *iface, const u8 *addr) { hostapd_sta_info *info; for (info = (hostapd_sta_info *)iface->sta_seen.next; info != (hostapd_sta_info *)&iface->sta_seen; info = (hostapd_sta_info *)info->list.next) { if (!memcmp(addr, info->addr, 6u)) return info; ...
static struct hostapd_sta_info *sta_track_get(struct hostapd_iface *iface, const u8 *addr) { struct hostapd_sta_info *info; dl_list_for_each(info, &iface->sta_seen, struct hostapd_sta_info, list) if (os_memcmp(addr, info->addr, ETH_ALEN) == ...
sta_track_get
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
hostapd_data *sta_track_seen_on(hostapd_iface *iface, const u8 *addr, const char *ifname) { hostapd_iface *ifacea; size_t i; size_t j; hostapd_data *hapd; hapd_interfaces *interfaces; interfaces = iface->interfaces; for (i = 0; i < interfaces->count; ++i) { hapd = 0; ...
struct hostapd_data *sta_track_seen_on(struct hostapd_iface *iface, const u8 *addr, const char *ifname) { struct hapd_interfaces *interfaces = iface->interfaces; size_t i, j; for (i = 0; i < interfaces->count; i++) { struct hostapd_data *hapd = NULL; iface = interf...
sta_track_seen_on
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int start_ctrl_iface(hostapd_iface *iface) { size_t i; hostapd_data *hapd; if (!iface->interfaces || !iface->interfaces->ctrl_iface_init) return 0; for (i = 0; i < iface->num_bss; ++i) { hapd = iface->bss[i]; if (iface->interfaces->ctrl_iface_init(hapd)) { wpa_printf(5, "Failed to setup contr...
static int start_ctrl_iface(struct hostapd_iface *iface) { size_t i; if (!iface->interfaces || !iface->interfaces->ctrl_iface_init) return 0; for (i = 0; i < iface->num_bss; i++) { struct hostapd_data *hapd = iface->bss[i]; if (iface->interfaces->ctrl_iface_init(hapd)) { wpa_printf(MSG_ERROR, ...
start_ctrl_iface
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int start_ctrl_iface_bss(hostapd_data *hapd) { if (!hapd->iface->interfaces || !hapd->iface->interfaces->ctrl_iface_init) return 0; if (!hapd->iface->interfaces->ctrl_iface_init(hapd)) return 0; wpa_printf(5, "Failed to setup control interface for %s", hapd->conf->iface); return -1; }
static int start_ctrl_iface_bss(struct hostapd_data *hapd) { if (!hapd->iface->interfaces || !hapd->iface->interfaces->ctrl_iface_init) return 0; if (hapd->iface->interfaces->ctrl_iface_init(hapd)) { wpa_printf(MSG_ERROR, "Failed to setup control interface for %s", hapd->conf->iface); re...
start_ctrl_iface_bss
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const char *status2str(u16 status) { const char *result; switch (status) { case 0u: result = "SUCCESS"; break; case 1u: result = "UNSPECIFIED_FAILURE"; break; case 2u: result = "TDLS_WAKEUP_ALTERNATE"; break; case 3u: result = "TDLS_WAKEUP_REJECT"; break; case 5u: resu...
const char *status2str(u16 status) { #define S2S(s) \ case WLAN_STATUS_##s: \ return #s; switch (status) { S2S(SUCCESS) S2S(UNSPECIFIED_FAILURE) S2S(TDLS_WAKEUP_ALTERNATE) S2S(T...
status2str
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void subscr_addr_add_url(subscription *s, const char *url, size_t url_len) { char *v3; const char *v4; size_t v5; char *v6; char *v7; sockaddr *ai_addr; sockaddr_in *p_saddr; long v10; uint16_t port; int rerr; int alloc_len; addrinfo *result; char *scratch_mem; char *mem; char *path; add...
static void subscr_addr_add_url(struct subscription *s, const char *url, size_t url_len) { int alloc_len; char *scratch_mem = NULL; char *mem; char *host; char *delim; char *path; int port = 80; struct addrinfo hints; struct addrinfo *result = NULL; struct addrinfo *r...
subscr_addr_add_url
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void subscr_addr_delete(subscr_addr *a) { free(a); }
void subscr_addr_delete(struct subscr_addr *a) { os_free(a); }
subscr_addr_delete
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void subscr_addr_free_all(subscription *s) { subscr_addr *a; subscr_addr *tmp; a = (subscr_addr *)s->addr_list.next; tmp = (subscr_addr *)a->list.next; while (a != (subscr_addr *)&s->addr_list) { dl_list_del_12(&a->list); subscr_addr_delete(a); a = tmp; tmp = (subscr_addr *)tmp->list.next; ...
static void subscr_addr_free_all(struct subscription *s) { struct subscr_addr *a, *tmp; dl_list_for_each_safe(a, tmp, &s->addr_list, struct subscr_addr, list) { dl_list_del(&a->list); subscr_addr_delete(a); } }
subscr_addr_free_all
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void subscr_addr_list_create(subscription *s, const char *url_list) { const char *url_lista; const char *url_listb; char *end; url_lista = url_list; wpa_printf(2, "WPS UPnP: Parsing URL list '%s'", url_list); while (1) { while (*url_lista == 32 || *url_lista == 9) ++url_lista; if (*url_lista ...
static void subscr_addr_list_create(struct subscription *s, const char *url_list) { const char *end; wpa_printf(MSG_DEBUG, "WPS UPnP: Parsing URL list '%s'", url_list); for (;;) { while (*url_list == ' ' || *url_list == '\t') url_list++; if (*url_list != '<') ...
subscr_addr_list_create
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void subscription_destroy(subscription *s) { upnp_wps_device_sm *iface; wpa_printf(2, "WPS UPnP: Destroy subscription %p", s); subscr_addr_free_all(s); wps_upnp_event_delete_all(s); for (iface = (upnp_wps_device_sm *)s->sm->interfaces.next; iface != s->sm; iface = (upnp_wps_device_sm *)iface->interfac...
void subscription_destroy(struct subscription *s) { struct upnp_wps_device_interface *iface; wpa_printf(MSG_DEBUG, "WPS UPnP: Destroy subscription %p", s); subscr_addr_free_all(s); wps_upnp_event_delete_all(s); dl_list_for_each(iface, &s->sm->interfaces, struct upnp_wps_device_interface, li...
subscription_destroy
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
subscription *subscription_find(upnp_wps_device_sm *sm, const u8 *uuid) { subscription *s; for (s = (subscription *)sm->subscriptions.next; s != (subscription *)&sm->subscriptions; s = (subscription *)s->list.next) { if (!memcmp(s->uuid, uuid, 0x10u)) return s; } return 0; }
struct subscription *subscription_find(struct upnp_wps_device_sm *sm, const u8 uuid[UUID_LEN]) { struct subscription *s; dl_list_for_each(s, &sm->subscriptions, struct subscription, list) { if (os_memcmp(s->uuid, uuid, UUID_LEN) == 0) return s; } return NULL; }
subscription_find
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int subscription_first_event(subscription *s) { size_t v1; const void *v2; upnp_wps_device_sm *sm; size_t v4; int ret; char *wlan_event; wpabuf *msg; wpabuf *buf; char txt[10]; unsigned long v11; v11 = __readfsqword(0x28u); if (!s->sm->wlanevent) { wpa_printf(2, "WPS UPnP: Use a fake WSC_AC...
static int subscription_first_event(struct subscription *s) { char *wlan_event; struct wpabuf *buf; int ap_status = 1; const char *head = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" "<e:propertyset xmlns:e=\"urn:schemas-upnp-org:event-1-0\">\n"; const char *tail = "</e:propertyset>\n"; char ...
subscription_first_event
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void subscription_list_age(upnp_wps_device_sm *sm, time_t now) { subscription *s; subscription *tmp; s = (subscription *)sm->subscriptions.next; tmp = (subscription *)s->list.next; while (s != (subscription *)&sm->subscriptions && now >= s->timeout_time) { wpa_printf(2, "WPS UPnP: Removing aged subscript...
static void subscription_list_age(struct upnp_wps_device_sm *sm, time_t now) { struct subscription *s, *tmp; dl_list_for_each_safe(s, tmp, &sm->subscriptions, struct subscription, list) { if (s->timeout_time > now) break; wpa_printf(MSG_DEBUG, "WPS UPnP: Removing aged subscription"); dl_list_del(&...
subscription_list_age
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
subscription *subscription_renew(upnp_wps_device_sm *sm, const u8 *uuid) { time_t expire; subscription *s; expire = time(0) + 1801; s = subscription_find(sm, uuid); if (!s) return 0; wpa_printf(2, "WPS UPnP: Subscription renewed"); dl_list_del_12(&s->list); s->timeout_time = expire; dl_list_add_t...
struct subscription *subscription_renew(struct upnp_wps_device_sm *sm, const u8 uuid[UUID_LEN]) { time_t now = time(NULL); time_t expire = now + UPNP_SUBSCRIBE_SEC; struct subscription *s = subscription_find(sm, uuid); if (s == NULL) return NULL; wpa_printf(MSG_DEBU...
subscription_renew
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
subscription *subscription_start(upnp_wps_device_sm *sm, const char *callback_urls) { dl_list *v2; time_t now; subscription *s; subscription *sa; char str[88]; unsigned long v8; v8 = __readfsqword(0x28u); now = time(0); subscription_list_age(sm, now); if (dl_list_le...
struct subscription *subscription_start(struct upnp_wps_device_sm *sm, const char *callback_urls) { struct subscription *s; time_t now = time(NULL); time_t expire = now + UPNP_SUBSCRIBE_SEC; char str[80]; subscription_list_age(sm, now); if (dl_list_len(&sm->subscrip...
subscription_start
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int suiteb_cert_cb(SSL *ssl, void *arg) { if ((*((_DWORD *)arg + 43) & 0x800) == 0) return 1; if (*((_WORD *)arg + 136) != 159) return 1; if (*((int *)arg + 69) > 3071) return 1; wpa_printf(2, "OpenSSL: Server DH prime length (%d bits) not sufficient for " "Suite B RSA - re...
static int suiteb_cert_cb(SSL *ssl, void *arg) { struct tls_connection *conn = arg; if (!(conn->flags & TLS_CONN_SUITEB)) return 1; if (conn->cipher_suite != 0x9f) return 1; if (conn->server_dh_prime_len >= 3072) return 1; wpa_printf(MSG_DEBUG, "OpenSSL: Server DH prime length (%d...
suiteb_cert_cb
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int supp_rates_11b_only(ieee802_11_elems *elems) { int num_11b; int num_others; int i; int ia; num_11b = 0; num_others = 0; if (!elems->supp_rates && !elems->ext_supp_rates) return 0; for (i = 0; elems->supp_rates && i < elems->supp_rates_len; ++i) { if (is_11b(elems->supp_rates[i])) ++nu...
int supp_rates_11b_only(struct ieee802_11_elems *elems) { int num_11b = 0, num_others = 0; int i; if (elems->supp_rates == NULL && elems->ext_supp_rates == NULL) return 0; for (i = 0; elems->supp_rates && i < elems->supp_rates_len; i++) { if (is_11b(elems->supp_rates[i])) num_11b++; else ...
supp_rates_11b_only
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int supported_proposal(const u8 *pos) { if (*pos == 5 && pos[1] == 1 && pos[2] == 2 && pos[3] == 2) return 1; if (*pos == 4 && pos[1] == 1 && pos[2] == 2 && pos[3] == 2) return 1; if (*pos == 3 && pos[1] == 1 && pos[2] == 2 && pos[3] == 2) return 1; return *pos == 3 && pos[1] == 1 && pos[2] == 1 && ...
static int supported_proposal(const u8 *pos) { if (pos[0] == EAP_EKE_DHGROUP_EKE_16 && pos[1] == EAP_EKE_ENCR_AES128_CBC && pos[2] == EAP_EKE_PRF_HMAC_SHA2_256 && pos[3] == EAP_EKE_MAC_HMAC_SHA2_256) return 1; if (pos[0] == EAP_EKE_DHGROUP_EKE_15 && pos[1] == EAP_EKE_ENCR_AES128_CBC && pos[2]...
supported_proposal
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int survey_handler(nl_msg *msg, void *arg) { long v2; unsigned int v3; long v4; u32 surveyed_freq; u32 ifidx; genlmsghdr *gnlh; nlattr *sinfo[13]; nlattr *tb[302]; unsigned long v11; v11 = __readfsqword(0x28u); v2 = nlmsg_hdr(msg); gnlh = (genlmsghdr *)nlmsg_data(v2); v3 = genlmsg_attrlen(gnl...
static int survey_handler(struct nl_msg *msg, void *arg) { struct nlattr *tb[NL80211_ATTR_MAX + 1]; struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg)); struct nlattr *sinfo[NL80211_SURVEY_INFO_MAX + 1]; struct survey_results *survey_results; u32 surveyed_freq = 0; u32 ifidx; static struct nla_policy su...
survey_handler
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int test_request(const char *request, char *buf, size_t buflen) { const char *v4; int ret; u32 fsts_id; if (!strncasecmp(request, "send_setup_request", 0x12u)) { ret = fst_test_req_send_fst_request(request + 18); } else if (!strncasecmp(request, "send_setup_response", 0x13u)) { ret = fst_test_req_sen...
static int test_request(const char *request, char *buf, size_t buflen) { const char *p = request; int ret; if (!os_strncasecmp(p, FST_CTR_SEND_SETUP_REQUEST, os_strlen(FST_CTR_SEND_SETUP_REQUEST))) { ret = fst_test_req_send_fst_request(p + os_strl...
test_request
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const char *timeout_next_str(int val) { const char *result; switch (val) { case 0: result = "NULLFUNC POLL"; break; case 1: result = "DISASSOC"; break; case 2: result = "DEAUTH"; break; case 3: result = "REMOVE"; break; case 4: result = "DISASSOC_FROM_CLI"; break; ...
static const char *timeout_next_str(int val) { switch (val) { case STA_NULLFUNC: return "NULLFUNC POLL"; case STA_DISASSOC: return "DISASSOC"; case STA_DEAUTH: return "DEAUTH"; case STA_REMOVE: return "REMOVE"; case STA_DISASSOC_FROM_CLI: return "DISASSOC_FROM_CLI"; } return "?"; }
timeout_next_str
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_ca_cert(tls_data *data, tls_connection *conn, const char *ca_cert, const u8 *ca_cert_blob, size_t ca_cert_blob_len, const char *ca_path) { long cert_store; const u8 *ca_cert_bloba; const char *ca_certa; tls_connection *conna; tls_data *d...
static int tls_connection_ca_cert(struct tls_data *data, struct tls_connection *conn, const char *ca_cert, const u8 *ca_cert_blob, size_t ca_cert_blob_len, const char *ca_path) { SSL...
tls_connection_ca_cert
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_client_cert(tls_connection *conn, const char *client_cert, const u8 *client_cert_blob, size_t client_cert_blob_len) { long v5; unsigned int client_cert_blob_lena; BIO *bio; X509 *x509; X509 *x509a; client_cert_blob_lena = clie...
static int tls_connection_client_cert(struct tls_connection *conn, const char *client_cert, const u8 *client_cert_blob, size_t client_cert_blob_len) { if (client_cert == NULL && client_cert_blob == NULL) ...
tls_connection_client_cert
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_client_hello_ext(void *ssl_ctx, tls_connection *conn, int ext_type, const u8 *data, size_t data_len) { if (!conn || !conn->ssl || ext_type != 35) return -1; if ((unsigned int)SSL_set_session_ticket_ext(conn->ssl, data, ...
int tls_connection_client_hello_ext(void *ssl_ctx, struct tls_connection *conn, int ext_type, const u8 *data, size_t data_len) { if (conn == NULL || conn->ssl == NULL || ext_type != 35) return -1; if (SSL_set_session_ticket_ext(conn->ssl, ...
tls_connection_client_hello_ext
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
wpabuf *tls_connection_decrypt(void *tls_ctx, tls_connection *conn, const wpabuf *in_data) { unsigned int v3; const void *v4; size_t v6; unsigned int v7; void *v8; int res; wpabuf *buf; v3 = wpabuf_len_67(in_data); v4 = wpabuf_head_67(in_data); if ((int)BIO_write(conn...
struct wpabuf *tls_connection_decrypt(void *tls_ctx, struct tls_connection *conn, const struct wpabuf *in_data) { int res; struct wpabuf *buf; res = BIO_write(conn->ssl_in, wpabuf_head(in_data), wpabuf_len(in_data)); if (res < 0) { ...
tls_connection_decrypt
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tls_connection_deinit(void *ssl_ctx, tls_connection *conn) { if (conn) { if ((*((_BYTE *)conn + 136) & 0x10) != 0) { SSL_set_quiet_shutdown(conn->ssl, 1); SSL_shutdown(conn->ssl); } SSL_free(conn->ssl); tls_engine_deinit(conn); free(conn->subject_match); free(conn->altsubject_...
void tls_connection_deinit(void *ssl_ctx, struct tls_connection *conn) { if (conn == NULL) return; if (conn->success_data) { SSL_set_quiet_shutdown(conn->ssl, 1); SSL_shutdown(conn->ssl); } SSL_free(conn->ssl); tls_engine_deinit(conn); os_free(conn->subject_match); os_free(conn->altsubject_ma...
tls_connection_deinit
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_dh(tls_connection *conn, const char *dh_file) { long v3; const char *v4; long error; const char *v6; long v7; const char *v8; long v9; const char *v10; DH *dh_0; BIO *bio; BIO *bioa; DSA *dsa; if (!dh_file) return 0; if (!conn) return -1; bio = (BIO *)BIO_new_fi...
static int tls_connection_dh(struct tls_connection *conn, const char *dh_file) { #ifdef OPENSSL_NO_DH if (dh_file == NULL) return 0; wpa_printf(MSG_ERROR, "TLS: openssl does not include DH support, but " "dh_file specified"); return -1; #else DH *dh; BIO *bio; if (dh_file == NUL...
tls_connection_dh
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_enable_workaround(void *ssl_ctx, tls_connection *conn) { SSL_set_options(conn->ssl, 2048); return 0; }
int tls_connection_enable_workaround(void *ssl_ctx, struct tls_connection *conn) { SSL_set_options(conn->ssl, SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS); return 0; }
tls_connection_enable_workaround
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
wpabuf *tls_connection_encrypt(void *tls_ctx, tls_connection *conn, const wpabuf *in_data) { unsigned int v4; const void *v5; size_t v6; unsigned int v7; void *v8; int res; wpabuf *buf; if (!conn) return 0; if ((int)BIO_ctrl(conn->ssl_in, 1, 0, 0) >= 0 && (int...
struct wpabuf *tls_connection_encrypt(void *tls_ctx, struct tls_connection *conn, const struct wpabuf *in_data) { int res; struct wpabuf *buf; if (conn == NULL) return NULL; if ((res = BIO_reset(conn->ssl_in)) < 0 || (res = ...
tls_connection_encrypt
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_engine_ca_cert(tls_data *data, tls_connection *conn, const char *ca_cert_id) { return -1; }
static int tls_connection_engine_ca_cert(struct tls_data *data, struct tls_connection *conn, const char *ca_cert_id) { #ifndef OPENSSL_NO_ENGINE X509 *cert; SSL_CTX *ssl_ctx = data->ssl; X509_STORE *store; if (tls_engine_get_cert...
tls_connection_engine_ca_cert
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_engine_client_cert(tls_connection *conn, const char *cert_id) { return -1; }
static int tls_connection_engine_client_cert(struct tls_connection *conn, const char *cert_id) { #ifndef OPENSSL_NO_ENGINE X509 *cert; if (tls_engine_get_cert(conn, cert_id, &cert)) return -1; if (!SSL_use_certificate(conn->ssl, cert)) { tls_show_errors(MSG_E...
tls_connection_engine_client_cert
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_engine_private_key(tls_connection *conn) { wpa_printf( 5, "SSL: Configuration uses engine, but engine support was not compiled in"); return -1; }
static int tls_connection_engine_private_key(struct tls_connection *conn) { #if defined(ANDROID) || !defined(OPENSSL_NO_ENGINE) if (SSL_use_PrivateKey(conn->ssl, conn->private_key) != 1) { tls_show_errors(MSG_ERROR, __func__, "ENGINE: cannot use private key for TLS"); return -1; } if (...
tls_connection_engine_private_key
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_established(void *ssl_ctx, tls_connection *conn) { if (conn) return SSL_is_init_finished(conn->ssl); else return 0; }
int tls_connection_established(void *ssl_ctx, struct tls_connection *conn) { return conn ? SSL_is_init_finished(conn->ssl) : 0; }
tls_connection_established
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_export_key(void *tls_ctx, tls_connection *conn, const char *label, const u8 *context, size_t context_len, u8 *out, size_t out_len) { size_t v7; if (conn && (v7 = strlen(label), (unsigned int)SSL_export_keying_material( ...
int tls_connection_export_key(void *tls_ctx, struct tls_connection *conn, const char *label, const u8 *context, size_t context_len, u8 *out, size_t out_len) { if (!conn || SSL_export_keying_material(conn->ssl, out, out_len, label, ...
tls_connection_export_key
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
u16 tls_connection_get_cipher_suite(tls_connection *conn) { const SSL_CIPHER *cipher; cipher = (const SSL_CIPHER *)SSL_get_current_cipher(conn->ssl); if (cipher) return SSL_CIPHER_get_protocol_id(cipher); else return 0; }
u16 tls_connection_get_cipher_suite(struct tls_connection *conn) { const SSL_CIPHER *cipher; cipher = SSL_get_current_cipher(conn->ssl); if (!cipher) return 0; #if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER) return SSL_CIPHER_get_protocol_id(cipher); #else return SSL_CIPHER...
tls_connection_get_cipher_suite
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_get_eap_fast_key(void *tls_ctx, tls_connection *conn, u8 *out, size_t out_len) { long v5; long v6; long v7; long v8; int ret; int skip; u8 *tmp_out; SSL *ssl; const char *ver; SSL_SESSION *sess; u8 *rnd; long master_key_len; unsigned char ...
int tls_connection_get_eap_fast_key(void *tls_ctx, struct tls_connection *conn, u8 *out, size_t out_len) { #ifdef OPENSSL_NEED_EAP_FAST_PRF SSL *ssl; SSL_SESSION *sess; u8 *rnd; int ret = -1; int skip = 0; u8 *tmp_out = NULL; u8 *_out = out; unsigned char client_rando...
tls_connection_get_eap_fast_key
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_get_failed(void *ssl_ctx, tls_connection *conn) { if (conn) return conn->failed; else return -1; }
int tls_connection_get_failed(void *ssl_ctx, struct tls_connection *conn) { if (conn == NULL) return -1; return conn->failed; }
tls_connection_get_failed
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
bool tls_connection_get_own_cert_used(tls_connection *conn) { return conn && SSL_get_certificate(conn->ssl) != 0; }
bool tls_connection_get_own_cert_used(struct tls_connection *conn) { if (conn) return SSL_get_certificate(conn->ssl) != NULL; return false; }
tls_connection_get_own_cert_used
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const char *tls_connection_get_peer_subject(tls_connection *conn) { if (conn) return conn->peer_subject; else return 0; }
const char *tls_connection_get_peer_subject(struct tls_connection *conn) { if (conn) return conn->peer_subject; return NULL; }
tls_connection_get_peer_subject
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_get_random(void *ssl_ctx, tls_connection *conn, tls_random *keys) { SSL *ssl; if (!conn || !keys) return -1; ssl = conn->ssl; if (!ssl) return -1; memset(keys, 0, sizeof(tls_random)); keys->client_random = conn->client_random; keys->client_random_l...
int tls_connection_get_random(void *ssl_ctx, struct tls_connection *conn, struct tls_random *keys) { SSL *ssl; if (conn == NULL || keys == NULL) return -1; ssl = conn->ssl; if (ssl == NULL) return -1; os_memset(keys, 0, sizeof(*keys)); keys->client_random = conn->clie...
tls_connection_get_random
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_get_read_alerts(void *ssl_ctx, tls_connection *conn) { if (conn) return conn->read_alerts; else return -1; }
int tls_connection_get_read_alerts(void *ssl_ctx, struct tls_connection *conn) { if (conn == NULL) return -1; return conn->read_alerts; }
tls_connection_get_read_alerts
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
const wpabuf *tls_connection_get_success_data(tls_connection *conn) { SSL_SESSION *sess; if (tls_ex_idx_session >= 0 && (sess = (SSL_SESSION *)SSL_get_session(conn->ssl)) != 0) return SSL_SESSION_get_ex_data(sess, (unsigned int)tls_ex_idx_session); else return 0; }
const struct wpabuf * tls_connection_get_success_data(struct tls_connection *conn) { SSL_SESSION *sess; if (tls_ex_idx_session < 0 || !(sess = SSL_get_session(conn->ssl))) return NULL; return SSL_SESSION_get_ex_data(sess, tls_ex_idx_session); }
tls_connection_get_success_data
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_get_write_alerts(void *ssl_ctx, tls_connection *conn) { if (conn) return conn->write_alerts; else return -1; }
int tls_connection_get_write_alerts(void *ssl_ctx, struct tls_connection *conn) { if (conn == NULL) return -1; return conn->write_alerts; }
tls_connection_get_write_alerts
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
wpabuf *tls_connection_handshake(void *ssl_ctx, tls_connection *conn, const wpabuf *in_data, wpabuf **appl_data) { return openssl_connection_handshake(conn, in_data, appl_data); }
struct wpabuf *tls_connection_handshake(void *ssl_ctx, struct tls_connection *conn, const struct wpabuf *in_data, struct wpabuf **appl_data) { return openssl_connection_handshake(conn, in_data, appl...
tls_connection_handshake
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
tls_connection *tls_connection_init(void *ssl_ctx) { os_time_t usec; long v3; long v4; SSL_CTX *ssl; tls_context *context; X509_STORE *new_cert_store; tls_connection *conn; os_reltime now; unsigned long v10; v10 = __readfsqword(0x28u); ssl = *(SSL_CTX **)ssl_ctx; context = (tls_context *)SSL_CT...
struct tls_connection *tls_connection_init(void *ssl_ctx) { struct tls_data *data = ssl_ctx; SSL_CTX *ssl = data->ssl; struct tls_connection *conn; long options; X509_STORE *new_cert_store; struct os_reltime now; struct tls_context *context = SSL_CTX_get_app_data(ssl); if (data->crl_reload_interval > 0...
tls_connection_init
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
char *tls_connection_peer_serial_num(void *tls_ctx, tls_connection *conn) { size_t v3; const u8 *v4; ASN1_INTEGER *ser; size_t len; char *serial_num; if (!conn->peer_cert) return 0; ser = (ASN1_INTEGER *)X509_get_serialNumber(conn->peer_cert); if (!ser) return 0; len = (int)(2 * ASN1_STRING_l...
char *tls_connection_peer_serial_num(void *tls_ctx, struct tls_connection *conn) { ASN1_INTEGER *ser; char *serial_num; size_t len; if (!conn->peer_cert) return NULL; ser = X509_get_serialNumber(conn->peer_cert); if (!ser) return NULL; len = ASN1_STRING_leng...
tls_connection_peer_serial_num
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_private_key(tls_data *data, tls_connection *conn, const char *private_key, const char *private_key_passwd, const u8 *private_key_blob, size_t private_key_blob_len) { int ok; ...
static int tls_connection_private_key(struct tls_data *data, struct tls_connection *conn, const char *private_key, const char *private_key_passwd, const u8 *private_key...
tls_connection_private_key
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tls_connection_remove_session(tls_connection *conn) { SSL_SESSION *sess; sess = (SSL_SESSION *)SSL_get_session(conn->ssl); if (sess) { if ((unsigned int)SSL_CTX_remove_session(conn->ssl_ctx, sess) == 1) wpa_printf( 2, "OpenSSL: Removed cached session to disable session resumption"); ...
void tls_connection_remove_session(struct tls_connection *conn) { SSL_SESSION *sess; sess = SSL_get_session(conn->ssl); if (!sess) return; if (SSL_CTX_remove_session(conn->ssl_ctx, sess) != 1) wpa_printf(MSG_DEBUG, "OpenSSL: Session was not cached"); else wpa_printf(MSG_DEBUG, "Op...
tls_connection_remove_session
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_resumed(void *ssl_ctx, tls_connection *conn) { if (conn) return SSL_session_reused(conn->ssl); else return 0; }
int tls_connection_resumed(void *ssl_ctx, struct tls_connection *conn) { return conn ? SSL_session_reused(conn->ssl) : 0; }
tls_connection_resumed
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
wpabuf *tls_connection_server_handshake(void *tls_ctx, tls_connection *conn, const wpabuf *in_data, wpabuf **appl_data) { *((_BYTE *)conn + 136) |= 0x40u; return openssl_connection_handshake(conn, in_data, appl_data); }
struct wpabuf *tls_connection_server_handshake(void *tls_ctx, struct tls_connection *conn, const struct wpabuf *in_data, struct wpabuf **appl_data) { conn->server = 1; return ...
tls_connection_server_handshake
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_set_cipher_list(void *tls_ctx, tls_connection *conn, u8 *ciphers) { int v4; int ret; char *pos; unsigned char *c; char buf[500]; _BYTE v9[12]; *(_QWORD *)&v9[4] = __readfsqword(0x28u); if (!conn || !conn->ssl || !ciphers) return -1; buf[0] = 0...
int tls_connection_set_cipher_list(void *tls_ctx, struct tls_connection *conn, u8 *ciphers) { char buf[500], *pos, *end; u8 *c; int ret; if (conn == NULL || conn->ssl == NULL || ciphers == NULL) return -1; buf[0] = '\0'; pos = buf; end = pos + sizeof(buf); c = c...
tls_connection_set_cipher_list
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_set_params(void *tls_ctx, tls_connection *conn, const tls_connection_params *params) { const char *v3; const char *private_key; const char *v6; const char *v7; int can_pkcs11; int ret; const char *key_id; const char *cert_id; const char *ca_cert_id; c...
int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn, const struct tls_connection_params *params) { struct tls_data *data = tls_ctx; int ret; unsigned long err; int can_pkcs11 = 0; const char *key_id = params->key_id; const char *cert_id = params->cert_id; ...
tls_connection_set_params
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_set_session_ticket_cb(void *tls_ctx, tls_connection *conn, tls_session_ticket_cb cb, void *ctx) { conn->session_ticket_cb = cb; conn->session_ticket_cb_ctx = ctx; if (cb) { if ((unsigned int)SSL_set_session_secret_cb(conn->ssl, tls_sess_sec_cb, ...
int tls_connection_set_session_ticket_cb(void *tls_ctx, struct tls_connection *conn, tls_session_ticket_cb cb, void *ctx) { #ifdef EAP_FAST_OR_TEAP conn->session_ticket_cb = cb; conn->session_ticket_cb_ctx = ctx; if (cb) { if (...
tls_connection_set_session_ticket_cb
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_set_subject_match(tls_connection *conn, const char *subject_match, const char *altsubject_match, const char *suffix_match, const char *domain_match, ...
static int tls_connection_set_subject_match(struct tls_connection *conn, const char *subject_match, const char *altsubject_match, const char *suffix_match, ...
tls_connection_set_subject_match
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tls_connection_set_success_data(tls_connection *conn, wpabuf *data) { SSL_SESSION *sess; wpabuf *old; if (tls_ex_idx_session < 0) goto fail; sess = (SSL_SESSION *)SSL_get_session(conn->ssl); if (!sess) goto fail; old = (wpabuf *)SSL_SESSION_get_ex_data(sess, (unsigned int)tls_ex_idx_sess...
void tls_connection_set_success_data(struct tls_connection *conn, struct wpabuf *data) { SSL_SESSION *sess; struct wpabuf *old; if (tls_ex_idx_session < 0) goto fail; sess = SSL_get_session(conn->ssl); if (!sess) goto fail; old = SSL_SESSION_get_ex_data(sess, tl...
tls_connection_set_success_data
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tls_connection_set_success_data_resumed(tls_connection *conn) { wpa_printf(2, "OpenSSL: Success data accepted for resumed session"); *((_BYTE *)conn + 136) |= 0x10u; }
void tls_connection_set_success_data_resumed(struct tls_connection *conn) { wpa_printf(MSG_DEBUG, "OpenSSL: Success data accepted for resumed session"); conn->success_data = 1; }
tls_connection_set_success_data_resumed
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_set_verify(void *ssl_ctx, tls_connection *conn, int verify_peer, unsigned int flags, const u8 *session_ctx, size_t session_ctx_len) { unsigned int session_ctx_lena; session_ctx_lena = session_ctx_len; if (!conn) return -1; if (v...
int tls_connection_set_verify(void *ssl_ctx, struct tls_connection *conn, int verify_peer, unsigned int flags, const u8 *session_ctx, size_t session_ctx_len) { static int counter = 0; struct tls_data *data = ssl_ctx; if (conn == NULL) return -1; ...
tls_connection_set_verify
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_connection_shutdown(void *ssl_ctx, tls_connection *conn) { if (!conn) return -1; SSL_set_quiet_shutdown(conn->ssl, 1); SSL_shutdown(conn->ssl); if ((unsigned int)SSL_clear(conn->ssl) == 1) return 0; else return -1; }
int tls_connection_shutdown(void *ssl_ctx, struct tls_connection *conn) { if (conn == NULL) return -1; SSL_set_quiet_shutdown(conn->ssl, 1); SSL_shutdown(conn->ssl); return SSL_clear(conn->ssl) == 1 ? 0 : -1; }
tls_connection_shutdown
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
tls_context *tls_context_new(const tls_config *conf) { tls_context *context; context = (tls_context *)os_zalloc(0x20u); if (!context) return 0; if (conf) { context->event_cb = conf->event_cb; context->cb_ctx = conf->cb_ctx; context->cert_in_cb = conf->cert_in_cb; } return context; }
static struct tls_context *tls_context_new(const struct tls_config *conf) { struct tls_context *context = os_zalloc(sizeof(*context)); if (context == NULL) return NULL; if (conf) { context->event_cb = conf->event_cb; context->cb_ctx = conf->cb_ctx; context->cert_in_cb = conf->cert_in_cb; } ret...
tls_context_new
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
X509_STORE *tls_crl_cert_reload(const char *ca_cert, int check_crl) { int v3; int flags; X509_STORE *store; store = (X509_STORE *)X509_STORE_new(); if (store) { if (!ca_cert || (unsigned int)X509_STORE_load_locations(store, ca_cert, 0) == 1) { if (check_crl) v3 = 4; else ...
static X509_STORE *tls_crl_cert_reload(const char *ca_cert, int check_crl) { int flags; X509_STORE *store; store = X509_STORE_new(); if (!store) { wpa_printf(MSG_DEBUG, "OpenSSL: %s - failed to allocate new certificate store", __func__); return NULL; } if (ca_cert && ...
tls_crl_cert_reload
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tls_deinit(void *ssl_ctx) { SSL_CTX *ssl; tls_context *context; ssl = *(SSL_CTX **)ssl_ctx; context = (tls_context *)SSL_CTX_get_ex_data(*(_QWORD *)ssl_ctx, 0); if (context != tls_global) free(context); if (*((_DWORD *)ssl_ctx + 2)) SSL_CTX_flush_sessions(ssl, 0); free(*((void **)ssl_ctx + 3...
void tls_deinit(void *ssl_ctx) { struct tls_data *data = ssl_ctx; SSL_CTX *ssl = data->ssl; struct tls_context *context = SSL_CTX_get_app_data(ssl); if (context != tls_global) os_free(context); if (data->tls_session_lifetime > 0) SSL_CTX_flush_sessions(ssl, 0); os_free(data->ca_cert); SSL_CTX_free...
tls_deinit
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
void tls_engine_deinit(tls_connection *conn) { ; }
static void tls_engine_deinit(struct tls_connection *conn) { #if defined(ANDROID) || !defined(OPENSSL_NO_ENGINE) wpa_printf(MSG_DEBUG, "ENGINE: engine deinit"); if (conn->private_key) { EVP_PKEY_free(conn->private_key); conn->private_key = NULL; } if (conn->engine) { #if !defined(OPENSSL_IS_BORINGSSL) ...
tls_engine_deinit
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_engine_init(tls_connection *conn, const char *engine_id, const char *pin, const char *key_id, const char *cert_id, const char *ca_cert_id) { return 0; }
static int tls_engine_init(struct tls_connection *conn, const char *engine_id, const char *pin, const char *key_id, const char *cert_id, const char *ca_cert_id) { #if defined(ANDROID) && defined(OPENSSL_IS_BORINGSSL) #if !defined(OPENSSL_NO_ENGINE) #error "This code...
tls_engine_init
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_get_cipher(void *ssl_ctx, tls_connection *conn, char *buf, size_t buflen) { long current_cipher; const char *name; if (!conn || !conn->ssl) return -1; current_cipher = SSL_get_current_cipher(conn->ssl); name = (const char *)SSL_CIPHER_get_name(current_cipher); if (!name) ...
int tls_get_cipher(void *ssl_ctx, struct tls_connection *conn, char *buf, size_t buflen) { const char *name; if (conn == NULL || conn->ssl == NULL) return -1; name = SSL_get_cipher(conn->ssl); if (name == NULL) return -1; os_strlcpy(buf, name, buflen); return 0; }
tls_get_cipher
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_get_errors(void *ssl_ctx) { const char *v1; int count; unsigned long err; for (count = 0;; ++count) { err = ERR_get_error(); if (!err) break; v1 = (const char *)ERR_error_string(err, 0); wpa_printf(3, "TLS - SSL error: %s", v1); } return count; }
int tls_get_errors(void *ssl_ctx) { int count = 0; unsigned long err; while ((err = ERR_get_error())) { wpa_printf(MSG_INFO, "TLS - SSL error: %s", ERR_error_string(err, NULL)); count++; } return count; }
tls_get_errors
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_get_library_version(char *buf, size_t buf_len) { const char *v2; v2 = (const char *)OpenSSL_version(0); return snprintf(buf, buf_len, "OpenSSL build=%s run=%s", "OpenSSL 1.1.1o 3 May 2022", v2); }
int tls_get_library_version(char *buf, size_t buf_len) { #if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) return os_snprintf(buf, buf_len, "OpenSSL build=%s run=%s", OPENSSL_VERSION_TEXT, OpenSSL_version(OPENSSL_VERSION)); #else return os_snprintf(buf, buf_len, "Op...
tls_get_library_version
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_get_tls_unique(tls_connection *conn, u8 *buf, size_t max_len) { int reused; unsigned long len; reused = SSL_session_reused(conn->ssl); if (((*((_BYTE *)conn + 136) & 0x40) == 0 || reused) && ((*((_BYTE *)conn + 136) & 0x40) != 0 || !reused)) len = SSL_get_finished(conn->ssl, buf, max_len); ...
int tls_get_tls_unique(struct tls_connection *conn, u8 *buf, size_t max_len) { size_t len; int reused; reused = SSL_session_reused(conn->ssl); if ((conn->server && !reused) || (!conn->server && reused)) len = SSL_get_peer_finished(conn->ssl, buf, max_len); else len = SSL_get_finished(conn->ssl, buf, ...
tls_get_tls_unique
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_get_version(void *ssl_ctx, tls_connection *conn, char *buf, size_t buflen) { const char *name; if (!conn || !conn->ssl) return -1; name = (const char *)SSL_get_version(conn->ssl); if (!name) return -1; os_strlcpy(buf, name, buflen); return 0; }
int tls_get_version(void *ssl_ctx, struct tls_connection *conn, char *buf, size_t buflen) { const char *name; if (conn == NULL || conn->ssl == NULL) return -1; name = SSL_get_version(conn->ssl); if (name == NULL) return -1; os_strlcpy(buf, name, buflen); return 0; }
tls_get_version
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_global_ca_cert(tls_data *data, const char *ca_cert) { long client_CA_file; SSL_CTX *ssl_ctx; ssl_ctx = data->ssl; if (ca_cert) { if ((unsigned int)SSL_CTX_load_verify_locations(ssl_ctx, ca_cert, 0) != 1) { tls_show_errors(4, "tls_global_ca_cert", "Failed to load root cer...
static int tls_global_ca_cert(struct tls_data *data, const char *ca_cert) { SSL_CTX *ssl_ctx = data->ssl; if (ca_cert) { if (SSL_CTX_load_verify_locations(ssl_ctx, ca_cert, NULL) != 1) { tls_show_errors(MSG_WARNING, __func__, "Failed to load root certificates"); return -1; ...
tls_global_ca_cert
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_global_client_cert(tls_data *data, const char *client_cert) { SSL_CTX *ssl_ctx; ssl_ctx = data->ssl; if (!client_cert) return 0; if ((unsigned int)SSL_CTX_use_certificate_file(ssl_ctx, client_cert, 2) == 1 || (unsigned int)SSL_CTX_use_certificate_chain_file(ssl_ctx, client_cert) == ...
static int tls_global_client_cert(struct tls_data *data, const char *client_cert) { #ifndef OPENSSL_NO_STDIO SSL_CTX *ssl_ctx = data->ssl; if (client_cert == NULL) return 0; if (SSL_CTX_use_certificate_file(ssl_ctx, client_cert, SSL_FILETYPE_ASN1) != 1 && SS...
tls_global_client_cert
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0
int tls_global_dh(tls_data *data, const char *dh_file) { long v3; const char *v4; long error; const char *v6; long v7; const char *v8; long v9; const char *v10; DH *dh_0; SSL_CTX *ssl_ctx; BIO *bio; BIO *bioa; DSA *dsa; ssl_ctx = data->ssl; if (!dh_file) return 0; if (!ssl_ctx) ...
static int tls_global_dh(struct tls_data *data, const char *dh_file) { #ifdef OPENSSL_NO_DH if (dh_file == NULL) return 0; wpa_printf(MSG_ERROR, "TLS: openssl does not include DH support, but " "dh_file specified"); return -1; #else SSL_CTX *ssl_ctx = data->ssl; DH *dh; BIO *bio;...
tls_global_dh
hostapd-2.10
net-wireless
O0/net-wireless/hostapd-2.10/hostapd
ida
O0