Reject SUITE_B_192 network creation for non EAP-TLS

Reject creation of WPA3-Enterprise 192-bit network in Settings app if
the selected EAP method is not EAP-TLS, as mandated by the
specification.

Note that this is just a protection against invalid networks, a UI
change to prevent this in Settings will follow.

Bug: 135127581
Test: atest WifiConfigControllerTest
Test: Create invalid network, verify it is not saved
Change-Id: I2978c2c71a90433778b6187a986e3284e9095d41
This commit is contained in:
Hai Shalom
2019-07-19 10:54:19 -07:00
parent 9a66a51fc4
commit f2b52be493

View File

@@ -678,6 +678,12 @@ public class WifiConfigController implements TextWatcher,
config.enterpriseConfig = new WifiEnterpriseConfig(); config.enterpriseConfig = new WifiEnterpriseConfig();
int eapMethod = mEapMethodSpinner.getSelectedItemPosition(); int eapMethod = mEapMethodSpinner.getSelectedItemPosition();
int phase2Method = mPhase2Spinner.getSelectedItemPosition(); int phase2Method = mPhase2Spinner.getSelectedItemPosition();
if (mAccessPointSecurity == AccessPoint.SECURITY_EAP_SUITE_B) {
if (eapMethod != WIFI_EAP_METHOD_TLS) {
Log.e(TAG, "WPA3-Enterprise 192-bit EAP method must be EAP-TLS");
return null;
}
}
config.enterpriseConfig.setEapMethod(eapMethod); config.enterpriseConfig.setEapMethod(eapMethod);
switch (eapMethod) { switch (eapMethod) {
case Eap.PEAP: case Eap.PEAP: