3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +01:00

ie: Add AKMs from 802.11-2016

This commit is contained in:
Denis Kenzior 2018-07-19 10:57:43 -05:00
parent c4a2654703
commit 46a797043a
4 changed files with 36 additions and 0 deletions

View File

@ -41,6 +41,10 @@ enum crypto_akm {
CRYPTO_AKM_TDLS = 0x000fac07, CRYPTO_AKM_TDLS = 0x000fac07,
CRYPTO_AKM_SAE_SHA256 = 0x000fac08, CRYPTO_AKM_SAE_SHA256 = 0x000fac08,
CRYPTO_AKM_FT_OVER_SAE_SHA256 = 0x000fac09, CRYPTO_AKM_FT_OVER_SAE_SHA256 = 0x000fac09,
CRYPTO_AKM_AP_PEER_KEY_SHA256 = 0x000fac0a,
CRYPTO_AKM_8021X_SUITE_B_SHA256 = 0x000fac0b,
CRYPTO_AKM_8021X_SUITE_B_SHA384 = 0x000fac0c,
CRYPTO_AKM_FT_OVER_8021X_SHA384 = 0x000fac0d,
}; };
/* Min & Max reported by crypto_cipher_key_len when ignoring WEP */ /* Min & Max reported by crypto_cipher_key_len when ignoring WEP */

View File

@ -447,6 +447,18 @@ static int ie_parse_akm_suite(const uint8_t *data,
case 9: case 9:
*out = IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256; *out = IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256;
return 0; return 0;
case 10:
*out = IE_RSN_AKM_SUITE_AP_PEER_KEY_SHA256;
return 0;
case 11:
*out = IE_RSN_AKM_SUITE_8021X_SUITE_B_SHA256;
return 0;
case 12:
*out = IE_RSN_AKM_SUITE_8021X_SUITE_B_SHA384;
return 0;
case 13:
*out = IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384;
return 0;
default: default:
return -ENOENT; return -ENOENT;
} }
@ -779,6 +791,14 @@ static bool ie_build_rsn_akm_suite(uint8_t *data, enum ie_rsn_akm_suite suite)
RETURN_AKM(data, ieee_oui, 8); RETURN_AKM(data, ieee_oui, 8);
case IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256: case IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256:
RETURN_AKM(data, ieee_oui, 9); RETURN_AKM(data, ieee_oui, 9);
case IE_RSN_AKM_SUITE_AP_PEER_KEY_SHA256:
RETURN_AKM(data, ieee_oui, 10);
case IE_RSN_AKM_SUITE_8021X_SUITE_B_SHA256:
RETURN_AKM(data, ieee_oui, 11);
case IE_RSN_AKM_SUITE_8021X_SUITE_B_SHA384:
RETURN_AKM(data, ieee_oui, 12);
case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
RETURN_AKM(data, ieee_oui, 13);
} }
return false; return false;

View File

@ -246,6 +246,10 @@ enum ie_rsn_akm_suite {
IE_RSN_AKM_SUITE_TDLS = 0x0040, IE_RSN_AKM_SUITE_TDLS = 0x0040,
IE_RSN_AKM_SUITE_SAE_SHA256 = 0x0080, IE_RSN_AKM_SUITE_SAE_SHA256 = 0x0080,
IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256 = 0x0100, IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256 = 0x0100,
IE_RSN_AKM_SUITE_AP_PEER_KEY_SHA256 = 0x0200,
IE_RSN_AKM_SUITE_8021X_SUITE_B_SHA256 = 0x0400,
IE_RSN_AKM_SUITE_8021X_SUITE_B_SHA384 = 0x0800,
IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384 = 0x1000,
}; };
struct ie_tlv_iter { struct ie_tlv_iter {

View File

@ -2173,6 +2173,14 @@ static unsigned int ie_rsn_akm_suite_to_nl80211(enum ie_rsn_akm_suite akm)
return CRYPTO_AKM_SAE_SHA256; return CRYPTO_AKM_SAE_SHA256;
case IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256: case IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256:
return CRYPTO_AKM_FT_OVER_SAE_SHA256; return CRYPTO_AKM_FT_OVER_SAE_SHA256;
case IE_RSN_AKM_SUITE_AP_PEER_KEY_SHA256:
return CRYPTO_AKM_AP_PEER_KEY_SHA256;
case IE_RSN_AKM_SUITE_8021X_SUITE_B_SHA256:
return CRYPTO_AKM_8021X_SUITE_B_SHA256;
case IE_RSN_AKM_SUITE_8021X_SUITE_B_SHA384:
return CRYPTO_AKM_8021X_SUITE_B_SHA384;
case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
return CRYPTO_AKM_FT_OVER_8021X_SHA384;
} }
return 0; return 0;