aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-01-03 18:18:35 (GMT)
committerJouni Malinen <j@w1.fi>2009-01-03 18:18:35 (GMT)
commitc5adf528a2d9a35ac3fb7376ada2187ff5582c7f (patch)
treec188a9379e698839abcdd825868129c58e943b49 /src/eap_peer
parent41c00105f254344cb352963bc5d11e2322b93886 (diff)
downloadhostap-06-c5adf528a2d9a35ac3fb7376ada2187ff5582c7f.zip
hostap-06-c5adf528a2d9a35ac3fb7376ada2187ff5582c7f.tar.gz
hostap-06-c5adf528a2d9a35ac3fb7376ada2187ff5582c7f.tar.bz2
Moved WPS Registrar initialization from EAP peer to wps_supplicant.c
This matches the style used in hostapd, i.e., Registrar is initialized only once and callbacks are now processed in wps_supplicant.c.
Diffstat (limited to 'src/eap_peer')
-rw-r--r--src/eap_peer/eap_wsc.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/eap_peer/eap_wsc.c b/src/eap_peer/eap_wsc.c
index 7d52181..35c9cce 100644
--- a/src/eap_peer/eap_wsc.c
+++ b/src/eap_peer/eap_wsc.c
@@ -65,38 +65,6 @@ static void eap_wsc_state(struct eap_wsc_data *data, int state)
}
-static int eap_wsc_new_psk_cb(void *ctx, const u8 *mac_addr, const u8 *psk,
- size_t psk_len)
-{
- wpa_printf(MSG_DEBUG, "EAP-WSC: Received new WPA/WPA2-PSK from WPS for"
- " STA " MACSTR, MAC2STR(mac_addr));
- wpa_hexdump_key(MSG_DEBUG, "Per-device PSK", psk, psk_len);
-
- /* TODO */
-
- return 0;
-}
-
-
-static void eap_wsc_pin_needed_cb(void *ctx, const u8 *uuid_e,
- const struct wps_device_data *dev)
-{
- char uuid[40], txt[400];
- int len;
- if (uuid_bin2str(uuid_e, uuid, sizeof(uuid)))
- return;
- wpa_printf(MSG_DEBUG, "EAP-WSC: PIN needed for E-UUID %s", uuid);
- len = os_snprintf(txt, sizeof(txt), "WPS-EVENT-PIN-NEEDED "
- "%s " MACSTR " [%s|%s|%s|%s|%s|%d-%08X-%d]",
- uuid, MAC2STR(dev->mac_addr), dev->device_name,
- dev->manufacturer, dev->model_name,
- dev->model_number, dev->serial_number,
- dev->categ, dev->oui, dev->sub_categ);
- if (len > 0 && len < (int) sizeof(txt))
- wpa_printf(MSG_INFO, "%s", txt);
-}
-
-
static void * eap_wsc_init(struct eap_sm *sm)
{
struct eap_wsc_data *data;
@@ -135,29 +103,6 @@ static void * eap_wsc_init(struct eap_sm *sm)
data->registrar = registrar;
data->wps_ctx = wps;
- if (registrar) {
- struct wps_registrar_config rcfg;
-
- wps->auth_types = WPS_AUTH_WPA2PSK | WPS_AUTH_WPAPSK;
- wps->encr_types = WPS_ENCR_AES | WPS_ENCR_TKIP;
-
- os_memset(&rcfg, 0, sizeof(rcfg));
- rcfg.new_psk_cb = eap_wsc_new_psk_cb;
- rcfg.pin_needed_cb = eap_wsc_pin_needed_cb;
- rcfg.cb_ctx = data;
-
- wps->registrar = wps_registrar_init(wps, &rcfg);
- if (wps->registrar == NULL) {
- wpa_printf(MSG_DEBUG, "EAP-WSC: Failed to initialize "
- "WPS Registrar");
- os_free(wps->network_key);
- os_free(wps);
- os_free(data);
- return NULL;
- }
-
- }
-
os_memset(&cfg, 0, sizeof(cfg));
cfg.wps = wps;
cfg.registrar = registrar;
@@ -212,8 +157,6 @@ static void eap_wsc_deinit(struct eap_sm *sm, void *priv)
wpabuf_free(data->in_buf);
wpabuf_free(data->out_buf);
wps_deinit(data->wps);
- wps_registrar_deinit(data->wps_ctx->registrar);
- data->wps_ctx->registrar = NULL;
os_free(data->wps_ctx->network_key);
data->wps_ctx->network_key = NULL;
os_free(data);