From 83053396070d3107233e699d34659d24265ca392 Mon Sep 17 00:00:00 2001 From: Kim Kibum Date: Sun, 29 Apr 2012 17:04:32 +0900 Subject: [PATCH] upload tizen1.0 source --- CONTRIBUTIONS | 103 + README | 76 +- build_nsis.sh | 16 + build_release | 148 + configurations/tizen.config | 475 ++ .../tizen_hostapd.config | 152 +- debian/changelog | 56 + debian/control | 2 +- debian/rules | 44 +- debian/wpa_supplicant.conf | 1 - debian/wpasupplicant.install.in | 5 +- doc/Makefile | 26 + doc/code_structure.doxygen | 322 ++ doc/ctrl_iface.doxygen | 1053 ++++ doc/dbus.doxygen | 715 +++ doc/directories.doxygen | 90 + doc/doxygen.conf | 1534 ++++++ doc/driver_wrapper.doxygen | 180 + doc/eap.doxygen | 87 + doc/eap_server.doxygen | 56 + doc/hostapd.fig | 264 + doc/hostapd_ctrl_iface.doxygen | 66 + doc/mainpage.doxygen | 95 + doc/porting.doxygen | 208 + doc/testing_tools.doxygen | 363 ++ doc/wpa_supplicant.fig | 247 + eap_example/Makefile | 152 + eap_example/README | 46 + eap_example/ca.pem | 19 + eap_example/eap_example.c | 55 + eap_example/eap_example_peer.c | 378 ++ eap_example/eap_example_server.c | 301 ++ eap_example/server-key.pem | 15 + eap_example/server.key | Bin 0 -> 608 bytes eap_example/server.pem | 18 + etc/rc.d/init.d/wpa_supplicant | 21 + hostapd/Android.mk | 826 +++ hostapd/ChangeLog | 647 +++ hostapd/Makefile | 867 ++++ hostapd/README | 387 ++ hostapd/README-WPS | 291 ++ hostapd/config_file.c | 2261 ++++++++ hostapd/config_file.h | 20 + hostapd/ctrl_iface.c | 1186 +++++ hostapd/ctrl_iface.h | 32 + hostapd/defconfig | 247 + hostapd/dump_state.c | 186 + hostapd/dump_state.h | 20 + hostapd/eap_register.c | 139 + hostapd/eap_register.h | 20 + hostapd/eap_testing.txt | 77 + hostapd/hlr_auc_gw.c | 715 +++ hostapd/hlr_auc_gw.milenage_db | 13 + hostapd/hostapd.8 | 59 + hostapd/hostapd.accept | 6 + hostapd/hostapd.conf | 1147 ++++ hostapd/hostapd.deny | 5 + hostapd/hostapd.eap_user | 91 + hostapd/hostapd.radius_clients | 4 + hostapd/hostapd.sim_db | 9 + hostapd/hostapd.vlan | 9 + hostapd/hostapd.wpa_psk | 9 + hostapd/hostapd_cli.1 | 89 + hostapd/hostapd_cli.c | 1086 ++++ hostapd/logwatch/README | 9 + hostapd/logwatch/hostapd | 65 + hostapd/logwatch/hostapd.conf | 10 + hostapd/main.c | 659 +++ hostapd/nt_password_hash.c | 53 + hostapd/wired.conf | 40 + mac80211_hwsim/tests/0001-wpa2-psk/hostapd.conf | 11 + mac80211_hwsim/tests/0001-wpa2-psk/test.txt | 7 + .../tests/0001-wpa2-psk/wpa_supplicant.conf | 10 + mac80211_hwsim/tests/0002-vlan/hostapd.accept | 2 + mac80211_hwsim/tests/0002-vlan/hostapd.conf | 12 + mac80211_hwsim/tests/0002-vlan/hostapd.vlan | 1 + mac80211_hwsim/tests/0002-vlan/test.txt | 15 + mac80211_hwsim/tools/Makefile | 11 + mac80211_hwsim/tools/hwsim_test.c | 244 + packaging/wpasupplicant.spec | 79 + radius_example/Makefile | 45 + radius_example/README | 39 + radius_example/radius_example.c | 160 + src/Makefile | 2 +- src/ap/accounting.c | 20 +- src/ap/ap_config.c | 40 +- src/ap/ap_config.h | 76 +- src/ap/ap_drv_ops.c | 531 +- src/ap/ap_drv_ops.h | 172 +- src/ap/ap_list.c | 10 +- src/ap/ap_list.h | 2 +- src/ap/authsrv.c | 11 +- src/ap/beacon.c | 446 +- src/ap/beacon.h | 10 - src/ap/ctrl_iface_ap.c | 4 + src/ap/drv_callbacks.c | 300 +- src/ap/hostapd.c | 221 +- src/ap/hostapd.h | 106 +- src/ap/hw_features.c | 146 +- src/ap/hw_features.h | 11 +- src/ap/ieee802_11.c | 482 +- src/ap/ieee802_11.h | 19 +- src/ap/ieee802_11_auth.c | 90 +- src/ap/ieee802_11_auth.h | 3 +- src/ap/ieee802_11_ht.c | 31 +- src/ap/ieee802_11_shared.c | 405 ++ src/ap/ieee802_1x.c | 241 +- src/ap/ieee802_1x.h | 2 + src/ap/p2p_hostapd.c | 120 + src/ap/p2p_hostapd.h | 41 + src/ap/peerkey_auth.c | 3 +- src/ap/sta_info.c | 251 +- src/ap/sta_info.h | 25 +- src/ap/tkip_countermeasures.c | 31 +- src/ap/tkip_countermeasures.h | 3 +- src/ap/utils.c | 1 + src/ap/vlan_init.c | 16 +- src/ap/wmm.c | 22 +- src/ap/wpa_auth.c | 410 +- src/ap/wpa_auth.h | 6 + src/ap/wpa_auth_ft.c | 171 +- src/ap/wpa_auth_glue.c | 65 +- src/ap/wpa_auth_i.h | 5 + src/ap/wpa_auth_ie.c | 175 +- src/ap/wps_hostapd.c | 592 ++- src/ap/wps_hostapd.h | 19 +- src/common/defs.h | 57 +- src/common/gas.c | 279 + src/common/gas.h | 42 + src/common/ieee802_11_common.c | 79 +- src/common/ieee802_11_common.h | 7 + src/common/ieee802_11_defs.h | 322 +- src/common/version.h | 6 +- src/common/wpa_common.c | 288 ++ src/common/wpa_common.h | 33 + src/common/wpa_ctrl.c | 102 +- src/common/wpa_ctrl.h | 56 + src/crypto/.gitignore | 1 - src/crypto/Makefile | 3 + src/crypto/aes-internal-dec.c | 2 +- src/crypto/aes-internal-enc.c | 2 +- src/crypto/crypto.h | 3 +- src/crypto/crypto_internal-rsa.c | 1 - src/crypto/crypto_internal.c | 84 +- src/crypto/dh_group5.c | 2 +- src/crypto/dh_groups.c | 4 +- src/crypto/fips_prf_internal.c | 5 +- src/crypto/md5-internal.c | 2 +- src/crypto/ms_funcs.c | 106 +- src/crypto/random.c | 430 ++ src/crypto/random.h | 34 + src/crypto/sha1-pbkdf2.c | 2 - src/crypto/sha1-tlsprf.c | 7 +- src/crypto/sha1.h | 6 +- src/crypto/sha256-internal.c | 43 +- src/crypto/sha256-tlsprf.c | 72 + src/crypto/sha256.h | 5 +- src/crypto/sha256_i.h | 31 + src/crypto/tls.h | 69 +- src/crypto/tls_gnutls.c | 331 +- src/crypto/tls_internal.c | 77 +- src/crypto/tls_none.c | 29 - src/crypto/tls_nss.c | 29 - src/crypto/tls_openssl.c | 174 +- src/crypto/tls_schannel.c | 29 - src/drivers/.gitignore | 2 - src/drivers/Apple80211.h | 156 - src/drivers/MobileApple80211.c | 189 - src/drivers/MobileApple80211.h | 43 - src/drivers/android_drv.h | 60 + src/drivers/driver.h | 1483 +++++- src/drivers/driver_atheros.c | 401 +- src/drivers/driver_atmel.c | 499 -- src/drivers/driver_broadcom.c | 599 --- src/drivers/driver_bsd.c | 139 +- src/drivers/driver_common.c | 90 + src/drivers/driver_hostap.c | 560 +- src/drivers/driver_iphone.m | 466 -- src/drivers/driver_ipw.c | 472 -- src/drivers/driver_madwifi.c | 591 +-- src/drivers/driver_ndis.c | 155 +- src/drivers/driver_ndiswrapper.c | 378 -- src/drivers/driver_nl80211.c | 5469 ++++++++++++++++---- src/drivers/driver_osx.m | 459 -- src/drivers/driver_ralink.c | 1499 ------ src/drivers/driver_ralink.h | 383 -- src/drivers/driver_roboswitch.c | 4 +- src/drivers/driver_test.c | 743 ++- src/drivers/driver_wext.c | 425 +- src/drivers/driver_wext.h | 11 + src/drivers/driver_wired.c | 9 +- src/drivers/drivers.c | 49 - src/drivers/drivers.mak | 124 +- src/drivers/drivers.mk | 164 + src/drivers/linux_ioctl.c | 29 +- src/drivers/linux_ioctl.h | 1 + src/drivers/linux_wext.h | 51 + src/drivers/netlink.c | 2 +- src/drivers/netlink.h | 1 + src/drivers/nl80211_copy.h | 1250 ++++- src/drivers/rfkill.c | 194 + src/drivers/rfkill.h | 31 + src/drivers/wireless_copy.h | 1099 ---- src/eap_common/eap_defs.h | 1 + src/eap_common/eap_fast_common.c | 6 +- src/eap_common/eap_peap_common.c | 13 +- src/eap_common/eap_peap_common.h | 8 +- src/eap_common/eap_pwd_common.c | 330 ++ src/eap_common/eap_pwd_common.h | 74 + src/eap_common/eap_sim_common.c | 5 +- src/eap_common/ikev2_common.c | 3 +- src/eap_common/ikev2_common.h | 2 +- src/eap_peer/eap.c | 99 +- src/eap_peer/eap.h | 21 +- src/eap_peer/eap_aka.c | 17 +- src/eap_peer/eap_fast.c | 17 +- src/eap_peer/eap_fast_pac.c | 1 + src/eap_peer/eap_gpsk.c | 3 +- src/eap_peer/eap_i.h | 1 + src/eap_peer/eap_leap.c | 3 +- src/eap_peer/eap_methods.c | 2 + src/eap_peer/eap_methods.h | 1 + src/eap_peer/eap_mschapv2.c | 5 +- src/eap_peer/eap_pax.c | 3 +- src/eap_peer/eap_peap.c | 21 +- src/eap_peer/eap_psk.c | 3 +- src/eap_peer/eap_pwd.c | 762 +++ src/eap_peer/eap_sake.c | 3 +- src/eap_peer/eap_sim.c | 28 +- src/eap_peer/eap_tls_common.c | 10 +- src/eap_peer/eap_tls_common.h | 5 - src/eap_peer/eap_tnc.c | 1 - src/eap_peer/eap_ttls.c | 452 +- src/eap_peer/eap_wsc.c | 14 +- src/eap_peer/ikev2.c | 5 +- src/eap_peer/tncc.c | 4 +- src/eap_server/eap.h | 8 +- src/eap_server/eap_i.h | 9 +- src/eap_server/eap_methods.h | 1 + src/eap_server/eap_server.c | 38 +- src/eap_server/eap_server_aka.c | 6 +- src/eap_server/eap_server_fast.c | 5 +- src/eap_server/eap_server_gpsk.c | 3 +- src/eap_server/eap_server_ikev2.c | 3 +- src/eap_server/eap_server_md5.c | 3 +- src/eap_server/eap_server_methods.c | 2 + src/eap_server/eap_server_mschapv2.c | 12 +- src/eap_server/eap_server_pax.c | 3 +- src/eap_server/eap_server_peap.c | 20 +- src/eap_server/eap_server_psk.c | 7 +- src/eap_server/eap_server_pwd.c | 863 +++ src/eap_server/eap_server_sake.c | 3 +- src/eap_server/eap_server_sim.c | 3 +- src/eap_server/eap_server_tls_common.c | 9 +- src/eap_server/eap_server_tnc.c | 3 +- src/eap_server/eap_server_ttls.c | 269 +- src/eap_server/eap_server_wsc.c | 15 +- src/eap_server/eap_sim_db.c | 3 +- src/eap_server/ikev2.c | 7 +- src/eap_server/tncs.c | 4 +- src/eapol_auth/eapol_auth_sm.c | 12 +- src/eapol_auth/eapol_auth_sm.h | 6 +- src/eapol_supp/eapol_supp_sm.c | 32 +- src/eapol_supp/eapol_supp_sm.h | 25 +- src/l2_packet/l2_packet_freebsd.c | 31 + src/l2_packet/l2_packet_linux.c | 30 +- src/p2p/Makefile | 9 + src/p2p/p2p.c | 3780 ++++++++++++++ src/p2p/p2p.h | 1580 ++++++ src/p2p/p2p_build.c | 433 ++ src/p2p/p2p_dev_disc.c | 365 ++ src/p2p/p2p_go_neg.c | 1114 ++++ src/p2p/p2p_group.c | 701 +++ src/p2p/p2p_i.h | 673 +++ src/p2p/p2p_invitation.c | 489 ++ src/p2p/p2p_parse.c | 718 +++ src/p2p/p2p_pd.c | 415 ++ src/p2p/p2p_sd.c | 889 ++++ src/p2p/p2p_utils.c | 271 + src/radius/.gitignore | 1 - src/radius/radius.c | 121 +- src/radius/radius.h | 4 + src/radius/radius_client.c | 8 + src/radius/radius_client.h | 2 + src/radius/radius_server.c | 41 +- src/radius/radius_server.h | 13 +- src/rsn_supp/peerkey.c | 10 +- src/rsn_supp/pmksa_cache.c | 60 +- src/rsn_supp/pmksa_cache.h | 11 +- src/rsn_supp/preauth.c | 1 - src/rsn_supp/tdls.c | 2338 +++++++++ src/rsn_supp/wpa.c | 585 ++- src/rsn_supp/wpa.h | 42 + src/rsn_supp/wpa_ft.c | 194 +- src/rsn_supp/wpa_i.h | 70 + src/rsn_supp/wpa_ie.c | 154 +- src/rsn_supp/wpa_ie.h | 12 +- src/tls/.gitignore | 1 - src/tls/Makefile | 2 + src/tls/libtommath.c | 14 +- src/tls/pkcs5.c | 2 +- src/tls/tlsv1_client.c | 243 +- src/tls/tlsv1_client.h | 13 +- src/tls/tlsv1_client_i.h | 5 +- src/tls/tlsv1_client_read.c | 41 +- src/tls/tlsv1_client_write.c | 151 +- src/tls/tlsv1_common.c | 91 +- src/tls/tlsv1_common.h | 57 +- src/tls/tlsv1_cred.c | 25 +- src/tls/tlsv1_record.c | 220 +- src/tls/tlsv1_record.h | 9 +- src/tls/tlsv1_server.c | 88 +- src/tls/tlsv1_server.h | 4 +- src/tls/tlsv1_server_read.c | 147 +- src/tls/tlsv1_server_write.c | 115 +- src/tls/x509v3.c | 13 +- src/tls/x509v3.h | 4 +- src/utils/.gitignore | 1 - src/utils/Makefile | 3 + src/utils/base64.c | 27 +- src/utils/base64.h | 2 +- src/utils/common.c | 36 +- src/utils/common.h | 25 + src/utils/edit.c | 1178 +++++ src/utils/edit.h | 27 + src/utils/edit_readline.c | 184 + src/utils/edit_simple.c | 96 + src/utils/eloop.c | 12 + src/utils/eloop.h | 2 +- src/utils/eloop_win.c | 12 + src/utils/includes.h | 1 - src/utils/list.h | 12 + src/utils/os.h | 10 + src/utils/os_internal.c | 18 + src/utils/os_none.c | 5 + src/utils/os_unix.c | 71 +- src/utils/os_win32.c | 19 + src/utils/pcsc_funcs.c | 2 +- src/utils/radiotap.h | 1 + src/utils/radiotap_iter.h | 15 + src/utils/wpa_debug.c | 228 +- src/utils/wpa_debug.h | 59 +- src/utils/wpabuf.h | 6 + src/wps/http_client.c | 13 +- src/wps/upnp_xml.c | 4 +- src/wps/upnp_xml.h | 2 + src/wps/wps.c | 200 +- src/wps/wps.h | 256 +- src/wps/wps_attr_build.c | 110 +- src/wps/wps_attr_parse.c | 170 +- src/wps/wps_attr_process.c | 19 +- src/wps/wps_common.c | 78 +- src/wps/wps_defs.h | 45 +- src/wps/wps_dev_attr.c | 126 +- src/wps/wps_dev_attr.h | 11 + src/wps/wps_enrollee.c | 283 +- src/wps/wps_er.c | 379 +- src/wps/wps_er.h | 11 + src/wps/wps_er_ssdp.c | 19 +- src/wps/wps_i.h | 38 +- src/wps/wps_registrar.c | 786 ++- src/wps/wps_ufd.c | 1 - src/wps/wps_upnp.c | 229 +- src/wps/wps_upnp.h | 7 +- src/wps/wps_upnp_ap.c | 21 +- src/wps/wps_upnp_event.c | 150 +- src/wps/wps_upnp_i.h | 32 +- src/wps/wps_upnp_ssdp.c | 34 +- src/wps/wps_upnp_web.c | 136 +- src/wps/wps_validate.c | 1981 +++++++ tests/Makefile | 99 + tests/test-aes.c | 308 ++ tests/test-asn1.c | 203 + tests/test-base64.c | 48 + tests/test-https.c | 234 + tests/test-list.c | 78 + tests/test-md4.c | 99 + tests/test-md5.c | 99 + tests/test-milenage.c | 817 +++ tests/test-ms_funcs.c | 120 + tests/test-rc4.c | 256 + tests/test-sha1.c | 448 ++ tests/test-sha256.c | 331 ++ tests/test-x509.c | 44 + tests/test-x509v3.c | 69 + tests/test_x509v3_nist.sh | 144 + tests/test_x509v3_nist2.sh | 165 + wlantest/Makefile | 111 + wlantest/bss.c | 303 ++ wlantest/ccmp.c | 355 ++ wlantest/crc32.c | 90 + wlantest/ctrl.c | 1358 +++++ wlantest/inject.c | 381 ++ wlantest/monitor.c | 150 + wlantest/process.c | 387 ++ wlantest/readpcap.c | 150 + wlantest/rx_data.c | 535 ++ wlantest/rx_eapol.c | 1034 ++++ wlantest/rx_ip.c | 163 + wlantest/rx_mgmt.c | 1175 +++++ wlantest/rx_tdls.c | 574 ++ wlantest/sta.c | 189 + wlantest/tkip.c | 387 ++ wlantest/wep.c | 109 + wlantest/wired.c | 294 ++ wlantest/wlantest.c | 310 ++ wlantest/wlantest.h | 249 + wlantest/wlantest_cli.c | 1719 ++++++ wlantest/wlantest_ctrl.h | 171 + wlantest/writepcap.c | 103 + wpa_supplicant/.gitignore | 8 - wpa_supplicant/Android.mk | 1472 ++++++ wpa_supplicant/ChangeLog | 19 - wpa_supplicant/Makefile | 249 +- wpa_supplicant/README | 97 +- wpa_supplicant/README-P2P | 525 ++ wpa_supplicant/README-WPS | 117 +- wpa_supplicant/ap.c | 558 +- wpa_supplicant/ap.h | 16 +- wpa_supplicant/bgscan.c | 21 +- wpa_supplicant/bgscan.h | 21 +- wpa_supplicant/bgscan_learn.c | 610 +++ wpa_supplicant/bgscan_simple.c | 52 +- wpa_supplicant/blacklist.c | 6 +- wpa_supplicant/bss.c | 182 +- wpa_supplicant/bss.h | 20 +- wpa_supplicant/config.c | 380 +- wpa_supplicant/config.h | 178 +- wpa_supplicant/config_file.c | 311 +- wpa_supplicant/config_ssid.h | 35 + wpa_supplicant/config_winreg.c | 40 +- wpa_supplicant/ctrl_iface.c | 2124 +++++++- wpa_supplicant/ctrl_iface.h | 15 + wpa_supplicant/ctrl_iface_unix.c | 24 +- wpa_supplicant/dbus/.gitignore | 1 - wpa_supplicant/dbus/Makefile | 7 +- wpa_supplicant/dbus/dbus-wpa_supplicant.conf | 12 + wpa_supplicant/dbus/dbus_dict_helpers.c | 233 +- wpa_supplicant/dbus/dbus_dict_helpers.h | 46 +- wpa_supplicant/dbus/dbus_new.c | 3254 +++++++++--- wpa_supplicant/dbus/dbus_new.h | 248 +- wpa_supplicant/dbus/dbus_new_handlers.c | 1807 ++++--- wpa_supplicant/dbus/dbus_new_handlers.h | 231 +- wpa_supplicant/dbus/dbus_new_handlers_p2p.c | 2158 ++++++++ wpa_supplicant/dbus/dbus_new_handlers_p2p.h | 170 + wpa_supplicant/dbus/dbus_new_handlers_wps.c | 110 +- wpa_supplicant/dbus/dbus_new_helpers.c | 530 +- wpa_supplicant/dbus/dbus_new_helpers.h | 31 +- wpa_supplicant/dbus/dbus_new_introspect.c | 11 +- wpa_supplicant/dbus/dbus_old.c | 56 +- wpa_supplicant/dbus/dbus_old.h | 12 + wpa_supplicant/dbus/dbus_old_handlers.c | 40 +- wpa_supplicant/dbus/dbus_old_handlers.h | 3 + wpa_supplicant/dbus/dbus_old_handlers_wps.c | 10 +- .../dbus/fi.epitest.hostap.WPASupplicant.service | 4 - .../fi.epitest.hostap.WPASupplicant.service.in | 4 + wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service | 4 - .../dbus/fi.w1.wpa_supplicant1.service.in | 4 + wpa_supplicant/defconfig | 94 +- wpa_supplicant/doc/docbook/.gitignore | 6 - wpa_supplicant/doc/docbook/wpa_supplicant.sgml | 28 - wpa_supplicant/driver_i.h | 322 +- wpa_supplicant/eap_register.c | 10 + wpa_supplicant/eapol_test.c | 89 +- wpa_supplicant/events.c | 1777 +++++-- wpa_supplicant/examples/p2p-action-udhcp.sh | 69 + wpa_supplicant/examples/p2p-action.sh | 83 + wpa_supplicant/examples/udhcpd-p2p.conf | 120 + wpa_supplicant/examples/wps-ap-cli | 78 + wpa_supplicant/gas_query.c | 481 ++ wpa_supplicant/gas_query.h | 61 + wpa_supplicant/ibss_rsn.c | 100 +- wpa_supplicant/ibss_rsn.h | 1 + wpa_supplicant/interworking.c | 1138 ++++ wpa_supplicant/interworking.h | 31 + wpa_supplicant/main.c | 11 +- wpa_supplicant/mlme.c | 3198 ------------ wpa_supplicant/mlme.h | 129 - wpa_supplicant/notify.c | 271 +- wpa_supplicant/notify.h | 49 + wpa_supplicant/offchannel.c | 314 ++ wpa_supplicant/offchannel.h | 39 + wpa_supplicant/p2p_supplicant.c | 4259 +++++++++++++++ wpa_supplicant/p2p_supplicant.h | 135 + wpa_supplicant/scan.c | 807 ++- wpa_supplicant/scan.h | 7 +- wpa_supplicant/sme.c | 463 +- wpa_supplicant/sme.h | 28 + wpa_supplicant/symbian/wpa_supplicant.mmp | 2 +- .../systemd/wpa_supplicant-nl80211@.service.in | 13 + .../systemd/wpa_supplicant-wired@.service.in | 13 + wpa_supplicant/systemd/wpa_supplicant.service.in | 11 + wpa_supplicant/systemd/wpa_supplicant@.service.in | 13 + wpa_supplicant/vs2005/eapol_test/eapol_test.vcproj | 469 ++ wpa_supplicant/vs2005/wpa_cli/wpa_cli.vcproj | 215 + .../vs2005/wpa_passphrase/wpa_passphrase.vcproj | 232 + .../vs2005/wpa_supplicant/wpa_supplicant.vcproj | 457 ++ wpa_supplicant/vs2005/wpasvc/wpasvc.vcproj | 4 + wpa_supplicant/win_example.reg | 0 wpa_supplicant/wpa_cli.c | 2129 ++++++-- wpa_supplicant/wpa_gui-qt4/.gitignore | 6 - wpa_supplicant/wpa_gui-qt4/icons.qrc | 2 + wpa_supplicant/wpa_gui-qt4/icons/Makefile | 23 + wpa_supplicant/wpa_gui-qt4/icons/README | 35 + wpa_supplicant/wpa_gui-qt4/icons/group.svg | 616 +++ wpa_supplicant/wpa_gui-qt4/icons/invitation.svg | 374 ++ wpa_supplicant/wpa_gui-qt4/icons_png.qrc | 2 + wpa_supplicant/wpa_gui-qt4/lang/.gitignore | 1 - wpa_supplicant/wpa_gui-qt4/peers.cpp | 953 +++- wpa_supplicant/wpa_gui-qt4/peers.h | 28 +- wpa_supplicant/wpa_gui-qt4/scanresults.cpp | 4 +- wpa_supplicant/wpa_gui-qt4/signalbar.cpp | 64 + wpa_supplicant/wpa_gui-qt4/signalbar.h | 34 + wpa_supplicant/wpa_gui-qt4/wpa_gui.pro | 2 + wpa_supplicant/wpa_gui-qt4/wpagui.cpp | 20 +- wpa_supplicant/wpa_gui/.gitignore | 5 - wpa_supplicant/wpa_gui/eventhistory.ui | 125 - wpa_supplicant/wpa_gui/eventhistory.ui.h | 41 - wpa_supplicant/wpa_gui/main.cpp | 30 - wpa_supplicant/wpa_gui/networkconfig.ui | 475 -- wpa_supplicant/wpa_gui/networkconfig.ui.h | 552 -- wpa_supplicant/wpa_gui/scanresults.ui | 179 - wpa_supplicant/wpa_gui/scanresults.ui.h | 101 - wpa_supplicant/wpa_gui/setup-mingw-cross-compiling | 11 - wpa_supplicant/wpa_gui/userdatarequest.ui | 163 - wpa_supplicant/wpa_gui/userdatarequest.ui.h | 72 - wpa_supplicant/wpa_gui/wpa_gui.pro | 50 - wpa_supplicant/wpa_gui/wpagui.ui | 471 -- wpa_supplicant/wpa_gui/wpagui.ui.h | 730 --- wpa_supplicant/wpa_gui/wpamsg.h | 34 - wpa_supplicant/wpa_priv.c | 4 +- wpa_supplicant/wpa_supplicant.c | 1228 +++-- wpa_supplicant/wpa_supplicant.conf | 39 +- wpa_supplicant/wpa_supplicant_i.h | 308 +- wpa_supplicant/wpas_glue.c | 227 +- wpa_supplicant/wpas_glue.h | 8 + wpa_supplicant/wps_supplicant.c | 634 ++- wpa_supplicant/wps_supplicant.h | 18 +- .../xcode/wpa_supplicant.xcodeproj/project.pbxproj | 513 -- 539 files changed, 103525 insertions(+), 25018 deletions(-) create mode 100644 CONTRIBUTIONS create mode 100755 build_nsis.sh create mode 100755 build_release create mode 100644 configurations/tizen.config rename debian/slp.config => configurations/tizen_hostapd.config (71%) delete mode 100644 debian/wpa_supplicant.conf create mode 100644 doc/Makefile create mode 100644 doc/code_structure.doxygen create mode 100644 doc/ctrl_iface.doxygen create mode 100644 doc/dbus.doxygen create mode 100644 doc/directories.doxygen create mode 100644 doc/doxygen.conf create mode 100644 doc/driver_wrapper.doxygen create mode 100644 doc/eap.doxygen create mode 100644 doc/eap_server.doxygen create mode 100644 doc/hostapd.fig create mode 100644 doc/hostapd_ctrl_iface.doxygen create mode 100644 doc/mainpage.doxygen create mode 100644 doc/porting.doxygen create mode 100644 doc/testing_tools.doxygen create mode 100644 doc/wpa_supplicant.fig create mode 100644 eap_example/Makefile create mode 100644 eap_example/README create mode 100644 eap_example/ca.pem create mode 100644 eap_example/eap_example.c create mode 100644 eap_example/eap_example_peer.c create mode 100644 eap_example/eap_example_server.c create mode 100644 eap_example/server-key.pem create mode 100644 eap_example/server.key create mode 100644 eap_example/server.pem create mode 100755 etc/rc.d/init.d/wpa_supplicant create mode 100644 hostapd/Android.mk create mode 100644 hostapd/ChangeLog create mode 100644 hostapd/Makefile create mode 100644 hostapd/README create mode 100644 hostapd/README-WPS create mode 100644 hostapd/config_file.c create mode 100644 hostapd/config_file.h create mode 100644 hostapd/ctrl_iface.c create mode 100644 hostapd/ctrl_iface.h create mode 100644 hostapd/defconfig create mode 100644 hostapd/dump_state.c create mode 100644 hostapd/dump_state.h create mode 100644 hostapd/eap_register.c create mode 100644 hostapd/eap_register.h create mode 100644 hostapd/eap_testing.txt create mode 100644 hostapd/hlr_auc_gw.c create mode 100644 hostapd/hlr_auc_gw.milenage_db create mode 100644 hostapd/hostapd.8 create mode 100644 hostapd/hostapd.accept create mode 100644 hostapd/hostapd.conf create mode 100644 hostapd/hostapd.deny create mode 100644 hostapd/hostapd.eap_user create mode 100644 hostapd/hostapd.radius_clients create mode 100644 hostapd/hostapd.sim_db create mode 100644 hostapd/hostapd.vlan create mode 100644 hostapd/hostapd.wpa_psk create mode 100644 hostapd/hostapd_cli.1 create mode 100644 hostapd/hostapd_cli.c create mode 100644 hostapd/logwatch/README create mode 100755 hostapd/logwatch/hostapd create mode 100644 hostapd/logwatch/hostapd.conf create mode 100644 hostapd/main.c create mode 100644 hostapd/nt_password_hash.c create mode 100644 hostapd/wired.conf create mode 100644 mac80211_hwsim/tests/0001-wpa2-psk/hostapd.conf create mode 100644 mac80211_hwsim/tests/0001-wpa2-psk/test.txt create mode 100644 mac80211_hwsim/tests/0001-wpa2-psk/wpa_supplicant.conf create mode 100644 mac80211_hwsim/tests/0002-vlan/hostapd.accept create mode 100644 mac80211_hwsim/tests/0002-vlan/hostapd.conf create mode 100644 mac80211_hwsim/tests/0002-vlan/hostapd.vlan create mode 100644 mac80211_hwsim/tests/0002-vlan/test.txt create mode 100644 mac80211_hwsim/tools/Makefile create mode 100644 mac80211_hwsim/tools/hwsim_test.c create mode 100644 packaging/wpasupplicant.spec create mode 100644 radius_example/Makefile create mode 100644 radius_example/README create mode 100644 radius_example/radius_example.c create mode 100644 src/ap/ieee802_11_shared.c create mode 100644 src/ap/p2p_hostapd.c create mode 100644 src/ap/p2p_hostapd.h create mode 100644 src/common/gas.c create mode 100644 src/common/gas.h delete mode 100644 src/crypto/.gitignore create mode 100644 src/crypto/random.c create mode 100644 src/crypto/random.h create mode 100644 src/crypto/sha256-tlsprf.c create mode 100644 src/crypto/sha256_i.h delete mode 100644 src/drivers/.gitignore delete mode 100644 src/drivers/Apple80211.h delete mode 100644 src/drivers/MobileApple80211.c delete mode 100644 src/drivers/MobileApple80211.h create mode 100644 src/drivers/android_drv.h delete mode 100644 src/drivers/driver_atmel.c delete mode 100644 src/drivers/driver_broadcom.c create mode 100644 src/drivers/driver_common.c delete mode 100644 src/drivers/driver_iphone.m delete mode 100644 src/drivers/driver_ipw.c delete mode 100644 src/drivers/driver_ndiswrapper.c delete mode 100644 src/drivers/driver_osx.m delete mode 100644 src/drivers/driver_ralink.c delete mode 100644 src/drivers/driver_ralink.h create mode 100644 src/drivers/drivers.mk create mode 100644 src/drivers/linux_wext.h create mode 100644 src/drivers/rfkill.c create mode 100644 src/drivers/rfkill.h delete mode 100644 src/drivers/wireless_copy.h create mode 100644 src/eap_common/eap_pwd_common.c create mode 100644 src/eap_common/eap_pwd_common.h create mode 100644 src/eap_peer/eap_pwd.c create mode 100644 src/eap_server/eap_server_pwd.c create mode 100644 src/p2p/Makefile create mode 100644 src/p2p/p2p.c create mode 100644 src/p2p/p2p.h create mode 100644 src/p2p/p2p_build.c create mode 100644 src/p2p/p2p_dev_disc.c create mode 100644 src/p2p/p2p_go_neg.c create mode 100644 src/p2p/p2p_group.c create mode 100644 src/p2p/p2p_i.h create mode 100644 src/p2p/p2p_invitation.c create mode 100644 src/p2p/p2p_parse.c create mode 100644 src/p2p/p2p_pd.c create mode 100644 src/p2p/p2p_sd.c create mode 100644 src/p2p/p2p_utils.c delete mode 100644 src/radius/.gitignore create mode 100644 src/rsn_supp/tdls.c delete mode 100644 src/tls/.gitignore delete mode 100644 src/utils/.gitignore create mode 100644 src/utils/edit.c create mode 100644 src/utils/edit.h create mode 100644 src/utils/edit_readline.c create mode 100644 src/utils/edit_simple.c create mode 100644 src/wps/wps_validate.c create mode 100644 tests/Makefile create mode 100644 tests/test-aes.c create mode 100644 tests/test-asn1.c create mode 100644 tests/test-base64.c create mode 100644 tests/test-https.c create mode 100644 tests/test-list.c create mode 100644 tests/test-md4.c create mode 100644 tests/test-md5.c create mode 100644 tests/test-milenage.c create mode 100644 tests/test-ms_funcs.c create mode 100644 tests/test-rc4.c create mode 100644 tests/test-sha1.c create mode 100644 tests/test-sha256.c create mode 100644 tests/test-x509.c create mode 100644 tests/test-x509v3.c create mode 100755 tests/test_x509v3_nist.sh create mode 100755 tests/test_x509v3_nist2.sh create mode 100644 wlantest/Makefile create mode 100644 wlantest/bss.c create mode 100644 wlantest/ccmp.c create mode 100644 wlantest/crc32.c create mode 100644 wlantest/ctrl.c create mode 100644 wlantest/inject.c create mode 100644 wlantest/monitor.c create mode 100644 wlantest/process.c create mode 100644 wlantest/readpcap.c create mode 100644 wlantest/rx_data.c create mode 100644 wlantest/rx_eapol.c create mode 100644 wlantest/rx_ip.c create mode 100644 wlantest/rx_mgmt.c create mode 100644 wlantest/rx_tdls.c create mode 100644 wlantest/sta.c create mode 100644 wlantest/tkip.c create mode 100644 wlantest/wep.c create mode 100644 wlantest/wired.c create mode 100644 wlantest/wlantest.c create mode 100644 wlantest/wlantest.h create mode 100644 wlantest/wlantest_cli.c create mode 100644 wlantest/wlantest_ctrl.h create mode 100644 wlantest/writepcap.c delete mode 100644 wpa_supplicant/.gitignore create mode 100644 wpa_supplicant/Android.mk create mode 100644 wpa_supplicant/README-P2P create mode 100644 wpa_supplicant/bgscan_learn.c delete mode 100644 wpa_supplicant/dbus/.gitignore create mode 100644 wpa_supplicant/dbus/dbus_new_handlers_p2p.c create mode 100644 wpa_supplicant/dbus/dbus_new_handlers_p2p.h delete mode 100644 wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service create mode 100644 wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in delete mode 100644 wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service create mode 100644 wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in delete mode 100644 wpa_supplicant/doc/docbook/.gitignore create mode 100755 wpa_supplicant/examples/p2p-action-udhcp.sh create mode 100755 wpa_supplicant/examples/p2p-action.sh create mode 100644 wpa_supplicant/examples/udhcpd-p2p.conf create mode 100755 wpa_supplicant/examples/wps-ap-cli create mode 100644 wpa_supplicant/gas_query.c create mode 100644 wpa_supplicant/gas_query.h create mode 100644 wpa_supplicant/interworking.c create mode 100644 wpa_supplicant/interworking.h delete mode 100644 wpa_supplicant/mlme.c delete mode 100644 wpa_supplicant/mlme.h create mode 100644 wpa_supplicant/offchannel.c create mode 100644 wpa_supplicant/offchannel.h create mode 100644 wpa_supplicant/p2p_supplicant.c create mode 100644 wpa_supplicant/p2p_supplicant.h create mode 100644 wpa_supplicant/systemd/wpa_supplicant-nl80211@.service.in create mode 100644 wpa_supplicant/systemd/wpa_supplicant-wired@.service.in create mode 100644 wpa_supplicant/systemd/wpa_supplicant.service.in create mode 100644 wpa_supplicant/systemd/wpa_supplicant@.service.in create mode 100755 wpa_supplicant/vs2005/eapol_test/eapol_test.vcproj create mode 100755 wpa_supplicant/vs2005/wpa_cli/wpa_cli.vcproj create mode 100755 wpa_supplicant/vs2005/wpa_passphrase/wpa_passphrase.vcproj create mode 100755 wpa_supplicant/vs2005/wpa_supplicant/wpa_supplicant.vcproj mode change 100644 => 100755 wpa_supplicant/win_example.reg delete mode 100644 wpa_supplicant/wpa_gui-qt4/.gitignore create mode 100644 wpa_supplicant/wpa_gui-qt4/icons/Makefile create mode 100644 wpa_supplicant/wpa_gui-qt4/icons/group.svg create mode 100644 wpa_supplicant/wpa_gui-qt4/icons/invitation.svg delete mode 100644 wpa_supplicant/wpa_gui-qt4/lang/.gitignore create mode 100644 wpa_supplicant/wpa_gui-qt4/signalbar.cpp create mode 100644 wpa_supplicant/wpa_gui-qt4/signalbar.h delete mode 100644 wpa_supplicant/wpa_gui/.gitignore delete mode 100644 wpa_supplicant/wpa_gui/eventhistory.ui delete mode 100644 wpa_supplicant/wpa_gui/eventhistory.ui.h delete mode 100644 wpa_supplicant/wpa_gui/main.cpp delete mode 100644 wpa_supplicant/wpa_gui/networkconfig.ui delete mode 100644 wpa_supplicant/wpa_gui/networkconfig.ui.h delete mode 100644 wpa_supplicant/wpa_gui/scanresults.ui delete mode 100644 wpa_supplicant/wpa_gui/scanresults.ui.h delete mode 100755 wpa_supplicant/wpa_gui/setup-mingw-cross-compiling delete mode 100644 wpa_supplicant/wpa_gui/userdatarequest.ui delete mode 100644 wpa_supplicant/wpa_gui/userdatarequest.ui.h delete mode 100644 wpa_supplicant/wpa_gui/wpa_gui.pro delete mode 100644 wpa_supplicant/wpa_gui/wpagui.ui delete mode 100644 wpa_supplicant/wpa_gui/wpagui.ui.h delete mode 100644 wpa_supplicant/wpa_gui/wpamsg.h delete mode 100644 wpa_supplicant/xcode/wpa_supplicant.xcodeproj/project.pbxproj diff --git a/CONTRIBUTIONS b/CONTRIBUTIONS new file mode 100644 index 0000000..7670769 --- /dev/null +++ b/CONTRIBUTIONS @@ -0,0 +1,103 @@ +Contributions to hostap.git +--------------------------- + +This software is distributed under a permissive open source license to +allow it to be used in any projects, whether open source or proprietary. +Contributions to the project are welcome and it is important to maintain +clear record of contributions and terms under which they are licensed. +To help with this, following procedure is used to allow acceptance and +recording of the terms. + +These terms are similar to the process used in Linux kernel development. +The items (a) through (d) are identical to the Developer's Certificate +of Origin 1.1. To enable cleaner licensing option to be provided in the +future, an additional item (e) is included. + +In case of most files in hostap.git, "under the open source license +indicated in the file" means that the contribution is licensed both +under GPL v2 and modified BSD license (see below) and the choice between +these licenses is given to anyone who redistributes or uses the +software. As such, the contribution has to be licensed under both +options to allow this choice. + +The additional item (e) is used to collect explicit approval to license +the contribution with only the modified BSD license (see below), i.e., +without the GPL v2 option. This is done to allow simpler licensing terms +to be used in the future. It should be noted that the modified BSD +license is compatible with GNU GPL and as such, this possible move to +simpler licensing option does not prevent use of this software in +GPL projects. + + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +Additionally, I certify that: + +(e) The contribution can be licensed under the modified BSD license + as shown below even in case of files that are currently licensed + under other terms. + + +To indicate your acceptance of these terms, please add the following +line to each contribution you make to the project: + +Signed-hostap: Your Name + +using your real name. Pseudonyms or anonymous contributions cannot +unfortunately be accepted. + + + +Modified BSD license (no advertisement clause): + +Copyright (c) 2002-2011, Jouni Malinen and contributors +All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name(s) of the above-listed copyright holder(s) nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README b/README index 9c6be85..186e4b9 100644 --- a/README +++ b/README @@ -1,19 +1,75 @@ -wpa_supplicant and hostapd v0.6.x ---------------------------------- +wpa_supplicant and hostapd +-------------------------- -Copyright (c) 2002-2007, Jouni Malinen and contributors +Copyright (c) 2002-2011, Jouni Malinen and contributors All Rights Reserved. -These program is dual-licensed under both the GPL version 2 and BSD -license. Either license may be used at your option. +These programs are dual-licensed under both the GPL version 2 and BSD +license (the one with advertisement clause removed). Either license +may be used at your option. + +If you are submitting changes to the project, please see CONTRIBUTIONS +file for more instructions. This package may include either wpa_supplicant, hostapd, or both. See README file respective subdirectories (wpa_supplicant/README or hostapd/README) for more details. -Source code files have been moved around in v0.6.x releases and -compared to earlier releases, the programs are now build by first -going to a subdirectory (wpa_supplicant or hostapd) and creating -build configuration (.config) and running 'make' there (for -Linux/BSD/cygwin builds). +Source code files were moved around in v0.6.x releases and compared to +earlier releases, the programs are now built by first going to a +subdirectory (wpa_supplicant or hostapd) and creating build +configuration (.config) and running 'make' there (for Linux/BSD/cygwin +builds). + + +License +------- + +GPL v2: + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License version 2 as +published by the Free Software Foundation. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +(this copy of the license is in COPYING file) + + +Alternatively, this software may be distributed, used, and modified +under the terms of BSD license: + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name(s) of the above-listed copyright holder(s) nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/build_nsis.sh b/build_nsis.sh new file mode 100755 index 0000000..e41bc36 --- /dev/null +++ b/build_nsis.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +if [ -d nsis.in ]; then + /bin/rm -r nsis.in +fi + +unzip -j -d nsis.in $1 +VER=`echo $1 | sed "s/.*wpa_supplicant-windows-bin-\(.*\).zip/\1/"` + +cat wpa_supplicant/wpa_supplicant.nsi | + sed "s/@WPAVER@/$VER/g" \ + > nsis.in/wpa_supplicant.nsi + +makensis nsis.in/wpa_supplicant.nsi + +/bin/rm -r nsis.in diff --git a/build_release b/build_release new file mode 100755 index 0000000..22dcd42 --- /dev/null +++ b/build_release @@ -0,0 +1,148 @@ +#!/bin/sh + +WINLOCAL=/home/jm/H-win/local + +set -e + +if [ -z "$1" ]; then + echo "build_release [nobin]" + exit 1 +fi + +TMP=tmp.build_release +RELDIR=`pwd`/Release +VER=$1 +NOW=`date +%Y-%m-%d` + +echo "Version: $VER - $NOW" + +DATEw=`head -n 3 wpa_supplicant/ChangeLog | tail -n 1 | sed "s/ .*//"` +DATEh=`head -n 3 hostapd/ChangeLog | tail -n 1 | sed "s/ .*//"` + +if [ "$DATEw" != "$NOW" -o "$DATEh" != "$NOW" ]; then + echo "NOTE! Date mismatch in ChangeLog: wpa_supplicant $DATEw hostapd $DATEh != $NOW" +fi + +if [ -r $TMP ]; then + echo "Temporary directory '$TMP' exists. Remove it before running this." + exit 1 +fi + +mkdir $TMP +mkdir -p $RELDIR + +git archive --format=tar --prefix=wpa-$VER/ HEAD \ + README COPYING patches src wpa_supplicant hostapd | + gzip > $RELDIR/wpa-$VER.tar.gz +git archive --format=tar --prefix=hostapd-$VER/ HEAD \ + README COPYING patches src hostapd | + gzip > $RELDIR/hostapd-$VER.tar.gz +git archive --format=tar --prefix=wpa_supplicant-$VER/ HEAD \ + README COPYING patches src wpa_supplicant | + tar --directory=$TMP -xf - + +cd $TMP +make -C wpa_supplicant-$VER/wpa_supplicant/doc/docbook man +rm -f wpa_supplicant-$VER/wpa_supplicant/doc/docbook/manpage.{links,refs} +tar czf $RELDIR/wpa_supplicant-$VER.tar.gz wpa_supplicant-$VER +cd .. +rm -r $TMP + +if [ "$2" = "nobin" ]; then + exit 0 +fi + + +cd $RELDIR + + PDIR=wpa_supplicant-$VER + WDIR=wpa_supplicant-windows-bin-$VER + tar xzf $PDIR.tar.gz + mkdir "$WDIR" + cd "$PDIR/wpa_supplicant" + cat > .config <> .config < ../../"$WDIR"/$i + done + for i in README README-Windows.txt wpa_supplicant.conf; do + unix2dos < $i > ../../"$WDIR"/$i + done + mv *.exe ../../"$WDIR" + cp win_example.reg ../../"$WDIR" + + cd wpa_gui-qt4 + make -C icons + qmake -spec win32-x-g++ + make -j2 + cp release/wpa_gui.exe ../../../"$WDIR" + lrelease wpa_gui.pro + cp lang/wpa_gui_de.qm ../../../"$WDIR" + cd ../../.. + rm -rf "$PDIR" + zip "$WDIR.zip" "$WDIR"/* + rm -rf "$WDIR" + +cd $RELDIR/.. + +./build_nsis.sh "$RELDIR/$WDIR.zip" +mv wpa_supplicant-$VER.exe $RELDIR + +ls -l $RELDIR/*$VER* + +exit 0 diff --git a/configurations/tizen.config b/configurations/tizen.config new file mode 100644 index 0000000..27142c3 --- /dev/null +++ b/configurations/tizen.config @@ -0,0 +1,475 @@ +# Example wpa_supplicant build time configuration +# +# This file lists the configuration options that are used when building the +# hostapd binary. All lines starting with # are ignored. Configuration option +# lines must be commented out complete, if they are not to be included, i.e., +# just setting VARIABLE=n is not disabling that variable. +# +# This file is included in Makefile, so variables like CFLAGS and LIBS can also +# be modified from here. In most cases, these lines should use += in order not +# to override previous values of the variables. + + +# Uncomment following two lines and fix the paths if you have installed OpenSSL +# or GnuTLS in non-default location +#CFLAGS += -I/usr/local/openssl/include +#LIBS += -L/usr/local/openssl/lib + +# Some Red Hat versions seem to include kerberos header files from OpenSSL, but +# the kerberos files are not in the default include path. Following line can be +# used to fix build issues on such systems (krb5.h not found). +#CFLAGS += -I/usr/include/kerberos + +# Example configuration for various cross-compilation platforms + +#### sveasoft (e.g., for Linksys WRT54G) ###################################### +#CC=mipsel-uclibc-gcc +#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc +#CFLAGS += -Os +#CPPFLAGS += -I../src/include -I../../src/router/openssl/include +#LIBS += -L/opt/brcm/hndtools-mipsel-uclibc-0.9.19/lib -lssl +############################################################################### + +#### openwrt (e.g., for Linksys WRT54G) ####################################### +#CC=mipsel-uclibc-gcc +#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc +#CFLAGS += -Os +#CPPFLAGS=-I../src/include -I../openssl-0.9.7d/include \ +# -I../WRT54GS/release/src/include +#LIBS = -lssl +############################################################################### + + +# Driver interface for Host AP driver +CONFIG_DRIVER_HOSTAP=y + +# Driver interface for Agere driver +#CONFIG_DRIVER_HERMES=y +# Change include directories to match with the local setup +#CFLAGS += -I../../hcf -I../../include -I../../include/hcf +#CFLAGS += -I../../include/wireless + +# Driver interface for madwifi driver +# Deprecated; use CONFIG_DRIVER_WEXT=y instead. +#CONFIG_DRIVER_MADWIFI=y +# Set include directory to the madwifi source tree +#CFLAGS += -I../../madwifi + +# Driver interface for ndiswrapper +# Deprecated; use CONFIG_DRIVER_WEXT=y instead. +#CONFIG_DRIVER_NDISWRAPPER=y + +# Driver interface for Atmel driver +#CONFIG_DRIVER_ATMEL=y + +# Driver interface for old Broadcom driver +# Please note that the newer Broadcom driver ("hybrid Linux driver") supports +# Linux wireless extensions and does not need (or even work) with the old +# driver wrapper. Use CONFIG_DRIVER_WEXT=y with that driver. +#CONFIG_DRIVER_BROADCOM=y +# Example path for wlioctl.h; change to match your configuration +#CFLAGS += -I/opt/WRT54GS/release/src/include + +# Driver interface for Intel ipw2100/2200 driver +# Deprecated; use CONFIG_DRIVER_WEXT=y instead. +#CONFIG_DRIVER_IPW=y + +# Driver interface for Ralink driver +#CONFIG_DRIVER_RALINK=y + +# Driver interface for generic Linux wireless extensions +# Note: WEXT is deprecated in the current Linux kernel version and no new +# functionality is added to it. nl80211-based interface is the new +# replacement for WEXT and its use allows wpa_supplicant to properly control +# the driver to improve existing functionality like roaming and to support new +# functionality. +CONFIG_DRIVER_WEXT=y + +# Driver interface for Linux drivers using the nl80211 kernel interface +CONFIG_DRIVER_NL80211=y + +# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) +#CONFIG_DRIVER_BSD=y +#CFLAGS += -I/usr/local/include +#LIBS += -L/usr/local/lib +#LIBS_p += -L/usr/local/lib +#LIBS_c += -L/usr/local/lib + +# Driver interface for Windows NDIS +#CONFIG_DRIVER_NDIS=y +#CFLAGS += -I/usr/include/w32api/ddk +#LIBS += -L/usr/local/lib +# For native build using mingw +#CONFIG_NATIVE_WINDOWS=y +# Additional directories for cross-compilation on Linux host for mingw target +#CFLAGS += -I/opt/mingw/mingw32/include/ddk +#LIBS += -L/opt/mingw/mingw32/lib +#CC=mingw32-gcc +# By default, driver_ndis uses WinPcap for low-level operations. This can be +# replaced with the following option which replaces WinPcap calls with NDISUIO. +# However, this requires that WZC is disabled (net stop wzcsvc) before starting +# wpa_supplicant. +# CONFIG_USE_NDISUIO=y + +# Driver interface for development testing +#CONFIG_DRIVER_TEST=y + +# Driver interface for wired Ethernet drivers +#CONFIG_DRIVER_WIRED=y + +# Driver interface for the Broadcom RoboSwitch family +#CONFIG_DRIVER_ROBOSWITCH=y + +# Driver interface for no driver (e.g., WPS ER only) +#CONFIG_DRIVER_NONE=y + +# Solaris libraries +#LIBS += -lsocket -ldlpi -lnsl +#LIBS_c += -lsocket + +# Enable IEEE 802.1X Supplicant (automatically included if any EAP method is +# included) +CONFIG_IEEE8021X_EAPOL=y + +# EAP-MD5 +CONFIG_EAP_MD5=y + +# EAP-MSCHAPv2 +CONFIG_EAP_MSCHAPV2=y + +# EAP-TLS +CONFIG_EAP_TLS=y + +# EAL-PEAP +CONFIG_EAP_PEAP=y + +# EAP-TTLS +CONFIG_EAP_TTLS=y + +# EAP-FAST +# Note: Default OpenSSL package does not include support for all the +# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL, +# the OpenSSL library must be patched (openssl-0.9.8d-tls-extensions.patch) +# to add the needed functions. +#CONFIG_EAP_FAST=y + +# EAP-GTC +CONFIG_EAP_GTC=y + +# EAP-OTP +CONFIG_EAP_OTP=y + +# EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used) +#CONFIG_EAP_SIM=y + +# EAP-PSK (experimental; this is _not_ needed for WPA-PSK) +#CONFIG_EAP_PSK=y + +# EAP-PAX +#CONFIG_EAP_PAX=y + +# LEAP +CONFIG_EAP_LEAP=y + +# EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used) +#CONFIG_EAP_AKA=y + +# EAP-AKA' (enable CONFIG_PCSC, if EAP-AKA' is used). +# This requires CONFIG_EAP_AKA to be enabled, too. +#CONFIG_EAP_AKA_PRIME=y + +# Enable USIM simulator (Milenage) for EAP-AKA +#CONFIG_USIM_SIMULATOR=y + +# EAP-SAKE +#CONFIG_EAP_SAKE=y + +# EAP-GPSK +#CONFIG_EAP_GPSK=y +# Include support for optional SHA256 cipher suite in EAP-GPSK +#CONFIG_EAP_GPSK_SHA256=y + +# EAP-TNC and related Trusted Network Connect support (experimental) +#CONFIG_EAP_TNC=y + +# Wi-Fi Protected Setup (WPS) +CONFIG_WPS=y +# Enable WSC 2.0 support +CONFIG_WPS2=y +# Enable WPS external registrar functionality +#CONFIG_WPS_ER=y +# Disable credentials for an open network by default when acting as a WPS +# registrar. +#CONFIG_WPS_REG_DISABLE_OPEN=y + +# EAP-IKEv2 +#CONFIG_EAP_IKEV2=y + +# PKCS#12 (PFX) support (used to read private key and certificate file from +# a file that usually has extension .p12 or .pfx) +CONFIG_PKCS12=y + +# Smartcard support (i.e., private key on a smartcard), e.g., with openssl +# engine. +CONFIG_SMARTCARD=y + +# PC/SC interface for smartcards (USIM, GSM SIM) +# Enable this if EAP-SIM or EAP-AKA is included +#CONFIG_PCSC=y + +# Development testing +#CONFIG_EAPOL_TEST=y + +# Select control interface backend for external programs, e.g, wpa_cli: +# unix = UNIX domain sockets (default for Linux/*BSD) +# udp = UDP sockets using localhost (127.0.0.1) +# named_pipe = Windows Named Pipe (default for Windows) +# y = use default (backwards compatibility) +# If this option is commented out, control interface is not included in the +# build. +CONFIG_CTRL_IFACE=unix + +# Include support for GNU Readline and History Libraries in wpa_cli. +# When building a wpa_cli binary for distribution, please note that these +# libraries are licensed under GPL and as such, BSD license may not apply for +# the resulting binary. +#CONFIG_READLINE=y + +# Include internal line edit mode in wpa_cli. This can be used as a replacement +# for GNU Readline to provide limited command line editing and history support. +#CONFIG_WPA_CLI_EDIT=y + +# Remove debugging code that is printing out debug message to stdout. +# This can be used to reduce the size of the wpa_supplicant considerably +# if debugging code is not needed. The size reduction can be around 35% +# (e.g., 90 kB). +#CONFIG_NO_STDOUT_DEBUG=y + +# Remove WPA support, e.g., for wired-only IEEE 802.1X supplicant, to save +# 35-50 kB in code size. +#CONFIG_NO_WPA=y + +# Remove WPA2 support. This allows WPA to be used, but removes WPA2 code to +# save about 1 kB in code size when building only WPA-Personal (no EAP support) +# or 6 kB if building for WPA-Enterprise. +#CONFIG_NO_WPA2=y + +# Remove IEEE 802.11i/WPA-Personal ASCII passphrase support +# This option can be used to reduce code size by removing support for +# converting ASCII passphrases into PSK. If this functionality is removed, the +# PSK can only be configured as the 64-octet hexstring (e.g., from +# wpa_passphrase). This saves about 0.5 kB in code size. +#CONFIG_NO_WPA_PASSPHRASE=y + +# Disable scan result processing (ap_mode=1) to save code size by about 1 kB. +# This can be used if ap_scan=1 mode is never enabled. +#CONFIG_NO_SCAN_PROCESSING=y + +# Select configuration backend: +# file = text file (e.g., wpa_supplicant.conf; note: the configuration file +# path is given on command line, not here; this option is just used to +# select the backend that allows configuration files to be used) +# winreg = Windows registry (see win_example.reg for an example) +CONFIG_BACKEND=file + +# Remove configuration write functionality (i.e., to allow the configuration +# file to be updated based on runtime configuration changes). The runtime +# configuration can still be changed, the changes are just not going to be +# persistent over restarts. This option can be used to reduce code size by +# about 3.5 kB. +#CONFIG_NO_CONFIG_WRITE=y + +# Remove support for configuration blobs to reduce code size by about 1.5 kB. +#CONFIG_NO_CONFIG_BLOBS=y + +# Select program entry point implementation: +# main = UNIX/POSIX like main() function (default) +# main_winsvc = Windows service (read parameters from registry) +# main_none = Very basic example (development use only) +CONFIG_MAIN=main + +# Select wrapper for operatins system and C library specific functions +# unix = UNIX/POSIX like systems (default) +# win32 = Windows systems +# none = Empty template +CONFIG_OS=unix + +# Select event loop implementation +# eloop = select() loop (default) +# eloop_win = Windows events and WaitForMultipleObject() loop +# eloop_none = Empty template +CONFIG_ELOOP=eloop + +# Select layer 2 packet implementation +# linux = Linux packet socket (default) +# pcap = libpcap/libdnet/WinPcap +# freebsd = FreeBSD libpcap +# winpcap = WinPcap with receive thread +# ndis = Windows NDISUIO (note: requires CONFIG_USE_NDISUIO=y) +# none = Empty template +CONFIG_L2_PACKET=linux + +# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) +CONFIG_PEERKEY=y + +# IEEE 802.11w (management frame protection) +# This version is an experimental implementation based on IEEE 802.11w/D1.0 +# draft and is subject to change since the standard has not yet been finalized. +# Driver support is also needed for IEEE 802.11w. +#CONFIG_IEEE80211W=y + +# Select TLS implementation +# openssl = OpenSSL (default) +# gnutls = GnuTLS +# internal = Internal TLSv1 implementation (experimental) +# none = Empty template +CONFIG_TLS=openssl + +# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1) +# can be enabled to get a stronger construction of messages when block ciphers +# are used. It should be noted that some existing TLS v1.0 -based +# implementation may not be compatible with TLS v1.1 message (ClientHello is +# sent prior to negotiating which version will be used) +#CONFIG_TLSV11=y + +# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2) +# can be enabled to enable use of stronger crypto algorithms. It should be +# noted that some existing TLS v1.0 -based implementation may not be compatible +# with TLS v1.2 message (ClientHello is sent prior to negotiating which version +# will be used) +#CONFIG_TLSV12=y + +# If CONFIG_TLS=internal is used, additional library and include paths are +# needed for LibTomMath. Alternatively, an integrated, minimal version of +# LibTomMath can be used. See beginning of libtommath.c for details on benefits +# and drawbacks of this option. +#CONFIG_INTERNAL_LIBTOMMATH=y +#ifndef CONFIG_INTERNAL_LIBTOMMATH +#LTM_PATH=/usr/src/libtommath-0.39 +#CFLAGS += -I$(LTM_PATH) +#LIBS += -L$(LTM_PATH) +#LIBS_p += -L$(LTM_PATH) +#endif +# At the cost of about 4 kB of additional binary size, the internal LibTomMath +# can be configured to include faster routines for exptmod, sqr, and div to +# speed up DH and RSA calculation considerably +#CONFIG_INTERNAL_LIBTOMMATH_FAST=y + +# Include NDIS event processing through WMI into wpa_supplicant/wpasvc. +# This is only for Windows builds and requires WMI-related header files and +# WbemUuid.Lib from Platform SDK even when building with MinGW. +#CONFIG_NDIS_EVENTS_INTEGRATED=y +#PLATFORMSDKLIB="/opt/Program Files/Microsoft Platform SDK/Lib" + +# Add support for old DBus control interface +# (fi.epitest.hostap.WPASupplicant) +#CONFIG_CTRL_IFACE_DBUS=y + +# Add support for new DBus control interface +# (fi.w1.hostap.wpa_supplicant1) +CONFIG_CTRL_IFACE_DBUS_NEW=y + +# Add introspection support for new DBus control interface +CONFIG_CTRL_IFACE_DBUS_INTRO=y + +# Add support for loading EAP methods dynamically as shared libraries. +# When this option is enabled, each EAP method can be either included +# statically (CONFIG_EAP_=y) or dynamically (CONFIG_EAP_=dyn). +# Dynamic EAP methods are build as shared objects (eap_*.so) and they need to +# be loaded in the beginning of the wpa_supplicant configuration file +# (see load_dynamic_eap parameter in the example file) before being used in +# the network blocks. +# +# Note that some shared parts of EAP methods are included in the main program +# and in order to be able to use dynamic EAP methods using these parts, the +# main program must have been build with the EAP method enabled (=y or =dyn). +# This means that EAP-TLS/PEAP/TTLS/FAST cannot be added as dynamic libraries +# unless at least one of them was included in the main build to force inclusion +# of the shared code. Similarly, at least one of EAP-SIM/AKA must be included +# in the main build to be able to load these methods dynamically. +# +# Please also note that using dynamic libraries will increase the total binary +# size. Thus, it may not be the best option for targets that have limited +# amount of memory/flash. +#CONFIG_DYNAMIC_EAP_METHODS=y + +# IEEE Std 802.11r-2008 (Fast BSS Transition) +#CONFIG_IEEE80211R=y + +# Add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt) +CONFIG_DEBUG_FILE=y + +# Send debug messages to syslog instead of stdout +#CONFIG_DEBUG_SYSLOG=y +# Set syslog facility for debug messages +#CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON + +# Enable privilege separation (see README 'Privilege separation' for details) +#CONFIG_PRIVSEP=y + +# Enable mitigation against certain attacks against TKIP by delaying Michael +# MIC error reports by a random amount of time between 0 and 60 seconds +#CONFIG_DELAYED_MIC_ERROR_REPORT=y + +# Enable tracing code for developer debugging +# This tracks use of memory allocations and other registrations and reports +# incorrect use with a backtrace of call (or allocation) location. +#CONFIG_WPA_TRACE=y +# For BSD, comment out these. +#LIBS += -lexecinfo +#LIBS_p += -lexecinfo +#LIBS_c += -lexecinfo + +# Use libbfd to get more details for developer debugging +# This enables use of libbfd to get more detailed symbols for the backtraces +# generated by CONFIG_WPA_TRACE=y. +#CONFIG_WPA_TRACE_BFD=y +# For BSD, comment out these. +#LIBS += -lbfd -liberty -lz +#LIBS_p += -lbfd -liberty -lz +#LIBS_c += -lbfd -liberty -lz + +# wpa_supplicant depends on strong random number generation being available +# from the operating system. os_get_random() function is used to fetch random +# data when needed, e.g., for key generation. On Linux and BSD systems, this +# works by reading /dev/urandom. It should be noted that the OS entropy pool +# needs to be properly initialized before wpa_supplicant is started. This is +# important especially on embedded devices that do not have a hardware random +# number generator and may by default start up with minimal entropy available +# for random number generation. +# +# As a safety net, wpa_supplicant is by default trying to internally collect +# additional entropy for generating random data to mix in with the data fetched +# from the OS. This by itself is not considered to be very strong, but it may +# help in cases where the system pool is not initialized properly. However, it +# is very strongly recommended that the system pool is initialized with enough +# entropy either by using hardware assisted random number generator or by +# storing state over device reboots. +# +# wpa_supplicant can be configured to maintain its own entropy store over +# restarts to enhance random number generation. This is not perfect, but it is +# much more secure than using the same sequence of random numbers after every +# reboot. This can be enabled with -e command line option. The +# specified file needs to be readable and writable by wpa_supplicant. +# +# If the os_get_random() is known to provide strong random data (e.g., on +# Linux/BSD, the board in question is known to have reliable source of random +# data from /dev/urandom), the internal wpa_supplicant random pool can be +# disabled. This will save some in binary size and CPU use. However, this +# should only be considered for builds that are known to be used on devices +# that meet the requirements described above. +#CONFIG_NO_RANDOM_POOL=y + +# IEEE 802.11n (High Throughput) support (mainly for AP mode) +CONFIG_IEEE80211N=y + +# Interworking (IEEE 802.11u) +# This can be used to enable functionality to improve interworking with +# external networks (GAS/ANQP to learn more about the networks and network +# selection based on available credentials). +#CONFIG_INTERWORKING=y + +#Additional flags +CONFIG_LIBNL20=y +CONFIG_P2P=y +CONFIG_AP=y diff --git a/debian/slp.config b/configurations/tizen_hostapd.config similarity index 71% rename from debian/slp.config rename to configurations/tizen_hostapd.config index 0194b8d..63a8453 100644 --- a/debian/slp.config +++ b/configurations/tizen_hostapd.config @@ -55,11 +55,6 @@ CONFIG_DRIVER_HOSTAP=y # Set include directory to the madwifi source tree #CFLAGS += -I../../madwifi -# Driver interface for Prism54 driver -# (Note: Prism54 is not yet supported, i.e., this will not work as-is and is -# for developers only) -#CONFIG_DRIVER_PRISM54=y - # Driver interface for ndiswrapper # Deprecated; use CONFIG_DRIVER_WEXT=y instead. #CONFIG_DRIVER_NDISWRAPPER=y @@ -83,15 +78,23 @@ CONFIG_DRIVER_HOSTAP=y #CONFIG_DRIVER_RALINK=y # Driver interface for generic Linux wireless extensions +# Note: WEXT is deprecated in the current Linux kernel version and no new +# functionality is added to it. nl80211-based interface is the new +# replacement for WEXT and its use allows wpa_supplicant to properly control +# the driver to improve existing functionality like roaming and to support new +# functionality. CONFIG_DRIVER_WEXT=y # Driver interface for Linux drivers using the nl80211 kernel interface -#CONFIG_DRIVER_NL80211=y +CONFIG_DRIVER_NL80211=y +CONFIG_LIBNL20=y # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) #CONFIG_DRIVER_BSD=y #CFLAGS += -I/usr/local/include #LIBS += -L/usr/local/lib +#LIBS_p += -L/usr/local/lib +#LIBS_c += -L/usr/local/lib # Driver interface for Windows NDIS #CONFIG_DRIVER_NDIS=y @@ -118,6 +121,13 @@ CONFIG_DRIVER_WEXT=y # Driver interface for the Broadcom RoboSwitch family #CONFIG_DRIVER_ROBOSWITCH=y +# Driver interface for no driver (e.g., WPS ER only) +#CONFIG_DRIVER_NONE=y + +# Solaris libraries +#LIBS += -lsocket -ldlpi -lnsl +#LIBS_c += -lsocket + # Enable IEEE 802.1X Supplicant (automatically included if any EAP method is # included) CONFIG_IEEE8021X_EAPOL=y @@ -151,19 +161,19 @@ CONFIG_EAP_GTC=y CONFIG_EAP_OTP=y # EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used) -CONFIG_EAP_SIM=y +#CONFIG_EAP_SIM=y # EAP-PSK (experimental; this is _not_ needed for WPA-PSK) -CONFIG_EAP_PSK=y +#CONFIG_EAP_PSK=y # EAP-PAX -CONFIG_EAP_PAX=y +#CONFIG_EAP_PAX=y # LEAP CONFIG_EAP_LEAP=y # EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used) -CONFIG_EAP_AKA=y +#CONFIG_EAP_AKA=y # EAP-AKA' (enable CONFIG_PCSC, if EAP-AKA' is used). # This requires CONFIG_EAP_AKA to be enabled, too. @@ -185,6 +195,13 @@ CONFIG_EAP_AKA=y # Wi-Fi Protected Setup (WPS) CONFIG_WPS=y +# Enable WSC 2.0 support +CONFIG_WPS2=y +# Enable WPS external registrar functionality +#CONFIG_WPS_ER=y +# Disable credentials for an open network by default when acting as a WPS +# registrar. +#CONFIG_WPS_REG_DISABLE_OPEN=y # EAP-IKEv2 #CONFIG_EAP_IKEV2=y @@ -211,7 +228,7 @@ CONFIG_SMARTCARD=y # y = use default (backwards compatibility) # If this option is commented out, control interface is not included in the # build. -CONFIG_CTRL_IFACE=y +CONFIG_CTRL_IFACE=unix # Include support for GNU Readline and History Libraries in wpa_cli. # When building a wpa_cli binary for distribution, please note that these @@ -219,6 +236,10 @@ CONFIG_CTRL_IFACE=y # the resulting binary. #CONFIG_READLINE=y +# Include internal line edit mode in wpa_cli. This can be used as a replacement +# for GNU Readline to provide limited command line editing and history support. +#CONFIG_WPA_CLI_EDIT=y + # Remove debugging code that is printing out debug message to stdout. # This can be used to reduce the size of the wpa_supplicant considerably # if debugging code is not needed. The size reduction can be around 35% @@ -241,11 +262,6 @@ CONFIG_CTRL_IFACE=y # wpa_passphrase). This saves about 0.5 kB in code size. #CONFIG_NO_WPA_PASSPHRASE=y -# Remove AES extra functions. This can be used to reduce code size by about -# 1.5 kB by removing extra AES modes that are not needed for commonly used -# client configurations (they are needed for some EAP types). -#CONFIG_NO_AES_EXTRAS=y - # Disable scan result processing (ap_mode=1) to save code size by about 1 kB. # This can be used if ap_scan=1 mode is never enabled. #CONFIG_NO_SCAN_PROCESSING=y @@ -255,7 +271,7 @@ CONFIG_CTRL_IFACE=y # path is given on command line, not here; this option is just used to # select the backend that allows configuration files to be used) # winreg = Windows registry (see win_example.reg for an example) -#CONFIG_BACKEND=file +CONFIG_BACKEND=file # Remove configuration write functionality (i.e., to allow the configuration # file to be updated based on runtime configuration changes). The runtime @@ -271,19 +287,19 @@ CONFIG_CTRL_IFACE=y # main = UNIX/POSIX like main() function (default) # main_winsvc = Windows service (read parameters from registry) # main_none = Very basic example (development use only) -#CONFIG_MAIN=main +CONFIG_MAIN=main # Select wrapper for operatins system and C library specific functions # unix = UNIX/POSIX like systems (default) # win32 = Windows systems # none = Empty template -#CONFIG_OS=unix +CONFIG_OS=unix # Select event loop implementation # eloop = select() loop (default) # eloop_win = Windows events and WaitForMultipleObject() loop # eloop_none = Empty template -#CONFIG_ELOOP=eloop +CONFIG_ELOOP=eloop # Select layer 2 packet implementation # linux = Linux packet socket (default) @@ -301,22 +317,28 @@ CONFIG_PEERKEY=y # This version is an experimental implementation based on IEEE 802.11w/D1.0 # draft and is subject to change since the standard has not yet been finalized. # Driver support is also needed for IEEE 802.11w. -CONFIG_IEEE80211W=y +#CONFIG_IEEE80211W=y # Select TLS implementation # openssl = OpenSSL (default) -# gnutls = GnuTLS (needed for TLS/IA, see also CONFIG_GNUTLS_EXTRA) +# gnutls = GnuTLS # internal = Internal TLSv1 implementation (experimental) # none = Empty template CONFIG_TLS=openssl -# Whether to enable TLS/IA support, which is required for EAP-TTLSv1. -# You need CONFIG_TLS=gnutls for this to have any effect. Please note that -# even though the core GnuTLS library is released under LGPL, this extra -# library uses GPL and as such, the terms of GPL apply to the combination -# of wpa_supplicant and GnuTLS if this option is enabled. BSD license may not -# apply for distribution of the resulting binary. -#CONFIG_GNUTLS_EXTRA=y +# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1) +# can be enabled to get a stronger construction of messages when block ciphers +# are used. It should be noted that some existing TLS v1.0 -based +# implementation may not be compatible with TLS v1.1 message (ClientHello is +# sent prior to negotiating which version will be used) +#CONFIG_TLSV11=y + +# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2) +# can be enabled to enable use of stronger crypto algorithms. It should be +# noted that some existing TLS v1.0 -based implementation may not be compatible +# with TLS v1.2 message (ClientHello is sent prior to negotiating which version +# will be used) +#CONFIG_TLSV12=y # If CONFIG_TLS=internal is used, additional library and include paths are # needed for LibTomMath. Alternatively, an integrated, minimal version of @@ -372,22 +394,78 @@ CONFIG_CTRL_IFACE_DBUS_INTRO=y # amount of memory/flash. #CONFIG_DYNAMIC_EAP_METHODS=y -# Include client MLME (management frame processing). -# This can be used to move MLME processing of Linux mac80211 stack into user -# space. Please note that this is currently only available with -# driver_nl80211.c and only with a modified version of Linux kernel and -# wpa_supplicant. -#CONFIG_CLIENT_MLME=y - # IEEE Std 802.11r-2008 (Fast BSS Transition) #CONFIG_IEEE80211R=y # Add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt) CONFIG_DEBUG_FILE=y +# Send debug messages to syslog instead of stdout +#CONFIG_DEBUG_SYSLOG=y +# Set syslog facility for debug messages +#CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON + # Enable privilege separation (see README 'Privilege separation' for details) #CONFIG_PRIVSEP=y # Enable mitigation against certain attacks against TKIP by delaying Michael # MIC error reports by a random amount of time between 0 and 60 seconds -CONFIG_DELAYED_MIC_ERROR_REPORT=y +#CONFIG_DELAYED_MIC_ERROR_REPORT=y + +# Enable tracing code for developer debugging +# This tracks use of memory allocations and other registrations and reports +# incorrect use with a backtrace of call (or allocation) location. +#CONFIG_WPA_TRACE=y +# For BSD, comment out these. +#LIBS += -lexecinfo +#LIBS_p += -lexecinfo +#LIBS_c += -lexecinfo + +# Use libbfd to get more details for developer debugging +# This enables use of libbfd to get more detailed symbols for the backtraces +# generated by CONFIG_WPA_TRACE=y. +#CONFIG_WPA_TRACE_BFD=y +# For BSD, comment out these. +#LIBS += -lbfd -liberty -lz +#LIBS_p += -lbfd -liberty -lz +#LIBS_c += -lbfd -liberty -lz + +# wpa_supplicant depends on strong random number generation being available +# from the operating system. os_get_random() function is used to fetch random +# data when needed, e.g., for key generation. On Linux and BSD systems, this +# works by reading /dev/urandom. It should be noted that the OS entropy pool +# needs to be properly initialized before wpa_supplicant is started. This is +# important especially on embedded devices that do not have a hardware random +# number generator and may by default start up with minimal entropy available +# for random number generation. +# +# As a safety net, wpa_supplicant is by default trying to internally collect +# additional entropy for generating random data to mix in with the data fetched +# from the OS. This by itself is not considered to be very strong, but it may +# help in cases where the system pool is not initialized properly. However, it +# is very strongly recommended that the system pool is initialized with enough +# entropy either by using hardware assisted random number generator or by +# storing state over device reboots. +# +# wpa_supplicant can be configured to maintain its own entropy store over +# restarts to enhance random number generation. This is not perfect, but it is +# much more secure than using the same sequence of random numbers after every +# reboot. This can be enabled with -e command line option. The +# specified file needs to be readable and writable by wpa_supplicant. +# +# If the os_get_random() is known to provide strong random data (e.g., on +# Linux/BSD, the board in question is known to have reliable source of random +# data from /dev/urandom), the internal wpa_supplicant random pool can be +# disabled. This will save some in binary size and CPU use. However, this +# should only be considered for builds that are known to be used on devices +# that meet the requirements described above. +#CONFIG_NO_RANDOM_POOL=y + +# IEEE 802.11n (High Throughput) support (mainly for AP mode) +CONFIG_IEEE80211N=y + +# Interworking (IEEE 802.11u) +# This can be used to enable functionality to improve interworking with +# external networks (GAS/ANQP to learn more about the networks and network +# selection based on available credentials). +#CONFIG_INTERWORKING=y diff --git a/debian/changelog b/debian/changelog index d9de133..cceb592 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,59 @@ +wpasupplicant (0.8.0-0slp2+7) unstable; urgency=low + + * Enable debug log for developers + * Git: pkgs/w/wpasupplicant + * Tag: wpasupplicant_0.8.0-0slp2+7 + + -- Danny Jeongseok Seo Thu, 22 Mar 2012 20:30:36 +0900 + +wpasupplicant (0.8.0-0slp2+6) unstable; urgency=low + + * Send disconnect to a driver for bcm4330 when a disassoc event is coming + * Git: pkgs/w/wpasupplicant + * Tag: wpasupplicant_0.8.0-0slp2+6 + + -- Sunkey Lee Tue, 20 Mar 2012 21:48:45 +0900 + +wpasupplicant (0.8.0-0slp2+5) unstable; urgency=low + + * Revise spec for OBS and build script + * Git: pkgs/w/wpasupplicant + * Tag: wpasupplicant_0.8.0-0slp2+5 + + -- Danny Jeongseok Seo Sat, 17 Mar 2012 18:18:35 +0900 + +wpasupplicant (0.8.0-0slp2+4) unstable; urgency=low + + * Skip specific scan after coming disassoc event + * Git: pkgs/w/wpasupplicant + * Tag: wpasupplicant_0.8.0-0slp2+4 + + -- Sunkey Lee Fri, 16 Mar 2012 17:58:24 +0900 + +wpasupplicant (0.8.0-0slp2+3) unstable; urgency=low + + * Add dependency for a libnl2 pkg + * Git: pkgs/w/wpasupplicant + * Tag: wpasupplicant_0.8.0-0slp2+3 + + -- Sunkey Lee Mon, 05 Mar 2012 20:01:31 +0900 + +wpasupplicant (0.8.0-0slp2+2) unstable; urgency=low + + * Make debug level from MSG_INFO to MSG_EXCESSIVE temporally + * Git: pkgs/w/wpasupplicant + * Tag: wpasupplicant_0.8.0-0slp2+2 + + -- Sunkey Lee Mon, 05 Mar 2012 13:27:09 +0900 + +wpasupplicant (0.8.0-0slp2+1) unstable; urgency=low + + * Update wpasupplicant from 0.7.3 to 0.8.x + * Git: pkgs/w/wpasupplicant + * Tag: wpasupplicant_0.8.0-0slp2+1 + + -- Sunkey Lee Mon, 05 Mar 2012 10:54:18 +0900 + wpasupplicant (0.7.3-0slp2+4) unstable; urgency=low * Modify the way to set dbus access authority diff --git a/debian/control b/debian/control index 88dfaa3..4abe922 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: net Priority: optional Maintainer: Sunkey Lee , Danny Jeongseok Seo Uploaders: Sunkey Lee , Misun Kim , Sanghoon Cho -Build-Depends: debhelper (>= 5), libdbus-glib-1-dev, libssl-dev, libdbus-1-dev, pkg-config +Build-Depends: debhelper (>= 5), libssl-dev, libdbus-1-dev, pkg-config, libnl2-dev Standards-Version: 0.1.0 Package: wpasupplicant diff --git a/debian/rules b/debian/rules index 1c5b2fe..c673255 100755 --- a/debian/rules +++ b/debian/rules @@ -27,13 +27,14 @@ else endif LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed -CONFIG := debian/slp.config +CONFIG := configurations/tizen.config +HOST_CONFIG := configurations/tizen_hostapd.config #WPAGUI = wpa_gui-qt4 config.status: configure dh_testdir # Add here commands to configure the package. - CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --prefix=$(PREFIX) + CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --prefix=$(PREFIX) build: build-stamp build-stamp: @@ -43,6 +44,11 @@ build-stamp: cp -v $(CONFIG) wpa_supplicant/.config CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE) -C wpa_supplicant all + # hostapd + $(MAKE) -C hostapd clean + #cp -v $(HOST_CONFIG) hostapd/.config + # CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE) -C hostapd all + # wpa_gui #$(MAKE) -C wpa_supplicant $(WPAGUI) @@ -62,6 +68,7 @@ clean: dh_testroot $(MAKE) -C wpa_supplicant clean + #$(MAKE) -C hostapd clean #if [ -f wpa_supplicant/$(WPAGUI)/Makefile ]; then \ # $(MAKE) -C wpa_supplicant/$(WPAGUI) distclean ; \ @@ -69,34 +76,29 @@ clean: #$(MAKE) -C wpa_supplicant/doc/docbook clean + #dh_clean wpa_supplicant/.config hostapd/.config build-stamp install-stamp dh_clean wpa_supplicant/.config build-stamp install-stamp for f in `find $(CURDIR)/debian/ -name "*.in"`; do \ rm -f $${f%.in}; \ done + rm -f ../wpasupplicant_*.deb + rm -f ../wpasupplicant-*.deb + rm -f ../wpasupplicant_*.changes + rm -f ../wpasupplicant_*.dsc + rm -f ../wpasupplicant_*.tar.gz + install: build dh_testdir dh_testroot - dh_clean -k + dh_clean -k dh_installdirs dh_install # Add here commands to install the package into debian/ncurses. #$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install - # ifupdown - #install --mode=755 -D debian/ifupdown/ifupdown.sh \ - # debian/wpasupplicant/etc/wpa_supplicant/ifupdown.sh - #install --mode=755 -D debian/ifupdown/functions.sh \ - # debian/wpasupplicant/etc/wpa_supplicant/functions.sh - #install --mode=755 -D debian/ifupdown/action_wpa.sh \ - # debian/wpasupplicant/etc/wpa_supplicant/action_wpa.sh - - # wpa_action - #install --mode=755 -D debian/ifupdown/wpa_action.sh \ - # debian/wpasupplicant/sbin/wpa_action - # D-Bus install --mode=644 -D wpa_supplicant/dbus/dbus-wpa_supplicant.conf \ debian/wpasupplicant/$(PREFIX)/etc/dbus-1/system.d/wpa_supplicant.conf @@ -104,6 +106,12 @@ install: build debian/wpasupplicant/$(PREFIX)/share/dbus-1/services/fi.epitest.hostap.WPASupplicant.service install --mode=644 -D wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service \ debian/wpasupplicant/$(PREFIX)/share/dbus-1/services/fi.w1.wpa_supplicant1.service + install --mode=755 -D etc/rc.d/init.d/wpa_supplicant \ + debian/wpasupplicant/etc/rc.d/init.d/wpa_supplicant + mkdir -p debian/wpasupplicant/etc/rc.d/rc3.d/ + ln -s ../init.d/wpa_supplicant debian/wpasupplicant/etc/rc.d/rc3.d/S62wpasupplicant + mkdir -p debian/wpasupplicant/etc/rc.d/rc5.d/ + ln -s ../init.d/wpa_supplicant debian/wpasupplicant/etc/rc.d/rc5.d/S62wpasupplicant # sanitise the example configuration mkdir -p debian/wpasupplicant/$(PREFIX)/share/doc/wpasupplicant @@ -120,12 +128,12 @@ binary-indep: build install binary-arch: build install dh_testdir dh_testroot -# dh_installchangelogs +# dh_installchangelogs # dh_installdocs # dh_installexamples # dh_install --sourcedir=debian/tmp # dh_installmenu -# dh_installdebconf +# dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installpam @@ -148,4 +156,4 @@ binary-arch: build install dh_builddeb binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install +.PHONY: build clean binary-indep binary-arch binary install diff --git a/debian/wpa_supplicant.conf b/debian/wpa_supplicant.conf deleted file mode 100644 index 8905c59..0000000 --- a/debian/wpa_supplicant.conf +++ /dev/null @@ -1 +0,0 @@ -ctrl_interface=/var/run/wpa_supplicant diff --git a/debian/wpasupplicant.install.in b/debian/wpasupplicant.install.in index 78b4308..a07f514 100644 --- a/debian/wpasupplicant.install.in +++ b/debian/wpasupplicant.install.in @@ -1 +1,4 @@ -wpa_supplicant/wpa_supplicant @PREFIX@/bin/ +wpa_supplicant/wpa_supplicant @PREFIX@/sbin/ +wpa_supplicant/wpa_cli @PREFIX@/sbin/ +#hostapd/hostapd @PREFIX@/sbin/ +#hostapd/hostapd_cli @PREFIX@/sbin/ diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 0000000..5c1b386 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,26 @@ +all: docs + +%.eps: %.fig + fig2dev -L eps $*.fig $*.eps + +%.png: %.fig + fig2dev -L png -m 3 $*.fig | pngtopnm | pnmscale 0.4 | pnmtopng \ + > $*.png + +docs-pics: wpa_supplicant.png wpa_supplicant.eps hostapd.png hostapd.eps + +docs: docs-pics + (cd ..; doxygen doc/doxygen.conf; cd doc) + $(MAKE) -C latex + cp latex/refman.pdf wpa_supplicant-devel.pdf + +html: docs-pics + (cd ..; doxygen doc/doxygen.conf; cd doc) + +clean: + rm -f *~ + rm -f wpa_supplicant.eps wpa_supplicant.png + rm -f hostapd.eps hostapd.png + rm -f doxygen.warnings + rm -rf html latex + rm -f wpa_supplicant-devel.pdf diff --git a/doc/code_structure.doxygen b/doc/code_structure.doxygen new file mode 100644 index 0000000..96f6160 --- /dev/null +++ b/doc/code_structure.doxygen @@ -0,0 +1,322 @@ +/** +\page code_structure Structure of the source code + +[ \ref wpa_supplicant_core "wpa_supplicant core functionality" | +\ref generic_helper_func "Generic helper functions" | +\ref crypto_func "Cryptographic functions" | +\ref tls_func "TLS library" | +\ref configuration "Configuration" | +\ref ctrl_iface "Control interface" | +\ref wpa_code "WPA supplicant" | +\ref eap_peer "EAP peer" | +\ref eapol_supp "EAPOL supplicant" | +\ref win_port "Windows port" | +\ref test_programs "Test programs" ] + +%wpa_supplicant implementation is divided into number of independent +modules. Core code includes functionality for controlling the network +selection, association, and configuration. Independent modules include +WPA code (key handshake, PMKSA caching, pre-authentication), EAPOL +state machine, and EAP state machine and methods. In addition, there +are number of separate files for generic helper functions. + +Both WPA and EAPOL/EAP state machines can be used separately in other +programs than %wpa_supplicant. As an example, the included test +programs eapol_test and preauth_test are using these modules. + +\ref driver_wrapper "Driver interface API" is defined in driver.h and +all hardware/driver dependent functionality is implemented in +driver_*.c. + + +\section wpa_supplicant_core wpa_supplicant core functionality + +wpa_supplicant.c + Program initialization, main control loop + +main.c + main() for UNIX-like operating systems and MinGW (Windows); this + uses command line arguments to configure wpa_supplicant + +events.c + Driver event processing; wpa_supplicant_event() and related functions + +wpa_supplicant_i.h + Internal definitions for %wpa_supplicant core; should not be + included into independent modules + + +\section generic_helper_func Generic helper functions + +%wpa_supplicant uses generic helper functions some of which are shared +with with hostapd. The following C files are currently used: + +eloop.c and eloop.h + Event loop (select() loop with registerable timeouts, socket read + callbacks, and signal callbacks) + +common.c and common.h + Common helper functions + +defs.h + Definitions shared by multiple files + +l2_packet.h, l2_packet_linux.c, and l2_packet_pcap.c + Layer 2 (link) access wrapper (includes native Linux implementation + and wrappers for libdnet/libpcap). A new l2_packet implementation + may need to be added when porting to new operating systems that are + not supported by libdnet/libpcap. Makefile can be used to select which + l2_packet implementation is included. l2_packet_linux.c uses Linux + packet sockets and l2_packet_pcap.c has a more portable version using + libpcap and libdnet. + +pcsc_funcs.c and pcsc_funcs.h + Wrapper for PC/SC lite SIM and smart card readers + +priv_netlink.h + Private version of netlink definitions from Linux kernel header files; + this could be replaced with C library header file once suitable + version becomes commonly available + +version.h + Version number definitions + +wireless_copy.h + Private version of Linux wireless extensions definitions from kernel + header files; this could be replaced with C library header file once + suitable version becomes commonly available + + +\section crypto_func Cryptographic functions + +md5.c and md5.h + MD5 (replaced with a crypto library if TLS support is included) + HMAC-MD5 (keyed checksum for message authenticity validation) + +rc4.c and rc4.h + RC4 (broadcast/default key encryption) + +sha1.c and sha1.h + SHA-1 (replaced with a crypto library if TLS support is included) + HMAC-SHA-1 (keyed checksum for message authenticity validation) + PRF-SHA-1 (pseudorandom (key/nonce generation) function) + PBKDF2-SHA-1 (ASCII passphrase to shared secret) + T-PRF (for EAP-FAST) + TLS-PRF (RFC 2246) + +sha256.c and sha256.h + SHA-256 (replaced with a crypto library if TLS support is included) + +aes_wrap.c, aes_wrap.h, aes.c + AES (replaced with a crypto library if TLS support is included), + AES Key Wrap Algorithm with 128-bit KEK, RFC3394 (broadcast/default + key encryption), + One-Key CBC MAC (OMAC1) hash with AES-128, + AES-128 CTR mode encryption, + AES-128 EAX mode encryption/decryption, + AES-128 CBC + +crypto.h + Definition of crypto library wrapper + +crypto_openssl.c + Wrapper functions for libcrypto (OpenSSL) + +crypto_internal.c + Wrapper functions for internal crypto implementation + +crypto_gnutls.c + Wrapper functions for libgcrypt (used by GnuTLS) + +ms_funcs.c and ms_funcs.h + Helper functions for MSCHAPV2 and LEAP + +tls.h + Definition of TLS library wrapper + +tls_none.c + Dummy implementation of TLS library wrapper for cases where TLS + functionality is not included. + +tls_openssl.c + TLS library wrapper for openssl + +tls_internal.c + TLS library for internal TLS implementation + +tls_gnutls.c + TLS library wrapper for GnuTLS + + +\section tls_func TLS library + +asn1.c and asn1.h + ASN.1 DER parsing + +bignum.c and bignum.h + Big number math + +rsa.c and rsa.h + RSA + +x509v3.c and x509v3.h + X.509v3 certificate parsing and processing + +tlsv1_client.c, tlsv1_client.h + TLSv1 client (RFC 2246) + +tlsv1_client_i.h + Internal structures for TLSv1 client + +tlsv1_client_read.c + TLSv1 client: read handshake messages + +tlsv1_client_write.c + TLSv1 client: write handshake messages + +tlsv1_common.c and tlsv1_common.h + Common TLSv1 routines and definitions + +tlsv1_cred.c and tlsv1_cred.h + TLSv1 credentials + +tlsv1_record.c and tlsv1_record.h + TLSv1 record protocol + + +\section configuration Configuration + +config_ssid.h + Definition of per network configuration items + +config.h + Definition of the %wpa_supplicant configuration + +config.c + Configuration parser and common functions + +config_file.c + Configuration backend for text files (e.g., wpa_supplicant.conf) + +config_winreg.c + Configuration backend for Windows registry + + +\section ctrl_iface Control interface + +%wpa_supplicant has a \ref ctrl_iface_page "control interface" +that can be used to get status +information and manage operations from external programs. An example +command line interface (wpa_cli) and GUI (wpa_gui) for this interface +are included in the %wpa_supplicant distribution. + +ctrl_iface.c and ctrl_iface.h + %wpa_supplicant-side of the control interface + +ctrl_iface_unix.c + UNIX domain sockets -based control interface backend + +ctrl_iface_udp.c + UDP sockets -based control interface backend + +ctrl_iface_named_pipe.c + Windows named pipes -based control interface backend + +wpa_ctrl.c and wpa_ctrl.h + Library functions for external programs to provide access to the + %wpa_supplicant control interface + +wpa_cli.c + Example program for using %wpa_supplicant control interface + + +\section wpa_code WPA supplicant + +wpa.c and wpa.h + WPA state machine and 4-Way/Group Key Handshake processing + +preauth.c and preauth.h + PMKSA caching and pre-authentication (RSN/WPA2) + +wpa_i.h + Internal definitions for WPA code; not to be included to other modules. + +\section eap_peer EAP peer + +\ref eap_peer_module "EAP peer implementation" is a separate module that +can be used by other programs than just %wpa_supplicant. + +eap.c and eap.h + EAP state machine and method interface + +eap_defs.h + Common EAP definitions + +eap_i.h + Internal definitions for EAP state machine and EAP methods; not to be + included in other modules + +eap_sim_common.c and eap_sim_common.h + Common code for EAP-SIM and EAP-AKA + +eap_tls_common.c and eap_tls_common.h + Common code for EAP-PEAP, EAP-TTLS, and EAP-FAST + +eap_tlv.c and eap_tlv.h + EAP-TLV code for EAP-PEAP and EAP-FAST + +eap_ttls.c and eap_ttls.h + EAP-TTLS + +eap_pax.c, eap_pax_common.h, eap_pax_common.c + EAP-PAX + +eap_psk.c, eap_psk_common.h, eap_psk_common.c + EAP-PSK (note: this is not needed for WPA-PSK) + +eap_sake.c, eap_sake_common.h, eap_sake_common.c + EAP-SAKE + +eap_gpsk.c, eap_gpsk_common.h, eap_gpsk_common.c + EAP-GPSK + +eap_aka.c, eap_fast.c, eap_gtc.c, eap_leap.c, eap_md5.c, eap_mschapv2.c, +eap_otp.c, eap_peap.c, eap_sim.c, eap_tls.c + Other EAP method implementations + + +\section eapol_supp EAPOL supplicant + +eapol_supp_sm.c and eapol_supp_sm.h + EAPOL supplicant state machine and IEEE 802.1X processing + + +\section win_port Windows port + +ndis_events.c + Code for receiving NdisMIndicateStatus() events and delivering them to + %wpa_supplicant driver_ndis.c in more easier to use form + +win_if_list.c + External program for listing current network interface + + +\section test_programs Test programs + +radius_client.c and radius_client.h + RADIUS authentication client implementation for eapol_test + +radius.c and radius.h + RADIUS message processing for eapol_test + +eapol_test.c + Standalone EAP testing tool with integrated RADIUS authentication + client + +preauth_test.c + Standalone RSN pre-authentication tool + +wpa_passphrase.c + WPA ASCII passphrase to PSK conversion + +*/ diff --git a/doc/ctrl_iface.doxygen b/doc/ctrl_iface.doxygen new file mode 100644 index 0000000..f820f9e --- /dev/null +++ b/doc/ctrl_iface.doxygen @@ -0,0 +1,1053 @@ +/** +\page ctrl_iface_page %wpa_supplicant control interface + +%wpa_supplicant implements a control interface that can be used by +external programs to control the operations of the %wpa_supplicant +daemon and to get status information and event notifications. There is +a small C library, in a form of a single C file, wpa_ctrl.c, that +provides helper functions to facilitate the use of the control +interface. External programs can link this file into them and then use +the library functions documented in wpa_ctrl.h to interact with +%wpa_supplicant. This library can also be used with C++. wpa_cli.c and +wpa_gui are example programs using this library. + +There are multiple mechanisms for inter-process communication. For +example, Linux version of %wpa_supplicant is using UNIX domain sockets +for the control interface and Windows version UDP sockets. The use of +the functions defined in wpa_ctrl.h can be used to hide the details of +the used IPC from external programs. + + +\section using_ctrl_iface Using the control interface + +External programs, e.g., a GUI or a configuration utility, that need to +communicate with %wpa_supplicant should link in wpa_ctrl.c. This +allows them to use helper functions to open connection to the control +interface with wpa_ctrl_open() and to send commands with +wpa_ctrl_request(). + +%wpa_supplicant uses the control interface for two types of communication: +commands and unsolicited event messages. Commands are a pair of +messages, a request from the external program and a response from +%wpa_supplicant. These can be executed using wpa_ctrl_request(). +Unsolicited event messages are sent by %wpa_supplicant to the control +interface connection without specific request from the external program +for receiving each message. However, the external program needs to +attach to the control interface with wpa_ctrl_attach() to receive these +unsolicited messages. + +If the control interface connection is used both for commands and +unsolicited event messages, there is potential for receiving an +unsolicited message between the command request and response. +wpa_ctrl_request() caller will need to supply a callback, msg_cb, +for processing these messages. Often it is easier to open two +control interface connections by calling wpa_ctrl_open() twice and +then use one of the connections for commands and the other one for +unsolicited messages. This way command request/response pairs will +not be broken by unsolicited messages. wpa_cli is an example of how +to use only one connection for both purposes and wpa_gui demonstrates +how to use two separate connections. + +Once the control interface connection is not needed anymore, it should +be closed by calling wpa_ctrl_close(). If the connection was used for +unsolicited event messages, it should be first detached by calling +wpa_ctrl_detach(). + + +\section ctrl_iface_cmds Control interface commands + +Following commands can be used with wpa_ctrl_request(): + +\subsection ctrl_iface_PING PING + +This command can be used to test whether %wpa_supplicant is replying +to the control interface commands. The expected reply is \c PONG if the +connection is open and %wpa_supplicant is processing commands. + + +\subsection ctrl_iface_MIB MIB + +Request a list of MIB variables (dot1x, dot11). The output is a text +block with each line in \c variable=value format. For example: + +\verbatim +dot11RSNAOptionImplemented=TRUE +dot11RSNAPreauthenticationImplemented=TRUE +dot11RSNAEnabled=FALSE +dot11RSNAPreauthenticationEnabled=FALSE +dot11RSNAConfigVersion=1 +dot11RSNAConfigPairwiseKeysSupported=5 +dot11RSNAConfigGroupCipherSize=128 +dot11RSNAConfigPMKLifetime=43200 +dot11RSNAConfigPMKReauthThreshold=70 +dot11RSNAConfigNumberOfPTKSAReplayCounters=1 +dot11RSNAConfigSATimeout=60 +dot11RSNAAuthenticationSuiteSelected=00-50-f2-2 +dot11RSNAPairwiseCipherSelected=00-50-f2-4 +dot11RSNAGroupCipherSelected=00-50-f2-4 +dot11RSNAPMKIDUsed= +dot11RSNAAuthenticationSuiteRequested=00-50-f2-2 +dot11RSNAPairwiseCipherRequested=00-50-f2-4 +dot11RSNAGroupCipherRequested=00-50-f2-4 +dot11RSNAConfigNumberOfGTKSAReplayCounters=0 +dot11RSNA4WayHandshakeFailures=0 +dot1xSuppPaeState=5 +dot1xSuppHeldPeriod=60 +dot1xSuppAuthPeriod=30 +dot1xSuppStartPeriod=30 +dot1xSuppMaxStart=3 +dot1xSuppSuppControlledPortStatus=Authorized +dot1xSuppBackendPaeState=2 +dot1xSuppEapolFramesRx=0 +dot1xSuppEapolFramesTx=440 +dot1xSuppEapolStartFramesTx=2 +dot1xSuppEapolLogoffFramesTx=0 +dot1xSuppEapolRespFramesTx=0 +dot1xSuppEapolReqIdFramesRx=0 +dot1xSuppEapolReqFramesRx=0 +dot1xSuppInvalidEapolFramesRx=0 +dot1xSuppEapLengthErrorFramesRx=0 +dot1xSuppLastEapolFrameVersion=0 +dot1xSuppLastEapolFrameSource=00:00:00:00:00:00 +\endverbatim + + +\subsection ctrl_iface_STATUS STATUS + +Request current WPA/EAPOL/EAP status information. The output is a text +block with each line in \c variable=value format. For example: + +\verbatim +bssid=02:00:01:02:03:04 +ssid=test network +pairwise_cipher=CCMP +group_cipher=CCMP +key_mgmt=WPA-PSK +wpa_state=COMPLETED +ip_address=192.168.1.21 +Supplicant PAE state=AUTHENTICATED +suppPortStatus=Authorized +EAP state=SUCCESS +\endverbatim + + +\subsection ctrl_iface_STATUS-VERBOSE STATUS-VERBOSE + +Same as STATUS, but with more verbosity (i.e., more \c variable=value pairs). + +\verbatim +bssid=02:00:01:02:03:04 +ssid=test network +id=0 +pairwise_cipher=CCMP +group_cipher=CCMP +key_mgmt=WPA-PSK +wpa_state=COMPLETED +ip_address=192.168.1.21 +Supplicant PAE state=AUTHENTICATED +suppPortStatus=Authorized +heldPeriod=60 +authPeriod=30 +startPeriod=30 +maxStart=3 +portControl=Auto +Supplicant Backend state=IDLE +EAP state=SUCCESS +reqMethod=0 +methodState=NONE +decision=COND_SUCC +ClientTimeout=60 +\endverbatim + + +\subsection ctrl_iface_PMKSA PMKSA + +Show PMKSA cache + +\verbatim +Index / AA / PMKID / expiration (in seconds) / opportunistic +1 / 02:00:01:02:03:04 / 000102030405060708090a0b0c0d0e0f / 41362 / 0 +2 / 02:00:01:33:55:77 / 928389281928383b34afb34ba4212345 / 362 / 1 +\endverbatim + + +\subsection ctrl_iface_SET SET + +Set variables: +- EAPOL::heldPeriod +- EAPOL::authPeriod +- EAPOL::startPeriod +- EAPOL::maxStart +- dot11RSNAConfigPMKLifetime +- dot11RSNAConfigPMKReauthThreshold +- dot11RSNAConfigSATimeout + +Example command: +\verbatim +SET EAPOL::heldPeriod 45 +\endverbatim + + +\subsection ctrl_iface_LOGON LOGON + +IEEE 802.1X EAPOL state machine logon. + + +\subsection ctrl_iface_LOGOFF LOGOFF + +IEEE 802.1X EAPOL state machine logoff. + + +\subsection ctrl_iface_REASSOCIATE REASSOCIATE + +Force reassociation. + + +\subsection ctrl_iface_RECONNECT RECONNECT + +Connect if disconnected (i.e., like \c REASSOCIATE, but only connect +if in disconnected state). + + +\subsection ctrl_iface_PREAUTH PREAUTH + +Start pre-authentication with the given BSSID. + + +\subsection ctrl_iface_ATTACH ATTACH + +Attach the connection as a monitor for unsolicited events. This can +be done with wpa_ctrl_attach(). + + +\subsection ctrl_iface_DETACH DETACH + +Detach the connection as a monitor for unsolicited events. This can +be done with wpa_ctrl_detach(). + + +\subsection ctrl_iface_LEVEL LEVEL + +Change debug level. + + +\subsection ctrl_iface_RECONFIGURE RECONFIGURE + +Force %wpa_supplicant to re-read its configuration data. + + +\subsection ctrl_iface_TERMINATE TERMINATE + +Terminate %wpa_supplicant process. + + +\subsection ctrl_iface_BSSID BSSID + +Set preferred BSSID for a network. Network id can be received from the +\c LIST_NETWORKS command output. + + +\subsection ctrl_iface_LIST_NETWORKS LIST_NETWORKS + +List configured networks. + +\verbatim +network id / ssid / bssid / flags +0 example network any [CURRENT] +\endverbatim + +(note: fields are separated with tabs) + + +\subsection ctrl_iface_DISCONNECT DISCONNECT + +Disconnect and wait for \c REASSOCIATE or \c RECONNECT command before +connecting. + + +\subsection ctrl_iface_SCAN SCAN + +Request a new BSS scan. + + +\subsection ctrl_iface_SCAN_RESULTS SCAN_RESULTS + +Get the latest scan results. + +\verbatim +bssid / frequency / signal level / flags / ssid +00:09:5b:95:e0:4e 2412 208 [WPA-PSK-CCMP] jkm private +02:55:24:33:77:a3 2462 187 [WPA-PSK-TKIP] testing +00:09:5b:95:e0:4f 2412 209 jkm guest +\endverbatim + +(note: fields are separated with tabs) + + +\subsection ctrl_iface_BSS BSS + +Get detailed per-BSS scan results. \c BSS command can be used to +iterate through scan results one BSS at a time and to fetch all +information from the found BSSes. This provides access to the same +data that is available through \c SCAN_RESULTS but in a way that +avoids problems with large number of scan results not fitting in the +ctrl_iface messages. + +There are two options for selecting the BSS with the \c BSS command: +"BSS " requests information for the BSS identified by the index +(0 .. size-1) in the scan results table and "BSS " requests +information for the given BSS (based on BSSID in 00:01:02:03:04:05 +format). + +BSS information is presented in following format. Please note that new +fields may be added to this field=value data, so the ctrl_iface user +should be prepared to ignore values it does not understand. + +\verbatim +bssid=00:09:5b:95:e0:4e +freq=2412 +beacon_int=0 +capabilities=0x0011 +qual=51 +noise=161 +level=212 +tsf=0000000000000000 +ie=000b6a6b6d2070726976617465010180dd180050f20101000050f20401000050f20401000050f2020000 +ssid=jkm private +\endverbatim + + + +\subsection ctrl_iface_SELECT_NETWORK SELECT_NETWORK + +Select a network (disable others). Network id can be received from the +\c LIST_NETWORKS command output. + + +\subsection ctrl_iface_ENABLE_NETWORK ENABLE_NETWORK + +Enable a network. Network id can be received from the +\c LIST_NETWORKS command output. Special network id \c all can be +used to enable all network. + + +\subsection ctrl_iface_DISABLE_NETWORK DISABLE_NETWORK + +Disable a network. Network id can be received from the +\c LIST_NETWORKS command output. Special network id \c all can be +used to disable all network. + + +\subsection ctrl_iface_ADD_NETWORK ADD_NETWORK + +Add a new network. This command creates a new network with empty +configuration. The new network is disabled and once it has been +configured it can be enabled with \c ENABLE_NETWORK command. \c ADD_NETWORK +returns the network id of the new network or FAIL on failure. + + +\subsection ctrl_iface_REMOVE_NETWORK REMOVE_NETWORK + +Remove a network. Network id can be received from the +\c LIST_NETWORKS command output. Special network id \c all can be +used to remove all network. + + +\subsection ctrl_iface_SET_NETWORK SET_NETWORK + +Set network variables. Network id can be received from the +\c LIST_NETWORKS command output. + +This command uses the same variables and data formats as the +configuration file. See example wpa_supplicant.conf for more details. + +- ssid (network name, SSID) +- psk (WPA passphrase or pre-shared key) +- key_mgmt (key management protocol) +- identity (EAP identity) +- password (EAP password) +- ... + + +\subsection ctrl_iface_GET_NETWORK GET_NETWORK + +Get network variables. Network id can be received from the +\c LIST_NETWORKS command output. + + +\subsection ctrl_iface_SAVE_CONFIG SAVE_CONFIG + +Save the current configuration. + + +\subsection ctrl_iface_P2P_FIND P2P_FIND + +Start P2P device discovery. Optional parameter can be used to specify +the duration for the discovery in seconds (e.g., "P2P_FIND 5"). If the +duration is not specified, discovery will be started for indefinite +time, i.e., until it is terminated by P2P_STOP_FIND or P2P_CONNECT (to +start group formation with a discovered peer). + +The default search type is to first run a full scan of all channels +and then continue scanning only social channels (1, 6, 11). This +behavior can be changed by specifying a different search type: social +(e.g., "P2P_FIND 5 type=social") will skip the initial full scan and +only search social channels; progressive (e.g., "P2P_FIND +type=progressive") starts with a full scan and then searches +progressively through all channels one channel at the time with the +social channel scans. Progressive device discovery can be used to find +new groups (and groups that were not found during the initial scan, +e.g., due to the GO being asleep) over time without adding +considerable extra delay for every Search state round. + + +\subsection ctrl_iface_P2P_STOP_FIND P2P_STOP_FIND + +Stop ongoing P2P device discovery or other operation (connect, listen +mode). + + +\subsection ctrl_iface_P2P_CONNECT P2P_CONNECT + +Start P2P group formation with a discovered P2P peer. This includes +group owner negotiation, group interface setup, provisioning, and +establishing data connection. + +P2P_CONNECT +[label|display|keypad] [persistent] [join|auth] [go_intent=<0..15>] + +Start P2P group formation with a discovered P2P peer. This includes +optional group owner negotiation, group interface setup, provisioning, +and establishing data connection. + +The parameter specifies the WPS provisioning +method. "pbc" string starts pushbutton method, "pin" string start PIN +method using an automatically generated PIN (which will be returned as +the command return code), PIN# means that a pre-selected PIN can be +used (e.g., 12345670). [label|display|keypad] is used with PIN method +to specify which PIN is used (label=PIN from local label, +display=dynamically generated random PIN from local display, +keypad=PIN entered from peer device label or display). "persistent" +parameter can be used to request a persistent group to be formed. + +"join" indicates that this is a command to join an existing group as a +client. It skips the GO Negotiation part. + +"auth" indicates that the WPS parameters are authorized for the peer +device without actually starting GO Negotiation (i.e., the peer is +expected to initiate GO Negotiation). This is mainly for testing +purposes. + +The optional "go_intent" parameter can be used to override the default +GO Intent value. + + +\subsection ctrl_iface_P2P_LISTEN P2P_LISTEN + +Start Listen-only state. Optional parameter can be used to specify the +duration for the Listen operation in seconds. This command may not +be of that much use during normal operations and is mainly designed +for testing. It can also be used to keep the device discoverable +without having to maintain a group. + + +\subsection ctrl_iface_P2P_GROUP_REMOVE P2P_GROUP_REMOVE + +Terminate a P2P group. If a new virtual network interface was used for +the group, it will also be removed. The network interface name of the +group interface is used as a parameter for this command. + + +\subsection ctrl_iface_P2P_GROUP_ADD P2P_GROUP_ADD + +Set up a P2P group owner manually (i.e., without group owner +negotiation with a specific peer). This is also known as autonomous +GO. Optional persistent= can be used to specify restart of +a persistent group. + + +\subsection ctrl_iface_P2P_PROV_DISC P2P_PROV_DISC + +Send P2P provision discovery request to the specified peer. The +parameters for this command are the P2P device address of the peer and +the desired configuration method. For example, "P2P_PROV_DISC +02:01:02:03:04:05 display" would request the peer to display a PIN for +us and "P2P_PROV_DISC 02:01:02:03:04:05 keypad" would request the peer +to enter a PIN that we display. + + +\subsection ctrl_iface_P2P_GET_PASSPHRASE P2P_GET_PASSPHRASE + +Get the passphrase for a group (only available when acting as a GO). + + +\subsection ctrl_iface_P2P_SERV_DISC_REQ P2P_SERV_DISC_REQ + +Schedule a P2P service discovery request. The parameters for this +command are the device address of the peer device (or 00:00:00:00:00:00 +for wildcard query that is sent to every discovered P2P peer that +supports service discovery) and P2P Service Query TLV(s) as hexdump. +For example, "P2P_SERV_DISC_REQ 00:00:00:00:00:00 02000001" schedules +a request for listing all supported service discovery protocols and +requests this to be sent to all discovered peers. The pending requests +are sent during device discovery (see \ref ctrl_iface_P2P_FIND). + +This command returns an identifier for the pending query (e.g., +"1f77628") that can be used to cancel the request. Directed requests +will be automatically removed when the specified peer has replied to +it. + + +\subsection ctrl_iface_P2P_SERV_DISC_CANCEL_REQ P2P_SERV_DISC_CANCEL_REQ + +Cancel a pending P2P service discovery request. This command takes a +single parameter: identifier for the pending query (the value returned +by \ref ctrl_iface_P2P_SERV_DISC_REQ), e.g., +"P2P_SERV_DISC_CANCEL_REQ 1f77628". + + +\subsection ctrl_iface_P2P_SERV_DISC_RESP P2P_SERV_DISC_RESP + +Reply to a service discovery query. This command takes following +parameters: frequency in MHz, destination address, dialog token, +response TLV(s). The first three parameters are copied from the +request event. For example, +"P2P_SERV_DISC_RESP 2437 02:40:61:c2:f3:b7 1 0300000101". + + +\subsection ctrl_iface_P2P_SERVICE_UPDATE P2P_SERVICE_UPDATE + +Indicate that local services have changed. This is used to increment +the P2P service indicator value so that peers know when previously +cached information may have changed. + + +\subsection ctrl_iface_P2P_SERV_DISC_EXTERNAL P2P_SERV_DISC_EXTERNAL + +Configure external processing of P2P service requests: 0 (default) = +no external processing of requests (i.e., internal code will reject +each request), 1 = external processing of requests (external program +is responsible for replying to service discovery requests with +\ref ctrl_iface_P2P_SERV_DISC_RESP). + + +\subsection ctrl_iface_P2P_REJECT P2P_REJECT + +Reject connection attempt from a peer (specified with a device +address). This is a mechanism to reject a pending GO Negotiation with +a peer and request to automatically block any further connection or +discovery of the peer. + + +\subsection ctrl_iface_P2P_INVITE P2P_INVITE + +Invite a peer to join a group or to (re)start a persistent group. + + +\subsection ctrl_iface_P2P_PEER P2P_PEER + +Fetch information about a discovered peer. This command takes in an +argument specifying which peer to select: P2P Device Address of the +peer, "FIRST" to indicate the first peer in the list, or "NEXT-" to indicate the entry following the specified peer +(to allow for iterating through the list). + + +\subsection ctrl_iface_P2P_EXT_LISTEN P2P_EXT_LISTEN + +Enable/disable extended listen timing. Without parameters, this +command disables extended listen timing. When enabling the feature, +two parameters are used: availibility period and availability interval +(both in milliseconds and with range of 1-65535). + + +\section ctrl_iface_interactive Interactive requests + +If %wpa_supplicant needs additional information during authentication +(e.g., password), it will use a specific prefix, \c CTRL-REQ- +(\a WPA_CTRL_REQ macro) in an unsolicited event message. An external +program, e.g., a GUI, can provide such information by using +\c CTRL-RSP- (\a WPA_CTRL_RSP macro) prefix in a command with matching +field name. + +The following fields can be requested in this way from the user: +- IDENTITY (EAP identity/user name) +- PASSWORD (EAP password) +- NEW_PASSWORD (New password if the server is requesting password change) +- PIN (PIN code for accessing a SIM or smartcard) +- OTP (one-time password; like password, but the value is used only once) +- PASSPHRASE (passphrase for a private key file) + +\verbatim +CTRL-REQ--- +CTRL-RSP--- +\endverbatim + +For example, request from %wpa_supplicant: +\verbatim +CTRL-REQ-PASSWORD-1-Password needed for SSID test-network +\endverbatim + +And a matching reply from the GUI: +\verbatim +CTRL-RSP-PASSWORD-1-secret +\endverbatim + + +\subsection ctrl_iface_GET_CAPABILITY GET_CAPABILITY