/frameworks/opt/net/wifi/service/java/com/android/server/wifi/ |
D | WifiApConfigStore.java | 292 config.preSharedKey = in.readUTF(); in loadApConfiguration() 324 out.writeUTF(config.preSharedKey); in writeApConfiguration() 345 config.preSharedKey = randomUUID.substring(0, 8) + randomUUID.substring(9, 13); in getDefaultApConfiguration() 369 config.preSharedKey = randomUUID.substring(0, 8) + randomUUID.substring(9, 13); in generateLocalOnlyHotspotConfig() 403 private static boolean validateApConfigPreSharedKey(String preSharedKey) { in validateApConfigPreSharedKey() argument 404 if (preSharedKey.length() < PSK_MIN_LEN || preSharedKey.length() > PSK_MAX_LEN) { in validateApConfigPreSharedKey() 411 preSharedKey.getBytes(StandardCharsets.UTF_8); in validateApConfigPreSharedKey() 442 String preSharedKey = apConfig.preSharedKey; in validateApWifiConfiguration() local 443 boolean hasPreSharedKey = !TextUtils.isEmpty(preSharedKey); in validateApWifiConfiguration() 466 if (!validateApConfigPreSharedKey(preSharedKey)) { in validateApWifiConfiguration()
|
D | DppManager.java | 210 password = selectedNetwork.preSharedKey; in startDppAsConfiguratorInitiator() 213 if (selectedNetwork.preSharedKey.matches(String.format("[0-9A-Fa-f]{%d}", 64))) { in startDppAsConfiguratorInitiator() 215 psk = selectedNetwork.preSharedKey; in startDppAsConfiguratorInitiator() 218 password = selectedNetwork.preSharedKey; in startDppAsConfiguratorInitiator() 270 passwordEncoded = encodeStringToHex(selectedNetwork.preSharedKey); in startDppAsConfiguratorInitiator()
|
D | WifiConfigurationUtil.java | 421 if (!Objects.equals(existingConfig.preSharedKey, newConfig.preSharedKey)) { in hasCredentialChanged() 707 && !validatePassword(config.preSharedKey, isAdd, false)) { in validate() 721 if (!validatePassword(config.preSharedKey, isAdd, true)) { in validate() 859 && !validatePassword(config.preSharedKey, true, false)) { in validateNetworkSpecifier() 873 if (!validatePassword(config.preSharedKey, true, true)) { in validateNetworkSpecifier()
|
D | WifiConfigManager.java | 565 if (!TextUtils.isEmpty(configuration.preSharedKey)) { in maskPasswordsInWifiConfiguration() 566 configuration.preSharedKey = PASSWORD_MASK; in maskPasswordsInWifiConfiguration() 941 if (externalConfig.preSharedKey != null in mergeWithInternalWifiConfiguration() 942 && !externalConfig.preSharedKey.equals(PASSWORD_MASK)) { in mergeWithInternalWifiConfiguration() 943 internalConfig.preSharedKey = externalConfig.preSharedKey; in mergeWithInternalWifiConfiguration() 2374 if (!TextUtils.equals(network1.preSharedKey, network2.preSharedKey)) { in shouldNetworksBeLinked()
|
D | HostapdHal.java | 344 nwParams.pskPassphrase = (config.preSharedKey != null) ? config.preSharedKey : ""; in addAccessPoint()
|
D | SupplicantStaNetworkHal.java | 210 config.preSharedKey = null; in loadWifiConfiguration() 212 config.preSharedKey = NativeUtil.addEnclosingQuotes(mPskPassphrase); in loadWifiConfiguration() 214 config.preSharedKey = NativeUtil.hexStringFromByteArray(mPsk); in loadWifiConfiguration() 289 if (config.preSharedKey != null) { in saveWifiConfiguration() 290 if (config.preSharedKey.startsWith("\"")) { in saveWifiConfiguration() 294 NativeUtil.removeEnclosingQuotes(config.preSharedKey))) { in saveWifiConfiguration() 300 NativeUtil.removeEnclosingQuotes(config.preSharedKey))) { in saveWifiConfiguration() 309 if (!setPsk(NativeUtil.hexStringToByteArray(config.preSharedKey))) { in saveWifiConfiguration()
|
D | WifiBackupDataV1Parser.java | 307 configuration.preSharedKey = (String) value; in parseWifiConfigurationFromXmlInternal()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | WifiApConfigStoreTest.java | 157 String ssid, String preSharedKey, int keyManagement, int band, int channel, in setupApConfig() argument 161 config.preSharedKey = preSharedKey; in setupApConfig() 178 assertEquals(config1.preSharedKey, config2.preSharedKey); in verifyApConfig() 642 config.preSharedKey = TEST_DEFAULT_HOTSPOT_PSK; in testOpenNetworkConfigInValidateApWifiConfigurationCheck() 646 config.preSharedKey = null; in testOpenNetworkConfigInValidateApWifiConfigurationCheck() 648 config.preSharedKey = ""; in testOpenNetworkConfigInValidateApWifiConfigurationCheck() 664 config.preSharedKey = null; in testWpa2PskNetworkConfigInValidateApWifiConfigurationCheck() 666 config.preSharedKey = ""; in testWpa2PskNetworkConfigInValidateApWifiConfigurationCheck() 670 config.preSharedKey = in testWpa2PskNetworkConfigInValidateApWifiConfigurationCheck() 675 config.preSharedKey = in testWpa2PskNetworkConfigInValidateApWifiConfigurationCheck() [all …]
|
D | WifiConfigurationUtilTest.java | 243 config.preSharedKey = "abcd123455151234556788990034556667332345667322344556676743233445"; in testValidatePositiveCases_Hex() 256 config.preSharedKey = WifiConfigurationUtil.PASSWORD_MASK; in testValidatePositiveCases_MaskedPskString() 350 config.preSharedKey = "\"abcdffeeretretyetreteteteabe34tetrertertrsraaaaaaaaaaa345eqwrweewq" in testValidateNegativeCases_BadAsciiPskLength() 353 config.preSharedKey = "\"454\""; in testValidateNegativeCases_BadAsciiPskLength() 365 config.preSharedKey = "\"abcdffeeretretyetreteteteabe34tetrertertrsraaaaaaaaaaa345eqwrweewq" in testValidateNegativeCases_BadAsciiSaeLength() 368 config.preSharedKey = "\"\""; in testValidateNegativeCases_BadAsciiSaeLength() 381 config.preSharedKey = "\"abcdfefeeretrety"; in testValidateNegativeCases_MalformedAsciiPskString() 394 config.preSharedKey = "\"abcdfefeeretrety"; in testValidateNegativeCases_MalformedAsciiSaeString() 406 config.preSharedKey = "abcd123456788990013453445345465465476546"; in testValidateNegativeCases_BadHexPskLength() 408 config.preSharedKey = ""; in testValidateNegativeCases_BadHexPskLength() [all …]
|
D | DppManagerTest.java | 170 selectedNetwork.preSharedKey = "\"secretPassword\""; in testStartDppAsConfiguratorInitiatorFailAddPeer() 216 selectedNetwork.preSharedKey = "\"secretPassword\""; in testStartDppAsConfiguratorInitiatorFailStart() 260 selectedNetwork.preSharedKey = TEST_PASSWORD; in testStartDppAsConfiguratorInitiatorStartCorrectlyWpa2Psk() 285 selectedNetwork.preSharedKey = TEST_PASSWORD; in testStartDppAsConfiguratorInitiatorStartCorrectlyWpa3Sae() 369 selectedNetwork.preSharedKey = TEST_PASSWORD; in testStartDppAsConfiguratorInitiatorStartCorrectlyAndRejectConcurrentRequest() 421 selectedNetwork.preSharedKey = TEST_PASSWORD; in testStartDppAsConfiguratorInitiatorStartOnSuccessCallback() 483 selectedNetwork.preSharedKey = TEST_PASSWORD; in testStartDppAsEnrolleeInitiatorStartCorrectlyOnSuccessCallback() 514 selectedNetwork.preSharedKey = TEST_PASSWORD; in testStartDppAsConfiguratorInitiatorStartOnFailureCallback() 725 selectedNetwork.preSharedKey = TEST_PASSWORD; in testOnFailureCallback()
|
D | WifiConfigurationTestUtil.java | 282 configuration.preSharedKey = TEST_PSK; in createSaeNetwork() 291 configuration.preSharedKey = TEST_PSK; in createPskNetwork() 299 configuration.preSharedKey = TEST_PSK; in createPskNetwork() 551 assertEquals(expected.preSharedKey, actual.preSharedKey); in assertCommonConfigurationElementsEqual() 652 assertEquals(expected.preSharedKey, actual.preSharedKey); in assertConfigurationEqualForSupplicant()
|
D | HostapdHalTest.java | 226 configuration.preSharedKey = NETWORK_PSK; in testAddAccessPointSuccess_Psk_Band2G() 293 configuration.preSharedKey = NETWORK_PSK; in testAddAccessPointSuccess_Psk_Band5G_Hidden() 331 configuration.preSharedKey = NETWORK_PSK; in testAddAccessPointSuccess_Psk_Band2G_WithACS() 369 configuration.preSharedKey = NETWORK_PSK; in testAddAccessPointSuccess_Psk_Band2G_WithIeee80211AC() 406 configuration.preSharedKey = NETWORK_PSK; in testAddAccessPointSuccess_Psk_BandAny_WithACS() 444 configuration.preSharedKey = NETWORK_PSK; in testAddAccessPointSuccess_Psk_BandAny_Downgraded_WithoutACS() 510 configuration.preSharedKey = NETWORK_PSK; in testAddAccessPointSuccess_Psk_BandAny_WithACS_AcsChannels()
|
D | WifiConfigManagerTest.java | 1725 assertFalse(pskNetwork.preSharedKey.equals(newPsk)); in testUpdatePreSharedKeyClearsHasEverConnected() 1726 pskNetwork.preSharedKey = newPsk; in testUpdatePreSharedKeyClearsHasEverConnected() 1898 someRandomNetworkWithAllMaskedFields.preSharedKey = WifiConfigurationTestUtil.TEST_PSK; in testUpdateIgnoresMaskedPasswords() 1912 assertEquals(someRandomNetworkWithAllMaskedFields.preSharedKey, in testUpdateIgnoresMaskedPasswords() 1913 retrievedNetworkWithPassword.preSharedKey); in testUpdateIgnoresMaskedPasswords() 1926 assertEquals(someRandomNetworkWithAllMaskedFields.preSharedKey, in testUpdateIgnoresMaskedPasswords() 1927 retrievedNetworkWithPassword.preSharedKey); in testUpdateIgnoresMaskedPasswords() 1992 networkWithPasswords.preSharedKey = WifiConfigurationTestUtil.TEST_PSK; in testGetConfiguredNetworksMasksPasswords() 2006 assertEquals(networkWithPasswords.preSharedKey, retrievedNetworkWithPassword.preSharedKey); in testGetConfiguredNetworksMasksPasswords() 2013 assertEquals(networkWithPasswords.preSharedKey, retrievedNetworkWithPassword.preSharedKey); in testGetConfiguredNetworksMasksPasswords() [all …]
|
D | WifiBackupRestoreTest.java | 918 expectedConfiguration.preSharedKey = WifiConfigurationTestUtil.TEST_PSK; in testSingleNetworkSupplicantBackupRestoreWithUnknownEAPKey() 1066 if (configuration.preSharedKey != null) { in writeConfigurationToWpaSupplicantConf() 1067 out.write(" " + "psk=" + configuration.preSharedKey + "\n"); in writeConfigurationToWpaSupplicantConf()
|
D | WifiNetworkSelectorTestUtil.java | 180 configs[index].preSharedKey = "\"PA55W0RD\""; // needed to validate with PSK in generateWifiConfigurations()
|
D | SupplicantStaNetworkHalTest.java | 188 config.preSharedKey = "945ef00c463c2a7c2496376b13263d1531366b46377179a4b17b393687450779"; in testPskNetworkWifiConfigurationSaveLoad() 205 config.preSharedKey = "\"quoted_psd\""; in testPskNetworkWifiConfigurationSaveRemovesPskQuotes() 208 NativeUtil.removeEnclosingQuotes(config.preSharedKey)); in testPskNetworkWifiConfigurationSaveRemovesPskQuotes()
|
/frameworks/base/wifi/tests/src/android/net/wifi/ |
D | WifiNetworkSpecifierTest.java | 99 wifiNetworkSpecifier.wifiConfiguration.preSharedKey); in testWifiNetworkSpecifierBuilderForWpa2PskNetworkWithBssidPattern() 362 wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY; in testWifiNetworkSpecifierParcel() 394 wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY; in testWifiNetworkSpecifierSatisfiesNullAndAllMatch() 416 wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY; in testWifiNetworkSpecifierSatisfiesSame() 445 wifiConfiguration1.preSharedKey = TEST_PRESHARED_KEY; in testWifiNetworkSpecifierDoesNotSatisfyWhenKeyMgmtDifferent() 476 wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY; in testWifiNetworkSpecifierDoesNotSatisfyWhenSsidDifferent() 505 wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY; in testWifiNetworkSpecifierDoesNotSatisfyWhenBssidDifferent() 533 wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY; in testWifiNetworkSpecifierDoesNotSatisfyWhenPackageNameDifferent()
|
D | WifiNetworkSuggestionTest.java | 85 suggestion.wifiConfiguration.preSharedKey); in testWifiNetworkSuggestionBuilderForWpa2EapNetworkWithPriorityAndReqAppInteraction() 112 suggestion.wifiConfiguration.preSharedKey); in testWifiNetworkSuggestionBuilderForWpa2PskNetworkWithMeteredAndReqUserInteraction() 136 assertNull(suggestion.wifiConfiguration.preSharedKey); in testWifiNetworkSuggestionBuilderForEnhancedOpenNetworkWithBssid() 155 suggestion.wifiConfiguration.preSharedKey); in testWifiNetworkSuggestionBuilderForWpa3PskNetwork() 183 assertNull(suggestion.wifiConfiguration.preSharedKey); in testWifiNetworkSuggestionBuilderForWpa3EapNetwork()
|
D | WifiConfigurationTest.java | 281 config.preSharedKey = "TestPsk"; in testSoftApConfigBackupAndRestore() 290 assertEquals(config.preSharedKey, restoredConfig.preSharedKey); in testSoftApConfigBackupAndRestore() 344 config.preSharedKey = "TestPsk"; in testGetKeyIdForCredentials() 405 config.preSharedKey = "TestPsk"; in testGetKeyIdForCredentialsForSuggestion()
|
D | WifiNetworkAgentSpecifierTest.java | 446 wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY; in createDefaultWifiConfiguration()
|
/frameworks/base/wifi/java/android/net/wifi/ |
D | WifiConfiguration.java | 510 public String preSharedKey; field in WifiConfiguration 1994 if (this.preSharedKey != null) { in toString() 2373 preSharedKey = source.preSharedKey; in WifiConfiguration() 2462 dest.writeString(preSharedKey); in writeToParcel() 2536 config.preSharedKey = in.readString(); 2606 BackupUtils.writeString(out, preSharedKey); in getBytesForBackup() 2629 config.preSharedKey = BackupUtils.readString(in); in getWifiConfigFromBackup()
|
D | WifiNetworkSuggestion.java | 322 configuration.preSharedKey = "\"" + mWpa2PskPassphrase + "\""; in setSecurityParamsInWifiConfiguration() 326 configuration.preSharedKey = "\"" + mWpa3SaePassphrase + "\""; in setSecurityParamsInWifiConfiguration()
|
D | WifiNetworkSpecifier.java | 280 configuration.preSharedKey = "\"" + mWpa2PskPassphrase + "\""; in setSecurityParamsInWifiConfiguration() 284 configuration.preSharedKey = "\"" + mWpa3SaePassphrase + "\""; in setSecurityParamsInWifiConfiguration()
|
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/ |
D | WifiConfigurationHelper.java | 97 config.preSharedKey = password; in createPskConfig() 99 config.preSharedKey = quotedString(password); in createPskConfig()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/ |
D | XmlUtil.java | 392 XmlUtil.writeNextValue(out, XML_TAG_PRE_SHARED_KEY, configuration.preSharedKey); in writeCommonElementsToXml() 542 configuration.preSharedKey = (String) value; in parseFromXml()
|