From a20088e57692777cc5b505c96c3557a50f62380a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 19 Feb 2009 19:49:34 +0200 Subject: [PATCH] Allow SHA256-based key handshake to be used without 802.11r Previously, both CONFIG_IEEE80211W=y and CONFIG_IEEE80211R=y were needed to enable SHA256-based key handshake (WPA-PSK-SHA256 and WPA-EAP-SHA256). This can now be done with just CONFIG_IEEE80211W=y. --- src/common/wpa_common.c | 4 ++-- src/rsn_supp/wpa.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c index 0e3984fc7..dd860d8ca 100644 --- a/src/common/wpa_common.c +++ b/src/common/wpa_common.c @@ -56,10 +56,10 @@ int wpa_eapol_key_mic(const u8 *key, int ver, const u8 *buf, size_t len, hmac_sha1(key, 16, buf, len, hash); os_memcpy(mic, hash, MD5_MAC_LEN); break; -#ifdef CONFIG_IEEE80211R +#if defined(CONFIG_IEEE80211R) || defined(CONFIG_IEEE80211W) case WPA_KEY_INFO_TYPE_AES_128_CMAC: return omac1_aes_128(key, buf, len, mic); -#endif /* CONFIG_IEEE80211R */ +#endif /* CONFIG_IEEE80211R || CONFIG_IEEE80211W */ default: return -1; } diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c index 52708580b..3bcb6ab7c 100644 --- a/src/rsn_supp/wpa.c +++ b/src/rsn_supp/wpa.c @@ -1471,9 +1471,9 @@ int wpa_sm_rx_eapol(struct wpa_sm *sm, const u8 *src_addr, key_info = WPA_GET_BE16(key->key_info); ver = key_info & WPA_KEY_INFO_TYPE_MASK; if (ver != WPA_KEY_INFO_TYPE_HMAC_MD5_RC4 && -#ifdef CONFIG_IEEE80211R +#if defined(CONFIG_IEEE80211R) || defined(CONFIG_IEEE80211W) ver != WPA_KEY_INFO_TYPE_AES_128_CMAC && -#endif /* CONFIG_IEEE80211R */ +#endif /* CONFIG_IEEE80211R || CONFIG_IEEE80211W */ ver != WPA_KEY_INFO_TYPE_HMAC_SHA1_AES) { wpa_printf(MSG_INFO, "WPA: Unsupported EAPOL-Key descriptor " "version %d.", ver);