summaryrefslogtreecommitdiffstats
path: root/service/java/com/android/server/wifi/WifiConfigManager.java
diff options
context:
space:
mode:
authorEtan Cohen <etancohen@google.com>2018-11-20 16:18:07 -0800
committerEtan Cohen <etancohen@google.com>2018-11-20 17:03:51 -0800
commit2de442dd33b0fa3622b55d081f84768f99a6b6a3 (patch)
treefc895a889df690a26fa24ed5997702c1a872c394 /service/java/com/android/server/wifi/WifiConfigManager.java
parent92c432b2a6cfbf8062a100ce15a0227f47682d6c (diff)
downloadandroid_frameworks_opt_net_wifi-2de442dd33b0fa3622b55d081f84768f99a6b6a3.tar.gz
android_frameworks_opt_net_wifi-2de442dd33b0fa3622b55d081f84768f99a6b6a3.tar.bz2
android_frameworks_opt_net_wifi-2de442dd33b0fa3622b55d081f84768f99a6b6a3.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 on pi-dev, ref: b/119678669 Change-Id: I4ebf85a524473bf28ce2245b1e85ed933ba208c2
Diffstat (limited to 'service/java/com/android/server/wifi/WifiConfigManager.java')
-rw-r--r--service/java/com/android/server/wifi/WifiConfigManager.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java
index 48ba44a82..a145fde47 100644
--- a/service/java/com/android/server/wifi/WifiConfigManager.java
+++ b/service/java/com/android/server/wifi/WifiConfigManager.java
@@ -2620,14 +2620,22 @@ public class WifiConfigManager {
Pair<String, String> 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");
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("");
}
}