DPP: Move PKEX functionality into a separate source code file

This continues splitting dpp.c into smaller pieces.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-05-10 16:51:46 +03:00 committed by Jouni Malinen
parent 87b6572616
commit d4ae12355a
8 changed files with 1352 additions and 1303 deletions

View File

@ -538,6 +538,7 @@ ifdef CONFIG_DPP
L_CFLAGS += -DCONFIG_DPP L_CFLAGS += -DCONFIG_DPP
OBJS += src/common/dpp.c OBJS += src/common/dpp.c
OBJS += src/common/dpp_crypto.c OBJS += src/common/dpp_crypto.c
OBJS += src/common/dpp_pkex.c
OBJS += src/ap/dpp_hostapd.c OBJS += src/ap/dpp_hostapd.c
OBJS += src/ap/gas_query_ap.c OBJS += src/ap/gas_query_ap.c
NEED_AES_SIV=y NEED_AES_SIV=y

View File

@ -569,6 +569,7 @@ ifdef CONFIG_DPP
CFLAGS += -DCONFIG_DPP CFLAGS += -DCONFIG_DPP
OBJS += ../src/common/dpp.o OBJS += ../src/common/dpp.o
OBJS += ../src/common/dpp_crypto.o OBJS += ../src/common/dpp_crypto.o
OBJS += ../src/common/dpp_pkex.o
OBJS += ../src/ap/dpp_hostapd.o OBJS += ../src/ap/dpp_hostapd.o
OBJS += ../src/ap/gas_query_ap.o OBJS += ../src/ap/gas_query_ap.o
NEED_AES_SIV=y NEED_AES_SIV=y

File diff suppressed because it is too large Load Diff

View File

@ -12,6 +12,25 @@
#ifdef CONFIG_DPP #ifdef CONFIG_DPP
struct dpp_global {
void *msg_ctx;
struct dl_list bootstrap; /* struct dpp_bootstrap_info */
struct dl_list configurator; /* struct dpp_configurator */
#ifdef CONFIG_DPP2
struct dl_list controllers; /* struct dpp_relay_controller */
struct dpp_controller *controller;
struct dl_list tcp_init; /* struct dpp_connection */
void *cb_ctx;
int (*process_conf_obj)(void *ctx, struct dpp_authentication *auth);
void (*remove_bi)(void *ctx, struct dpp_bootstrap_info *bi);
#endif /* CONFIG_DPP2 */
};
/* dpp.c */
void dpp_build_attr_status(struct wpabuf *msg, enum dpp_status_error status);
unsigned int dpp_next_id(struct dpp_global *dpp);
/* dpp_crypto.c */ /* dpp_crypto.c */
struct dpp_signed_connector_info { struct dpp_signed_connector_info {

1324
src/common/dpp_pkex.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -22,6 +22,7 @@ OBJS += $(SRC)/crypto/sha512-kdf.o
OBJS += $(SRC)/tls/asn1.o OBJS += $(SRC)/tls/asn1.o
OBJS += $(SRC)/common/dpp.o OBJS += $(SRC)/common/dpp.o
OBJS += $(SRC)/common/dpp_crypto.o OBJS += $(SRC)/common/dpp_crypto.o
OBJS += $(SRC)/common/dpp_pkex.o
dpp-uri: dpp-uri.o $(OBJS) $(LIBS) dpp-uri: dpp-uri.o $(OBJS) $(LIBS)
$(LDO) $(LDFLAGS) -o $@ $^ -lcrypto $(LDO) $(LDFLAGS) -o $@ $^ -lcrypto

View File

@ -248,6 +248,7 @@ ifdef CONFIG_DPP
L_CFLAGS += -DCONFIG_DPP L_CFLAGS += -DCONFIG_DPP
OBJS += src/common/dpp.c OBJS += src/common/dpp.c
OBJS += src/common/dpp_crypto.c OBJS += src/common/dpp_crypto.c
OBJS += src/common/dpp_pkex.c
OBJS += dpp_supplicant.c OBJS += dpp_supplicant.c
NEED_AES_SIV=y NEED_AES_SIV=y
NEED_HMAC_SHA256_KDF=y NEED_HMAC_SHA256_KDF=y

View File

@ -280,6 +280,7 @@ ifdef CONFIG_DPP
CFLAGS += -DCONFIG_DPP CFLAGS += -DCONFIG_DPP
OBJS += ../src/common/dpp.o OBJS += ../src/common/dpp.o
OBJS += ../src/common/dpp_crypto.o OBJS += ../src/common/dpp_crypto.o
OBJS += ../src/common/dpp_pkex.o
OBJS += dpp_supplicant.o OBJS += dpp_supplicant.o
NEED_AES_SIV=y NEED_AES_SIV=y
NEED_HMAC_SHA256_KDF=y NEED_HMAC_SHA256_KDF=y