Fix WPA3 Suite-B parameters in WifiConfiguration#setSecurityParams

Add missing key management setup of IEEE8021X and WPA_EAP in
WifiConfiguration#setSecurityParams.

Bug: 151087842
Test: atest WifiConfigurationTest
Change-Id: I3569853f229eb5d463a190c7cca6e4b6d7573bfe
This commit is contained in:
Hai Shalom
2020-03-09 12:07:22 -07:00
parent 61278391c5
commit 37e10fd161
2 changed files with 4 additions and 0 deletions

View File

@@ -503,6 +503,8 @@ public class WifiConfiguration implements Parcelable {
break;
case SECURITY_TYPE_EAP_SUITE_B:
allowedProtocols.set(WifiConfiguration.Protocol.RSN);
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.IEEE8021X);
allowedKeyManagement.set(WifiConfiguration.KeyMgmt.SUITE_B_192);
allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.GCMP_256);
allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GCMP_256);

View File

@@ -456,6 +456,8 @@ public class WifiConfigurationTest {
config.setSecurityParams(SECURITY_TYPE_EAP_SUITE_B);
assertTrue(config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.SUITE_B_192));
assertTrue(config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.WPA_EAP));
assertTrue(config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.IEEE8021X));
assertTrue(config.allowedPairwiseCiphers.get(WifiConfiguration.PairwiseCipher.GCMP_256));
assertTrue(config.allowedGroupCiphers.get(WifiConfiguration.GroupCipher.GCMP_256));
assertTrue(config.allowedGroupManagementCiphers