From e1562532fe4445cbd78d6eda35df639c41a67d39 Mon Sep 17 00:00:00 2001 From: Hai Shalom Date: Thu, 5 Mar 2020 14:28:35 -0800 Subject: [PATCH] [SAE] Connect to networks with GCMP_256 cipher Allow connections to WPA3-Personal SAE networks that use GCMP_256 cipher, not only CCMP. Bug: 150636703 Test: atest NetworkListStoreDataTest WifiConfigManagerTest WifiConfigurationTest Test: Manually connect to AP configured as [RSN-SAE-GCMP-256] Change-Id: I4e0191cd7561e327d9b281a20d54c447024a2351 --- wifi/java/android/net/wifi/WifiConfiguration.java | 4 ++++ wifi/tests/src/android/net/wifi/WifiConfigurationTest.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java index 5a7bf4b15f1a6..038f2719c2137 100644 --- a/wifi/java/android/net/wifi/WifiConfiguration.java +++ b/wifi/java/android/net/wifi/WifiConfiguration.java @@ -498,7 +498,9 @@ public class WifiConfiguration implements Parcelable { allowedProtocols.set(WifiConfiguration.Protocol.RSN); allowedKeyManagement.set(WifiConfiguration.KeyMgmt.SAE); allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP); + allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.GCMP_256); allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP); + allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GCMP_256); requirePmf = true; break; case SECURITY_TYPE_EAP_SUITE_B: @@ -515,7 +517,9 @@ public class WifiConfiguration implements Parcelable { allowedProtocols.set(WifiConfiguration.Protocol.RSN); allowedKeyManagement.set(WifiConfiguration.KeyMgmt.OWE); allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP); + allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.GCMP_256); allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP); + allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GCMP_256); requirePmf = true; break; case SECURITY_TYPE_WAPI_PSK: diff --git a/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java b/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java index 047a64b257339..d27bbcd07d227 100644 --- a/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java +++ b/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java @@ -423,7 +423,9 @@ public class WifiConfigurationTest { assertTrue(config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.SAE)); assertTrue(config.allowedPairwiseCiphers.get(WifiConfiguration.PairwiseCipher.CCMP)); + assertTrue(config.allowedPairwiseCiphers.get(WifiConfiguration.PairwiseCipher.GCMP_256)); assertTrue(config.allowedGroupCiphers.get(WifiConfiguration.GroupCipher.CCMP)); + assertTrue(config.allowedGroupCiphers.get(WifiConfiguration.GroupCipher.GCMP_256)); assertTrue(config.requirePmf); } @@ -440,7 +442,9 @@ public class WifiConfigurationTest { assertTrue(config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.OWE)); assertTrue(config.allowedPairwiseCiphers.get(WifiConfiguration.PairwiseCipher.CCMP)); + assertTrue(config.allowedPairwiseCiphers.get(WifiConfiguration.PairwiseCipher.GCMP_256)); assertTrue(config.allowedGroupCiphers.get(WifiConfiguration.GroupCipher.CCMP)); + assertTrue(config.allowedGroupCiphers.get(WifiConfiguration.GroupCipher.GCMP_256)); assertTrue(config.requirePmf); }