diff options
author | Sunil Ravi <sunilravi@google.com> | 2020-07-27 12:21:54 -0700 |
---|---|---|
committer | Sunil Ravi <sunilravi@google.com> | 2020-08-04 17:04:51 +0000 |
commit | 6c33a7523e332766e47537cd2333c2fab234b44c (patch) | |
tree | c5c0a054d6c8c7e01c786df676848bf6ebad3f51 | |
parent | b64129c61416da5a3817d328a7adb166485254ea (diff) |
Mark FILS akm as EAP in scan result capabilities.
WiFi picker tag the security type of a network based on the
ScanResult capabilities string . Capabilty string for
Fast initial link setup (FILS) key management doesn't have
string "EAP" because of which wifi picker doesn't recognize the
FILS only network as secured AP.
Fix is to rename current key management string FILS-SHA256 and
to FILS-SHA384 to EAP-FILS-SHA256 and EAP-FILS-SHA384 so that
wifi picker will recognize security type as EAP.
Bug: 160760306
Bug: 161241874
Test: com.android.server.wifi
Test: Manually connect to a network which advertise only FILS AKM
Change-Id: Icaab4663169077a7070dcb9491cdf533f60f5209
Merged-In: Icaab4663169077a7070dcb9491cdf533f60f5209
(cherry picked from commit 3b56976d91ab1b3be65790716cc19b271b64b3e4)
5 files changed, 18 insertions, 18 deletions
diff --git a/service/java/com/android/server/wifi/util/InformationElementUtil.java b/service/java/com/android/server/wifi/util/InformationElementUtil.java index 60d074e00..a94c15f8b 100644 --- a/service/java/com/android/server/wifi/util/InformationElementUtil.java +++ b/service/java/com/android/server/wifi/util/InformationElementUtil.java @@ -918,8 +918,8 @@ public class InformationElementUtil { private static final int RSN_AKM_OWE = 0x12ac0f00; private static final int RSN_AKM_EAP_SUITE_B_192 = 0x0cac0f00; private static final int RSN_OSEN = 0x019a6f50; - private static final int RSN_AKM_FILS_SHA256 = 0x0eac0f00; - private static final int RSN_AKM_FILS_SHA384 = 0x0fac0f00; + private static final int RSN_AKM_EAP_FILS_SHA256 = 0x0eac0f00; + private static final int RSN_AKM_EAP_FILS_SHA384 = 0x0fac0f00; private static final int WPA_CIPHER_NONE = 0x00f25000; private static final int WPA_CIPHER_TKIP = 0x02f25000; @@ -1022,10 +1022,10 @@ public class InformationElementUtil { case RSN_OSEN: rsnKeyManagement.add(ScanResult.KEY_MGMT_OSEN); break; - case RSN_AKM_FILS_SHA256: + case RSN_AKM_EAP_FILS_SHA256: rsnKeyManagement.add(ScanResult.KEY_MGMT_FILS_SHA256); break; - case RSN_AKM_FILS_SHA384: + case RSN_AKM_EAP_FILS_SHA384: rsnKeyManagement.add(ScanResult.KEY_MGMT_FILS_SHA384); break; default: @@ -1307,9 +1307,9 @@ public class InformationElementUtil { case ScanResult.KEY_MGMT_WAPI_CERT: return "WAPI-CERT"; case ScanResult.KEY_MGMT_FILS_SHA256: - return "FILS-SHA256"; + return "EAP-FILS-SHA256"; case ScanResult.KEY_MGMT_FILS_SHA384: - return "FILS-SHA384"; + return "EAP-FILS-SHA384"; default: return "?"; } diff --git a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java index 3048ef3d5..d23925424 100644 --- a/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java +++ b/tests/wifitests/src/com/android/server/wifi/ClientModeImplTest.java @@ -4807,8 +4807,8 @@ public class ClientModeImplTest extends WifiBaseTest { * */ private void setupFilsEnabledApInScanResult() { - String caps = "[WPA2-EAP+EAP-SHA256+FILS-SHA256-CCMP]" - + "[RSN-EAP+EAP-SHA256+FILS-SHA256-CCMP][ESS]"; + String caps = "[WPA2-EAP+EAP-SHA256+EAP-FILS-SHA256-CCMP]" + + "[RSN-EAP+EAP-SHA256+EAP-FILS-SHA256-CCMP][ESS]"; ScanResult scanResult = new ScanResult(WifiSsid.createFromAsciiEncoded(sFilsSsid), sFilsSsid, sBSSID, 1245, 0, caps, -78, 2412, 1025, 22, 33, 20, 0, 0, true); ScanResult.InformationElement ie = createIE(ScanResult.InformationElement.EID_SSID, diff --git a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java index 4e895e488..37479723d 100644 --- a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java +++ b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java @@ -586,9 +586,9 @@ public class WifiMetricsTest extends WifiBaseTest { mockScanDetails.add(buildMockScanDetail(false, null, "[WAPI-WAPI-CERT-SMS4-SMS4]", 0)); // Number of scans of R2 networks must be equal to NUM_HOTSPOT2_R2_NETWORK_SCAN_RESULTS mockScanDetails.add(buildMockScanDetail(false, NetworkDetail.HSRelease.R2, - "[WPA-EAP-CCMP+FILS-SHA256-CCMP]", FEATURE_MBO | FEATURE_OCE)); + "[WPA-EAP-CCMP+EAP-FILS-SHA256-CCMP]", FEATURE_MBO | FEATURE_OCE)); mockScanDetails.add(buildMockScanDetail(false, NetworkDetail.HSRelease.R2, - "[WPA2-EAP+FT/EAP-CCMP+FILS-SHA256-CCMP]", 0)); + "[WPA2-EAP+FT/EAP-CCMP+EAP-FILS-SHA256-CCMP]", 0)); // Number of scans of R1 networks must be equal to NUM_HOTSPOT2_R1_NETWORK_SCAN_RESULTS mockScanDetails.add(buildMockScanDetail(false, NetworkDetail.HSRelease.R1, "[WPA-EAP-CCMP]", 0)); diff --git a/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java b/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java index 77c99a9d1..a0d1da854 100644 --- a/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java @@ -663,8 +663,8 @@ public class InformationElementUtilTest extends WifiBaseTest { capabilities.from(ies, beaconCap, true); String result = capabilities.generateCapabilitiesString(); - assertEquals("[WPA2-EAP+EAP-SHA256+FILS-SHA256-CCMP][RSN-EAP+EAP-SHA256+FILS-SHA256-CCMP]", - result); + assertEquals("[WPA2-EAP+EAP-SHA256+EAP-FILS-SHA256-CCMP]" + + "[RSN-EAP+EAP-SHA256+EAP-FILS-SHA256-CCMP]", result); } /** @@ -704,8 +704,8 @@ public class InformationElementUtilTest extends WifiBaseTest { capabilities.from(ies, beaconCap, true); String result = capabilities.generateCapabilitiesString(); - assertEquals("[WPA2-EAP+EAP-SHA256+FILS-SHA384-CCMP][RSN-EAP+EAP-SHA256+FILS-SHA384-CCMP]", - result); + assertEquals("[WPA2-EAP+EAP-SHA256+EAP-FILS-SHA384-CCMP]" + + "[RSN-EAP+EAP-SHA256+EAP-FILS-SHA384-CCMP]", result); } /** diff --git a/tests/wifitests/src/com/android/server/wifi/util/ScanResultUtilTest.java b/tests/wifitests/src/com/android/server/wifi/util/ScanResultUtilTest.java index e58d083c4..00e3a0bd2 100644 --- a/tests/wifitests/src/com/android/server/wifi/util/ScanResultUtilTest.java +++ b/tests/wifitests/src/com/android/server/wifi/util/ScanResultUtilTest.java @@ -211,8 +211,8 @@ public class ScanResultUtilTest extends WifiBaseTest { @Test public void testFilsSha256AkmSupportedNetwork() { final String ssid = "FILS-AP"; - String caps = "[WPA2-EAP+EAP-SHA256+FILS-SHA256-CCMP]" - + "[RSN-EAP+EAP-SHA256+FILS-SHA256-CCMP][ESS]"; + String caps = "[WPA2-EAP+EAP-SHA256+EAP-FILS-SHA256-CCMP]" + + "[RSN-EAP+EAP-SHA256+EAP-FILS-SHA256-CCMP][ESS]"; ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid, "ab:cd:01:ef:45:89", 1245, 0, caps, -78, 2450, 1025, 22, 33, 20, 0, @@ -231,8 +231,8 @@ public class ScanResultUtilTest extends WifiBaseTest { @Test public void testFilsSha384AkmSupportedNetwork() { final String ssid = "FILS-AP"; - String caps = "[WPA2-EAP+EAP-SHA384+FILS-SHA384-CCMP]" - + "[RSN-EAP+EAP-SHA384+FILS-SHA384-CCMP][ESS]"; + String caps = "[WPA2-EAP+EAP-SHA384+EAP-FILS-SHA384-CCMP]" + + "[RSN-EAP+EAP-SHA384+EAP-FILS-SHA384-CCMP][ESS]"; ScanResult input = new ScanResult(WifiSsid.createFromAsciiEncoded(ssid), ssid, "ab:cd:01:ef:45:89", 1245, 0, caps, -78, 2450, 1025, 22, 33, 20, 0, |