aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ap_drv_ops.c
diff options
context:
space:
mode:
authorJeffin Mammen <jmammen@qti.qualcomm.com>2017-04-21 17:43:57 (GMT)
committerJouni Malinen <j@w1.fi>2017-04-23 14:47:15 (GMT)
commit8acbf85fa2b4a1538d5d3b973c7f75f84bdc5617 (patch)
tree96e072eb4445e91861a2fc857f95ed7c45c68a73 /src/ap/ap_drv_ops.c
parentf46c154c59e7398006ed278ffb49f31347fdad3c (diff)
downloadhostap-8acbf85fa2b4a1538d5d3b973c7f75f84bdc5617.zip
hostap-8acbf85fa2b4a1538d5d3b973c7f75f84bdc5617.tar.gz
hostap-8acbf85fa2b4a1538d5d3b973c7f75f84bdc5617.tar.bz2
FILS: Add FILS AEAD parameters for sta_auth() calls
This is used with partial AP SME in driver cases to enable FILS association (AES-SIV) processing. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/ap/ap_drv_ops.c')
-rw-r--r--src/ap/ap_drv_ops.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index b60f770..c1861cb 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -19,6 +19,7 @@
#include "ap_config.h"
#include "p2p_hostapd.h"
#include "hs20.h"
+#include "wpa_auth.h"
#include "ap_drv_ops.h"
@@ -348,12 +349,35 @@ int hostapd_sta_auth(struct hostapd_data *hapd, const u8 *addr,
u16 seq, u16 status, const u8 *ie, size_t len)
{
struct wpa_driver_sta_auth_params params;
+#ifdef CONFIG_FILS
+ struct sta_info *sta;
+#endif /* CONFIG_FILS */
if (hapd->driver == NULL || hapd->driver->sta_auth == NULL)
return 0;
os_memset(&params, 0, sizeof(params));
+#ifdef CONFIG_FILS
+ sta = ap_get_sta(hapd, addr);
+ if (!sta) {
+ wpa_printf(MSG_DEBUG, "Station " MACSTR
+ " not found for sta_auth processing",
+ MAC2STR(addr));
+ return 0;
+ }
+
+ if (sta->auth_alg == WLAN_AUTH_FILS_SK ||
+ sta->auth_alg == WLAN_AUTH_FILS_SK_PFS ||
+ sta->auth_alg == WLAN_AUTH_FILS_PK) {
+ params.fils_auth = 1;
+ wpa_auth_get_fils_aead_params(sta->wpa_sm, params.fils_anonce,
+ params.fils_snonce,
+ params.fils_kek,
+ &params.fils_kek_len);
+ }
+#endif /* CONFIG_FILS */
+
params.own_addr = hapd->own_addr;
params.addr = addr;
params.seq = seq;