diff options
author | Hai Shalom <haishalom@google.com> | 2019-05-09 16:37:00 -0700 |
---|---|---|
committer | Hai Shalom <haishalom@google.com> | 2019-05-10 15:37:58 +0000 |
commit | 23c52a980ba8f7b31a1d140f58baee70dc0f2afd (patch) | |
tree | 7e9b91d002e4de9c182f0abec3e275601f8a035e /service | |
parent | 60aa18213ca04fa8a08786a0fe9cb4951d7b4486 (diff) |
[InformationElementUtil] Add FT/SAE AKM
Add FT/SAE AKM to InformationElementUtil class and parse it correctly so
that the phone would be able to associate with APs advertising it.
Added additional unit tests that were missing.
Bug: 132378498
Test: atest InformationElementUtilTest
Change-Id: I05d37357b02c21c0a96919b6e7f07761a3e80cee
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/util/InformationElementUtil.java | 42 |
1 files changed, 24 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 26ede7047..f75d57eff 100644 --- a/service/java/com/android/server/wifi/util/InformationElementUtil.java +++ b/service/java/com/android/server/wifi/util/InformationElementUtil.java @@ -406,15 +406,16 @@ public class InformationElementUtil { private static final int WPA_AKM_EAP = 0x01f25000; private static final int WPA_AKM_PSK = 0x02f25000; - private static final int WPA2_AKM_EAP = 0x01ac0f00; - private static final int WPA2_AKM_PSK = 0x02ac0f00; - private static final int WPA2_AKM_FT_EAP = 0x03ac0f00; - private static final int WPA2_AKM_FT_PSK = 0x04ac0f00; - private static final int WPA2_AKM_EAP_SHA256 = 0x05ac0f00; - private static final int WPA2_AKM_PSK_SHA256 = 0x06ac0f00; - private static final int WPA2_AKM_SAE = 0x08ac0f00; - private static final int WPA2_AKM_OWE = 0x12ac0f00; - private static final int WPA2_AKM_EAP_SUITE_B_192 = 0x0cac0f00; + private static final int RSN_AKM_EAP = 0x01ac0f00; + private static final int RSN_AKM_PSK = 0x02ac0f00; + private static final int RSN_AKM_FT_EAP = 0x03ac0f00; + private static final int RSN_AKM_FT_PSK = 0x04ac0f00; + private static final int RSN_AKM_EAP_SHA256 = 0x05ac0f00; + private static final int RSN_AKM_PSK_SHA256 = 0x06ac0f00; + private static final int RSN_AKM_SAE = 0x08ac0f00; + private static final int RSN_AKM_FT_SAE = 0x09ac0f00; + private static final int RSN_AKM_OWE = 0x12ac0f00; + private static final int RSN_AKM_EAP_SUITE_B_192 = 0x0cac0f00; private static final int WPA_CIPHER_NONE = 0x00f25000; private static final int WPA_CIPHER_TKIP = 0x02f25000; @@ -483,31 +484,34 @@ public class InformationElementUtil { for (int i = 0; i < akmCount; i++) { int akm = buf.getInt(); switch (akm) { - case WPA2_AKM_EAP: + case RSN_AKM_EAP: rsnKeyManagement.add(ScanResult.KEY_MGMT_EAP); break; - case WPA2_AKM_PSK: + case RSN_AKM_PSK: rsnKeyManagement.add(ScanResult.KEY_MGMT_PSK); break; - case WPA2_AKM_FT_EAP: + case RSN_AKM_FT_EAP: rsnKeyManagement.add(ScanResult.KEY_MGMT_FT_EAP); break; - case WPA2_AKM_FT_PSK: + case RSN_AKM_FT_PSK: rsnKeyManagement.add(ScanResult.KEY_MGMT_FT_PSK); break; - case WPA2_AKM_EAP_SHA256: + case RSN_AKM_EAP_SHA256: rsnKeyManagement.add(ScanResult.KEY_MGMT_EAP_SHA256); break; - case WPA2_AKM_PSK_SHA256: + case RSN_AKM_PSK_SHA256: rsnKeyManagement.add(ScanResult.KEY_MGMT_PSK_SHA256); break; - case WPA2_AKM_SAE: + case RSN_AKM_SAE: rsnKeyManagement.add(ScanResult.KEY_MGMT_SAE); break; - case WPA2_AKM_OWE: + case RSN_AKM_FT_SAE: + rsnKeyManagement.add(ScanResult.KEY_MGMT_FT_SAE); + break; + case RSN_AKM_OWE: rsnKeyManagement.add(ScanResult.KEY_MGMT_OWE); break; - case WPA2_AKM_EAP_SUITE_B_192: + case RSN_AKM_EAP_SUITE_B_192: rsnKeyManagement.add(ScanResult.KEY_MGMT_EAP_SUITE_B_192); break; default: @@ -756,6 +760,8 @@ public class InformationElementUtil { return "OWE"; case ScanResult.KEY_MGMT_SAE: return "SAE"; + case ScanResult.KEY_MGMT_FT_SAE: + return "FT/SAE"; case ScanResult.KEY_MGMT_EAP_SUITE_B_192: return "EAP_SUITE_B_192"; default: |