mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-18 18:29:29 +01:00
ie: crypto: add FILS AKMs
ie_rsn_info had to be updated to allow for 32 bit AKM values rather than 16 bit.
This commit is contained in:
parent
cb9a0ed922
commit
a2e711faf4
@ -45,6 +45,10 @@ enum crypto_akm {
|
||||
CRYPTO_AKM_8021X_SUITE_B_SHA256 = 0x000fac0b,
|
||||
CRYPTO_AKM_8021X_SUITE_B_SHA384 = 0x000fac0c,
|
||||
CRYPTO_AKM_FT_OVER_8021X_SHA384 = 0x000fac0d,
|
||||
CRYPTO_AKM_FILS_SHA256 = 0x000fac0e,
|
||||
CRYPTO_AKM_FILS_SHA384 = 0x000fac0f,
|
||||
CRYPTO_AKM_FT_OVER_FILS_SHA256 = 0x000fac10,
|
||||
CRYPTO_AKM_FT_OVER_FILS_SHA384 = 0x000fac11,
|
||||
CRYPTO_AKM_OWE = 0x000fac12,
|
||||
};
|
||||
|
||||
|
22
src/ie.c
22
src/ie.c
@ -460,6 +460,18 @@ static int ie_parse_akm_suite(const uint8_t *data,
|
||||
case 13:
|
||||
*out = IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384;
|
||||
return 0;
|
||||
case 14:
|
||||
*out = IE_RSN_AKM_SUITE_FILS_SHA256;
|
||||
return 0;
|
||||
case 15:
|
||||
*out = IE_RSN_AKM_SUITE_FILS_SHA384;
|
||||
return 0;
|
||||
case 16:
|
||||
*out = IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256;
|
||||
return 0;
|
||||
case 17:
|
||||
*out = IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384;
|
||||
return 0;
|
||||
case 18:
|
||||
*out = IE_RSN_AKM_SUITE_OWE;
|
||||
return 0;
|
||||
@ -803,6 +815,14 @@ static bool ie_build_rsn_akm_suite(uint8_t *data, enum ie_rsn_akm_suite suite)
|
||||
RETURN_AKM(data, ieee_oui, 12);
|
||||
case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
|
||||
RETURN_AKM(data, ieee_oui, 13);
|
||||
case IE_RSN_AKM_SUITE_FILS_SHA256:
|
||||
RETURN_AKM(data, ieee_oui, 14);
|
||||
case IE_RSN_AKM_SUITE_FILS_SHA384:
|
||||
RETURN_AKM(data, ieee_oui, 15);
|
||||
case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256:
|
||||
RETURN_AKM(data, ieee_oui, 16);
|
||||
case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384:
|
||||
RETURN_AKM(data, ieee_oui, 17);
|
||||
case IE_RSN_AKM_SUITE_OWE:
|
||||
RETURN_AKM(data, ieee_oui, 18);
|
||||
}
|
||||
@ -892,7 +912,7 @@ bool ie_build_rsne(const struct ie_rsn_info *info, uint8_t *to)
|
||||
count = 0;
|
||||
|
||||
for (count = 0, akm_suite = IE_RSN_AKM_SUITE_8021X;
|
||||
akm_suite <= IE_RSN_AKM_SUITE_OWE;
|
||||
akm_suite <= IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384;
|
||||
akm_suite <<= 1) {
|
||||
if (!(info->akm_suites & akm_suite))
|
||||
continue;
|
||||
|
6
src/ie.h
6
src/ie.h
@ -261,6 +261,10 @@ enum ie_rsn_akm_suite {
|
||||
IE_RSN_AKM_SUITE_8021X_SUITE_B_SHA384 = 0x0800,
|
||||
IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384 = 0x1000,
|
||||
IE_RSN_AKM_SUITE_OWE = 0x2000,
|
||||
IE_RSN_AKM_SUITE_FILS_SHA256 = 0x4000,
|
||||
IE_RSN_AKM_SUITE_FILS_SHA384 = 0x8000,
|
||||
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256 = 0x10000,
|
||||
IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384 = 0x20000,
|
||||
};
|
||||
|
||||
#define IE_AKM_IS_SAE(akm) \
|
||||
@ -296,7 +300,7 @@ struct ie_tlv_builder {
|
||||
struct ie_rsn_info {
|
||||
enum ie_rsn_cipher_suite group_cipher;
|
||||
uint16_t pairwise_ciphers;
|
||||
uint16_t akm_suites;
|
||||
uint32_t akm_suites;
|
||||
bool preauthentication:1;
|
||||
bool no_pairwise:1;
|
||||
uint8_t ptksa_replay_counter:2;
|
||||
|
@ -1893,6 +1893,14 @@ static unsigned int ie_rsn_akm_suite_to_nl80211(enum ie_rsn_akm_suite akm)
|
||||
return CRYPTO_AKM_8021X_SUITE_B_SHA384;
|
||||
case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
|
||||
return CRYPTO_AKM_FT_OVER_8021X_SHA384;
|
||||
case IE_RSN_AKM_SUITE_FILS_SHA256:
|
||||
return CRYPTO_AKM_FILS_SHA256;
|
||||
case IE_RSN_AKM_SUITE_FILS_SHA384:
|
||||
return CRYPTO_AKM_FILS_SHA384;
|
||||
case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256:
|
||||
return CRYPTO_AKM_FT_OVER_FILS_SHA256;
|
||||
case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384:
|
||||
return CRYPTO_AKM_FT_OVER_FILS_SHA384;
|
||||
case IE_RSN_AKM_SUITE_OWE:
|
||||
return CRYPTO_AKM_OWE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user