diff options
author | David Su <dysu@google.com> | 2020-02-14 18:27:15 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-02-14 18:27:15 +0000 |
commit | 60ee22d264305e31377e36847710e38d7f7d6282 (patch) | |
tree | 1be228acf92e342e98578ad1cf9eccb1722680d9 | |
parent | 234db4a3f2d5000bfe45b6fbaaef7ee1df6c20df (diff) | |
parent | af0cc2f59e313dddd0a57249c49872114f5d2705 (diff) |
Merge "Rename requirePMF to requirePmf"
13 files changed, 35 insertions, 35 deletions
diff --git a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/StandardWifiEntry.java b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/StandardWifiEntry.java index 78141b64c..299c0f589 100644 --- a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/StandardWifiEntry.java +++ b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/StandardWifiEntry.java @@ -394,7 +394,7 @@ public class StandardWifiEntry extends WifiEntry { if (mSecurity == SECURITY_OWE) { // Use OWE if possible connectConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.OWE); - connectConfig.requirePMF = true; + connectConfig.requirePmf = true; } else { connectConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE); } diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_2Impl.java b/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_2Impl.java index 2c3dc61b8..89e66d22c 100644 --- a/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_2Impl.java +++ b/service/java/com/android/server/wifi/SupplicantStaIfaceCallbackV1_2Impl.java @@ -173,7 +173,7 @@ abstract class SupplicantStaIfaceCallbackV1_2Impl extends // Set up key management: SAE or PSK if (securityAkm == DppAkm.SAE || securityAkm == DppAkm.PSK_SAE) { newWifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.SAE); - newWifiConfiguration.requirePMF = true; + newWifiConfiguration.requirePmf = true; } else if (securityAkm == DppAkm.PSK) { newWifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK); } else { diff --git a/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java b/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java index 604641533..02bda7e0f 100644 --- a/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java +++ b/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java @@ -192,9 +192,9 @@ public class SupplicantStaNetworkHal { config.hiddenSSID = mScanSsid; } /** Require PMF*/ - config.requirePMF = false; + config.requirePmf = false; if (getRequirePmf()) { - config.requirePMF = mRequirePmf; + config.requirePmf = mRequirePmf; } /** WEP keys **/ config.wepTxKeyIndex = -1; @@ -370,8 +370,8 @@ public class SupplicantStaNetworkHal { } /** RequirePMF */ - if (!setRequirePmf(config.requirePMF)) { - Log.e(TAG, config.SSID + ": failed to set requirePMF: " + config.requirePMF); + if (!setRequirePmf(config.requirePmf)) { + Log.e(TAG, config.SSID + ": failed to set requirePMF: " + config.requirePmf); return false; } /** Key Management Scheme */ diff --git a/service/java/com/android/server/wifi/WifiBackupDataV1Parser.java b/service/java/com/android/server/wifi/WifiBackupDataV1Parser.java index b7b0ff9e2..b787df2c2 100644 --- a/service/java/com/android/server/wifi/WifiBackupDataV1Parser.java +++ b/service/java/com/android/server/wifi/WifiBackupDataV1Parser.java @@ -321,7 +321,7 @@ class WifiBackupDataV1Parser implements WifiBackupDataParser { configuration.hiddenSSID = (boolean) value; break; case WifiConfigurationXmlUtil.XML_TAG_REQUIRE_PMF: - configuration.requirePMF = (boolean) value; + configuration.requirePmf = (boolean) value; break; case WifiConfigurationXmlUtil.XML_TAG_ALLOWED_KEY_MGMT: byte[] allowedKeyMgmt = (byte[]) value; diff --git a/service/java/com/android/server/wifi/WifiConfigManager.java b/service/java/com/android/server/wifi/WifiConfigManager.java index bea3602d5..32f300815 100644 --- a/service/java/com/android/server/wifi/WifiConfigManager.java +++ b/service/java/com/android/server/wifi/WifiConfigManager.java @@ -954,7 +954,7 @@ public class WifiConfigManager { internalConfig.BSSID = externalConfig.BSSID.toLowerCase(); } internalConfig.hiddenSSID = externalConfig.hiddenSSID; - internalConfig.requirePMF = externalConfig.requirePMF; + internalConfig.requirePmf = externalConfig.requirePmf; if (externalConfig.preSharedKey != null && !externalConfig.preSharedKey.equals(PASSWORD_MASK)) { @@ -1112,7 +1112,7 @@ public class WifiConfigManager { // Copy over the hidden configuration parameters. These are the only parameters used by // system apps to indicate some property about the network being added. // These are only copied over for network additions and ignored for network updates. - newInternalConfig.requirePMF = externalConfig.requirePMF; + newInternalConfig.requirePmf = externalConfig.requirePmf; newInternalConfig.noInternetAccessExpected = externalConfig.noInternetAccessExpected; newInternalConfig.ephemeral = externalConfig.ephemeral; newInternalConfig.osu = externalConfig.osu; diff --git a/service/java/com/android/server/wifi/WifiConfigurationUtil.java b/service/java/com/android/server/wifi/WifiConfigurationUtil.java index 21d7af44e..72d8db21c 100644 --- a/service/java/com/android/server/wifi/WifiConfigurationUtil.java +++ b/service/java/com/android/server/wifi/WifiConfigurationUtil.java @@ -304,7 +304,7 @@ public class WifiConfigurationUtil { if (existingConfig.hiddenSSID != newConfig.hiddenSSID) { return true; } - if (existingConfig.requirePMF != newConfig.requirePMF) { + if (existingConfig.requirePmf != newConfig.requirePmf) { return true; } if (hasEnterpriseConfigChanged(existingConfig.enterpriseConfig, @@ -583,14 +583,14 @@ public class WifiConfigurationUtil { } if (config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.OWE)) { // PMF mandatory for OWE networks - if (!config.requirePMF) { + if (!config.requirePmf) { Log.e(TAG, "PMF must be enabled for OWE networks"); return false; } } if (config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.SAE)) { // PMF mandatory for WPA3-Personal networks - if (!config.requirePMF) { + if (!config.requirePmf) { Log.e(TAG, "PMF must be enabled for SAE networks"); return false; } @@ -600,7 +600,7 @@ public class WifiConfigurationUtil { } if (config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.SUITE_B_192)) { // PMF mandatory for WPA3-Enterprise networks - if (!config.requirePMF) { + if (!config.requirePmf) { Log.e(TAG, "PMF must be enabled for Suite-B 192-bit networks"); return false; } @@ -738,13 +738,13 @@ public class WifiConfigurationUtil { } if (config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.OWE)) { // PMF mandatory for OWE networks - if (!config.requirePMF) { + if (!config.requirePmf) { return false; } } if (config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.SAE)) { // PMF mandatory for WPA3-Personal networks - if (!config.requirePMF) { + if (!config.requirePmf) { return false; } if (!validatePassword(config.preSharedKey, true, true)) { @@ -753,7 +753,7 @@ public class WifiConfigurationUtil { } if (config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.SUITE_B_192)) { // PMF mandatory for WPA3-Enterprise networks - if (!config.requirePMF) { + if (!config.requirePmf) { return false; } } diff --git a/service/java/com/android/server/wifi/util/XmlUtil.java b/service/java/com/android/server/wifi/util/XmlUtil.java index 79a6f1c69..06f8c4967 100644 --- a/service/java/com/android/server/wifi/util/XmlUtil.java +++ b/service/java/com/android/server/wifi/util/XmlUtil.java @@ -432,7 +432,7 @@ public class XmlUtil { writeWepKeysToXml(out, configuration.wepKeys); XmlUtil.writeNextValue(out, XML_TAG_WEP_TX_KEY_INDEX, configuration.wepTxKeyIndex); XmlUtil.writeNextValue(out, XML_TAG_HIDDEN_SSID, configuration.hiddenSSID); - XmlUtil.writeNextValue(out, XML_TAG_REQUIRE_PMF, configuration.requirePMF); + XmlUtil.writeNextValue(out, XML_TAG_REQUIRE_PMF, configuration.requirePmf); XmlUtil.writeNextValue( out, XML_TAG_ALLOWED_KEY_MGMT, configuration.allowedKeyManagement.toByteArray()); @@ -601,7 +601,7 @@ public class XmlUtil { configuration.hiddenSSID = (boolean) value; break; case XML_TAG_REQUIRE_PMF: - configuration.requirePMF = (boolean) value; + configuration.requirePmf = (boolean) value; break; case XML_TAG_ALLOWED_KEY_MGMT: byte[] allowedKeyMgmt = (byte[]) value; diff --git a/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java b/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java index 541d30637..949b8659f 100644 --- a/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java +++ b/tests/wifitests/src/com/android/server/wifi/SupplicantStaNetworkHalTest.java @@ -220,7 +220,7 @@ public class SupplicantStaNetworkHalTest extends WifiBaseTest { @Test public void testPskPassphraseNetworkWifiConfigurationSaveLoad() throws Exception { WifiConfiguration config = WifiConfigurationTestUtil.createPskNetwork(); - config.requirePMF = true; + config.requirePmf = true; testWifiConfigurationSaveLoad(config); verify(mISupplicantStaNetworkMock).setPskPassphrase(anyString()); verify(mISupplicantStaNetworkMock) diff --git a/tests/wifitests/src/com/android/server/wifi/WifiBackupRestoreTest.java b/tests/wifitests/src/com/android/server/wifi/WifiBackupRestoreTest.java index 57920ae95..39e8b0753 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiBackupRestoreTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiBackupRestoreTest.java @@ -337,7 +337,7 @@ public class WifiBackupRestoreTest extends WifiBaseTest { config.SSID = "\"GoogleGuest-Legacy\""; config.wepTxKeyIndex = 0; config.hiddenSSID = false; - config.requirePMF = false; + config.requirePmf = false; config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE); config.allowedProtocols.set(WifiConfiguration.Protocol.WPA); config.allowedProtocols.set(WifiConfiguration.Protocol.RSN); @@ -390,7 +390,7 @@ public class WifiBackupRestoreTest extends WifiBaseTest { config.SSID = "\"GoogleGuest-Legacy\""; config.wepTxKeyIndex = 0; config.hiddenSSID = false; - config.requirePMF = false; + config.requirePmf = false; config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE); config.allowedProtocols.set(WifiConfiguration.Protocol.WPA); config.allowedProtocols.set(WifiConfiguration.Protocol.RSN); @@ -968,7 +968,7 @@ public class WifiBackupRestoreTest extends WifiBaseTest { config.SSID = "\"GoogleGuest-Legacy\""; config.wepTxKeyIndex = 0; config.hiddenSSID = false; - config.requirePMF = false; + config.requirePmf = false; config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE); config.allowedProtocols.set(WifiConfiguration.Protocol.WPA); config.allowedProtocols.set(WifiConfiguration.Protocol.RSN); diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java index 85d3705b7..bf5c0505e 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigManagerTest.java @@ -2006,8 +2006,8 @@ public class WifiConfigManagerTest extends WifiBaseTest { verifyAddNetworkHasEverConnectedFalse(pskNetwork); verifyUpdateNetworkAfterConnectHasEverConnectedTrue(pskNetwork.networkId); - assertFalse(pskNetwork.requirePMF); - pskNetwork.requirePMF = true; + assertFalse(pskNetwork.requirePmf); + pskNetwork.requirePmf = true; NetworkUpdateResult result = verifyUpdateNetworkToWifiConfigManagerWithoutIpChange(pskNetwork); diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java index c1e9b039e..e41bb5901 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigurationTestUtil.java @@ -150,12 +150,12 @@ public class WifiConfigurationTestUtil { if ((security & SECURITY_SAE) != 0) { config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.SAE); - config.requirePMF = true; + config.requirePmf = true; } if ((security & SECURITY_OWE) != 0) { config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.OWE); - config.requirePMF = true; + config.requirePmf = true; } if ((security & SECURITY_EAP) != 0) { @@ -166,7 +166,7 @@ public class WifiConfigurationTestUtil { if ((security & SECURITY_EAP_SUITE_B) != 0) { config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.SUITE_B_192); - config.requirePMF = true; + config.requirePmf = true; } if ((security & SECURITY_WAPI_PSK) != 0) { @@ -311,7 +311,7 @@ public class WifiConfigurationTestUtil { // SAE password uses the same member. configuration.preSharedKey = TEST_PSK; - configuration.requirePMF = true; + configuration.requirePmf = true; return configuration; } @@ -375,7 +375,7 @@ public class WifiConfigurationTestUtil { generateWifiConfig(TEST_NETWORK_ID, TEST_UID, createNewSSID(), true, true, null, null, SECURITY_EAP_SUITE_B); - configuration.requirePMF = true; + configuration.requirePmf = true; configuration.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS); configuration.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.NONE); return configuration; @@ -581,7 +581,7 @@ public class WifiConfigurationTestUtil { assertEquals(expected.wepKeys, actual.wepKeys); assertEquals(expected.wepTxKeyIndex, actual.wepTxKeyIndex); assertEquals(expected.hiddenSSID, actual.hiddenSSID); - assertEquals(expected.requirePMF, actual.requirePMF); + assertEquals(expected.requirePmf, actual.requirePmf); assertEquals(expected.allowedKeyManagement, actual.allowedKeyManagement); assertEquals(expected.allowedProtocols, actual.allowedProtocols); assertEquals(expected.allowedAuthAlgorithms, actual.allowedAuthAlgorithms); @@ -693,7 +693,7 @@ public class WifiConfigurationTestUtil { assertEquals(expected.wepKeys, actual.wepKeys); assertEquals(expected.wepTxKeyIndex, actual.wepTxKeyIndex); assertEquals(expected.hiddenSSID, actual.hiddenSSID); - assertEquals(expected.requirePMF, actual.requirePMF); + assertEquals(expected.requirePmf, actual.requirePmf); assertEquals(expected.allowedKeyManagement, actual.allowedKeyManagement); assertEquals(expected.allowedProtocols, actual.allowedProtocols); assertEquals(expected.allowedAuthAlgorithms, actual.allowedAuthAlgorithms); diff --git a/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java b/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java index 702dc1745..61b79fc83 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiConfigurationUtilTest.java @@ -532,7 +532,7 @@ public class WifiConfigurationUtilTest extends WifiBaseTest { WifiConfiguration config = WifiConfigurationTestUtil.createSaeNetwork(); assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD)); - config.requirePMF = false; + config.requirePmf = false; assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD)); } @@ -545,7 +545,7 @@ public class WifiConfigurationUtilTest extends WifiBaseTest { WifiConfiguration config = WifiConfigurationTestUtil.createOweNetwork(); assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD)); - config.requirePMF = false; + config.requirePmf = false; assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD)); } @@ -558,7 +558,7 @@ public class WifiConfigurationUtilTest extends WifiBaseTest { WifiConfiguration config = WifiConfigurationTestUtil.createEapSuiteBNetwork(); assertTrue(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD)); - config.requirePMF = false; + config.requirePmf = false; assertFalse(WifiConfigurationUtil.validate(config, WifiConfigurationUtil.VALIDATE_FOR_ADD)); } diff --git a/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java b/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java index 7ba2fe444..6bbb4e945 100644 --- a/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/util/XmlUtilTest.java @@ -225,7 +225,7 @@ public class XmlUtilTest extends WifiBaseTest { configuration.linkedConfigurations = new HashMap<>(); configuration.linkedConfigurations.put(TEST_DUMMY_CONFIG_KEY, Integer.valueOf(1)); configuration.defaultGwMacAddress = TEST_STATIC_IP_GATEWAY_ADDRESS; - configuration.requirePMF = true; + configuration.requirePmf = true; configuration.validatedInternetAccess = true; configuration.noInternetAccessExpected = true; configuration.meteredHint = true; |