diff options
author | Paul Stewart <pstew@google.com> | 2016-02-29 10:10:45 -0800 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2016-03-08 19:44:34 -0800 |
commit | 765f8505c3af8d51d15997959e9ea6a4c21a372f (patch) | |
tree | 61cf8c6dad84abff0188714a7487b897ff90c188 | |
parent | 52ba5c929de76ae54a3f2cc8b7d648f763f10ee5 (diff) | |
download | android_frameworks_opt_net_wifi-765f8505c3af8d51d15997959e9ea6a4c21a372f.tar.gz android_frameworks_opt_net_wifi-765f8505c3af8d51d15997959e9ea6a4c21a372f.tar.bz2 android_frameworks_opt_net_wifi-765f8505c3af8d51d15997959e9ea6a4c21a372f.zip |
Revert "Appropriately fail EAP-SIM/AKA when SIM doesn't generate good response"
This reverts commit 5ebc35f19feab2755a13cf7d5acaeff4bbc78994.
-rw-r--r-- | service/java/com/android/server/wifi/WifiNative.java | 10 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiStateMachine.java | 24 |
2 files changed, 8 insertions, 26 deletions
diff --git a/service/java/com/android/server/wifi/WifiNative.java b/service/java/com/android/server/wifi/WifiNative.java index 7bdd17c3e..d1b009e07 100644 --- a/service/java/com/android/server/wifi/WifiNative.java +++ b/service/java/com/android/server/wifi/WifiNative.java @@ -876,16 +876,6 @@ public class WifiNative { } } - public boolean simAuthFailedResponse(int id) { - // should be used with type GSM-AUTH - return doBooleanCommand("CTRL-RSP-SIM-" + id + ":GSM-FAIL"); - } - - public boolean umtsAuthFailedResponse(int id) { - // should be used with type UMTS-AUTH - return doBooleanCommand("CTRL-RSP-SIM-" + id + ":UMTS-FAIL"); - } - public boolean simIdentityResponse(int id, String response) { synchronized (mLock) { return doBooleanCommand("CTRL-RSP-IDENTITY-" + id + ":" + response); diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java index 7773cb9e4..29c44925e 100644 --- a/service/java/com/android/server/wifi/WifiStateMachine.java +++ b/service/java/com/android/server/wifi/WifiStateMachine.java @@ -10181,19 +10181,16 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiPno String kc = makeHex(result, 1+kc_offset, kc_len); sb.append(":" + kc + ":" + sres); logv("kc:" + kc + " sres:" + sres); - - String response = sb.toString(); - logv("Supplicant Response -" + response); - mWifiNative.simAuthResponse(requestData.networkId, "GSM-AUTH", response); } else { loge("bad response - " + tmResponse); - mWifiNative.simAuthFailedResponse(requestData.networkId); } } + String response = sb.toString(); + logv("Supplicant Response -" + response); + mWifiNative.simAuthResponse(requestData.networkId, "GSM-AUTH", response); } else { loge("could not get telephony manager"); - mWifiNative.simAuthFailedResponse(requestData.networkId); } } @@ -10237,7 +10234,6 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiPno } } - boolean good_response = false; if (tmResponse != null && tmResponse.length() > 4) { byte[] result = android.util.Base64.decode(tmResponse, android.util.Base64.DEFAULT); @@ -10253,7 +10249,6 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiPno String ik = makeHex(result, res_len + ck_len + 4, ik_len); sb.append(":" + ik + ":" + ck + ":" + res); logv("ik:" + ik + "ck:" + ck + " res:" + res); - good_response = true; } else if (tag == (byte) 0xdc) { loge("synchronisation failure"); int auts_len = result[1]; @@ -10261,21 +10256,18 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiPno res_type = "UMTS-AUTS"; sb.append(":" + auts); logv("auts:" + auts); - good_response = true; } else { loge("bad response - unknown tag = " + tag); + return; } } else { loge("bad response - " + tmResponse); + return; } - if (good_response) { - String response = sb.toString(); - if (VDBG) logv("Supplicant Response -" + response); - mWifiNative.simAuthResponse(requestData.networkId, res_type, response); - } else { - mWifiNative.umtsAuthFailedResponse(requestData.networkId); - } + String response = sb.toString(); + logv("Supplicant Response -" + response); + mWifiNative.simAuthResponse(requestData.networkId, res_type, response); } /** |