summaryrefslogtreecommitdiffstats
path: root/service/java
diff options
context:
space:
mode:
authorSravanthi Palakonda <srapal@codeaurora.org>2015-11-19 19:39:32 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2015-11-24 22:15:50 -0800
commit78a2e373a3f20899f8f6ec3b493c1f8245af107d (patch)
tree1b723512fc91228fb754f52d78ec5aa2bd60ad67 /service/java
parent6747d4f0ff76245f06dfecb634e9a7661ce4e351 (diff)
downloadandroid_frameworks_opt_net_wifi-78a2e373a3f20899f8f6ec3b493c1f8245af107d.tar.gz
android_frameworks_opt_net_wifi-78a2e373a3f20899f8f6ec3b493c1f8245af107d.tar.bz2
android_frameworks_opt_net_wifi-78a2e373a3f20899f8f6ec3b493c1f8245af107d.zip
Do not add (anonymous) identity for EAP-SIM/AKA/AKA` networks.
Improper identity configuration by the user while attempting to modify a network from other EAP types to EAP-SIM/AKA/AKA' results in a failed authentication. EAP-SIM/AKA/AKA' authentication mechanisms shall get the identity from either the telephony manager or the Modem ( EAP-PROXY), if the identity is not configured by the user. Thus , do not configure the identity for such networks. Change-Id: Iceda2323189c7a159de3f0b5d1df6931801a4040 CRs-Fixed: 941567
Diffstat (limited to 'service/java')
-rw-r--r--service/java/com/android/server/wifi/WifiConfigStore.java50
1 files changed, 50 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java
index b3ed8a633..103648f75 100644
--- a/service/java/com/android/server/wifi/WifiConfigStore.java
+++ b/service/java/com/android/server/wifi/WifiConfigStore.java
@@ -2938,6 +2938,56 @@ public class WifiConfigStore extends IpConfigStore {
// No need to save realm or PLMN in supplicant
continue;
}
+ if (key.equals(WifiEnterpriseConfig.IDENTITY_KEY)) {
+ if ((config.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.SIM)||
+ (config.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.AKA)||
+ (config.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.AKA_PRIME)) {
+ if ( (!newNetwork) && (value != null) && !mWifiNative.setNetworkVariable(
+ netId,
+ key,
+ "NULL")) {
+ loge(config.SSID + ": failed to set " + key +
+ ": " + value);
+ break setVariables;
+ }
+ } else {
+ if (!mWifiNative.setNetworkVariable(
+ netId,
+ key,
+ value)) {
+ removeKeys(enterpriseConfig);
+ loge(config.SSID + ": failed to set " + key +
+ ": " + value);
+ break setVariables;
+ }
+ }
+ continue;
+ }
+ if (key.equals(WifiEnterpriseConfig.ANON_IDENTITY_KEY)) {
+ if ((config.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.SIM)||
+ (config.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.AKA)||
+ (config.enterpriseConfig.getEapMethod() == WifiEnterpriseConfig.Eap.AKA_PRIME)) {
+ if ( (!newNetwork) && (value != null) && !mWifiNative.setNetworkVariable(
+ netId,
+ key,
+ "NULL")) {
+ loge(config.SSID + ": failed to set " + key +
+ ": " + value);
+ break setVariables;
+ }
+ } else {
+ if (!mWifiNative.setNetworkVariable(
+ netId,
+ key,
+ value)) {
+ removeKeys(enterpriseConfig);
+ loge(config.SSID + ": failed to set " + key +
+ ": " + value);
+ break setVariables;
+ }
+ }
+ continue;
+ }
if (!((newNetwork == false) && (savedValue != null) &&
(value != null) && value.equals(savedValue)) &&
!mWifiNative.setNetworkVariable(