diff options
author | pneubeck <pneubeck@chromium.org> | 2015-01-13 09:14:27 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-13 17:16:01 +0000 |
commit | 63f02baf9abbb2f28e2f1676ed10310fcf22eeb2 (patch) | |
tree | fee99e352b89336b66261f25ff017017d12d6cb0 /chromeos/test/data/network | |
parent | d8c8e56321d4c9135ad7d5015db99fbb0e2ec4c2 (diff) | |
download | chromium_src-63f02baf9abbb2f28e2f1676ed10310fcf22eeb2.zip chromium_src-63f02baf9abbb2f28e2f1676ed10310fcf22eeb2.tar.gz chromium_src-63f02baf9abbb2f28e2f1676ed10310fcf22eeb2.tar.bz2 |
ONC: Use HexSSID instead of SSID.
- Comparison of a network policy with network will use HexSSID now.
- Translation from ONC to Shill now copies the HexSSID instead of translating SSID.
- Fix ONC validation of HexSSID/SSID to be case insensitive.
- When setting an ONC: SSID will be ignored if HexSSID is present
- Reading network properties reports a HexSSID in ONC.
BUG=432546
Review URL: https://codereview.chromium.org/823633004
Cr-Commit-Position: refs/heads/master@{#311281}
Diffstat (limited to 'chromeos/test/data/network')
16 files changed, 90 insertions, 12 deletions
diff --git a/chromeos/test/data/network/invalid_settings_with_repairs.json b/chromeos/test/data/network/invalid_settings_with_repairs.json index 5022c05..67c375be 100644 --- a/chromeos/test/data/network/invalid_settings_with_repairs.json +++ b/chromeos/test/data/network/invalid_settings_with_repairs.json @@ -158,7 +158,7 @@ }, "ConnectionState": "NotConnected" }, - "network-wifi-hexssid-invalid-length": { + "wifi-hexssid-invalid-length": { "GUID": "guid", "Type": "WiFi", "Name": "name", @@ -168,7 +168,17 @@ "Security": "WPA-PSK" } }, - "network-wifi-invalid-hexssid": { + "wifi-ssid-invalid-length": { + "GUID": "guid", + "Type": "WiFi", + "Name": "name", + "WiFi": { + "Passphrase": "some passphrase", + "SSID": "a ssid longer than 32 bytes is invalid", + "Security": "WPA-PSK" + } + }, + "wifi-invalid-hexssid": { "GUID": "guid", "Type": "WiFi", "Name": "name", @@ -178,7 +188,7 @@ "Security": "WPA-PSK" } }, - "network-wifi-ssid-and-hexssid-inconsistent": { + "wifi-ssid-and-hexssid-inconsistent": { "GUID": "guid", "Type": "WiFi", "Name": "name", @@ -189,6 +199,27 @@ "Security": "WPA-PSK" } }, + "wifi-ssid-and-hexssid-partially-invalid": { + "GUID": "guid", + "Type": "WiFi", + "Name": "name", + "WiFi": { + "Passphrase": "some passphrase", + "SSID": "a ssid longer than 32 bytes is invalid", + "HexSSID": "FFFFFF", + "Security": "WPA-PSK" + } + }, + "wifi-ssid-and-hexssid-repaired": { + "GUID": "guid", + "Type": "WiFi", + "Name": "name", + "WiFi": { + "Passphrase": "some passphrase", + "HexSSID": "FFFFFF", + "Security": "WPA-PSK" + } + }, "network-unknown-value": { "GUID": "guid", "Type": "LTE", diff --git a/chromeos/test/data/network/policy/managed_onc_disallow_autoconnect_on_unmanaged_wifi2.onc b/chromeos/test/data/network/policy/managed_onc_disallow_autoconnect_on_unmanaged_wifi2.onc index 3de8b23..a3c79ce 100644 --- a/chromeos/test/data/network/policy/managed_onc_disallow_autoconnect_on_unmanaged_wifi2.onc +++ b/chromeos/test/data/network/policy/managed_onc_disallow_autoconnect_on_unmanaged_wifi2.onc @@ -12,6 +12,9 @@ "Effective": "UserPolicy", "UserPolicy": false }, + "HexSSID": { + "Active": "7769666932" // "wifi2" + }, "SSID": { "Active": "wifi2" }, diff --git a/chromeos/test/data/network/policy/policy_wifi1.onc b/chromeos/test/data/network/policy/policy_wifi1.onc index e601c95..e2c4cfa 100644 --- a/chromeos/test/data/network/policy/policy_wifi1.onc +++ b/chromeos/test/data/network/policy/policy_wifi1.onc @@ -5,6 +5,7 @@ "Type": "WiFi", "Name": "Managed wifi1", "WiFi": { + "HexSSID": "7769666931", // "wifi1" "Passphrase": "policy's passphrase", "Recommended": [ "AutoConnect", "Passphrase" ], "SSID": "wifi1", diff --git a/chromeos/test/data/network/repaired_toplevel_partially_invalid.onc b/chromeos/test/data/network/repaired_toplevel_partially_invalid.onc index 5c1c516..33b5b95 100644 --- a/chromeos/test/data/network/repaired_toplevel_partially_invalid.onc +++ b/chromeos/test/data/network/repaired_toplevel_partially_invalid.onc @@ -28,6 +28,16 @@ "IKEVersion": 1 } } + }, + { + "GUID": "456", + "Type": "WiFi", + "Name": "My WiFi Network", + "WiFi": { + "HexSSID": "4F70656E577274", // "OpenWrt" + "Security": "None", + "SSID": "OpenWrt" + } } ], "Certificates": [ diff --git a/chromeos/test/data/network/shill_wifi_clientcert.json b/chromeos/test/data/network/shill_wifi_clientcert.json index 8a0bd7a..2b90e7f 100644 --- a/chromeos/test/data/network/shill_wifi_clientcert.json +++ b/chromeos/test/data/network/shill_wifi_clientcert.json @@ -7,5 +7,5 @@ "SaveCredentials": true, "SecurityClass": "802_1x", "Type": "wifi", - "WiFi.HexSSID": "536F6D65576966692D5859" // "SomeWifi-XY" + "WiFi.HexSSID": "4F70656E577274" // "OpenWrt" } diff --git a/chromeos/test/data/network/shill_wifi_clientref.json b/chromeos/test/data/network/shill_wifi_clientref.json index 65dfbdc..fb5be88 100644 --- a/chromeos/test/data/network/shill_wifi_clientref.json +++ b/chromeos/test/data/network/shill_wifi_clientref.json @@ -7,5 +7,5 @@ "SaveCredentials": true, "SecurityClass": "802_1x", "Type": "wifi", - "WiFi.HexSSID": "536F6D65576966692D5859" // "SomeWifi-XY" + "WiFi.HexSSID": "4F70656E577274", // "OpenWrt" } diff --git a/chromeos/test/data/network/shill_wifi_non_utf8_ssid.json b/chromeos/test/data/network/shill_wifi_non_utf8_ssid.json new file mode 100644 index 0000000..3058d84 --- /dev/null +++ b/chromeos/test/data/network/shill_wifi_non_utf8_ssid.json @@ -0,0 +1,11 @@ +{ + "GUID":"{64c4f86b-cf6a-4e4a-8eff-456def}", + "Mode":"managed", + "Name":"OpenWrt", + "Passphrase":"some passphrase", + "SecurityClass":"psk", + "Type":"wifi", + // Hex of the latin-1, non UTF8 string "latin-1 \xc0\xcb\xcc\xd6\xfb" + "WiFi.HexSSID": "6C6174696E2D3120C0CBCCD6FB" +} + diff --git a/chromeos/test/data/network/toplevel_partially_invalid.onc b/chromeos/test/data/network/toplevel_partially_invalid.onc index 7bb1fb8..141d985 100644 --- a/chromeos/test/data/network/toplevel_partially_invalid.onc +++ b/chromeos/test/data/network/toplevel_partially_invalid.onc @@ -30,6 +30,15 @@ } } }, + { + "GUID": "456", + "Type": "WiFi", + "Name": "My WiFi Network", + "WiFi": { + "Security": "None", + "SSID": "OpenWrt" + } + }, { "GUID": "guid", "Name": "name", "Ethernet": { diff --git a/chromeos/test/data/network/toplevel_wifi_ssid_and_hexssid.onc b/chromeos/test/data/network/toplevel_wifi_ssid_and_hexssid.onc index 99be5bc..74fb658 100644 --- a/chromeos/test/data/network/toplevel_wifi_ssid_and_hexssid.onc +++ b/chromeos/test/data/network/toplevel_wifi_ssid_and_hexssid.onc @@ -1,4 +1,3 @@ -// Test ONC file for importing an open network. { "NetworkConfigurations": [ { @@ -7,7 +6,7 @@ "Name": "My WiFi Network", "WiFi": { "SSID": "Google", - "HexSSID": "476F6F676C65", + "HexSSID": "476f6F676C65", "Security": "None" } } diff --git a/chromeos/test/data/network/translation_of_shill_wifi_clientcert.onc b/chromeos/test/data/network/translation_of_shill_wifi_clientcert.onc index 1f2956c..7a32530 100644 --- a/chromeos/test/data/network/translation_of_shill_wifi_clientcert.onc +++ b/chromeos/test/data/network/translation_of_shill_wifi_clientcert.onc @@ -8,7 +8,8 @@ "SaveCredentials": true, "UseSystemCAs": true }, - "SSID":"SomeWifi-XY", + "HexSSID":"4F70656E577274", // "OpenWrt" + "SSID":"OpenWrt", "Security":"WPA-EAP" } } diff --git a/chromeos/test/data/network/translation_of_shill_wifi_non_utf8_ssid.onc b/chromeos/test/data/network/translation_of_shill_wifi_non_utf8_ssid.onc new file mode 100644 index 0000000..aa1d208 --- /dev/null +++ b/chromeos/test/data/network/translation_of_shill_wifi_non_utf8_ssid.onc @@ -0,0 +1,12 @@ +{ + "GUID":"{64c4f86b-cf6a-4e4a-8eff-456def}", + "Name":"OpenWrt", + "Type":"WiFi", + "WiFi":{ + // Hex of the SSID field + "HexSSID": "6C6174696E2D3120C0CBCCD6FB", + "Passphrase":"some passphrase", + "Security":"WPA-PSK", + "SSID": "latin-1 \u00c0\u00cb\u00cc\u00d6\u00fb" + } +} diff --git a/chromeos/test/data/network/translation_of_shill_wifi_with_state.onc b/chromeos/test/data/network/translation_of_shill_wifi_with_state.onc index 25c833e..43355c2 100644 --- a/chromeos/test/data/network/translation_of_shill_wifi_with_state.onc +++ b/chromeos/test/data/network/translation_of_shill_wifi_with_state.onc @@ -7,6 +7,7 @@ "WiFi": { "AutoConnect": true, "BSSID": "00:12:34:ca:56:8b", + "HexSSID": "4F70656E577274", // "OpenWrt" "HiddenSSID": false, "Passphrase": "some passphrase", "SSID": "OpenWrt", diff --git a/chromeos/test/data/network/valid_wifi_clientref.onc b/chromeos/test/data/network/valid_wifi_clientref.onc index 259ff76..3a31e79 100644 --- a/chromeos/test/data/network/valid_wifi_clientref.onc +++ b/chromeos/test/data/network/valid_wifi_clientref.onc @@ -3,7 +3,7 @@ "Type": "WiFi", "Name": "SomeWifi-XY", "WiFi": { - "SSID": "SomeWifi-XY", + "HexSSID": "4F70656E577274", // "OpenWrt" "Security": "WPA-EAP", "Recommended": [ "AutoConnect" ], "EAP": { diff --git a/chromeos/test/data/network/valid_wifi_psk.onc b/chromeos/test/data/network/valid_wifi_psk.onc index 0fde0dd..0de9781 100644 --- a/chromeos/test/data/network/valid_wifi_psk.onc +++ b/chromeos/test/data/network/valid_wifi_psk.onc @@ -27,9 +27,9 @@ "AutoConnect": true, "Frequency": 2412, "FrequencyList": [2412, 5180], + "HexSSID": "4F70656E577274", // "OpenWrt" "HiddenSSID": false, "Passphrase": "some passphrase", - "SSID": "OpenWrt", "Security": "WPA-PSK" } } diff --git a/chromeos/test/data/network/wifi_clientcert_with_cert_pems.onc b/chromeos/test/data/network/wifi_clientcert_with_cert_pems.onc index 32481f0..7e31b61 100644 --- a/chromeos/test/data/network/wifi_clientcert_with_cert_pems.onc +++ b/chromeos/test/data/network/wifi_clientcert_with_cert_pems.onc @@ -3,7 +3,7 @@ "Type": "WiFi", "Name": "SomeWifi-XY", "WiFi": { - "SSID": "SomeWifi-XY", + "HexSSID": "4F70656E577274", // Hex of "OpenWrt" "Security": "WPA-EAP", "Recommended": [ "AutoConnect" ], "EAP": { diff --git a/chromeos/test/data/network/wifi_dhcp.onc b/chromeos/test/data/network/wifi_dhcp.onc index 12ae00e..ad7e9f7 100644 --- a/chromeos/test/data/network/wifi_dhcp.onc +++ b/chromeos/test/data/network/wifi_dhcp.onc @@ -5,8 +5,8 @@ "Type": "WiFi", "WiFi": { "AutoConnect": true, + "HexSSID": "576966695769746844484350", // "WifiWithDHCP" "Passphrase": "some passphrase", - "SSID": "WifiWithDHCP", "Security": "WPA-PSK" } } |