Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WifiEapTlsCreateDialogFragment's save feature not capable of saving any WiFi Configurations #199

Open
rsmoley opened this issue Feb 9, 2024 · 0 comments

Comments

@rsmoley
Copy link

rsmoley commented Feb 9, 2024

WifiEapTlsCreateDialogFragment allows users to specify SSID, CA credentials, user credentials, user credential passwords, and identity, however it does not explicitly allow for a domain to be suggested. Recent versions of android have been mandating the inclusion of a domain field when configuring a EAP-TLS connection in Settings. As a result, when any EAP-TLS configuration is saved through TestDPC, it fails. On tested devices (including Pixel 5a on Android 14), the following sequential logcat messages were observed:

WifiConfigManager: Enterprise network configuration is missing either a Root CA or a domain name
WifiConfigManager: Failed to add/update network <<SSID>>

It is worth noting that the UI already checks for the Root CA field and does not allow the user to submit unless the CA field is not empty, meaning this is only the result of the domain name.

Testing:
Creating any EAP-TLS configuration through TestDPC should create a saved WiFi profile visible under settings. It does not have to be a working connection, i.e. it can be a made up SSID and CA/user credentials that do not correctly validate on the configured network. Under TestDPC 9.0.4, this saved network never appears and the above WifiConfigManager logs appear in the device logcat.

Solution:
Modifying WifiEapTlsCreateDialogFragment.extractEnterpriseConfig() to include a call to config.setDomainSuffixMatch("example.com") allowed the network to be saved. This is however a hardcoded fix, and might need to be extrapolated into further UI changes

On a similar note, SSIDs must be specified inside of quotes, such as "SSID" rather than just SSID. This does not mimic other Android WiFi UIs, notably the ones through settings, however I'm not sure if this design choice is intentional or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant