Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2b52be4 authored by Hai Shalom's avatar Hai Shalom
Browse files

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
parent 9a66a51f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -678,6 +678,12 @@ public class WifiConfigController implements TextWatcher,
                config.enterpriseConfig = new WifiEnterpriseConfig();
                int eapMethod = mEapMethodSpinner.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);
                switch (eapMethod) {
                    case Eap.PEAP: