Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: server/site_tests/network_WiFiSecMat/035CheckWEPKeySyntax

Issue 3461006: add tests for Ascii WEP keys and to test invalid parameters (Closed) Base URL: ssh://git@chromiumos-git//autotest.git
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « server/site_tests/network_WiFiSecMat/004AsciiKeyWEP104 ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/site_tests/network_WiFiSecMat/035CheckWEPKeySyntax
diff --git a/server/site_tests/network_WiFiSecMat/035CheckWEPKeySyntax b/server/site_tests/network_WiFiSecMat/035CheckWEPKeySyntax
new file mode 100644
index 0000000000000000000000000000000000000000..8e02fd887b744d75e8424e23a2b8344aa7db5d0d
--- /dev/null
+++ b/server/site_tests/network_WiFiSecMat/035CheckWEPKeySyntax
@@ -0,0 +1,173 @@
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{ "name":"CheckWEPKeySyntax",
+ "steps":[ # Channel [1,6,11]
+ [ "create", { "type":"hostap" } ],
+ [ "config", { "channel":"2412", "mode":"11g",
+ "wepmode":"on",
+ # 10 digits : 0123456789
+ "wep_key0": "0123456789",
+ "wep_key1": "0123456789abcdef0123456789",
+ }
+ ],
+
+ # key index 0, too short for WEP-40
+ [ "!connect", { "security":"wep", "psk":"0:0" } ],
+ [ "!connect", { "security":"wep", "psk":"0:01" } ],
+# NB: valid ascii string
+# [ "!connect", { "security":"wep", "psk":"0:012" } ],
+ [ "!connect", { "security":"wep", "psk":"0:0123" } ],
+# NB: valid ascii string w/ 0: prefix
+# [ "!connect", { "security":"wep", "psk":"0:01234" } ],
+ [ "!connect", { "security":"wep", "psk":"0:012345" } ],
+ [ "!connect", { "security":"wep", "psk":"0:0123456" } ],
+ [ "!connect", { "security":"wep", "psk":"0:01234567" } ],
+ [ "!connect", { "security":"wep", "psk":"0:012345678" } ],
+
+ # key index 0, 0x prefix, too short for WEP-40
+# NB: valid ascii string
+# [ "!connect", { "security":"wep", "psk":"0:0x0" } ],
+ [ "!connect", { "security":"wep", "psk":"0:0x01" } ],
+# NB: valid ascii string
+# [ "!connect", { "security":"wep", "psk":"0:0x012" } ],
+ [ "!connect", { "security":"wep", "psk":"0:0x0123" } ],
+ [ "!connect", { "security":"wep", "psk":"0:0x01234" } ],
+ [ "!connect", { "security":"wep", "psk":"0:0x012345" } ],
+ [ "!connect", { "security":"wep", "psk":"0:0x0123456" } ],
+ [ "!connect", { "security":"wep", "psk":"0:0x01234567" } ],
+# NB: valid ascii string
+# [ "!connect", { "security":"wep", "psk":"0:0x012345678" } ],
+
+ # key index 1, too short for WEP-104
+# NB: valid ascii string
+# [ "!connect", { "security":"wep", "psk":"1:0123456789a" } ],
+ [ "!connect", { "security":"wep", "psk":"1:0123456789ab" } ],
+# NB: valid ascii string w/ 1: prefix
+# [ "!connect", { "security":"wep", "psk":"1:0123456789abc" } ],
+ [ "!connect", { "security":"wep", "psk":"1:0123456789abcd" } ],
+ [ "!connect", { "security":"wep", "psk":"1:0123456789abcde" } ],
+ [ "!connect", { "security":"wep", "psk":"1:0123456789abcdef" } ],
+ [ "!connect", { "security":"wep", "psk":"1:0123456789abcdef0" } ],
+ [ "!connect", { "security":"wep", "psk":"1:0123456789abcdef01" } ],
+ [ "!connect", { "security":"wep", "psk":"1:0123456789abcdef012" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0123456789abcdef0123" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0123456789abcdef01234" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0123456789abcdef012345" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0123456789abcdef0123456" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0123456789abcdef01234567" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0123456789abcdef012345678" } ],
+
+ # key index 1, 0x prefix, too short for WEP-104
+# NB: valid ascii string w/ 1: prefix
+# [ "!connect", { "security":"wep", "psk":"1:0x0123456789a" } ],
+ [ "!connect", { "security":"wep", "psk":"1:0x0123456789ab" } ],
+ [ "!connect", { "security":"wep", "psk":"1:0x0123456789abc" } ],
+ [ "!connect", { "security":"wep", "psk":"1:0x0123456789abcd" } ],
+ [ "!connect", { "security":"wep", "psk":"1:0x0123456789abcde" } ],
+ [ "!connect", { "security":"wep", "psk":"1:0x0123456789abcdef" } ],
+ [ "!connect", { "security":"wep", "psk":"1:0x0123456789abcdef0" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0x0123456789abcdef01" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0x0123456789abcdef012" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0x0123456789abcdef0123" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0x0123456789abcdef01234" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0x0123456789abcdef012345" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0x0123456789abcdef0123456" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0x0123456789abcdef01234567" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0x0123456789abcdef012345678" } ],
+
+ # key index 1, too long for WEP-104
+ [ "!connect", { "security":"wep",
+ "psk":"1:0123456789abcdef0123456789a" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0123456789abcdef0123456789ab" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0123456789abcdef0123456789abc" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0123456789abcdef0123456789abcd" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0123456789abcdef0123456789abcde" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0123456789abcdef0123456789abcdef" } ],
+
+ # key index 1, 0x prefix, too long for WEP-104
+ [ "!connect", { "security":"wep",
+ "psk":"1:0x0123456789abcdef0123456789a" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0x0123456789abcdef0123456789ab" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0x0123456789abcdef0123456789abc" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0x0123456789abcdef0123456789abcd" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0x0123456789abcdef0123456789abcde" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"1:0x0123456789abcdef0123456789abcdef" } ],
+
+ # invalid key index, valid 40-bit WEP key
+ [ "!connect", { "security":"wep", "psk":"4:0123456789" } ],
+ [ "!connect", { "security":"wep", "psk":"5:0123456789" } ],
+ [ "!connect", { "security":"wep", "psk":"a:0123456789" } ],
+# NB: valid ascii string w/ 1: prefix
+# [ "!connect", { "security":"wep", "psk":"gg:0123456789" } ],
+
+ # invalid key index, 0x prefix, valid 40-bit WEP key
+ [ "!connect", { "security":"wep", "psk":"4:0x0123456789" } ],
+ [ "!connect", { "security":"wep", "psk":"5:0x0123456789" } ],
+ [ "!connect", { "security":"wep", "psk":"00:0x0123456789" } ],
+ [ "!connect", { "security":"wep", "psk":"01:0x0123456789" } ],
+ [ "!connect", { "security":"wep", "psk":"02:0x0123456789" } ],
+ [ "!connect", { "security":"wep", "psk":"04:0x0123456789" } ],
+ [ "!connect", { "security":"wep", "psk":"a:0x0123456789" } ],
+ [ "!connect", { "security":"wep", "psk":"gg:0x0123456789" } ],
+
+ # invalid key index, valid 104-bit WEP key
+ [ "!connect", { "security":"wep",
+ "psk":"4:0123456789abcdef0123456789" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"00:0123456789abcdef0123456789" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"01:0123456789abcdef0123456789" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"-2:0123456789abcdef0123456789" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"04:0123456789abcdef0123456789" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"a:0123456789abcdef0123456789" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"gg:0123456789abcdef0123456789" } ],
+
+ # invalid key index, 0x prefix, valid 104-bit WEP key
+ [ "!connect", { "security":"wep",
+ "psk":"4:0x0123456789abcdef0123456789" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"00:0x0123456789abcdef0123456789" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"01:0x0123456789abcdef0123456789" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"-2:0x0123456789abcdef0123456789" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"04:0x0123456789abcdef0123456789" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"a:0x0123456789abcdef0123456789" } ],
+ [ "!connect", { "security":"wep",
+ "psk":"gg:0x0123456789abcdef0123456789" } ],
+
+ [ "destroy" ],
+ ],
+}
« no previous file with comments | « server/site_tests/network_WiFiSecMat/004AsciiKeyWEP104 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698