aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/wpa_auth_glue.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-10-09 09:08:12 (GMT)
committerJouni Malinen <j@w1.fi>2017-10-09 09:12:54 (GMT)
commitd90f10fa418521ba787f1e69290ab11df17c8590 (patch)
treef095b1dfa8d4a5ab9cfed2925f73bc9bf6316c5d /src/ap/wpa_auth_glue.c
parent8b5579e17a83b441e2480b2e82f7b85090766697 (diff)
downloadhostap-d90f10fa418521ba787f1e69290ab11df17c8590.zip
hostap-d90f10fa418521ba787f1e69290ab11df17c8590.tar.gz
hostap-d90f10fa418521ba787f1e69290ab11df17c8590.tar.bz2
OWE: PMKSA caching in AP mode
This extends OWE support in hostapd to allow PMKSA caching to be used. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/ap/wpa_auth_glue.c')
-rw-r--r--src/ap/wpa_auth_glue.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c
index a44fd90..412a05d 100644
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
@@ -27,6 +27,7 @@
#include "tkip_countermeasures.h"
#include "ap_drv_ops.h"
#include "ap_config.h"
+#include "pmksa_cache_auth.h"
#include "wpa_auth.h"
#include "wpa_auth_glue.h"
@@ -267,6 +268,16 @@ static const u8 * hostapd_wpa_auth_get_psk(void *ctx, const u8 *addr,
*psk_len = sta->owe_pmk_len;
return sta->owe_pmk;
}
+ if ((hapd->conf->wpa_key_mgmt & WPA_KEY_MGMT_OWE) && sta) {
+ struct rsn_pmksa_cache_entry *sa;
+
+ sa = wpa_auth_sta_get_pmksa(sta->wpa_sm);
+ if (sa && sa->akmp == WPA_KEY_MGMT_OWE) {
+ if (psk_len)
+ *psk_len = sa->pmk_len;
+ return sa->pmk;
+ }
+ }
#endif /* CONFIG_OWE */
psk = hostapd_get_psk(hapd->conf, addr, p2p_dev_addr, prev_psk);