aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpas_glue.c
diff options
context:
space:
mode:
authorVidyullatha Kanchanapally <vkanchan@qti.qualcomm.com>2017-03-30 13:57:15 (GMT)
committerJouni Malinen <j@w1.fi>2017-04-07 15:46:13 (GMT)
commit42e69bda2aa0752a3a18714728d0d06bb20ad152 (patch)
treee3ceb61a9a1d9f3f5cbe08374153302d755bf16c /wpa_supplicant/wpas_glue.c
parent061a3d3d5300cd7b62a9a0431e3dda9758d5a8bc (diff)
downloadhostap-42e69bda2aa0752a3a18714728d0d06bb20ad152.zip
hostap-42e69bda2aa0752a3a18714728d0d06bb20ad152.tar.gz
hostap-42e69bda2aa0752a3a18714728d0d06bb20ad152.tar.bz2
FILS: Add support for Cache Identifier in add/remove PMKSA
Add support for setting and deleting PMKSA cache entries based on FILS Cache Identifer. Also additionally add support for sending PMK as part of SET_PMKSA to enable driver to derive keys in case of FILS shared key offload using PMKSA caching. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/wpas_glue.c')
-rw-r--r--wpa_supplicant/wpas_glue.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c
index 71dfbc3..fb38396 100644
--- a/wpa_supplicant/wpas_glue.c
+++ b/wpa_supplicant/wpas_glue.c
@@ -530,7 +530,9 @@ static struct wpa_ssid * wpas_get_network_ctx(struct wpa_supplicant *wpa_s,
static int wpa_supplicant_add_pmkid(void *_wpa_s, void *network_ctx,
- const u8 *bssid, const u8 *pmkid)
+ const u8 *bssid, const u8 *pmkid,
+ const u8 *fils_cache_id,
+ const u8 *pmk, size_t pmk_len)
{
struct wpa_supplicant *wpa_s = _wpa_s;
struct wpa_ssid *ssid;
@@ -541,15 +543,25 @@ static int wpa_supplicant_add_pmkid(void *_wpa_s, void *network_ctx,
if (ssid)
wpa_msg(wpa_s, MSG_INFO, PMKSA_CACHE_ADDED MACSTR " %d",
MAC2STR(bssid), ssid->id);
- params.bssid = bssid;
+ if (ssid && fils_cache_id) {
+ params.ssid = ssid->ssid;
+ params.ssid_len = ssid->ssid_len;
+ params.fils_cache_id = fils_cache_id;
+ } else {
+ params.bssid = bssid;
+ }
+
params.pmkid = pmkid;
+ params.pmk = pmk;
+ params.pmk_len = pmk_len;
return wpa_drv_add_pmkid(wpa_s, &params);
}
static int wpa_supplicant_remove_pmkid(void *_wpa_s, void *network_ctx,
- const u8 *bssid, const u8 *pmkid)
+ const u8 *bssid, const u8 *pmkid,
+ const u8 *fils_cache_id)
{
struct wpa_supplicant *wpa_s = _wpa_s;
struct wpa_ssid *ssid;
@@ -560,8 +572,14 @@ static int wpa_supplicant_remove_pmkid(void *_wpa_s, void *network_ctx,
if (ssid)
wpa_msg(wpa_s, MSG_INFO, PMKSA_CACHE_REMOVED MACSTR " %d",
MAC2STR(bssid), ssid->id);
+ if (ssid && fils_cache_id) {
+ params.ssid = ssid->ssid;
+ params.ssid_len = ssid->ssid_len;
+ params.fils_cache_id = fils_cache_id;
+ } else {
+ params.bssid = bssid;
+ }
- params.bssid = bssid;
params.pmkid = pmkid;
return wpa_drv_remove_pmkid(wpa_s, &params);