DPP3: Add build option for version 3 functionality
CONFIG_DPP3=y can now be used to configure hostapd and wpa_supplicant builds to include DPP version 3 functionality. This functionality is still under design and the implementation is experimental and not suitable to be enabled in production uses before the specification has been finalized. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
14ab4a816c
commit
77ddd38b66
11 changed files with 51 additions and 9 deletions
|
@ -567,6 +567,9 @@ NEED_ASN1=y
|
||||||
ifdef CONFIG_DPP2
|
ifdef CONFIG_DPP2
|
||||||
L_CFLAGS += -DCONFIG_DPP2
|
L_CFLAGS += -DCONFIG_DPP2
|
||||||
endif
|
endif
|
||||||
|
ifdef CONFIG_DPP3
|
||||||
|
L_CFLAGS += -DCONFIG_DPP3
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_PASN
|
ifdef CONFIG_PASN
|
||||||
|
|
|
@ -593,6 +593,9 @@ NEED_ASN1=y
|
||||||
ifdef CONFIG_DPP2
|
ifdef CONFIG_DPP2
|
||||||
CFLAGS += -DCONFIG_DPP2
|
CFLAGS += -DCONFIG_DPP2
|
||||||
endif
|
endif
|
||||||
|
ifdef CONFIG_DPP3
|
||||||
|
CFLAGS += -DCONFIG_DPP3
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_PASN
|
ifdef CONFIG_PASN
|
||||||
|
|
|
@ -4492,7 +4492,9 @@ static void hostapd_ctrl_iface_flush(struct hapd_interfaces *interfaces)
|
||||||
#ifdef CONFIG_TESTING_OPTIONS
|
#ifdef CONFIG_TESTING_OPTIONS
|
||||||
#ifdef CONFIG_DPP
|
#ifdef CONFIG_DPP
|
||||||
dpp_test = DPP_TEST_DISABLED;
|
dpp_test = DPP_TEST_DISABLED;
|
||||||
#ifdef CONFIG_DPP2
|
#ifdef CONFIG_DPP3
|
||||||
|
dpp_version_override = 3;
|
||||||
|
#elif defined(CONFIG_DPP2)
|
||||||
dpp_version_override = 2;
|
dpp_version_override = 2;
|
||||||
#else /* CONFIG_DPP2 */
|
#else /* CONFIG_DPP2 */
|
||||||
dpp_version_override = 1;
|
dpp_version_override = 1;
|
||||||
|
|
|
@ -402,3 +402,11 @@ CONFIG_IPV6=y
|
||||||
# production use.
|
# production use.
|
||||||
# This requires CONFIG_IEEE80211W=y to be enabled, too.
|
# This requires CONFIG_IEEE80211W=y to be enabled, too.
|
||||||
#CONFIG_PASN=y
|
#CONFIG_PASN=y
|
||||||
|
|
||||||
|
# Device Provisioning Protocol (DPP) (also known as Wi-Fi Easy Connect)
|
||||||
|
CONFIG_DPP=y
|
||||||
|
# DPP version 2 support
|
||||||
|
CONFIG_DPP2=y
|
||||||
|
# DPP version 3 support (experimental and still changing; do not enable for
|
||||||
|
# production use)
|
||||||
|
#CONFIG_DPP3=y
|
||||||
|
|
|
@ -28,7 +28,9 @@
|
||||||
static const char * dpp_netrole_str(enum dpp_netrole netrole);
|
static const char * dpp_netrole_str(enum dpp_netrole netrole);
|
||||||
|
|
||||||
#ifdef CONFIG_TESTING_OPTIONS
|
#ifdef CONFIG_TESTING_OPTIONS
|
||||||
#ifdef CONFIG_DPP2
|
#ifdef CONFIG_DPP3
|
||||||
|
int dpp_version_override = 3;
|
||||||
|
#elif defined(CONFIG_DPP2)
|
||||||
int dpp_version_override = 2;
|
int dpp_version_override = 2;
|
||||||
#else
|
#else
|
||||||
int dpp_version_override = 1;
|
int dpp_version_override = 1;
|
||||||
|
@ -306,6 +308,8 @@ int dpp_parse_uri_version(struct dpp_bootstrap_info *bi, const char *version)
|
||||||
bi->version = 1;
|
bi->version = 1;
|
||||||
else if (*version == '2')
|
else if (*version == '2')
|
||||||
bi->version = 2;
|
bi->version = 2;
|
||||||
|
else if (*version == '3')
|
||||||
|
bi->version = 3;
|
||||||
else
|
else
|
||||||
wpa_printf(MSG_DEBUG, "DPP: Unknown URI version");
|
wpa_printf(MSG_DEBUG, "DPP: Unknown URI version");
|
||||||
|
|
||||||
|
@ -628,7 +632,8 @@ int dpp_gen_uri(struct dpp_bootstrap_info *bi)
|
||||||
macstr,
|
macstr,
|
||||||
bi->info ? "I:" : "", bi->info ? bi->info : "",
|
bi->info ? "I:" : "", bi->info ? bi->info : "",
|
||||||
bi->info ? ";" : "",
|
bi->info ? ";" : "",
|
||||||
DPP_VERSION == 2 ? "V:2;" : "",
|
DPP_VERSION == 3 ? "V:3;" :
|
||||||
|
(DPP_VERSION == 2 ? "V:2;" : ""),
|
||||||
bi->pk);
|
bi->pk);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,9 @@ struct dpp_reconfig_id;
|
||||||
#define DPP_VERSION (dpp_version_override)
|
#define DPP_VERSION (dpp_version_override)
|
||||||
extern int dpp_version_override;
|
extern int dpp_version_override;
|
||||||
#else /* CONFIG_TESTING_OPTIONS */
|
#else /* CONFIG_TESTING_OPTIONS */
|
||||||
#ifdef CONFIG_DPP2
|
#ifdef CONFIG_DPP3
|
||||||
|
#define DPP_VERSION 3
|
||||||
|
#elif defined(CONFIG_DPP2)
|
||||||
#define DPP_VERSION 2
|
#define DPP_VERSION 2
|
||||||
#else
|
#else
|
||||||
#define DPP_VERSION 1
|
#define DPP_VERSION 1
|
||||||
|
|
|
@ -126,8 +126,12 @@ def test_dpp_uri_version(dev, apdev):
|
||||||
uri = dev[0].request("DPP_BOOTSTRAP_GET_URI %d" % id1)
|
uri = dev[0].request("DPP_BOOTSTRAP_GET_URI %d" % id1)
|
||||||
info = dev[0].request("DPP_BOOTSTRAP_INFO %d" % id1)
|
info = dev[0].request("DPP_BOOTSTRAP_INFO %d" % id1)
|
||||||
logger.info("Parsed URI info:\n" + info)
|
logger.info("Parsed URI info:\n" + info)
|
||||||
if "version=2" not in info.splitlines():
|
capa = dev[0].request("GET_CAPABILITY dpp")
|
||||||
raise Exception("Unexpected version information (v2)")
|
ver = 1
|
||||||
|
if capa.startswith("DPP="):
|
||||||
|
ver = int(capa[4:])
|
||||||
|
if "version=%d" % ver not in info.splitlines():
|
||||||
|
raise Exception("Unexpected version information (with indication)")
|
||||||
|
|
||||||
dev[0].set("dpp_version_override", "1")
|
dev[0].set("dpp_version_override", "1")
|
||||||
id0 = dev[0].dpp_bootstrap_gen()
|
id0 = dev[0].dpp_bootstrap_gen()
|
||||||
|
|
|
@ -279,6 +279,9 @@ NEED_ASN1=y
|
||||||
ifdef CONFIG_DPP2
|
ifdef CONFIG_DPP2
|
||||||
L_CFLAGS += -DCONFIG_DPP2
|
L_CFLAGS += -DCONFIG_DPP2
|
||||||
endif
|
endif
|
||||||
|
ifdef CONFIG_DPP3
|
||||||
|
L_CFLAGS += -DCONFIG_DPP3
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_OWE
|
ifdef CONFIG_OWE
|
||||||
|
|
|
@ -294,6 +294,9 @@ NEED_ASN1=y
|
||||||
ifdef CONFIG_DPP2
|
ifdef CONFIG_DPP2
|
||||||
CFLAGS += -DCONFIG_DPP2
|
CFLAGS += -DCONFIG_DPP2
|
||||||
endif
|
endif
|
||||||
|
ifdef CONFIG_DPP3
|
||||||
|
CFLAGS += -DCONFIG_DPP3
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONFIG_OWE
|
ifdef CONFIG_OWE
|
||||||
|
|
|
@ -4826,7 +4826,9 @@ static int wpa_supplicant_ctrl_iface_get_capability(
|
||||||
|
|
||||||
#ifdef CONFIG_DPP
|
#ifdef CONFIG_DPP
|
||||||
if (os_strcmp(field, "dpp") == 0) {
|
if (os_strcmp(field, "dpp") == 0) {
|
||||||
#ifdef CONFIG_DPP2
|
#ifdef CONFIG_DPP3
|
||||||
|
res = os_snprintf(buf, buflen, "DPP=3");
|
||||||
|
#elif defined(CONFIG_DPP2)
|
||||||
res = os_snprintf(buf, buflen, "DPP=2");
|
res = os_snprintf(buf, buflen, "DPP=2");
|
||||||
#else /* CONFIG_DPP2 */
|
#else /* CONFIG_DPP2 */
|
||||||
res = os_snprintf(buf, buflen, "DPP=1");
|
res = os_snprintf(buf, buflen, "DPP=1");
|
||||||
|
@ -8477,7 +8479,9 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s)
|
||||||
dpp_pkex_ephemeral_key_override_len = 0;
|
dpp_pkex_ephemeral_key_override_len = 0;
|
||||||
dpp_protocol_key_override_len = 0;
|
dpp_protocol_key_override_len = 0;
|
||||||
dpp_nonce_override_len = 0;
|
dpp_nonce_override_len = 0;
|
||||||
#ifdef CONFIG_DPP2
|
#ifdef CONFIG_DPP3
|
||||||
|
dpp_version_override = 3;
|
||||||
|
#elif defined(CONFIG_DPP2)
|
||||||
dpp_version_override = 2;
|
dpp_version_override = 2;
|
||||||
#else /* CONFIG_DPP2 */
|
#else /* CONFIG_DPP2 */
|
||||||
dpp_version_override = 1;
|
dpp_version_override = 1;
|
||||||
|
|
|
@ -603,8 +603,13 @@ CONFIG_BGSCAN_SIMPLE=y
|
||||||
# Experimental implementation of draft-harkins-owe-07.txt
|
# Experimental implementation of draft-harkins-owe-07.txt
|
||||||
#CONFIG_OWE=y
|
#CONFIG_OWE=y
|
||||||
|
|
||||||
# Device Provisioning Protocol (DPP)
|
# Device Provisioning Protocol (DPP) (also known as Wi-Fi Easy Connect)
|
||||||
CONFIG_DPP=y
|
CONFIG_DPP=y
|
||||||
|
# DPP version 2 support
|
||||||
|
CONFIG_DPP2=y
|
||||||
|
# DPP version 3 support (experimental and still changing; do not enable for
|
||||||
|
# production use)
|
||||||
|
#CONFIG_DPP3=y
|
||||||
|
|
||||||
# Wired equivalent privacy (WEP)
|
# Wired equivalent privacy (WEP)
|
||||||
# WEP is an obsolete cryptographic data confidentiality algorithm that is not
|
# WEP is an obsolete cryptographic data confidentiality algorithm that is not
|
||||||
|
|
Loading…
Reference in a new issue