3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-25 08:02:38 +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:
James Prestwood 2019-04-04 13:43:13 -07:00 committed by Denis Kenzior
parent cb9a0ed922
commit a2e711faf4
4 changed files with 38 additions and 2 deletions

View File

@ -45,6 +45,10 @@ enum crypto_akm {
CRYPTO_AKM_8021X_SUITE_B_SHA256 = 0x000fac0b, CRYPTO_AKM_8021X_SUITE_B_SHA256 = 0x000fac0b,
CRYPTO_AKM_8021X_SUITE_B_SHA384 = 0x000fac0c, CRYPTO_AKM_8021X_SUITE_B_SHA384 = 0x000fac0c,
CRYPTO_AKM_FT_OVER_8021X_SHA384 = 0x000fac0d, 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, CRYPTO_AKM_OWE = 0x000fac12,
}; };

View File

@ -460,6 +460,18 @@ static int ie_parse_akm_suite(const uint8_t *data,
case 13: case 13:
*out = IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384; *out = IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384;
return 0; 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: case 18:
*out = IE_RSN_AKM_SUITE_OWE; *out = IE_RSN_AKM_SUITE_OWE;
return 0; 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); RETURN_AKM(data, ieee_oui, 12);
case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384: case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
RETURN_AKM(data, ieee_oui, 13); 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: case IE_RSN_AKM_SUITE_OWE:
RETURN_AKM(data, ieee_oui, 18); 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; count = 0;
for (count = 0, akm_suite = IE_RSN_AKM_SUITE_8021X; 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) { akm_suite <<= 1) {
if (!(info->akm_suites & akm_suite)) if (!(info->akm_suites & akm_suite))
continue; continue;

View File

@ -261,6 +261,10 @@ enum ie_rsn_akm_suite {
IE_RSN_AKM_SUITE_8021X_SUITE_B_SHA384 = 0x0800, IE_RSN_AKM_SUITE_8021X_SUITE_B_SHA384 = 0x0800,
IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384 = 0x1000, IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384 = 0x1000,
IE_RSN_AKM_SUITE_OWE = 0x2000, 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) \ #define IE_AKM_IS_SAE(akm) \
@ -296,7 +300,7 @@ struct ie_tlv_builder {
struct ie_rsn_info { struct ie_rsn_info {
enum ie_rsn_cipher_suite group_cipher; enum ie_rsn_cipher_suite group_cipher;
uint16_t pairwise_ciphers; uint16_t pairwise_ciphers;
uint16_t akm_suites; uint32_t akm_suites;
bool preauthentication:1; bool preauthentication:1;
bool no_pairwise:1; bool no_pairwise:1;
uint8_t ptksa_replay_counter:2; uint8_t ptksa_replay_counter:2;

View File

@ -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; return CRYPTO_AKM_8021X_SUITE_B_SHA384;
case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384: case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
return CRYPTO_AKM_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: case IE_RSN_AKM_SUITE_OWE:
return CRYPTO_AKM_OWE; return CRYPTO_AKM_OWE;
} }