Lines Matching refs:eap
1576 if (!errors && ssid->eap.eap_methods) { in wpa_config_parse_eap()
1580 prev_m = ssid->eap.eap_methods; in wpa_config_parse_eap()
1604 os_free(ssid->eap.eap_methods); in wpa_config_parse_eap()
1605 ssid->eap.eap_methods = methods; in wpa_config_parse_eap()
1616 const struct eap_method_type *eap_methods = ssid->eap.eap_methods; in wpa_config_write_eap()
1654 if (!ssid->eap.password) in wpa_config_parse_password()
1657 bin_clear_free(ssid->eap.password, ssid->eap.password_len); in wpa_config_parse_password()
1658 ssid->eap.password = NULL; in wpa_config_parse_password()
1659 ssid->eap.password_len = 0; in wpa_config_parse_password()
1668 bin_clear_free(ssid->eap.password, ssid->eap.password_len); in wpa_config_parse_password()
1669 ssid->eap.password = (u8 *) name; in wpa_config_parse_password()
1670 ssid->eap.password_len = os_strlen(name); in wpa_config_parse_password()
1671 ssid->eap.flags &= ~EAP_CONFIG_FLAGS_PASSWORD_NTHASH; in wpa_config_parse_password()
1672 ssid->eap.flags |= EAP_CONFIG_FLAGS_EXT_PASSWORD; in wpa_config_parse_password()
1690 bin_clear_free(ssid->eap.password, ssid->eap.password_len); in wpa_config_parse_password()
1691 ssid->eap.password = (u8 *) tmp; in wpa_config_parse_password()
1692 ssid->eap.password_len = res_len; in wpa_config_parse_password()
1693 ssid->eap.flags &= ~EAP_CONFIG_FLAGS_PASSWORD_NTHASH; in wpa_config_parse_password()
1694 ssid->eap.flags &= ~EAP_CONFIG_FLAGS_EXT_PASSWORD; in wpa_config_parse_password()
1720 if (ssid->eap.password && ssid->eap.password_len == 16 && in wpa_config_parse_password()
1721 os_memcmp(ssid->eap.password, hash, 16) == 0 && in wpa_config_parse_password()
1722 (ssid->eap.flags & EAP_CONFIG_FLAGS_PASSWORD_NTHASH)) { in wpa_config_parse_password()
1726 bin_clear_free(ssid->eap.password, ssid->eap.password_len); in wpa_config_parse_password()
1727 ssid->eap.password = hash; in wpa_config_parse_password()
1728 ssid->eap.password_len = 16; in wpa_config_parse_password()
1729 ssid->eap.flags |= EAP_CONFIG_FLAGS_PASSWORD_NTHASH; in wpa_config_parse_password()
1730 ssid->eap.flags &= ~EAP_CONFIG_FLAGS_EXT_PASSWORD; in wpa_config_parse_password()
1743 if (!ssid->eap.machine_password) in wpa_config_parse_machine_password()
1747 bin_clear_free(ssid->eap.machine_password, in wpa_config_parse_machine_password()
1748 ssid->eap.machine_password_len); in wpa_config_parse_machine_password()
1749 ssid->eap.machine_password = NULL; in wpa_config_parse_machine_password()
1750 ssid->eap.machine_password_len = 0; in wpa_config_parse_machine_password()
1760 bin_clear_free(ssid->eap.machine_password, in wpa_config_parse_machine_password()
1761 ssid->eap.machine_password_len); in wpa_config_parse_machine_password()
1762 ssid->eap.machine_password = (u8 *) name; in wpa_config_parse_machine_password()
1763 ssid->eap.machine_password_len = os_strlen(name); in wpa_config_parse_machine_password()
1764 ssid->eap.flags &= ~EAP_CONFIG_FLAGS_MACHINE_PASSWORD_NTHASH; in wpa_config_parse_machine_password()
1765 ssid->eap.flags |= EAP_CONFIG_FLAGS_EXT_MACHINE_PASSWORD; in wpa_config_parse_machine_password()
1784 bin_clear_free(ssid->eap.machine_password, in wpa_config_parse_machine_password()
1785 ssid->eap.machine_password_len); in wpa_config_parse_machine_password()
1786 ssid->eap.machine_password = (u8 *) tmp; in wpa_config_parse_machine_password()
1787 ssid->eap.machine_password_len = res_len; in wpa_config_parse_machine_password()
1788 ssid->eap.flags &= ~EAP_CONFIG_FLAGS_MACHINE_PASSWORD_NTHASH; in wpa_config_parse_machine_password()
1789 ssid->eap.flags &= ~EAP_CONFIG_FLAGS_EXT_MACHINE_PASSWORD; in wpa_config_parse_machine_password()
1816 if (ssid->eap.machine_password && in wpa_config_parse_machine_password()
1817 ssid->eap.machine_password_len == 16 && in wpa_config_parse_machine_password()
1818 os_memcmp(ssid->eap.machine_password, hash, 16) == 0 && in wpa_config_parse_machine_password()
1819 (ssid->eap.flags & EAP_CONFIG_FLAGS_MACHINE_PASSWORD_NTHASH)) { in wpa_config_parse_machine_password()
1823 bin_clear_free(ssid->eap.machine_password, in wpa_config_parse_machine_password()
1824 ssid->eap.machine_password_len); in wpa_config_parse_machine_password()
1825 ssid->eap.machine_password = hash; in wpa_config_parse_machine_password()
1826 ssid->eap.machine_password_len = 16; in wpa_config_parse_machine_password()
1827 ssid->eap.flags |= EAP_CONFIG_FLAGS_MACHINE_PASSWORD_NTHASH; in wpa_config_parse_machine_password()
1828 ssid->eap.flags &= ~EAP_CONFIG_FLAGS_EXT_MACHINE_PASSWORD; in wpa_config_parse_machine_password()
1841 if (!ssid->eap.password) in wpa_config_write_password()
1845 if (ssid->eap.flags & EAP_CONFIG_FLAGS_EXT_PASSWORD) { in wpa_config_write_password()
1846 buf = os_zalloc(4 + ssid->eap.password_len + 1); in wpa_config_write_password()
1850 os_memcpy(buf + 4, ssid->eap.password, ssid->eap.password_len); in wpa_config_write_password()
1855 if (!(ssid->eap.flags & EAP_CONFIG_FLAGS_PASSWORD_NTHASH)) { in wpa_config_write_password()
1857 ssid->eap.password, ssid->eap.password_len); in wpa_config_write_password()
1865 wpa_snprintf_hex(buf + 5, 32 + 1, ssid->eap.password, 16); in wpa_config_write_password()
1876 if (!ssid->eap.machine_password) in wpa_config_write_machine_password()
1880 if (ssid->eap.flags & EAP_CONFIG_FLAGS_EXT_MACHINE_PASSWORD) { in wpa_config_write_machine_password()
1881 buf = os_zalloc(4 + ssid->eap.machine_password_len + 1); in wpa_config_write_machine_password()
1885 os_memcpy(buf + 4, ssid->eap.machine_password, in wpa_config_write_machine_password()
1886 ssid->eap.machine_password_len); in wpa_config_write_machine_password()
1891 if (!(ssid->eap.flags & EAP_CONFIG_FLAGS_MACHINE_PASSWORD_NTHASH)) { in wpa_config_write_machine_password()
1893 ssid->eap.machine_password, in wpa_config_write_machine_password()
1894 ssid->eap.machine_password_len); in wpa_config_write_machine_password()
1902 wpa_snprintf_hex(buf + 5, 32 + 1, ssid->eap.machine_password, 16); in wpa_config_write_machine_password()
2335 #define _STRe(f, m) #f, wpa_config_parse_str, OFFSET(eap.m)
2339 OFFSET(eap.m)
2350 #define _STR_LENe(f, m) _STRe(f, m), OFFSET(eap.m ## _len)
2363 #define _INTe(f, m) #f, wpa_config_parse_int, OFFSET(eap.m), (void *) 0
2368 OFFSET(eap.m), (void *) 0
2442 { FUNC(eap) },
2771 static void eap_peer_config_free(struct eap_peer_config *eap) in eap_peer_config_free() argument
2773 os_free(eap->eap_methods); in eap_peer_config_free()
2774 bin_clear_free(eap->identity, eap->identity_len); in eap_peer_config_free()
2775 os_free(eap->anonymous_identity); in eap_peer_config_free()
2776 os_free(eap->imsi_identity); in eap_peer_config_free()
2777 os_free(eap->machine_identity); in eap_peer_config_free()
2778 bin_clear_free(eap->password, eap->password_len); in eap_peer_config_free()
2779 bin_clear_free(eap->machine_password, eap->machine_password_len); in eap_peer_config_free()
2780 eap_peer_config_free_cert(&eap->cert); in eap_peer_config_free()
2781 eap_peer_config_free_cert(&eap->phase2_cert); in eap_peer_config_free()
2782 eap_peer_config_free_cert(&eap->machine_cert); in eap_peer_config_free()
2783 os_free(eap->phase1); in eap_peer_config_free()
2784 os_free(eap->phase2); in eap_peer_config_free()
2785 os_free(eap->machine_phase2); in eap_peer_config_free()
2786 os_free(eap->pcsc); in eap_peer_config_free()
2787 os_free(eap->otp); in eap_peer_config_free()
2788 os_free(eap->pending_req_otp); in eap_peer_config_free()
2789 os_free(eap->pac_file); in eap_peer_config_free()
2790 bin_clear_free(eap->new_password, eap->new_password_len); in eap_peer_config_free()
2791 str_clear_free(eap->external_sim_resp); in eap_peer_config_free()
2792 os_free(eap->openssl_ciphers); in eap_peer_config_free()
2815 eap_peer_config_free(&ssid->eap); in wpa_config_free_ssid()
3108 ssid->eap.fragment_size = DEFAULT_FRAGMENT_SIZE; in wpa_config_set_network_defaults()
3109 ssid->eap.sim_num = DEFAULT_USER_SELECTED_SIM; in wpa_config_set_network_defaults()