aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dpp_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-10-18 20:10:34 (GMT)
committerJouni Malinen <j@w1.fi>2017-10-19 15:32:16 (GMT)
commit4be5bc98a8aabcc12eaf46855b984819d39d2b0e (patch)
tree603ecd3f1afe6858ddfc5c5d311e38cf29f153f3 /wpa_supplicant/dpp_supplicant.c
parentdc4d271c6dc48254b7a1f547955bdd68a76e04f0 (diff)
downloadhostap-4be5bc98a8aabcc12eaf46855b984819d39d2b0e.zip
hostap-4be5bc98a8aabcc12eaf46855b984819d39d2b0e.tar.gz
hostap-4be5bc98a8aabcc12eaf46855b984819d39d2b0e.tar.bz2
DPP: Update AES-SIV AD for PKEX frames
The protocol design was updated to protect the six octets in the header before the attributes. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/dpp_supplicant.c')
-rw-r--r--wpa_supplicant/dpp_supplicant.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index 1eb6fb3..bf29f19 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -1441,7 +1441,8 @@ wpas_dpp_rx_pkex_exchange_resp(struct wpa_supplicant *wpa_s, const u8 *src,
static void
wpas_dpp_rx_pkex_commit_reveal_req(struct wpa_supplicant *wpa_s, const u8 *src,
- const u8 *buf, size_t len, unsigned int freq)
+ const u8 *hdr, const u8 *buf, size_t len,
+ unsigned int freq)
{
struct wpabuf *msg;
unsigned int wait_time;
@@ -1456,7 +1457,7 @@ wpas_dpp_rx_pkex_commit_reveal_req(struct wpa_supplicant *wpa_s, const u8 *src,
return;
}
- msg = dpp_pkex_rx_commit_reveal_req(pkex, buf, len);
+ msg = dpp_pkex_rx_commit_reveal_req(pkex, hdr, buf, len);
if (!msg) {
wpa_printf(MSG_DEBUG, "DPP: Failed to process the request");
return;
@@ -1497,7 +1498,7 @@ wpas_dpp_rx_pkex_commit_reveal_req(struct wpa_supplicant *wpa_s, const u8 *src,
static void
wpas_dpp_rx_pkex_commit_reveal_resp(struct wpa_supplicant *wpa_s, const u8 *src,
- const u8 *buf, size_t len,
+ const u8 *hdr, const u8 *buf, size_t len,
unsigned int freq)
{
int res;
@@ -1513,7 +1514,7 @@ wpas_dpp_rx_pkex_commit_reveal_resp(struct wpa_supplicant *wpa_s, const u8 *src,
return;
}
- res = dpp_pkex_rx_commit_reveal_resp(pkex, buf, len);
+ res = dpp_pkex_rx_commit_reveal_resp(pkex, hdr, buf, len);
if (res < 0) {
wpa_printf(MSG_DEBUG, "DPP: Failed to process the response");
return;
@@ -1605,10 +1606,12 @@ void wpas_dpp_rx_action(struct wpa_supplicant *wpa_s, const u8 *src,
wpas_dpp_rx_pkex_exchange_resp(wpa_s, src, buf, len, freq);
break;
case DPP_PA_PKEX_COMMIT_REVEAL_REQ:
- wpas_dpp_rx_pkex_commit_reveal_req(wpa_s, src, buf, len, freq);
+ wpas_dpp_rx_pkex_commit_reveal_req(wpa_s, src, hdr, buf, len,
+ freq);
break;
case DPP_PA_PKEX_COMMIT_REVEAL_RESP:
- wpas_dpp_rx_pkex_commit_reveal_resp(wpa_s, src, buf, len, freq);
+ wpas_dpp_rx_pkex_commit_reveal_resp(wpa_s, src, hdr, buf, len,
+ freq);
break;
default:
wpa_printf(MSG_DEBUG,