|
@@ -1344,6 +1344,11 @@ static int wpa_supplicant_process_1_of_2_wpa(struct wpa_sm *sm,
|
|
|
gd->keyidx = (key_info & WPA_KEY_INFO_KEY_INDEX_MASK) >>
|
|
|
WPA_KEY_INFO_KEY_INDEX_SHIFT;
|
|
|
if (ver == WPA_KEY_INFO_TYPE_HMAC_MD5_RC4 && sm->ptk.kek_len == 16) {
|
|
|
+#ifdef CONFIG_NO_RC4
|
|
|
+ wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
|
|
|
+ "WPA: RC4 not supported in the build");
|
|
|
+ return -1;
|
|
|
+#else /* CONFIG_NO_RC4 */
|
|
|
u8 ek[32];
|
|
|
if (key_data_len > sizeof(gd->gtk)) {
|
|
|
wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
|
|
@@ -1361,6 +1366,7 @@ static int wpa_supplicant_process_1_of_2_wpa(struct wpa_sm *sm,
|
|
|
return -1;
|
|
|
}
|
|
|
os_memset(ek, 0, sizeof(ek));
|
|
|
+#endif /* CONFIG_NO_RC4 */
|
|
|
} else if (ver == WPA_KEY_INFO_TYPE_HMAC_SHA1_AES) {
|
|
|
if (maxkeylen % 8) {
|
|
|
wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
|
|
@@ -1575,6 +1581,11 @@ static int wpa_supplicant_decrypt_key_data(struct wpa_sm *sm,
|
|
|
/* Decrypt key data here so that this operation does not need
|
|
|
* to be implemented separately for each message type. */
|
|
|
if (ver == WPA_KEY_INFO_TYPE_HMAC_MD5_RC4 && sm->ptk.kek_len == 16) {
|
|
|
+#ifdef CONFIG_NO_RC4
|
|
|
+ wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
|
|
|
+ "WPA: RC4 not supported in the build");
|
|
|
+ return -1;
|
|
|
+#else /* CONFIG_NO_RC4 */
|
|
|
u8 ek[32];
|
|
|
os_memcpy(ek, key->key_iv, 16);
|
|
|
os_memcpy(ek + 16, sm->ptk.kek, sm->ptk.kek_len);
|
|
@@ -1585,6 +1596,7 @@ static int wpa_supplicant_decrypt_key_data(struct wpa_sm *sm,
|
|
|
return -1;
|
|
|
}
|
|
|
os_memset(ek, 0, sizeof(ek));
|
|
|
+#endif /* CONFIG_NO_RC4 */
|
|
|
} else if (ver == WPA_KEY_INFO_TYPE_HMAC_SHA1_AES ||
|
|
|
ver == WPA_KEY_INFO_TYPE_AES_128_CMAC ||
|
|
|
sm->key_mgmt == WPA_KEY_MGMT_OSEN ||
|