PASN: Move responder functionality into a separate file

PASN responder validates auth 1 frame and sends auth 2 frame to the
initiator. It analyses the auth 3 frame and verifies successful
authentication. Wi-Fi Aware modules can reuse this functionality through
a shared library libpasn.so generated from this code. Move the PASN
functionality that is now decoupled from the hapd context into a
separate file in a common directory to make it easier to build such a
library.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Vinay Gannevaram 2022-10-30 18:40:07 +05:30 committed by Jouni Malinen
parent c7edfce79a
commit 78c5bb7f50
8 changed files with 1017 additions and 977 deletions

View file

@ -1037,6 +1037,7 @@ ifdef NEED_AP_MLME
OBJS += src/ap/wmm.c OBJS += src/ap/wmm.c
OBJS += src/ap/ap_list.c OBJS += src/ap/ap_list.c
OBJS += src/ap/comeback_token.c OBJS += src/ap/comeback_token.c
OBJS += src/pasn/pasn_responder.c
OBJS += src/ap/ieee802_11.c OBJS += src/ap/ieee802_11.c
OBJS += src/ap/hw_features.c OBJS += src/ap/hw_features.c
OBJS += src/ap/dfs.c OBJS += src/ap/dfs.c

View file

@ -1183,6 +1183,7 @@ ifdef NEED_AP_MLME
OBJS += ../src/ap/wmm.o OBJS += ../src/ap/wmm.o
OBJS += ../src/ap/ap_list.o OBJS += ../src/ap/ap_list.o
OBJS += ../src/ap/comeback_token.o OBJS += ../src/ap/comeback_token.o
OBJS += ../src/pasn/pasn_responder.o
OBJS += ../src/ap/ieee802_11.o OBJS += ../src/ap/ieee802_11.o
OBJS += ../src/ap/hw_features.o OBJS += ../src/ap/hw_features.o
OBJS += ../src/ap/dfs.o OBJS += ../src/ap/dfs.o

File diff suppressed because it is too large Load diff

View file

@ -10,6 +10,7 @@ CFLAGS += -DCONFIG_SHA512
CFLAGS += -DCONFIG_PASN CFLAGS += -DCONFIG_PASN
LIB_OBJS= \ LIB_OBJS= \
pasn_initiator.o pasn_initiator.o \
pasn_responder.o
include ../lib.rules include ../lib.rules

View file

@ -150,6 +150,17 @@ int wpa_pasn_auth_rx(struct wpas_pasn *pasn, const u8 *data, size_t len,
int wpa_pasn_auth_tx_status(struct wpas_pasn *pasn, int wpa_pasn_auth_tx_status(struct wpas_pasn *pasn,
const u8 *data, size_t data_len, u8 acked); const u8 *data, size_t data_len, u8 acked);
/* Responder */
int handle_auth_pasn_1(struct wpas_pasn *pasn,
const u8 *own_addr, const u8 *peer_addr,
const struct ieee80211_mgmt *mgmt, size_t len);
int handle_auth_pasn_3(struct wpas_pasn *pasn, const u8 *own_addr,
const u8 *peer_addr,
const struct ieee80211_mgmt *mgmt, size_t len);
int handle_auth_pasn_resp(struct wpas_pasn *pasn, const u8 *own_addr,
const u8 *peer_addr,
struct rsn_pmksa_cache_entry *pmksa, u16 status);
#endif /* CONFIG_PASN */ #endif /* CONFIG_PASN */
#ifdef __cplusplus #ifdef __cplusplus

1000
src/pasn/pasn_responder.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -950,6 +950,7 @@ ifdef NEED_AP_MLME
OBJS += src/ap/wmm.c OBJS += src/ap/wmm.c
OBJS += src/ap/ap_list.c OBJS += src/ap/ap_list.c
OBJS += src/ap/comeback_token.c OBJS += src/ap/comeback_token.c
OBJS += src/pasn/pasn_responder.c
OBJS += src/ap/ieee802_11.c OBJS += src/ap/ieee802_11.c
OBJS += src/ap/hw_features.c OBJS += src/ap/hw_features.c
OBJS += src/ap/dfs.c OBJS += src/ap/dfs.c

View file

@ -985,6 +985,7 @@ ifdef NEED_AP_MLME
OBJS += ../src/ap/wmm.o OBJS += ../src/ap/wmm.o
OBJS += ../src/ap/ap_list.o OBJS += ../src/ap/ap_list.o
OBJS += ../src/ap/comeback_token.o OBJS += ../src/ap/comeback_token.o
OBJS += ../src/pasn/pasn_responder.o
OBJS += ../src/ap/ieee802_11.o OBJS += ../src/ap/ieee802_11.o
OBJS += ../src/ap/hw_features.o OBJS += ../src/ap/hw_features.o
OBJS += ../src/ap/dfs.o OBJS += ../src/ap/dfs.o