plateform
stringclasses
1 value
repo_name
stringclasses
2 values
name
stringlengths
1
78
ext
stringclasses
2 values
path
stringlengths
15
1.11k
size
int64
1
8.55M
source_encoding
stringclasses
11 values
md5
stringlengths
32
32
text
stringlengths
0
8.49M
google
android
drivers
.c
platform/external/wpa_supplicant_8/src/drivers/drivers.c
1,395
utf_8
854fdadca2f0600da3c9d427b2087281
/* * Driver interface list * See README for more details. */ #include "utils/includes.h" #include "utils/common.h" #include "driver.h" const struct wpa_driver_ops *const wpa_drivers[] = { #ifdef CONFIG_DRIVER_NL80211 &wpa_driver_nl80211_ops, #endif /* CONFIG_DRIVER_NL80211 */ #ifdef CONFIG_DRIVER_WEXT &wpa_driver_...
google
android
driver_hostap
.c
platform/external/wpa_supplicant_8/src/drivers/driver_hostap.c
29,977
utf_8
974b4cd6f3fea3f50136d77280676ade
/* * Driver interaction with Linux Host AP driver * See README for more details. */ #include "includes.h" #include <sys/ioctl.h> #include "linux_wext.h" #include "common.h" #include "driver.h" #include "driver_wext.h" #include "eloop.h" #include "driver_hostap.h" #include <net/if_arp.h> #include <netpacket/packet.h>...
google
android
driver_privsep
.c
platform/external/wpa_supplicant_8/src/drivers/driver_privsep.c
21,347
utf_8
4de9775f0e3d51f5cee9b82c99562522
/* * WPA Supplicant - privilege separated driver interface * See README for more details. */ #include "includes.h" #include <sys/un.h> #include "common.h" #include "driver.h" #include "eloop.h" #include "common/privsep_commands.h" struct wpa_driver_privsep_data { void *ctx; u8 own_addr[ETH_ALEN]; int priv_socket;...
google
android
driver_bsd
.c
platform/external/wpa_supplicant_8/src/drivers/driver_bsd.c
46,941
utf_8
071f4ef23da9af25462a897bf9f45e3b
/* * See README for more details. */ #include "includes.h" #include <sys/ioctl.h> #include "common.h" #include "driver.h" #include "eloop.h" #include "common/ieee802_11_defs.h" #include "common/wpa_common.h" #include <ifaddrs.h> #include <net/if.h> #include <net/if_dl.h> #include <net/if_media.h> #include <net/if_eth...
google
android
linux_ioctl
.c
platform/external/wpa_supplicant_8/src/drivers/linux_ioctl.c
5,046
utf_8
2016b025ef8aa03d202f5f237f41a93c
/* * Linux ioctl helper functions for driver wrappers * See README for more details. */ #include "utils/includes.h" #include <sys/ioctl.h> #include <net/if.h> #include <net/if_arp.h> #include "utils/common.h" #include "common/linux_bridge.h" #include "linux_ioctl.h" int linux_set_iface_flags(int sock, const char *if...
google
android
eap_sake
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_sake.c
13,080
utf_8
97d82df5369d5d3c5302a4c7fb6940f5
/* * EAP peer method: EAP-SAKE (RFC 4763) * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto/random.h" #include "eap_peer/eap_i.h" #include "eap_common/eap_sake_common.h" struct eap_sake_data { enum { IDENTITY, CHALLENGE, CONFIRM, SUCCESS, FAILURE } state; u8 root_secret_a...
google
android
eap_sim
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_sim.c
39,421
utf_8
4dadd526672b9b3e1d7cf33a21649226
/* * EAP peer method: EAP-SIM (RFC 4186) * See README for more details. */ #include "includes.h" #include "common.h" #include "utils/base64.h" #include "pcsc_funcs.h" #include "crypto/crypto.h" #include "crypto/milenage.h" #include "crypto/random.h" #include "eap_peer/eap_i.h" #include "eap_config.h" #include "eap_c...
google
android
eap_psk
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_psk.c
13,432
utf_8
c77336b5018d99eeec3ce422252e774e
/* * EAP peer method: EAP-PSK (RFC 4764) * See README for more details. * * Note: EAP-PSK is an EAP authentication method and as such, completely * different from WPA-PSK. This file is not needed for WPA-PSK functionality. */ #include "includes.h" #include "common.h" #include "crypto/aes_wrap.h" #include "crypto/...
google
android
eap_wsc
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_wsc.c
14,725
utf_8
d7724e6eede119fd07f2445370738f4a
/* * EAP-WSC peer for Wi-Fi Protected Setup * See README for more details. */ #include "includes.h" #include "common.h" #include "uuid.h" #include "eap_i.h" #include "eap_common/eap_wsc_common.h" #include "wps/wps.h" #include "wps/wps_defs.h" struct eap_wsc_data { enum { WAIT_START, MESG, WAIT_FRAG_ACK, FAIL } stat...
google
android
eap_peap
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_peap.c
39,197
utf_8
3fa05986a2e1a9d9cbefc58a03c1bd89
/* * EAP peer method: EAP-PEAP (draft-josefsson-pppext-eap-tls-eap-10.txt) * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto/sha1.h" #include "crypto/tls.h" #include "eap_common/eap_tlv_common.h" #include "eap_common/eap_peap_common.h" #include "eap_i.h" #include "eap_tls_c...
google
android
eap_fast_pac
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_fast_pac.c
21,207
utf_8
f3ec3b1cd66b7c742304bf5ca6399cb9
/* * EAP peer method: EAP-FAST PAC file processing * See README for more details. */ #include "includes.h" #include "common.h" #include "eap_config.h" #include "eap_i.h" #include "eap_fast_pac.h" /* TODO: encrypt PAC-Key in the PAC file */ /* Text data format */ static const char *pac_file_hdr = "wpa_supplicant EAP...
google
android
eap_ttls
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_ttls.c
50,060
utf_8
0bfbcde92692672fea4aefbfd822037d
/* * EAP peer method: EAP-TTLS (RFC 5281) * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto/ms_funcs.h" #include "crypto/sha1.h" #include "crypto/tls.h" #include "eap_common/chap.h" #include "eap_common/eap_ttls.h" #include "mschapv2.h" #include "eap_i.h" #include "eap_tls_...
google
android
eap_ikev2
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_ikev2.c
13,088
utf_8
2327ff570b21b4beda1d6545880c9862
/* * EAP-IKEv2 peer (RFC 5106) * See README for more details. */ #include "includes.h" #include "common.h" #include "eap_i.h" #include "eap_common/eap_ikev2_common.h" #include "ikev2.h" struct eap_ikev2_data { struct ikev2_responder_data ikev2; enum { WAIT_START, PROC_MSG, WAIT_FRAG_ACK, DONE, FAIL } state; struc...
google
android
tncc
.c
platform/external/wpa_supplicant_8/src/eap_peer/tncc.c
30,608
utf_8
8f23962bddc08b63cdec6f41e1c8dede
/* * EAP-TNC - TNCC (IF-IMC and IF-TNCCS) * See README for more details. */ #include "includes.h" #ifndef CONFIG_NATIVE_WINDOWS #include <dlfcn.h> #endif /* CONFIG_NATIVE_WINDOWS */ #include "common.h" #include "base64.h" #include "common/tnc.h" #include "tncc.h" #include "eap_common/eap_tlv_common.h" #include "eap_...
google
android
eap_pwd
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_pwd.c
31,114
utf_8
178c6d51642d0b7d3c5f0f754d4ce0db
/* * EAP peer method: EAP-pwd (RFC 5931) * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto/sha1.h" #include "crypto/sha256.h" #include "crypto/sha512.h" #include "crypto/ms_funcs.h" #include "crypto/crypto.h" #include "eap_peer/eap_i.h" #include "eap_common/eap_pwd_common.h...
google
android
eap_pax
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_pax.c
14,309
utf_8
d8284c56249dac1eb1e5811d2fdd24bd
/* * EAP peer method: EAP-PAX (RFC 4746) * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto/random.h" #include "eap_common/eap_pax_common.h" #include "eap_i.h" /* * Note: only PAX_STD subprotocol is currently supported * * TODO: Add support with PAX_SEC with the mandatory...
google
android
eap_methods
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_methods.c
8,879
utf_8
1689aaa5d593575e26c94bbe897a0ccf
/* * EAP peer: Method registration * See README for more details. */ #include "includes.h" #ifdef CONFIG_DYNAMIC_EAP_METHODS #include <dlfcn.h> #endif /* CONFIG_DYNAMIC_EAP_METHODS */ #include "common.h" #include "eap_i.h" #include "eap_methods.h" static struct eap_method *eap_methods = NULL; static void eap_peer_me...
google
android
eap
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap.c
92,563
utf_8
6b12bccdd48629c9511959bf37fd428a
/* * EAP peer state machines (RFC 4137) * See README for more details. * * This file implements the Peer State Machine as defined in RFC 4137. The used * states and state transitions match mostly with the RFC. However, there are * couple of additional transitions for working around small issues noticed * during ...
google
android
eap_aka
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_aka.c
47,967
utf_8
89a470395f4d6c7eeb7043ae177be810
/* * EAP peer method: EAP-AKA (RFC 4187) and EAP-AKA' (RFC 5448) * See README for more details. */ #include "includes.h" #include "common.h" #include "utils/base64.h" #include "pcsc_funcs.h" #include "crypto/crypto.h" #include "crypto/sha1.h" #include "crypto/sha256.h" #include "crypto/milenage.h" #include "eap_comm...
google
android
eap_tls_common
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_tls_common.c
37,252
utf_8
84b75f159e0b8f2b85f45f0ea3e6ec77
/* * EAP peer: EAP-TLS/PEAP/TTLS/FAST common functions * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto/sha1.h" #include "crypto/tls.h" #include "eap_i.h" #include "eap_tls_common.h" #include "eap_config.h" static struct wpabuf * eap_tls_msg_alloc(enum eap_type type, size_...
google
android
mschapv2
.c
platform/external/wpa_supplicant_8/src/eap_peer/mschapv2.c
3,670
utf_8
59901333daffe02c70c7e6a59aa70638
/* * MSCHAPV2 (RFC 2759) * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto/ms_funcs.h" #include "mschapv2.h" const u8 * mschapv2_remove_domain(const u8 *username, size_t *len) { size_t i; /* * MSCHAPv2 does not include optional domain name in the * challenge-response ...
google
android
eap_otp
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_otp.c
2,153
utf_8
210dd21f49e4877f5f11566f5ae348d0
/* * EAP peer method: EAP-OTP (RFC 3748) * See README for more details. */ #include "includes.h" #include "common.h" #include "eap_i.h" static void * eap_otp_init(struct eap_sm *sm) { /* No need for private data. However, must return non-NULL to indicate * success. */ return (void *) 1; } static void eap_otp_dei...
google
android
eap_proxy_dummy
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_proxy_dummy.c
1,546
utf_8
667b088f9e114b459ba5bd065408b1d3
/* * EAP proxy - stub implementation for build testing * See README for more details. */ #include "includes.h" #include "common.h" #include "eap_proxy.h" struct eap_proxy_sm * eap_proxy_init(void *eapol_ctx, const struct eapol_callbacks *eapol_cb, void *msg_ctx) { return NULL; } void eap_proxy_deinit(struct...
google
android
eap_gtc
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_gtc.c
3,427
utf_8
8df196af2ce82d58cce06669e60d42d6
/* * EAP peer method: EAP-GTC (RFC 3748) * See README for more details. */ #include "includes.h" #include "common.h" #include "eap_i.h" struct eap_gtc_data { int prefix; }; static void * eap_gtc_init(struct eap_sm *sm) { struct eap_gtc_data *data; data = os_zalloc(sizeof(*data)); if (data == NULL) return NULL;...
google
android
eap_md5
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_md5.c
2,887
utf_8
c8e2d51b85584d99ffc5472d218865d6
/* * EAP peer method: EAP-MD5 (RFC 3748 and RFC 1994) * See README for more details. */ #include "includes.h" #include "common.h" #include "eap_i.h" #include "eap_common/chap.h" static void * eap_md5_init(struct eap_sm *sm) { /* No need for private data. However, must return non-NULL to indicate * success. */ re...
google
android
eap_tls
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_tls.c
12,223
utf_8
195df6e34cf8430c15d4f9c248709c17
/* * EAP peer method: EAP-TLS (RFC 5216, RFC 9190) * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto/tls.h" #include "eap_i.h" #include "eap_tls_common.h" #include "eap_config.h" static void eap_tls_deinit(struct eap_sm *sm, void *priv); struct eap_tls_data { struct eap_ss...
google
android
eap_teap
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_teap.c
58,998
utf_8
117fc258888bc63ef98e1693401c611e
/* * EAP peer method: EAP-TEAP (RFC 7170) * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto/tls.h" #include "eap_common/eap_teap_common.h" #include "eap_i.h" #include "eap_tls_common.h" #include "eap_config.h" #include "eap_teap_pac.h" #ifdef EAP_TEAP_DYNAMIC #include "eap_...
google
android
eap_fast
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_fast.c
49,854
utf_8
af017f52990920c5f4fd6c86cb069bc6
/* * EAP peer method: EAP-FAST (RFC 4851) * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto/tls.h" #include "crypto/sha1.h" #include "eap_common/eap_tlv_common.h" #include "eap_i.h" #include "eap_tls_common.h" #include "eap_config.h" #include "eap_fast_pac.h" #ifdef EAP_FAS...
google
android
eap_teap_pac
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_teap_pac.c
20,774
utf_8
ff83b264463268df928b9f6d0792e901
/* * EAP peer method: EAP-TEAP PAC file processing * See README for more details. */ #include "includes.h" #include "common.h" #include "eap_config.h" #include "eap_i.h" #include "eap_teap_pac.h" /* TODO: encrypt PAC-Key in the PAC file */ /* Text data format */ static const char *pac_file_hdr = "wpa_supplicant EAP...
google
android
eap_eke
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_eke.c
20,560
utf_8
40a29bd39200c3f75bcaf719668e4cde
/* * EAP peer method: EAP-EKE (RFC 6124) } state; u8 msk[EAP_MSK_LEN]; u8 emsk[EAP_EMSK_LEN]; u8 *peerid; size_t peerid_len; u8 *serverid; size_t serverid_len; u8 dh_priv[EAP_EKE_MAX_DH_LEN]; struct eap_eke_session sess; u8 nonce_p[EAP_EKE_MAX_NONCE_LEN]; u8 nonce_s[EAP_EKE_MAX_NONCE_LEN]; struct wpabuf *m...
google
android
eap_mschapv2
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_mschapv2.c
26,024
utf_8
4c16cea9c4e8135f0281b3cd94659198
/* * EAP peer method: EAP-MSCHAPV2 (draft-kamath-pppext-eap-mschapv2-00.txt) * See README for more details. * * This file implements EAP peer part of EAP-MSCHAPV2 method (EAP type 26). * draft-kamath-pppext-eap-mschapv2-00.txt defines the Microsoft EAP CHAP * Extensions Protocol, Version 2, for mutual authenticat...
google
android
eap_proxy_qmi_oc
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_proxy_qmi_oc.c
103,392
utf_8
6b870e8bb6f99022d96a73010fc51ae9
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -----------------------------------------------------------------------...
google
android
ikev2
.c
platform/external/wpa_supplicant_8/src/eap_peer/ikev2.c
31,136
utf_8
3b4709bb21ea9e6e24d9586cd207186e
/* * IKEv2 responder (RFC 4306) for EAP-IKEV2 * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto/dh_groups.h" #include "crypto/random.h" #include "ikev2.h" void ikev2_responder_deinit(struct ikev2_responder_data *data) { ikev2_free_keys(&data->keys); wpabuf_free(data->i_dh...
google
android
eap_vendor_test
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_vendor_test.c
4,287
utf_8
73e243c000bc6a5ffc0bd8a0a45e79cf
/* * EAP peer method: Test method for vendor specific (expanded) EAP type * See README for more details. * * This file implements a vendor specific test method using EAP expanded types. * This is only for test use and must not be used for authentication since no * security is provided. */ #include "includes.h" #...
google
android
eap_gpsk
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_gpsk.c
19,219
utf_8
ab40f01391bfd75d5c857086ef77c714
/* * EAP peer method: EAP-GPSK (RFC 5433) * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto/random.h" #include "eap_peer/eap_i.h" #include "eap_common/eap_gpsk_common.h" struct eap_gpsk_data { enum { GPSK_1, GPSK_3, SUCCESS, FAILURE } state; u8 rand_server[EAP_GPSK_RAND_L...
google
android
eap_leap
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_leap.c
11,068
utf_8
ea153adaad51af12a84831399c62933c
/* * EAP peer method: LEAP * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto/ms_funcs.h" #include "crypto/crypto.h" #include "crypto/random.h" #include "eap_i.h" #define LEAP_VERSION 1 #define LEAP_CHALLENGE_LEN 8 #define LEAP_RESPONSE_LEN 24 #define LEAP_KEY_LEN 16 struct ...
google
android
eap_tnc
.c
platform/external/wpa_supplicant_8/src/eap_peer/eap_tnc.c
10,304
utf_8
1601b0e4cf38e276a0092b344376a754
/* * EAP peer method: EAP-TNC (Trusted Network Connect) * See README for more details. */ #include "includes.h" #include "common.h" #include "eap_i.h" #include "eap_config.h" #include "tncc.h" struct eap_tnc_data { enum { WAIT_START, PROC_MSG, WAIT_FRAG_ACK, DONE, FAIL } state; struct tncc_data *tncc; struct wpab...
google
android
http_curl
.c
platform/external/wpa_supplicant_8/src/utils/http_curl.c
44,390
utf_8
22a9006e0ba2f640ebd6a2d31f599a0b
/* * HTTP wrapper for libcurl * See README for more details. */ #include "includes.h" #include <curl/curl.h> #ifdef EAP_TLS_OPENSSL #include <openssl/ssl.h> #include <openssl/asn1.h> #include <openssl/asn1t.h> #include <openssl/x509v3.h> #ifdef SSL_set_tlsext_status_type #ifndef OPENSSL_NO_TLSEXT #define HAVE_OCSP #...
google
android
browser-wpadebug
.c
platform/external/wpa_supplicant_8/src/utils/browser-wpadebug.c
3,229
utf_8
aa71014446054b1279731208ee35a5cd
/* * Hotspot 2.0 client - Web browser using wpadebug on Android * See README for more details. */ #include "includes.h" #include "common.h" #include "utils/eloop.h" #include "wps/http_server.h" #include "browser.h" struct browser_data { int success; }; static void browser_timeout(void *eloop_data, void *user_ctx) {...
google
android
ext_password
.c
platform/external/wpa_supplicant_8/src/utils/ext_password.c
2,160
utf_8
dff8e78a5dab3897826b01e7424528d9
/* * External password backend * See README for more details. */ #include "includes.h" #ifdef __linux__ #include <sys/mman.h> #endif /* __linux__ */ #include "common.h" #include "ext_password_i.h" static const struct ext_password_backend *backends[] = { #ifdef CONFIG_EXT_PASSWORD_TEST &ext_password_test, #endif /* ...
google
android
os_win32
.c
platform/external/wpa_supplicant_8/src/utils/os_win32.c
4,788
utf_8
4a3d4ffa6676f770b7ea81349fbb4bf1
/* * wpa_supplicant/hostapd / OS specific functions for Win32 systems * See README for more details. */ #include "includes.h" #include <time.h> #include <winsock2.h> #include <wincrypt.h> #include "os.h" #include "common.h" void os_sleep(os_time_t sec, os_time_t usec) { if (sec) Sleep(sec * 1000); if (usec) Sl...
google
android
common
.c
platform/external/wpa_supplicant_8/src/utils/common.c
25,586
utf_8
542eec02cb1bc4cca1f39770be5690c5
/* * wpa_supplicant/hostapd / common helper functions, etc. * See README for more details. */ #include "includes.h" #include <limits.h> #include "common/ieee802_11_defs.h" #include "common.h" int hex2num(char c) { if (c >= '0' && c <= '9') return c - '0'; if (c >= 'a' && c <= 'f') return c - 'a' + 10; if (c >...
google
android
ip_addr
.c
platform/external/wpa_supplicant_8/src/utils/ip_addr.c
1,048
utf_8
d701b06172326efb69d28bdb16c8ba99
/* * IP address processing * See README for more details. */ #include "includes.h" #include "common.h" #include "ip_addr.h" const char * hostapd_ip_txt(const struct hostapd_ip_addr *addr, char *buf, size_t buflen) { if (buflen == 0 || addr == NULL) return NULL; if (addr->af == AF_INET) { os_strlcpy(buf,...
google
android
eloop_win
.c
platform/external/wpa_supplicant_8/src/utils/eloop_win.c
15,540
utf_8
72bf9ce4769ed1fd966853b248a9c0e3
/* * Event loop based on Windows events and WaitForMultipleObjects * See README for more details. */ #include "includes.h" #include <winsock2.h> #include "common.h" #include "list.h" #include "eloop.h" struct eloop_sock { int sock; void *eloop_data; void *user_data; eloop_sock_handler handler; WSAEVENT event; }...
google
android
config
.c
platform/external/wpa_supplicant_8/src/utils/config.c
2,078
utf_8
a83b2310518bfeda42b05ce638036083
/* * Configuration parsing * See README for more details. */ #include "includes.h" #include "utils/config.h" #include "common.h" static int newline_terminated(const char *buf, size_t buflen) { size_t len = os_strlen(buf); if (len == 0) return 0; if (len == buflen - 1 && buf[buflen - 1] != '\r' && buf[len -...
google
android
crc32
.c
platform/external/wpa_supplicant_8/src/utils/crc32.c
3,784
utf_8
ded334887aadc1d5b7c428aa212a97ea
/* * 32-bit CRC for FCS calculation * See README for more details. */ #include "utils/includes.h" #include "utils/common.h" #include "utils/crc32.h" /* * IEEE 802.11 FCS CRC32 * G(x) = x^32 + x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^10 + x^8 + x^7 + * x^5 + x^4 + x^2 + x + 1 */ static const u32 crc32_t...
google
android
xml_libxml2
.c
platform/external/wpa_supplicant_8/src/utils/xml_libxml2.c
9,242
utf_8
47575c032893c94a9b0aa4a75851ab61
/* * XML wrapper for libxml2 * See README for more details. */ #include "includes.h" #define LIBXML_VALID_ENABLED #include <libxml/tree.h> #include <libxml/xmlschemastypes.h> #include "common.h" #include "base64.h" #include "xml-utils.h" struct xml_node_ctx { void *ctx; }; struct str_buf { char *buf; size_t len; ...
google
android
bitfield
.c
platform/external/wpa_supplicant_8/src/utils/bitfield.c
1,404
utf_8
4154df9d8b94d420891a6c74f2c1cdcc
/* * Bitfield * See README for more details. */ #include "includes.h" #include "common.h" #include "bitfield.h" struct bitfield { u8 *bits; size_t max_bits; }; struct bitfield * bitfield_alloc(size_t max_bits) { struct bitfield *bf; bf = os_zalloc(sizeof(*bf) + (max_bits + 7) / 8); if (bf == NULL) return NULL...
google
android
os_unix
.c
platform/external/wpa_supplicant_8/src/utils/os_unix.c
15,820
utf_8
8fb2348bd1b8c324cf75c7b416c42b46
/* * OS specific functions for UNIX/POSIX systems * See README for more details. */ #include "includes.h" #include <time.h> #include <sys/wait.h> #ifdef ANDROID #include <grp.h> #include <pwd.h> #include <sys/capability.h> #include <sys/prctl.h> #include <sys/types.h> #endif /* ANDROID */ #ifdef __MACH__ #include <C...
google
android
edit_simple
.c
platform/external/wpa_supplicant_8/src/utils/edit_simple.c
1,808
utf_8
ef2e98545074ca1a424ec91bc2bc45fb
/* * Minimal command line editing * See README for more details. */ #include "includes.h" #include "common.h" #include "eloop.h" #include "edit.h" #define CMD_BUF_LEN 4096 static char cmdbuf[CMD_BUF_LEN]; static int cmdbuf_pos = 0; static const char *ps2 = NULL; static void *edit_cb_ctx; static void (*edit_cmd_cb)(v...
google
android
ext_password_test
.c
platform/external/wpa_supplicant_8/src/utils/ext_password_test.c
1,758
utf_8
0e41f034b713d1f5bd85e79c6b1a1250
/* * External password backend * See README for more details. */ #include "includes.h" #include "common.h" #include "ext_password_i.h" struct ext_password_test_data { char *params; }; static void * ext_password_test_init(const char *params) { struct ext_password_test_data *data; data = os_zalloc(sizeof(*data)); ...
google
android
json
.c
platform/external/wpa_supplicant_8/src/utils/json.c
14,899
utf_8
0e63f787916615499ad26a9070892b88
/* * JavaScript Object Notation (JSON) parser (RFC7159) * See README for more details. */ #include "includes.h" #include "common.h" #include "base64.h" #include "json.h" #define JSON_MAX_DEPTH 10 #define JSON_MAX_TOKENS 500 void json_escape_string(char *txt, size_t maxlen, const char *data, size_t len) { char *end ...
google
android
pcsc_funcs
.c
platform/external/wpa_supplicant_8/src/utils/pcsc_funcs.c
38,515
utf_8
0d6f0ea1cd0fb11bf175c735a8d4fd45
/* * WPA Supplicant / PC/SC smartcard interface for USIM, GSM SIM * See README for more details. * * This file implements wrapper functions for accessing GSM SIM and 3GPP USIM * cards through PC/SC smartcard library. These functions are used to implement * authentication routines for EAP-SIM and EAP-AKA. */ #inc...
google
android
wpa_debug
.c
platform/external/wpa_supplicant_8/src/utils/wpa_debug.c
19,306
utf_8
197c4e07db774f09c9333e4afa2b3783
/* * wpa_supplicant/hostapd / Debug prints * See README for more details. */ #include "includes.h" #include "common.h" #ifdef CONFIG_DEBUG_SYSLOG #include <syslog.h> #endif /* CONFIG_DEBUG_SYSLOG */ #ifdef CONFIG_DEBUG_LINUX_TRACING #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <string.h> ...
google
android
eloop
.c
platform/external/wpa_supplicant_8/src/utils/eloop.c
33,169
utf_8
70f4f04aeca84cece1aaae945e4a25d8
/* * Event loop based on select() loop * See README for more details. */ #include "includes.h" #include <assert.h> #include "common.h" #include "trace.h" #include "list.h" #include "eloop.h" #if defined(CONFIG_ELOOP_POLL) && defined(CONFIG_ELOOP_EPOLL) #error Do not define both of poll and epoll #endif #if defined(C...
google
android
edit_readline
.c
platform/external/wpa_supplicant_8/src/utils/edit_readline.c
3,871
utf_8
9834e6b3245fe47594feb922e4bcd620
/* * Command line editing and history wrapper for readline * See README for more details. */ #include "includes.h" #include <readline/readline.h> #include <readline/history.h> #include "common.h" #include "eloop.h" #include "edit.h" static void *edit_cb_ctx; static void (*edit_cmd_cb)(void *ctx, char *cmd); static v...
google
android
browser-android
.c
platform/external/wpa_supplicant_8/src/utils/browser-android.c
2,703
utf_8
79c9c0007808935fdfc2851c99296a48
/* * Hotspot 2.0 client - Web browser using Android browser * See README for more details. */ #include "includes.h" #include "common.h" #include "utils/eloop.h" #include "wps/http_server.h" #include "browser.h" struct browser_data { int success; }; static void browser_timeout(void *eloop_data, void *user_ctx) { wp...
google
android
os_internal
.c
platform/external/wpa_supplicant_8/src/utils/os_internal.c
9,016
utf_8
78243ce3737f57fabbf4e7322a94912e
/* * wpa_supplicant/hostapd / Internal implementation of OS specific functions * See README for more details. * * This file is an example of operating system specific wrapper functions. * This version implements many of the functions internally, so it can be used * to fill in missing functions from the target sy...
google
android
edit
.c
platform/external/wpa_supplicant_8/src/utils/edit.c
20,693
utf_8
68a6295097418ac3ea5cac5e16170a3a
/* * Command line editing and history * See README for more details. */ #include "includes.h" #include <termios.h> #include "common.h" #include "eloop.h" #include "list.h" #include "edit.h" #define CMD_BUF_LEN 4096 static char cmdbuf[CMD_BUF_LEN]; static int cmdbuf_pos = 0; static int cmdbuf_len = 0; static char cur...
google
android
wpabuf
.c
platform/external/wpa_supplicant_8/src/utils/wpabuf.c
7,620
utf_8
5b1913741b5f4553f41e818d836bc711
/* * Dynamic data buffer * See README for more details. */ #include "includes.h" #include "common.h" #include "trace.h" #include "wpabuf.h" #ifdef WPA_TRACE #define WPABUF_MAGIC 0x51a974e3 struct wpabuf_trace { unsigned int magic; } __attribute__((aligned(8))); static struct wpabuf_trace * wpabuf_get_trace(const st...
google
android
trace
.c
platform/external/wpa_supplicant_8/src/utils/trace.c
8,948
utf_8
563c93581dc8ecd6265f3b61ca989580
/* * Backtrace debugging * See README for more details. */ #ifdef WPA_TRACE_BFD #define _GNU_SOURCE #include <link.h> #endif /* WPA_TRACE_BCD */ #include "includes.h" #include "common.h" #include "trace.h" #ifdef WPA_TRACE static struct dl_list active_references = { &active_references, &active_references }; #ifdef W...
google
android
xml-utils
.c
platform/external/wpa_supplicant_8/src/utils/xml-utils.c
9,516
utf_8
dd9dd3218b6617a45c7374cfe37a3107
/* * Generic XML helper functions * See README for more details. */ #include "includes.h" #include "common.h" #include "xml-utils.h" static xml_node_t * get_node_uri_iter(struct xml_node_ctx *ctx, xml_node_t *root, char *uri) { char *end; xml_node_t *node; const char *name; end = strchr(uri, '/'); if ...
google
android
uuid
.c
platform/external/wpa_supplicant_8/src/utils/uuid.c
1,843
utf_8
1ab7e8484d272b998c38892516cad993
/* * Universally Unique IDentifier (UUID) * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto/sha256.h" #include "uuid.h" int uuid_str2bin(const char *str, u8 *bin) { const char *pos; u8 *opos; pos = str; opos = bin; if (hexstr2bin(pos, opos, 4)) return -1; pos += 8; ...
google
android
base64
.c
platform/external/wpa_supplicant_8/src/utils/base64.c
4,793
utf_8
0e57b06a25df4f09e45b6903669ac2e8
/* * Base64 encoding/decoding (RFC1341) * See README for more details. */ #include "includes.h" #include <stdint.h> #include "utils/common.h" #include "os.h" #include "base64.h" static const char base64_table[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; static const char base64_url_tabl...
google
android
utils_module_tests
.c
platform/external/wpa_supplicant_8/src/utils/utils_module_tests.c
28,659
utf_8
0606f66bbf6fc0598fee89102d672c60
/* * utils module tests * See README for more details. */ #include "utils/includes.h" #include "utils/common.h" #include "utils/const_time.h" #include "common/ieee802_11_defs.h" #include "utils/bitfield.h" #include "utils/ext_password.h" #include "utils/trace.h" #include "utils/base64.h" #include "utils/ip_addr.h" #...
google
android
ext_password_file
.c
platform/external/wpa_supplicant_8/src/utils/ext_password_file.c
3,260
utf_8
d5ff1322599d86769dad425009fa5d28
/* * External backend for file-backed passwords * See README for more details. */ #include "includes.h" #include "utils/common.h" #include "utils/config.h" #include "ext_password_i.h" /** * Data structure for the file-backed password backend. */ struct ext_password_file_data { char *path; /* path of the password ...
google
android
browser
.c
platform/external/wpa_supplicant_8/src/utils/browser.c
10,712
utf_8
8e6606bcd451cb369aaded97d507fda4
/* * Hotspot 2.0 client - Web browser using WebKit * See README for more details. */ #include "includes.h" #ifdef USE_WEBKIT2 #include <webkit2/webkit2.h> #else /* USE_WEBKIT2 */ #include <webkit/webkit.h> #endif /* USE_WEBKIT2 */ #include "common.h" #include "browser.h" struct browser_context { GtkWidget *win; We...
google
android
browser-system
.c
platform/external/wpa_supplicant_8/src/utils/browser-system.c
2,468
utf_8
bbaf0d43fec30d118a1f0e8ff9bf77c5
/* * Hotspot 2.0 client - Web browser using system browser * See README for more details. */ #include "includes.h" #include "common.h" #include "utils/eloop.h" #include "wps/http_server.h" #include "browser.h" struct browser_data { int success; }; static void browser_timeout(void *eloop_data, void *user_ctx) { wpa...
google
android
os_none
.c
platform/external/wpa_supplicant_8/src/utils/os_none.c
3,377
utf_8
e4b58a22c4ced18711e82546676039be
/* * wpa_supplicant/hostapd / Empty OS specific functions * See README for more details. * * This file can be used as a starting point when adding a new OS target. The * functions here do not really work as-is since they are just empty or only * return an error value. os_internal.c can be used as another starting...
google
android
radiotap
.c
platform/external/wpa_supplicant_8/src/utils/radiotap.c
12,720
utf_8
0100b83d2c7f177ed02d1f703e1539a7
/* * Radiotap parser * */ #include "platform.h" #include "radiotap_iter.h" /* function prototypes and related defs are in radiotap_iter.h */ static const struct radiotap_align_size rtap_namespace_sizes[] = { [IEEE80211_RADIOTAP_TSFT] = { .align = 8, .size = 8, }, [IEEE80211_RADIOTAP_FLAGS] = { .align = 1, .size = ...
google
android
fst
.c
platform/external/wpa_supplicant_8/src/fst/fst.c
5,450
utf_8
18489f1628c9f4259627cdab97a68563
/* * FST module implementation * See README for more details. */ #include "utils/includes.h" #include "utils/common.h" #include "utils/eloop.h" #include "fst/fst.h" #include "fst/fst_internal.h" #include "fst/fst_defs.h" #include "fst/fst_ctrl_iface.h" static int fst_global_initialized = 0; struct dl_list fst_global...
google
android
fst_session
.c
platform/external/wpa_supplicant_8/src/fst/fst_session.c
40,907
utf_8
04036825669ddfcb60bc80cc9b404357
/* * FST module - FST Session implementation * See README for more details. */ #include "utils/includes.h" #include "utils/common.h" #include "utils/eloop.h" #include "common/defs.h" #include "fst/fst_internal.h" #include "fst/fst_defs.h" #include "fst/fst_ctrl_iface.h" #ifdef CONFIG_FST_TEST #include "fst/fst_ctrl_...
google
android
fst_iface
.c
platform/external/wpa_supplicant_8/src/fst/fst_iface.c
1,746
utf_8
129fd7fe272d83f49e11e0bfae111650
/* * FST module - FST interface object implementation * See README for more details. */ #include "utils/includes.h" #include "utils/common.h" #include "fst/fst_internal.h" #include "fst/fst_defs.h" struct fst_iface * fst_iface_create(struct fst_group *g, const char *ifname, const u8 *own_addr, const ...
google
android
fst_group
.c
platform/external/wpa_supplicant_8/src/fst/fst_group.c
13,605
utf_8
a5d5232a75b8ca9669f4676c22eac9d5
/* * FST module - FST group object implementation * See README for more details. */ #include "utils/includes.h" #include "utils/common.h" #include "common/defs.h" #include "common/ieee802_11_defs.h" #include "common/ieee802_11_common.h" #include "drivers/driver.h" #include "fst/fst_internal.h" #include "fst/fst_defs...
google
android
fst_ctrl_iface
.c
platform/external/wpa_supplicant_8/src/fst/fst_ctrl_iface.c
23,472
utf_8
8ca2bb18bb0ad09f76f0d95f40f681f0
/* * FST module - Control Interface implementation * See README for more details. */ #include "utils/includes.h" #include "utils/common.h" #include "common/defs.h" #include "list.h" #include "fst/fst.h" #include "fst/fst_internal.h" #include "fst_ctrl_defs.h" #include "fst_ctrl_iface.h" static struct fst_group * get...
google
android
fst_ctrl_aux
.c
platform/external/wpa_supplicant_8/src/fst/fst_ctrl_aux.c
1,985
utf_8
ceac74dfdc6ea3d84fd5547ba4ecc0bc
/* * FST module implementation * See README for more details. */ #include "utils/includes.h" #include "utils/common.h" #include "common/defs.h" #include "fst_ctrl_defs.h" #include "fst_ctrl_aux.h" static const char *session_event_names[] = { [EVENT_FST_ESTABLISHED] = FST_PVAL_EVT_TYPE_ESTABLISHED, [EVENT_FST_SETUP...
google
android
aes-ctr
.c
platform/external/wpa_supplicant_8/src/crypto/aes-ctr.c
1,677
utf_8
a7fcb045801f86712102ee160afff13e
/* * AES-128/192/256 CTR * * Returns: 0 on success, -1 on failure */ int aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce, u8 *data, size_t data_len) { void *ctx; size_t j, len, left = data_len; int i; u8 *pos = data; u8 counter[AES_BLOCK_SIZE], buf[AES_BLOCK_SIZE]; ctx = aes_encrypt_init(...
google
android
aes-ccm
.c
platform/external/wpa_supplicant_8/src/crypto/aes-ccm.c
5,043
utf_8
cbf175c428ed6b1cbe7010e058ba0999
/* * Counter with CBC-MAC (CCM) with AES * * See README for more details. */ #include "includes.h" #include "common.h" #include "aes.h" #include "aes_wrap.h" static void xor_aes_block(u8 *dst, const u8 *src) { u32 *d = (u32 *) dst; u32 *s = (u32 *) src; *d++ ^= *s++; *d++ ^= *s++; *d++ ^= *s++; *d++ ^= *s++; ...
google
android
crypto_gnutls
.c
platform/external/wpa_supplicant_8/src/crypto/crypto_gnutls.c
11,729
utf_8
eb05bf4a400d177b9eb5a8d1b9f63414
/* * WPA Supplicant / wrapper functions for libgcrypt * See README for more details. */ #include "includes.h" #include <gcrypt.h> #include "common.h" #include "md5.h" #include "sha1.h" #include "sha256.h" #include "sha384.h" #include "sha512.h" #include "crypto.h" static int gnutls_digest_vector(int algo, size_t num...
google
android
aes-siv
.c
platform/external/wpa_supplicant_8/src/crypto/aes-siv.c
4,161
utf_8
7eca0fccff9469329604b13d97a2cd6b
/* * AES SIV (RFC 5297) * See README for more details. */ #include "includes.h" #include "common.h" #include "aes.h" #include "aes_wrap.h" #include "aes_siv.h" static const u8 zero[AES_BLOCK_SIZE]; static void dbl(u8 *pad) { int i, carry; carry = pad[0] & 0x80; for (i = 0; i < AES_BLOCK_SIZE - 1; i++) pad[i] = ...
google
android
sha384-kdf
.c
platform/external/wpa_supplicant_8/src/crypto/sha384-kdf.c
2,135
utf_8
e96b2b5b8c2e10f96666ec71a1c00956
/* * HMAC-SHA384 KDF (RFC 5295) and HKDF-Expand(SHA384) (RFC 5869) * Returns: 0 on success, -1 on failure. * * This function is used to derive new, cryptographically separate keys from a * given key in ERP. This KDF is defined in RFC 5295, Chapter 3.1.2. When used * with label = NULL and seed = info, this matches...
google
android
crypto_wolfssl
.c
platform/external/wpa_supplicant_8/src/crypto/crypto_wolfssl.c
41,968
utf_8
c60463673172a8961fd32e19f9972d33
/* * Wrapper functions for libwolfssl * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto.h" /* wolfSSL headers */ #include <wolfssl/options.h> #include <wolfssl/wolfcrypt/md4.h> #include <wolfssl/wolfcrypt/md5.h> #include <wolfssl/wolfcrypt/sha.h> #include <wolfssl/wolfcrypt...
google
android
crypto_internal
.c
platform/external/wpa_supplicant_8/src/crypto/crypto_internal.c
7,040
utf_8
319c61d5b59836c007cd975757f275c9
/* * Crypto wrapper for internal crypto implementation * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto.h" #include "sha256_i.h" #include "sha384_i.h" #include "sha512_i.h" #include "sha1_i.h" #include "md5_i.h" struct crypto_hash { enum crypto_hash_alg alg; union { st...
google
android
aes-eax
.c
platform/external/wpa_supplicant_8/src/crypto/aes-eax.c
3,320
utf_8
5cd2c01fc613609dbf6944ca1fe25c12
/* * AES-128 EAX * * Returns: 0 on success, -1 on failure */ int aes_128_eax_encrypt(const u8 *key, const u8 *nonce, size_t nonce_len, const u8 *hdr, size_t hdr_len, u8 *data, size_t data_len, u8 *tag) { u8 *buf; size_t buf_len; u8 nonce_mac[AES_BLOCK_SIZE], hdr_mac[AES_BLOCK_SIZE], data_mac[AES_BLOCK_SI...
google
android
md5
.c
platform/external/wpa_supplicant_8/src/crypto/md5.c
2,705
utf_8
cf7f9c4dbfb55e9b0ce79b8ab7f419d5
/* * MD5 hash implementation and interface functions * Returns: 0 on success, -1 on failure */ int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) { u8 k_pad[64]; /* padding - key XORd with ipad/opad */ u8 tk[16]; const u8 *_addr[6]; size_t i, _...
google
android
crypto_internal-modexp
.c
platform/external/wpa_supplicant_8/src/crypto/crypto_internal-modexp.c
3,024
utf_8
d5a09f2ba2452c36b88edf6ebc2a22c1
/* * Crypto wrapper for internal crypto implementation - modexp * See README for more details. */ #include "includes.h" #include "common.h" #include "tls/bignum.h" #include "crypto.h" int crypto_dh_init(u8 generator, const u8 *prime, size_t prime_len, u8 *privkey, u8 *pubkey) { size_t pubkey_len, pad; if (os_...
google
android
random
.c
platform/external/wpa_supplicant_8/src/crypto/random.c
12,178
utf_8
aca9a2897b714d2070e86a089d2db841
/* * Random number generator * See README for more details. * * This random number generator is used to provide additional entropy to the * one provided by the operating system (os_get_random()) for session key * generation. The os_get_random() output is expected to be secure and the * implementation here is exp...
google
android
sha1
.c
platform/external/wpa_supplicant_8/src/crypto/sha1.c
2,751
utf_8
fc5bb9cf38ef6d20f502573e1afab7dd
/* * SHA1 hash implementation and interface functions * Returns: 0 on success, -1 on failure */ int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) { unsigned char k_pad[64]; /* padding - key XORd with ipad/opad */ unsigned char tk[20]; const u...
google
android
dh_groups
.c
platform/external/wpa_supplicant_8/src/crypto/dh_groups.c
55,566
utf_8
a476e57910651b67aa6a0c97d2080e32
/* * Diffie-Hellman groups * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto.h" #include "random.h" #include "dh_groups.h" #ifdef ALL_DH_GROUPS /* RFC 4306, B.1. Group 1 - 768 Bit MODP * Generator: 2 * Prime: 2^768 - 2 ^704 - 1 + 2^64 * { [2^638 pi] + 149686 } */ static ...
google
android
sha256-internal
.c
platform/external/wpa_supplicant_8/src/crypto/sha256-internal.c
6,140
utf_8
9fc8323c9c4130ae4b868390410a459a
/* * SHA-256 hash implementation and interface functions * See README for more details. */ #include "includes.h" #include "common.h" #include "sha256.h" #include "sha256_i.h" #include "crypto.h" /** * sha256_vector - SHA256 hash for data vector * Returns: 0 on success, -1 of failure */ int sha256_vector(size_t nu...
google
android
aes-unwrap
.c
platform/external/wpa_supplicant_8/src/crypto/aes-unwrap.c
1,818
utf_8
3e8c7475ab3ebcb0c55e0e0ac2b2ad59
/* * AES key unwrap (RFC3394) * * Returns: 0 on success, -1 on failure (e.g., integrity verification failed) */ int aes_unwrap(const u8 *kek, size_t kek_len, int n, const u8 *cipher, u8 *plain) { u8 a[8], *r, b[AES_BLOCK_SIZE]; int i, j; void *ctx; unsigned int t; /* 1) Initialize variables. */ os_mem...
google
android
des-internal
.c
platform/external/wpa_supplicant_8/src/crypto/des-internal.c
15,188
utf_8
17be936bfa2197cbe6612d9bef09829c
/* * DES and 3DES-EDE ciphers * * Modifications to LibTomCrypt implementation: * See README for more details. */ #include "includes.h" #include "common.h" #include "crypto.h" #include "des_i.h" /* * This implementation is based on a DES implementation included in * LibTomCrypt. The version here is modified to fi...
google
android
crypto_linux
.c
platform/external/wpa_supplicant_8/src/crypto/crypto_linux.c
22,319
utf_8
d8116468e7666b787b8b4bf6be093463
/* * Crypto wrapper for Linux kernel AF_ALG * See README for more details. */ #include "includes.h" #include <linux/if_alg.h> #include "common.h" #include "crypto.h" #include "md5.h" #include "sha1.h" #include "sha256.h" #include "sha384.h" #include "aes.h" #ifndef SOL_ALG #define SOL_ALG 279 #endif /* SOL_ALG */ st...
google
android
aes-cbc
.c
platform/external/wpa_supplicant_8/src/crypto/aes-cbc.c
1,972
utf_8
b7a50581bbc9c546a558d30cf2747323
/* * AES-128 CBC * * Returns: 0 on success, -1 on failure */ int aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data, size_t data_len) { void *ctx; u8 cbc[AES_BLOCK_SIZE]; u8 *pos = data; int i, j, blocks; if (TEST_FAIL()) return -1; ctx = aes_encrypt_init(key, 16); if (ctx == NULL) return -1; os_...
google
android
aes-internal-enc
.c
platform/external/wpa_supplicant_8/src/crypto/aes-internal-enc.c
2,721
utf_8
b0dc128cb33aa13c8fa2713adec875ef
/* * AES (Rijndael) cipher - encrypt * * Modifications to public domain implementation: * - cleanup * - use C pre-processor to make it easier to change S table access * - added option (AES_SMALL_TABLES) for reducing code size by about 8 kB at * cost of reduced throughput (quite small difference on Pentium 4, ...
google
android
aes-internal-dec
.c
platform/external/wpa_supplicant_8/src/crypto/aes-internal-dec.c
3,724
utf_8
e9bc628ed747c194b7726cbd4f456c11
/* * AES (Rijndael) cipher - decrypt * * Modifications to public domain implementation: * - cleanup * - use C pre-processor to make it easier to change S table access * - added option (AES_SMALL_TABLES) for reducing code size by about 8 kB at * cost of reduced throughput (quite small difference on Pentium 4, ...
google
android
tls_openssl_ocsp
.c
platform/external/wpa_supplicant_8/src/crypto/tls_openssl_ocsp.c
20,905
utf_8
d432c5cea7e20f9e562452c2bb84f4bc
/* * SSL/TLS interface functions for OpenSSL - BoringSSL OCSP * See README for more details. */ #include "includes.h" #include <openssl/ssl.h> #include <openssl/err.h> #include <openssl/x509v3.h> #ifdef OPENSSL_IS_BORINGSSL #include <openssl/asn1.h> #include <openssl/asn1t.h> #endif /* OPENSSL_IS_BORINGSSL */ #inclu...
google
android
aes-omac1
.c
platform/external/wpa_supplicant_8/src/crypto/aes-omac1.c
4,571
utf_8
2215fa4978837919d1f4635be80aa867
/* * One-key CBC MAC (OMAC1) hash with AES * * See README for more details. */ #include "includes.h" #include "common.h" #include "aes.h" #include "aes_wrap.h" static void gf_mulx(u8 *pad) { int i, carry; carry = pad[0] & 0x80; for (i = 0; i < AES_BLOCK_SIZE - 1; i++) pad[i] = (pad[i] << 1) | (pad[i + 1] >> 7)...
google
android
aes-encblock
.c
platform/external/wpa_supplicant_8/src/crypto/aes-encblock.c
704
utf_8
b52309bbeb3e5b9a3a2769c168694eb5
/* * AES encrypt_block * * Returns: 0 on success, -1 on failure */ int aes_128_encrypt_block(const u8 *key, const u8 *in, u8 *out) { void *ctx; ctx = aes_encrypt_init(key, 16); if (ctx == NULL) return -1; aes_encrypt(ctx, in, out); aes_encrypt_deinit(ctx); return 0; }
google
android
sha256-prf
.c
platform/external/wpa_supplicant_8/src/crypto/sha256-prf.c
2,905
utf_8
325cb20c132a767083d7de2fbde62851
/* * SHA256-based PRF (IEEE 802.11r) * Returns: 0 on success, -1 on failure * * This function is used to derive new, cryptographically separate keys from a * given key. */ int sha256_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 sha256_...