Parcourir la source

OWE: Define and parse Diffie-Hellman Parameter element

Add WLAN_EID_EXT_OWE_DH_PARAM definition and extend
ieee802_11_parse_elems() to recognize this element.

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen il y a 8 ans
Parent
commit
9c7aac738b

+ 6 - 0
src/common/ieee802_11_common.c

@@ -250,6 +250,12 @@ static int ieee802_11_parse_extension(const u8 *pos, size_t elen,
 			break;
 		elems->fils_nonce = pos;
 		break;
+	case WLAN_EID_EXT_OWE_DH_PARAM:
+		if (elen < 2)
+			break;
+		elems->owe_dh = pos;
+		elems->owe_dh_len = elen;
+		break;
 	default:
 		if (show_errors) {
 			wpa_printf(MSG_MSGDUMP,

+ 2 - 0
src/common/ieee802_11_common.h

@@ -78,6 +78,7 @@ struct ieee802_11_elems {
 	const u8 *fils_wrapped_data;
 	const u8 *fils_pk;
 	const u8 *fils_nonce;
+	const u8 *owe_dh;
 
 	u8 ssid_len;
 	u8 supp_rates_len;
@@ -120,6 +121,7 @@ struct ieee802_11_elems {
 	u8 key_delivery_len;
 	u8 fils_wrapped_data_len;
 	u8 fils_pk_len;
+	u8 owe_dh_len;
 
 	struct mb_ies_info mb_ies;
 };

+ 1 - 0
src/common/ieee802_11_defs.h

@@ -462,6 +462,7 @@
 #define WLAN_EID_EXT_FILS_PUBLIC_KEY 12
 #define WLAN_EID_EXT_FILS_NONCE 13
 #define WLAN_EID_EXT_FUTURE_CHANNEL_GUIDANCE 14
+#define WLAN_EID_EXT_OWE_DH_PARAM 32
 
 
 /* Action frame categories (IEEE Std 802.11-2016, 9.4.1.11, Table 9-76) */