]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPA: Add a function to get PMKSA cache entry
authorIlan Peer <ilan.peer@intel.com>
Wed, 16 Dec 2020 11:00:25 +0000 (13:00 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 25 Jan 2021 16:36:40 +0000 (18:36 +0200)
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
src/rsn_supp/wpa.c
src/rsn_supp/wpa.h

index 7f10956a52bc1c1aa26ac715b090dee2bffcd682..0f348b04c5d795d07cc6b6636b016dc52b4a198e 100644 (file)
@@ -3786,6 +3786,16 @@ int wpa_sm_pmksa_exists(struct wpa_sm *sm, const u8 *bssid,
 }
 
 
+struct rsn_pmksa_cache_entry * wpa_sm_pmksa_cache_get(struct wpa_sm *sm,
+                                                     const u8 *aa,
+                                                     const u8 *pmkid,
+                                                     const void *network_ctx,
+                                                     int akmp)
+{
+       return pmksa_cache_get(sm->pmksa, aa, pmkid, network_ctx, akmp);
+}
+
+
 void wpa_sm_drop_sa(struct wpa_sm *sm)
 {
        wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: Clear old PMK and PTK");
index fda3979dff96e1fb4138566df1cdd1ae8695303f..80531eb513f17bcf33f64c29966f9d701864acfe 100644 (file)
@@ -190,6 +190,11 @@ void wpa_sm_pmksa_cache_add(struct wpa_sm *sm, const u8 *pmk, size_t pmk_len,
 int wpa_sm_pmksa_exists(struct wpa_sm *sm, const u8 *bssid,
                        const void *network_ctx);
 void wpa_sm_drop_sa(struct wpa_sm *sm);
+struct rsn_pmksa_cache_entry * wpa_sm_pmksa_cache_get(struct wpa_sm *sm,
+                                                     const u8 *aa,
+                                                     const u8 *pmkid,
+                                                     const void *network_ctx,
+                                                     int akmp);
 int wpa_sm_has_ptk(struct wpa_sm *sm);
 int wpa_sm_has_ptk_installed(struct wpa_sm *sm);
 
@@ -366,6 +371,13 @@ static inline void wpa_sm_drop_sa(struct wpa_sm *sm)
 {
 }
 
+static inline struct rsn_pmksa_cache_entry *
+wpa_sm_pmksa_cache_get(struct wpa_sm *sm, const u8 *aa, const u8 *pmkid,
+                      const void *network_ctx, int akmp)
+{
+       return NULL;
+}
+
 static inline int wpa_sm_has_ptk(struct wpa_sm *sm)
 {
        return 0;