diff options
author | Hai Shalom <haishalom@google.com> | 2020-03-11 18:25:44 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-03-11 18:25:44 +0000 |
commit | 663f1b9226ea4b710195565d80caaade9cf1ec47 (patch) | |
tree | e94f2503eea6cbc30d5e05a1c90be61ae8235a7e /service | |
parent | e086bee18ee260b39649f32ab018ff4142e0da2f (diff) | |
parent | dd977a573fe732651abbff51b30b8170466fed46 (diff) |
Merge "[SAE] Revert "wifi: support SAE password identifier"" into rvc-dev
Diffstat (limited to 'service')
3 files changed, 0 insertions, 77 deletions
diff --git a/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java b/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java index f9ac13f52..8571109cd 100644 --- a/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java +++ b/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java @@ -215,12 +215,6 @@ public class SupplicantStaNetworkHal { config.preSharedKey = NativeUtil.hexStringFromByteArray(mPsk); } /* Do not read SAE password */ - /** SAE Password id */ - config.saePasswordId = null; - if (getSaePasswordId() && !TextUtils.isEmpty(mSaePasswordId)) { - config.saePasswordId = mSaePasswordId; - } - /** allowedKeyManagement */ if (getKeyMgmt()) { BitSet keyMgmtMask = supplicantToWifiConfigurationKeyMgmtMask(mKeyMgmtMask); @@ -334,14 +328,6 @@ public class SupplicantStaNetworkHal { } } - if (config.saePasswordId != null - && config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.SAE)) { - if (!setSaePasswordId(config.saePasswordId)) { - Log.e(TAG, "failed to ste sae password id"); - return false; - } - } - /** Wep Keys */ boolean hasSetKey = false; if (config.wepKeys != null) { @@ -1969,63 +1955,6 @@ public class SupplicantStaNetworkHal { } } } - /** See ISupplicantStaNetwork.hal for documentation */ - private boolean getSaePasswordId() { - synchronized (mLock) { - final String methodStr = "getSaePasswordId"; - if (!checkISupplicantStaNetworkAndLogFailure(methodStr)) return false; - try { - android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork - iSupplicantStaNetworkV12; - - iSupplicantStaNetworkV12 = getV1_2StaNetwork(); - if (iSupplicantStaNetworkV12 != null) { - /* Support for SAE Requires HAL v1.2 or higher */ - MutableBoolean statusOk = new MutableBoolean(false); - iSupplicantStaNetworkV12.getSaePasswordId((SupplicantStatus status, - String saePasswordId) -> { - statusOk.value = status.code == SupplicantStatusCode.SUCCESS; - if (statusOk.value) { - this.mSaePasswordId = saePasswordId; - } else { - checkStatusAndLogFailure(status, methodStr); - } - }); - return statusOk.value; - } else { - return false; - } - } catch (RemoteException e) { - handleRemoteException(e, methodStr); - return false; - } - } - } - - /** See ISupplicantStaNetwork.hal for documentation */ - private boolean setSaePasswordId(String saePasswordId) { - synchronized (mLock) { - final String methodStr = "setSaePasswordId"; - if (!checkISupplicantStaNetworkAndLogFailure(methodStr)) return false; - try { - android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork - iSupplicantStaNetworkV12; - - iSupplicantStaNetworkV12 = getV1_2StaNetwork(); - if (iSupplicantStaNetworkV12 != null) { - /* Support for SAE Requires HAL v1.2 or higher */ - SupplicantStatus status = iSupplicantStaNetworkV12 - .setSaePasswordId(saePasswordId); - return checkStatusAndLogFailure(status, methodStr); - } else { - return false; - } - } catch (RemoteException e) { - handleRemoteException(e, methodStr); - return false; - } - } - } /** See ISupplicantStaNetwork.hal for documentation */ private boolean getSsid() { diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java index 91612fe77..57fe78c1a 100644 --- a/service/java/com/android/server/wifi/WifiConfigManager.java +++ b/service/java/com/android/server/wifi/WifiConfigManager.java @@ -958,7 +958,6 @@ public class WifiConfigManager { && !externalConfig.preSharedKey.equals(PASSWORD_MASK)) { internalConfig.preSharedKey = externalConfig.preSharedKey; } - internalConfig.saePasswordId = externalConfig.saePasswordId; // Modify only wep keys are present in the provided configuration. This is a little tricky // because there is no easy way to tell if the app is actually trying to null out the // existing keys or not. diff --git a/service/java/com/android/server/wifi/util/XmlUtil.java b/service/java/com/android/server/wifi/util/XmlUtil.java index 7c32634c0..906f99802 100644 --- a/service/java/com/android/server/wifi/util/XmlUtil.java +++ b/service/java/com/android/server/wifi/util/XmlUtil.java @@ -352,7 +352,6 @@ public class XmlUtil { public static final String XML_TAG_ROAMING_CONSORTIUM_OIS = "RoamingConsortiumOIs"; public static final String XML_TAG_RANDOMIZED_MAC_ADDRESS = "RandomizedMacAddress"; public static final String XML_TAG_MAC_RANDOMIZATION_SETTING = "MacRandomizationSetting"; - public static final String XML_TAG_SAE_PASSWORD_ID_KEY = "SaePasswordId"; public static final String XML_TAG_CARRIER_ID = "CarrierId"; public static final String XML_TAG_IS_AUTO_JOIN = "AutoJoinEnabled"; @@ -428,7 +427,6 @@ public class XmlUtil { XmlUtil.writeNextValue(out, XML_TAG_CONFIG_KEY, configuration.getKey()); XmlUtil.writeNextValue(out, XML_TAG_SSID, configuration.SSID); writePreSharedKeyToXml(out, configuration.preSharedKey, encryptionUtil); - XmlUtil.writeNextValue(out, XML_TAG_SAE_PASSWORD_ID_KEY, configuration.saePasswordId); writeWepKeysToXml(out, configuration.wepKeys); XmlUtil.writeNextValue(out, XML_TAG_WEP_TX_KEY_INDEX, configuration.wepTxKeyIndex); XmlUtil.writeNextValue(out, XML_TAG_HIDDEN_SSID, configuration.hiddenSSID); @@ -588,9 +586,6 @@ public class XmlUtil { case XML_TAG_PRE_SHARED_KEY: configuration.preSharedKey = (String) value; break; - case XML_TAG_SAE_PASSWORD_ID_KEY: - configuration.saePasswordId = (String) value; - break; case XML_TAG_WEP_KEYS: populateWepKeysFromXmlValue(value, configuration.wepKeys); break; |