WPS: Parse Request Type from WPS IE in (Re)AssocReq and derive mgmt keys
WPS IE is now passed from hostapd association processing into EAP-WSC and WPS processing. Request Type attribute is parsed from this information and if the request is for a WLAN Manager Registrar, additional management keys are derived (to be used with UPnP).
This commit is contained in:
parent
e9ab39b444
commit
eb76b7e3ff
14 changed files with 115 additions and 12 deletions
|
@ -1167,6 +1167,8 @@ struct eap_sm * eap_server_sm_init(void *eapol_ctx,
|
|||
sm->eap_sim_aka_result_ind = conf->eap_sim_aka_result_ind;
|
||||
sm->tnc = conf->tnc;
|
||||
sm->wps = conf->wps;
|
||||
if (conf->assoc_wps_ie)
|
||||
sm->assoc_wps_ie = wpabuf_dup(conf->assoc_wps_ie);
|
||||
|
||||
wpa_printf(MSG_DEBUG, "EAP: Server state machine created");
|
||||
|
||||
|
@ -1200,6 +1202,7 @@ void eap_server_sm_deinit(struct eap_sm *sm)
|
|||
wpabuf_free(sm->eap_if.aaaEapRespData);
|
||||
os_free(sm->eap_if.aaaEapKeyData);
|
||||
eap_user_free(sm->user);
|
||||
wpabuf_free(sm->assoc_wps_ie);
|
||||
os_free(sm);
|
||||
}
|
||||
|
||||
|
|
|
@ -104,6 +104,7 @@ struct eap_config {
|
|||
int eap_sim_aka_result_ind;
|
||||
int tnc;
|
||||
struct wps_context *wps;
|
||||
const struct wpabuf *assoc_wps_ie;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -182,6 +182,7 @@ struct eap_sm {
|
|||
int eap_sim_aka_result_ind;
|
||||
int tnc;
|
||||
struct wps_context *wps;
|
||||
struct wpabuf *assoc_wps_ie;
|
||||
};
|
||||
|
||||
int eap_user_get(struct eap_sm *sm, const u8 *identity, size_t identity_len,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* EAP-WSC server for Wi-Fi Protected Setup
|
||||
* Copyright (c) 2007, Jouni Malinen <j@w1.fi>
|
||||
* Copyright (c) 2007-2008, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
|
@ -109,6 +109,7 @@ static void * eap_wsc_init(struct eap_sm *sm)
|
|||
cfg.pin = sm->user->password;
|
||||
cfg.pin_len = sm->user->password_len;
|
||||
}
|
||||
cfg.assoc_wps_ie = sm->assoc_wps_ie;
|
||||
data->wps = wps_init(&cfg);
|
||||
if (data->wps == NULL) {
|
||||
os_free(data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue