WPS: Make testing operations configurable at runtime
authorJouni Malinen <jouni.malinen@atheros.com>
Wed, 22 Sep 2010 02:51:23 +0000 (19:51 -0700)
committerJouni Malinen <j@w1.fi>
Wed, 22 Sep 2010 02:51:23 +0000 (19:51 -0700)
commitb4e34f2fdf2d6c5b5f33a412908a3d1aa7d13f56
treeb8079b0ba39ba5c4904e49fe6ee1d6200d341344
parentab98525399f65fb90bb77f48882be1ed9ddacdf9
WPS: Make testing operations configurable at runtime

Instead of build time options (CONFIG_WPS_TESTING_EXTRA_CRED and
CONFIG_WPS_EXTENSIBILITY_TESTING), use a single build option
(CONFIG_WPS_TESTING) and runtime configuration of which testing
operations are enabled. This allows a single binary to be used
for various tests.

The runtime configuration can be done through control interface
with wpa_cli/hostapd_cli commands:
Enable extensibility tests:
set wps_version_number 0x57
Disable extensibility tests (WPS2 build):
set wps_version_number 0x20
Enable extra credential tests:
set wps_testing_dummy_cred 1
Disable extra credential tests:
set wps_testing_dummy_cred 0
hostapd/Makefile
hostapd/ctrl_iface.c
hostapd/hostapd_cli.c
src/wps/wps.c
src/wps/wps_attr_build.c
src/wps/wps_defs.h
src/wps/wps_registrar.c
wpa_supplicant/Makefile
wpa_supplicant/ctrl_iface.c