SAE: Driver capability flags for the new SAE AKM suites

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Jouni Malinen 2022-07-24 22:09:07 +03:00 committed by Jouni Malinen
parent 91df8c9c65
commit a32ef3cfb2
3 changed files with 20 additions and 0 deletions

View file

@ -1869,6 +1869,8 @@ struct wpa_driver_capa {
#define WPA_DRIVER_CAPA_KEY_MGMT_FT_802_1X_SHA384 0x00200000 #define WPA_DRIVER_CAPA_KEY_MGMT_FT_802_1X_SHA384 0x00200000
#define WPA_DRIVER_CAPA_KEY_MGMT_CCKM 0x00400000 #define WPA_DRIVER_CAPA_KEY_MGMT_CCKM 0x00400000
#define WPA_DRIVER_CAPA_KEY_MGMT_OSEN 0x00800000 #define WPA_DRIVER_CAPA_KEY_MGMT_OSEN 0x00800000
#define WPA_DRIVER_CAPA_KEY_MGMT_SAE_EXT_KEY 0x01000000
#define WPA_DRIVER_CAPA_KEY_MGMT_FT_SAE_EXT_KEY 0x02000000
/** Bitfield of supported key management suites */ /** Bitfield of supported key management suites */
unsigned int key_mgmt; unsigned int key_mgmt;
unsigned int key_mgmt_iftype[WPA_IF_MAX]; unsigned int key_mgmt_iftype[WPA_IF_MAX];

View file

@ -295,6 +295,9 @@ static unsigned int get_akm_suites_info(struct nlattr *tb)
case RSN_AUTH_KEY_MGMT_FT_SAE: case RSN_AUTH_KEY_MGMT_FT_SAE:
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_FT_SAE; key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_FT_SAE;
break; break;
case RSN_AUTH_KEY_MGMT_FT_SAE_EXT_KEY:
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_FT_SAE_EXT_KEY;
break;
case RSN_AUTH_KEY_MGMT_FT_802_1X_SHA384: case RSN_AUTH_KEY_MGMT_FT_802_1X_SHA384:
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_FT_802_1X_SHA384; key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_FT_802_1X_SHA384;
break; break;
@ -331,6 +334,9 @@ static unsigned int get_akm_suites_info(struct nlattr *tb)
case RSN_AUTH_KEY_MGMT_SAE: case RSN_AUTH_KEY_MGMT_SAE:
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_SAE; key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_SAE;
break; break;
case RSN_AUTH_KEY_MGMT_SAE_EXT_KEY:
key_mgmt |= WPA_DRIVER_CAPA_KEY_MGMT_SAE_EXT_KEY;
break;
} }
} }

View file

@ -4333,6 +4333,12 @@ static int ctrl_iface_get_capability_key_mgmt(int res, bool strict,
return pos - buf; return pos - buf;
pos += ret; pos += ret;
} }
if (key_mgmt & WPA_DRIVER_CAPA_KEY_MGMT_FT_SAE_EXT_KEY) {
ret = os_snprintf(pos, end - pos, " FT-SAE-EXT-KEY");
if (os_snprintf_error(end - pos, ret))
return pos - buf;
pos += ret;
}
#endif /* CONFIG_SAE */ #endif /* CONFIG_SAE */
#ifdef CONFIG_SHA384 #ifdef CONFIG_SHA384
if (key_mgmt & WPA_DRIVER_CAPA_KEY_MGMT_FT_802_1X_SHA384) { if (key_mgmt & WPA_DRIVER_CAPA_KEY_MGMT_FT_802_1X_SHA384) {
@ -4350,6 +4356,12 @@ static int ctrl_iface_get_capability_key_mgmt(int res, bool strict,
return pos - buf; return pos - buf;
pos += ret; pos += ret;
} }
if (key_mgmt & WPA_DRIVER_CAPA_KEY_MGMT_SAE_EXT_KEY) {
ret = os_snprintf(pos, end - pos, " SAE-EXT-KEY");
if (os_snprintf_error(end - pos, ret))
return pos - buf;
pos += ret;
}
#endif /* CONFIG_SAE */ #endif /* CONFIG_SAE */
#ifdef CONFIG_SHA256 #ifdef CONFIG_SHA256
if (key_mgmt & WPA_DRIVER_CAPA_KEY_MGMT_802_1X_SHA256) { if (key_mgmt & WPA_DRIVER_CAPA_KEY_MGMT_802_1X_SHA256) {