From: Jouni Malinen Date: Sat, 13 Apr 2013 18:15:36 +0000 (-0700) Subject: WPS NFC: Send M2D with config error 20 on pkhash mismatch X-Git-Tag: hostap_2_1~88 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff40cd6dd12682dd69fa95c82218a6c6e5b95506;p=thirdparty%2Fhostap.git WPS NFC: Send M2D with config error 20 on pkhash mismatch 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 --- diff --git a/src/wps/wps_defs.h b/src/wps/wps_defs.h index 3421ac5f8..124960641 100644 --- a/src/wps/wps_defs.h +++ b/src/wps/wps_defs.h @@ -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 */ diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c index 19490a15f..61bb6415b 100644 --- a/src/wps/wps_registrar.c +++ b/src/wps/wps_registrar.c @@ -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; } } }