aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dpp_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-10-09 22:30:08 (GMT)
committerJouni Malinen <j@w1.fi>2017-10-09 22:30:08 (GMT)
commit8c19ea3f215d5586acd30c6f1a95e7a5b3c0ebf2 (patch)
treebc5ac06e0385a47757783f970197752b9b62977d /wpa_supplicant/dpp_supplicant.c
parent22a01475577b6e3ad485683c6caccfbaf42e0078 (diff)
downloadhostap-8c19ea3f215d5586acd30c6f1a95e7a5b3c0ebf2.zip
hostap-8c19ea3f215d5586acd30c6f1a95e7a5b3c0ebf2.tar.gz
hostap-8c19ea3f215d5586acd30c6f1a95e7a5b3c0ebf2.tar.bz2
DPP: Add the crypto suite field to the frames
This additional field was added to DPP Public Action frames in DPP tech spec v0.2.3 to support cryptographic agility in the future. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/dpp_supplicant.c')
-rw-r--r--wpa_supplicant/dpp_supplicant.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index 2492749..50003e8 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -1587,18 +1587,24 @@ wpas_dpp_rx_pkex_commit_reveal_resp(struct wpa_supplicant *wpa_s, const u8 *src,
void wpas_dpp_rx_action(struct wpa_supplicant *wpa_s, const u8 *src,
const u8 *buf, size_t len, unsigned int freq)
{
+ u8 crypto_suite;
enum dpp_public_action_frame_type type;
- if (len < 1)
+ if (len < 2)
return;
- type = buf[0];
- buf++;
- len--;
+ crypto_suite = *buf++;
+ type = *buf++;
+ len -= 2;
wpa_printf(MSG_DEBUG,
- "DPP: Received DPP Public Action frame type %d from "
+ "DPP: Received DPP Public Action frame crypto suite %u type %d from "
MACSTR " freq=%u",
- type, MAC2STR(src), freq);
+ crypto_suite, type, MAC2STR(src), freq);
+ if (crypto_suite != 1) {
+ wpa_printf(MSG_DEBUG, "DPP: Unsupported crypto suite %u",
+ crypto_suite);
+ return;
+ }
wpa_hexdump(MSG_MSGDUMP, "DPP: Received message attributes", buf, len);
if (dpp_check_attrs(buf, len) < 0)
return;