]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPS NFC: Send M2D with config error 20 on pkhash mismatch
authorJouni Malinen <jouni@qca.qualcomm.com>
Sat, 13 Apr 2013 18:15:36 +0000 (11:15 -0700)
committerJouni Malinen <j@w1.fi>
Mon, 27 Jan 2014 19:10:55 +0000 (21:10 +0200)
Instead of terminating the WPS protocol immediately, go through an M2D
exchange to notify Enrollee of the public key hash mismatch.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/wps/wps_defs.h
src/wps/wps_registrar.c

index 3421ac5f86f0a7bd01a9b2df73fd90fa5c936599..1249606418d03bab3d8e3c8e1b4b028389716df8 100644 (file)
@@ -215,7 +215,9 @@ enum wps_config_error {
        WPS_CFG_SETUP_LOCKED = 15,
        WPS_CFG_MSG_TIMEOUT = 16,
        WPS_CFG_REG_SESS_TIMEOUT = 17,
-       WPS_CFG_DEV_PASSWORD_AUTH_FAILURE = 18
+       WPS_CFG_DEV_PASSWORD_AUTH_FAILURE = 18,
+       WPS_CFG_60G_CHAN_NOT_SUPPORTED = 19,
+       WPS_CFG_PUBLIC_KEY_HASH_MISMATCH = 20
 };
 
 /* Vendor specific Error Indication for WPS event messages */
index 19490a15f880f959348da3ca4bce67a7e3203abb..61bb6415b03faecdb59199aaa0721fb936feae1e 100644 (file)
@@ -2558,7 +2558,10 @@ static enum wps_process_res wps_process_m1(struct wps_data *wps,
                                      WPS_OOB_PUBKEY_HASH_LEN) != 0) {
                                wpa_printf(MSG_ERROR, "WPS: Public Key hash "
                                           "mismatch");
-                               return WPS_FAILURE;
+                               wps->state = SEND_M2D;
+                               wps->config_error =
+                                       WPS_CFG_PUBLIC_KEY_HASH_MISMATCH;
+                               return WPS_CONTINUE;
                        }
                }
        }