OSDN Git Service

Properly map EAP-GTC for TTLS
authorPaul Stewart <pstew@google.com>
Sat, 16 Jan 2016 02:56:52 +0000 (18:56 -0800)
committerPaul Stewart <pstew@google.com>
Fri, 19 Feb 2016 15:10:31 +0000 (07:10 -0800)
commit274042519d84ad837f03572865bc096a537c73fb
tree26be3d4c408464285bddcdf30ce842c5f3a3871b
parent0db6066c7b0583610769fb0f9bc80ceafedefb75
Properly map EAP-GTC for TTLS

The "auth=GTC" method was never valid for the TTLS outer
authentication for wpa_supplicant.  Instead, to perform
GTC authentication within TTLS, we should use EAP-GTC.

This CL performs this mapping within WifiEnterpriseConfig.
It accomplishes this by making the EAP Method and Phase 2
Method parameters a part of the internal object state
instead of maintaining this value within the mFields
hashmap.

Further, the problematic "getFields" method is removed
since as this actually provided read/write access to the
entirety of the WifiEnterpriseConfig's internal state.
This was understandably suboptimal.  All callers have
been updated to either use getFieldValue() or to call
a newly added getSupplicantFields() / setSupplicantFields()
methods which make the WifiEnterpriseConfig object a sole
arbiter for the mapping between its internal state and
wpa_supplicant.

In the future it might be good to change this logic to
strip WifiEnterpriseConfig of all of the string hashmap
entirely, leaving WifiEnterpriseConfig as a "struct"
and move supplicant mappings to WifiConfigStore.

Bug:26400915
Change-Id: I866e2f77ad53d9a51c5f61acb9adef522661f721
Test:runtest frameworks-wifi # New unit test in the same topic
Test:cts-tradefed run cts -d --class android.net.wifi.cts.WifiEnterpriseConfigTest
wifi/java/android/net/wifi/WifiEnterpriseConfig.java