aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/defs.h
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-08-31 19:57:28 (GMT)
committerJouni Malinen <j@w1.fi>2008-08-31 19:57:28 (GMT)
commit565861976dc4288e70eea26c9f47c6b24e25beea (patch)
treedbdbfdfd769b171d4658224191f7faa197673260 /src/common/defs.h
parent9b71728bba36effcff5c2f7fd915f5bde3753bcb (diff)
downloadhostap-06-565861976dc4288e70eea26c9f47c6b24e25beea.zip
hostap-06-565861976dc4288e70eea26c9f47c6b24e25beea.tar.gz
hostap-06-565861976dc4288e70eea26c9f47c6b24e25beea.tar.bz2
Added support for using SHA256-based stronger key derivation for WPA2
IEEE 802.11w/D6.0 defines new AKMPs to indicate SHA256-based algorithms for key derivation (and AES-CMAC for EAPOL-Key MIC). Add support for using new AKMPs and clean up AKMP processing with helper functions in defs.h.
Diffstat (limited to 'src/common/defs.h')
-rw-r--r--src/common/defs.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/src/common/defs.h b/src/common/defs.h
index 300adff..9adc2ac 100644
--- a/src/common/defs.h
+++ b/src/common/defs.h
@@ -1,6 +1,6 @@
/*
* WPA Supplicant - Common definitions
- * Copyright (c) 2004-2007, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2004-2008, Jouni Malinen <j@w1.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -40,6 +40,35 @@ typedef enum { FALSE = 0, TRUE = 1 } Boolean;
#define WPA_KEY_MGMT_WPA_NONE BIT(4)
#define WPA_KEY_MGMT_FT_IEEE8021X BIT(5)
#define WPA_KEY_MGMT_FT_PSK BIT(6)
+#define WPA_KEY_MGMT_IEEE8021X_SHA256 BIT(7)
+#define WPA_KEY_MGMT_PSK_SHA256 BIT(8)
+
+static inline int wpa_key_mgmt_wpa_ieee8021x(int akm)
+{
+ return akm == WPA_KEY_MGMT_IEEE8021X ||
+ akm == WPA_KEY_MGMT_FT_IEEE8021X ||
+ akm == WPA_KEY_MGMT_IEEE8021X_SHA256;
+}
+
+static inline int wpa_key_mgmt_wpa_psk(int akm)
+{
+ return akm == WPA_KEY_MGMT_PSK ||
+ akm == WPA_KEY_MGMT_FT_PSK ||
+ akm == WPA_KEY_MGMT_PSK_SHA256;
+}
+
+static inline int wpa_key_mgmt_ft(int akm)
+{
+ return akm == WPA_KEY_MGMT_FT_PSK ||
+ akm == WPA_KEY_MGMT_FT_IEEE8021X;
+}
+
+static inline int wpa_key_mgmt_sha256(int akm)
+{
+ return akm == WPA_KEY_MGMT_PSK_SHA256 ||
+ akm == WPA_KEY_MGMT_IEEE8021X_SHA256;
+}
+
#define WPA_PROTO_WPA BIT(0)
#define WPA_PROTO_RSN BIT(1)
@@ -55,7 +84,8 @@ typedef enum { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP,
CIPHER_WEP104 } wpa_cipher;
typedef enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE,
KEY_MGMT_802_1X_NO_WPA, KEY_MGMT_WPA_NONE,
- KEY_MGMT_FT_802_1X, KEY_MGMT_FT_PSK
+ KEY_MGMT_FT_802_1X, KEY_MGMT_FT_PSK,
+ KEY_MGMT_802_1X_SHA256, KEY_MGMT_PSK_SHA256
} wpa_key_mgmt;
/**