summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEtan Cohen <etancohen@google.com>2018-11-01 10:44:00 -0700
committerEtan Cohen <etancohen@google.com>2018-11-21 00:20:02 +0000
commit6d37c0e7b156dc26b177858111eee2f33dad9582 (patch)
treeeb60ec0be0664fc05b0047edddfda2dad1bebe7f
parent0a5ff7a2f1f875bb1346bcdec5926ba77a605f34 (diff)
downloadandroid_frameworks_opt_net_wifi-6d37c0e7b156dc26b177858111eee2f33dad9582.tar.gz
android_frameworks_opt_net_wifi-6d37c0e7b156dc26b177858111eee2f33dad9582.tar.bz2
android_frameworks_opt_net_wifi-6d37c0e7b156dc26b177858111eee2f33dad9582.zip
[Carrier Wi-Fi] Reset config identity on reboot or SIM in/out
For Carrier Wi-Fi configurations reset the complete configuration identity - not just the anonymous identity. This will ensure that the encrypted identity is queried for and used for the EAP-SIM negotiations. Bug: 118818180 Test: atest frameworks/opt/net/wifi/tests/wifitests Test: integration/sanity testing passes, ref: b/119678669 Merged-In: I4ebf85a524473bf28ce2245b1e85ed933ba208c2 Change-Id: I4ebf85a524473bf28ce2245b1e85ed933ba208c2
-rw-r--r--service/java/com/android/server/wifi/WifiConfigManager.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java
index 0b70dbf4e..7dc938b34 100644
--- a/service/java/com/android/server/wifi/WifiConfigManager.java
+++ b/service/java/com/android/server/wifi/WifiConfigManager.java
@@ -2470,13 +2470,23 @@ public class WifiConfigManager {
currentIdentity = TelephonyUtil.getSimIdentity(mTelephonyManager,
new TelephonyUtil(), config);
}
+ if (mVerboseLoggingEnabled) {
+ Log.d(TAG, "New identity for config " + config + ": " + currentIdentity);
+ }
+
// Update the loaded config
if (currentIdentity == null) {
- Log.d(TAG, "Identity is null");
- return;
+ Log.d(TAG, "Identity is null for config:" + config);
+ break;
}
- config.enterpriseConfig.setIdentity(currentIdentity.first);
- if (config.enterpriseConfig.getEapMethod() != WifiEnterpriseConfig.Eap.PEAP) {
+
+ if (config.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.PEAP) {
+ config.enterpriseConfig.setIdentity(currentIdentity.first);
+ // do not reset anonymous identity since it may be dependent on user-entry
+ // (i.e. cannot re-request on every reboot/SIM re-entry)
+ } else {
+ // reset identity as well: supplicant will ask us for it
+ config.enterpriseConfig.setIdentity("");
config.enterpriseConfig.setAnonymousIdentity("");
}
}