#include "utils/includes.h"
#include "utils/common.h"
#include "utils/eloop.h"
#include "eapol_auth/eapol_auth_sm.h"
#include "eapol_auth/eapol_auth_sm_i.h"
#include "sta_info.h"
#include "ap_config.h"
#include "pmksa_cache_auth.h"
Go to the source code of this file.
Classes | |
struct | rsn_pmksa_cache |
Defines | |
#define | PMKID_HASH(pmkid) (unsigned int) ((pmkid)[0] & 0x7f) |
#define | PMKID_HASH_SIZE 128 |
Functions | |
static void | _pmksa_cache_free_entry (struct rsn_pmksa_cache_entry *entry) |
struct rsn_pmksa_cache_entry * | pmksa_cache_add_okc (struct rsn_pmksa_cache *pmksa, const struct rsn_pmksa_cache_entry *old_entry, const u8 *aa, const u8 *pmkid) |
struct rsn_pmksa_cache_entry * | pmksa_cache_auth_add (struct rsn_pmksa_cache *pmksa, const u8 *pmk, size_t pmk_len, const u8 *aa, const u8 *spa, int session_timeout, struct eapol_state_machine *eapol, int akmp) |
void | pmksa_cache_auth_deinit (struct rsn_pmksa_cache *pmksa) |
struct rsn_pmksa_cache_entry * | pmksa_cache_auth_get (struct rsn_pmksa_cache *pmksa, const u8 *spa, const u8 *pmkid) |
struct rsn_pmksa_cache * | pmksa_cache_auth_init (void(*free_cb)(struct rsn_pmksa_cache_entry *entry, void *ctx), void *ctx) |
static void | pmksa_cache_expire (void *eloop_ctx, void *timeout_ctx) |
static void | pmksa_cache_free_entry (struct rsn_pmksa_cache *pmksa, struct rsn_pmksa_cache_entry *entry) |
static void | pmksa_cache_from_eapol_data (struct rsn_pmksa_cache_entry *entry, struct eapol_state_machine *eapol) |
struct rsn_pmksa_cache_entry * | pmksa_cache_get_okc (struct rsn_pmksa_cache *pmksa, const u8 *aa, const u8 *spa, const u8 *pmkid) |
static void | pmksa_cache_link_entry (struct rsn_pmksa_cache *pmksa, struct rsn_pmksa_cache_entry *entry) |
static void | pmksa_cache_set_expiration (struct rsn_pmksa_cache *pmksa) |
void | pmksa_cache_to_eapol_data (struct rsn_pmksa_cache_entry *entry, struct eapol_state_machine *eapol) |
Variables | |
static const int | dot11RSNAConfigPMKLifetime = 43200 |
static const int | pmksa_cache_max_entries = 1024 |
#define PMKID_HASH | ( | pmkid | ) | (unsigned int) ((pmkid)[0] & 0x7f) |
Definition at line 31 of file pmksa_cache_auth.c.
#define PMKID_HASH_SIZE 128 |
Definition at line 30 of file pmksa_cache_auth.c.
static void _pmksa_cache_free_entry | ( | struct rsn_pmksa_cache_entry * | entry | ) | [static] |
Definition at line 44 of file pmksa_cache_auth.c.
struct rsn_pmksa_cache_entry* pmksa_cache_add_okc | ( | struct rsn_pmksa_cache * | pmksa, | |
const struct rsn_pmksa_cache_entry * | old_entry, | |||
const u8 * | aa, | |||
const u8 * | pmkid | |||
) | [read] |
Definition at line 284 of file pmksa_cache_auth.c.
struct rsn_pmksa_cache_entry* pmksa_cache_auth_add | ( | struct rsn_pmksa_cache * | pmksa, | |
const u8 * | pmk, | |||
size_t | pmk_len, | |||
const u8 * | aa, | |||
const u8 * | spa, | |||
int | session_timeout, | |||
struct eapol_state_machine * | eapol, | |||
int | akmp | |||
) | [read] |
pmksa_cache_auth_add - Add a PMKSA cache entry : Pointer to PMKSA cache data from pmksa_cache_auth_init() : The new pairwise master key : PMK length in bytes, usually PMK_LEN (32) : Authenticator address : Supplicant address : Session timeout : Pointer to EAPOL state machine data : WPA_KEY_MGMT_* used in key derivation Returns: Pointer to the added PMKSA cache entry or NULL on error
This function create a PMKSA entry for a new PMK and adds it to the PMKSA cache. If an old entry is already in the cache for the same Supplicant, this entry will be replaced with the new entry. PMKID will be calculated based on the PMK.
Definition at line 235 of file pmksa_cache_auth.c.
void pmksa_cache_auth_deinit | ( | struct rsn_pmksa_cache * | pmksa | ) |
pmksa_cache_auth_deinit - Free all entries in PMKSA cache : Pointer to PMKSA cache data from pmksa_cache_auth_init()
Definition at line 325 of file pmksa_cache_auth.c.
struct rsn_pmksa_cache_entry* pmksa_cache_auth_get | ( | struct rsn_pmksa_cache * | pmksa, | |
const u8 * | spa, | |||
const u8 * | pmkid | |||
) | [read] |
pmksa_cache_auth_get - Fetch a PMKSA cache entry : Pointer to PMKSA cache data from pmksa_cache_auth_init() : Supplicant address or NULL to match any : PMKID or NULL to match any Returns: Pointer to PMKSA cache entry or NULL if no match was found
Definition at line 354 of file pmksa_cache_auth.c.
struct rsn_pmksa_cache* pmksa_cache_auth_init | ( | void(*)(struct rsn_pmksa_cache_entry *entry, void *ctx) | free_cb, | |
void * | ctx | |||
) | [read] |
pmksa_cache_auth_init - Initialize PMKSA cache : Callback function to be called when a PMKSA cache entry is freed : Context pointer for free_cb function Returns: Pointer to PMKSA cache data or NULL on failure
Definition at line 413 of file pmksa_cache_auth.c.
static void pmksa_cache_expire | ( | void * | eloop_ctx, | |
void * | timeout_ctx | |||
) | [static] |
Definition at line 96 of file pmksa_cache_auth.c.
static void pmksa_cache_free_entry | ( | struct rsn_pmksa_cache * | pmksa, | |
struct rsn_pmksa_cache_entry * | entry | |||
) | [static] |
Definition at line 56 of file pmksa_cache_auth.c.
static void pmksa_cache_from_eapol_data | ( | struct rsn_pmksa_cache_entry * | entry, | |
struct eapol_state_machine * | eapol | |||
) | [static] |
Definition at line 130 of file pmksa_cache_auth.c.
struct rsn_pmksa_cache_entry* pmksa_cache_get_okc | ( | struct rsn_pmksa_cache * | pmksa, | |
const u8 * | aa, | |||
const u8 * | spa, | |||
const u8 * | pmkid | |||
) | [read] |
pmksa_cache_get_okc - Fetch a PMKSA cache entry using OKC : Pointer to PMKSA cache data from pmksa_cache_auth_init() : Authenticator address : Supplicant address : PMKID Returns: Pointer to PMKSA cache entry or NULL if no match was found
Use opportunistic key caching (OKC) to find a PMK for a supplicant.
Definition at line 385 of file pmksa_cache_auth.c.
static void pmksa_cache_link_entry | ( | struct rsn_pmksa_cache * | pmksa, | |
struct rsn_pmksa_cache_entry * | entry | |||
) | [static] |
Definition at line 186 of file pmksa_cache_auth.c.
static void pmksa_cache_set_expiration | ( | struct rsn_pmksa_cache * | pmksa | ) | [static] |
Definition at line 114 of file pmksa_cache_auth.c.
void pmksa_cache_to_eapol_data | ( | struct rsn_pmksa_cache_entry * | entry, | |
struct eapol_state_machine * | eapol | |||
) |
Definition at line 154 of file pmksa_cache_auth.c.
const int dot11RSNAConfigPMKLifetime = 43200 [static] |
Definition at line 27 of file pmksa_cache_auth.c.
const int pmksa_cache_max_entries = 1024 [static] |
Definition at line 26 of file pmksa_cache_auth.c.