diff options
author | Hai Shalom <haishalom@google.com> | 2019-04-03 13:32:10 -0700 |
---|---|---|
committer | Hai Shalom <haishalom@google.com> | 2019-04-04 16:53:12 +0000 |
commit | 98009f848a0bb1e5fd6a94fda98e03d4f4bcea1c (patch) | |
tree | bd406e57697a480b8f24603d2033ef033b38ae44 | |
parent | 603ee77817bd1c916a79896124482f716b7188e3 (diff) | |
download | sl4a-98009f848a0bb1e5fd6a94fda98e03d4f4bcea1c.tar.gz |
[sl4a] Add support for SAE, OWE and SUITE_B_192 networks
Add support for SAE, OWE and SUITE_B_192 networks.
Bug: 129879833
Test: TBD
Change-Id: Ibfc08dac31e1705bc9241385255049df83a77b9a
-rwxr-xr-x | Common/src/com/googlecode/android_scripting/facade/wifi/WifiManagerFacade.java | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Common/src/com/googlecode/android_scripting/facade/wifi/WifiManagerFacade.java b/Common/src/com/googlecode/android_scripting/facade/wifi/WifiManagerFacade.java index 3764418b..bfe176df 100755 --- a/Common/src/com/googlecode/android_scripting/facade/wifi/WifiManagerFacade.java +++ b/Common/src/com/googlecode/android_scripting/facade/wifi/WifiManagerFacade.java @@ -472,6 +472,7 @@ public class WifiManagerFacade extends RpcReceiver { if (j.has("security")) { if (TextUtils.equals(j.getString("security"), "SAE")) { config.allowedKeyManagement.set(KeyMgmt.SAE); + config.requirePMF = true; } else { config.allowedKeyManagement.set(KeyMgmt.WPA_PSK); } @@ -483,7 +484,16 @@ public class WifiManagerFacade extends RpcReceiver { config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK); config.preSharedKey = j.getString("preSharedKey"); } else { - config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE); + if (j.has("security")) { + if (TextUtils.equals(j.getString("security"), "OWE")) { + config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.OWE); + config.requirePMF = true; + } else { + config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE); + } + } else { + config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE); + } } if (j.has("BSSID")) { config.BSSID = j.getString("BSSID"); @@ -585,6 +595,14 @@ public class WifiManagerFacade extends RpcReceiver { WifiConfiguration config = new WifiConfiguration(); config.allowedKeyManagement.set(KeyMgmt.WPA_EAP); config.allowedKeyManagement.set(KeyMgmt.IEEE8021X); + + if (j.has("security")) { + if (TextUtils.equals(j.getString("security"), "SUITE_B_192")) { + config.allowedKeyManagement.set(KeyMgmt.SUITE_B_192); + config.requirePMF = true; + } + } + if (j.has("SSID")) { config.SSID = "\"" + j.getString("SSID") + "\""; } else if (j.has("ssid")) { |