Browse Source

DPP: Protocol testing - invalid Status value in PKEX Exchange Response

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen 7 years ago
parent
commit
f31ef96dc3
2 changed files with 6 additions and 0 deletions
  1. 5 0
      src/common/dpp.c
  2. 1 0
      src/common/dpp.h

+ 5 - 0
src/common/dpp.c

@@ -5689,6 +5689,11 @@ dpp_pkex_build_exchange_resp(struct dpp_pkex *pkex,
 		wpa_printf(MSG_INFO, "DPP: TESTING - no Status");
 		goto skip_status;
 	}
+
+	if (dpp_test == DPP_TEST_INVALID_STATUS_PKEX_EXCHANGE_RESP) {
+		wpa_printf(MSG_INFO, "DPP: TESTING - invalid Status");
+		status = 255;
+	}
 #endif /* CONFIG_TESTING_OPTIONS */
 
 	/* DPP Status */

+ 1 - 0
src/common/dpp.h

@@ -264,6 +264,7 @@ enum dpp_test_behavior {
 	DPP_TEST_NO_WRAPPED_DATA_PKEX_CR_RESP = 43,
 	DPP_TEST_INVALID_ENCRYPTED_KEY_PKEX_EXCHANGE_REQ = 44,
 	DPP_TEST_INVALID_ENCRYPTED_KEY_PKEX_EXCHANGE_RESP = 45,
+	DPP_TEST_INVALID_STATUS_PKEX_EXCHANGE_RESP = 46,
 };
 
 extern enum dpp_test_behavior dpp_test;