summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaisuke Niwa <daisuke.niwa@sony.com>2018-06-27 14:14:57 +0900
committerDaichi Ueura <daichi.ueura@sony.com>2018-09-05 13:31:48 +0900
commitbb2676abb394c9b4c236df5c3420140bbd8320f4 (patch)
tree997b7e298bdd1010fd051b00ac0f7f9578f8fe88 /tests
parent9666cb415d7d44a86cfb0b7ec1df6e6317fe3259 (diff)
Skip Anonymous Identity check in SIM/AKA/AKA' networks
The current code causes an issue that fast re-authentication identity is cleared when device re-connects to same AP. This is because when WifiStateMachine receives NETWORK_CONNECTION_EVENT, it doesn't update anonymousIdentity of mCurrentNetworkLocalConfigs. Hence isSameNetwork called by connectToNetwork returns false. And then network block in wpa_supplicant is removed and fast re-authentication identity (EAP state) is cleared. Since pseudonym identity is stored in anonymousIdentity field in case of EAP-SIM/AKA/AKA' network and it's frequently updated by server, skipping anonymousIdentity field comparison should not be a problem. Bug: 113952712 Test: Manual Test: Unit test Change-Id: I295f2489ab48022f95f2703e44ceb33fefcb3e1f
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java
index 7bb24371a..3774feca3 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java
@@ -614,6 +614,21 @@ public class WifiConfigurationUtilTest {
}
/**
+ * Verify that WifiConfigurationUtil.isSameNetwork returns true when two WifiConfiguration
+ * objects have the different EAP anonymous(pseudonym) identity in EAP-SIM.
+ */
+ @Test
+ public void testIsSameNetworkReturnsTrueOnDifferentEapAnonymousIdentityInEapSim() {
+ WifiConfiguration network1 = WifiConfigurationTestUtil.createEapNetwork(TEST_SSID);
+ WifiConfiguration network2 = WifiConfigurationTestUtil.createEapNetwork(TEST_SSID);
+ network1.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.SIM);
+ network2.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.SIM);
+ network1.enterpriseConfig.setAnonymousIdentity("Identity1");
+ network2.enterpriseConfig.setAnonymousIdentity("Identity2");
+ assertTrue(WifiConfigurationUtil.isSameNetwork(network1, network2));
+ }
+
+ /**
* Verify the instance of {@link android.net.wifi.WifiScanner.PnoSettings.PnoNetwork} created
* for a EAP network using {@link WifiConfigurationUtil#createPnoNetwork(WifiConfiguration)
* }.