diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-03-02 18:09:53 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-03-02 18:09:53 +0000 |
commit | 4dc071284f280c1c1d2369c1da75b66f03162379 (patch) | |
tree | b61e2e391bcd0044bc7924fbf585b86a4b508e9a /wifi/tests | |
parent | 574bb77823d80e2c3572ea383b849b899130d447 (diff) | |
parent | 117cacc93f477feb6bbd56651bc6de5aece29ba9 (diff) |
Merge "Fix KeyMgmt.OSEN and Eap.UNAUTH_TLS handling" into rvc-dev
Diffstat (limited to 'wifi/tests')
-rw-r--r-- | wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java b/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java index d8db4ceb6e9c..320c187bbc2d 100644 --- a/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java +++ b/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java @@ -521,4 +521,23 @@ public class WifiEnterpriseConfigTest { // expected exception. } } + + /** Verifies that the EAP inner method is reset when we switch to Unauth-TLS */ + @Test + public void eapPhase2MethodForUnauthTls() { + // Initially select an EAP method that supports an phase2. + mEnterpriseConfig.setEapMethod(Eap.PEAP); + mEnterpriseConfig.setPhase2Method(Phase2.MSCHAPV2); + assertEquals("PEAP", getSupplicantEapMethod()); + assertEquals("\"auth=MSCHAPV2\"", getSupplicantPhase2Method()); + + // Change the EAP method to another type which supports a phase2. + mEnterpriseConfig.setEapMethod(Eap.TTLS); + assertEquals("TTLS", getSupplicantEapMethod()); + assertEquals("\"auth=MSCHAPV2\"", getSupplicantPhase2Method()); + + // Change the EAP method to Unauth-TLS which does not support a phase2. + mEnterpriseConfig.setEapMethod(Eap.UNAUTH_TLS); + assertEquals(null, getSupplicantPhase2Method()); + } } |