#include "fils_hlp.h"
#include "dpp_hostapd.h"
#include "gas_query_ap.h"
+#include "pasn/pasn_common.h"
#ifdef CONFIG_FILS
struct sta_info *sta,
struct wpabuf *wd)
{
- struct pasn_data *pasn = sta->pasn;
+ struct wpas_pasn *pasn = sta->pasn;
const char *password;
const u8 *data;
size_t buf_len;
struct sta_info *sta,
struct wpabuf *wd)
{
- struct pasn_data *pasn = sta->pasn;
+ struct wpas_pasn *pasn = sta->pasn;
const u8 *data;
size_t buf_len;
u16 res, alg, seq, status;
static struct wpabuf * pasn_get_sae_wd(struct hostapd_data *hapd,
struct sta_info *sta)
{
- struct pasn_data *pasn = sta->pasn;
+ struct wpas_pasn *pasn = sta->pasn;
struct wpabuf *buf = NULL;
u8 *len_ptr;
size_t len;
static struct wpabuf * pasn_get_fils_wd(struct hostapd_data *hapd,
struct sta_info *sta)
{
- struct pasn_data *pasn = sta->pasn;
- struct pasn_fils_data *fils = &pasn->fils;
+ struct wpas_pasn *pasn = sta->pasn;
+ struct pasn_fils *fils = &pasn->fils;
struct wpabuf *buf = NULL;
if (!fils->erp_resp) {
struct wpabuf *erp_resp,
const u8 *msk, size_t msk_len)
{
- struct pasn_data *pasn = sta->pasn;
- struct pasn_fils_data *fils = &pasn->fils;
+ struct wpas_pasn *pasn = sta->pasn;
+ struct pasn_fils *fils = &pasn->fils;
u8 pmk[PMK_LEN_MAX];
size_t pmk_len;
int ret;
wpa_printf(MSG_DEBUG, "PASN: FILS: RADIUS is not configured. Fail");
return -1;
#else /* CONFIG_NO_RADIUS */
- struct pasn_data *pasn = sta->pasn;
- struct pasn_fils_data *fils = &pasn->fils;
+ struct wpas_pasn *pasn = sta->pasn;
+ struct pasn_fils *fils = &pasn->fils;
struct ieee802_11_elems elems;
struct wpa_ie_data rsne_data;
struct wpabuf *fils_wd;
#include "common/ieee802_11_defs.h"
#include "common/sae.h"
#include "crypto/sha384.h"
+#include "pasn/pasn_common.h"
/* STA flags */
#define WLAN_STA_AUTH BIT(0)
enum frame_encryption encrypted;
};
-enum pasn_fils_state {
- PASN_FILS_STATE_NONE = 0,
- PASN_FILS_STATE_PENDING_AS,
- PASN_FILS_STATE_COMPLETE
-};
-
-struct pasn_fils_data {
- u8 state;
- u8 nonce[FILS_NONCE_LEN];
- u8 anonce[FILS_NONCE_LEN];
- u8 session[FILS_SESSION_LEN];
- u8 erp_pmkid[PMKID_LEN];
-
- struct wpabuf *erp_resp;
-};
-
-struct pasn_data {
- int akmp;
- int cipher;
- u16 group;
- bool secure_ltf;
- u8 trans_seq;
- u8 wrapped_data_format;
- size_t kdk_len;
-
- u8 hash[SHA384_MAC_LEN];
- struct wpa_ptk ptk;
- struct crypto_ecdh *ecdh;
-
- struct wpabuf *secret;
-#ifdef CONFIG_SAE
- struct sae_data sae;
-#endif /* CONFIG_SAE */
-#ifdef CONFIG_FILS
- struct pasn_fils_data fils;
-#endif /* CONFIG_FILS */
-};
-
struct sta_info {
struct sta_info *next; /* next entry in sta list */
struct sta_info *hnext; /* next entry in hash table list */
#endif /* CONFIG_AIRTIME_POLICY */
#ifdef CONFIG_PASN
- struct pasn_data *pasn;
+ struct wpas_pasn *pasn;
#endif /* CONFIG_PASN */
};
#ifdef CONFIG_PASN
+enum pasn_fils_state {
+ PASN_FILS_STATE_NONE = 0,
+ PASN_FILS_STATE_PENDING_AS,
+ PASN_FILS_STATE_COMPLETE
+};
+
struct pasn_fils {
+ u8 state;
u8 nonce[FILS_NONCE_LEN];
u8 anonce[FILS_NONCE_LEN];
u8 session[FILS_SESSION_LEN];
u8 erp_pmkid[PMKID_LEN];
bool completed;
+ struct wpabuf *erp_resp;
};
struct wpas_pasn {
u16 rsnxe_capab;
int network_id;
+ u8 wrapped_data_format;
+ struct wpabuf *secret;
+
/**
* send_mgmt - Function handler to transmit a Management frame
* @ctx: Callback context from cb_ctx