README-Windows.txt 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  1. wpa_supplicant for Windows
  2. ==========================
  3. Copyright (c) 2003-2008, Jouni Malinen <j@w1.fi> and
  4. contributors
  5. All Rights Reserved.
  6. This program is dual-licensed under both the GPL version 2 and BSD
  7. license. Either license may be used at your option.
  8. This product includes software developed by the OpenSSL Project
  9. for use in the OpenSSL Toolkit (http://www.openssl.org/). This
  10. product includes cryptographic software written by Eric Young
  11. (eay@cryptsoft.com).
  12. wpa_supplicant has support for being used as a WPA/WPA2/IEEE 802.1X
  13. Supplicant on Windows. The current port requires that WinPcap
  14. (http://winpcap.polito.it/) is installed for accessing packets and the
  15. driver interface. Both release versions 3.0 and 3.1 are supported.
  16. The current port is still somewhat experimental. It has been tested
  17. mainly on Windows XP (SP2) with limited set of NDIS drivers. In
  18. addition, the current version has been reported to work with Windows
  19. 2000.
  20. All security modes have been verified to work (at least complete
  21. authentication and successfully ping a wired host):
  22. - plaintext
  23. - static WEP / open system authentication
  24. - static WEP / shared key authentication
  25. - IEEE 802.1X with dynamic WEP keys
  26. - WPA-PSK, TKIP, CCMP, TKIP+CCMP
  27. - WPA-EAP, TKIP, CCMP, TKIP+CCMP
  28. - WPA2-PSK, TKIP, CCMP, TKIP+CCMP
  29. - WPA2-EAP, TKIP, CCMP, TKIP+CCMP
  30. Binary version
  31. --------------
  32. Compiled binary version of the wpa_supplicant and additional tools is
  33. available from http://w1.fi/wpa_supplicant/. These binaries can be
  34. used after installing WinPcap.
  35. wpa_gui uses Qt 4 framework and may need additional dynamic libraries
  36. (DLLs). These libraries are available from
  37. http://w1.fi/wpa_supplicant/qt4/wpa_gui-qt433-windows-dll.zip
  38. You can copy the DLL files from this ZIP package into the same directory
  39. with wpa_gui.exe to allow wpa_gui to be started.
  40. Building wpa_supplicant with mingw
  41. ----------------------------------
  42. The default build setup for wpa_supplicant is to use MinGW and
  43. cross-compiling from Linux to MinGW/Windows. It should also be
  44. possible to build this under Windows using the MinGW tools, but that
  45. is not tested nor supported and is likely to require some changes to
  46. the Makefile unless cygwin is used.
  47. Building wpa_supplicant with MSVC
  48. ---------------------------------
  49. wpa_supplicant can be built with Microsoft Visual C++ compiler. This
  50. has been tested with Microsoft Visual C++ Toolkit 2003 and Visual
  51. Studio 2005 using the included nmake.mak as a Makefile for nmake. IDE
  52. can also be used by creating a project that includes the files and
  53. defines mentioned in nmake.mak. Example VS2005 solution and project
  54. files are included in vs2005 subdirectory. This can be used as a
  55. starting point for building the programs with VS2005 IDE. Visual Studio
  56. 2008 Express Edition is also able to use these project files.
  57. WinPcap development package is needed for the build and this can be
  58. downloaded from http://www.winpcap.org/install/bin/WpdPack_4_0_2.zip. The
  59. default nmake.mak expects this to be unpacked into C:\dev\WpdPack so
  60. that Include and Lib directories are in this directory. The files can be
  61. stored elsewhere as long as the WINPCAPDIR in nmake.mak is updated to
  62. match with the selected directory. In case a project file in the IDE is
  63. used, these Include and Lib directories need to be added to project
  64. properties as additional include/library directories.
  65. OpenSSL source package can be downloaded from
  66. http://www.openssl.org/source/openssl-0.9.8i.tar.gz and built and
  67. installed following instructions in INSTALL.W32. Note that if EAP-FAST
  68. support will be included in the wpa_supplicant, OpenSSL needs to be
  69. patched to# support it openssl-0.9.8i-tls-extensions.patch. The example
  70. nmake.mak file expects OpenSSL to be installed into C:\dev\openssl, but
  71. this directory can be modified by changing OPENSSLDIR variable in
  72. nmake.mak.
  73. If you do not need EAP-FAST support, you may also be able to use Win32
  74. binary installation package of OpenSSL from
  75. http://www.slproweb.com/products/Win32OpenSSL.html instead of building
  76. the library yourself. In this case, you will need to copy Include and
  77. Lib directories in suitable directory, e.g., C:\dev\openssl for the
  78. default nmake.mak. Copy {Win32OpenSSLRoot}\include into
  79. C:\dev\openssl\include and make C:\dev\openssl\lib subdirectory with
  80. files from {Win32OpenSSLRoot}\VC (i.e., libeay*.lib and ssleay*.lib).
  81. This will end up using dynamically linked OpenSSL (i.e., .dll files are
  82. needed) for it. Alternative, you can copy files from
  83. {Win32OpenSSLRoot}\VC\static to create a static build (no OpenSSL .dll
  84. files needed).
  85. Building wpa_supplicant for cygwin
  86. ----------------------------------
  87. wpa_supplicant can be built for cygwin by installing the needed
  88. development packages for cygwin. This includes things like compiler,
  89. make, openssl development package, etc. In addition, developer's pack
  90. for WinPcap (WPdpack.zip) from
  91. http://winpcap.polito.it/install/default.htm is needed.
  92. .config file should enable only one driver interface,
  93. CONFIG_DRIVER_NDIS. In addition, include directories may need to be
  94. added to match the system. An example configuration is available in
  95. defconfig. The library and include files for WinPcap will either need
  96. to be installed in compiler/linker default directories or their
  97. location will need to be adding to .config when building
  98. wpa_supplicant.
  99. Othen than this, the build should be more or less identical to Linux
  100. version, i.e., just run make after having created .config file. An
  101. additional tool, win_if_list.exe, can be built by running "make
  102. win_if_list".
  103. Building wpa_gui
  104. ----------------
  105. wpa_gui uses Qt application framework from Trolltech. It can be built
  106. with the open source version of Qt4 and MinGW. Following commands can
  107. be used to build the binary in the Qt 4 Command Prompt:
  108. # go to the root directory of wpa_supplicant source code
  109. cd wpa_gui-qt4
  110. qmake -o Makefile wpa_gui.pro
  111. make
  112. # the wpa_gui.exe binary is created into 'release' subdirectory
  113. Using wpa_supplicant for Windows
  114. --------------------------------
  115. wpa_supplicant, wpa_cli, and wpa_gui behave more or less identically to
  116. Linux version, so instructions in README and example wpa_supplicant.conf
  117. should be applicable for most parts. In addition, there is another
  118. version of wpa_supplicant, wpasvc.exe, which can be used as a Windows
  119. service and which reads its configuration from registry instead of
  120. text file.
  121. When using access points in "hidden SSID" mode, ap_scan=2 mode need to
  122. be used (see wpa_supplicant.conf for more information).
  123. Windows NDIS/WinPcap uses quite long interface names, so some care
  124. will be needed when starting wpa_supplicant. Alternatively, the
  125. adapter description can be used as the interface name which may be
  126. easier since it is usually in more human-readable
  127. format. win_if_list.exe can be used to find out the proper interface
  128. name.
  129. Example steps in starting up wpa_supplicant:
  130. # win_if_list.exe
  131. ifname: \Device\NPF_GenericNdisWanAdapter
  132. description: Generic NdisWan adapter
  133. ifname: \Device\NPF_{769E012B-FD17-4935-A5E3-8090C38E25D2}
  134. description: Atheros Wireless Network Adapter (Microsoft's Packet Scheduler)
  135. ifname: \Device\NPF_{732546E7-E26C-48E3-9871-7537B020A211}
  136. description: Intel 8255x-based Integrated Fast Ethernet (Microsoft's Packet Scheduler)
  137. Since the example configuration used Atheros WLAN card, the middle one
  138. is the correct interface in this case. The interface name for -i
  139. command line option is the full string following "ifname:" (the
  140. "\Device\NPF_" prefix can be removed). In other words, wpa_supplicant
  141. would be started with the following command:
  142. # wpa_supplicant.exe -i'{769E012B-FD17-4935-A5E3-8090C38E25D2}' -c wpa_supplicant.conf -d
  143. -d optional enables some more debugging (use -dd for even more, if
  144. needed). It can be left out if debugging information is not needed.
  145. With the alternative mechanism for selecting the interface, this
  146. command has identical results in this case:
  147. # wpa_supplicant.exe -iAtheros -c wpa_supplicant.conf -d
  148. Simple configuration example for WPA-PSK:
  149. #ap_scan=2
  150. ctrl_interface=
  151. network={
  152. ssid="test"
  153. key_mgmt=WPA-PSK
  154. proto=WPA
  155. pairwise=TKIP
  156. psk="secret passphrase"
  157. }
  158. (remove '#' from the comment out ap_scan line to enable mode in which
  159. wpa_supplicant tries to associate with the SSID without doing
  160. scanning; this allows APs with hidden SSIDs to be used)
  161. wpa_cli.exe and wpa_gui.exe can be used to interact with the
  162. wpa_supplicant.exe program in the same way as with Linux. Note that
  163. ctrl_interface is using UNIX domain sockets when built for cygwin, but
  164. the native build for Windows uses named pipes and the contents of the
  165. ctrl_interface configuration item is used to control access to the
  166. interface. Anyway, this variable has to be included in the configuration
  167. to enable the control interface.
  168. Example SDDL string formats:
  169. (local admins group has permission, but nobody else):
  170. ctrl_interface=SDDL=D:(A;;GA;;;BA)
  171. ("A" == "access allowed", "GA" == GENERIC_ALL == all permissions, and
  172. "BA" == "builtin administrators" == the local admins. The empty fields
  173. are for flags and object GUIDs, none of which should be required in this
  174. case.)
  175. (local admins and the local "power users" group have permissions,
  176. but nobody else):
  177. ctrl_interface=SDDL=D:(A;;GA;;;BA)(A;;GA;;;PU)
  178. (One ACCESS_ALLOWED ACE for GENERIC_ALL for builtin administrators, and
  179. one ACCESS_ALLOWED ACE for GENERIC_ALL for power users.)
  180. (close to wide open, but you have to be a valid user on
  181. the machine):
  182. ctrl_interface=SDDL=D:(A;;GA;;;AU)
  183. (One ACCESS_ALLOWED ACE for GENERIC_ALL for the "authenticated users"
  184. group.)
  185. This one would allow absolutely everyone (including anonymous
  186. users) -- this is *not* recommended, since named pipes can be attached
  187. to from anywhere on the network (i.e. there's no "this machine only"
  188. like there is with 127.0.0.1 sockets):
  189. ctrl_interface=SDDL=D:(A;;GA;;;BU)(A;;GA;;;AN)
  190. (BU == "builtin users", "AN" == "anonymous")
  191. See also [1] for the format of ACEs, and [2] for the possible strings
  192. that can be used for principal names.
  193. [1]
  194. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/ace_strings.asp
  195. [2]
  196. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/sid_strings.asp
  197. Starting wpa_supplicant as a Windows service (wpasvc.exe)
  198. ---------------------------------------------------------
  199. wpa_supplicant can be started as a Windows service by using wpasvc.exe
  200. program that is alternative build of wpa_supplicant.exe. Most of the
  201. core functionality of wpasvc.exe is identical to wpa_supplicant.exe,
  202. but it is using Windows registry for configuration information instead
  203. of a text file and command line parameters. In addition, it can be
  204. registered as a service that can be started automatically or manually
  205. like any other Windows service.
  206. The root of wpa_supplicant configuration in registry is
  207. HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant. This level includes global
  208. parameters and a 'interfaces' subkey with all the interface configuration
  209. (adapter to confname mapping). Each such mapping is a subkey that has
  210. 'adapter', 'config', and 'ctrl_interface' values.
  211. This program can be run either as a normal command line application,
  212. e.g., for debugging, with 'wpasvc.exe app' or as a Windows service.
  213. Service need to be registered with 'wpasvc.exe reg <full path to
  214. wpasvc.exe>'. Alternatively, 'wpasvc.exe reg' can be used to register
  215. the service with the current location of wpasvc.exe. After this, wpasvc
  216. can be started like any other Windows service (e.g., 'net start wpasvc')
  217. or it can be configured to start automatically through the Services tool
  218. in administrative tasks. The service can be unregistered with
  219. 'wpasvc.exe unreg'.
  220. If the service is set to start during system bootup to make the
  221. network connection available before any user has logged in, there may
  222. be a long (half a minute or so) delay in starting up wpa_supplicant
  223. due to WinPcap needing a driver called "Network Monitor Driver" which
  224. is started by default on demand.
  225. To speed up wpa_supplicant start during system bootup, "Network
  226. Monitor Driver" can be configured to be started sooner by setting its
  227. startup type to System instead of the default Demand. To do this, open
  228. up Device Manager, select Show Hidden Devices, expand the "Non
  229. Plug-and-Play devices" branch, double click "Network Monitor Driver",
  230. go to the Driver tab, and change the Demand setting to System instead.
  231. Configuration data is in HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs
  232. key. Each configuration profile has its own key under this. In terms of text
  233. files, each profile would map to a separate text file with possibly multiple
  234. networks. Under each profile, there is a networks key that lists all
  235. networks as a subkey. Each network has set of values in the same way as
  236. network block in the configuration file. In addition, blobs subkey has
  237. possible blobs as values.
  238. HKEY_LOCAL_MACHINE\SOFTWARE\wpa_supplicant\configs\test\networks\0000
  239. ssid="example"
  240. key_mgmt=WPA-PSK
  241. See win_example.reg for an example on how to setup wpasvc.exe
  242. parameters in registry. It can also be imported to registry as a
  243. starting point for the configuration.
  244. License information for third party software used in this product:
  245. OpenSSL License
  246. ---------------
  247. /* ====================================================================
  248. * Copyright (c) 1998-2004 The OpenSSL Project. All rights reserved.
  249. *
  250. * Redistribution and use in source and binary forms, with or without
  251. * modification, are permitted provided that the following conditions
  252. * are met:
  253. *
  254. * 1. Redistributions of source code must retain the above copyright
  255. * notice, this list of conditions and the following disclaimer.
  256. *
  257. * 2. Redistributions in binary form must reproduce the above copyright
  258. * notice, this list of conditions and the following disclaimer in
  259. * the documentation and/or other materials provided with the
  260. * distribution.
  261. *
  262. * 3. All advertising materials mentioning features or use of this
  263. * software must display the following acknowledgment:
  264. * "This product includes software developed by the OpenSSL Project
  265. * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
  266. *
  267. * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
  268. * endorse or promote products derived from this software without
  269. * prior written permission. For written permission, please contact
  270. * openssl-core@openssl.org.
  271. *
  272. * 5. Products derived from this software may not be called "OpenSSL"
  273. * nor may "OpenSSL" appear in their names without prior written
  274. * permission of the OpenSSL Project.
  275. *
  276. * 6. Redistributions of any form whatsoever must retain the following
  277. * acknowledgment:
  278. * "This product includes software developed by the OpenSSL Project
  279. * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
  280. *
  281. * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
  282. * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  283. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  284. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
  285. * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  286. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  287. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  288. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  289. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  290. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  291. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
  292. * OF THE POSSIBILITY OF SUCH DAMAGE.
  293. * ====================================================================
  294. *
  295. * This product includes cryptographic software written by Eric Young
  296. * (eay@cryptsoft.com). This product includes software written by Tim
  297. * Hudson (tjh@cryptsoft.com).
  298. *
  299. */
  300. Original SSLeay License
  301. -----------------------
  302. /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  303. * All rights reserved.
  304. *
  305. * This package is an SSL implementation written
  306. * by Eric Young (eay@cryptsoft.com).
  307. * The implementation was written so as to conform with Netscapes SSL.
  308. *
  309. * This library is free for commercial and non-commercial use as long as
  310. * the following conditions are aheared to. The following conditions
  311. * apply to all code found in this distribution, be it the RC4, RSA,
  312. * lhash, DES, etc., code; not just the SSL code. The SSL documentation
  313. * included with this distribution is covered by the same copyright terms
  314. * except that the holder is Tim Hudson (tjh@cryptsoft.com).
  315. *
  316. * Copyright remains Eric Young's, and as such any Copyright notices in
  317. * the code are not to be removed.
  318. * If this package is used in a product, Eric Young should be given attribution
  319. * as the author of the parts of the library used.
  320. * This can be in the form of a textual message at program startup or
  321. * in documentation (online or textual) provided with the package.
  322. *
  323. * Redistribution and use in source and binary forms, with or without
  324. * modification, are permitted provided that the following conditions
  325. * are met:
  326. * 1. Redistributions of source code must retain the copyright
  327. * notice, this list of conditions and the following disclaimer.
  328. * 2. Redistributions in binary form must reproduce the above copyright
  329. * notice, this list of conditions and the following disclaimer in the
  330. * documentation and/or other materials provided with the distribution.
  331. * 3. All advertising materials mentioning features or use of this software
  332. * must display the following acknowledgement:
  333. * "This product includes cryptographic software written by
  334. * Eric Young (eay@cryptsoft.com)"
  335. * The word 'cryptographic' can be left out if the rouines from the library
  336. * being used are not cryptographic related :-).
  337. * 4. If you include any Windows specific code (or a derivative thereof) from
  338. * the apps directory (application code) you must include an acknowledgement:
  339. * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
  340. *
  341. * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
  342. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  343. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  344. * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  345. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  346. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  347. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  348. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  349. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  350. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  351. * SUCH DAMAGE.
  352. *
  353. * The licence and distribution terms for any publically available version or
  354. * derivative of this code cannot be changed. i.e. this code cannot simply be
  355. * copied and put under another distribution licence
  356. * [including the GNU Public Licence.]
  357. */
  358. Qt Open Source Edition
  359. ----------------------
  360. The Qt GUI Toolkit is Copyright (C) 1994-2007 Trolltech ASA.
  361. Qt Open Source Edition is licensed under GPL version 2.
  362. Source code for the library is available at
  363. http://w1.fi/wpa_supplicant/qt4/qt-win-opensource-src-4.3.3.zip