├── .gitignore ├── Android.mk ├── CONTRIBUTIONS ├── COPYING ├── README ├── README.md ├── build_release ├── doc ├── .gitignore ├── Makefile ├── code_structure.doxygen ├── ctrl_iface.doxygen ├── dbus.doxygen ├── directories.doxygen ├── doxygen.conf ├── driver_wrapper.doxygen ├── eap.doxygen ├── eap_server.doxygen ├── hostapd.fig ├── hostapd_ctrl_iface.doxygen ├── mainpage.doxygen ├── p2p.doxygen ├── p2p_arch.dot ├── p2p_arch2.dot ├── p2p_sm.dot ├── porting.doxygen ├── testing_tools.doxygen └── wpa_supplicant.fig ├── eap_example ├── .gitignore ├── Makefile ├── README ├── ca.pem ├── dh.conf ├── eap_example.c ├── eap_example_peer.c ├── eap_example_server.c ├── server-key.pem ├── server.key └── server.pem ├── hostapd ├── .gitignore ├── Android.mk ├── ChangeLog ├── Makefile ├── README ├── README-MULTI-AP ├── README-WPS ├── android.config ├── config_file.c ├── config_file.h ├── ctrl_iface.c ├── ctrl_iface.h ├── defconfig ├── eap_register.c ├── eap_register.h ├── eap_testing.txt ├── example_key.der ├── hapd_module_tests.c ├── hlr_auc_gw.c ├── hlr_auc_gw.milenage_db ├── hlr_auc_gw.txt ├── hostapd.8 ├── hostapd.accept ├── hostapd.android.rc ├── hostapd.conf ├── hostapd.deny ├── hostapd.eap_user ├── hostapd.eap_user_sqlite ├── hostapd.radius_clients ├── hostapd.sim_db ├── hostapd.vlan ├── hostapd.wpa_psk ├── hostapd_cli.1 ├── hostapd_cli.c ├── hostapd_sae_pk.conf ├── hostapd_wpa3.conf ├── logwatch │ ├── README │ ├── hostapd │ └── hostapd.conf ├── main.c ├── nt_password_hash.c ├── sae_pk_gen.c ├── wired.conf └── wps-ap-nfc.py ├── hs20 ├── client │ ├── .gitignore │ ├── Android.mk │ ├── Makefile │ ├── devdetail.xml │ ├── devinfo.xml │ ├── est.c │ ├── oma_dm_client.c │ ├── osu_client.c │ ├── osu_client.h │ └── spp_client.c └── server │ ├── .gitignore │ ├── Makefile │ ├── ca │ ├── clean.sh │ ├── est-csrattrs.cnf │ ├── est-csrattrs.sh │ ├── hs20.oid │ ├── ocsp-req.sh │ ├── ocsp-responder-ica.sh │ ├── ocsp-responder.sh │ ├── ocsp-update-cache.sh │ ├── openssl-root.cnf │ ├── openssl.cnf │ ├── setup.sh │ └── w1fi_logo.png │ ├── hs20-osu-server.txt │ ├── hs20_spp_server.c │ ├── spp_server.c │ ├── spp_server.h │ ├── sql-example.txt │ ├── sql.txt │ └── www │ ├── add-free.php │ ├── add-mo.php │ ├── cert-enroll.php │ ├── config.php │ ├── est.php │ ├── free-remediation.php │ ├── free.php │ ├── redirect.php │ ├── remediation-pw.php │ ├── remediation.php │ ├── signup.php │ ├── spp.php │ ├── terms.php │ └── users.php ├── radius_example ├── .gitignore ├── Makefile ├── README └── radius_example.c ├── src ├── Makefile ├── ap │ ├── Makefile │ ├── accounting.c │ ├── accounting.h │ ├── acs.c │ ├── acs.h │ ├── airtime_policy.c │ ├── airtime_policy.h │ ├── ap_config.c │ ├── ap_config.h │ ├── ap_drv_ops.c │ ├── ap_drv_ops.h │ ├── ap_list.c │ ├── ap_list.h │ ├── ap_mlme.c │ ├── ap_mlme.h │ ├── authsrv.c │ ├── authsrv.h │ ├── beacon.c │ ├── beacon.h │ ├── bss_load.c │ ├── bss_load.h │ ├── ctrl_iface_ap.c │ ├── ctrl_iface_ap.h │ ├── dfs.c │ ├── dfs.h │ ├── dhcp_snoop.c │ ├── dhcp_snoop.h │ ├── dpp_hostapd.c │ ├── dpp_hostapd.h │ ├── drv_callbacks.c │ ├── eap_user_db.c │ ├── eth_p_oui.c │ ├── eth_p_oui.h │ ├── fils_hlp.c │ ├── fils_hlp.h │ ├── gas_query_ap.c │ ├── gas_query_ap.h │ ├── gas_serv.c │ ├── gas_serv.h │ ├── hostapd.c │ ├── hostapd.h │ ├── hs20.c │ ├── hs20.h │ ├── hw_features.c │ ├── hw_features.h │ ├── ieee802_11.c │ ├── ieee802_11.h │ ├── ieee802_11_auth.c │ ├── ieee802_11_auth.h │ ├── ieee802_11_eht.c │ ├── ieee802_11_he.c │ ├── ieee802_11_ht.c │ ├── ieee802_11_shared.c │ ├── ieee802_11_vht.c │ ├── ieee802_1x.c │ ├── ieee802_1x.h │ ├── mbo_ap.c │ ├── mbo_ap.h │ ├── ndisc_snoop.c │ ├── ndisc_snoop.h │ ├── neighbor_db.c │ ├── neighbor_db.h │ ├── p2p_hostapd.c │ ├── p2p_hostapd.h │ ├── pmksa_cache_auth.c │ ├── pmksa_cache_auth.h │ ├── preauth_auth.c │ ├── preauth_auth.h │ ├── rrm.c │ ├── rrm.h │ ├── sta_info.c │ ├── sta_info.h │ ├── taxonomy.c │ ├── taxonomy.h │ ├── tkip_countermeasures.c │ ├── tkip_countermeasures.h │ ├── utils.c │ ├── vlan.c │ ├── vlan.h │ ├── vlan_full.c │ ├── vlan_ifconfig.c │ ├── vlan_init.c │ ├── vlan_init.h │ ├── vlan_ioctl.c │ ├── vlan_util.c │ ├── vlan_util.h │ ├── wmm.c │ ├── wmm.h │ ├── wnm_ap.c │ ├── wnm_ap.h │ ├── wpa_auth.c │ ├── wpa_auth.h │ ├── wpa_auth_ft.c │ ├── wpa_auth_glue.c │ ├── wpa_auth_glue.h │ ├── wpa_auth_i.h │ ├── wpa_auth_ie.c │ ├── wpa_auth_ie.h │ ├── wpa_auth_kay.c │ ├── wpa_auth_kay.h │ ├── wps_hostapd.c │ ├── wps_hostapd.h │ ├── x_snoop.c │ └── x_snoop.h ├── build.rules ├── common │ ├── Makefile │ ├── brcm_vendor.h │ ├── cli.c │ ├── cli.h │ ├── common_module_tests.c │ ├── ctrl_iface_common.c │ ├── ctrl_iface_common.h │ ├── defs.h │ ├── dhcp.h │ ├── dpp.c │ ├── dpp.h │ ├── dpp_auth.c │ ├── dpp_backup.c │ ├── dpp_crypto.c │ ├── dpp_i.h │ ├── dpp_pkex.c │ ├── dpp_reconfig.c │ ├── dpp_tcp.c │ ├── dragonfly.c │ ├── dragonfly.h │ ├── eapol_common.h │ ├── gas.c │ ├── gas.h │ ├── gas_server.c │ ├── gas_server.h │ ├── hw_features_common.c │ ├── hw_features_common.h │ ├── ieee802_11_common.c │ ├── ieee802_11_common.h │ ├── ieee802_11_defs.h │ ├── ieee802_1x_defs.h │ ├── linux_bridge.h │ ├── linux_vlan.h │ ├── ocv.c │ ├── ocv.h │ ├── privsep_commands.h │ ├── ptksa_cache.c │ ├── ptksa_cache.h │ ├── qca-vendor-attr.h │ ├── qca-vendor.h │ ├── sae.c │ ├── sae.h │ ├── sae_pk.c │ ├── tnc.h │ ├── version.h │ ├── wpa_common.c │ ├── wpa_common.h │ ├── wpa_ctrl.c │ ├── wpa_ctrl.h │ ├── wpa_helpers.c │ └── wpa_helpers.h ├── crypto │ ├── Makefile │ ├── aes-cbc.c │ ├── aes-ccm.c │ ├── aes-ctr.c │ ├── aes-eax.c │ ├── aes-encblock.c │ ├── aes-gcm.c │ ├── aes-internal-dec.c │ ├── aes-internal-enc.c │ ├── aes-internal.c │ ├── aes-omac1.c │ ├── aes-siv.c │ ├── aes-unwrap.c │ ├── aes-wrap.c │ ├── aes.h │ ├── aes_i.h │ ├── aes_siv.h │ ├── aes_wrap.h │ ├── crypto.h │ ├── crypto_gnutls.c │ ├── crypto_internal-cipher.c │ ├── crypto_internal-modexp.c │ ├── crypto_internal-rsa.c │ ├── crypto_internal.c │ ├── crypto_libtomcrypt.c │ ├── crypto_linux.c │ ├── crypto_module_tests.c │ ├── crypto_nettle.c │ ├── crypto_none.c │ ├── crypto_openssl.c │ ├── crypto_wolfssl.c │ ├── des-internal.c │ ├── des_i.h │ ├── dh_group5.c │ ├── dh_group5.h │ ├── dh_groups.c │ ├── dh_groups.h │ ├── fips_prf_internal.c │ ├── fips_prf_openssl.c │ ├── fips_prf_wolfssl.c │ ├── md4-internal.c │ ├── md5-internal.c │ ├── md5.c │ ├── md5.h │ ├── md5_i.h │ ├── milenage.c │ ├── milenage.h │ ├── ms_funcs.c │ ├── ms_funcs.h │ ├── random.c │ ├── random.h │ ├── rc4.c │ ├── sha1-internal.c │ ├── sha1-pbkdf2.c │ ├── sha1-prf.c │ ├── sha1-tlsprf.c │ ├── sha1-tprf.c │ ├── sha1.c │ ├── sha1.h │ ├── sha1_i.h │ ├── sha256-internal.c │ ├── sha256-kdf.c │ ├── sha256-prf.c │ ├── sha256-tlsprf.c │ ├── sha256.c │ ├── sha256.h │ ├── sha256_i.h │ ├── sha384-internal.c │ ├── sha384-kdf.c │ ├── sha384-prf.c │ ├── sha384-tlsprf.c │ ├── sha384.c │ ├── sha384.h │ ├── sha384_i.h │ ├── sha512-internal.c │ ├── sha512-kdf.c │ ├── sha512-prf.c │ ├── sha512.c │ ├── sha512.h │ ├── sha512_i.h │ ├── tls.h │ ├── tls_gnutls.c │ ├── tls_internal.c │ ├── tls_none.c │ ├── tls_openssl.c │ ├── tls_openssl.h │ ├── tls_openssl_ocsp.c │ └── tls_wolfssl.c ├── drivers │ ├── Makefile │ ├── android_drv.h │ ├── driver.h │ ├── driver_atheros.c │ ├── driver_bsd.c │ ├── driver_common.c │ ├── driver_hostap.c │ ├── driver_hostap.h │ ├── driver_macsec_linux.c │ ├── driver_macsec_qca.c │ ├── driver_ndis.c │ ├── driver_ndis.h │ ├── driver_ndis_.c │ ├── driver_nl80211.c │ ├── driver_nl80211.h │ ├── driver_nl80211_android.c │ ├── driver_nl80211_capa.c │ ├── driver_nl80211_event.c │ ├── driver_nl80211_monitor.c │ ├── driver_nl80211_scan.c │ ├── driver_none.c │ ├── driver_openbsd.c │ ├── driver_privsep.c │ ├── driver_roboswitch.c │ ├── driver_wext.c │ ├── driver_wext.h │ ├── driver_wired.c │ ├── driver_wired_common.c │ ├── driver_wired_common.h │ ├── drivers.c │ ├── drivers.mak │ ├── drivers.mk │ ├── linux_defines.h │ ├── linux_ioctl.c │ ├── linux_ioctl.h │ ├── linux_wext.h │ ├── ndis_events.c │ ├── netlink.c │ ├── netlink.h │ ├── nl80211_copy.h │ ├── priv_netlink.h │ ├── rfkill.c │ └── rfkill.h ├── eap_common │ ├── Makefile │ ├── chap.c │ ├── chap.h │ ├── eap_common.c │ ├── eap_common.h │ ├── eap_defs.h │ ├── eap_eke_common.c │ ├── eap_eke_common.h │ ├── eap_fast_common.c │ ├── eap_fast_common.h │ ├── eap_gpsk_common.c │ ├── eap_gpsk_common.h │ ├── eap_ikev2_common.c │ ├── eap_ikev2_common.h │ ├── eap_pax_common.c │ ├── eap_pax_common.h │ ├── eap_peap_common.c │ ├── eap_peap_common.h │ ├── eap_psk_common.c │ ├── eap_psk_common.h │ ├── eap_pwd_common.c │ ├── eap_pwd_common.h │ ├── eap_sake_common.c │ ├── eap_sake_common.h │ ├── eap_sim_common.c │ ├── eap_sim_common.h │ ├── eap_teap_common.c │ ├── eap_teap_common.h │ ├── eap_tlv_common.h │ ├── eap_ttls.h │ ├── eap_wsc_common.c │ ├── eap_wsc_common.h │ ├── ikev2_common.c │ └── ikev2_common.h ├── eap_peer │ ├── .gitignore │ ├── Makefile │ ├── eap.c │ ├── eap.h │ ├── eap_aka.c │ ├── eap_config.h │ ├── eap_eke.c │ ├── eap_fast.c │ ├── eap_fast_pac.c │ ├── eap_fast_pac.h │ ├── eap_gpsk.c │ ├── eap_gtc.c │ ├── eap_i.h │ ├── eap_ikev2.c │ ├── eap_leap.c │ ├── eap_md5.c │ ├── eap_methods.c │ ├── eap_methods.h │ ├── eap_mschapv2.c │ ├── eap_otp.c │ ├── eap_pax.c │ ├── eap_peap.c │ ├── eap_proxy.h │ ├── eap_proxy_dummy.c │ ├── eap_psk.c │ ├── eap_pwd.c │ ├── eap_sake.c │ ├── eap_sim.c │ ├── eap_teap.c │ ├── eap_teap_pac.c │ ├── eap_teap_pac.h │ ├── eap_tls.c │ ├── eap_tls_common.c │ ├── eap_tls_common.h │ ├── eap_tnc.c │ ├── eap_ttls.c │ ├── eap_vendor_test.c │ ├── eap_wsc.c │ ├── ikev2.c │ ├── ikev2.h │ ├── mschapv2.c │ ├── mschapv2.h │ ├── tncc.c │ └── tncc.h ├── eap_server │ ├── Makefile │ ├── eap.h │ ├── eap_i.h │ ├── eap_methods.h │ ├── eap_server.c │ ├── eap_server_aka.c │ ├── eap_server_eke.c │ ├── eap_server_fast.c │ ├── eap_server_gpsk.c │ ├── eap_server_gtc.c │ ├── eap_server_identity.c │ ├── eap_server_ikev2.c │ ├── eap_server_md5.c │ ├── eap_server_methods.c │ ├── eap_server_mschapv2.c │ ├── eap_server_pax.c │ ├── eap_server_peap.c │ ├── eap_server_psk.c │ ├── eap_server_pwd.c │ ├── eap_server_sake.c │ ├── eap_server_sim.c │ ├── eap_server_teap.c │ ├── eap_server_tls.c │ ├── eap_server_tls_common.c │ ├── eap_server_tnc.c │ ├── eap_server_ttls.c │ ├── eap_server_vendor_test.c │ ├── eap_server_wsc.c │ ├── eap_sim_db.c │ ├── eap_sim_db.h │ ├── eap_tls_common.h │ ├── ikev2.c │ ├── ikev2.h │ ├── tncs.c │ └── tncs.h ├── eapol_auth │ ├── Makefile │ ├── eapol_auth_dump.c │ ├── eapol_auth_sm.c │ ├── eapol_auth_sm.h │ └── eapol_auth_sm_i.h ├── eapol_supp │ ├── Makefile │ ├── eapol_supp_sm.c │ └── eapol_supp_sm.h ├── fst │ ├── Makefile │ ├── fst.c │ ├── fst.h │ ├── fst_ctrl_aux.c │ ├── fst_ctrl_aux.h │ ├── fst_ctrl_defs.h │ ├── fst_ctrl_iface.c │ ├── fst_ctrl_iface.h │ ├── fst_defs.h │ ├── fst_group.c │ ├── fst_group.h │ ├── fst_iface.c │ ├── fst_iface.h │ ├── fst_internal.h │ ├── fst_session.c │ └── fst_session.h ├── l2_packet │ ├── Makefile │ ├── l2_packet.h │ ├── l2_packet_freebsd.c │ ├── l2_packet_linux.c │ ├── l2_packet_ndis.c │ ├── l2_packet_none.c │ ├── l2_packet_pcap.c │ ├── l2_packet_privsep.c │ └── l2_packet_winpcap.c ├── lib.rules ├── objs.mk ├── p2p │ ├── Makefile │ ├── p2p.c │ ├── p2p.h │ ├── p2p_build.c │ ├── p2p_dev_disc.c │ ├── p2p_go_neg.c │ ├── p2p_group.c │ ├── p2p_i.h │ ├── p2p_invitation.c │ ├── p2p_parse.c │ ├── p2p_pd.c │ ├── p2p_sd.c │ └── p2p_utils.c ├── pae │ ├── Makefile │ ├── ieee802_1x_cp.c │ ├── ieee802_1x_cp.h │ ├── ieee802_1x_kay.c │ ├── ieee802_1x_kay.h │ ├── ieee802_1x_kay_i.h │ ├── ieee802_1x_key.c │ ├── ieee802_1x_key.h │ ├── ieee802_1x_secy_ops.c │ └── ieee802_1x_secy_ops.h ├── radius │ ├── Makefile │ ├── radius.c │ ├── radius.h │ ├── radius_client.c │ ├── radius_client.h │ ├── radius_das.c │ ├── radius_das.h │ ├── radius_server.c │ └── radius_server.h ├── rsn_supp │ ├── Makefile │ ├── pmksa_cache.c │ ├── pmksa_cache.h │ ├── preauth.c │ ├── preauth.h │ ├── tdls.c │ ├── wpa.c │ ├── wpa.h │ ├── wpa_ft.c │ ├── wpa_i.h │ ├── wpa_ie.c │ └── wpa_ie.h ├── tls │ ├── Makefile │ ├── asn1.c │ ├── asn1.h │ ├── bignum.c │ ├── bignum.h │ ├── libtommath.c │ ├── pkcs1.c │ ├── pkcs1.h │ ├── pkcs5.c │ ├── pkcs5.h │ ├── pkcs8.c │ ├── pkcs8.h │ ├── rsa.c │ ├── rsa.h │ ├── tlsv1_client.c │ ├── tlsv1_client.h │ ├── tlsv1_client_i.h │ ├── tlsv1_client_ocsp.c │ ├── tlsv1_client_read.c │ ├── tlsv1_client_write.c │ ├── tlsv1_common.c │ ├── tlsv1_common.h │ ├── tlsv1_cred.c │ ├── tlsv1_cred.h │ ├── tlsv1_record.c │ ├── tlsv1_record.h │ ├── tlsv1_server.c │ ├── tlsv1_server.h │ ├── tlsv1_server_i.h │ ├── tlsv1_server_read.c │ ├── tlsv1_server_write.c │ ├── x509v3.c │ └── x509v3.h ├── utils │ ├── Makefile │ ├── base64.c │ ├── base64.h │ ├── bitfield.c │ ├── bitfield.h │ ├── browser-android.c │ ├── browser-system.c │ ├── browser-wpadebug.c │ ├── browser.c │ ├── browser.h │ ├── build_config.h │ ├── common.c │ ├── common.h │ ├── config.c │ ├── config.h │ ├── const_time.h │ ├── crc32.c │ ├── crc32.h │ ├── edit.c │ ├── edit.h │ ├── edit_readline.c │ ├── edit_simple.c │ ├── eloop.c │ ├── eloop.h │ ├── eloop_win.c │ ├── ext_password.c │ ├── ext_password.h │ ├── ext_password_file.c │ ├── ext_password_i.h │ ├── ext_password_test.c │ ├── http-utils.h │ ├── http_curl.c │ ├── includes.h │ ├── ip_addr.c │ ├── ip_addr.h │ ├── json.c │ ├── json.h │ ├── list.h │ ├── module_tests.h │ ├── os.h │ ├── os_internal.c │ ├── os_none.c │ ├── os_unix.c │ ├── os_win32.c │ ├── pcsc_funcs.c │ ├── pcsc_funcs.h │ ├── platform.h │ ├── radiotap.c │ ├── radiotap.h │ ├── radiotap_iter.h │ ├── state_machine.h │ ├── trace.c │ ├── trace.h │ ├── utils_module_tests.c │ ├── uuid.c │ ├── uuid.h │ ├── wpa_debug.c │ ├── wpa_debug.h │ ├── wpabuf.c │ ├── wpabuf.h │ ├── xml-utils.c │ ├── xml-utils.h │ └── xml_libxml2.c └── wps │ ├── Makefile │ ├── http.h │ ├── http_client.c │ ├── http_client.h │ ├── http_server.c │ ├── http_server.h │ ├── httpread.c │ ├── httpread.h │ ├── ndef.c │ ├── upnp_xml.c │ ├── upnp_xml.h │ ├── wps.c │ ├── wps.h │ ├── wps_attr_build.c │ ├── wps_attr_parse.c │ ├── wps_attr_parse.h │ ├── wps_attr_process.c │ ├── wps_common.c │ ├── wps_defs.h │ ├── wps_dev_attr.c │ ├── wps_dev_attr.h │ ├── wps_enrollee.c │ ├── wps_er.c │ ├── wps_er.h │ ├── wps_er_ssdp.c │ ├── wps_i.h │ ├── wps_module_tests.c │ ├── wps_registrar.c │ ├── wps_upnp.c │ ├── wps_upnp.h │ ├── wps_upnp_ap.c │ ├── wps_upnp_event.c │ ├── wps_upnp_i.h │ ├── wps_upnp_ssdp.c │ ├── wps_upnp_web.c │ └── wps_validate.c ├── tests ├── .gitignore ├── Makefile ├── README ├── build │ ├── build-hostapd-empty.config │ ├── build-hostapd-internal.config │ ├── build-hostapd-minimal.config │ ├── build-hostapd.sh │ ├── build-wpa_supplicant-basic.config │ ├── build-wpa_supplicant-dbus_without_ap.config │ ├── build-wpa_supplicant-dpp-ap.config │ ├── build-wpa_supplicant-dpp.config │ ├── build-wpa_supplicant-empty.config │ ├── build-wpa_supplicant-gnutls.config │ ├── build-wpa_supplicant-internal.config │ ├── build-wpa_supplicant-libressl-2.8.config │ ├── build-wpa_supplicant-libressl-2.9.config │ ├── build-wpa_supplicant-libressl-3.4.config │ ├── build-wpa_supplicant-linux.config │ ├── build-wpa_supplicant-openssl-1.0.2.config │ ├── build-wpa_supplicant-openssl-1.1.0.config │ ├── build-wpa_supplicant-openssl-1.1.1.config │ ├── build-wpa_supplicant-p2p.config │ ├── build-wpa_supplicant-sim.config │ ├── build-wpa_supplicant.sh │ └── run-build-tests.sh ├── cipher-and-key-mgmt-testing.txt ├── fuzzing │ ├── README │ ├── ap-mgmt │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── ap-mgmt.c │ │ └── corpus │ │ │ ├── multi-sae-ffc.dat │ │ │ ├── multi-sae.dat │ │ │ └── multi.dat │ ├── asn1 │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── asn1.c │ │ └── corpus │ │ │ ├── ca.der │ │ │ ├── ocsp-multi-server-cache.der │ │ │ └── ocsp-req.der │ ├── build-test.sh │ ├── dpp-uri │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── corpus │ │ │ ├── 1.dat │ │ │ ├── 2.dat │ │ │ └── 3.dat │ │ └── dpp-uri.c │ ├── eap-aka-peer │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── corpus │ │ │ └── server.msg │ │ └── eap-aka-peer.c │ ├── eap-mschapv2-peer │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── corpus │ │ │ └── server.msg │ │ └── eap-mschapv2-peer.c │ ├── eap-sim-peer │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── corpus │ │ │ └── server.msg │ │ └── eap-sim-peer.c │ ├── eapol-key-auth │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── corpus │ │ │ └── supp.msg │ │ └── eapol-key-auth.c │ ├── eapol-key-supp │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── corpus │ │ │ └── auth.msg │ │ └── eapol-key-supp.c │ ├── eapol-supp │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── corpus │ │ │ ├── eap-req-identity.dat │ │ │ ├── eap-req-sim.dat │ │ │ └── eapol-key-m1.dat │ │ └── eapol-supp.c │ ├── fuzzer-common.c │ ├── fuzzer-common.h │ ├── json │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── corpus │ │ │ ├── 1.json │ │ │ ├── 2.json │ │ │ └── 3.json │ │ └── json.c │ ├── p2p │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── corpus │ │ │ ├── go-neg-req.dat │ │ │ ├── invitation-req.dat │ │ │ ├── p2ps-pd-req.dat │ │ │ ├── proberesp-go.dat │ │ │ └── proberesp.dat │ │ └── p2p.c │ ├── rules.include │ ├── sae │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── corpus │ │ │ ├── sae-commit-h2e-rejected-groups.dat │ │ │ ├── sae-commit-h2e-token.dat │ │ │ ├── sae-commit-pw-id.dat │ │ │ ├── sae-commit-token.dat │ │ │ └── sae-commit-valid.dat │ │ └── sae.c │ ├── tls-client │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── corpus │ │ │ └── server.msg │ │ └── tls-client.c │ ├── tls-server │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── corpus │ │ │ └── client.msg │ │ └── tls-server.c │ ├── wnm │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── corpus │ │ │ ├── bss-tm-req.dat │ │ │ ├── oss-fuzz-0001.dat │ │ │ ├── oss-fuzz-0002.dat │ │ │ └── wnm-notif.dat │ │ └── wnm.c │ └── x509 │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── corpus │ │ ├── ca.der │ │ └── oss-fuzz-15408 │ │ └── x509.c ├── hwsim │ ├── .gitignore │ ├── README │ ├── auth_serv │ │ ├── as.conf │ │ ├── as2.conf │ │ ├── ca-and-crl-expired.pem │ │ ├── ca-and-crl.pem │ │ ├── ca-incorrect-key.pem │ │ ├── ca-incorrect.der │ │ ├── ca-incorrect.pem │ │ ├── ca-key.pem │ │ ├── ca.der │ │ ├── ca.pem │ │ ├── dh.conf │ │ ├── dh2.conf │ │ ├── dh_param_3072.pem │ │ ├── dsaparam.pem │ │ ├── eap_user.conf │ │ ├── eap_user_vlan.conf │ │ ├── ec-ca-openssl.cnf │ │ ├── ec-ca.key │ │ ├── ec-ca.pem │ │ ├── ec-generate.sh │ │ ├── ec-server.key │ │ ├── ec-server.pem │ │ ├── ec-user.key │ │ ├── ec-user.pem │ │ ├── ec2-ca.key │ │ ├── ec2-ca.pem │ │ ├── ec2-generate.sh │ │ ├── ec2-server.key │ │ ├── ec2-server.pem │ │ ├── ec2-user-p256.key │ │ ├── ec2-user-p256.pem │ │ ├── ec2-user.key │ │ ├── ec2-user.pem │ │ ├── hlr_auc_gw.gsm │ │ ├── hlr_auc_gw.milenage_db │ │ ├── iCA-server │ │ │ ├── ca-and-root.pem │ │ │ ├── cacert.pem │ │ │ ├── careq.pem │ │ │ ├── index.txt │ │ │ ├── index.txt.attr │ │ │ ├── private │ │ │ │ └── cakey.pem │ │ │ ├── serial │ │ │ ├── server-revoked.key │ │ │ ├── server-revoked.pem │ │ │ ├── server-revoked.req │ │ │ ├── server-revoked_and_ica.pem │ │ │ ├── server.key │ │ │ ├── server.pem │ │ │ ├── server.req │ │ │ └── server_and_ica.pem │ │ ├── iCA-user │ │ │ ├── ca-and-root.pem │ │ │ ├── cacert.pem │ │ │ ├── careq.pem │ │ │ ├── index.txt │ │ │ ├── index.txt.attr │ │ │ ├── private │ │ │ │ └── cakey.pem │ │ │ ├── serial │ │ │ ├── user.key │ │ │ ├── user.pem │ │ │ ├── user.req │ │ │ └── user_and_ica.pem │ │ ├── ica-generate.sh │ │ ├── imsi-privacy-cert.pem │ │ ├── imsi-privacy-key.pem │ │ ├── index-revoked.txt │ │ ├── index-unknown.txt │ │ ├── index.txt │ │ ├── ocsp-multi-server-cache.der │ │ ├── ocsp-req.der │ │ ├── ocsp-responder.csr │ │ ├── ocsp-responder.key │ │ ├── ocsp-responder.pem │ │ ├── ocsp-server-cache.der │ │ ├── ocsp-server-cache.der-invalid │ │ ├── openssl2.cnf │ │ ├── radius_clients.conf │ │ ├── radius_clients_ipv6.conf │ │ ├── radius_clients_none.conf │ │ ├── rootCA │ │ │ ├── index.txt │ │ │ ├── index.txt.attr │ │ │ └── serial │ │ ├── rsa3072-ca.key │ │ ├── rsa3072-ca.pem │ │ ├── rsa3072-generate.sh │ │ ├── rsa3072-server.key │ │ ├── rsa3072-server.pem │ │ ├── rsa3072-server.req │ │ ├── rsa3072-user-rsa2048.key │ │ ├── rsa3072-user-rsa2048.pem │ │ ├── rsa3072-user-rsa2048.req │ │ ├── rsa3072-user.key │ │ ├── rsa3072-user.pem │ │ ├── rsa3072-user.req │ │ ├── server-certpol.csr │ │ ├── server-certpol.key │ │ ├── server-certpol.pem │ │ ├── server-certpol2.csr │ │ ├── server-certpol2.key │ │ ├── server-certpol2.pem │ │ ├── server-eku-client-server.csr │ │ ├── server-eku-client-server.key │ │ ├── server-eku-client-server.pem │ │ ├── server-eku-client.csr │ │ ├── server-eku-client.key │ │ ├── server-eku-client.pem │ │ ├── server-expired.csr │ │ ├── server-expired.key │ │ ├── server-expired.pem │ │ ├── server-extra.pkcs12 │ │ ├── server-long-duration.csr │ │ ├── server-long-duration.key │ │ ├── server-long-duration.pem │ │ ├── server-no-dnsname.csr │ │ ├── server-no-dnsname.key │ │ ├── server-no-dnsname.pem │ │ ├── server.csr │ │ ├── server.key │ │ ├── server.pem │ │ ├── server.pkcs12 │ │ ├── sha384-server.key │ │ ├── sha384-server.pem │ │ ├── sha384-user.key │ │ ├── sha384-user.pem │ │ ├── sha512-ca.key │ │ ├── sha512-ca.pem │ │ ├── sha512-generate.sh │ │ ├── sha512-server.key │ │ ├── sha512-server.pem │ │ ├── sha512-user.key │ │ ├── sha512-user.pem │ │ ├── test-ca │ │ │ ├── cacert.pem │ │ │ ├── crlnumber │ │ │ ├── index.txt │ │ │ ├── index.txt.attr │ │ │ ├── private │ │ │ │ └── cakey.pem │ │ │ └── serial │ │ ├── update.sh │ │ ├── user.csr │ │ ├── user.key │ │ ├── user.key.pkcs8 │ │ ├── user.key.pkcs8.pkcs5v15 │ │ ├── user.pem │ │ ├── user.pkcs12 │ │ ├── user.rsa-key │ │ ├── user2.pkcs12 │ │ └── user3.pkcs12 │ ├── build.sh │ ├── check_kernel.py │ ├── devdetail.xml │ ├── devinfo.xml │ ├── dictionary.radius │ ├── example-hostapd.config │ ├── example-setup.txt │ ├── example-wpa_supplicant.config │ ├── fst_module_aux.py │ ├── fst_test_common.py │ ├── hostapd.py │ ├── hostapd.vlan │ ├── hostapd.vlan2 │ ├── hostapd.wlan3.vlan │ ├── hostapd.wlan4.vlan │ ├── hostapd.wpa_psk │ ├── hwsim.py │ ├── hwsim_utils.py │ ├── multi-bss-acs.conf │ ├── multi-bss-iface-per_sta_vif.conf │ ├── multi-bss-iface.conf │ ├── multi-bss.conf │ ├── netlink.py │ ├── nl80211.py │ ├── owe-bss-1.conf │ ├── owe-bss-2.conf │ ├── p2p0.conf │ ├── p2p1.conf │ ├── p2p2.conf │ ├── p2p_utils.py │ ├── pps-mo-1.xml │ ├── radius_das.py │ ├── remotehost.py │ ├── rfkill.py │ ├── run-all.sh │ ├── run-tests.py │ ├── start.sh │ ├── stop.sh │ ├── test_ap_acs.py │ ├── test_ap_ciphers.py │ ├── test_ap_config.py │ ├── test_ap_csa.py │ ├── test_ap_dynamic.py │ ├── test_ap_eap.py │ ├── test_ap_ft.py │ ├── test_ap_hs20.py │ ├── test_ap_ht.py │ ├── test_ap_mixed.py │ ├── test_ap_open.py │ ├── test_ap_params.py │ ├── test_ap_pmf.py │ ├── test_ap_psk.py │ ├── test_ap_qosmap.py │ ├── test_ap_roam.py │ ├── test_ap_tdls.py │ ├── test_ap_track.py │ ├── test_ap_vht.py │ ├── test_ap_vlan.py │ ├── test_ap_wps.py │ ├── test_authsrv.py │ ├── test_autoscan.py │ ├── test_bgscan.py │ ├── test_cert_check.py │ ├── test_cfg80211.py │ ├── test_connect_cmd.py │ ├── test_dbus.py │ ├── test_dfs.py │ ├── test_dpp.py │ ├── test_dpp3.py │ ├── test_dscp.py │ ├── test_eap.py │ ├── test_eap_proto.py │ ├── test_eht.py │ ├── test_erp.py │ ├── test_ext_password.py │ ├── test_fils.py │ ├── test_fst_config.py │ ├── test_fst_module.py │ ├── test_gas.py │ ├── test_hapd_ctrl.py │ ├── test_he.py │ ├── test_hostapd_oom.py │ ├── test_hs20_filter.py │ ├── test_hs20_pps_mo.py │ ├── test_ibss.py │ ├── test_ieee8021x.py │ ├── test_kernel.py │ ├── test_macsec.py │ ├── test_mbo.py │ ├── test_module_tests.py │ ├── test_monitor_interface.py │ ├── test_mscs.py │ ├── test_multi_ap.py │ ├── test_nfc_p2p.py │ ├── test_nfc_wps.py │ ├── test_oce.py │ ├── test_ocv.py │ ├── test_offchannel_tx.py │ ├── test_owe.py │ ├── test_p2p_autogo.py │ ├── test_p2p_channel.py │ ├── test_p2p_concurrency.py │ ├── test_p2p_device.py │ ├── test_p2p_discovery.py │ ├── test_p2p_ext.py │ ├── test_p2p_grpform.py │ ├── test_p2p_invitation.py │ ├── test_p2p_messages.py │ ├── test_p2p_persistent.py │ ├── test_p2p_service.py │ ├── test_p2p_set.py │ ├── test_p2p_wifi_display.py │ ├── test_p2ps.py │ ├── test_pasn.py │ ├── test_pmksa_cache.py │ ├── test_radio_work.py │ ├── test_radius.py │ ├── test_rfkill.py │ ├── test_rrm.py │ ├── test_sae.py │ ├── test_sae_pk.py │ ├── test_scan.py │ ├── test_scs.py │ ├── test_sigma_dut.py │ ├── test_ssid.py │ ├── test_sta_dynamic.py │ ├── test_suite_b.py │ ├── test_tnc.py │ ├── test_wep.py │ ├── test_wext.py │ ├── test_wmediumd.py │ ├── test_wnm.py │ ├── test_wpas_ap.py │ ├── test_wpas_config.py │ ├── test_wpas_ctrl.py │ ├── test_wpas_mesh.py │ ├── test_wpas_wmm_ac.py │ ├── tnc │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── hostap2_imc.c │ │ ├── hostap2_imv.c │ │ ├── hostap_imc.c │ │ ├── hostap_imv.c │ │ └── tnc_config │ ├── tshark.py │ ├── utils.py │ ├── vm │ │ ├── .gitignore │ │ ├── README │ │ ├── bisect-run.sh │ │ ├── build-codecov.sh │ │ ├── combine-codecov.sh │ │ ├── dbus.conf │ │ ├── example-vm-setup.txt │ │ ├── inside.sh │ │ ├── kernel-config │ │ ├── kernel-config.uml │ │ ├── min-seq.py │ │ ├── parallel-vm.py │ │ ├── process-codecov.sh │ │ ├── regdb │ │ │ ├── regulatory.db │ │ │ └── regulatory.db.p7s │ │ ├── uevent.sh │ │ └── vm-run.sh │ ├── w1fi_logo.png │ ├── wlantest.py │ ├── wpasupplicant.py │ ├── wps-ctrl-cred │ ├── wps-ctrl-cred2 │ ├── wps-mixed-cred │ └── wps-wep-cred ├── remote │ ├── config.py │ ├── hwsim_wrapper.py │ ├── monitor.py │ ├── run-tests.py │ ├── rutils.py │ ├── test_devices.py │ ├── test_example.py │ └── test_monitor.py ├── test-aes.c ├── test-base64.c ├── test-https.c ├── test-https_server.c ├── test-list.c ├── test-md4.c ├── test-milenage.c ├── test-rc4.c ├── test-rsa-sig-ver.c ├── test-sha1.c ├── test-sha256.c ├── test-x509v3.c ├── test_x509v3_nist.sh └── test_x509v3_nist2.sh ├── wlantest ├── .gitignore ├── Makefile ├── bip.c ├── bss.c ├── ccmp.c ├── ctrl.c ├── gcmp.c ├── inject.c ├── monitor.c ├── process.c ├── readpcap.c ├── rx_data.c ├── rx_eapol.c ├── rx_ip.c ├── rx_mgmt.c ├── rx_tdls.c ├── sta.c ├── test_vectors.c ├── tkip.c ├── wep.c ├── wired.c ├── wlantest.c ├── wlantest.h ├── wlantest_cli.c ├── wlantest_ctrl.h └── writepcap.c ├── wpa_supplicant ├── .gitignore ├── Android.mk ├── ChangeLog ├── Makefile ├── README ├── README-DPP ├── README-HS20 ├── README-P2P ├── README-WPS ├── README-Windows.txt ├── android.config ├── ap.c ├── ap.h ├── autoscan.c ├── autoscan.h ├── autoscan_exponential.c ├── autoscan_periodic.c ├── bgscan.c ├── bgscan.h ├── bgscan_learn.c ├── bgscan_simple.c ├── binder │ ├── .clang-format │ ├── binder.cpp │ ├── binder.h │ ├── binder_constants.cpp │ ├── binder_constants.h │ ├── binder_i.h │ ├── binder_manager.cpp │ ├── binder_manager.h │ ├── fi │ │ └── w1 │ │ │ └── wpa_supplicant │ │ │ ├── IIface.aidl │ │ │ ├── ISupplicant.aidl │ │ │ └── ISupplicantCallbacks.aidl │ ├── iface.cpp │ ├── iface.h │ ├── supplicant.cpp │ └── supplicant.h ├── bss.c ├── bss.h ├── bssid_ignore.c ├── bssid_ignore.h ├── config.c ├── config.h ├── config_file.c ├── config_none.c ├── config_ssid.h ├── config_winreg.c ├── ctrl_iface.c ├── ctrl_iface.h ├── ctrl_iface_named_pipe.c ├── ctrl_iface_udp.c ├── ctrl_iface_unix.c ├── dbus │ ├── .gitignore │ ├── Makefile │ ├── dbus-wpa_supplicant.conf │ ├── dbus_common.c │ ├── dbus_common.h │ ├── dbus_common_i.h │ ├── dbus_dict_helpers.c │ ├── dbus_dict_helpers.h │ ├── dbus_new.c │ ├── dbus_new.h │ ├── dbus_new_handlers.c │ ├── dbus_new_handlers.h │ ├── dbus_new_handlers_p2p.c │ ├── dbus_new_handlers_p2p.h │ ├── dbus_new_handlers_wps.c │ ├── dbus_new_helpers.c │ ├── dbus_new_helpers.h │ ├── dbus_new_introspect.c │ └── fi.w1.wpa_supplicant1.service.in ├── defconfig ├── doc │ └── docbook │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── eapol_test.sgml │ │ ├── wpa_background.sgml │ │ ├── wpa_cli.sgml │ │ ├── wpa_gui.sgml │ │ ├── wpa_passphrase.sgml │ │ ├── wpa_priv.sgml │ │ ├── wpa_supplicant.conf.sgml │ │ └── wpa_supplicant.sgml ├── dpp_supplicant.c ├── dpp_supplicant.h ├── driver_i.h ├── eap_proxy_dummy.mak ├── eap_proxy_dummy.mk ├── eap_register.c ├── eap_testing.txt ├── eapol_test.c ├── eapol_test.py ├── events.c ├── examples │ ├── 60_wpa_supplicant │ ├── dbus-listen-preq.py │ ├── dpp-nfc.py │ ├── dpp-qrcode.py │ ├── ieee8021x.conf │ ├── openCryptoki.conf │ ├── p2p-action-udhcp.sh │ ├── p2p-action.sh │ ├── p2p-nfc.py │ ├── p2p │ │ ├── p2p_connect.py │ │ ├── p2p_disconnect.py │ │ ├── p2p_find.py │ │ ├── p2p_flush.py │ │ ├── p2p_group_add.py │ │ ├── p2p_invite.py │ │ ├── p2p_listen.py │ │ └── p2p_stop_find.py │ ├── plaintext.conf │ ├── udhcpd-p2p.conf │ ├── wep.conf │ ├── wpa-psk-tkip.conf │ ├── wpa2-eap-ccmp.conf │ ├── wpas-dbus-new-getall.py │ ├── wpas-dbus-new-signals.py │ ├── wpas-dbus-new-wps.py │ ├── wpas-dbus-new.py │ ├── wps-ap-cli │ └── wps-nfc.py ├── gas_query.c ├── gas_query.h ├── hs20_supplicant.c ├── hs20_supplicant.h ├── ibss_rsn.c ├── ibss_rsn.h ├── interworking.c ├── interworking.h ├── libwpa_test.c ├── main.c ├── main_none.c ├── main_winmain.c ├── main_winsvc.c ├── mbo.c ├── mesh.c ├── mesh.h ├── mesh_mpm.c ├── mesh_mpm.h ├── mesh_rsn.c ├── mesh_rsn.h ├── nfc_pw_token.c ├── nmake.mak ├── notify.c ├── notify.h ├── offchannel.c ├── offchannel.h ├── op_classes.c ├── p2p_supplicant.c ├── p2p_supplicant.h ├── p2p_supplicant_sd.c ├── pasn_supplicant.c ├── preauth_test.c ├── robust_av.c ├── rrm.c ├── scan.c ├── scan.h ├── sme.c ├── sme.h ├── supp_saepk.conf ├── supp_wpa3.conf ├── systemd │ ├── wpa_supplicant-nl80211.service.arg.in │ ├── wpa_supplicant-wired.service.arg.in │ ├── wpa_supplicant.service.arg.in │ └── wpa_supplicant.service.in ├── todo.txt ├── twt.c ├── utils │ └── log2pcap.py ├── vs2005 │ ├── eapol_test │ │ └── eapol_test.vcproj │ ├── win_if_list │ │ └── win_if_list.vcproj │ ├── wpa_cli │ │ └── wpa_cli.vcproj │ ├── wpa_passphrase │ │ └── wpa_passphrase.vcproj │ ├── wpa_supplicant.sln │ ├── wpa_supplicant │ │ └── wpa_supplicant.vcproj │ └── wpasvc │ │ └── wpasvc.vcproj ├── wifi_display.c ├── wifi_display.h ├── win_example.reg ├── win_if_list.c ├── wmm_ac.c ├── wmm_ac.h ├── wnm_sta.c ├── wnm_sta.h ├── wpa_cli.c ├── wpa_gui-qt4 │ ├── .gitignore │ ├── addinterface.cpp │ ├── addinterface.h │ ├── eventhistory.cpp │ ├── eventhistory.h │ ├── eventhistory.ui │ ├── icons.qrc │ ├── icons │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README │ │ ├── ap.svg │ │ ├── group.svg │ │ ├── invitation.svg │ │ ├── laptop.svg │ │ └── wpa_gui.svg │ ├── icons_png.qrc │ ├── lang │ │ ├── .gitignore │ │ └── wpa_gui_de.ts │ ├── main.cpp │ ├── networkconfig.cpp │ ├── networkconfig.h │ ├── networkconfig.ui │ ├── peers.cpp │ ├── peers.h │ ├── peers.ui │ ├── scanresults.cpp │ ├── scanresults.h │ ├── scanresults.ui │ ├── scanresultsitem.cpp │ ├── scanresultsitem.h │ ├── signalbar.cpp │ ├── signalbar.h │ ├── stringquery.cpp │ ├── stringquery.h │ ├── userdatarequest.cpp │ ├── userdatarequest.h │ ├── userdatarequest.ui │ ├── wpa_gui.desktop │ ├── wpa_gui.pro │ ├── wpagui.cpp │ ├── wpagui.h │ ├── wpagui.ui │ └── wpamsg.h ├── wpa_passphrase.c ├── wpa_priv.c ├── wpa_supplicant.c ├── wpa_supplicant.conf ├── wpa_supplicant_conf.mk ├── wpa_supplicant_conf.sh ├── wpa_supplicant_i.h ├── wpa_supplicant_template.conf ├── wpas_glue.c ├── wpas_glue.h ├── wpas_kay.c ├── wpas_kay.h ├── wpas_module_tests.c ├── wps_supplicant.c └── wps_supplicant.h ├── wpadebug ├── .gitignore ├── AndroidManifest.xml ├── README ├── build.xml ├── project.properties ├── res │ ├── layout │ │ ├── cred_edit.xml │ │ ├── input_uri.xml │ │ ├── main.xml │ │ └── qrcode.xml │ └── raw │ │ ├── shell_commands.txt │ │ └── wpa_commands.txt └── src │ └── w1 │ └── fi │ └── wpadebug │ ├── CommandListActivity.java │ ├── DisplayMessageActivity.java │ ├── InputUri.java │ ├── MainActivity.java │ ├── QrCodeDisplayActivity.java │ ├── QrCodeReadActivity.java │ ├── QrCodeScannerActivity.java │ ├── WifiReceiver.java │ ├── WpaCommandListActivity.java │ ├── WpaCredActivity.java │ ├── WpaCredEditActivity.java │ ├── WpaNfcActivity.java │ └── WpaWebViewActivity.java └── wpaspy ├── Makefile ├── setup.py ├── test.py ├── wpaspy.c └── wpaspy.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *~ 3 | tests/hwsim/logs 4 | tests/remote/logs 5 | wpaspy/build 6 | **/parallel-vm.log 7 | tags 8 | build/ 9 | -------------------------------------------------------------------------------- /Android.mk: -------------------------------------------------------------------------------- 1 | S_LOCAL_PATH := $(call my-dir) 2 | 3 | ifneq ($(filter VER_0_8_X VER_2_1_DEVEL,$(WPA_SUPPLICANT_VERSION)),) 4 | # The order of the 2 Android.mks does matter! 5 | # TODO: Clean up the Android.mks, reset all the temporary variables at the 6 | # end of each Android.mk, so that one Android.mk doesn't depend on variables 7 | # set up in the other Android.mk. 8 | include $(S_LOCAL_PATH)/hostapd/Android.mk \ 9 | $(S_LOCAL_PATH)/wpa_supplicant/Android.mk 10 | ifneq ($(TARGET_BUILD_VARIANT), user) 11 | ifeq ($(shell test $(PLATFORM_VERSION_LAST_STABLE) -ge 8 ; echo $$?), 0) 12 | include $(S_LOCAL_PATH)/hs20/client/Android.mk 13 | endif #End of Check for platform version 14 | endif #End of Check for target build variant 15 | endif 16 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | wpa_supplicant and hostapd 2 | -------------------------- 3 | 4 | Copyright (c) 2002-2022, Jouni Malinen and contributors 5 | All Rights Reserved. 6 | 7 | 8 | See the README file for the current license terms. 9 | 10 | This software was previously distributed under BSD/GPL v2 dual license 11 | terms that allowed either of those license alternatives to be 12 | selected. As of February 11, 2012, the project has chosen to use only 13 | the BSD license option for future distribution. As such, the GPL v2 14 | license option is no longer used. It should be noted that the BSD 15 | license option (the one with advertisement clause removed) is compatible 16 | with GPL and as such, does not prevent use of this software in projects 17 | that use GPL. 18 | 19 | Some of the files may still include pointers to GPL version 2 license 20 | terms. However, such copyright and license notifications are maintained 21 | only for attribution purposes and any distribution of this software 22 | after February 11, 2012 is no longer under the GPL v2 option. 23 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | doxygen.warnings 2 | hostapd.eps 3 | hostapd.png 4 | html 5 | latex 6 | p2p_arch.eps 7 | p2p_arch.png 8 | p2p_arch2.eps 9 | p2p_arch2.png 10 | p2p_sm.eps 11 | p2p_sm.png 12 | wpa_supplicant.eps 13 | wpa_supplicant.png 14 | wpa_supplicant-devel.pdf 15 | -------------------------------------------------------------------------------- /eap_example/.gitignore: -------------------------------------------------------------------------------- 1 | *.d 2 | eap_example 3 | libeap.so 4 | libeap.a 5 | -------------------------------------------------------------------------------- /eap_example/dh.conf: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MIGHAoGBAP3V8IHq3H2DUlYywsvjYNuS17eCdt0mJo6/os6PHqdhgkMrPxF9u4Gr 3 | qKXq9e6GqmZYdjta30N3FkXaV924BJ0xOqb2TntiKg4u50/l6hSUneWt6UFBaizd 4 | XrqjNFIme/5RXMZ7RglXliBpCepAaFLMcKhOS4ulUyYYHSy+oqRjAgEC 5 | -----END DH PARAMETERS----- 6 | -------------------------------------------------------------------------------- /eap_example/server-key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIICXAIBAAKBgQC6oHdVIhSFVWWbZCyt7ZvdZTHJ2mBQzjjWNNzovBueMOcS41Ns 3 | ye1IA3mBaZjOirh3RzZFz8bg8XsecYlU9wHMIq2gQrGoNZ5gqjqYUdD/H+6+jQpj 4 | +6I5F/JkYfZlAjJ5dOGf0YllVanDIJ6/aVaz908/qVTC2o88r/J1VPp+gQIDAQAB 5 | AoGAR/C5b3DOtkMgAtGPw5AXiDWNBsGOZTfJgxEnovN4Nfel64sDyqjgNeVY/kDl 6 | baDd0OT7j9ezU1zi1+5uQPlikFSvzgpdLgQhKkvWLzzehafb2uVaJ4VsRqS3WXK8 7 | RE06cYx4VQRkvQvMAXWsuua9pw36OrlpQnm3HlAbrks8Mm0CQQDgMEu2WPMWP2wj 8 | Q8735zbj7D0AxEFlcegPZr/QZ3qU//G0HL35FG18lsuTbDzesrf7apo3W1BBQLjS 9 | ZSNtyNsLAkEA1Ru6aEy/Cj2u1GYHu1u/RcshKC+W7rdVT0wDeiSTUzKafZNiwVhY 10 | 1Epk4k5HnHB327ysTI1LiOzUMMmuNYUkIwJAKUkbmFAXLCCv5GqnYcXluOGXdl2u 11 | AWWRq8xrRJDZ5TihJV8pqQYXB5upj9Od/hEBir5d+hXJ2Mp3ft97P8t+cwJAGeWQ 12 | tXP+EySDxlPPxLjVeYnBsbx2vvOQbl5yXblsHcQcef4bFhvCT6nqsIWKtjwElLNM 13 | zNCuySjecD9R6DcRuQJBAJWrpgny77wP29x1WQ/29J8ZJfxe4N5wAj1SePBVNgZ3 14 | gfm1O+c6niNwe8RnfQimppLrrR+qK33te2SPGXiwi6g= 15 | -----END RSA PRIVATE KEY----- 16 | -------------------------------------------------------------------------------- /eap_example/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALqgd1UiFIVVZZtk 3 | LK3tm91lMcnaYFDOONY03Oi8G54w5xLjU2zJ7UgDeYFpmM6KuHdHNkXPxuDxex5x 4 | iVT3AcwiraBCsag1nmCqOphR0P8f7r6NCmP7ojkX8mRh9mUCMnl04Z/RiWVVqcMg 5 | nr9pVrP3Tz+pVMLajzyv8nVU+n6BAgMBAAECgYBH8LlvcM62QyAC0Y/DkBeINY0G 6 | wY5lN8mDESei83g196XriwPKqOA15Vj+QOVtoN3Q5PuP17NTXOLX7m5A+WKQVK/O 7 | Cl0uBCEqS9YvPN6Fp9va5VonhWxGpLdZcrxETTpxjHhVBGS9C8wBday65r2nDfo6 8 | uWlCebceUBuuSzwybQJBAOAwS7ZY8xY/bCNDzvfnNuPsPQDEQWVx6A9mv9BnepT/ 9 | 8bQcvfkUbXyWy5NsPN6yt/tqmjdbUEFAuNJlI23I2wsCQQDVG7poTL8KPa7UZge7 10 | W79FyyEoL5but1VPTAN6JJNTMpp9k2LBWFjUSmTiTkeccHfbvKxMjUuI7NQwya41 11 | hSQjAkApSRuYUBcsIK/kaqdhxeW44Zd2Xa4BZZGrzGtEkNnlOKElXympBhcHm6mP 12 | 053+EQGKvl36FcnYynd+33s/y35zAkAZ5ZC1c/4TJIPGU8/EuNV5icGxvHa+85Bu 13 | XnJduWwdxBx5/hsWG8JPqeqwhYq2PASUs0zM0K7JKN5wP1HoNxG5AkEAlaumCfLv 14 | vA/b3HVZD/b0nxkl/F7g3nACPVJ48FU2BneB+bU75zqeI3B7xGd9CKamkuutH6or 15 | fe17ZI8ZeLCLqA== 16 | -----END PRIVATE KEY----- 17 | -------------------------------------------------------------------------------- /hostapd/.gitignore: -------------------------------------------------------------------------------- 1 | .config 2 | hostapd 3 | hostapd_cli 4 | hlr_auc_gw 5 | nt_password_hash 6 | sae_pk_gen 7 | -------------------------------------------------------------------------------- /hostapd/config_file.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / Configuration file parser 3 | * Copyright (c) 2003-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef CONFIG_FILE_H 10 | #define CONFIG_FILE_H 11 | 12 | struct hostapd_config * hostapd_config_read(const char *fname); 13 | int hostapd_set_iface(struct hostapd_config *conf, 14 | struct hostapd_bss_config *bss, const char *field, 15 | char *value); 16 | 17 | #endif /* CONFIG_FILE_H */ 18 | -------------------------------------------------------------------------------- /hostapd/eap_register.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP method registration 3 | * Copyright (c) 2004-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EAP_REGISTER_H 10 | #define EAP_REGISTER_H 11 | 12 | int eap_server_register_methods(void); 13 | 14 | #endif /* EAP_REGISTER_H */ 15 | -------------------------------------------------------------------------------- /hostapd/example_key.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/hostapd/example_key.der -------------------------------------------------------------------------------- /hostapd/hapd_module_tests.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd module tests 3 | * Copyright (c) 2014, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "utils/includes.h" 10 | 11 | #include "utils/common.h" 12 | #include "utils/module_tests.h" 13 | 14 | int hapd_module_tests(void) 15 | { 16 | wpa_printf(MSG_INFO, "hostapd module tests"); 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /hostapd/hlr_auc_gw.milenage_db: -------------------------------------------------------------------------------- 1 | # Parameters for Milenage (Example algorithms for AKA). 2 | # The example Ki, OPc, and AMF values here are from 3GPP TS 35.208 v6.0.0 3 | # 4.3.20 Test Set 20. SQN is the last used SQN value. 4 | # These values can be used for both UMTS (EAP-AKA) and GSM (EAP-SIM) 5 | # authentication. In case of GSM/EAP-SIM, AMF and SQN values are not used, but 6 | # stub values will need to be included in this file. 7 | 8 | # IMSI Ki OPc AMF SQN [RES_len] 9 | 232010000000000 90dca4eda45b53cf0f12d7c9c3bc6a89 cb9cccc4b9258e6dca4760379fb82581 61df 000000000000 10 | # Example using truncated 32-bit RES instead of 64-bit default 11 | 232010000000001 90dca4eda45b53cf0f12d7c9c3bc6a89 cb9cccc4b9258e6dca4760379fb82581 61df 000000000000 4 12 | 13 | # These values are from Test Set 19 which has the AMF separation bit set to 1 14 | # and as such, is suitable for EAP-AKA' test. 15 | 555444333222111 5122250214c33e723a5dd523fc145fc0 981d464c7c52eb6e5036234984ad0bcf c3ab 16f3b3f70fc1 16 | -------------------------------------------------------------------------------- /hostapd/hostapd.accept: -------------------------------------------------------------------------------- 1 | # List of MAC addresses that are allowed to authenticate (IEEE 802.11) 2 | # with the AP. Optional VLAN ID can be assigned for clients based on the 3 | # MAC address if dynamic VLANs (hostapd.conf dynamic_vlan option) are used. 4 | 00:11:22:33:44:55 5 | 00:66:77:88:99:aa 6 | 00:00:22:33:44:55 1 7 | -------------------------------------------------------------------------------- /hostapd/hostapd.android.rc: -------------------------------------------------------------------------------- 1 | # 2 | # init.rc fragment for hostapd on Android 3 | # Copyright (c) 2002-2016, Jouni Malinen 4 | # 5 | # This software may be distributed under the terms of the BSD license. 6 | # See README for more details. 7 | # 8 | 9 | on post-fs-data 10 | mkdir /data/misc/wifi/hostapd 0770 wifi wifi 11 | 12 | service hostapd /vendor/bin/hostapd \ 13 | /data/misc/wifi/hostapd.conf 14 | class main 15 | user wifi 16 | writepid /data/misc/wifi/hostapd.pid 17 | group wifi 18 | disabled 19 | oneshot 20 | -------------------------------------------------------------------------------- /hostapd/hostapd.deny: -------------------------------------------------------------------------------- 1 | # List of MAC addresses that are not allowed to authenticate (IEEE 802.11) 2 | # with the AP. 3 | 00:20:30:40:50:60 4 | 00:ab:cd:ef:12:34 5 | 00:00:30:40:50:60 6 | -------------------------------------------------------------------------------- /hostapd/hostapd.eap_user_sqlite: -------------------------------------------------------------------------------- 1 | CREATE TABLE users( 2 | identity TEXT PRIMARY KEY, 3 | methods TEXT, 4 | password TEXT, 5 | remediation TEXT, 6 | phase2 INTEGER, 7 | t_c_timestamp INTEGER 8 | ); 9 | 10 | CREATE TABLE wildcards( 11 | identity TEXT PRIMARY KEY, 12 | methods TEXT 13 | ); 14 | 15 | INSERT INTO users(identity,methods,password,phase2) VALUES ('user','TTLS-MSCHAPV2','password',1); 16 | INSERT INTO users(identity,methods,password,phase2) VALUES ('DOMAIN\mschapv2 user','TTLS-MSCHAPV2','password',1); 17 | 18 | INSERT INTO wildcards(identity,methods) VALUES ('','TTLS,TLS'); 19 | INSERT INTO wildcards(identity,methods) VALUES ('0','AKA'); 20 | 21 | CREATE TABLE authlog( 22 | timestamp TEXT, 23 | session TEXT, 24 | nas_ip TEXT, 25 | username TEXT, 26 | note TEXT 27 | ); 28 | 29 | CREATE TABLE pending_tc( 30 | mac_addr TEXT PRIMARY KEY, 31 | identity TEXT 32 | ); 33 | 34 | CREATE TABLE current_sessions( 35 | mac_addr TEXT PRIMARY KEY, 36 | identity TEXT, 37 | start_time TEXT, 38 | nas TEXT, 39 | hs20_t_c_filtering BOOLEAN, 40 | waiting_coa_ack BOOLEAN, 41 | coa_ack_received BOOLEAN 42 | ); 43 | -------------------------------------------------------------------------------- /hostapd/hostapd.radius_clients: -------------------------------------------------------------------------------- 1 | # RADIUS client configuration for the RADIUS server 2 | 10.1.2.3 secret passphrase 3 | 192.168.1.0/24 another very secret passphrase 4 | 0.0.0.0/0 radius 5 | -------------------------------------------------------------------------------- /hostapd/hostapd.sim_db: -------------------------------------------------------------------------------- 1 | # Example GSM authentication triplet file for EAP-SIM authenticator 2 | # IMSI:Kc:SRES:RAND 3 | # IMSI: ASCII string (numbers) 4 | # Kc: hex, 8 octets 5 | # SRES: hex, 4 octets 6 | # RAND: hex, 16 octets 7 | 234567898765432:A0A1A2A3A4A5A6A7:D1D2D3D4:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 8 | 234567898765432:B0B1B2B3B4B5B6B7:E1E2E3E4:BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 9 | 234567898765432:C0C1C2C3C4C5C6C7:F1F2F3F4:CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 10 | -------------------------------------------------------------------------------- /hostapd/hostapd.vlan: -------------------------------------------------------------------------------- 1 | # VLAN ID to network interface mapping 2 | 1 vlan1 3 | 2 vlan2 4 | 3 vlan3 5 | 100 guest 6 | # Optional wildcard entry matching all VLAN IDs. The first # in the interface 7 | # name will be replaced with the VLAN ID. The network interfaces are created 8 | # (and removed) dynamically based on the use. 9 | * vlan# 10 | -------------------------------------------------------------------------------- /hostapd/hostapd_sae_pk.conf: -------------------------------------------------------------------------------- 1 | interface=wlan0 2 | ssid=SAEPK-Network 3 | 4 | hw_mode=g 5 | channel=1 6 | 7 | wpa=2 8 | wpa_key_mgmt=SAE 9 | rsn_pairwise=CCMP 10 | ieee80211w=2 11 | 12 | sae_groups=19 13 | sae_password=2udb-slxf-3ij2|pk=04e8aad54d1a121955e8703d1dfa115e:MHcCAQEEIKMP3SZEAlW9rSwTFsaR/sEyX963opsOo2QYe4G8Kcl+oAoGCCqGSM49AwEHoUQDQgAE4GuxyTkKNt0MEispu/XPxImInj+tl2ri/Jfu2mOQKb1TdNHSPs6UP+rxv5OWnezhOpjpD63Y+zjjz1yk7/iF7g== 14 | 15 | -------------------------------------------------------------------------------- /hostapd/hostapd_wpa3.conf: -------------------------------------------------------------------------------- 1 | interface=wlan0 2 | ssid=WPA3-Network 3 | 4 | hw_mode=g 5 | channel=1 6 | 7 | wpa=2 8 | wpa_passphrase=abcdefgh 9 | wpa_key_mgmt=SAE 10 | rsn_pairwise=CCMP 11 | ieee80211w=2 12 | -------------------------------------------------------------------------------- /hostapd/logwatch/README: -------------------------------------------------------------------------------- 1 | Logwatch is a utility for analyzing system logs and provide a human 2 | readable summary. This directory has a configuration file and a log 3 | analyzer script for parsing hostapd system log entries for logwatch. 4 | These files can be installed by copying them to following locations: 5 | 6 | /etc/log.d/conf/services/hostapd.conf 7 | /etc/log.d/scripts/services/hostapd 8 | 9 | More information about logwatch is available from http://www.logwatch.org/ 10 | -------------------------------------------------------------------------------- /hostapd/logwatch/hostapd.conf: -------------------------------------------------------------------------------- 1 | # Logwatch configuration for hostapd 2 | # 3 | # Copyright 2005 Henrik Brix Andersen 4 | # Distributed under the terms of the GNU General Public License v2 5 | # Alternatively, this file may be distributed under the terms of the BSD License 6 | 7 | Title = "hostapd" 8 | LogFile = messages 9 | *OnlyService = hostapd 10 | *RemoveHeaders 11 | -------------------------------------------------------------------------------- /hs20/client/.gitignore: -------------------------------------------------------------------------------- 1 | hs20-osu-client 2 | SP 3 | osu-ca.pem 4 | spp.xsd 5 | -------------------------------------------------------------------------------- /hs20/client/devinfo.xml: -------------------------------------------------------------------------------- 1 | 2 | urn:Example:HS20-station:123456 3 | Manufacturer 4 | HS20-station 5 | 1.2 6 | en 7 | 8 | -------------------------------------------------------------------------------- /hs20/server/.gitignore: -------------------------------------------------------------------------------- 1 | hs20_spp_server 2 | -------------------------------------------------------------------------------- /hs20/server/ca/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for i in server-client server server-revoked user ocsp; do 4 | rm -f $i.csr $i.key $i.pem 5 | done 6 | 7 | rm -f openssl.cnf.tmp 8 | if [ -d demoCA ]; then 9 | rm -r demoCA 10 | fi 11 | rm -f ca.pem logo.asn1 logo.der server.der ocsp-server-cache.der 12 | rm -f my-openssl.cnf my-openssl-root.cnf 13 | #rm -r rootCA 14 | -------------------------------------------------------------------------------- /hs20/server/ca/est-csrattrs.cnf: -------------------------------------------------------------------------------- 1 | asn1 = SEQUENCE:attrs 2 | 3 | [attrs] 4 | #oid1 = OID:challengePassword 5 | attr1 = SEQUENCE:extreq 6 | oid2 = OID:sha256WithRSAEncryption 7 | 8 | [extreq] 9 | oid = OID:extensionRequest 10 | vals = SET:extreqvals 11 | 12 | [extreqvals] 13 | 14 | oid1 = OID:macAddress 15 | #oid2 = OID:imei 16 | #oid3 = OID:meid 17 | #oid4 = OID:DevId 18 | -------------------------------------------------------------------------------- /hs20/server/ca/est-csrattrs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | openssl asn1parse -genconf est-csrattrs.cnf -out est-csrattrs.der -oid hs20.oid 4 | base64 est-csrattrs.der > est-attrs.b64 5 | -------------------------------------------------------------------------------- /hs20/server/ca/hs20.oid: -------------------------------------------------------------------------------- 1 | 1.3.6.1.1.1.1.22 macAddress 2 | 1.2.840.113549.1.9.14 extensionRequest 3 | 1.3.6.1.4.1.40808.1.1.1 id-wfa-hotspot-friendlyName 4 | 1.3.6.1.4.1.40808.1.1.2 id-kp-HS2.0Auth 5 | 1.3.6.1.4.1.40808.1.1.3 imei 6 | 1.3.6.1.4.1.40808.1.1.4 meid 7 | 1.3.6.1.4.1.40808.1.1.5 DevId 8 | -------------------------------------------------------------------------------- /hs20/server/ca/ocsp-req.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for i in *.pem; do 4 | echo "===[ $i ]===================" 5 | openssl ocsp -text -CAfile ca.pem -verify_other demoCA/cacert.pem -trust_other -issuer demoCA/cacert.pem -cert $i -url http://localhost:8888/ 6 | 7 | # openssl ocsp -text -CAfile rootCA/cacert.pem -issuer demoCA/cacert.pem -cert $i -url http://localhost:8888/ 8 | 9 | # openssl ocsp -text -CAfile rootCA/cacert.pem -verify_other demoCA/cacert.pem -trust_other -issuer demoCA/cacert.pem -cert $i -url http://localhost:8888/ 10 | # openssl ocsp -text -CAfile rootCA/cacert.pem -VAfile ca.pem -trust_other -issuer demoCA/cacert.pem -cert $i -url http://localhost:8888/ 11 | done 12 | -------------------------------------------------------------------------------- /hs20/server/ca/ocsp-responder-ica.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | openssl ocsp -index demoCA/index.txt -port 8888 -nmin 5 -rsigner demoCA/cacert.pem -rkey demoCA/private/cakey-plain.pem -CA demoCA/cacert.pem -resp_no_certs -text 4 | -------------------------------------------------------------------------------- /hs20/server/ca/ocsp-responder.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | openssl ocsp -index demoCA/index.txt -port 8888 -nmin 5 -rsigner ocsp.pem -rkey ocsp.key -CA demoCA/cacert.pem -text -ignore_err 4 | -------------------------------------------------------------------------------- /hs20/server/ca/ocsp-update-cache.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # NOTE: You may need to replace 'localhost' with your OCSP server hostname. 4 | openssl ocsp \ 5 | -no_nonce \ 6 | -CAfile ca.pem \ 7 | -verify_other demoCA/cacert.pem \ 8 | -issuer demoCA/cacert.pem \ 9 | -cert server.pem \ 10 | -url http://localhost:8888/ \ 11 | -respout ocsp-server-cache.der 12 | -------------------------------------------------------------------------------- /hs20/server/ca/w1fi_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/hs20/server/ca/w1fi_logo.png -------------------------------------------------------------------------------- /hs20/server/spp_server.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hotspot 2.0 SPP server 3 | * Copyright (c) 2012-2013, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SPP_SERVER_H 10 | #define SPP_SERVER_H 11 | 12 | struct hs20_svc { 13 | const void *ctx; 14 | struct xml_node_ctx *xml; 15 | char *root_dir; 16 | FILE *debug_log; 17 | sqlite3 *db; 18 | const char *addr; 19 | const char *test; 20 | const char *imsi; 21 | const char *eap_method; 22 | const char *id_hash; 23 | }; 24 | 25 | 26 | void debug_print(struct hs20_svc *ctx, int print, const char *fmt, ...) 27 | __attribute__ ((format (printf, 3, 4))); 28 | void debug_dump_node(struct hs20_svc *ctx, const char *title, xml_node_t *node); 29 | 30 | xml_node_t * hs20_spp_server_process(struct hs20_svc *ctx, xml_node_t *node, 31 | const char *auth_user, 32 | const char *auth_realm, int dmacc); 33 | int hs20_spp_server_init(struct hs20_svc *ctx); 34 | void hs20_spp_server_deinit(struct hs20_svc *ctx); 35 | 36 | #endif /* SPP_SERVER_H */ 37 | -------------------------------------------------------------------------------- /hs20/server/www/cert-enroll.php: -------------------------------------------------------------------------------- 1 | query("SELECT rowid,* FROM sessions WHERE id='$id'")->fetch(); 18 | if ($row == false) { 19 | die("Session not found"); 20 | } 21 | 22 | $uri = $row['redirect_uri']; 23 | $rowid = $row['rowid']; 24 | $realm = $row['realm']; 25 | 26 | $user = sha1(mt_rand()); 27 | 28 | if (!$db->exec("UPDATE sessions SET user='$user', type='cert' WHERE rowid=$rowid")) { 29 | die("Failed to update session database"); 30 | } 31 | 32 | $db->exec("INSERT INTO eventlog(user,realm,sessionid,timestamp,notes) " . 33 | "VALUES ('', '$realm', '$id', " . 34 | "strftime('%Y-%m-%d %H:%M:%f','now'), " . 35 | "'completed user input response for client certificate enrollment')"); 36 | 37 | header("Location: $uri", true, 302); 38 | 39 | ?> 40 | -------------------------------------------------------------------------------- /hs20/server/www/config.php: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /hs20/server/www/free-remediation.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hotspot 2.0 - public and free hotspot - remediation 4 | 5 | 6 | 7 |

Hotspot 2.0 - public and free hotspot

8 | 9 |

Terms and conditions have changed. You need to accept the new terms 10 | to continue using this network.

11 | 12 |

Terms and conditions..

13 | 14 | Accept
\n"; 16 | ?> 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /hs20/server/www/free.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hotspot 2.0 - public and free hotspot 4 | 5 | 6 | 7 | Hotspot 2.0 - public and free hotspot\n"; 12 | 13 | echo "
\n"; 14 | echo "\n"; 15 | 16 | ?> 17 | 18 |

Terms and conditions..

19 | 20 |
21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /hs20/server/www/redirect.php: -------------------------------------------------------------------------------- 1 | query("SELECT rowid,* FROM sessions WHERE id='$id'")->fetch(); 16 | if ($row == false) { 17 | die("Session not found"); 18 | } 19 | 20 | $uri = $row['redirect_uri']; 21 | 22 | header("Location: $uri", true, 302); 23 | 24 | $user = $row['user']; 25 | $realm = $row['realm']; 26 | 27 | $db->exec("INSERT INTO eventlog(user,realm,sessionid,timestamp,notes) " . 28 | "VALUES ('$user', '$realm', '$id', " . 29 | "strftime('%Y-%m-%d %H:%M:%f','now'), " . 30 | "'redirected after user input')"); 31 | 32 | ?> 33 | -------------------------------------------------------------------------------- /radius_example/.gitignore: -------------------------------------------------------------------------------- 1 | *.d 2 | radius_example 3 | -------------------------------------------------------------------------------- /radius_example/Makefile: -------------------------------------------------------------------------------- 1 | ALL=radius_example 2 | 3 | include ../src/build.rules 4 | 5 | CFLAGS += -I. 6 | CFLAGS += -I../src 7 | CFLAGS += -I../src/utils 8 | 9 | LIBS = ../src/radius/libradius.a 10 | LIBS += ../src/crypto/libcrypto.a 11 | LIBS += ../src/utils/libutils.a 12 | LLIBS = -lrt 13 | 14 | #CLAGS += -DCONFIG_IPV6 15 | 16 | OBJS_ex = radius_example.o 17 | 18 | _OBJS_VAR := OBJS_ex 19 | include ../src/objs.mk 20 | 21 | _OBJS_VAR := LIBS 22 | include ../src/objs.mk 23 | 24 | radius_example: $(OBJS_ex) $(LIBS) 25 | $(LDO) $(LDFLAGS) -o radius_example $(OBJS_ex) $(LIBS) $(LLIBS) 26 | 27 | clean: common-clean 28 | rm -f core *~ *.o *.d 29 | -------------------------------------------------------------------------------- /src/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIRS=ap common crypto drivers eapol_auth eapol_supp eap_common eap_peer eap_server l2_packet p2p pae radius rsn_supp tls utils wps 2 | SUBDIRS += fst 3 | 4 | all: 5 | for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d; done 6 | 7 | clean: 8 | $(Q)for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d clean; done 9 | $(Q)rm -f *~ 10 | 11 | install: 12 | for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d install; done 13 | -------------------------------------------------------------------------------- /src/ap/acs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ACS - Automatic Channel Selection module 3 | * Copyright (c) 2011, Atheros Communications 4 | * Copyright (c) 2013, Qualcomm Atheros, Inc. 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef ACS_H 11 | #define ACS_H 12 | 13 | #ifdef CONFIG_ACS 14 | 15 | enum hostapd_chan_status acs_init(struct hostapd_iface *iface); 16 | void acs_cleanup(struct hostapd_iface *iface); 17 | 18 | #else /* CONFIG_ACS */ 19 | 20 | static inline enum hostapd_chan_status acs_init(struct hostapd_iface *iface) 21 | { 22 | wpa_printf(MSG_ERROR, "ACS was disabled on your build, rebuild hostapd with CONFIG_ACS=y or set channel"); 23 | return HOSTAPD_CHAN_INVALID; 24 | } 25 | 26 | static inline void acs_cleanup(struct hostapd_iface *iface) 27 | { 28 | } 29 | 30 | #endif /* CONFIG_ACS */ 31 | 32 | #endif /* ACS_H */ 33 | -------------------------------------------------------------------------------- /src/ap/authsrv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Authentication server setup 3 | * Copyright (c) 2002-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef AUTHSRV_H 10 | #define AUTHSRV_H 11 | 12 | int authsrv_init(struct hostapd_data *hapd); 13 | void authsrv_deinit(struct hostapd_data *hapd); 14 | 15 | #endif /* AUTHSRV_H */ 16 | -------------------------------------------------------------------------------- /src/ap/bss_load.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BSS load update 3 | * Copyright (c) 2014, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef BSS_LOAD_UPDATE_H 10 | #define BSS_LOAD_UPDATE_H 11 | 12 | 13 | int bss_load_update_init(struct hostapd_data *hapd); 14 | void bss_load_update_deinit(struct hostapd_data *hapd); 15 | 16 | 17 | #endif /* BSS_LOAD_UPDATE_H */ 18 | -------------------------------------------------------------------------------- /src/ap/dhcp_snoop.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DHCP snooping for Proxy ARP 3 | * Copyright (c) 2014, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef DHCP_SNOOP_H 10 | #define DHCP_SNOOP_H 11 | 12 | #ifdef CONFIG_PROXYARP 13 | 14 | int dhcp_snoop_init(struct hostapd_data *hapd); 15 | void dhcp_snoop_deinit(struct hostapd_data *hapd); 16 | 17 | #else /* CONFIG_PROXYARP */ 18 | 19 | static inline int dhcp_snoop_init(struct hostapd_data *hapd) 20 | { 21 | return 0; 22 | } 23 | 24 | static inline void dhcp_snoop_deinit(struct hostapd_data *hapd) 25 | { 26 | } 27 | 28 | #endif /* CONFIG_PROXYARP */ 29 | 30 | #endif /* DHCP_SNOOP_H */ 31 | -------------------------------------------------------------------------------- /src/ap/eth_p_oui.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / IEEE 802 OUI Extended Ethertype 3 | * Copyright (c) 2016, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef ETH_P_OUI_H 10 | #define ETH_P_OUI_H 11 | 12 | struct eth_p_oui_ctx; 13 | struct hostapd_data; 14 | 15 | /* rx_callback only gets payload after OUI passed as buf */ 16 | struct eth_p_oui_ctx * 17 | eth_p_oui_register(struct hostapd_data *hapd, const char *ifname, u8 oui_suffix, 18 | void (*rx_callback)(void *ctx, const u8 *src_addr, 19 | const u8 *dst_addr, u8 oui_suffix, 20 | const u8 *buf, size_t len), 21 | void *rx_callback_ctx); 22 | void eth_p_oui_unregister(struct eth_p_oui_ctx *eth_p_oui); 23 | int eth_p_oui_send(struct eth_p_oui_ctx *ctx, const u8 *src_addr, 24 | const u8 *dst_addr, const u8 *buf, size_t len); 25 | void eth_p_oui_deliver(struct eth_p_oui_ctx *ctx, const u8 *src_addr, 26 | const u8 *dst_addr, const u8 *buf, size_t len); 27 | 28 | #endif /* ETH_P_OUI_H */ 29 | -------------------------------------------------------------------------------- /src/ap/fils_hlp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FILS HLP request processing 3 | * Copyright (c) 2017, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef FILS_HLP_H 10 | #define FILS_HLP_H 11 | 12 | int fils_process_hlp(struct hostapd_data *hapd, struct sta_info *sta, 13 | const u8 *pos, int left); 14 | 15 | #ifdef CONFIG_FILS 16 | 17 | void fils_hlp_deinit(struct hostapd_data *hapd); 18 | 19 | #else /* CONFIG_FILS */ 20 | 21 | static inline void fils_hlp_deinit(struct hostapd_data *hapd) 22 | { 23 | } 24 | 25 | #endif /* CONFIG_FILS */ 26 | 27 | #endif /* FILS_HLP_H */ 28 | -------------------------------------------------------------------------------- /src/ap/hs20.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hotspot 2.0 AP ANQP processing 3 | * Copyright (c) 2011-2013, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef HS20_H 10 | #define HS20_H 11 | 12 | struct hostapd_data; 13 | 14 | u8 * hostapd_eid_hs20_indication(struct hostapd_data *hapd, u8 *eid); 15 | u8 * hostapd_eid_osen(struct hostapd_data *hapd, u8 *eid); 16 | int hs20_send_wnm_notification(struct hostapd_data *hapd, const u8 *addr, 17 | u8 osu_method, const char *url); 18 | int hs20_send_wnm_notification_deauth_req(struct hostapd_data *hapd, 19 | const u8 *addr, 20 | const struct wpabuf *payload); 21 | int hs20_send_wnm_notification_t_c(struct hostapd_data *hapd, 22 | const u8 *addr, const char *url); 23 | void hs20_t_c_filtering(struct hostapd_data *hapd, struct sta_info *sta, 24 | int enabled); 25 | 26 | #endif /* HS20_H */ 27 | -------------------------------------------------------------------------------- /src/ap/ndisc_snoop.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Neighbor Discovery snooping for Proxy ARP 3 | * Copyright (c) 2014, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef NDISC_SNOOP_H 10 | #define NDISC_SNOOP_H 11 | 12 | #if defined(CONFIG_PROXYARP) && defined(CONFIG_IPV6) 13 | 14 | int ndisc_snoop_init(struct hostapd_data *hapd); 15 | void ndisc_snoop_deinit(struct hostapd_data *hapd); 16 | void sta_ip6addr_del(struct hostapd_data *hapd, struct sta_info *sta); 17 | 18 | #else /* CONFIG_PROXYARP && CONFIG_IPV6 */ 19 | 20 | static inline int ndisc_snoop_init(struct hostapd_data *hapd) 21 | { 22 | return 0; 23 | } 24 | 25 | static inline void ndisc_snoop_deinit(struct hostapd_data *hapd) 26 | { 27 | } 28 | 29 | static inline void sta_ip6addr_del(struct hostapd_data *hapd, 30 | struct sta_info *sta) 31 | { 32 | } 33 | 34 | #endif /* CONFIG_PROXYARP && CONFIG_IPV6 */ 35 | 36 | #endif /* NDISC_SNOOP_H */ 37 | -------------------------------------------------------------------------------- /src/ap/p2p_hostapd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / P2P integration 3 | * Copyright (c) 2009-2010, Atheros Communications 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef P2P_HOSTAPD_H 10 | #define P2P_HOSTAPD_H 11 | 12 | #ifdef CONFIG_P2P 13 | 14 | int hostapd_p2p_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta, 15 | char *buf, size_t buflen); 16 | int hostapd_p2p_set_noa(struct hostapd_data *hapd, u8 count, int start, 17 | int duration); 18 | void hostapd_p2p_non_p2p_sta_connected(struct hostapd_data *hapd); 19 | void hostapd_p2p_non_p2p_sta_disconnected(struct hostapd_data *hapd); 20 | 21 | 22 | #else /* CONFIG_P2P */ 23 | 24 | static inline int hostapd_p2p_get_mib_sta(struct hostapd_data *hapd, 25 | struct sta_info *sta, 26 | char *buf, size_t buflen) 27 | { 28 | return 0; 29 | } 30 | 31 | #endif /* CONFIG_P2P */ 32 | 33 | u8 * hostapd_eid_p2p_manage(struct hostapd_data *hapd, u8 *eid); 34 | 35 | #endif /* P2P_HOSTAPD_H */ 36 | -------------------------------------------------------------------------------- /src/ap/taxonomy.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / Station client taxonomy 3 | * Copyright (c) 2015 Google, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef TAXONOMY_H 10 | #define TAXONOMY_H 11 | 12 | void taxonomy_sta_info_probe_req(const struct hostapd_data *hapd, 13 | struct sta_info *sta, 14 | const u8 *ie, size_t ie_len); 15 | void taxonomy_hostapd_sta_info_probe_req(const struct hostapd_data *hapd, 16 | struct hostapd_sta_info *sta, 17 | const u8 *ie, size_t ie_len); 18 | void taxonomy_sta_info_assoc_req(const struct hostapd_data *hapd, 19 | struct sta_info *sta, 20 | const u8 *ie, size_t ie_len); 21 | int retrieve_sta_taxonomy(const struct hostapd_data *hapd, 22 | struct sta_info *sta, char *buf, size_t buflen); 23 | 24 | #endif /* TAXONOMY_H */ 25 | -------------------------------------------------------------------------------- /src/ap/tkip_countermeasures.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / TKIP countermeasures 3 | * Copyright (c) 2002-2012, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef TKIP_COUNTERMEASURES_H 10 | #define TKIP_COUNTERMEASURES_H 11 | 12 | int michael_mic_failure(struct hostapd_data *hapd, const u8 *addr, int local); 13 | void ieee80211_tkip_countermeasures_deinit(struct hostapd_data *hapd); 14 | 15 | #endif /* TKIP_COUNTERMEASURES_H */ 16 | -------------------------------------------------------------------------------- /src/ap/vlan.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / VLAN definition 3 | * Copyright (c) 2016, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "utils/includes.h" 10 | 11 | #include "utils/common.h" 12 | #include "ap/vlan.h" 13 | 14 | /* compare the two arguments, NULL is treated as empty 15 | * return zero iff they are equal 16 | */ 17 | int vlan_compare(struct vlan_description *a, struct vlan_description *b) 18 | { 19 | int i; 20 | const int a_empty = !a || !a->notempty; 21 | const int b_empty = !b || !b->notempty; 22 | 23 | if (a_empty && b_empty) 24 | return 0; 25 | if (a_empty || b_empty) 26 | return 1; 27 | if (a->untagged != b->untagged) 28 | return 1; 29 | for (i = 0; i < MAX_NUM_TAGGED_VLAN; i++) { 30 | if (a->tagged[i] != b->tagged[i]) 31 | return 1; 32 | } 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /src/ap/vlan.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / VLAN definition 3 | * Copyright (c) 2015, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef VLAN_H 10 | #define VLAN_H 11 | 12 | #define MAX_NUM_TAGGED_VLAN 32 13 | 14 | struct vlan_description { 15 | int notempty; /* 0 : no vlan information present, 1: else */ 16 | int untagged; /* >0 802.1q vid */ 17 | int tagged[MAX_NUM_TAGGED_VLAN]; /* first k items, ascending order */ 18 | }; 19 | 20 | #ifndef CONFIG_NO_VLAN 21 | int vlan_compare(struct vlan_description *a, struct vlan_description *b); 22 | #else /* CONFIG_NO_VLAN */ 23 | static inline int 24 | vlan_compare(struct vlan_description *a, struct vlan_description *b) 25 | { 26 | return 0; 27 | } 28 | #endif /* CONFIG_NO_VLAN */ 29 | 30 | #endif /* VLAN_H */ 31 | -------------------------------------------------------------------------------- /src/ap/vlan_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / VLAN netlink/ioctl api 3 | * Copyright (c) 2012, Michael Braun 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef VLAN_UTIL_H 10 | #define VLAN_UTIL_H 11 | 12 | struct hostapd_data; 13 | struct hostapd_vlan; 14 | struct full_dynamic_vlan; 15 | 16 | int vlan_add(const char *if_name, int vid, const char *vlan_if_name); 17 | int vlan_rem(const char *if_name); 18 | int vlan_set_name_type(unsigned int name_type); 19 | 20 | int ifconfig_helper(const char *if_name, int up); 21 | int ifconfig_up(const char *if_name); 22 | int iface_exists(const char *ifname); 23 | int vlan_if_remove(struct hostapd_data *hapd, struct hostapd_vlan *vlan); 24 | 25 | struct full_dynamic_vlan * 26 | full_dynamic_vlan_init(struct hostapd_data *hapd); 27 | void full_dynamic_vlan_deinit(struct full_dynamic_vlan *priv); 28 | void vlan_newlink(const char *ifname, struct hostapd_data *hapd); 29 | void vlan_dellink(const char *ifname, struct hostapd_data *hapd); 30 | 31 | #endif /* VLAN_UTIL_H */ 32 | -------------------------------------------------------------------------------- /src/ap/wmm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / WMM (Wi-Fi Multimedia) 3 | * Copyright 2002-2003, Instant802 Networks, Inc. 4 | * Copyright 2005-2006, Devicescape Software, Inc. 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef WME_H 11 | #define WME_H 12 | 13 | struct ieee80211_mgmt; 14 | struct wmm_tspec_element; 15 | 16 | u8 * hostapd_eid_wmm(struct hostapd_data *hapd, u8 *eid); 17 | int hostapd_eid_wmm_valid(struct hostapd_data *hapd, const u8 *eid, 18 | size_t len); 19 | void hostapd_wmm_action(struct hostapd_data *hapd, 20 | const struct ieee80211_mgmt *mgmt, size_t len); 21 | int wmm_process_tspec(struct wmm_tspec_element *tspec); 22 | 23 | #endif /* WME_H */ 24 | -------------------------------------------------------------------------------- /src/ap/wpa_auth_glue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd / WPA authenticator glue code 3 | * Copyright (c) 2002-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef WPA_AUTH_GLUE_H 10 | #define WPA_AUTH_GLUE_H 11 | 12 | int hostapd_setup_wpa(struct hostapd_data *hapd); 13 | void hostapd_reconfig_wpa(struct hostapd_data *hapd); 14 | void hostapd_deinit_wpa(struct hostapd_data *hapd); 15 | 16 | #endif /* WPA_AUTH_GLUE_H */ 17 | -------------------------------------------------------------------------------- /src/ap/wpa_auth_ie.h: -------------------------------------------------------------------------------- 1 | /* 2 | * hostapd - WPA/RSN IE and KDE definitions 3 | * Copyright (c) 2004-2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef WPA_AUTH_IE_H 10 | #define WPA_AUTH_IE_H 11 | 12 | u8 * wpa_add_kde(u8 *pos, u32 kde, const u8 *data, size_t data_len, 13 | const u8 *data2, size_t data2_len); 14 | int wpa_auth_gen_wpa_ie(struct wpa_authenticator *wpa_auth); 15 | 16 | #endif /* WPA_AUTH_IE_H */ 17 | -------------------------------------------------------------------------------- /src/common/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_IEEE80211R 2 | CFLAGS += -DCONFIG_HS20 3 | CFLAGS += -DCONFIG_SAE 4 | CFLAGS += -DCONFIG_SUITE 5 | CFLAGS += -DCONFIG_SUITEB 6 | CFLAGS += -DCONFIG_PTKSA_CACHE 7 | 8 | LIB_OBJS= \ 9 | gas.o \ 10 | hw_features_common.o \ 11 | ieee802_11_common.o \ 12 | sae.o \ 13 | ptksa_cache.o \ 14 | wpa_common.o 15 | 16 | include ../lib.rules 17 | -------------------------------------------------------------------------------- /src/common/linux_bridge.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Linux bridge configuration kernel interface 3 | * Copyright (c) 2016, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef LINUX_BRIDGE_H 10 | #define LINUX_BRIDGE_H 11 | 12 | /* This ioctl is defined in linux/sockios.h */ 13 | 14 | #ifndef SIOCBRADDBR 15 | #define SIOCBRADDBR 0x89a0 16 | #endif 17 | #ifndef SIOCBRDELBR 18 | #define SIOCBRDELBR 0x89a1 19 | #endif 20 | #ifndef SIOCBRADDIF 21 | #define SIOCBRADDIF 0x89a2 22 | #endif 23 | #ifndef SIOCBRDELIF 24 | #define SIOCBRDELIF 0x89a3 25 | #endif 26 | 27 | /* This interface is defined in linux/if_bridge.h */ 28 | 29 | #define BRCTL_GET_VERSION 0 30 | #define BRCTL_GET_BRIDGES 1 31 | #define BRCTL_ADD_BRIDGE 2 32 | #define BRCTL_DEL_BRIDGE 3 33 | #define BRCTL_ADD_IF 4 34 | #define BRCTL_DEL_IF 5 35 | #define BRCTL_GET_BRIDGE_INFO 6 36 | #define BRCTL_GET_PORT_LIST 7 37 | #define BRCTL_SET_BRIDGE_FORWARD_DELAY 8 38 | 39 | #endif /* LINUX_BRIDGE_H */ 40 | -------------------------------------------------------------------------------- /src/common/qca-vendor-attr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Qualcomm Atheros vendor specific attribute definitions 3 | * Copyright (c) 2014, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef QCA_VENDOR_ATTR_H 10 | #define QCA_VENDOR_ATTR_H 11 | 12 | /* 13 | * This file defines some of the attributes used with Qualcomm Atheros OUI 14 | * 00:13:74 in a way that is not suitable for qca-vendor.h, e.g., due to 15 | * compiler dependencies. 16 | */ 17 | 18 | struct qca_avoid_freq_range { 19 | u32 start_freq; 20 | u32 end_freq; 21 | } __attribute__ ((packed)); 22 | 23 | struct qca_avoid_freq_list { 24 | u32 count; 25 | struct qca_avoid_freq_range range[0]; 26 | } __attribute__ ((packed)); 27 | 28 | #endif /* QCA_VENDOR_ATTR_H */ 29 | -------------------------------------------------------------------------------- /src/common/version.h: -------------------------------------------------------------------------------- 1 | #ifndef VERSION_H 2 | #define VERSION_H 3 | 4 | #ifndef VERSION_STR_POSTFIX 5 | #define VERSION_STR_POSTFIX "" 6 | #endif /* VERSION_STR_POSTFIX */ 7 | 8 | #ifndef GIT_VERSION_STR_POSTFIX 9 | #define GIT_VERSION_STR_POSTFIX "" 10 | #endif /* GIT_VERSION_STR_POSTFIX */ 11 | 12 | #define VERSION_STR "2.11-devel" VERSION_STR_POSTFIX GIT_VERSION_STR_POSTFIX 13 | 14 | #endif /* VERSION_H */ 15 | -------------------------------------------------------------------------------- /src/crypto/aes-encblock.c: -------------------------------------------------------------------------------- 1 | /* 2 | * AES encrypt_block 3 | * 4 | * Copyright (c) 2003-2007, Jouni Malinen 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #include "includes.h" 11 | 12 | #include "common.h" 13 | #include "aes.h" 14 | #include "aes_wrap.h" 15 | 16 | /** 17 | * aes_128_encrypt_block - Perform one AES 128-bit block operation 18 | * @key: Key for AES 19 | * @in: Input data (16 bytes) 20 | * @out: Output of the AES block operation (16 bytes) 21 | * Returns: 0 on success, -1 on failure 22 | */ 23 | int aes_128_encrypt_block(const u8 *key, const u8 *in, u8 *out) 24 | { 25 | void *ctx; 26 | ctx = aes_encrypt_init(key, 16); 27 | if (ctx == NULL) 28 | return -1; 29 | aes_encrypt(ctx, in, out); 30 | aes_encrypt_deinit(ctx); 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /src/crypto/aes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AES functions 3 | * Copyright (c) 2003-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef AES_H 10 | #define AES_H 11 | 12 | #define AES_BLOCK_SIZE 16 13 | 14 | void * aes_encrypt_init(const u8 *key, size_t len); 15 | int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt); 16 | void aes_encrypt_deinit(void *ctx); 17 | void * aes_decrypt_init(const u8 *key, size_t len); 18 | int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain); 19 | void aes_decrypt_deinit(void *ctx); 20 | 21 | #endif /* AES_H */ 22 | -------------------------------------------------------------------------------- /src/crypto/aes_siv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * AES SIV (RFC 5297) 3 | * Copyright (c) 2013 Cozybit, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef AES_SIV_H 10 | #define AES_SIV_H 11 | 12 | int aes_siv_encrypt(const u8 *key, size_t key_len, 13 | const u8 *pw, size_t pwlen, 14 | size_t num_elem, const u8 *addr[], const size_t *len, 15 | u8 *out); 16 | int aes_siv_decrypt(const u8 *key, size_t key_len, 17 | const u8 *iv_crypt, size_t iv_c_len, 18 | size_t num_elem, const u8 *addr[], const size_t *len, 19 | u8 *out); 20 | 21 | #endif /* AES_SIV_H */ 22 | -------------------------------------------------------------------------------- /src/crypto/crypto_none.c: -------------------------------------------------------------------------------- 1 | /* 2 | * WPA Supplicant / Empty template functions for crypto wrapper 3 | * Copyright (c) 2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common.h" 12 | #include "crypto.h" 13 | 14 | 15 | int md4_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) 16 | { 17 | return 0; 18 | } 19 | 20 | 21 | int des_encrypt(const u8 *clear, const u8 *key, u8 *cypher) 22 | { 23 | return 0; 24 | } 25 | 26 | 27 | void crypto_unload(void) 28 | { 29 | } 30 | -------------------------------------------------------------------------------- /src/crypto/des_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DES and 3DES-EDE ciphers 3 | * Copyright (c) 2006-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef DES_I_H 10 | #define DES_I_H 11 | 12 | struct des3_key_s { 13 | u32 ek[3][32]; 14 | u32 dk[3][32]; 15 | }; 16 | 17 | void des_key_setup(const u8 *key, u32 *ek, u32 *dk); 18 | void des_block_encrypt(const u8 *plain, const u32 *ek, u8 *crypt); 19 | void des_block_decrypt(const u8 *crypt, const u32 *dk, u8 *plain); 20 | 21 | void des3_key_setup(const u8 *key, struct des3_key_s *dkey); 22 | void des3_encrypt(const u8 *plain, const struct des3_key_s *key, u8 *crypt); 23 | void des3_decrypt(const u8 *crypt, const struct des3_key_s *key, u8 *plain); 24 | 25 | #endif /* DES_I_H */ 26 | -------------------------------------------------------------------------------- /src/crypto/dh_group5.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Diffie-Hellman group 5 operations 3 | * Copyright (c) 2009, 2012, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common.h" 12 | #include "dh_groups.h" 13 | #include "dh_group5.h" 14 | 15 | 16 | void * dh5_init(struct wpabuf **priv, struct wpabuf **publ) 17 | { 18 | wpabuf_free(*publ); 19 | *publ = dh_init(dh_groups_get(5), priv); 20 | if (*publ == NULL) 21 | return NULL; 22 | return (void *) 1; 23 | } 24 | 25 | 26 | void * dh5_init_fixed(const struct wpabuf *priv, const struct wpabuf *publ) 27 | { 28 | return (void *) 1; 29 | } 30 | 31 | 32 | struct wpabuf * dh5_derive_shared(void *ctx, const struct wpabuf *peer_public, 33 | const struct wpabuf *own_private) 34 | { 35 | return dh_derive_shared(peer_public, own_private, dh_groups_get(5)); 36 | } 37 | 38 | 39 | void dh5_free(void *ctx) 40 | { 41 | } 42 | -------------------------------------------------------------------------------- /src/crypto/dh_group5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Diffie-Hellman group 5 operations 3 | * Copyright (c) 2009, 2012, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef DH_GROUP5_H 10 | #define DH_GROUP5_H 11 | 12 | void * dh5_init(struct wpabuf **priv, struct wpabuf **publ); 13 | void * dh5_init_fixed(const struct wpabuf *priv, const struct wpabuf *publ); 14 | struct wpabuf * dh5_derive_shared(void *ctx, const struct wpabuf *peer_public, 15 | const struct wpabuf *own_private); 16 | void dh5_free(void *ctx); 17 | 18 | #endif /* DH_GROUP5_H */ 19 | -------------------------------------------------------------------------------- /src/crypto/dh_groups.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Diffie-Hellman groups 3 | * Copyright (c) 2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef DH_GROUPS_H 10 | #define DH_GROUPS_H 11 | 12 | struct dh_group { 13 | int id; 14 | const u8 *generator; 15 | size_t generator_len; 16 | const u8 *prime; 17 | size_t prime_len; 18 | const u8 *order; 19 | size_t order_len; 20 | unsigned int safe_prime:1; 21 | }; 22 | 23 | const struct dh_group * dh_groups_get(int id); 24 | struct wpabuf * dh_init(const struct dh_group *dh, struct wpabuf **priv); 25 | struct wpabuf * dh_derive_shared(const struct wpabuf *peer_public, 26 | const struct wpabuf *own_private, 27 | const struct dh_group *dh); 28 | 29 | #endif /* DH_GROUPS_H */ 30 | -------------------------------------------------------------------------------- /src/crypto/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MD5 hash implementation and interface functions 3 | * Copyright (c) 2003-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef MD5_H 10 | #define MD5_H 11 | 12 | #define MD5_MAC_LEN 16 13 | 14 | int hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, 15 | const u8 *addr[], const size_t *len, u8 *mac); 16 | int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, 17 | u8 *mac); 18 | 19 | #endif /* MD5_H */ 20 | -------------------------------------------------------------------------------- /src/crypto/md5_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MD5 internal definitions 3 | * Copyright (c) 2003-2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef MD5_I_H 10 | #define MD5_I_H 11 | 12 | struct MD5Context { 13 | u32 buf[4]; 14 | u32 bits[2]; 15 | u8 in[64]; 16 | }; 17 | 18 | void MD5Init(struct MD5Context *context); 19 | void MD5Update(struct MD5Context *context, unsigned char const *buf, 20 | unsigned len); 21 | void MD5Final(unsigned char digest[16], struct MD5Context *context); 22 | 23 | #endif /* MD5_I_H */ 24 | -------------------------------------------------------------------------------- /src/crypto/random.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Random number generator 3 | * Copyright (c) 2010-2011, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef RANDOM_H 10 | #define RANDOM_H 11 | 12 | #ifdef CONFIG_NO_RANDOM_POOL 13 | #define random_init(e) do { } while (0) 14 | #define random_deinit() do { } while (0) 15 | #define random_add_randomness(b, l) do { } while (0) 16 | #define random_get_bytes(b, l) os_get_random((b), (l)) 17 | #define random_pool_ready() 1 18 | #define random_mark_pool_ready() do { } while (0) 19 | #else /* CONFIG_NO_RANDOM_POOL */ 20 | void random_init(const char *entropy_file); 21 | void random_deinit(void); 22 | void random_add_randomness(const void *buf, size_t len); 23 | int random_get_bytes(void *buf, size_t len); 24 | int random_pool_ready(void); 25 | void random_mark_pool_ready(void); 26 | #endif /* CONFIG_NO_RANDOM_POOL */ 27 | 28 | #endif /* RANDOM_H */ 29 | -------------------------------------------------------------------------------- /src/crypto/sha1_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA1 internal definitions 3 | * Copyright (c) 2003-2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA1_I_H 10 | #define SHA1_I_H 11 | 12 | struct SHA1Context { 13 | u32 state[5]; 14 | u32 count[2]; 15 | unsigned char buffer[64]; 16 | }; 17 | 18 | void SHA1Init(struct SHA1Context *context); 19 | void SHA1Update(struct SHA1Context *context, const void *data, u32 len); 20 | void SHA1Final(unsigned char digest[20], struct SHA1Context *context); 21 | void SHA1Transform(u32 state[5], const unsigned char buffer[64]); 22 | 23 | #endif /* SHA1_I_H */ 24 | -------------------------------------------------------------------------------- /src/crypto/sha256_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA-256 internal definitions 3 | * Copyright (c) 2003-2011, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA256_I_H 10 | #define SHA256_I_H 11 | 12 | #define SHA256_BLOCK_SIZE 64 13 | 14 | struct sha256_state { 15 | u64 length; 16 | u32 state[8], curlen; 17 | u8 buf[SHA256_BLOCK_SIZE]; 18 | }; 19 | 20 | void sha256_init(struct sha256_state *md); 21 | int sha256_process(struct sha256_state *md, const unsigned char *in, 22 | unsigned long inlen); 23 | int sha256_done(struct sha256_state *md, unsigned char *out); 24 | 25 | #endif /* SHA256_I_H */ 26 | -------------------------------------------------------------------------------- /src/crypto/sha384_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA-384 internal definitions 3 | * Copyright (c) 2015, Pali Rohár 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA384_I_H 10 | #define SHA384_I_H 11 | 12 | #include "sha512_i.h" 13 | 14 | #define SHA384_BLOCK_SIZE SHA512_BLOCK_SIZE 15 | 16 | #define sha384_state sha512_state 17 | 18 | void sha384_init(struct sha384_state *md); 19 | int sha384_process(struct sha384_state *md, const unsigned char *in, 20 | unsigned long inlen); 21 | int sha384_done(struct sha384_state *md, unsigned char *out); 22 | 23 | #endif /* SHA384_I_H */ 24 | -------------------------------------------------------------------------------- /src/crypto/sha512.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA512 hash implementation and interface functions 3 | * Copyright (c) 2015-2017, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA512_H 10 | #define SHA512_H 11 | 12 | #define SHA512_MAC_LEN 64 13 | 14 | int hmac_sha512_vector(const u8 *key, size_t key_len, size_t num_elem, 15 | const u8 *addr[], const size_t *len, u8 *mac); 16 | int hmac_sha512(const u8 *key, size_t key_len, const u8 *data, 17 | size_t data_len, u8 *mac); 18 | int sha512_prf(const u8 *key, size_t key_len, const char *label, 19 | const u8 *data, size_t data_len, u8 *buf, size_t buf_len); 20 | int sha512_prf_bits(const u8 *key, size_t key_len, const char *label, 21 | const u8 *data, size_t data_len, u8 *buf, 22 | size_t buf_len_bits); 23 | int hmac_sha512_kdf(const u8 *secret, size_t secret_len, 24 | const char *label, const u8 *seed, size_t seed_len, 25 | u8 *out, size_t outlen); 26 | 27 | #endif /* SHA512_H */ 28 | -------------------------------------------------------------------------------- /src/crypto/sha512_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA-512 internal definitions 3 | * Copyright (c) 2015, Pali Rohár 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SHA512_I_H 10 | #define SHA512_I_H 11 | 12 | #define SHA512_BLOCK_SIZE 128 13 | 14 | struct sha512_state { 15 | u64 length, state[8]; 16 | u32 curlen; 17 | u8 buf[SHA512_BLOCK_SIZE]; 18 | }; 19 | 20 | void sha512_init(struct sha512_state *md); 21 | int sha512_process(struct sha512_state *md, const unsigned char *in, 22 | unsigned long inlen); 23 | int sha512_done(struct sha512_state *md, unsigned char *out); 24 | 25 | #endif /* SHA512_I_H */ 26 | -------------------------------------------------------------------------------- /src/crypto/tls_openssl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SSL/TLS interface functions for OpenSSL 3 | * Copyright (c) 2004-2015, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef TLS_OPENSSL_H 10 | #define TLS_OPENSSL_H 11 | 12 | enum ocsp_result { 13 | OCSP_GOOD, OCSP_REVOKED, OCSP_NO_RESPONSE, OCSP_INVALID 14 | }; 15 | 16 | enum ocsp_result check_ocsp_resp(SSL_CTX *ssl_ctx, SSL *ssl, X509 *cert, 17 | X509 *issuer, X509 *issuer_issuer); 18 | 19 | #endif /* TLS_OPENSSL_H */ 20 | -------------------------------------------------------------------------------- /src/drivers/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @echo Nothing to be made. 3 | 4 | clean: 5 | rm -f *~ *.o *.d *.gcno *.gcda *.gcov 6 | rm -f build.wpa_supplicant build.hostapd 7 | 8 | install: 9 | @echo Nothing to be made. 10 | -------------------------------------------------------------------------------- /src/drivers/linux_ioctl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Linux ioctl helper functions for driver wrappers 3 | * Copyright (c) 2002-2010, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef LINUX_IOCTL_H 10 | #define LINUX_IOCTL_H 11 | 12 | int linux_set_iface_flags(int sock, const char *ifname, int dev_up); 13 | int linux_iface_up(int sock, const char *ifname); 14 | int linux_get_ifhwaddr(int sock, const char *ifname, u8 *addr); 15 | int linux_set_ifhwaddr(int sock, const char *ifname, const u8 *addr); 16 | int linux_br_add(int sock, const char *brname); 17 | int linux_br_del(int sock, const char *brname); 18 | int linux_br_add_if(int sock, const char *brname, const char *ifname); 19 | int linux_br_del_if(int sock, const char *brname, const char *ifname); 20 | int linux_br_get(char *brname, const char *ifname); 21 | int linux_master_get(char *master_ifname, const char *ifname); 22 | 23 | #endif /* LINUX_IOCTL_H */ 24 | -------------------------------------------------------------------------------- /src/drivers/linux_wext.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Driver interaction with generic Linux Wireless Extensions 3 | * Copyright (c) 2003-2011, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef LINUX_WEXT_H 10 | #define LINUX_WEXT_H 11 | 12 | #ifndef ANDROID 13 | 14 | /* 15 | * Avoid including other kernel header to avoid conflicts with C library 16 | * headers. 17 | */ 18 | #define _LINUX_TYPES_H 19 | #define _LINUX_SOCKET_H 20 | #define _LINUX_IF_H 21 | 22 | #include 23 | #include 24 | typedef uint32_t __u32; 25 | typedef int32_t __s32; 26 | typedef uint16_t __u16; 27 | typedef int16_t __s16; 28 | typedef uint8_t __u8; 29 | #ifndef __user 30 | #define __user 31 | #endif /* __user */ 32 | 33 | #endif /* ANDROID */ 34 | 35 | #include 36 | 37 | #ifndef IW_ENCODE_ALG_PMK 38 | #define IW_ENCODE_ALG_PMK 4 39 | #endif 40 | 41 | #ifndef IW_ENC_CAPA_4WAY_HANDSHAKE 42 | #define IW_ENC_CAPA_4WAY_HANDSHAKE 0x00000010 43 | #endif 44 | 45 | #endif /* LINUX_WEXT_H */ 46 | -------------------------------------------------------------------------------- /src/drivers/netlink.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Netlink helper functions for driver wrappers 3 | * Copyright (c) 2002-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef NETLINK_H 10 | #define NETLINK_H 11 | 12 | struct netlink_data; 13 | struct ifinfomsg; 14 | 15 | struct netlink_config { 16 | void *ctx; 17 | void (*newlink_cb)(void *ctx, struct ifinfomsg *ifi, u8 *buf, 18 | size_t len); 19 | void (*dellink_cb)(void *ctx, struct ifinfomsg *ifi, u8 *buf, 20 | size_t len); 21 | }; 22 | 23 | struct netlink_data * netlink_init(struct netlink_config *cfg); 24 | void netlink_deinit(struct netlink_data *netlink); 25 | int netlink_send_oper_ifla(struct netlink_data *netlink, int ifindex, 26 | int linkmode, int operstate); 27 | 28 | #endif /* NETLINK_H */ 29 | -------------------------------------------------------------------------------- /src/drivers/rfkill.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Linux rfkill helper functions for driver wrappers 3 | * Copyright (c) 2010, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef RFKILL_H 10 | #define RFKILL_H 11 | 12 | struct rfkill_data; 13 | 14 | struct rfkill_config { 15 | void *ctx; 16 | char ifname[IFNAMSIZ]; 17 | void (*blocked_cb)(void *ctx); 18 | void (*unblocked_cb)(void *ctx); 19 | }; 20 | 21 | struct rfkill_data * rfkill_init(struct rfkill_config *cfg); 22 | void rfkill_deinit(struct rfkill_data *rfkill); 23 | int rfkill_is_blocked(struct rfkill_data *rfkill); 24 | 25 | #endif /* RFKILL_H */ 26 | -------------------------------------------------------------------------------- /src/eap_common/Makefile: -------------------------------------------------------------------------------- 1 | LIB_OBJS= \ 2 | chap.o \ 3 | eap_common.o \ 4 | eap_eke_common.o \ 5 | eap_eke_common.o \ 6 | eap_fast_common.o \ 7 | eap_gpsk_common.o \ 8 | eap_ikev2_common.o \ 9 | eap_pax_common.o \ 10 | eap_peap_common.o \ 11 | eap_psk_common.o \ 12 | eap_pwd_common.o \ 13 | eap_sake_common.o \ 14 | eap_sim_common.o \ 15 | eap_wsc_common.o \ 16 | ikev2_common.o 17 | 18 | include ../lib.rules 19 | -------------------------------------------------------------------------------- /src/eap_common/chap.c: -------------------------------------------------------------------------------- 1 | /* 2 | * CHAP-MD5 (RFC 1994) 3 | * Copyright (c) 2007-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common.h" 12 | #include "crypto/crypto.h" 13 | #include "chap.h" 14 | 15 | int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge, 16 | size_t challenge_len, u8 *response) 17 | { 18 | const u8 *addr[3]; 19 | size_t len[3]; 20 | 21 | addr[0] = &id; 22 | len[0] = 1; 23 | addr[1] = secret; 24 | len[1] = secret_len; 25 | addr[2] = challenge; 26 | len[2] = challenge_len; 27 | return md5_vector(3, addr, len, response); 28 | } 29 | -------------------------------------------------------------------------------- /src/eap_common/chap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * CHAP-MD5 (RFC 1994) 3 | * Copyright (c) 2007-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef CHAP_H 10 | #define CHAP_H 11 | 12 | #define CHAP_MD5_LEN 16 13 | 14 | int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge, 15 | size_t challenge_len, u8 *response); 16 | 17 | #endif /* CHAP_H */ 18 | -------------------------------------------------------------------------------- /src/eap_common/eap_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP common peer/server definitions 3 | * Copyright (c) 2004-2014, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EAP_COMMON_H 10 | #define EAP_COMMON_H 11 | 12 | #include "wpabuf.h" 13 | 14 | struct erp_tlvs { 15 | const u8 *keyname; 16 | const u8 *domain; 17 | 18 | u8 keyname_len; 19 | u8 domain_len; 20 | }; 21 | 22 | int eap_hdr_len_valid(const struct wpabuf *msg, size_t min_payload); 23 | const u8 * eap_hdr_validate(int vendor, enum eap_type eap_type, 24 | const struct wpabuf *msg, size_t *plen); 25 | struct wpabuf * eap_msg_alloc(int vendor, enum eap_type type, 26 | size_t payload_len, u8 code, u8 identifier); 27 | void eap_update_len(struct wpabuf *msg); 28 | u8 eap_get_id(const struct wpabuf *msg); 29 | enum eap_type eap_get_type(const struct wpabuf *msg); 30 | int erp_parse_tlvs(const u8 *pos, const u8 *end, struct erp_tlvs *tlvs, 31 | int stop_at_keyname); 32 | 33 | #endif /* EAP_COMMON_H */ 34 | -------------------------------------------------------------------------------- /src/eap_common/eap_ikev2_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP-IKEv2 definitions 3 | * Copyright (c) 2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EAP_IKEV2_COMMON_H 10 | #define EAP_IKEV2_COMMON_H 11 | 12 | #define IKEV2_FLAGS_LENGTH_INCLUDED 0x80 13 | #define IKEV2_FLAGS_MORE_FRAGMENTS 0x40 14 | #define IKEV2_FLAGS_ICV_INCLUDED 0x20 15 | 16 | #define IKEV2_FRAGMENT_SIZE 1400 17 | 18 | struct ikev2_keys; 19 | 20 | int eap_ikev2_derive_keymat(int prf, struct ikev2_keys *keys, 21 | const u8 *i_nonce, size_t i_nonce_len, 22 | const u8 *r_nonce, size_t r_nonce_len, 23 | u8 *keymat); 24 | struct wpabuf * eap_ikev2_build_frag_ack(u8 id, u8 code); 25 | int eap_ikev2_validate_icv(int integ_alg, struct ikev2_keys *keys, 26 | int initiator, const struct wpabuf *msg, 27 | const u8 *pos, const u8 *end); 28 | 29 | #endif /* EAP_IKEV2_COMMON_H */ 30 | -------------------------------------------------------------------------------- /src/eap_common/eap_peap_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP-PEAP common routines 3 | * Copyright (c) 2008-2011, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EAP_PEAP_COMMON_H 10 | #define EAP_PEAP_COMMON_H 11 | 12 | int peap_prfplus(int version, const u8 *key, size_t key_len, 13 | const char *label, const u8 *seed, size_t seed_len, 14 | u8 *buf, size_t buf_len); 15 | 16 | #endif /* EAP_PEAP_COMMON_H */ 17 | -------------------------------------------------------------------------------- /src/eap_common/eap_wsc_common.c: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP-WSC common routines for Wi-Fi Protected Setup 3 | * Copyright (c) 2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common.h" 12 | #include "eap_defs.h" 13 | #include "eap_common.h" 14 | #include "wps/wps.h" 15 | #include "eap_wsc_common.h" 16 | 17 | struct wpabuf * eap_wsc_build_frag_ack(u8 id, u8 code) 18 | { 19 | struct wpabuf *msg; 20 | 21 | msg = eap_msg_alloc(EAP_VENDOR_WFA, EAP_VENDOR_TYPE_WSC, 2, code, id); 22 | if (msg == NULL) { 23 | wpa_printf(MSG_ERROR, "EAP-WSC: Failed to allocate memory for " 24 | "FRAG_ACK"); 25 | return NULL; 26 | } 27 | 28 | wpa_printf(MSG_DEBUG, "EAP-WSC: Send WSC/FRAG_ACK"); 29 | wpabuf_put_u8(msg, WSC_FRAG_ACK); /* Op-Code */ 30 | wpabuf_put_u8(msg, 0); /* Flags */ 31 | 32 | return msg; 33 | } 34 | -------------------------------------------------------------------------------- /src/eap_common/eap_wsc_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EAP-WSC definitions for Wi-Fi Protected Setup 3 | * Copyright (c) 2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EAP_WSC_COMMON_H 10 | #define EAP_WSC_COMMON_H 11 | 12 | #define EAP_VENDOR_TYPE_WSC 1 13 | 14 | #define WSC_FLAGS_MF 0x01 15 | #define WSC_FLAGS_LF 0x02 16 | 17 | #define WSC_ID_REGISTRAR "WFA-SimpleConfig-Registrar-1-0" 18 | #define WSC_ID_REGISTRAR_LEN 30 19 | #define WSC_ID_ENROLLEE "WFA-SimpleConfig-Enrollee-1-0" 20 | #define WSC_ID_ENROLLEE_LEN 29 21 | 22 | #define WSC_FRAGMENT_SIZE 1400 23 | 24 | 25 | struct wpabuf * eap_wsc_build_frag_ack(u8 id, u8 code); 26 | 27 | #endif /* EAP_WSC_COMMON_H */ 28 | -------------------------------------------------------------------------------- /src/eap_peer/.gitignore: -------------------------------------------------------------------------------- 1 | *.so 2 | -------------------------------------------------------------------------------- /src/eap_peer/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DIEEE8021X_EAPOL 2 | 3 | LIB_OBJS= \ 4 | eap.o \ 5 | eap_methods.o 6 | 7 | include ../lib.rules 8 | -------------------------------------------------------------------------------- /src/eap_peer/mschapv2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MSCHAPV2 (RFC 2759) 3 | * Copyright (c) 2004-2008, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef MSCHAPV2_H 10 | #define MSCHAPV2_H 11 | 12 | #define MSCHAPV2_CHAL_LEN 16 13 | #define MSCHAPV2_NT_RESPONSE_LEN 24 14 | #define MSCHAPV2_AUTH_RESPONSE_LEN 20 15 | #define MSCHAPV2_MASTER_KEY_LEN 16 16 | 17 | const u8 * mschapv2_remove_domain(const u8 *username, size_t *len); 18 | int mschapv2_derive_response(const u8 *username, size_t username_len, 19 | const u8 *password, size_t password_len, 20 | int pwhash, 21 | const u8 *auth_challenge, 22 | const u8 *peer_challenge, 23 | u8 *nt_response, u8 *auth_response, 24 | u8 *master_key); 25 | int mschapv2_verify_auth_response(const u8 *auth_response, 26 | const u8 *buf, size_t buf_len); 27 | 28 | #endif /* MSCHAPV2_H */ 29 | -------------------------------------------------------------------------------- /src/eap_server/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_HS20 2 | 3 | LIB_OBJS= \ 4 | eap_server.o \ 5 | eap_server_identity.o \ 6 | eap_server_methods.o 7 | 8 | include ../lib.rules 9 | -------------------------------------------------------------------------------- /src/eapol_auth/Makefile: -------------------------------------------------------------------------------- 1 | LIB_OBJS = eapol_auth_sm.o eapol_auth_dump.o 2 | include ../lib.rules 3 | -------------------------------------------------------------------------------- /src/eapol_supp/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DIEEE8021X_EAPOL 2 | 3 | LIB_OBJS = eapol_supp_sm.o 4 | 5 | include ../lib.rules 6 | -------------------------------------------------------------------------------- /src/fst/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @echo Nothing to be made. 3 | 4 | clean: 5 | rm -f *~ *.o *.d 6 | 7 | install: 8 | @echo Nothing to be made. 9 | -------------------------------------------------------------------------------- /src/l2_packet/Makefile: -------------------------------------------------------------------------------- 1 | LIB_OBJS = l2_packet_linux.o 2 | 3 | include ../lib.rules 4 | -------------------------------------------------------------------------------- /src/lib.rules: -------------------------------------------------------------------------------- 1 | _LIBMK := $(lastword $(wordlist 1,$(shell expr $(words $(MAKEFILE_LIST)) - 1),$(MAKEFILE_LIST))) 2 | _LIBNAME := $(notdir $(patsubst %/,%,$(dir $(abspath $(_LIBMK))))) 3 | ALL := $(OUT)lib$(_LIBNAME).a 4 | LIB_RULES := $(lastword $(MAKEFILE_LIST)) 5 | include $(dir $(LIB_RULES))build.rules 6 | 7 | ifdef TEST_FUZZ 8 | CFLAGS += -DCONFIG_NO_RANDOM_POOL 9 | CFLAGS += -DTEST_FUZZ 10 | endif 11 | 12 | CFLAGS += $(FUZZ_CFLAGS) 13 | CFLAGS += -I.. -I../utils 14 | 15 | _OBJS_VAR := LIB_OBJS 16 | include ../objs.mk 17 | 18 | $(ALL): $(LIB_OBJS) 19 | @$(E) " AR $(notdir $@)" 20 | $(Q)$(AR) crT $@ $? 21 | 22 | install-default: 23 | @echo Nothing to be made. 24 | 25 | %: %-default 26 | @true 27 | 28 | clean: common-clean 29 | $(Q)rm -f *~ *.o *.d *.gcno *.gcda *.gcov $(ALL) 30 | -------------------------------------------------------------------------------- /src/objs.mk: -------------------------------------------------------------------------------- 1 | $(_OBJS_VAR) := $(call BUILDOBJ,$($(_OBJS_VAR))) 2 | -include $(filter-out %.a,$($(_OBJS_VAR):%.o=%.d)) 3 | _DIRS += $(dir $($(_OBJS_VAR))) 4 | -------------------------------------------------------------------------------- /src/p2p/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_WIFI_DISPLAY 2 | CFLAGS += -DCONFIG_WPS_NFC 3 | 4 | LIB_OBJS= \ 5 | p2p_build.o \ 6 | p2p.o \ 7 | p2p_dev_disc.o \ 8 | p2p_go_neg.o \ 9 | p2p_group.o \ 10 | p2p_invitation.o \ 11 | p2p_parse.o \ 12 | p2p_pd.o \ 13 | p2p_sd.o \ 14 | p2p_utils.o 15 | 16 | include ../lib.rules 17 | -------------------------------------------------------------------------------- /src/pae/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @echo Nothing to be made. 3 | 4 | clean: 5 | rm -f *~ *.o *.d 6 | 7 | install: 8 | @echo Nothing to be made. 9 | -------------------------------------------------------------------------------- /src/radius/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_IPV6 2 | 3 | LIB_OBJS= \ 4 | radius.o \ 5 | radius_client.o \ 6 | radius_das.o \ 7 | radius_server.o 8 | 9 | include ../lib.rules 10 | -------------------------------------------------------------------------------- /src/rsn_supp/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_IEEE80211R 2 | CFLAGS += -DCONFIG_TDLS 3 | CFLAGS += -DCONFIG_WNM 4 | CFLAGS += -DIEEE8021X_EAPOL 5 | 6 | LIB_OBJS= \ 7 | pmksa_cache.o \ 8 | wpa_ft.o \ 9 | tdls.o \ 10 | preauth.o \ 11 | wpa.o \ 12 | wpa_ie.o 13 | 14 | include ../lib.rules 15 | -------------------------------------------------------------------------------- /src/rsn_supp/wpa_ie.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_supplicant - WPA/RSN IE and KDE definitions 3 | * Copyright (c) 2004-2007, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef WPA_IE_H 10 | #define WPA_IE_H 11 | 12 | struct wpa_sm; 13 | 14 | int wpa_gen_wpa_ie(struct wpa_sm *sm, u8 *wpa_ie, size_t wpa_ie_len); 15 | int wpa_gen_rsnxe(struct wpa_sm *sm, u8 *rsnxe, size_t rsnxe_len); 16 | u16 rsn_supp_capab(struct wpa_sm *sm); 17 | 18 | #endif /* WPA_IE_H */ 19 | -------------------------------------------------------------------------------- /src/tls/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH 2 | CFLAGS += -DCONFIG_CRYPTO_INTERNAL 3 | CFLAGS += -DCONFIG_TLSV11 4 | CFLAGS += -DCONFIG_TLSV12 5 | 6 | LIB_OBJS= \ 7 | asn1.o \ 8 | bignum.o \ 9 | pkcs1.o \ 10 | pkcs5.o \ 11 | pkcs8.o \ 12 | rsa.o \ 13 | tlsv1_client.o \ 14 | tlsv1_client_read.o \ 15 | tlsv1_client_write.o \ 16 | tlsv1_client_ocsp.o \ 17 | tlsv1_common.o \ 18 | tlsv1_cred.o \ 19 | tlsv1_record.o \ 20 | tlsv1_server.o \ 21 | tlsv1_server_read.o \ 22 | tlsv1_server_write.o \ 23 | x509v3.o 24 | 25 | include ../lib.rules 26 | -------------------------------------------------------------------------------- /src/tls/pkcs1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * PKCS #1 (RSA Encryption) 3 | * Copyright (c) 2006-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef PKCS1_H 10 | #define PKCS1_H 11 | 12 | struct crypto_public_key; 13 | struct asn1_oid; 14 | 15 | int pkcs1_encrypt(int block_type, struct crypto_rsa_key *key, 16 | int use_private, const u8 *in, size_t inlen, 17 | u8 *out, size_t *outlen); 18 | int pkcs1_v15_private_key_decrypt(struct crypto_rsa_key *key, 19 | const u8 *in, size_t inlen, 20 | u8 *out, size_t *outlen); 21 | int pkcs1_decrypt_public_key(struct crypto_rsa_key *key, 22 | const u8 *crypt, size_t crypt_len, 23 | u8 *plain, size_t *plain_len); 24 | int pkcs1_v15_sig_ver(struct crypto_public_key *pk, 25 | const u8 *s, size_t s_len, 26 | const struct asn1_oid *hash_alg, 27 | const u8 *hash, size_t hash_len); 28 | 29 | #endif /* PKCS1_H */ 30 | -------------------------------------------------------------------------------- /src/tls/pkcs5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * PKCS #5 (Password-based Encryption) 3 | * Copyright (c) 2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef PKCS5_H 10 | #define PKCS5_H 11 | 12 | u8 * pkcs5_decrypt(const u8 *enc_alg, size_t enc_alg_len, 13 | const u8 *enc_data, size_t enc_data_len, 14 | const char *passwd, size_t *data_len); 15 | 16 | #endif /* PKCS5_H */ 17 | -------------------------------------------------------------------------------- /src/tls/pkcs8.h: -------------------------------------------------------------------------------- 1 | /* 2 | * PKCS #8 (Private-key information syntax) 3 | * Copyright (c) 2006-2009, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef PKCS8_H 10 | #define PKCS8_H 11 | 12 | struct crypto_private_key * pkcs8_key_import(const u8 *buf, size_t len); 13 | struct crypto_private_key * 14 | pkcs8_enc_key_import(const u8 *buf, size_t len, const char *passwd); 15 | 16 | #endif /* PKCS8_H */ 17 | -------------------------------------------------------------------------------- /src/tls/rsa.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RSA 3 | * Copyright (c) 2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef RSA_H 10 | #define RSA_H 11 | 12 | struct crypto_rsa_key; 13 | 14 | struct crypto_rsa_key * 15 | crypto_rsa_import_public_key(const u8 *buf, size_t len); 16 | struct crypto_rsa_key * 17 | crypto_rsa_import_public_key_parts(const u8 *n, size_t n_len, 18 | const u8 *e, size_t e_len); 19 | struct crypto_rsa_key * 20 | crypto_rsa_import_private_key(const u8 *buf, size_t len); 21 | size_t crypto_rsa_get_modulus_len(struct crypto_rsa_key *key); 22 | int crypto_rsa_exptmod(const u8 *in, size_t inlen, u8 *out, size_t *outlen, 23 | struct crypto_rsa_key *key, int use_private); 24 | void crypto_rsa_free(struct crypto_rsa_key *key); 25 | 26 | #endif /* RSA_H */ 27 | -------------------------------------------------------------------------------- /src/utils/Makefile: -------------------------------------------------------------------------------- 1 | #CFLAGS += -DWPA_TRACE 2 | CFLAGS += -DCONFIG_IPV6 3 | CFLAGS += -DCONFIG_DEBUG_FILE 4 | 5 | LIB_OBJS= \ 6 | base64.o \ 7 | bitfield.o \ 8 | common.o \ 9 | config.o \ 10 | crc32.o \ 11 | ip_addr.o \ 12 | json.o \ 13 | radiotap.o \ 14 | trace.o \ 15 | uuid.o \ 16 | wpa_debug.o \ 17 | wpabuf.o 18 | 19 | # Pick correct OS wrapper implementation 20 | LIB_OBJS += os_unix.o 21 | 22 | # Pick correct event loop implementation 23 | LIB_OBJS += eloop.o 24 | 25 | # Pick correct edit implementation 26 | LIB_OBJS += edit.o 27 | 28 | #LIB_OBJS += pcsc_funcs.o 29 | 30 | include ../lib.rules 31 | -------------------------------------------------------------------------------- /src/utils/base64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Base64 encoding/decoding (RFC1341) 3 | * Copyright (c) 2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef BASE64_H 10 | #define BASE64_H 11 | 12 | char * base64_encode(const void *src, size_t len, size_t *out_len); 13 | char * base64_encode_no_lf(const void *src, size_t len, size_t *out_len); 14 | unsigned char * base64_decode(const char *src, size_t len, size_t *out_len); 15 | char * base64_url_encode(const void *src, size_t len, size_t *out_len); 16 | unsigned char * base64_url_decode(const char *src, size_t len, size_t *out_len); 17 | 18 | #endif /* BASE64_H */ 19 | -------------------------------------------------------------------------------- /src/utils/bitfield.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Bitfield 3 | * Copyright (c) 2013, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef BITFIELD_H 10 | #define BITFIELD_H 11 | 12 | struct bitfield; 13 | 14 | struct bitfield * bitfield_alloc(size_t max_bits); 15 | void bitfield_free(struct bitfield *bf); 16 | void bitfield_set(struct bitfield *bf, size_t bit); 17 | void bitfield_clear(struct bitfield *bf, size_t bit); 18 | int bitfield_is_set(struct bitfield *bf, size_t bit); 19 | int bitfield_get_first_zero(struct bitfield *bf); 20 | 21 | #endif /* BITFIELD_H */ 22 | -------------------------------------------------------------------------------- /src/utils/browser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Hotspot 2.0 client - Web browser 3 | * Copyright (c) 2013, Qualcomm Atheros, Inc. 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef BROWSER_H 10 | #define BROWSER_H 11 | 12 | #ifdef CONFIG_NO_BROWSER 13 | static inline int hs20_web_browser(const char *url, int ignore_tls) 14 | { 15 | return -1; 16 | } 17 | #else /* CONFIG_NO_BROWSER */ 18 | int hs20_web_browser(const char *url, int ignore_tls); 19 | #endif /* CONFIG_NO_BROWSER */ 20 | 21 | #endif /* BROWSER_H */ 22 | -------------------------------------------------------------------------------- /src/utils/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Configuration parsing 3 | * Copyright (c) 2003-2019, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef UTILS_CONFIG_H 10 | #define UTILS_CONFIG_H 11 | 12 | /** 13 | * wpa_config_get_line - Read the next configuration file line 14 | * @s: Buffer for the line 15 | * @size: The buffer length 16 | * @stream: File stream to read from 17 | * @line: Pointer to a variable storing the file line number 18 | * @_pos: Buffer for the pointer to the beginning of data on the text line or 19 | * %NULL if not needed (returned value used instead) 20 | * Returns: Pointer to the beginning of data on the text line or %NULL if no 21 | * more text lines are available. 22 | * 23 | * This function reads the next non-empty line from the configuration file and 24 | * removes comments. The returned string is guaranteed to be null-terminated. 25 | */ 26 | char * wpa_config_get_line(char *s, int size, FILE *stream, int *line, 27 | char **_pos); 28 | 29 | #endif /* UTILS_CONFIG_H */ 30 | -------------------------------------------------------------------------------- /src/utils/crc32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 32-bit CRC for FCS calculation 3 | * Copyright (c) 2010, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef CRC32_H 10 | #define CRC32_H 11 | 12 | u32 crc32(const u8 *frame, size_t frame_len); 13 | 14 | #endif /* CRC32_H */ 15 | -------------------------------------------------------------------------------- /src/utils/edit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Command line editing and history 3 | * Copyright (c) 2010, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EDIT_H 10 | #define EDIT_H 11 | 12 | int edit_init(void (*cmd_cb)(void *ctx, char *cmd), 13 | void (*eof_cb)(void *ctx), 14 | char ** (*completion_cb)(void *ctx, const char *cmd, int pos), 15 | void *ctx, const char *history_file, const char *ps); 16 | void edit_deinit(const char *history_file, 17 | int (*filter_cb)(void *ctx, const char *cmd)); 18 | void edit_clear_line(void); 19 | void edit_redraw(void); 20 | 21 | #endif /* EDIT_H */ 22 | -------------------------------------------------------------------------------- /src/utils/ext_password.h: -------------------------------------------------------------------------------- 1 | /* 2 | * External password backend 3 | * Copyright (c) 2012, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EXT_PASSWORD_H 10 | #define EXT_PASSWORD_H 11 | 12 | struct ext_password_data; 13 | 14 | #ifdef CONFIG_EXT_PASSWORD 15 | 16 | struct ext_password_data * ext_password_init(const char *backend, 17 | const char *params); 18 | void ext_password_deinit(struct ext_password_data *data); 19 | 20 | struct wpabuf * ext_password_get(struct ext_password_data *data, 21 | const char *name); 22 | void ext_password_free(struct wpabuf *pw); 23 | 24 | #else /* CONFIG_EXT_PASSWORD */ 25 | 26 | #define ext_password_init(b, p) ((void *) 1) 27 | #define ext_password_deinit(d) do { } while (0) 28 | #define ext_password_get(d, n) (NULL) 29 | #define ext_password_free(p) do { } while (0) 30 | 31 | #endif /* CONFIG_EXT_PASSWORD */ 32 | 33 | #endif /* EXT_PASSWORD_H */ 34 | -------------------------------------------------------------------------------- /src/utils/ext_password_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * External password backend - internal definitions 3 | * Copyright (c) 2012, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef EXT_PASSWORD_I_H 10 | #define EXT_PASSWORD_I_H 11 | 12 | #include "ext_password.h" 13 | 14 | struct ext_password_backend { 15 | const char *name; 16 | void * (*init)(const char *params); 17 | void (*deinit)(void *ctx); 18 | struct wpabuf * (*get)(void *ctx, const char *name); 19 | }; 20 | 21 | struct wpabuf * ext_password_alloc(size_t len); 22 | 23 | /* Available ext_password backends */ 24 | 25 | #ifdef CONFIG_EXT_PASSWORD_TEST 26 | extern const struct ext_password_backend ext_password_test; 27 | #endif /* CONFIG_EXT_PASSWORD_TEST */ 28 | 29 | #ifdef CONFIG_EXT_PASSWORD_FILE 30 | extern const struct ext_password_backend ext_password_file; 31 | #endif /* CONFIG_EXT_PASSWORD_FILE */ 32 | 33 | #endif /* EXT_PASSWORD_I_H */ 34 | -------------------------------------------------------------------------------- /src/utils/ip_addr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IP address processing 3 | * Copyright (c) 2003-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef IP_ADDR_H 10 | #define IP_ADDR_H 11 | 12 | struct hostapd_ip_addr { 13 | int af; /* AF_INET / AF_INET6 */ 14 | union { 15 | struct in_addr v4; 16 | #ifdef CONFIG_IPV6 17 | struct in6_addr v6; 18 | #endif /* CONFIG_IPV6 */ 19 | u8 max_len[16]; 20 | } u; 21 | }; 22 | 23 | const char * hostapd_ip_txt(const struct hostapd_ip_addr *addr, char *buf, 24 | size_t buflen); 25 | int hostapd_parse_ip_addr(const char *txt, struct hostapd_ip_addr *addr); 26 | 27 | #endif /* IP_ADDR_H */ 28 | -------------------------------------------------------------------------------- /src/utils/module_tests.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Module tests 3 | * Copyright (c) 2014-2015, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef MODULE_TESTS_H 10 | #define MODULE_TESTS_H 11 | 12 | int wpas_module_tests(void); 13 | int hapd_module_tests(void); 14 | 15 | int utils_module_tests(void); 16 | int wps_module_tests(void); 17 | int common_module_tests(void); 18 | int crypto_module_tests(void); 19 | 20 | #endif /* MODULE_TESTS_H */ 21 | -------------------------------------------------------------------------------- /src/utils/platform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Platform definitions for Radiotap parser 3 | * Copyright (c) 2021, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef PLATFORM_H 10 | #define PLATFORM_H 11 | 12 | #include "includes.h" 13 | #include "common.h" 14 | 15 | #define get_unaligned_le16(p) WPA_GET_LE16((void *) (p)) 16 | #define get_unaligned_le32(p) WPA_GET_LE32((void *) (p)) 17 | 18 | #endif /* PLATFORM_H */ 19 | -------------------------------------------------------------------------------- /src/utils/uuid.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Universally Unique IDentifier (UUID) 3 | * Copyright (c) 2008, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef UUID_H 10 | #define UUID_H 11 | 12 | #define UUID_LEN 16 13 | 14 | int uuid_str2bin(const char *str, u8 *bin); 15 | int uuid_bin2str(const u8 *bin, char *str, size_t max_len); 16 | int is_nil_uuid(const u8 *uuid); 17 | int uuid_random(u8 *uuid); 18 | 19 | #endif /* UUID_H */ 20 | -------------------------------------------------------------------------------- /src/wps/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -DCONFIG_P2P 2 | CFLAGS += -DCONFIG_WPS_OOB 3 | CFLAGS += -DCONFIG_WPS_NFC 4 | 5 | LIB_OBJS= \ 6 | http_client.o \ 7 | httpread.o \ 8 | http_server.o \ 9 | ndef.o \ 10 | upnp_xml.o \ 11 | wps_attr_build.o \ 12 | wps_attr_parse.o \ 13 | wps_attr_process.o \ 14 | wps.o \ 15 | wps_common.o \ 16 | wps_dev_attr.o \ 17 | wps_enrollee.o \ 18 | wps_er.o \ 19 | wps_er_ssdp.o \ 20 | wps_module_tests.o \ 21 | wps_registrar.o \ 22 | wps_upnp_ap.o \ 23 | wps_upnp.o \ 24 | wps_upnp_event.o \ 25 | wps_upnp_ssdp.o \ 26 | wps_upnp_web.o 27 | 28 | include ../lib.rules 29 | -------------------------------------------------------------------------------- /src/wps/http.h: -------------------------------------------------------------------------------- 1 | /* 2 | * HTTP for WPS 3 | * Copyright (c) 2000-2003 Intel Corporation 4 | * Copyright (c) 2006-2007 Sony Corporation 5 | * Copyright (c) 2008-2009 Atheros Communications 6 | * Copyright (c) 2009, Jouni Malinen 7 | * 8 | * See wps_upnp.c for more details on licensing and code history. 9 | */ 10 | 11 | #ifndef HTTP_H 12 | #define HTTP_H 13 | 14 | enum http_reply_code { 15 | HTTP_OK = 200, 16 | HTTP_BAD_REQUEST = 400, 17 | UPNP_INVALID_ACTION = 401, 18 | UPNP_INVALID_ARGS = 402, 19 | HTTP_NOT_FOUND = 404, 20 | HTTP_PRECONDITION_FAILED = 412, 21 | HTTP_INTERNAL_SERVER_ERROR = 500, 22 | HTTP_UNIMPLEMENTED = 501, 23 | UPNP_ACTION_FAILED = 501, 24 | UPNP_ARG_VALUE_INVALID = 600, 25 | UPNP_ARG_VALUE_OUT_OF_RANGE = 601, 26 | UPNP_OUT_OF_MEMORY = 603 27 | }; 28 | 29 | #endif /* HTTP_H */ 30 | -------------------------------------------------------------------------------- /src/wps/upnp_xml.h: -------------------------------------------------------------------------------- 1 | /* 2 | * UPnP XML helper routines 3 | * Copyright (c) 2000-2003 Intel Corporation 4 | * Copyright (c) 2006-2007 Sony Corporation 5 | * Copyright (c) 2008-2009 Atheros Communications 6 | * Copyright (c) 2009, Jouni Malinen 7 | * 8 | * See wps_upnp.c for more details on licensing and code history. 9 | */ 10 | 11 | #ifndef UPNP_XML_H 12 | #define UPNP_XML_H 13 | 14 | #include "http.h" 15 | 16 | void xml_data_encode(struct wpabuf *buf, const char *data, int len); 17 | void xml_add_tagged_data(struct wpabuf *buf, const char *tag, 18 | const char *data); 19 | int xml_next_tag(const char *in, const char **out, 20 | const char **out_tagname, const char **end); 21 | char * xml_get_first_item(const char *doc, const char *item); 22 | struct wpabuf * xml_get_base64_item(const char *data, const char *name, 23 | enum http_reply_code *ret); 24 | 25 | #endif /* UPNP_XML_H */ 26 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | test-* 2 | !test-*.[ch] 3 | !test-*.sh 4 | -------------------------------------------------------------------------------- /tests/build/build-hostapd-empty.config: -------------------------------------------------------------------------------- 1 | CFLAGS += -Werror 2 | -------------------------------------------------------------------------------- /tests/build/build-hostapd-minimal.config: -------------------------------------------------------------------------------- 1 | CONFIG_NO_STDOUT_DEBUG=y 2 | 3 | CONFIG_NO_RADIUS=y 4 | #CONFIG_NO_ACCOUNTING=y 5 | 6 | CONFIG_NO_VLAN=y 7 | CONFIG_NO_CTRL_IFACE=y 8 | 9 | CFLAGS += -Werror 10 | 11 | CFLAGS += -DCONFIG_NO_HOSTAPD_LOGGER 12 | 13 | CONFIG_NO_AES_EXTRAS=y 14 | 15 | CFLAGS += -Os 16 | -------------------------------------------------------------------------------- /tests/build/build-hostapd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR=$1 4 | CONF=$2 5 | if [ -z "$DIR" -o -z "$CONF" ]; then 6 | echo "usage: $0 " 7 | exit 1 8 | fi 9 | if [ ! -d "$DIR" ]; then 10 | echo "DIR does not exist: $DIR" 11 | exit 1 12 | fi 13 | if [ ! -r "$CONF" ]; then 14 | echo "CONF does not exist: $CONF" 15 | exit 1 16 | fi 17 | 18 | NAME=`echo $CONF | sed s/^build-hostapd-// | sed s/\.config$//` 19 | echo -n "hostapd build: $NAME - " 20 | 21 | pushd $DIR > /dev/null 22 | rm -rf hostap-build 23 | tar xf hostap-build.tar 24 | popd > /dev/null 25 | cp $CONF $DIR/hostap-build/hostapd/.config 26 | 27 | pushd $DIR/hostap-build/hostapd > /dev/null 28 | if make -j8 > $DIR/hostapd-$NAME.log 2>&1; then 29 | mv $DIR/hostapd-$NAME.log{,-OK} 30 | echo OK 31 | else 32 | mv $DIR/hostapd-$NAME.log{,-FAIL} 33 | echo FAIL 34 | fi 35 | rm -rf $DIR/hostap-build 36 | popd > /dev/null 37 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-basic.config: -------------------------------------------------------------------------------- 1 | CFLAGS += -Werror 2 | CONFIG_WPS=y 3 | CONFIG_WPS2=y 4 | CONFIG_EAP_TLS=y 5 | CONFIG_EAP_MSCHAPV2=y 6 | CONFIG_EAP_PSK=y 7 | CONFIG_EAP_FAST=y 8 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-dbus_without_ap.config: -------------------------------------------------------------------------------- 1 | CFLAGS += -Werror 2 | CONFIG_CTRL_IFACE_DBUS_NEW=y 3 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-dpp-ap.config: -------------------------------------------------------------------------------- 1 | CFLAGS += -Werror 2 | CONFIG_DPP=y 3 | CONFIG_DPP2=y 4 | CONFIG_AP=y 5 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-dpp.config: -------------------------------------------------------------------------------- 1 | CFLAGS += -Werror 2 | CONFIG_DPP=y 3 | CONFIG_DPP2=y 4 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-empty.config: -------------------------------------------------------------------------------- 1 | CFLAGS += -Werror 2 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-gnutls.config: -------------------------------------------------------------------------------- 1 | CONFIG_TLS=gnutls 2 | 3 | CONFIG_WPS=y 4 | CONFIG_EAP_TLS=y 5 | CONFIG_EAP_MSCHAPV2=y 6 | 7 | CONFIG_EAP_PSK=y 8 | CONFIG_EAP_GPSK=y 9 | CONFIG_EAP_AKA=y 10 | CONFIG_EAP_SIM=y 11 | CONFIG_EAP_SAKE=y 12 | CONFIG_EAP_PAX=y 13 | CONFIG_EAP_FAST=y 14 | CONFIG_EAP_IKEV2=y 15 | 16 | CFLAGS += -Werror 17 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-libressl-2.8.config: -------------------------------------------------------------------------------- 1 | CONFIG_TLS=openssl 2 | LIBRESSLDIR=/usr/local/libressl/2.8.3 3 | CFLAGS += -I$(LIBRESSLDIR)/include 4 | LIBS += -L$(LIBRESSLDIR)/lib 5 | LIBS_p += -L$(LIBRESSLDIR)/lib 6 | LDFLAGS += -Wl,-rpath=$(LIBRESSLDIR)/lib 7 | 8 | CONFIG_WPS=y 9 | CONFIG_EAP_TLS=y 10 | CONFIG_EAP_MSCHAPV2=y 11 | 12 | CONFIG_EAP_PSK=y 13 | CONFIG_EAP_GPSK=y 14 | CONFIG_EAP_AKA=y 15 | CONFIG_EAP_SIM=y 16 | CONFIG_EAP_SAKE=y 17 | CONFIG_EAP_PAX=y 18 | CONFIG_EAP_FAST=y 19 | CONFIG_EAP_IKEV2=y 20 | 21 | CONFIG_SAE=y 22 | CONFIG_FILS=y 23 | CONFIG_FILS_SK_PFS=y 24 | CONFIG_OWE=y 25 | CONFIG_DPP=y 26 | 27 | CFLAGS += -Werror 28 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-libressl-2.9.config: -------------------------------------------------------------------------------- 1 | CONFIG_TLS=openssl 2 | LIBRESSLDIR=/usr/local/libressl/2.9.0 3 | CFLAGS += -I$(LIBRESSLDIR)/include 4 | LIBS += -L$(LIBRESSLDIR)/lib 5 | LIBS_p += -L$(LIBRESSLDIR)/lib 6 | LDFLAGS += -Wl,-rpath=$(LIBRESSLDIR)/lib 7 | 8 | CONFIG_WPS=y 9 | CONFIG_EAP_TLS=y 10 | CONFIG_EAP_MSCHAPV2=y 11 | 12 | CONFIG_EAP_PSK=y 13 | CONFIG_EAP_GPSK=y 14 | CONFIG_EAP_AKA=y 15 | CONFIG_EAP_SIM=y 16 | CONFIG_EAP_SAKE=y 17 | CONFIG_EAP_PAX=y 18 | CONFIG_EAP_FAST=y 19 | CONFIG_EAP_IKEV2=y 20 | 21 | CONFIG_SAE=y 22 | CONFIG_FILS=y 23 | CONFIG_FILS_SK_PFS=y 24 | CONFIG_OWE=y 25 | CONFIG_DPP=y 26 | 27 | CFLAGS += -Werror 28 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-libressl-3.4.config: -------------------------------------------------------------------------------- 1 | CONFIG_TLS=openssl 2 | LIBRESSLDIR=/usr/local/libressl/3.4.3 3 | CFLAGS += -I$(LIBRESSLDIR)/include 4 | LIBS += -L$(LIBRESSLDIR)/lib 5 | LIBS_p += -L$(LIBRESSLDIR)/lib 6 | LDFLAGS += -Wl,-rpath=$(LIBRESSLDIR)/lib 7 | 8 | CONFIG_WPS=y 9 | CONFIG_EAP_TLS=y 10 | CONFIG_EAP_MSCHAPV2=y 11 | 12 | CONFIG_EAP_PSK=y 13 | CONFIG_EAP_GPSK=y 14 | CONFIG_EAP_AKA=y 15 | CONFIG_EAP_SIM=y 16 | CONFIG_EAP_SAKE=y 17 | CONFIG_EAP_PAX=y 18 | CONFIG_EAP_FAST=y 19 | CONFIG_EAP_IKEV2=y 20 | 21 | CONFIG_SAE=y 22 | CONFIG_FILS=y 23 | CONFIG_FILS_SK_PFS=y 24 | CONFIG_OWE=y 25 | CONFIG_DPP=y 26 | 27 | CFLAGS += -Werror 28 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-linux.config: -------------------------------------------------------------------------------- 1 | CONFIG_TLS=linux 2 | 3 | CONFIG_WPS=y 4 | CONFIG_EAP_TLS=y 5 | CONFIG_EAP_MSCHAPV2=y 6 | 7 | CONFIG_EAP_PSK=y 8 | CONFIG_EAP_GPSK=y 9 | CONFIG_EAP_AKA=y 10 | CONFIG_EAP_SIM=y 11 | CONFIG_EAP_SAKE=y 12 | CONFIG_EAP_PAX=y 13 | CONFIG_EAP_FAST=y 14 | CONFIG_EAP_IKEV2=y 15 | 16 | CFLAGS += -Werror 17 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-openssl-1.0.2.config: -------------------------------------------------------------------------------- 1 | CONFIG_TLS=openssl 2 | OPENSSLDIR=/usr/local/openssl/1.0.2q 3 | CFLAGS += -I$(OPENSSLDIR)/include 4 | LIBS += -L$(OPENSSLDIR)/lib 5 | LDFLAGS += -Wl,-rpath=$(OPENSSLDIR)/lib 6 | CONFIG_TLS_ADD_DL=y 7 | 8 | CONFIG_WPS=y 9 | CONFIG_EAP_TLS=y 10 | CONFIG_EAP_MSCHAPV2=y 11 | 12 | CONFIG_EAP_PSK=y 13 | CONFIG_EAP_GPSK=y 14 | CONFIG_EAP_AKA=y 15 | CONFIG_EAP_SIM=y 16 | CONFIG_EAP_SAKE=y 17 | CONFIG_EAP_PAX=y 18 | CONFIG_EAP_FAST=y 19 | CONFIG_EAP_IKEV2=y 20 | 21 | CONFIG_SAE=y 22 | CONFIG_FILS=y 23 | CONFIG_FILS_SK_PFS=y 24 | CONFIG_OWE=y 25 | CONFIG_DPP=y 26 | CONFIG_SUITEB=y 27 | CONFIG_SUITEB192=y 28 | 29 | CFLAGS += -Werror 30 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-openssl-1.1.0.config: -------------------------------------------------------------------------------- 1 | CONFIG_TLS=openssl 2 | OPENSSLDIR=/usr/local/openssl/1.1.0j 3 | CFLAGS += -I$(OPENSSLDIR)/include 4 | LIBS += -L$(OPENSSLDIR)/lib 5 | LDFLAGS += -Wl,-rpath=$(OPENSSLDIR)/lib 6 | CONFIG_TLS_ADD_DL=y 7 | 8 | CONFIG_WPS=y 9 | CONFIG_EAP_TLS=y 10 | CONFIG_EAP_MSCHAPV2=y 11 | 12 | CONFIG_EAP_PSK=y 13 | CONFIG_EAP_GPSK=y 14 | CONFIG_EAP_AKA=y 15 | CONFIG_EAP_SIM=y 16 | CONFIG_EAP_SAKE=y 17 | CONFIG_EAP_PAX=y 18 | CONFIG_EAP_FAST=y 19 | CONFIG_EAP_IKEV2=y 20 | 21 | CONFIG_SAE=y 22 | CONFIG_FILS=y 23 | CONFIG_FILS_SK_PFS=y 24 | CONFIG_OWE=y 25 | CONFIG_DPP=y 26 | CONFIG_SUITEB=y 27 | CONFIG_SUITEB192=y 28 | 29 | CFLAGS += -Werror 30 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-openssl-1.1.1.config: -------------------------------------------------------------------------------- 1 | CONFIG_TLS=openssl 2 | OPENSSLDIR=/usr/local/openssl/1.1.1a 3 | CFLAGS += -I$(OPENSSLDIR)/include 4 | LIBS += -L$(OPENSSLDIR)/lib 5 | LDFLAGS += -Wl,-rpath=$(OPENSSLDIR)/lib 6 | CONFIG_TLS_ADD_DL=y 7 | 8 | CONFIG_WPS=y 9 | CONFIG_EAP_TLS=y 10 | CONFIG_EAP_MSCHAPV2=y 11 | 12 | CONFIG_EAP_PSK=y 13 | CONFIG_EAP_GPSK=y 14 | CONFIG_EAP_AKA=y 15 | CONFIG_EAP_SIM=y 16 | CONFIG_EAP_SAKE=y 17 | CONFIG_EAP_PAX=y 18 | CONFIG_EAP_FAST=y 19 | CONFIG_EAP_IKEV2=y 20 | 21 | CONFIG_SAE=y 22 | CONFIG_FILS=y 23 | CONFIG_FILS_SK_PFS=y 24 | CONFIG_OWE=y 25 | CONFIG_DPP=y 26 | CONFIG_SUITEB=y 27 | CONFIG_SUITEB192=y 28 | 29 | CFLAGS += -Werror 30 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-p2p.config: -------------------------------------------------------------------------------- 1 | CONFIG_DRIVER_NL80211=y 2 | CONFIG_CTRL_IFACE=y 3 | CONFIG_WPS=y 4 | CONFIG_P2P=y 5 | CONFIG_WPS2=y 6 | CONFIG_AP=y 7 | CFLAGS += -Werror 8 | CONFIG_LIBNL32=y 9 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant-sim.config: -------------------------------------------------------------------------------- 1 | CONFIG_EAP_AKA=y 2 | CONFIG_EAP_AKA_PRIME=y 3 | CONFIG_EAP_SIM=y 4 | CONFIG_SIM_SIMULATOR=y 5 | CONFIG_USIM_SIMULATOR=y 6 | CONFIG_PCSC=y 7 | CFLAGS += -Werror 8 | -------------------------------------------------------------------------------- /tests/build/build-wpa_supplicant.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR=$1 4 | CONF=$2 5 | if [ -z "$DIR" -o -z "$CONF" ]; then 6 | echo "usage: $0 " 7 | exit 1 8 | fi 9 | if [ ! -d "$DIR" ]; then 10 | echo "DIR does not exist: $DIR" 11 | exit 1 12 | fi 13 | if [ ! -r "$CONF" ]; then 14 | echo "CONF does not exist: $CONF" 15 | exit 1 16 | fi 17 | 18 | NAME=`echo $CONF | sed s/^build-wpa_supplicant-// | sed s/\.config$//` 19 | echo -n "wpa_supplicant build: $NAME - " 20 | 21 | pushd $DIR > /dev/null 22 | rm -rf hostap-build 23 | tar xf hostap-build.tar 24 | popd > /dev/null 25 | cp $CONF $DIR/hostap-build/wpa_supplicant/.config 26 | 27 | pushd $DIR/hostap-build/wpa_supplicant > /dev/null 28 | if make -j8 > $DIR/wpa_supplicant-$NAME.log 2>&1; then 29 | mv $DIR/wpa_supplicant-$NAME.log{,-OK} 30 | echo OK 31 | else 32 | mv $DIR/wpa_supplicant-$NAME.log{,-FAIL} 33 | echo FAIL 34 | fi 35 | rm -rf $DIR/hostap-build 36 | popd > /dev/null 37 | -------------------------------------------------------------------------------- /tests/build/run-build-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR=`mktemp -d` 4 | pushd ../.. > /dev/null 5 | git archive --format=tar --prefix=hostap-build/ HEAD > $DIR/hostap-build.tar 6 | popd > /dev/null 7 | 8 | echo "Build test directory: $DIR" 9 | echo 10 | 11 | for i in build-hostapd-*.config; do 12 | ./build-hostapd.sh $DIR $i 13 | done 14 | 15 | for i in build-wpa_supplicant-*.config; do 16 | ./build-wpa_supplicant.sh $DIR $i 17 | done 18 | 19 | echo 20 | echo "Build test directory: $DIR" 21 | -------------------------------------------------------------------------------- /tests/fuzzing/README: -------------------------------------------------------------------------------- 1 | hostap.git fuzz testing 2 | ----------------------- 3 | 4 | These tools can be used for fuzz testing of various components used 5 | within wpa_supplicant and hostapd. Each directory contains a fuzzing 6 | tool that focuses on one input handler. Each tool can be compiled either 7 | to work with the libFuzzer or as a separate tool that reads the input 8 | from a file specified on the command line, e.g., for American fuzzy lop 9 | (afl-fuzz). Example test corpus is included in */corpus directory. 10 | 11 | Example fuzzing with libFuzzer 12 | 13 | cd @TOOL@ 14 | make clean 15 | make LIBFUZZER=y 16 | ./@TOOL@ corpus 17 | 18 | Example fuzzing with afl-fuzz 19 | 20 | cd @TOOL@ 21 | make clean 22 | CC=afl-gcc make 23 | afl-fuzz -i corpus -o findings -- $PWD/@TOOL@ @@ 24 | -------------------------------------------------------------------------------- /tests/fuzzing/ap-mgmt/.gitignore: -------------------------------------------------------------------------------- 1 | ap-mgmt 2 | -------------------------------------------------------------------------------- /tests/fuzzing/ap-mgmt/corpus/multi-sae-ffc.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/ap-mgmt/corpus/multi-sae-ffc.dat -------------------------------------------------------------------------------- /tests/fuzzing/ap-mgmt/corpus/multi-sae.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/ap-mgmt/corpus/multi-sae.dat -------------------------------------------------------------------------------- /tests/fuzzing/ap-mgmt/corpus/multi.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/ap-mgmt/corpus/multi.dat -------------------------------------------------------------------------------- /tests/fuzzing/asn1/.gitignore: -------------------------------------------------------------------------------- 1 | asn1 2 | -------------------------------------------------------------------------------- /tests/fuzzing/asn1/Makefile: -------------------------------------------------------------------------------- 1 | ALL=asn1 2 | include ../rules.include 3 | 4 | OBJS += $(SRC)/utils/common.o 5 | OBJS += $(SRC)/utils/os_unix.o 6 | OBJS += $(SRC)/utils/wpa_debug.o 7 | OBJS += $(SRC)/utils/wpabuf.o 8 | OBJS += $(SRC)/tls/asn1.o 9 | 10 | OBJS += asn1.o 11 | 12 | _OBJS_VAR := OBJS 13 | include ../../../src/objs.mk 14 | 15 | _OBJS_VAR := LIBS 16 | include ../../../src/objs.mk 17 | 18 | asn1: $(OBJS) $(LIBS) 19 | $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) 20 | 21 | clean: common-clean 22 | $(MAKE) -C $(SRC) clean 23 | rm -f asn1 *~ *.o *.d ../*~ ../*.o ../*.d 24 | -------------------------------------------------------------------------------- /tests/fuzzing/asn1/corpus/ca.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/asn1/corpus/ca.der -------------------------------------------------------------------------------- /tests/fuzzing/asn1/corpus/ocsp-multi-server-cache.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/asn1/corpus/ocsp-multi-server-cache.der -------------------------------------------------------------------------------- /tests/fuzzing/asn1/corpus/ocsp-req.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/asn1/corpus/ocsp-req.der -------------------------------------------------------------------------------- /tests/fuzzing/build-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | error() 4 | { 5 | echo "Build test failed" 6 | exit 1 7 | } 8 | 9 | for i in *; do 10 | if [ -d $i ]; then 11 | cd $i 12 | make clean 13 | make -j8 || error 14 | make clean 15 | cd .. 16 | fi 17 | done 18 | 19 | echo "Build test succeeded" 20 | -------------------------------------------------------------------------------- /tests/fuzzing/dpp-uri/.gitignore: -------------------------------------------------------------------------------- 1 | dpp-uri 2 | -------------------------------------------------------------------------------- /tests/fuzzing/dpp-uri/corpus/1.dat: -------------------------------------------------------------------------------- 1 | DPP:K:MDkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDIgADM2206avxHJaHXgLMkq/24e0rsrfMP9K1Tm8gx+ovP0I=;; -------------------------------------------------------------------------------- /tests/fuzzing/dpp-uri/corpus/2.dat: -------------------------------------------------------------------------------- 1 | DPP:C:81/1,115/36;K:MDkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDIgADM2206avxHJaHXgLMkq/24e0rsrfMP9K1Tm8gx+ovP0I=;; -------------------------------------------------------------------------------- /tests/fuzzing/dpp-uri/corpus/3.dat: -------------------------------------------------------------------------------- 1 | DPP:I:SN=4774LH2b4044;M:010203040506;C:81/1,115/36;K:MDkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDIgADM2206avxHJaHXgLMkq/24e0rsrfMP9K1Tm8gx+ovP0I=;; -------------------------------------------------------------------------------- /tests/fuzzing/eap-aka-peer/.gitignore: -------------------------------------------------------------------------------- 1 | eap-aka-peer 2 | -------------------------------------------------------------------------------- /tests/fuzzing/eap-aka-peer/Makefile: -------------------------------------------------------------------------------- 1 | ALL=eap-aka-peer 2 | include ../rules.include 3 | 4 | CFLAGS += -DIEEE8021X_EAPOL 5 | CFLAGS += -DCONFIG_USIM_SIMULATOR 6 | 7 | OBJS += $(SRC)/eap_peer/eap_aka.o 8 | OBJS += $(SRC)/eap_common/eap_sim_common.o 9 | OBJS += $(SRC)/eap_common/eap_common.o 10 | LIBS += $(SRC)/crypto/libcrypto.a 11 | LIBS += $(SRC)/utils/libutils.a 12 | 13 | OBJS += eap-aka-peer.o 14 | 15 | _OBJS_VAR := OBJS 16 | include ../../../src/objs.mk 17 | 18 | _OBJS_VAR := LIBS 19 | include ../../../src/objs.mk 20 | 21 | eap-aka-peer: $(OBJS) $(LIBS) 22 | $(Q)$(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) 23 | @$(E) " LD " $@ 24 | 25 | clean: common-clean 26 | rm -f eap-aka-peer *~ *.o *.d ../*~ ../*.o ../*.d 27 | -------------------------------------------------------------------------------- /tests/fuzzing/eap-aka-peer/corpus/server.msg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/eap-aka-peer/corpus/server.msg -------------------------------------------------------------------------------- /tests/fuzzing/eap-mschapv2-peer/.gitignore: -------------------------------------------------------------------------------- 1 | eap-mschapv2-peer 2 | -------------------------------------------------------------------------------- /tests/fuzzing/eap-mschapv2-peer/Makefile: -------------------------------------------------------------------------------- 1 | ALL=eap-mschapv2-peer 2 | include ../rules.include 3 | 4 | CFLAGS += -DIEEE8021X_EAPOL 5 | 6 | OBJS += $(SRC)/eap_peer/eap_mschapv2.o 7 | OBJS += $(SRC)/eap_peer/mschapv2.o 8 | OBJS += $(SRC)/eap_common/eap_common.o 9 | LIBS += $(SRC)/crypto/libcrypto.a 10 | LIBS += $(SRC)/utils/libutils.a 11 | 12 | OBJS += eap-mschapv2-peer.o 13 | 14 | _OBJS_VAR := OBJS 15 | include ../../../src/objs.mk 16 | 17 | _OBJS_VAR := LIBS 18 | include ../../../src/objs.mk 19 | 20 | eap-mschapv2-peer: $(OBJS) $(LIBS) 21 | $(Q)$(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) 22 | @$(E) " LD " $@ 23 | 24 | clean: common-clean 25 | rm -f eap-mschapv2-peer *~ *.o *.d ../*~ ../*.o ../*.d 26 | -------------------------------------------------------------------------------- /tests/fuzzing/eap-mschapv2-peer/corpus/server.msg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/eap-mschapv2-peer/corpus/server.msg -------------------------------------------------------------------------------- /tests/fuzzing/eap-sim-peer/.gitignore: -------------------------------------------------------------------------------- 1 | eap-sim-peer 2 | -------------------------------------------------------------------------------- /tests/fuzzing/eap-sim-peer/Makefile: -------------------------------------------------------------------------------- 1 | ALL=eap-sim-peer 2 | include ../rules.include 3 | 4 | CFLAGS += -DIEEE8021X_EAPOL 5 | CFLAGS += -DCONFIG_SIM_SIMULATOR 6 | 7 | OBJS += $(SRC)/eap_peer/eap_sim.o 8 | OBJS += $(SRC)/eap_common/eap_sim_common.o 9 | OBJS += $(SRC)/eap_common/eap_common.o 10 | LIBS += $(SRC)/crypto/libcrypto.a 11 | LIBS += $(SRC)/utils/libutils.a 12 | 13 | OBJS += eap-sim-peer.o 14 | 15 | _OBJS_VAR := OBJS 16 | include ../../../src/objs.mk 17 | 18 | _OBJS_VAR := LIBS 19 | include ../../../src/objs.mk 20 | 21 | eap-sim-peer: $(OBJS) $(LIBS) 22 | $(Q)$(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) 23 | @$(E) " LD " $@ 24 | 25 | clean: common-clean 26 | rm -f eap-sim-peer *~ *.o *.d ../*~ ../*.o ../*.d 27 | -------------------------------------------------------------------------------- /tests/fuzzing/eap-sim-peer/corpus/server.msg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/eap-sim-peer/corpus/server.msg -------------------------------------------------------------------------------- /tests/fuzzing/eapol-key-auth/.gitignore: -------------------------------------------------------------------------------- 1 | eapol-key-auth 2 | -------------------------------------------------------------------------------- /tests/fuzzing/eapol-key-auth/Makefile: -------------------------------------------------------------------------------- 1 | ALL=eapol-key-auth 2 | include ../rules.include 3 | 4 | CFLAGS += -DCONFIG_IEEE80211R_AP 5 | CFLAGS += -DCONFIG_IEEE80211R 6 | CFLAGS += -DCONFIG_TDLS 7 | 8 | LIBS += $(SRC)/common/libcommon.a 9 | LIBS += $(SRC)/crypto/libcrypto.a 10 | LIBS += $(SRC)/tls/libtls.a 11 | LIBS += $(SRC)/eap_common/libeap_common.a 12 | LIBS += $(SRC)/l2_packet/libl2_packet.a 13 | LIBS += $(SRC)/utils/libutils.a 14 | LIBS += $(SRC)/wps/libwps.a 15 | LIBS += $(SRC)/eapol_auth/libeapol_auth.a 16 | LIBS += $(SRC)/eap_server/libeap_server.a 17 | LIBS += $(SRC)/ap/libap.a 18 | LIBS += $(SRC)/radius/libradius.a 19 | 20 | OBJS += $(SRC)/drivers/driver_common.o 21 | 22 | OBJS += eapol-key-auth.o 23 | 24 | _OBJS_VAR := OBJS 25 | include ../../../src/objs.mk 26 | 27 | _OBJS_VAR := LIBS 28 | include ../../../src/objs.mk 29 | 30 | eapol-key-auth: $(OBJS) $(LIBS) 31 | $(LDO) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LIBS) -Wl,--end-group 32 | 33 | clean: common-clean 34 | rm -f eapol-key-auth *~ *.o *.d ../*~ ../*.o ../*.d 35 | -------------------------------------------------------------------------------- /tests/fuzzing/eapol-key-auth/corpus/supp.msg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/eapol-key-auth/corpus/supp.msg -------------------------------------------------------------------------------- /tests/fuzzing/eapol-key-supp/.gitignore: -------------------------------------------------------------------------------- 1 | eapol-key-supp 2 | -------------------------------------------------------------------------------- /tests/fuzzing/eapol-key-supp/Makefile: -------------------------------------------------------------------------------- 1 | ALL=eapol-key-supp 2 | include ../rules.include 3 | 4 | CFLAGS += -DCONFIG_IEEE80211R_AP 5 | CFLAGS += -DCONFIG_IEEE80211R 6 | CFLAGS += -DCONFIG_TDLS 7 | 8 | LIBS += $(SRC)/common/libcommon.a 9 | LIBS += $(SRC)/crypto/libcrypto.a 10 | LIBS += $(SRC)/tls/libtls.a 11 | LIBS += $(SRC)/rsn_supp/librsn_supp.a 12 | LIBS += $(SRC)/eapol_supp/libeapol_supp.a 13 | LIBS += $(SRC)/eap_peer/libeap_peer.a 14 | LIBS += $(SRC)/eap_common/libeap_common.a 15 | LIBS += $(SRC)/l2_packet/libl2_packet.a 16 | LIBS += $(SRC)/utils/libutils.a 17 | 18 | OBJS += eapol-key-supp.o 19 | 20 | _OBJS_VAR := OBJS 21 | include ../../../src/objs.mk 22 | 23 | _OBJS_VAR := LIBS 24 | include ../../../src/objs.mk 25 | 26 | eapol-key-supp: $(OBJS) $(LIBS) 27 | $(LDO) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LIBS) -Wl,--end-group 28 | 29 | clean: common-clean 30 | rm -f eapol-key-supp *~ *.o *.d ../*~ ../*.o ../*.d 31 | -------------------------------------------------------------------------------- /tests/fuzzing/eapol-key-supp/corpus/auth.msg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/eapol-key-supp/corpus/auth.msg -------------------------------------------------------------------------------- /tests/fuzzing/eapol-supp/.gitignore: -------------------------------------------------------------------------------- 1 | eapol-supp 2 | -------------------------------------------------------------------------------- /tests/fuzzing/eapol-supp/Makefile: -------------------------------------------------------------------------------- 1 | ALL=eapol-supp 2 | include ../rules.include 3 | 4 | CFLAGS += -DIEEE8021X_EAPOL 5 | 6 | LIBS += $(SRC)/common/libcommon.a 7 | LIBS += $(SRC)/crypto/libcrypto.a 8 | LIBS += $(SRC)/tls/libtls.a 9 | LIBS += $(SRC)/rsn_supp/librsn_supp.a 10 | LIBS += $(SRC)/eapol_supp/libeapol_supp.a 11 | LIBS += $(SRC)/eap_peer/libeap_peer.a 12 | LIBS += $(SRC)/eap_common/libeap_common.a 13 | LIBS += $(SRC)/l2_packet/libl2_packet.a 14 | LIBS += $(SRC)/utils/libutils.a 15 | 16 | OBJS += eapol-supp.o 17 | 18 | _OBJS_VAR := OBJS 19 | include ../../../src/objs.mk 20 | 21 | _OBJS_VAR := LIBS 22 | include ../../../src/objs.mk 23 | 24 | eapol-supp: $(OBJS) $(LIBS) 25 | $(LDO) $(LDFLAGS) -o $@ $^ -Wl,--start-group $(LIBS) -Wl,--end-group 26 | 27 | clean: common-clean 28 | rm -f eapol-supp *~ *.o *.d ../*~ ../*.o ../*.d 29 | -------------------------------------------------------------------------------- /tests/fuzzing/eapol-supp/corpus/eap-req-identity.dat: -------------------------------------------------------------------------------- 1 | 1 -------------------------------------------------------------------------------- /tests/fuzzing/eapol-supp/corpus/eap-req-sim.dat: -------------------------------------------------------------------------------- 1 | 2 2 |  -------------------------------------------------------------------------------- /tests/fuzzing/eapol-supp/corpus/eapol-key-m1.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/eapol-supp/corpus/eapol-key-m1.dat -------------------------------------------------------------------------------- /tests/fuzzing/fuzzer-common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Common helper functions for fuzzing tools 3 | * Copyright (c) 2019, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef FUZZER_COMMON_H 10 | #define FUZZER_COMMON_H 11 | 12 | void wpa_fuzzer_set_debug_level(void); 13 | 14 | #endif /* FUZZER_COMMON_H */ 15 | -------------------------------------------------------------------------------- /tests/fuzzing/json/.gitignore: -------------------------------------------------------------------------------- 1 | json 2 | -------------------------------------------------------------------------------- /tests/fuzzing/json/Makefile: -------------------------------------------------------------------------------- 1 | ALL=json 2 | include ../rules.include 3 | 4 | OBJS += $(SRC)/utils/base64.o 5 | OBJS += $(SRC)/utils/common.o 6 | OBJS += $(SRC)/utils/json.o 7 | OBJS += $(SRC)/utils/os_unix.o 8 | OBJS += $(SRC)/utils/wpa_debug.o 9 | OBJS += $(SRC)/utils/wpabuf.o 10 | 11 | OBJS += json.o 12 | 13 | _OBJS_VAR := OBJS 14 | include ../../../src/objs.mk 15 | 16 | _OBJS_VAR := LIBS 17 | include ../../../src/objs.mk 18 | 19 | json: $(OBJS) $(LIBS) 20 | $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) 21 | 22 | clean: common-clean 23 | rm -f json *~ *.o *.d ../*~ ../*.o ../*.d 24 | -------------------------------------------------------------------------------- /tests/fuzzing/json/corpus/1.json: -------------------------------------------------------------------------------- 1 | {"a":[[]],"b":1,"c":"q","d":{"e":[{}]}} 2 | -------------------------------------------------------------------------------- /tests/fuzzing/json/corpus/2.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /tests/fuzzing/json/corpus/3.json: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /tests/fuzzing/json/json.c: -------------------------------------------------------------------------------- 1 | /* 2 | * JSON parser - test program 3 | * Copyright (c) 2019, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "utils/includes.h" 10 | #include "utils/common.h" 11 | #include "utils/json.h" 12 | #include "../fuzzer-common.h" 13 | 14 | 15 | int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) 16 | { 17 | struct json_token *root; 18 | char *txt; 19 | size_t buflen = 10000; 20 | 21 | wpa_fuzzer_set_debug_level(); 22 | 23 | root = json_parse((const char *) data, size); 24 | if (!root) { 25 | wpa_printf(MSG_DEBUG, "JSON parsing failed"); 26 | return 0; 27 | } 28 | 29 | txt = os_zalloc(buflen); 30 | if (txt) { 31 | json_print_tree(root, txt, buflen); 32 | wpa_printf(MSG_DEBUG, "%s", txt); 33 | os_free(txt); 34 | } 35 | json_free(root); 36 | 37 | return 0; 38 | } 39 | -------------------------------------------------------------------------------- /tests/fuzzing/p2p/.gitignore: -------------------------------------------------------------------------------- 1 | p2p 2 | -------------------------------------------------------------------------------- /tests/fuzzing/p2p/Makefile: -------------------------------------------------------------------------------- 1 | ALL=p2p 2 | include ../rules.include 3 | 4 | LIBS += $(SRC)/utils/libutils.a 5 | LIBS += $(SRC)/common/libcommon.a 6 | LIBS += $(SRC)/crypto/libcrypto.a 7 | LIBS += $(SRC)/p2p/libp2p.a 8 | LIBS += $(SRC)/tls/libtls.a 9 | LIBS += $(SRC)/wps/libwps.a 10 | 11 | OBJS += p2p.o 12 | 13 | _OBJS_VAR := OBJS 14 | include ../../../src/objs.mk 15 | 16 | _OBJS_VAR := LIBS 17 | include ../../../src/objs.mk 18 | 19 | p2p: $(OBJS) $(LIBS) 20 | $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) 21 | 22 | clean: common-clean 23 | rm -f p2p *~ *.o *.d ../*~ ../*.o ../*.d 24 | -------------------------------------------------------------------------------- /tests/fuzzing/p2p/corpus/go-neg-req.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/p2p/corpus/go-neg-req.dat -------------------------------------------------------------------------------- /tests/fuzzing/p2p/corpus/invitation-req.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/p2p/corpus/invitation-req.dat -------------------------------------------------------------------------------- /tests/fuzzing/p2p/corpus/p2ps-pd-req.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/p2p/corpus/p2ps-pd-req.dat -------------------------------------------------------------------------------- /tests/fuzzing/p2p/corpus/proberesp-go.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/p2p/corpus/proberesp-go.dat -------------------------------------------------------------------------------- /tests/fuzzing/p2p/corpus/proberesp.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/p2p/corpus/proberesp.dat -------------------------------------------------------------------------------- /tests/fuzzing/rules.include: -------------------------------------------------------------------------------- 1 | FUZZ_RULES := $(lastword $(MAKEFILE_LIST)) 2 | include $(dir $(FUZZ_RULES))../../src/build.rules 3 | 4 | FUZZ_CFLAGS = 5 | 6 | ifdef LIBFUZZER 7 | CC ?= clang 8 | #FUZZ_FLAGS ?= -fsanitize=fuzzer,address,signed-integer-overflow,unsigned-integer-overflow 9 | FUZZ_FLAGS ?= -fsanitize=fuzzer,address 10 | ifndef CFLAGS 11 | FUZZ_CFLAGS += $(FUZZ_FLAGS) 12 | endif 13 | endif 14 | 15 | FUZZ_CFLAGS += -DCONFIG_NO_RANDOM_POOL -DTEST_FUZZ 16 | export FUZZ_CFLAGS 17 | CFLAGS ?= -MMD -O2 -Wall -g 18 | CFLAGS += $(FUZZ_CFLAGS) 19 | ifdef LIBFUZZER 20 | CFLAGS += -DTEST_LIBFUZZER 21 | LDFLAGS += $(FUZZ_FLAGS) 22 | endif 23 | 24 | WPAS_SRC=../../../wpa_supplicant 25 | SRC=../../../src 26 | 27 | CFLAGS += -I$(SRC) -I$(SRC)/utils -I$(WPAS_SRC) 28 | OBJS += ../fuzzer-common.o 29 | 30 | # for the lib builds 31 | export TEST_FUZZ=y 32 | -------------------------------------------------------------------------------- /tests/fuzzing/sae/.gitignore: -------------------------------------------------------------------------------- 1 | sae 2 | -------------------------------------------------------------------------------- /tests/fuzzing/sae/Makefile: -------------------------------------------------------------------------------- 1 | ALL=sae 2 | include ../rules.include 3 | 4 | CFLAGS += -DCONFIG_SHA256 5 | CFLAGS += -DCONFIG_ECC 6 | 7 | LIBS += $(SRC)/common/libcommon.a 8 | LIBS += $(SRC)/utils/libutils.a 9 | 10 | OBJS += $(SRC)/crypto/crypto_openssl.o 11 | OBJS += $(SRC)/crypto/dh_groups.o 12 | OBJS += $(SRC)/crypto/sha256-prf.o 13 | OBJS += $(SRC)/crypto/sha256-kdf.o 14 | OBJS += $(SRC)/common/dragonfly.o 15 | 16 | OBJS += sae.o 17 | 18 | _OBJS_VAR := OBJS 19 | include ../../../src/objs.mk 20 | 21 | _OBJS_VAR := LIBS 22 | include ../../../src/objs.mk 23 | 24 | sae: $(OBJS) $(LIBS) 25 | $(LDO) $(LDFLAGS) -o $@ $^ -lcrypto 26 | 27 | clean: common-clean 28 | rm -f sae *~ *.o *.d ../*~ ../*.o ../*.d 29 | -------------------------------------------------------------------------------- /tests/fuzzing/sae/corpus/sae-commit-h2e-rejected-groups.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/sae/corpus/sae-commit-h2e-rejected-groups.dat -------------------------------------------------------------------------------- /tests/fuzzing/sae/corpus/sae-commit-h2e-token.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/sae/corpus/sae-commit-h2e-token.dat -------------------------------------------------------------------------------- /tests/fuzzing/sae/corpus/sae-commit-pw-id.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/sae/corpus/sae-commit-pw-id.dat -------------------------------------------------------------------------------- /tests/fuzzing/sae/corpus/sae-commit-token.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/sae/corpus/sae-commit-token.dat -------------------------------------------------------------------------------- /tests/fuzzing/sae/corpus/sae-commit-valid.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/sae/corpus/sae-commit-valid.dat -------------------------------------------------------------------------------- /tests/fuzzing/sae/sae.c: -------------------------------------------------------------------------------- 1 | /* 2 | * SAE fuzzer 3 | * Copyright (c) 2020, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "utils/includes.h" 10 | 11 | #include "utils/common.h" 12 | #include "common/sae.h" 13 | #include "../fuzzer-common.h" 14 | 15 | 16 | int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) 17 | { 18 | struct sae_data sae; 19 | u16 res; 20 | const u8 *token = NULL; 21 | size_t token_len = 0; 22 | int groups[] = { 19, 0 }; 23 | 24 | wpa_fuzzer_set_debug_level(); 25 | 26 | if (os_program_init()) 27 | return 0; 28 | 29 | os_memset(&sae, 0, sizeof(sae)); 30 | res = sae_parse_commit(&sae, data, size, &token, &token_len, groups, 0); 31 | wpa_printf(MSG_DEBUG, "sae_parse_commit(0): %u", res); 32 | sae_clear_data(&sae); 33 | res = sae_parse_commit(&sae, data, size, &token, &token_len, groups, 1); 34 | wpa_printf(MSG_DEBUG, "sae_parse_commit(1): %u", res); 35 | sae_clear_data(&sae); 36 | os_program_deinit(); 37 | 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /tests/fuzzing/tls-client/.gitignore: -------------------------------------------------------------------------------- 1 | tls-client 2 | -------------------------------------------------------------------------------- /tests/fuzzing/tls-client/Makefile: -------------------------------------------------------------------------------- 1 | ALL=tls-client 2 | include ../rules.include 3 | 4 | LIBS += $(SRC)/common/libcommon.a 5 | LIBS += $(SRC)/crypto/libcrypto.a 6 | LIBS += $(SRC)/tls/libtls.a 7 | LIBS += $(SRC)/rsn_supp/librsn_supp.a 8 | LIBS += $(SRC)/eapol_supp/libeapol_supp.a 9 | LIBS += $(SRC)/eap_peer/libeap_peer.a 10 | LIBS += $(SRC)/eap_common/libeap_common.a 11 | LIBS += $(SRC)/l2_packet/libl2_packet.a 12 | LIBS += $(SRC)/utils/libutils.a 13 | 14 | ELIBS += $(SRC)/crypto/libcrypto.a 15 | ELIBS += $(SRC)/tls/libtls.a 16 | 17 | OBJS += tls-client.o 18 | 19 | _OBJS_VAR := OBJS 20 | include ../../../src/objs.mk 21 | 22 | _OBJS_VAR := LIBS 23 | include ../../../src/objs.mk 24 | 25 | _OBJS_VAR := ELIBS 26 | include ../../../src/objs.mk 27 | 28 | tls-client: $(OBJS) $(LIBS) 29 | $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) 30 | 31 | clean: common-clean 32 | rm -f tls-client *~ *.o *.d ../*~ ../*.o ../*.d 33 | -------------------------------------------------------------------------------- /tests/fuzzing/tls-client/corpus/server.msg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/tls-client/corpus/server.msg -------------------------------------------------------------------------------- /tests/fuzzing/tls-server/.gitignore: -------------------------------------------------------------------------------- 1 | tls-server 2 | -------------------------------------------------------------------------------- /tests/fuzzing/tls-server/Makefile: -------------------------------------------------------------------------------- 1 | ALL=tls-server 2 | include ../rules.include 3 | 4 | LIBS += $(SRC)/common/libcommon.a 5 | LIBS += $(SRC)/crypto/libcrypto.a 6 | LIBS += $(SRC)/tls/libtls.a 7 | LIBS += $(SRC)/rsn_supp/librsn_supp.a 8 | LIBS += $(SRC)/eapol_supp/libeapol_supp.a 9 | LIBS += $(SRC)/eap_peer/libeap_peer.a 10 | LIBS += $(SRC)/eap_common/libeap_common.a 11 | LIBS += $(SRC)/l2_packet/libl2_packet.a 12 | LIBS += $(SRC)/utils/libutils.a 13 | 14 | ELIBS += $(SRC)/crypto/libcrypto.a 15 | ELIBS += $(SRC)/tls/libtls.a 16 | 17 | OBJS += tls-server.o 18 | 19 | _OBJS_VAR := OBJS 20 | include ../../../src/objs.mk 21 | 22 | _OBJS_VAR := LIBS 23 | include ../../../src/objs.mk 24 | 25 | _OBJS_VAR := ELIBS 26 | include ../../../src/objs.mk 27 | 28 | tls-server: $(OBJS) $(LIBS) 29 | $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) 30 | 31 | clean: common-clean 32 | rm -f tls-server *~ *.o *.d ../*~ ../*.o ../*.d 33 | -------------------------------------------------------------------------------- /tests/fuzzing/tls-server/corpus/client.msg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/tls-server/corpus/client.msg -------------------------------------------------------------------------------- /tests/fuzzing/wnm/.gitignore: -------------------------------------------------------------------------------- 1 | wnm 2 | -------------------------------------------------------------------------------- /tests/fuzzing/wnm/corpus/bss-tm-req.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/wnm/corpus/bss-tm-req.dat -------------------------------------------------------------------------------- /tests/fuzzing/wnm/corpus/oss-fuzz-0001.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/wnm/corpus/oss-fuzz-0001.dat -------------------------------------------------------------------------------- /tests/fuzzing/wnm/corpus/oss-fuzz-0002.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/wnm/corpus/oss-fuzz-0002.dat -------------------------------------------------------------------------------- /tests/fuzzing/wnm/corpus/wnm-notif.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/wnm/corpus/wnm-notif.dat -------------------------------------------------------------------------------- /tests/fuzzing/x509/.gitignore: -------------------------------------------------------------------------------- 1 | x509 2 | -------------------------------------------------------------------------------- /tests/fuzzing/x509/Makefile: -------------------------------------------------------------------------------- 1 | ALL=x509 2 | include ../rules.include 3 | 4 | LIBS += $(SRC)/common/libcommon.a 5 | LIBS += $(SRC)/crypto/libcrypto.a 6 | LIBS += $(SRC)/tls/libtls.a 7 | LIBS += $(SRC)/utils/libutils.a 8 | 9 | ELIBS += $(SRC)/crypto/libcrypto.a 10 | ELIBS += $(SRC)/tls/libtls.a 11 | 12 | OBJS += x509.o 13 | 14 | _OBJS_VAR := OBJS 15 | include ../../../src/objs.mk 16 | 17 | _OBJS_VAR := LIBS 18 | include ../../../src/objs.mk 19 | 20 | _OBJS_VAR := ELIBS 21 | include ../../../src/objs.mk 22 | 23 | x509: $(OBJS) $(LIBS) 24 | $(LDO) $(LDFLAGS) -o $@ $^ $(LIBS) $(ELIBS) 25 | 26 | clean: common-clean 27 | rm -f x509 *~ *.o *.d ../*~ ../*.o ../*.d 28 | -------------------------------------------------------------------------------- /tests/fuzzing/x509/corpus/ca.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/x509/corpus/ca.der -------------------------------------------------------------------------------- /tests/fuzzing/x509/corpus/oss-fuzz-15408: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/fuzzing/x509/corpus/oss-fuzz-15408 -------------------------------------------------------------------------------- /tests/fuzzing/x509/x509.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Testing tool for X.509v3 routines 3 | * Copyright (c) 2006-2019, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common.h" 12 | #include "tls/x509v3.h" 13 | #include "../fuzzer-common.h" 14 | 15 | 16 | int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) 17 | { 18 | struct x509_certificate *cert; 19 | 20 | wpa_fuzzer_set_debug_level(); 21 | 22 | cert = x509_certificate_parse(data, size); 23 | x509_certificate_free(cert); 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /tests/hwsim/.gitignore: -------------------------------------------------------------------------------- 1 | sigma_dut 2 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/as.conf: -------------------------------------------------------------------------------- 1 | driver=none 2 | radius_server_clients=auth_serv/radius_clients.conf 3 | radius_server_acct_port=1813 4 | eap_server=1 5 | eap_user_file=auth_serv/eap_user.conf 6 | 7 | interface=as 8 | ctrl_interface=/var/run/hostapd 9 | ctrl_interface_group=admin 10 | 11 | ca_cert=auth_serv/ca.pem 12 | server_cert=auth_serv/server.pem 13 | private_key=auth_serv/server.key 14 | ocsp_stapling_response=LOGDIR/ocsp-server-cache.der 15 | ocsp_stapling_response_multi=auth_serv/ocsp-multi-server-cache.der 16 | server_id=server.w1.fi 17 | eap_sim_db=unix:/tmp/hlr_auc_gw.sock 18 | dh_file=auth_serv/dh.conf 19 | pac_opaque_encr_key=000102030405060708090a0b0c0d0e0f 20 | eap_fast_a_id=101112131415161718191a1b1c1d1e1f 21 | eap_fast_a_id_info=test server 22 | eap_sim_aka_result_ind=1 23 | imsi_privacy_key=auth_serv/imsi-privacy-key.pem 24 | tls_flags=[ENABLE-TLSv1.3] 25 | 26 | dump_msk_file=LOGDIR/as-msk.lst 27 | 28 | hs20_t_c_server_url=https://example.com/t_and_c?addr=@1@&ap=123 29 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/as2.conf: -------------------------------------------------------------------------------- 1 | driver=none 2 | radius_server_clients=auth_serv/radius_clients.conf 3 | radius_server_auth_port=1814 4 | eap_server=1 5 | eap_user_file=auth_serv/eap_user.conf 6 | 7 | interface=as2 8 | ctrl_interface=/var/run/hostapd 9 | ctrl_interface_group=admin 10 | 11 | ca_cert=auth_serv/ca.pem 12 | server_cert=auth_serv/server.pem 13 | private_key=auth_serv/server.key 14 | ocsp_stapling_response=LOGDIR/ocsp-server-cache.der 15 | ocsp_stapling_response_multi=auth_serv/ocsp-multi-server-cache.der 16 | server_id=server2.w1.fi 17 | eap_sim_db=unix:/tmp/hlr_auc_gw.sock db=LOGDIR/hostapd.db 18 | dh_file=auth_serv/dh.conf 19 | pac_opaque_encr_key=000102030405060708090a0b0c0d0e0f 20 | eap_fast_a_id=101112131415161718191a1b1c1d1e1f 21 | eap_fast_a_id_info=test server2 22 | eap_sim_aka_result_ind=1 23 | 24 | dump_msk_file=LOGDIR/as2-msk.lst 25 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ca-incorrect.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/hwsim/auth_serv/ca-incorrect.der -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ca.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/hwsim/auth_serv/ca.der -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/dh.conf: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MIIBCAKCAQEAn5Zfi2JHL512eWsfgD2un5TKWlIvNVIYedyWyzkG7JvccUIdaqx1 3 | xDVXldaAXW2VkDoRGpFSNk43fPfrYcDIZiWHydNjetQ4Cejv7GcjBPMbNm47eIO1 4 | +9OXrBwpYatW8npTRGF83TqQ/wJgjfr3Cl580Qp2Tv9XjGWHjqDmJI8xVmmOjn/w 5 | sT1sSN0MryujDzxh7AtkX2NtJMTB1o1Z8MZPnRbxf1crECUNOhYTuTIkzJU1lROq 6 | HKR72RcMUfJp6GxrYRmx8CQ69UwUwyJoedkkV39HRqvZGc8b8HLFwmlhkGy+qfaN 7 | zNugMb5eoRAqm+6ZQjZJWAU29+OG/Ku2owIBAg== 8 | -----END DH PARAMETERS----- 9 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/dh2.conf: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MIIBCAKCAQEAnMarPft+gvX8Ul5WKDn3rSa67dCNNhIivHnHBTn7I6LFE4pf3NY6 3 | KCUcVgJtOl55+58GxkpFsTZEmcykrbTjtJIyNfXFx6n/JKZTNYT0Vv7xmpSN3v53 4 | 208v8rY91OiqO3T8L1PAsENMwuvMZL65IdLiMmVpAktgLGCafektBkaHj29bYCGS 5 | oGwz65iypzZGKGZmzET168lbh1SIuZkq3JOFEvE0ZJS5XhLrVUw14uZV/7lPRE+E 6 | dtza3kVlJXbkgnkrBsiuBlmWiga7EjPtD2o18WhPThI8zX/FoAyQUem4DkhfSpS8 7 | FrJUrODwQQycS5AaexDmZqHJ/L4GdlHcAwIBAg== 8 | -----END DH PARAMETERS----- 9 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/dh_param_3072.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DH PARAMETERS----- 2 | MIIBiAKCAYEA3HLNJq+KXn0kCgo4QNnZNmkzwAVLPyIoK24CCfXC53Ax2jAY7iCu 3 | recce4hWsRAXjfFLcdGlcHPQ6saSwKE80ebj2eSpiASnAMO46PaGDxpycLl+Ac92 4 | RTaNDFYXveOMSAQboBC6KlNuf4hf7m+ZNxNTEdhKJnx5DmE5UbRKLzndH49OSsNG 5 | 9ip+gHvO6FmRI4bUr5tosVfcVv2nWA0aRknEWFgUw5qKzi0XIejxHf+SKl+XlHGF 6 | /HuFV7zvksy/wVd0aMl40QSRTLvUfK+jwjPyAKFi7pSEa+cJGJNO1AVfiDCQ8xiA 7 | wXM4cqU1cUgTuSZZy3itLIlr3+a0O0PQ/zYCgSZlfRBtbWoOK54RhEJ33xTUVcIH 8 | bMkS8lmqscVIccPVzC9cv+MASbrfE1wvSJFkW1cHy+LScyQLaXeiqovH0HWp60cN 9 | 9UhTcBRV49JTZfTk4wcfc50q+oNNMOXiHXX6Cz7YYkWQhVarawZcOOXkL5LwyqWE 10 | Fd2a8VjMc7ujAgEC 11 | -----END DH PARAMETERS----- 12 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/dsaparam.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN DSA PARAMETERS----- 2 | MIICLQKCAQEA4Gx/0VQqdHPnUdPwtyYRYPMqJqIufW2SkWMEVCMHLo6yZx+2Y1Kn 3 | N8Zi7TlCHshBXPS/ZF3jMpFk5lOf0M/YujayuVl1iii7B79d5NC0eehX3LnlS3WK 4 | npGmuCIlnxPrOvrrwx9gPznruNrLNh57IERidYtolFAPjtNKuCYbCmpS1J6mh3pR 5 | XlNkkTC6L2zkkgDwDZQzJmbQ5gSDY57uneSOgZaPGOYt+Uxsv4v/xxBRTALEcRDk 6 | AyB0OhzNx5gsNw1qfO1Ck1IOG0Z+A8VnS6Kpeh42bCTdF3OfXwK2BgOzQLCpyEfp 7 | MEqgRG7VUQjlsdkUy35apIvYpZbovgmbbQIhAIc7hanE2sJ1kKBMYxQx6mlxc+NI 8 | LxoyLRqAE0iQs08HAoIBAQCFmPw/JGlVVMMdC3RYlTdH2Lu2lGJoDmuuKhrmQOo/ 9 | /jAcShg3n2hVSKzximtZX+KNoJ3TklWG30jPsV1CSOeX0IDeiuEiH/1bGAtHmIxo 10 | BLbF5fS94fAbL9IAXhuXaHozgnVoutbFUxGVCCopPmYnX8nDCHdy6cHQld1/S5Y4 11 | hYWQTTSJETUzqYUWQtdAzUCPFBwDGJA7CpYgGQ3mJRUt/Hk6QnEc8NrAFNvbnxWA 12 | me0/rZmg4lZwtA8GfrOzsZSVXCsL56KZZ8iMElfcN/E4fxWOfBoFkNI3IOc5B+j2 13 | EsZcXUcbK2o57BHiZ1GMcbfnuz5STFY8/vBXpyAbBDqO 14 | -----END DSA PARAMETERS----- 15 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/eap_user_vlan.conf: -------------------------------------------------------------------------------- 1 | "vlan1" PAX 0123456789abcdef0123456789abcdef 2 | radius_accept_attr=64:d:13 3 | radius_accept_attr=65:d:6 4 | radius_accept_attr=81:s:2 5 | 6 | "vlan1tagged" PAX 0123456789abcdef0123456789abcdef 7 | radius_accept_attr=56:x:31000002 8 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ec-ca.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PARAMETERS----- 2 | BggqhkjOPQMBBw== 3 | -----END EC PARAMETERS----- 4 | -----BEGIN EC PRIVATE KEY----- 5 | MHcCAQEEIFOOw/NwKqjhaX2da7e7SYrgsMLmr6wX3c1SuR2AsxaUoAoGCCqGSM49 6 | AwEHoUQDQgAEcLjqwWO1Eg+FfjDonVsEpGN0vPuJV1lGd/mKkQHFYxDzLaJHNM8i 7 | QKH1dAT4M/8reNYF5rzkwC6V33R6T5Hqjg== 8 | -----END EC PRIVATE KEY----- 9 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ec-ca.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICAjCCAaegAwIBAgIJAPdTJDJVY8FeMAoGCCqGSM49BAMCMFIxCzAJBgNVBAYT 3 | AkZJMREwDwYDVQQHDAhIZWxzaW5raTEOMAwGA1UECgwFdzEuZmkxIDAeBgNVBAMM 4 | F1N1aXRlIEIgMTI4LWJpdCBSb290IENBMB4XDTE2MDIwMTA5MjUyM1oXDTI2MDEy 5 | OTA5MjUyM1owUjELMAkGA1UEBhMCRkkxETAPBgNVBAcMCEhlbHNpbmtpMQ4wDAYD 6 | VQQKDAV3MS5maTEgMB4GA1UEAwwXU3VpdGUgQiAxMjgtYml0IFJvb3QgQ0EwWTAT 7 | BgcqhkjOPQIBBggqhkjOPQMBBwNCAARwuOrBY7USD4V+MOidWwSkY3S8+4lXWUZ3 8 | +YqRAcVjEPMtokc0zyJAofV0BPgz/yt41gXmvOTALpXfdHpPkeqOo2YwZDAdBgNV 9 | HQ4EFgQUcyrcCIxm5gVTsimSHN2Km8Amy/gwHwYDVR0jBBgwFoAUcyrcCIxm5gVT 10 | simSHN2Km8Amy/gwEgYDVR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8EBAMCAQYw 11 | CgYIKoZIzj0EAwIDSQAwRgIhAOHO2+N8tgUQKakQcLGR+kB3mKPmjyhu478xmrKg 12 | wQq9AiEAmnN7YQBgVBk/+zOri1rCCP8DJ3gE+BSUA3cyQGUvtAc= 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ec-server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PARAMETERS----- 2 | BggqhkjOPQMBBw== 3 | -----END EC PARAMETERS----- 4 | -----BEGIN EC PRIVATE KEY----- 5 | MHcCAQEEIEoiI2GTM68G6vG2zpbM/a5j7e2yBCCWxaNe+nKPT47+oAoGCCqGSM49 6 | AwEHoUQDQgAEJu1Mahit1ZcoiSaYwew1ugckxpSGVvbrZUVf/IF13kiW+JBMcgrX 7 | oukSJOw2LVtLLJEf24YHRST8Dw7Kpzr+bQ== 8 | -----END EC PRIVATE KEY----- 9 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ec-user.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PARAMETERS----- 2 | BggqhkjOPQMBBw== 3 | -----END EC PARAMETERS----- 4 | -----BEGIN EC PRIVATE KEY----- 5 | MHcCAQEEINKa/lt6n2rVp/6cLl65e8GR0vY0WKDfpBGltnggadz3oAoGCCqGSM49 6 | AwEHoUQDQgAEDbAoh2fby/hkxmF9Hm8fyzBHCpaDzFuAyG+SYmTBqpccxTXXfSNJ 7 | eYQXMoPTm14BXWgiTf7U9/C3FHolI5oBNQ== 8 | -----END EC PRIVATE KEY----- 9 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ec2-ca.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PARAMETERS----- 2 | BgUrgQQAIg== 3 | -----END EC PARAMETERS----- 4 | -----BEGIN EC PRIVATE KEY----- 5 | MIGkAgEBBDA7pLB5W+c/cHKznKIRC3UH3qvF2gdij3svRR+zYaNf427Z/I0H4Xki 6 | HOFgPZ9ded2gBwYFK4EEACKhZANiAARWEuSpvRL6glbrbPMhDEcvHpQCirI4GtFD 7 | FYUEYIDqRObNZkeM4A9ygH3HUUmdm3SLHVxb+2nIVfPY3jyxwfOZGiL6ASomy1Ww 8 | GY0AAaXU61MCiJBny1VTsjR7Dw+VcRc= 9 | -----END EC PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ec2-ca.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICPjCCAcSgAwIBAgIJAIEUIb9N+rpkMAoGCCqGSM49BAMDMFIxCzAJBgNVBAYT 3 | AkZJMREwDwYDVQQHDAhIZWxzaW5raTEOMAwGA1UECgwFdzEuZmkxIDAeBgNVBAMM 4 | F1N1aXRlIEIgMTkyLWJpdCBSb290IENBMB4XDTE2MDIwMTA5MjYyNFoXDTI2MDEy 5 | OTA5MjYyNFowUjELMAkGA1UEBhMCRkkxETAPBgNVBAcMCEhlbHNpbmtpMQ4wDAYD 6 | VQQKDAV3MS5maTEgMB4GA1UEAwwXU3VpdGUgQiAxOTItYml0IFJvb3QgQ0EwdjAQ 7 | BgcqhkjOPQIBBgUrgQQAIgNiAARWEuSpvRL6glbrbPMhDEcvHpQCirI4GtFDFYUE 8 | YIDqRObNZkeM4A9ygH3HUUmdm3SLHVxb+2nIVfPY3jyxwfOZGiL6ASomy1WwGY0A 9 | AaXU61MCiJBny1VTsjR7Dw+VcRejZjBkMB0GA1UdDgQWBBS4l8m+YxKr9qCMtl77 10 | l24QjtxI9TAfBgNVHSMEGDAWgBS4l8m+YxKr9qCMtl77l24QjtxI9TASBgNVHRMB 11 | Af8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNoADBlAjEA 12 | v+QeMLDKAY3+9dbdzPit9WCg7erYxa0LsV6ZTr4wIYwUIkybksD1Bwlq7Sw/lVpO 13 | AjBy4q3wJbj6unHQq9VsCKpHWiTi/WeKRo8X0djScKsN7R92A3vGgdhVEAXP0vTl 14 | Rn0= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ec2-server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PARAMETERS----- 2 | BgUrgQQAIg== 3 | -----END EC PARAMETERS----- 4 | -----BEGIN EC PRIVATE KEY----- 5 | MIGkAgEBBDAgwG8tK5eYT4AX09cjhztI1oSnO7iEVf8n6UdbY41gmuU+ce+HPfpt 6 | mRFxdKSU29CgBwYFK4EEACKhZANiAAS4CCNfatEOzJswkLMlEn+bPMUEYQEYQwad 7 | uiJ3hJHkHxKnjjamvn+OCHxZwX0I2ci19y+cxgCIAKHRI2C/iijvr12ZcOkVEysf 8 | PODhGzHDloYyEfLcPSJ9hTk1ZIvyRSU= 9 | -----END EC PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ec2-user-p256.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PARAMETERS----- 2 | BggqhkjOPQMBBw== 3 | -----END EC PARAMETERS----- 4 | -----BEGIN EC PRIVATE KEY----- 5 | MHcCAQEEIPrr8f6NDa+p9BbWuyoFWfshi7pBwZVSltEoE3JoKMfEoAoGCCqGSM49 6 | AwEHoUQDQgAEt4F55Q020CgCdvgNzw3I+K/eZiDJIODExC0Qti5YJWD/Ah5KG3lh 7 | qmRWRLRLn+giBMgUEJeWDjWcHdzWBYhwEQ== 8 | -----END EC PRIVATE KEY----- 9 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ec2-user.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PARAMETERS----- 2 | BgUrgQQAIg== 3 | -----END EC PARAMETERS----- 4 | -----BEGIN EC PRIVATE KEY----- 5 | MIGkAgEBBDCkY69v8ff6oUI3wxJYeJdT500cYU9SE7LOLByjFyW5kKh0wfNI+PTj 6 | QCboPDTNgy6gBwYFK4EEACKhZANiAATuB6iYrTnzUXstmwJhnMBpU3SB6Hwa92ne 7 | S3VaDG2HGjdfBCV5JUHXt4o4JTtknjum/cKR/99xQ6pvBemWQjEcyeAyK18zIQrP 8 | Kce5MCGEcJ8c5GwKVwVYlBPzr85IcBg= 9 | -----END EC PRIVATE KEY----- 10 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/hlr_auc_gw.gsm: -------------------------------------------------------------------------------- 1 | # Test triplets generated with GSM-Milenage using 2 | # Ki = 90dca4eda45b53cf0f12d7c9c3bc6a89 3 | # OPc = cb9cccc4b9258e6dca4760379fb82581 4 | 5 | # GSM authentication triplet file for EAP-SIM authenticator 6 | # IMSI:Kc:SRES:RAND 7 | # IMSI: ASCII string (numbers) 8 | # Kc: hex, 8 octets 9 | # SRES: hex, 4 octets 10 | # RAND: hex, 16 octets 11 | 12 | 232010000000001:79747302dd684291:fbe55c44:d29b2f51f1fd20304ad0c447b4dcdc37 13 | 232010000000001:2f2eaa1d83e43813:6e2e3ea3:e19a8e96255b88e8a8be104637d165b2 14 | 232010000000001:b7c935bfb51f2c5a:257581f5:8079c338eb4195d0fe2d46b357979054 15 | 232010000000001:bc93df6af0412a69:dae1faa0:a48b8e2a59b8bed468ea3d57ef9ee118 16 | 232010000000001:626db3b0e9e321c3:a3e33208:38e7e65d0c0ef82185d1697410f2b31a 17 | 232010000000001:df3cab53d00c622e:0b785f5d:d8a4a9efe1689d232468f316d2a84270 18 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/hlr_auc_gw.milenage_db: -------------------------------------------------------------------------------- 1 | # Parameters for Milenage (Example algorithms for AKA). 2 | # The example Ki, OPc, and AMF values here are from 3GPP TS 35.208 v6.0.0 3 | # 4.3.20 Test Set 20. SQN is the last used SQN value. 4 | # These values can be used for both UMTS (EAP-AKA) and GSM (EAP-SIM) 5 | # authentication. In case of GSM/EAP-SIM, AMF and SQN values are not used, but 6 | # stub values will need to be included in this file. 7 | 8 | # IMSI Ki OPc AMF SQN 9 | 232010000000000 90dca4eda45b53cf0f12d7c9c3bc6a89 cb9cccc4b9258e6dca4760379fb82581 61df 000000000000 10 | 11 | # Modified version of the previous to allow testing with replaced SIM. 12 | 232010000000009 a0dca4eda45b53cf0f12d7c9c3bc6a89 cb9cccc4b9258e6dca4760379fb82581 61df 000000000000 13 | 14 | # These values are from Test Set 19 which has the AMF separation bit set to 1 15 | # and as such, is suitable for EAP-AKA' test. 16 | 555444333222111 5122250214c33e723a5dd523fc145fc0 981d464c7c52eb6e5036234984ad0bcf c3ab 16f3b3f70fc1 17 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/iCA-server/careq.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICljCCAX4CAQAwUTELMAkGA1UEBhMCRkkxETAPBgNVBAcMCEhlbHNpbmtpMQ4w 3 | DAYDVQQKDAV3MS5maTEfMB0GA1UEAwwWU2VydmVyIEludGVybWVkaWF0ZSBDQTCC 4 | ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKKw3n/mF2lLu43cT4uVM14T 5 | 7qEB9YLebvyD2+ciX7mNK94Qck7agcH38+sO21tfkJK7QWhVT4TZc1sMbUDmxQ9d 6 | XF6AHmSHWplEiz1hIPAVzIeVW6BGD7xcFO6sT8h80sDvYJQitnQFT8qXAQowtFBE 7 | idDCa+V/zmYiGtY4fP9CQspYoDiFyvGxHzMn279cSZY2ehEvYtfrfp+bnA4r381Z 8 | vO7oauN9+ga6NEK1fee+4XuFrxslqUUzBsvMDcp4XFZSrEN+9gzn+4a0rNf0slTu 9 | ZXpcMmszoGgb2OrIdJQIAH+b8NqAD/JFExFjTObSl9OuErB86PBWwHt8gpltO10C 10 | AwEAAaAAMA0GCSqGSIb3DQEBCwUAA4IBAQA+ruQc1HRbWOLQh+vOzw4e8WMPZ3nr 11 | 9qTDKjtpQKQUiNy7ZtCvi3kTtYVQcmyXWFf+Fq7NCHfH6GUgXfH/cCsOW0gdsPmH 12 | YuAfZam1njO3+qZqacCpxaVmn3XExC01oIFLf0CtepXrMDh23MoPtZt7kh7bwomG 13 | vrUtAecjLuZIIVzD2OkOIFZCEi4Dce85+CrDw7Es59xj1WySvHMWgU5prOf5Wp// 14 | 7yS26YYjHcaJ3ePO/mFnB3XH4rrQwczNAHx6W4NE0IPvbE9FRN7fIQGPCN40XsPc 15 | XCR12oNtPBWpHExHsqCk6d6B3omfLUJe8eJiY1hPKiDI2ATdBoX5Ogbs 16 | -----END CERTIFICATE REQUEST----- 17 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/iCA-server/index.txt: -------------------------------------------------------------------------------- 1 | V 300501152010Z 5C9DE4A6D17A49C88375E75768F77216B2AEB782 unknown /C=FI/O=w1.fi/CN=server.w1.fi 2 | R 300501152010Z 200503152010Z 5C9DE4A6D17A49C88375E75768F77216B2AEB783 unknown /C=FI/O=w1.fi/CN=server-revoked.w1.fi 3 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/iCA-server/index.txt.attr: -------------------------------------------------------------------------------- 1 | unique_subject = no 2 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/iCA-server/serial: -------------------------------------------------------------------------------- 1 | 5C9DE4A6D17A49C88375E75768F77216B2AEB784 2 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/iCA-server/server-revoked.req: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIClDCCAXwCAQAwTzELMAkGA1UEBhMCRkkxETAPBgNVBAcMCEhlbHNpbmtpMQ4w 3 | DAYDVQQKDAV3MS5maTEdMBsGA1UEAwwUc2VydmVyLXJldm9rZWQudzEuZmkwggEi 4 | MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6httirVW8O0Hxwe89YRNtZYrR 5 | vlhBpuBd8sXzp8HCbJ6wX/AWLOS6fSa3aUNysdco0gY9bpxnMjg/PGOUjWPpf7N7 6 | ZwvWyQLs2n7hWyHkoeoB7Li9b17SkuUz2qUTpo4EtRl6B5roA+69SixlbOw6SDh+ 7 | DTAw7hrZGr4C0OHylRchCDxJTY8Rx7SM5pNLSvrdrApy2IKK4WyZHncbiBKzcs/c 8 | +lfSY+EtwFpXNtT/NyAgAbQRGSz5m/b6k//KafKE62+vRLgY49hCKZchAeFHofzt 9 | WHSwq/l1XOhJqhZKGTHoxYxgmUif2XiS7DELIGTZVxxuaqbd+FUvzCt2EbWbAgMB 10 | AAGgADANBgkqhkiG9w0BAQsFAAOCAQEAo3V6gURcTGy95qxhogpMRD20D9VwiK5m 11 | O81e8wvu6bFn0881Khzi24M4D54JG7NBiVl8FyW7zfnmzpd7lxceSyOuEF7wSIYD 12 | +GrVQ8wgcfPTy0z9iUH/lEjiesv7BEq9AuvAUXSaBC1dPaoWdmEZ+EJRSehle2fj 13 | Lw1OtkjAN47eXo+gXE+kW1V4oM0mI6n7EJ8lEyz6/CUf3mw3EBLXhIncVRthKbrt 14 | S4ujuaak3AGD+KBkxLjxTOIb0IPPsX+lYUly+PayUSe2LhQI0p34wN7Tb4oSu4qH 15 | nZZFb5RIysq0av7y8SqUoJJyaEiYtXxbbUKme/6xUqY4OMpP+01EOQ== 16 | -----END CERTIFICATE REQUEST----- 17 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/iCA-server/server.req: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICjDCCAXQCAQAwRzELMAkGA1UEBhMCRkkxETAPBgNVBAcMCEhlbHNpbmtpMQ4w 3 | DAYDVQQKDAV3MS5maTEVMBMGA1UEAwwMc2VydmVyLncxLmZpMIIBIjANBgkqhkiG 4 | 9w0BAQEFAAOCAQ8AMIIBCgKCAQEArCHsVeKUbNUbbfp3h39+KvUmTjwo1HBQcFXi 5 | qdWrYhUBArWQ6FWRfLD0n/0RPHNy91Z9TLVWIY8XxGVcKj8N4iKlgO0asKiM4pr3 6 | j3dtxSSfK8A6JpsTdZbSzxlMyu2Qs8ja5yADpgpdrQSdazedaelsY9US2v/CpdT0 7 | BN/OOcIGPT/siz2eHKct8mNTfjqqaAqwk7JpPSPasa7+kPrG6u41lE2a2F1vue2A 8 | axu9RlarvymKySDlMT0RluDFVljh8YRtvA/lm7yfdSsDARpYjogiswp8jbNNHoIx 9 | dX/PKDqqwPXDRXK8SPeaYREsMdQ9W24lyirqiOlY/u4NANU2iwIDAQABoAAwDQYJ 10 | KoZIhvcNAQELBQADggEBACNfUGcccnZoS3TqbWbfYMtWhi0a80xuWb+8v//aO0D2 11 | NeJMFmOKVgChOqHZza8rnIGMCOEbL1DkEJIZh1Z5ovy0fkGbcdCxeJIcem8PRLK0 12 | oFiLgIM9MeVDTSLY6FP7hjifR3x6SnO39DahiycnG45Kek7kVq25oCuyKxJrsoEQ 13 | pwHdPG1VWvgDy4O7u2RA6kedU2gWjgHVUCJYpeJFp953kV1qrMM/ynFYJF049etm 14 | Vyl/wxM69LP/bibElna/iAVFPBCe4Mav/bbI371Ju0AHzcdNxdoMnHgEhHB7c7Ye 15 | QmZKRVi2HHD+PZ1xdtvqJD3EtSKkOuY8JRy6EteGdR4= 16 | -----END CERTIFICATE REQUEST----- 17 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/iCA-user/careq.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIClDCCAXwCAQAwTzELMAkGA1UEBhMCRkkxETAPBgNVBAcMCEhlbHNpbmtpMQ4w 3 | DAYDVQQKDAV3MS5maTEdMBsGA1UEAwwUVXNlciBJbnRlcm1lZGlhdGUgQ0EwggEi 4 | MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC5iHr8GvkAaGPHQP/VOI6IjMmP 5 | Zux0CqbxGDAwNpoqmMWgRgLiPGSGeUNFGYN6gj35xq8BEZEsTwf41+/agGwHiGoe 6 | 5g54yghQT/CKLlRBnwRji3CZrm+V7VzINI5rNmS8RMn7y1DvsVubLNsqp/ng4khX 7 | eM+6DxqvWmNkGDmc1K+N+SfZELRnF6EkmPHvzq0Sb+RHNrbSthwEA3ZDY/u2Pj8a 8 | yMSLaSh8ddy7Nn+taqLBMvNeZIZX8e4gr2S94Hy6aJt17bMcDxLgUhL/GA6PHb/I 9 | iFY1TZ4fdB4Z1wy050buz8ZjNboWfwWEi78WcgXuIm46VIArDjaWjWVfZBLNAgMB 10 | AAGgADANBgkqhkiG9w0BAQsFAAOCAQEAt/AtU5ZkTH2fksE0NkQ24G2s/3FGSPH1 11 | wOtQKHUaUXHWeAddimhKOCo2nStyzJ3SYkrkBaGkCf2YDVmDT2FJrEEU/8fhwWgb 12 | VPdqMHG+tXhzAf6AoqOZ/r/5wGLEvOXuoVlF4Ey+dfYPBpfvJRjOl/xHN7B+b5Pe 13 | 1Q25yWo3ekdeRIWZnJx7b/5xkgSH1blqiSVVlhQ9uOUeBiOIS+CXGBo+kqcGRxm2 14 | awQRONpQb4dJ2+PEAFMTWHs/WWHpftDx878YafRfrcEx9iCWb4L4FKQo7VgcmgSs 15 | cErQMDUfGOmRKTXJ6pJAv6O8KdWaDuTiM7o6yo5VggIcUTj2XGkRLQ== 16 | -----END CERTIFICATE REQUEST----- 17 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/iCA-user/index.txt: -------------------------------------------------------------------------------- 1 | V 300501152011Z 5923F47610CA8942F55C075C62D2678BE42292A9 unknown /C=FI/O=w1.fi/CN=user.w1.fi 2 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/iCA-user/index.txt.attr: -------------------------------------------------------------------------------- 1 | unique_subject = no 2 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/iCA-user/serial: -------------------------------------------------------------------------------- 1 | 5923F47610CA8942F55C075C62D2678BE42292AA 2 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/iCA-user/user.req: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICijCCAXICAQAwRTELMAkGA1UEBhMCRkkxETAPBgNVBAcMCEhlbHNpbmtpMQ4w 3 | DAYDVQQKDAV3MS5maTETMBEGA1UEAwwKdXNlci53MS5maTCCASIwDQYJKoZIhvcN 4 | AQEBBQADggEPADCCAQoCggEBANRfI+wBxj7SWe7fzXKNQc5Ar4a+wplpO5GjfC3k 5 | 9aFyPA65pqWh9aW/X1OYM8LAGCRHTIRLntHySQWFLYdWrkO8oYnXSqlmE8euNUrM 6 | L3O2UH5jurCmvJXx8ZrDqbKYPv8nl2SzVAkH/G7Ez3+R4JfCYxCh2uapfUC5A763 7 | HEaQEF+aCuWMCVbTvqXBQl30TOW+/dlmQ/npODYaZtM7fBFGeRZ5uM+BFApMt757 8 | 8oP0hyoesf94HBVTIX920VUPCL4RDxnrRmGtqTa8u4G/N20MX9FncanaJ24vkOg7 9 | 0GuXwxvnzYFADdYu/iRAZ4Tt6rfzJsUjNfl8tVz53x+foIUCAwEAAaAAMA0GCSqG 10 | SIb3DQEBCwUAA4IBAQBXDSMg3STy5dxee9/+DnPa859cH3b3xawbT7RY4j3n/ZCL 11 | RiB6EqH8L0wSEwTZpF1YqNdjx1weDwxA1eM4esLslcyyCdMTRXVS7QogwuHj+Qo4 12 | 3qqiSFOpJBh7zxdz3Eph/4rr0SdeUefHUyFvKvu7gcS1LwHY0vCGQ3FO6eVLDZl4 13 | eEMdz6MynkBBj1kjYWnn8jaUraNBqOFKg9ll3S5K9RH3yJZhdhcodiun2S2IaL4E 14 | evgt2u2Fr9Eka2wXRBlf1F+raSyVsdFY4a3aMzYQes0whGwWpmkMOo/4Ax8TL+co 15 | SMc3B4yezaS4iypgI9EZThe4/KaidGEqCkyAPOem 16 | -----END CERTIFICATE REQUEST----- 17 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/index-revoked.txt: -------------------------------------------------------------------------------- 1 | V 230627164122Z D8D3E3A6CBE3CCC1 unknown /C=FI/O=w1.fi/CN=Root CA 2 | V 150215075930Z D8D3E3A6CBE3CCC9 unknown /C=FI/O=w1.fi/CN=server3.w1.fi 3 | V 140102000000Z D8D3E3A6CBE3CCCA unknown /C=FI/O=w1.fi/CN=server4.w1.fi 4 | V 150215083008Z D8D3E3A6CBE3CCCB unknown /C=FI/O=w1.fi/CN=server5.w1.fi 5 | V 150228224144Z D8D3E3A6CBE3CCCC unknown /C=FI/O=w1.fi/CN=server6.w1.fi 6 | V 160111185024Z D8D3E3A6CBE3CCCD unknown /C=FI/O=w1.fi/CN=ocsp.w1.fi 7 | R 150929211300Z 160111185024Z D8D3E3A6CBE3CCD1 unknown /C=FI/O=w1.fi/CN=Test User 8 | R 210502195538Z 160111185024Z D8D3E3A6CBE3CD5F unknown /C=FI/O=w1.fi/CN=server.w1.fi 9 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/index-unknown.txt: -------------------------------------------------------------------------------- 1 | V 230627164122Z D8D3E3A6CBE3CCC1 unknown /C=FI/O=w1.fi/CN=Root CA 2 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/index.txt: -------------------------------------------------------------------------------- 1 | V 230627164122Z D8D3E3A6CBE3CCC1 unknown /C=FI/O=w1.fi/CN=Root CA 2 | V 150215075930Z D8D3E3A6CBE3CCC9 unknown /C=FI/O=w1.fi/CN=server3.w1.fi 3 | V 140102000000Z D8D3E3A6CBE3CCCA unknown /C=FI/O=w1.fi/CN=server4.w1.fi 4 | V 150215083008Z D8D3E3A6CBE3CCCB unknown /C=FI/O=w1.fi/CN=server5.w1.fi 5 | V 150228224144Z D8D3E3A6CBE3CCCC unknown /C=FI/O=w1.fi/CN=server6.w1.fi 6 | V 160111185024Z D8D3E3A6CBE3CCCD unknown /C=FI/O=w1.fi/CN=ocsp.w1.fi 7 | V 150929211300Z D8D3E3A6CBE3CCD1 unknown /C=FI/O=w1.fi/CN=Test User 8 | V 230416101938Z D8D3E3A6CBE3CD73 unknown /C=FI/O=w1.fi/CN=server.w1.fi 9 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ocsp-multi-server-cache.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/hwsim/auth_serv/ocsp-multi-server-cache.der -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ocsp-req.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/hwsim/auth_serv/ocsp-req.der -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ocsp-responder.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICiTCCAXECAQAwRDELMAkGA1UEBhMCRkkxEDAOBgNVBAcMB1R1dXN1bGExDjAM 3 | BgNVBAoMBXcxLmZpMRMwEQYDVQQDDApvY3NwLncxLmZpMIIBIjANBgkqhkiG9w0B 4 | AQEFAAOCAQ8AMIIBCgKCAQEApyKFXbs7HAKaAXOqiGNuoUMztf0C/h/IIwSLjFFS 5 | W+DMYmAqqrqIT0E5a/s0wKJ6dy7hVp7vyq5n1fmLX6uuh+GwFCMDrWlL3yuRcHXN 6 | v2VAEtDrL4nwQRUb7UwNOpKWkfjNVDgV62tFn1KFfk4Vq05L6yLCXb7/Nm9CJ9hL 7 | xuG++AjPrP1RMKLogBMABbYFVUIL+h5AhFAJjCU1VCVFOZ9OfArZxEoMFk4+aH8b 8 | rclTCFy4BNTWk2L9r/m0HfSWPpudFG0cbCOuPce0zzGQIGqAmWJ+XOnV1b1ZTaPZ 9 | 3On76Htlh9X5SZ6+DvOpId6U6FT8gM/a44+axkx2GA7+qwIDAQABoAAwDQYJKoZI 10 | hvcNAQELBQADggEBAE/iM0/mhspobneVqSBhCrM2n0KUozbLRBZXfc8hCMW85XPI 11 | kD7bJdTwndj6wGAd2G4IQr4jeR4tGUU6XAYEsyIVfFlHlBQaUjF9EJmnqqwDAlN3 12 | v6em8QEv49EL2HO0Q1MFsly2CUk07WYpy0ll5wTjEXIEQ/2J9jNJfgPDs06IQAQi 13 | 9WkFCfBogTn23ZRxomYqukqbirHxGJ2XFRM/LkssyIkMi0jEWzljXYiuzhuD/KtP 14 | hXXYXcJdL3WdZU9FZw/na4pBrtCTscluwaTDEaW4k60ge/ne51pB32RfsF4aEfsx 15 | /Xrxva+5dZexgMxK078QL2q7o43HprVa1U/wBfg= 16 | -----END CERTIFICATE REQUEST----- 17 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ocsp-server-cache.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/hwsim/auth_serv/ocsp-server-cache.der -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/ocsp-server-cache.der-invalid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/hwsim/auth_serv/ocsp-server-cache.der-invalid -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/radius_clients.conf: -------------------------------------------------------------------------------- 1 | 0.0.0.0/0 radius 2 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/radius_clients_ipv6.conf: -------------------------------------------------------------------------------- 1 | ::1 radius 2 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/radius_clients_none.conf: -------------------------------------------------------------------------------- 1 | 1.2.3.4 foo 2 | # 3 | 4 | 2.3.4.5/32 bar 5 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/rootCA/index.txt: -------------------------------------------------------------------------------- 1 | V 251222193736Z D8D3E3A6CBE3CCF3 unknown /C=FI/O=w1.fi/CN=Server Intermediate CA 2 | V 251222193736Z D8D3E3A6CBE3CCF4 unknown /C=FI/O=w1.fi/CN=User Intermediate CA 3 | V 300503151922Z D8D3E3A6CBE3CCF5 unknown /C=FI/O=w1.fi/CN=Server Intermediate CA 4 | V 300503151922Z D8D3E3A6CBE3CCF6 unknown /C=FI/O=w1.fi/CN=User Intermediate CA 5 | V 300503152010Z D8D3E3A6CBE3CCF7 unknown /C=FI/O=w1.fi/CN=Server Intermediate CA 6 | V 300503152010Z D8D3E3A6CBE3CCF8 unknown /C=FI/O=w1.fi/CN=User Intermediate CA 7 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/rootCA/index.txt.attr: -------------------------------------------------------------------------------- 1 | unique_subject = no 2 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/rootCA/serial: -------------------------------------------------------------------------------- 1 | D8D3E3A6CBE3CCF9 2 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/rsa3072-user-rsa2048.req: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIIClDCCAXwCAQAwTzELMAkGA1UEBhMCRkkxETAPBgNVBAcMCEhlbHNpbmtpMQ4w 3 | DAYDVQQKDAV3MS5maTEdMBsGA1UEAwwUdXNlci1yc2EzMDcyLXJzYTIwNDgwggEi 4 | MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDbZv+LlWaWLkp0AoBD/An6tkF4 5 | Cfjpv2tB/Vu/zGbYB8MN7EiXjSxPWPW1JwfuSHxrmKJ26IuUEXdoNkMfLIif1kDf 6 | 7CcWY640HNXsJsXZrXepcxSGo6QuZ2P96NfdxxhnCtOvv30gmmf9XMB8bszYqz0r 7 | jq4JDLUj2bT5++Jp42kFKF3uNxvHwLqDzuEwYh+p3aue1N2M5KTgH6XclUgCoJ/0 8 | pahxyI8GvkxOQYx/kUeoBm1Gw0m4r8UnRkHiLLZtaGbawAyEvt9hyklH9xlmNgkF 9 | GyebgEPwVUG0Tg8lceW6uNxysLVJqJUCSahnKnjztA6raQXp2TCtsL0m8I0zAgMB 10 | AAGgADANBgkqhkiG9w0BAQwFAAOCAQEAIymC4XT/XzkwrdIS/gE7QOu144FJiy4Y 11 | gA+udw+z4n1e59j9nNTVcaVliSWl4J33XYdUAAiSq78gRUW8xzhrjri1QkNyYg9M 12 | /ZkjkFN0vqFLr/ts8SX6x8VuqHGSzP1DCOKcYGLRXZWvzA8LMz4ZmxVdzEGEAL3Z 13 | UQwfAPXvervh2jKtesi2UeCM3PyJmterxCuPyujybK4WvRVvxMSsCOiIT4LzxKfD 14 | MuRZ/7UbGoVOBXwrlYfrr+UmVLc9HJG86GvOKCgnQh0s/QaM69PPLRajXIh4eJdj 15 | v7YnrfnxEV8wmTUg9QjMOdnlDCmPZcAyGBEubNYSzJAzE8aOQOi0bA== 16 | -----END CERTIFICATE REQUEST----- 17 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/server-eku-client-server.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICjDCCAXQCAQAwRzELMAkGA1UEBhMCRkkxEDAOBgNVBAcMB1R1dXN1bGExDjAM 3 | BgNVBAoMBXcxLmZpMRYwFAYDVQQDDA1zZXJ2ZXI2LncxLmZpMIIBIjANBgkqhkiG 4 | 9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0CP0gBK+SmRNr5mvUu+N9XOaGigrkujUkCU+ 5 | hUefycS5ejUkhC8eURZm06wx6vFjpEzqJvD6Ycef8nRpangJxcmJdNttuse2sfBh 6 | H+86HNXG/JVdmzfWW8s3k1ntUPJqogFcniKvOjHZ7uszSZNORu6de4aG2isd+fOi 7 | AX0NVRw7Z+nJ+7ypUkxKIYVoUC/kBcE/4LOjJdRsLmF8ndXak7sZ/uq/8sj53N5I 8 | VOH+1LWUWj8sK4yxbO86sNIMLBN1YduXa/pr+Z33FKo1cthMC6FcCMWH1OSHHWsK 9 | UB+1Dj+7NovG4L0eGuEc8zekkWVMQ7SezBthaAm9HqthvcGRcQIDAQABoAAwDQYJ 10 | KoZIhvcNAQELBQADggEBABgknYle2ID7r8gu0VCYupOKsdU0CIfxqozbW2REuWnO 11 | W5EYv/oma1ONr3DPr/pLfeCVxtqRLNBC4UAi6Pxsn4A8kxm93voZ2/9b+fvwfrqo 12 | yKgo2X2+fn/k3IeRvKdq8o3frVzdBZmVv1irbrXeel7IRyjvG6nqwoT5jhCI4F8m 13 | iAht0otWVPdyuIXmHsofB6wgkmFw8AqHIuKS2gl8zeByGkfO/bCFrv1G2rEacyjt 14 | /pLaeI2VYZW5i+JvoAXSqAzV6xpc13Tts4MlQhSw8diE/NVsw7uBuJQaiE+vpgvm 15 | 1jmcmIttnkZmvkhvdW3P62OttNVGiyBfq/GVPhOfeKE= 16 | -----END CERTIFICATE REQUEST----- 17 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/server-eku-client.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICjDCCAXQCAQAwRzELMAkGA1UEBhMCRkkxEDAOBgNVBAcMB1R1dXN1bGExDjAM 3 | BgNVBAoMBXcxLmZpMRYwFAYDVQQDDA1zZXJ2ZXI1LncxLmZpMIIBIjANBgkqhkiG 4 | 9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZRggLjIYRiMAp3czMR00Re1O0ecOA87knT7 5 | 6idFRIqaKk0QJY53zhoJyXMZ/txwNl6M+o9MhLv3cuSUT/xHKn2JkqMrWmmcyFoQ 6 | OTJhfQp4GbQ266xM1q91ABROFS9fg+5i9ax7DIG6ogg2e/DvYzFi+4amz9o2g0SN 7 | dSi25BDzMt2KbFvuT/EeUwsTfMe8954ygB5jPpJ1L8UhXvAqrOI05BeyNPfoKhKK 8 | IbgD57bY+DK1/nFFUpjeuT1B9ZCldoPBGMpQXSxSi25Pp1u72OMUJXDe0cedWc8k 9 | Rsf1bm+DZu0bHT5RBJRnZN9RIjzA4SQKN2rcaov9RVuWLQOsYwIDAQABoAAwDQYJ 10 | KoZIhvcNAQELBQADggEBAGDFw8louhTAswtYHa+aFvsSEB209lYFdHxn3wohbK1r 11 | q3IPcuTiQdZR2jEllGVaXZC6eAkYO8iD+NL/iCteUivY6Jqrd5cM0IAzPLuNe89O 12 | SSnPqUep59LObZUAsW/KaOB75xsLbm68fG2NmwOBB+8ZCRvQowcbY6nEAgaFM46V 13 | UxOHr3ZdluhAyVIikmZLmXEbv5OaXZfc3PiifJIDgAmMf9ePjm6QZEQJ5RdBxlWT 14 | IhU0rz9haagA13hXWurUCo8gWZoQqqCinjxLu0dV62kVCgq5Bk8HE4gvswJvCqME 15 | TKEpPJBjmKGTeU1BbFWy6nrirsCVPybj841pMQkSWHY= 16 | -----END CERTIFICATE REQUEST----- 17 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/server-expired.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICjDCCAXQCAQAwRzELMAkGA1UEBhMCRkkxEDAOBgNVBAcMB1R1dXN1bGExDjAM 3 | BgNVBAoMBXcxLmZpMRYwFAYDVQQDDA1zZXJ2ZXI0LncxLmZpMIIBIjANBgkqhkiG 4 | 9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsHfxPmbn/AtR+dijri/2SnU4PtRHe9YkMrTI 5 | 2eDQpRL0iaeJAdlUQ86BSr3tFvN8wWc2i3NNIZHnS350xTsVuMZGfqmikcP1kLPP 6 | +Qzrum/uuat3PQOenXcHv5dq1E222v02VCXjCSaJf6ERwfbcvlxXqOZFVz2YFAZy 7 | rOnIgQY4nM/NCg54Tp57EMJhpUPvNBbfPOCjRHdIzb7kecsxOZ9T3aMOdlpsJF5W 8 | NZuifbOeQvFhnOieHLiaEB4yKSHLMBbgAxH5iPKPBKXmp5xz4ZPYUS27RYOPtpNB 9 | OUGEX0utACWRPRYK6/C4kuBcdWWFF9KA5l5moqTfxwh2M0nPHQIDAQABoAAwDQYJ 10 | KoZIhvcNAQELBQADggEBAIeunczvT7br/9Jk6zARkS7gZpAeRckiMMPFHD1HLiFM 11 | ngU/PL4RD0TRF0cHGn+qJex7Ch97ZMHsGl0ECjXEL84UYnAdWGPddLv72XpeNX+d 12 | f/QTWg9jVrZGspI1he6jN9JghZatKDEPYrXhFv0JbxrA4LoUzV2qGgh2ALpmP0LV 13 | Xqje+tAoZbf8J7mba/Z2yqjJuJMxkOC+2cCUvN07+ndCGbixtzT2wZfPlVkp/af2 14 | HJyduA6qkLJWcrAER6jHaI3Cxq92u/H7D6Z++7v0vN8fV6inyZNadurUGY/VsIUn 15 | jorEWeP7v1UKgLXXqBTdP5YA0Gi3O0dx7iLGalbHV9s= 16 | -----END CERTIFICATE REQUEST----- 17 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/server-extra.pkcs12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/hwsim/auth_serv/server-extra.pkcs12 -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/server-no-dnsname.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICjDCCAXQCAQAwRzELMAkGA1UEBhMCRkkxEDAOBgNVBAcMB1R1dXN1bGExDjAM 3 | BgNVBAoMBXcxLmZpMRYwFAYDVQQDDA1zZXJ2ZXIzLncxLmZpMIIBIjANBgkqhkiG 4 | 9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwuutBG9M6yO4kk513ADQDdmtCSH4Ekotzdt9 5 | Y6EyEo64473flTk6F2VU+CDWcTd9t7RyMXp6Pbp0cvOsnRY4NRt9UDutll2nwHYL 6 | u0wGqND3LT2UpRQmGhHYQhstTm5gnWrPIts2ZeIXNbxpLqsw5c38muRPD9EBw+Yz 7 | cTHNb9qMIZ33G9Htfjl6/WmjiBzm9tM7Gh7TcMOtNSoipN5gkDdd5+DOm31MtctB 8 | G5yWUd9YTbdn2pUlYIr/bGKE2tYkuWXZeln4yL0DvvYX2A6GrppMfVP2sQ6CzQZh 9 | d91GXP1FavLoIspji9Mc9k8Q7OoaCB44PYBso0hH8hYqB1v3iQIDAQABoAAwDQYJ 10 | KoZIhvcNAQELBQADggEBAFOyTkNJyRKkPGdTpgnqiapijSufwkt3uETE+4SgVwSu 11 | ctfu4IKhwgecJl4HiyVj8vwEoB5tJLdK4EG/wSBVdqd5nN2OEm4FClqfqgiuftrU 12 | O+pvl+HSU3X9CrW4Is0Vmb2x5SMRPwvW3lA+fcKMpjUfbUA0E5kii18qir/UsVuH 13 | EHCJ18BRoqUS+x4r+nxjS+ErSkdTtQtrZVOH2z9IEVGtc7tSxd9Dy4+L8TX0UNEP 14 | PEZlvuLAR5py3/zeFjkekQKx2AhJqpPC+/NMmkbm+n81NgcBG02rCL2vLALtm9cf 15 | 6VbDKAi/K0tm3s9HHm6euogDB6q4TioPLxUpIR34W4c= 16 | -----END CERTIFICATE REQUEST----- 17 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/server.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICizCCAXMCAQAwRjELMAkGA1UEBhMCRkkxEDAOBgNVBAcMB1R1dXN1bGExDjAM 3 | BgNVBAoMBXcxLmZpMRUwEwYDVQQDDAxzZXJ2ZXIudzEuZmkwggEiMA0GCSqGSIb3 4 | DQEBAQUAA4IBDwAwggEKAoIBAQD9Dl7NGSxqQYPZLA42zQmwj7LJjMjSAzhuVLxD 5 | 7s74WbHpP23UXuPFcxk9C7wp19BudQA1/PdlsbYPywZJz6lOPcJkSxgkCnC4blTc 6 | kD9sGP22iKs33ItLteH/7btFBaPwqlEr8XkGfy/NXfzmiq8buXvKQ3UBHY4t2RET 7 | hvs8S2CkKUnj0iAgy1wNnNKcMCERvLN032Swt2fuat+vPRgCt9zlVHW1bEDEsIob 8 | xv2rHrnv0YMJDVW6F4hO0L3PczZ8KEv2qkjU6Psl2B2vyWhzrEauy+t5Nletw3AC 9 | FW3wpUNzq3IEsRZgdA5KwY9SKBqVfqvQBPb6Edob0ZmkT57tAgMBAAGgADANBgkq 10 | hkiG9w0BAQsFAAOCAQEAUQqUbXEUfPwdJoYL1jPZFCXDMFLjQgro6uWQ+yK8NEOX 11 | MekF9AmJkBNHfOXfhtpuSutn+4TGLGShS+ocvR9oGJkSULZYOzbsntP6ZEcwaxo5 12 | rvSSmm1cx1GNQQ/dzoefeWlRnaUVcOTljMutCae1X9KTXuLW2DreEwo4aqPsu+EK 13 | iSL/GcdYozU+p+ZE0BP26kDeQYKYD/1XOXvGclCAG11U3M03cazqiLr+auNhAL0T 14 | y4PYJnrNhTZdIXLXsPTKcG2VhbGSC7NTia10XRl2Jr+yFTRvR2S0F1vZczbXc7gj 15 | JBMk6kojPpMvqe2WmaXWEH+tzeBvTELnJDHdDl+w9A== 16 | -----END CERTIFICATE REQUEST----- 17 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/server.pkcs12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/hwsim/auth_serv/server.pkcs12 -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/test-ca/crlnumber: -------------------------------------------------------------------------------- 1 | 08 2 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/test-ca/index.txt.attr: -------------------------------------------------------------------------------- 1 | unique_subject = no 2 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/test-ca/serial: -------------------------------------------------------------------------------- 1 | D8D3E3A6CBE3CD7D 2 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/user.csr: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE REQUEST----- 2 | MIICiDCCAXACAQAwQzELMAkGA1UEBhMCRkkxEDAOBgNVBAcMB1R1dXN1bGExDjAM 3 | BgNVBAoMBXcxLmZpMRIwEAYDVQQDDAlUZXN0IFVzZXIwggEiMA0GCSqGSIb3DQEB 4 | AQUAA4IBDwAwggEKAoIBAQC8JAjZB20ZDpRca9mKhBsDIuIaBkLTC2CNXzEEBvqi 5 | QGoMJClYzYO/Op1/Nw1NJ13VV1cc8751PzpMRG8CL1uLLLBcRykZMQjRKPUenFuc 6 | t+drQDUQPn9mZxahTmiKccwyWOMIh6IqBy1/c/ZD5X/09nSuJ+jSXK6bgtmlKnJ2 7 | hC/jYqpBHt4zt2T4eW/6CbW8sIzNNIItxBBViepsOJL+YdZkhATUCjcyN43DVdH8 8 | q7hVBqkATzHiQvHntC6cRQ3cqfmtsnfB8LHDolomkL0ZL0YdpSE98DVilMjPMz/Y 9 | ol3fzFgACI3tsQTFKz8aFfaSCNTxQs1s2/L/4G5phNiLAgMBAAGgADANBgkqhkiG 10 | 9w0BAQsFAAOCAQEAJB2hPF8r/cPO7+4fPf3oXwEwf0YsXHzVwUnawgtMNyU10rJX 11 | qqQIi2elEJfgYqmUhmXBrBIm06bRXlcR+QoWwX4sHk3rmHQYPy190bNpTaHVN9bZ 12 | kZndOcdaog1a3Lbui+e/brpzo0kGskW9TsDsOkYjzgIzQHGQtfcPfLhnLj4+sRyq 13 | tnV0vvHl3SyPmsVxrazRO4LgMBmwGx6QC4Yf3w25Us3aLzJqsZHDBRsVRdoHyLYd 14 | Jwt2fE2dLzGNkGFUP3BeJMHze1CqRybfoVlBU1IZRYlRQ8yOO/IpO7pa363Xx5Ar 15 | DsD2xcG7WvAjQ08vVgW2ShQRIIeX0Luhd6fqQg== 16 | -----END CERTIFICATE REQUEST----- 17 | -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/user.pkcs12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/hwsim/auth_serv/user.pkcs12 -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/user2.pkcs12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/hwsim/auth_serv/user2.pkcs12 -------------------------------------------------------------------------------- /tests/hwsim/auth_serv/user3.pkcs12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/hwsim/auth_serv/user3.pkcs12 -------------------------------------------------------------------------------- /tests/hwsim/check_kernel.py: -------------------------------------------------------------------------------- 1 | # kernel message checker module 2 | # 3 | # Copyright (c) 2013, Intel Corporation 4 | # 5 | # Author: Johannes Berg 6 | # 7 | # This software may be distributed under the terms of the BSD license. 8 | # See README for more details. 9 | # 10 | """ 11 | Tests for kernel messages to find if there were any issues in them. 12 | """ 13 | 14 | import re 15 | 16 | lockdep_messages = [ 17 | 'possible circular locking dependency', 18 | '.*-safe -> .*unsafe lock order detected', 19 | 'possible recursive locking detected', 20 | 'inconsistent lock state', 21 | 'possible irq lock inversion dependency', 22 | 'suspicious RCU usage', 23 | ] 24 | lockdep = r'(\[\s*)?(INFO|WARNING): (%s)|\*\*\* DEADLOCK \*\*\*' % ('|'.join(lockdep_messages), ) 25 | issue = re.compile('(\[[0-9 .]*\] )?(WARNING:|BUG:|%s|RTNL: assertion failed).*' % lockdep) 26 | 27 | def check_kernel(logfile): 28 | for line in open(logfile, 'r'): 29 | if issue.match(line): 30 | return False 31 | return True 32 | -------------------------------------------------------------------------------- /tests/hwsim/devinfo.xml: -------------------------------------------------------------------------------- 1 | 2 | urn:Example:HS20-station:123456 3 | Manufacturer 4 | HS20-station 5 | 1.2 6 | en 7 | 8 | -------------------------------------------------------------------------------- /tests/hwsim/dictionary.radius: -------------------------------------------------------------------------------- 1 | ATTRIBUTE User-Name 1 string 2 | ATTRIBUTE User-Password 2 string 3 | ATTRIBUTE NAS-IP-Address 4 ipaddr 4 | ATTRIBUTE State 24 octets 5 | ATTRIBUTE Vendor-Specific 26 octets 6 | ATTRIBUTE Session-Timeout 27 integer 7 | ATTRIBUTE Calling-Station-Id 31 string 8 | ATTRIBUTE NAS-Identifier 32 string 9 | ATTRIBUTE Acct-Session-Id 44 string 10 | ATTRIBUTE Acct-Multi-Session-Id 50 string 11 | ATTRIBUTE Event-Timestamp 55 date 12 | ATTRIBUTE Tunnel-Type 64 integer 13 | ATTRIBUTE Tunnel-Medium-Type 65 integer 14 | ATTRIBUTE Tunnel-Password 69 octets 15 | ATTRIBUTE EAP-Message 79 string 16 | ATTRIBUTE Message-Authenticator 80 octets 17 | ATTRIBUTE Tunnel-Private-Group-ID 81 string 18 | ATTRIBUTE Acct-Interim-Interval 85 integer 19 | ATTRIBUTE Chargeable-User-Identity 89 string 20 | ATTRIBUTE Error-Cause 101 integer 21 | -------------------------------------------------------------------------------- /tests/hwsim/hostapd.vlan: -------------------------------------------------------------------------------- 1 | 1 hwsimvlan1 2 | * testvlan# 3 | -------------------------------------------------------------------------------- /tests/hwsim/hostapd.vlan2: -------------------------------------------------------------------------------- 1 | 1 hwsimvlan1 2 | 3 hwsimvlan3 hwsimbr3 3 | * testvlan# 4 | -------------------------------------------------------------------------------- /tests/hwsim/hostapd.wlan3.vlan: -------------------------------------------------------------------------------- 1 | 1 wlan3.1 2 | * wlan3.# 3 | -------------------------------------------------------------------------------- /tests/hwsim/hostapd.wlan4.vlan: -------------------------------------------------------------------------------- 1 | 1 wlan4.1 2 | * wlan4.# 3 | -------------------------------------------------------------------------------- /tests/hwsim/hostapd.wpa_psk: -------------------------------------------------------------------------------- 1 | 00:00:00:00:00:00 secret passphrase 2 | 02:00:00:00:00:00 very secret 3 | 00:11:22:33:44:55 another passphrase 4 | 00:22:33:44:55:66 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef 5 | 00:00:00:00:00:00 another passphrase for all STAs 6 | -------------------------------------------------------------------------------- /tests/hwsim/multi-bss-acs.conf: -------------------------------------------------------------------------------- 1 | driver=nl80211 2 | 3 | hw_mode=g 4 | channel=0 5 | ieee80211n=1 6 | 7 | interface=wlan3 8 | ctrl_interface=/var/run/hostapd 9 | 10 | ssid=bss-1 11 | 12 | bss=wlan3-2 13 | bssid=02:00:00:00:03:01 14 | ctrl_interface=/var/run/hostapd 15 | ssid=bss-2 16 | wpa=2 17 | wpa_key_mgmt=WPA-PSK 18 | rsn_pairwise=CCMP 19 | wpa_passphrase=12345678 20 | 21 | bss=wlan3-3 22 | bssid=02:00:00:00:03:02 23 | ctrl_interface=/var/run/hostapd 24 | ssid=bss-3 25 | wpa=2 26 | wpa_key_mgmt=SAE 27 | rsn_pairwise=CCMP 28 | sae_password=qwertyuiop 29 | -------------------------------------------------------------------------------- /tests/hwsim/multi-bss-iface-per_sta_vif.conf: -------------------------------------------------------------------------------- 1 | driver=nl80211 2 | 3 | hw_mode=g 4 | channel=1 5 | ieee80211n=1 6 | 7 | interface=wlan3 8 | ctrl_interface=/var/run/hostapd 9 | 10 | ssid=bss-1 11 | dynamic_vlan=1 12 | vlan_tagged_interface=stub0 13 | vlan_bridge=brvlan 14 | wpa=2 15 | wpa_key_mgmt=WPA-EAP 16 | rsn_pairwise=CCMP 17 | ieee8021x=1 18 | auth_server_addr=127.0.0.1 19 | auth_server_port=18128 20 | auth_server_shared_secret=radius 21 | nas_identifier=nas.w1.fi 22 | vlan_naming=1 23 | per_sta_vif=1 24 | 25 | bss=wlan3-2 26 | bssid=02:00:00:00:03:01 27 | ctrl_interface=/var/run/hostapd 28 | ssid=bss-2 29 | 30 | dynamic_vlan=1 31 | vlan_tagged_interface=stub0 32 | vlan_bridge=brvlan 33 | wpa=2 34 | wpa_key_mgmt=WPA-EAP 35 | rsn_pairwise=CCMP 36 | ieee8021x=1 37 | auth_server_addr=127.0.0.1 38 | auth_server_port=18128 39 | auth_server_shared_secret=radius 40 | nas_identifier=nas.w1.fi 41 | vlan_naming=1 42 | per_sta_vif=1 43 | -------------------------------------------------------------------------------- /tests/hwsim/multi-bss-iface.conf: -------------------------------------------------------------------------------- 1 | driver=nl80211 2 | 3 | hw_mode=g 4 | channel=1 5 | ieee80211n=1 6 | 7 | interface=wlan3 8 | ctrl_interface=/var/run/hostapd 9 | 10 | ssid=bss-1 11 | dynamic_vlan=1 12 | vlan_tagged_interface=stub0 13 | vlan_bridge=brvlan 14 | wpa=2 15 | wpa_key_mgmt=WPA-EAP 16 | rsn_pairwise=CCMP 17 | ieee8021x=1 18 | auth_server_addr=127.0.0.1 19 | auth_server_port=18128 20 | auth_server_shared_secret=radius 21 | nas_identifier=nas.w1.fi 22 | vlan_naming=1 23 | 24 | bss=wlan3-2 25 | bssid=02:00:00:00:03:01 26 | ctrl_interface=/var/run/hostapd 27 | ssid=bss-2 28 | 29 | dynamic_vlan=1 30 | vlan_tagged_interface=stub0 31 | vlan_bridge=brvlan 32 | wpa=2 33 | wpa_key_mgmt=WPA-EAP 34 | rsn_pairwise=CCMP 35 | ieee8021x=1 36 | auth_server_addr=127.0.0.1 37 | auth_server_port=18128 38 | auth_server_shared_secret=radius 39 | nas_identifier=nas.w1.fi 40 | vlan_naming=1 41 | -------------------------------------------------------------------------------- /tests/hwsim/multi-bss.conf: -------------------------------------------------------------------------------- 1 | driver=nl80211 2 | 3 | hw_mode=g 4 | channel=1 5 | ieee80211n=1 6 | 7 | interface=wlan3 8 | ctrl_interface=/var/run/hostapd 9 | 10 | ssid=bss-1 11 | 12 | 13 | bss=wlan3-2 14 | bssid=02:00:00:00:03:01 15 | ctrl_interface=/var/run/hostapd 16 | ssid=bss-2 17 | 18 | bss=wlan3-3 19 | bssid=02:00:00:00:03:02 20 | ctrl_interface=/var/run/hostapd 21 | ssid=bss-3 22 | -------------------------------------------------------------------------------- /tests/hwsim/owe-bss-1.conf: -------------------------------------------------------------------------------- 1 | driver=nl80211 2 | 3 | hw_mode=g 4 | channel=1 5 | ieee80211n=1 6 | 7 | interface=wlan3 8 | bssid=02:00:00:00:03:00 9 | ctrl_interface=/var/run/hostapd 10 | 11 | ssid=transition-mode-open 12 | owe_transition_ifname=wlan3-2 13 | -------------------------------------------------------------------------------- /tests/hwsim/owe-bss-2.conf: -------------------------------------------------------------------------------- 1 | driver=nl80211 2 | 3 | hw_mode=g 4 | channel=1 5 | ieee80211n=1 6 | 7 | interface=wlan3-2 8 | bssid=02:00:00:00:03:01 9 | ctrl_interface=/var/run/hostapd 10 | 11 | ssid=transition-mode-owe 12 | wpa=2 13 | wpa_key_mgmt=OWE 14 | rsn_pairwise=CCMP 15 | owe_transition_ifname=wlan3 16 | ignore_broadcast_ssid=1 17 | -------------------------------------------------------------------------------- /tests/hwsim/p2p0.conf: -------------------------------------------------------------------------------- 1 | ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=admin 2 | device_name=Device A 3 | p2p_no_group_iface=1 4 | -------------------------------------------------------------------------------- /tests/hwsim/p2p1.conf: -------------------------------------------------------------------------------- 1 | ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=admin 2 | device_name=Device B 3 | p2p_no_group_iface=1 4 | -------------------------------------------------------------------------------- /tests/hwsim/p2p2.conf: -------------------------------------------------------------------------------- 1 | ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=admin 2 | device_name=Device C 3 | p2p_no_group_iface=1 4 | -------------------------------------------------------------------------------- /tests/hwsim/test_module_tests.py: -------------------------------------------------------------------------------- 1 | # Module tests 2 | # Copyright (c) 2014, Jouni Malinen 3 | # 4 | # This software may be distributed under the terms of the BSD license. 5 | # See README for more details. 6 | 7 | import os 8 | import time 9 | 10 | import hostapd 11 | 12 | def test_module_wpa_supplicant(dev, apdev, params): 13 | """wpa_supplicant module tests""" 14 | if "OK" not in dev[0].global_request("MODULE_TESTS"): 15 | raise Exception("Module tests failed") 16 | # allow eloop test to complete 17 | time.sleep(0.75) 18 | dev[0].relog() 19 | with open(os.path.join(params['logdir'], 'log0'), 'r') as f: 20 | res = f.read() 21 | if "FAIL - should not have called this function" in res: 22 | raise Exception("eloop test failed") 23 | 24 | def test_module_hostapd(dev): 25 | """hostapd module tests""" 26 | hapd_global = hostapd.HostapdGlobal() 27 | if "OK" not in hapd_global.ctrl.request("MODULE_TESTS"): 28 | raise Exception("Module tests failed") 29 | -------------------------------------------------------------------------------- /tests/hwsim/tnc/.gitignore: -------------------------------------------------------------------------------- 1 | libhostap2_imc.so 2 | libhostap2_imv.so 3 | libhostap_imc.so 4 | libhostap_imv.so 5 | -------------------------------------------------------------------------------- /tests/hwsim/tnc/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -I$(abspath ../../../src) 2 | CFLAGS += -I$(abspath ../../../src/utils) 3 | 4 | ALL=libhostap_imc.so libhostap_imv.so libhostap2_imc.so libhostap2_imv.so 5 | all: $(ALL) 6 | 7 | Q=@ 8 | E=echo 9 | ifeq ($(V), 1) 10 | Q= 11 | E=true 12 | endif 13 | ifeq ($(QUIET), 1) 14 | Q=@ 15 | E=true 16 | endif 17 | 18 | lib%.so: %.c 19 | $(Q)$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $< 20 | @$(E) " CC " $@ 21 | 22 | clean: 23 | rm -f $(ALL) 24 | -------------------------------------------------------------------------------- /tests/hwsim/tnc/tnc_config: -------------------------------------------------------------------------------- 1 | IMC "hostap IMC" tnc/libhostap_imc.so 2 | IMV "hostap IMV" tnc/libhostap_imv.so 3 | IMC "hostap2 IMC" tnc/libhostap2_imc.so 4 | IMV "hostap2 IMV" tnc/libhostap2_imv.so 5 | -------------------------------------------------------------------------------- /tests/hwsim/vm/.gitignore: -------------------------------------------------------------------------------- 1 | vm-config 2 | -------------------------------------------------------------------------------- /tests/hwsim/vm/bisect-run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | path="$(dirname $0)" 6 | 7 | test="$1" 8 | makedir="$2" 9 | if [ -z $test ] ; then 10 | echo "This script helps bisect test failures, given a test case." 11 | echo "" 12 | echo "Use it like this:" 13 | echo " git bisect start" 14 | echo " git bisect bad " 15 | echo " git bisect good " 16 | echo " git bisect run $0 []" 17 | echo "" 18 | echo "(the compile directory is optional, use it if you want to" 19 | echo "use an out-of-tree kernel build." 20 | echo "" 21 | echo "Note that, of course, you have to have a working vm-run setup." 22 | exit 200 # exit git bisect run if called that way 23 | fi 24 | 25 | if [ -n "$makedir" ] ; then 26 | cd "$makedir" 27 | fi 28 | 29 | yes '' | make oldconfig || exit 125 30 | make -j8 || exit 125 31 | 32 | output=$(mktemp) 33 | if [ $? -ne 0 ] ; then 34 | exit 202 35 | fi 36 | finish() { 37 | rm -f $output 38 | } 39 | trap finish EXIT 40 | 41 | "$path/vm-run.sh" $test 2>&1 | tee $output 42 | 43 | grep -q 'ALL-PASSED' $output && exit 0 || exit 1 44 | -------------------------------------------------------------------------------- /tests/hwsim/vm/regdb/regulatory.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/hwsim/vm/regdb/regulatory.db -------------------------------------------------------------------------------- /tests/hwsim/vm/regdb/regulatory.db.p7s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/hwsim/vm/regdb/regulatory.db.p7s -------------------------------------------------------------------------------- /tests/hwsim/vm/uevent.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | EPATH=$(sed 's/.*EPATH=\([^ ]*\) .*/\1/' /proc/cmdline) 4 | PATH=/tmp/bin:$EPATH:$PATH 5 | 6 | # assume this was a call for CRDA, 7 | # if not then it won't find a COUNTRY 8 | # environment variable and exit 9 | exec crda 10 | -------------------------------------------------------------------------------- /tests/hwsim/w1fi_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/tests/hwsim/w1fi_logo.png -------------------------------------------------------------------------------- /tests/hwsim/wps-ctrl-cred: -------------------------------------------------------------------------------- 1 | ?&EA 2 | B CD ('12345678-a 3 | b cd  -------------------------------------------------------------------------------- /tests/hwsim/wps-ctrl-cred2: -------------------------------------------------------------------------------- 1 | 7&EA 2 | B CD ('12345678  -------------------------------------------------------------------------------- /tests/hwsim/wps-mixed-cred: -------------------------------------------------------------------------------- 1 | 4&ETest('12345678 4&ETest ('12345678  -------------------------------------------------------------------------------- /tests/hwsim/wps-wep-cred: -------------------------------------------------------------------------------- 1 | 1&ETest('hello  -------------------------------------------------------------------------------- /tests/test-base64.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Base64 encoding/decoding (RFC1341) - test program 3 | * Copyright (c) 2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "utils/includes.h" 10 | #include "utils/os.h" 11 | #include "utils/base64.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | FILE *f; 16 | size_t len, elen; 17 | unsigned char *buf, *e; 18 | 19 | if (argc != 4) { 20 | printf("Usage: base64 \n"); 21 | return -1; 22 | } 23 | 24 | buf = (unsigned char *) os_readfile(argv[2], &len); 25 | if (buf == NULL) 26 | return -1; 27 | 28 | if (strcmp(argv[1], "encode") == 0) 29 | e = (unsigned char *) base64_encode(buf, len, &elen); 30 | else 31 | e = base64_decode((const char *) buf, len, &elen); 32 | if (e == NULL) 33 | return -2; 34 | f = fopen(argv[3], "w"); 35 | if (f == NULL) 36 | return -3; 37 | fwrite(e, 1, elen, f); 38 | fclose(f); 39 | free(e); 40 | 41 | return 0; 42 | } 43 | -------------------------------------------------------------------------------- /wlantest/.gitignore: -------------------------------------------------------------------------------- 1 | libwlantest.a 2 | test_vectors 3 | wlantest 4 | wlantest_cli 5 | -------------------------------------------------------------------------------- /wpa_supplicant/.gitignore: -------------------------------------------------------------------------------- 1 | .config 2 | *.service 3 | eapol_test 4 | nfc_pw_token 5 | preauth_test 6 | wpa_cli 7 | wpa_passphrase 8 | wpa_supplicant 9 | wpa_priv 10 | wpa_gui/Makefile 11 | wpa_gui/wpa_gui 12 | wpa_gui-qt4/Makefile 13 | wpa_gui-qt4/wpa_gui 14 | libwpa_test1 15 | libwpa_test2 16 | -------------------------------------------------------------------------------- /wpa_supplicant/binder/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | IndentWidth: 8 3 | UseTab: Always 4 | BreakBeforeBraces: Mozilla 5 | AllowShortIfStatementsOnASingleLine: false 6 | IndentCaseLabels: false 7 | AccessModifierOffset: -8 8 | AlignAfterOpenBracket: AlwaysBreak 9 | SortIncludes: false 10 | -------------------------------------------------------------------------------- /wpa_supplicant/binder/binder_constants.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * binder interface for wpa_supplicant daemon 3 | * Copyright (c) 2004-2016, Jouni Malinen 4 | * Copyright (c) 2004-2016, Roshan Pius 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #include "binder_constants.h" 11 | 12 | namespace wpa_supplicant_binder { 13 | namespace binder_constants { 14 | 15 | const char kServiceName[] = "wpa_supplicant"; 16 | 17 | } /* namespace binder_constants */ 18 | } /* namespace wpa_supplicant_binder */ 19 | -------------------------------------------------------------------------------- /wpa_supplicant/binder/binder_constants.h: -------------------------------------------------------------------------------- 1 | /* 2 | * binder interface for wpa_supplicant daemon 3 | * Copyright (c) 2004-2016, Jouni Malinen 4 | * Copyright (c) 2004-2016, Roshan Pius 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef WPA_SUPPLICANT_BINDER_BINDER_CONSTANTS_H 11 | #define WPA_SUPPLICANT_BINDER_BINDER_CONSTANTS_H 12 | 13 | namespace wpa_supplicant_binder { 14 | namespace binder_constants { 15 | 16 | extern const char kServiceName[]; 17 | 18 | } /* namespace binder_constants */ 19 | } /* namespace wpa_supplicant_binder */ 20 | 21 | #endif /* WPA_SUPPLICANT_BINDER_BINDER_CONSTANTS_H */ 22 | -------------------------------------------------------------------------------- /wpa_supplicant/binder/binder_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * binder interface for wpa_supplicant daemon 3 | * Copyright (c) 2004-2016, Jouni Malinen 4 | * Copyright (c) 2004-2016, Roshan Pius 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef BINDER_I_H 11 | #define BINDER_I_H 12 | 13 | #ifdef _cplusplus 14 | extern "C" { 15 | #endif // _cplusplus 16 | 17 | struct wpas_binder_priv 18 | { 19 | int binder_fd; 20 | struct wpa_global *global; 21 | void *binder_manager; 22 | }; 23 | 24 | #ifdef _cplusplus 25 | } 26 | #endif /* _cplusplus */ 27 | 28 | #endif /* BINDER_I_H */ 29 | -------------------------------------------------------------------------------- /wpa_supplicant/binder/fi/w1/wpa_supplicant/IIface.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | * binder interface for wpa_supplicant daemon 3 | * Copyright (c) 2004-2016, Jouni Malinen 4 | * Copyright (c) 2004-2016, Roshan Pius 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | package fi.w1.wpa_supplicant; 11 | 12 | /** 13 | * Interface exposed by wpa_supplicant for each network interface it controls. 14 | */ 15 | interface IIface { 16 | } 17 | -------------------------------------------------------------------------------- /wpa_supplicant/binder/fi/w1/wpa_supplicant/ISupplicantCallbacks.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | * binder interface for wpa_supplicant daemon 3 | * Copyright (c) 2004-2016, Jouni Malinen 4 | * Copyright (c) 2004-2016, Roshan Pius 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | package fi.w1.wpa_supplicant; 11 | 12 | import android.os.PersistableBundle; 13 | 14 | /** 15 | * Callback Interface exposed by the wpa_supplicant service. Clients need 16 | * to host an instance of this binder object and pass a reference of the object 17 | * to wpa_supplicant via the registerCallbacksObject method. 18 | */ 19 | interface ISupplicantCallbacks { 20 | } 21 | -------------------------------------------------------------------------------- /wpa_supplicant/binder/iface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * binder interface for wpa_supplicant daemon 3 | * Copyright (c) 2004-2016, Jouni Malinen 4 | * Copyright (c) 2004-2016, Roshan Pius 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #include "iface.h" 11 | 12 | namespace wpa_supplicant_binder { 13 | 14 | Iface::Iface(struct wpa_supplicant *wpa_s) : wpa_s_(wpa_s) {} 15 | 16 | } /* namespace wpa_supplicant_binder */ 17 | -------------------------------------------------------------------------------- /wpa_supplicant/dbus/.gitignore: -------------------------------------------------------------------------------- 1 | libwpadbus.a 2 | -------------------------------------------------------------------------------- /wpa_supplicant/dbus/dbus-wpa_supplicant.conf: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /wpa_supplicant/dbus/dbus_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_supplicant D-Bus control interface - common definitions 3 | * Copyright (c) 2006, Dan Williams and Red Hat, Inc. 4 | * Copyright (c) 2009, Witold Sowa 5 | * Copyright (c) 2009, Jouni Malinen 6 | * 7 | * This software may be distributed under the terms of the BSD license. 8 | * See README for more details. 9 | */ 10 | 11 | #ifndef DBUS_COMMON_H 12 | #define DBUS_COMMON_H 13 | 14 | struct wpas_dbus_priv; 15 | struct wpa_global; 16 | 17 | struct wpas_dbus_priv * wpas_dbus_init(struct wpa_global *global); 18 | void wpas_dbus_deinit(struct wpas_dbus_priv *priv); 19 | 20 | #endif /* DBUS_COMMON_H */ 21 | -------------------------------------------------------------------------------- /wpa_supplicant/dbus/dbus_common_i.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_supplicant D-Bus control interface - internal definitions 3 | * Copyright (c) 2006, Dan Williams and Red Hat, Inc. 4 | * Copyright (c) 2009, Witold Sowa 5 | * Copyright (c) 2009, Jouni Malinen 6 | * 7 | * This software may be distributed under the terms of the BSD license. 8 | * See README for more details. 9 | */ 10 | 11 | #ifndef DBUS_COMMON_I_H 12 | #define DBUS_COMMON_I_H 13 | 14 | #include 15 | 16 | struct wpa_dbus_property_desc; 17 | 18 | struct wpas_dbus_priv { 19 | DBusConnection *con; 20 | int should_dispatch; 21 | struct wpa_global *global; 22 | u32 next_objid; 23 | int dbus_new_initialized; 24 | 25 | #if defined(CONFIG_CTRL_IFACE_DBUS_NEW) 26 | struct wpa_dbus_property_desc *all_interface_properties; 27 | int globals_start; 28 | #if defined(CONFIG_AP) 29 | int dbus_noc_refcnt; 30 | #endif /* CONFIG_AP */ 31 | #endif /* CONFIG_CTRL_IFACE_DBUS_NEW */ 32 | }; 33 | 34 | #endif /* DBUS_COMMON_I_H */ 35 | -------------------------------------------------------------------------------- /wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in: -------------------------------------------------------------------------------- 1 | [D-BUS Service] 2 | Name=fi.w1.wpa_supplicant1 3 | Exec=@BINDIR@/wpa_supplicant -u 4 | User=root 5 | SystemdService=wpa_supplicant.service 6 | -------------------------------------------------------------------------------- /wpa_supplicant/doc/docbook/.gitignore: -------------------------------------------------------------------------------- 1 | manpage.links 2 | manpage.refs 3 | manpage.log 4 | *.8 5 | *.5 6 | *.html 7 | *.pdf 8 | -------------------------------------------------------------------------------- /wpa_supplicant/doc/docbook/Makefile: -------------------------------------------------------------------------------- 1 | all: man html pdf 2 | 3 | FILES += wpa_background 4 | FILES += wpa_cli 5 | FILES += wpa_gui 6 | FILES += wpa_passphrase 7 | FILES += wpa_priv 8 | FILES += wpa_supplicant.conf 9 | FILES += wpa_supplicant 10 | FILES += eapol_test 11 | 12 | man: 13 | for i in $(FILES); do docbook2man $$i.sgml; done 14 | 15 | html: 16 | for i in $(FILES); do docbook2html $$i.sgml && \ 17 | mv index.html $$i.html; done 18 | 19 | pdf: 20 | for i in $(FILES); do docbook2pdf $$i.sgml; done 21 | 22 | 23 | clean: 24 | rm -f wpa_background.8 wpa_cli.8 wpa_gui.8 wpa_passphrase.8 wpa_priv.8 wpa_supplicant.8 eapol_test.8 25 | rm -f wpa_supplicant.conf.5 26 | rm -f manpage.links manpage.refs 27 | rm -f $(FILES:%=%.pdf) 28 | rm -f $(FILES:%=%.html) 29 | -------------------------------------------------------------------------------- /wpa_supplicant/eap_proxy_dummy.mak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/wpa_supplicant/eap_proxy_dummy.mak -------------------------------------------------------------------------------- /wpa_supplicant/eap_proxy_dummy.mk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/hostap-wpa3/72e297507b896702e6635540f5b241ec5e02ed06/wpa_supplicant/eap_proxy_dummy.mk -------------------------------------------------------------------------------- /wpa_supplicant/examples/60_wpa_supplicant: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # /etc/pm/sleep.d/60_wpa_supplicant 4 | # Action script to notify wpa_supplicant of pm-action events. 5 | 6 | PATH=/sbin:/usr/sbin:/bin:/usr/bin 7 | 8 | WPACLI=wpa_cli 9 | 10 | case "$1" in 11 | suspend|hibernate) 12 | $WPACLI suspend 13 | ;; 14 | resume|thaw) 15 | $WPACLI resume 16 | ;; 17 | esac 18 | 19 | exit 0 20 | -------------------------------------------------------------------------------- /wpa_supplicant/examples/ieee8021x.conf: -------------------------------------------------------------------------------- 1 | # IEEE 802.1X with dynamic WEP keys using EAP-PEAP/MSCHAPv2 2 | 3 | ctrl_interface=/var/run/wpa_supplicant 4 | 5 | network={ 6 | ssid="example 802.1x network" 7 | key_mgmt=IEEE8021X 8 | eap=PEAP 9 | phase2="auth=MSCHAPV2" 10 | identity="user name" 11 | password="password" 12 | ca_cert="/etc/cert/ca.pem" 13 | } 14 | -------------------------------------------------------------------------------- /wpa_supplicant/examples/plaintext.conf: -------------------------------------------------------------------------------- 1 | # Plaintext (no encryption) network 2 | 3 | ctrl_interface=/var/run/wpa_supplicant 4 | 5 | network={ 6 | ssid="example open network" 7 | key_mgmt=NONE 8 | } 9 | -------------------------------------------------------------------------------- /wpa_supplicant/examples/wep.conf: -------------------------------------------------------------------------------- 1 | # Static WEP keys 2 | 3 | ctrl_interface=/var/run/wpa_supplicant 4 | 5 | network={ 6 | ssid="example wep network" 7 | key_mgmt=NONE 8 | wep_key0="abcde" 9 | wep_key1=0102030405 10 | wep_tx_keyidx=0 11 | } 12 | -------------------------------------------------------------------------------- /wpa_supplicant/examples/wpa-psk-tkip.conf: -------------------------------------------------------------------------------- 1 | # WPA-PSK/TKIP 2 | 3 | ctrl_interface=/var/run/wpa_supplicant 4 | 5 | network={ 6 | ssid="example wpa-psk network" 7 | key_mgmt=WPA-PSK 8 | proto=WPA 9 | pairwise=TKIP 10 | group=TKIP 11 | psk="secret passphrase" 12 | } 13 | -------------------------------------------------------------------------------- /wpa_supplicant/examples/wpa2-eap-ccmp.conf: -------------------------------------------------------------------------------- 1 | # WPA2-EAP/CCMP using EAP-TLS 2 | 3 | ctrl_interface=/var/run/wpa_supplicant 4 | 5 | network={ 6 | ssid="example wpa2-eap network" 7 | key_mgmt=WPA-EAP 8 | proto=WPA2 9 | pairwise=CCMP 10 | group=CCMP 11 | eap=TLS 12 | ca_cert="/etc/cert/ca.pem" 13 | private_key="/etc/cert/user.p12" 14 | private_key_passwd="PKCS#12 passhrase" 15 | } 16 | -------------------------------------------------------------------------------- /wpa_supplicant/libwpa_test.c: -------------------------------------------------------------------------------- 1 | /* 2 | * libwpa_test - Test program for libwpa_client.* library linking 3 | * Copyright (c) 2015, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common/wpa_ctrl.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | struct wpa_ctrl *ctrl; 16 | 17 | ctrl = wpa_ctrl_open("foo"); 18 | if (!ctrl) 19 | return -1; 20 | if (wpa_ctrl_attach(ctrl) == 0) 21 | wpa_ctrl_detach(ctrl); 22 | if (wpa_ctrl_pending(ctrl)) { 23 | char buf[10]; 24 | size_t len; 25 | 26 | len = sizeof(buf); 27 | wpa_ctrl_recv(ctrl, buf, &len); 28 | } 29 | wpa_ctrl_close(ctrl); 30 | 31 | return 0; 32 | } 33 | -------------------------------------------------------------------------------- /wpa_supplicant/main_none.c: -------------------------------------------------------------------------------- 1 | /* 2 | * WPA Supplicant / Example program entrypoint 3 | * Copyright (c) 2003-2005, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "includes.h" 10 | 11 | #include "common.h" 12 | #include "wpa_supplicant_i.h" 13 | 14 | int main(int argc, char *argv[]) 15 | { 16 | struct wpa_interface iface; 17 | int exitcode = 0; 18 | struct wpa_params params; 19 | struct wpa_global *global; 20 | 21 | memset(¶ms, 0, sizeof(params)); 22 | params.wpa_debug_level = MSG_INFO; 23 | 24 | global = wpa_supplicant_init(¶ms); 25 | if (global == NULL) 26 | return -1; 27 | 28 | memset(&iface, 0, sizeof(iface)); 29 | /* TODO: set interface parameters */ 30 | 31 | if (wpa_supplicant_add_iface(global, &iface, NULL) == NULL) 32 | exitcode = -1; 33 | 34 | if (exitcode == 0) 35 | exitcode = wpa_supplicant_run(global); 36 | 37 | wpa_supplicant_deinit(global); 38 | 39 | return exitcode; 40 | } 41 | -------------------------------------------------------------------------------- /wpa_supplicant/supp_saepk.conf: -------------------------------------------------------------------------------- 1 | network={ 2 | ssid="SAEPK-Network" 3 | sae_password="2udb-slxf-3ij2" 4 | key_mgmt=SAE 5 | ieee80211w=2 6 | } 7 | -------------------------------------------------------------------------------- /wpa_supplicant/supp_wpa3.conf: -------------------------------------------------------------------------------- 1 | network={ 2 | ssid="WPA3-Network" 3 | psk="abcdefgh" 4 | key_mgmt=SAE 5 | ieee80211w=2 6 | } 7 | -------------------------------------------------------------------------------- /wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=WPA supplicant daemon (interface- and nl80211 driver-specific version) 3 | Requires=sys-subsystem-net-devices-%i.device 4 | After=sys-subsystem-net-devices-%i.device 5 | Before=network.target 6 | Wants=network.target 7 | 8 | # NetworkManager users will probably want the dbus version instead. 9 | 10 | [Service] 11 | Type=simple 12 | ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-nl80211-%I.conf -Dnl80211 -i%I 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=WPA supplicant daemon (interface- and wired driver-specific version) 3 | Requires=sys-subsystem-net-devices-%i.device 4 | After=sys-subsystem-net-devices-%i.device 5 | Before=network.target 6 | Wants=network.target 7 | 8 | # NetworkManager users will probably want the dbus version instead. 9 | 10 | [Service] 11 | Type=simple 12 | ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wired-%I.conf -Dwired -i%I 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /wpa_supplicant/systemd/wpa_supplicant.service.arg.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=WPA supplicant daemon (interface-specific version) 3 | Requires=sys-subsystem-net-devices-%i.device 4 | After=sys-subsystem-net-devices-%i.device 5 | Before=network.target 6 | Wants=network.target 7 | 8 | # NetworkManager users will probably want the dbus version instead. 9 | 10 | [Service] 11 | Type=simple 12 | ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /wpa_supplicant/systemd/wpa_supplicant.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=WPA supplicant 3 | Before=network.target 4 | After=dbus.service 5 | Wants=network.target 6 | 7 | [Service] 8 | Type=dbus 9 | BusName=fi.w1.wpa_supplicant1 10 | ExecStart=@BINDIR@/wpa_supplicant -u 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | Alias=dbus-fi.w1.wpa_supplicant1.service 15 | -------------------------------------------------------------------------------- /wpa_supplicant/wifi_display.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_supplicant - Wi-Fi Display 3 | * Copyright (c) 2011, Atheros Communications, Inc. 4 | * Copyright (c) 2011-2012, Qualcomm Atheros, Inc. 5 | * 6 | * This software may be distributed under the terms of the BSD license. 7 | * See README for more details. 8 | */ 9 | 10 | #ifndef WIFI_DISPLAY_H 11 | #define WIFI_DISPLAY_H 12 | 13 | int wifi_display_init(struct wpa_global *global); 14 | void wifi_display_deinit(struct wpa_global *global); 15 | void wifi_display_enable(struct wpa_global *global, int enabled); 16 | struct wpabuf *wifi_display_get_wfd_ie(struct wpa_global *global); 17 | int wifi_display_subelem_set(struct wpa_global *global, char *cmd); 18 | int wifi_display_subelem_set_from_ies(struct wpa_global *global, 19 | struct wpabuf *ie); 20 | int wifi_display_subelem_get(struct wpa_global *global, char *cmd, 21 | char *buf, size_t buflen); 22 | char * wifi_display_subelem_hex(const struct wpabuf *wfd_subelems, u8 id); 23 | 24 | #endif /* WIFI_DISPLAY_H */ 25 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/.gitignore: -------------------------------------------------------------------------------- 1 | .moc 2 | .obj 3 | .ui 4 | qrc_icons.cpp 5 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/addinterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - AddInterface class 3 | * Copyright (c) 2008, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef ADDINTERFACE_H 10 | #define ADDINTERFACE_H 11 | 12 | #include 13 | 14 | #include 15 | #include 16 | #include 17 | 18 | class WpaGui; 19 | 20 | class AddInterface : public QDialog 21 | { 22 | Q_OBJECT 23 | 24 | public: 25 | AddInterface(WpaGui *_wpagui, QWidget *parent = 0); 26 | 27 | public slots: 28 | virtual void interfaceSelected(QTreeWidgetItem *sel); 29 | 30 | private: 31 | void addInterfaces(); 32 | bool addRegistryInterface(const QString &ifname); 33 | 34 | QVBoxLayout *vboxLayout; 35 | QTreeWidget *interfaceWidget; 36 | WpaGui *wpagui; 37 | }; 38 | 39 | #endif /* ADDINTERFACE_H */ 40 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/icons.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | icons/wpa_gui.svg 4 | icons/ap.svg 5 | icons/laptop.svg 6 | icons/group.svg 7 | icons/invitation.svg 8 | 9 | 10 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/icons/.gitignore: -------------------------------------------------------------------------------- 1 | hicolor 2 | pixmaps 3 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/icons_png.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | icons/hicolor/16x16/apps/wpa_gui.png 4 | icons/hicolor/32x32/apps/ap.png 5 | icons/hicolor/32x32/apps/laptop.png 6 | icons/hicolor/32x32/apps/group.png 7 | icons/hicolor/32x32/apps/invitation.png 8 | 9 | 10 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/lang/.gitignore: -------------------------------------------------------------------------------- 1 | *.qm 2 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/scanresults.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - ScanResults class 3 | * Copyright (c) 2005-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SCANRESULTS_H 10 | #define SCANRESULTS_H 11 | 12 | #include 13 | #include "ui_scanresults.h" 14 | 15 | class WpaGui; 16 | 17 | class ScanResults : public QDialog, public Ui::ScanResults 18 | { 19 | Q_OBJECT 20 | 21 | public: 22 | ScanResults(QWidget *parent = 0, const char *name = 0, 23 | bool modal = false, Qt::WindowFlags fl = 0); 24 | ~ScanResults(); 25 | 26 | public slots: 27 | virtual void setWpaGui(WpaGui *_wpagui); 28 | virtual void updateResults(); 29 | virtual void scanRequest(); 30 | virtual void getResults(); 31 | virtual void bssSelected(QTreeWidgetItem *sel); 32 | 33 | protected slots: 34 | virtual void languageChange(); 35 | 36 | private: 37 | WpaGui *wpagui; 38 | }; 39 | 40 | #endif /* SCANRESULTS_H */ 41 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/scanresultsitem.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - ScanResultsItem class 3 | * Copyright (c) 2015, Adrian Nowicki 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include "scanresultsitem.h" 10 | 11 | bool ScanResultsItem::operator< (const QTreeWidgetItem &other) const 12 | { 13 | int sortCol = treeWidget()->sortColumn(); 14 | if (sortCol == 2 || sortCol == 3) { 15 | return text(sortCol).toInt() < other.text(sortCol).toInt(); 16 | } 17 | return text(sortCol) < other.text(sortCol); 18 | } 19 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/scanresultsitem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - ScanResultsItem class 3 | * Copyright (c) 2015, Adrian Nowicki 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SCANRESULTSITEM_H 10 | #define SCANRESULTSITEM_H 11 | 12 | #include 13 | 14 | class ScanResultsItem : public QTreeWidgetItem 15 | { 16 | public: 17 | ScanResultsItem(QTreeWidget *tree) : QTreeWidgetItem(tree) {} 18 | bool operator< (const QTreeWidgetItem &other) const; 19 | }; 20 | 21 | #endif /* SCANRESULTSITEM_H */ 22 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/signalbar.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - SignalBar class 3 | * Copyright (c) 2011, Kel Modderman 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef SIGNALBAR_H 10 | #define SIGNALBAR_H 11 | 12 | #include 13 | #include 14 | 15 | class SignalBar : public QStyledItemDelegate 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | SignalBar(QObject *parent = 0); 21 | ~SignalBar(); 22 | 23 | virtual void paint(QPainter *painter, 24 | const QStyleOptionViewItem &option, 25 | const QModelIndex &index) const ; 26 | }; 27 | 28 | #endif /* SIGNALBAR_H */ 29 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/stringquery.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - StringQuery class 3 | * Copyright (c) 2009, Atheros Communications 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #include 10 | #include 11 | 12 | #include "stringquery.h" 13 | 14 | 15 | StringQuery::StringQuery(QString label) 16 | { 17 | edit = new QLineEdit; 18 | edit->setFocus(); 19 | QGridLayout *layout = new QGridLayout; 20 | layout->addWidget(new QLabel(label), 0, 0); 21 | layout->addWidget(edit, 0, 1); 22 | setLayout(layout); 23 | 24 | connect(edit, SIGNAL(returnPressed()), this, SLOT(accept())); 25 | } 26 | 27 | 28 | QString StringQuery::get_string() 29 | { 30 | return edit->text(); 31 | } 32 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/stringquery.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - StringQuery class 3 | * Copyright (c) 2009, Atheros Communications 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef STRINGQUERY_H 10 | #define STRINGQUERY_H 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | class StringQuery : public QDialog 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | StringQuery(QString label); 22 | QString get_string(); 23 | 24 | private: 25 | QLineEdit *edit; 26 | }; 27 | 28 | #endif /* STRINGQUERY_H */ 29 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/userdatarequest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - UserDataRequest class 3 | * Copyright (c) 2005-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef USERDATAREQUEST_H 10 | #define USERDATAREQUEST_H 11 | 12 | #include 13 | #include "ui_userdatarequest.h" 14 | 15 | class WpaGui; 16 | 17 | class UserDataRequest : public QDialog, public Ui::UserDataRequest 18 | { 19 | Q_OBJECT 20 | 21 | public: 22 | UserDataRequest(QWidget *parent = 0, const char *name = 0, 23 | bool modal = false, Qt::WindowFlags fl = 0); 24 | ~UserDataRequest(); 25 | 26 | int setParams(WpaGui *_wpagui, const char *reqMsg); 27 | 28 | public slots: 29 | virtual void sendReply(); 30 | 31 | protected slots: 32 | virtual void languageChange(); 33 | 34 | private: 35 | WpaGui *wpagui; 36 | int networkid; 37 | QString field; 38 | }; 39 | 40 | #endif /* USERDATAREQUEST_H */ 41 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/wpa_gui.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Name=wpa_gui 4 | Comment=Graphical user interface for wpa_supplicant 5 | Exec=wpa_gui 6 | Icon=wpa_gui 7 | GenericName=wpa_supplicant user interface 8 | Terminal=false 9 | Type=Application 10 | Categories=Qt;Network; 11 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_gui-qt4/wpamsg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * wpa_gui - WpaMsg class for storing event messages 3 | * Copyright (c) 2005-2006, Jouni Malinen 4 | * 5 | * This software may be distributed under the terms of the BSD license. 6 | * See README for more details. 7 | */ 8 | 9 | #ifndef WPAMSG_H 10 | #define WPAMSG_H 11 | 12 | #include 13 | #include 14 | 15 | class WpaMsg { 16 | public: 17 | WpaMsg(const QString &_msg, int _priority = 2) 18 | : msg(_msg), priority(_priority) 19 | { 20 | timestamp = QDateTime::currentDateTime(); 21 | } 22 | 23 | QString getMsg() const { return msg; } 24 | int getPriority() const { return priority; } 25 | QDateTime getTimestamp() const { return timestamp; } 26 | 27 | private: 28 | QString msg; 29 | int priority; 30 | QDateTime timestamp; 31 | }; 32 | 33 | typedef QLinkedList WpaMsgList; 34 | 35 | #endif /* WPAMSG_H */ 36 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_supplicant_conf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2010 The Android Open Source Project 4 | # 5 | # This software may be distributed under the terms of the BSD license. 6 | # See README for more details. 7 | # 8 | 9 | # Generate a wpa_supplicant.conf from the template. 10 | # $1: the template file name 11 | if [ -n "$WIFI_DRIVER_SOCKET_IFACE" ] 12 | then 13 | sed -e 's/#.*$//' -e 's/[ \t]*$//' -e '/^$/d' < $1 | sed -e "s/wlan0/$WIFI_DRIVER_SOCKET_IFACE/" 14 | else 15 | sed -e 's/#.*$//' -e 's/[ \t]*$//' -e '/^$/d' < $1 16 | fi 17 | -------------------------------------------------------------------------------- /wpa_supplicant/wpa_supplicant_template.conf: -------------------------------------------------------------------------------- 1 | ##### wpa_supplicant configuration file template ##### 2 | update_config=1 3 | eapol_version=1 4 | ap_scan=1 5 | fast_reauth=1 6 | pmf=1 7 | p2p_add_cli_chan=1 8 | -------------------------------------------------------------------------------- /wpadebug/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | gen 3 | local.properties 4 | proguard-project.txt 5 | -------------------------------------------------------------------------------- /wpadebug/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /wpadebug/project.properties: -------------------------------------------------------------------------------- 1 | # Project target. 2 | target=android-22 3 | -------------------------------------------------------------------------------- /wpadebug/res/layout/input_uri.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 14 | 15 | 19 | 20 |