aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-08-01 18:03:30 (GMT)
committerJouni Malinen <j@w1.fi>2015-08-02 13:52:56 (GMT)
commit4549607b04000b5c08c1ace5ea962c2bb3402134 (patch)
tree8dc6c7ac2e18b3904f6f88bf26a79b76e5f9a3cf /src
parentcd94f0d159dd5682f5a0023d28d83e471ae00eae (diff)
downloadhostap-4549607b04000b5c08c1ace5ea962c2bb3402134.zip
hostap-4549607b04000b5c08c1ace5ea962c2bb3402134.tar.gz
hostap-4549607b04000b5c08c1ace5ea962c2bb3402134.tar.bz2
EAP-pwd peer: Comment out MS password hash if CONFIG_FIPS=y
The needed hash functions are not available in FIPS mode. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src')
-rw-r--r--src/eap_peer/eap_pwd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c
index 5a60b3f..1f78544 100644
--- a/src/eap_peer/eap_pwd.c
+++ b/src/eap_peer/eap_pwd.c
@@ -288,6 +288,12 @@ eap_pwd_perform_id_exchange(struct eap_sm *sm, struct eap_pwd_data *data,
}
if (id->prep == EAP_PWD_PREP_MS) {
+#ifdef CONFIG_FIPS
+ wpa_printf(MSG_ERROR,
+ "EAP-PWD (peer): MS password hash not supported in FIPS mode");
+ eap_pwd_state(data, FAILURE);
+ return;
+#else /* CONFIG_FIPS */
if (data->password_hash) {
res = hash_nt_password_hash(data->password, pwhashhash);
} else {
@@ -307,6 +313,7 @@ eap_pwd_perform_id_exchange(struct eap_sm *sm, struct eap_pwd_data *data,
password = pwhashhash;
password_len = sizeof(pwhashhash);
+#endif /* CONFIG_FIPS */
} else {
password = data->password;
password_len = data->password_len;