Merge pull request #13654 from balajicyp/topic/wep_security_fix_testcase_update

Summary of changes
Remove WEP security Test Case with NULL as WEP security Key are sequence of Hex Values , the character "NULL" is (0x00) it is a valid value ( for ex: this is key index, followed by length and hex key array).

Impact of changes
Remove the test case for NULL( "" )key with NSAPI_SECURITY_WEP to test return value with NSAPI_ERROR_PARAMETER

The set_credentials(const char *ssid, const char *pass, nsapi_security_t security) API has no key length, the key length is derived by using strlen(pass), which works if the pass ( is a string) , but in case of NSAPI_SECURITY_WEP and NSAPI_SECURITY_WPA2_ENT, the key does not happen to be string but a hex char array.

WEP security Key are sequence of Hex Values , the character "NULL" is (0x00) it is a valid value ( for ex: this is key index, followed by length and hex key array).

The key index 0 , 1, 2, 3 are keys used for an WiFi Access point.
pull/13782/head
Martin Kojtal 2020-10-19 08:10:05 +01:00 committed by GitHub
commit 00aee87ef2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -43,9 +43,6 @@ void wifi_set_credential(void)
error = iface->set_credentials("OK", NULL, NSAPI_SECURITY_WEP); error = iface->set_credentials("OK", NULL, NSAPI_SECURITY_WEP);
TEST_ASSERT_EQUAL(NSAPI_ERROR_PARAMETER, error); TEST_ASSERT_EQUAL(NSAPI_ERROR_PARAMETER, error);
error = iface->set_credentials("OK", "", NSAPI_SECURITY_WEP);
TEST_ASSERT_EQUAL(NSAPI_ERROR_PARAMETER, error);
error = iface->set_credentials("OK", NULL, NSAPI_SECURITY_WPA_WPA2); error = iface->set_credentials("OK", NULL, NSAPI_SECURITY_WPA_WPA2);
TEST_ASSERT_EQUAL(NSAPI_ERROR_PARAMETER, error); TEST_ASSERT_EQUAL(NSAPI_ERROR_PARAMETER, error);