summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHai Shalom <haishalom@google.com>2019-05-15 16:10:40 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-05-15 16:10:40 -0700
commit4db8edb72ec2594a197a51f1e425603eab034855 (patch)
treedafdd31a43ef9c7354d6f5dc46472321d633cb56 /tests
parent86cc34857e22eb4293a54b3758dfe7e846fcb785 (diff)
parent0f9f775c60b6934803401ccf996002dbec781d39 (diff)
Merge "[PSK/EAP] Do not add SHA256 Key mgmt for SupplicantHal < 1.2" into qt-dev am: f339436f90 am: 94a8bec91e
am: 0f9f775c60 Change-Id: I80db60cc2fb00893fa4feca2a18d7243e7dd40e4
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java b/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java
index f8896f44c..796dce1df 100644
--- a/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java
@@ -842,6 +842,36 @@ public class SupplicantStaNetworkHalTest {
}
/**
+ * Tests the addition of SHA256 flags (WPA_PSK_SHA256) is ignored on HAL v1.1 or lower
+ */
+ @Test
+ public void testAddPskSha256FlagsHal1_1OrLower() throws Exception {
+ WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork();
+ assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
+
+ // Check the supplicant variables to ensure that we have NOT added the SHA256 flags.
+ assertFalse((mSupplicantVariables.keyMgmtMask
+ & android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork.KeyMgmtMask
+ .WPA_PSK_SHA256) == android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
+ .KeyMgmtMask.WPA_PSK_SHA256);
+ }
+
+ /**
+ * Tests the addition of SHA256 flags (WPA_EAP_SHA256) is ignored on HAL v1.1 or lower
+ */
+ @Test
+ public void testAddEapSha256FlagsHal1_1OrLower() throws Exception {
+ WifiConfiguration config = WifiConfigurationTestUtil.createEapNetwork();
+ assertTrue(mSupplicantNetwork.saveWifiConfiguration(config));
+
+ // Check the supplicant variables to ensure that we have NOT added the SHA256 flags.
+ assertFalse((mSupplicantVariables.keyMgmtMask
+ & android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork.KeyMgmtMask
+ .WPA_EAP_SHA256) == android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
+ .KeyMgmtMask.WPA_EAP_SHA256);
+ }
+
+ /**
* Tests the retrieval of WPS NFC token.
*/
@Test