diff options
-rw-r--r-- | service/java/com/android/server/wifi/hotspot2/PasspointProvider.java | 1 | ||||
-rw-r--r-- | tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProviderTest.java | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/hotspot2/PasspointProvider.java b/service/java/com/android/server/wifi/hotspot2/PasspointProvider.java index 1f3b9bbd8..df4303c29 100644 --- a/service/java/com/android/server/wifi/hotspot2/PasspointProvider.java +++ b/service/java/com/android/server/wifi/hotspot2/PasspointProvider.java @@ -280,6 +280,7 @@ public class PasspointProvider { WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig(); enterpriseConfig.setRealm(mConfig.getCredential().getRealm()); + enterpriseConfig.setDomainSuffixMatch(mConfig.getHomeSp().getFqdn()); if (mConfig.getCredential().getUserCredential() != null) { buildEnterpriseConfigForUserCredential(enterpriseConfig, mConfig.getCredential().getUserCredential()); diff --git a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProviderTest.java b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProviderTest.java index 7551bc049..afa04b549 100644 --- a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProviderTest.java +++ b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointProviderTest.java @@ -650,6 +650,7 @@ public class PasspointProviderTest { assertTrue(wifiConfig.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.WPA_EAP)); assertTrue(wifiConfig.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.IEEE8021X)); assertEquals(realm, wifiEnterpriseConfig.getRealm()); + assertEquals(fqdn, wifiEnterpriseConfig.getDomainSuffixMatch()); assertEquals("anonymous@" + realm, wifiEnterpriseConfig.getAnonymousIdentity()); assertEquals(WifiEnterpriseConfig.Eap.TTLS, wifiEnterpriseConfig.getEapMethod()); assertEquals(WifiEnterpriseConfig.Phase2.MSCHAPV2, wifiEnterpriseConfig.getPhase2Method()); @@ -711,6 +712,7 @@ public class PasspointProviderTest { assertTrue(wifiConfig.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.WPA_EAP)); assertTrue(wifiConfig.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.IEEE8021X)); assertEquals(realm, wifiEnterpriseConfig.getRealm()); + assertEquals(fqdn, wifiEnterpriseConfig.getDomainSuffixMatch()); assertEquals("anonymous@" + realm, wifiEnterpriseConfig.getAnonymousIdentity()); assertEquals(WifiEnterpriseConfig.Eap.TLS, wifiEnterpriseConfig.getEapMethod()); assertEquals(CLIENT_CERTIFICATE_ALIAS, wifiEnterpriseConfig.getClientCertificateAlias()); @@ -759,6 +761,7 @@ public class PasspointProviderTest { assertTrue(wifiConfig.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.WPA_EAP)); assertTrue(wifiConfig.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.IEEE8021X)); assertEquals(realm, wifiEnterpriseConfig.getRealm()); + assertEquals(fqdn, wifiEnterpriseConfig.getDomainSuffixMatch()); assertEquals(WifiEnterpriseConfig.Eap.SIM, wifiEnterpriseConfig.getEapMethod()); assertEquals(imsi, wifiEnterpriseConfig.getPlmn()); } |