PASN: Move initiator changes into a separate file

PASN initiator functionality builds auth 1 and auth 3 frames, and
processes auth 2 frame received from the responder. 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 wpa_s 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:18:16 +05:30 committed by Jouni Malinen
parent 975b7a02cb
commit c7edfce79a
7 changed files with 1361 additions and 1301 deletions

View file

@ -1,4 +1,4 @@
SUBDIRS=ap common crypto drivers eapol_auth eapol_supp eap_common eap_peer eap_server l2_packet p2p pae radius rsn_supp tls utils wps
SUBDIRS=ap common crypto drivers eapol_auth eapol_supp eap_common eap_peer eap_server l2_packet p2p pae pasn radius rsn_supp tls utils wps
SUBDIRS += fst
all:

15
src/pasn/Makefile Normal file
View file

@ -0,0 +1,15 @@
CFLAGS += -DCONFIG_SAE
CFLAGS += -DCONFIG_FILS
CFLAGS += -DIEEE8021X_EAPOL
CFLAGS += -DCONFIG_IEEE80211R
CFLAGS += -DCONFIG_TESTING_OPTIONS
CFLAGS += -DCONFIG_SAE_PK
CFLAGS += -DCONFIG_SHA256
CFLAGS += -DCONFIG_SHA384
CFLAGS += -DCONFIG_SHA512
CFLAGS += -DCONFIG_PASN
LIB_OBJS= \
pasn_initiator.o
include ../lib.rules

View file

@ -137,6 +137,19 @@ struct wpas_pasn {
const u8 *pmkid);
};
/* Initiator */
void wpa_pasn_reset(struct wpas_pasn *pasn);
int wpas_pasn_start(struct wpas_pasn *pasn, const u8 *own_addr,
const u8 *bssid, int akmp, int cipher, u16 group,
int freq, const u8 *beacon_rsne, u8 beacon_rsne_len,
const u8 *beacon_rsnxe, u8 beacon_rsnxe_len,
struct wpabuf *comeback);
int wpa_pasn_auth_rx(struct wpas_pasn *pasn, const u8 *data, size_t len,
struct wpa_pasn_params_data *pasn_params);
int wpa_pasn_auth_tx_status(struct wpas_pasn *pasn,
const u8 *data, size_t data_len, u8 acked);
#endif /* CONFIG_PASN */
#ifdef __cplusplus

1330
src/pasn/pasn_initiator.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -383,6 +383,7 @@ NEED_HMAC_SHA384_KDF=y
NEED_SHA256=y
NEED_SHA384=y
OBJS += src/common/ptksa_cache.c
OBJS += src/pasn/pasn_initiator.c
OBJS += pasn_supplicant.c
endif

View file

@ -414,6 +414,7 @@ NEED_HMAC_SHA384_KDF=y
NEED_SHA256=y
NEED_SHA384=y
OBJS += ../src/common/ptksa_cache.o
OBJS += ../src/pasn/pasn_initiator.o
OBJS += pasn_supplicant.o
endif

File diff suppressed because it is too large Load diff