/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 | 313 if (!Objects.equals(existingConfig.preSharedKey, newConfig.preSharedKey)) { in hasCredentialChanged() 599 && !validatePassword(config.preSharedKey, isAdd, false)) { in validate() 615 if (!validatePassword(config.preSharedKey, isAdd, true)) { in validate() 754 && !validatePassword(config.preSharedKey, true, false)) { in validateNetworkSpecifier() 768 if (!validatePassword(config.preSharedKey, true, true)) { in validateNetworkSpecifier()
|
D | WifiConfigManager.java | 582 if (!TextUtils.isEmpty(configuration.preSharedKey)) { in maskPasswordsInWifiConfiguration() 583 configuration.preSharedKey = PASSWORD_MASK; in maskPasswordsInWifiConfiguration() 961 if (externalConfig.preSharedKey != null in mergeWithInternalWifiConfiguration() 962 && !externalConfig.preSharedKey.equals(PASSWORD_MASK)) { in mergeWithInternalWifiConfiguration() 963 internalConfig.preSharedKey = externalConfig.preSharedKey; in mergeWithInternalWifiConfiguration() 2413 if (!TextUtils.equals(network1.preSharedKey, network2.preSharedKey)) { in shouldNetworksBeLinked()
|
D | HostapdHal.java | 376 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 | 308 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 | 238 config.preSharedKey = "abcd123455151234556788990034556667332345667322344556676743233445"; in testValidatePositiveCases_Hex() 251 config.preSharedKey = WifiConfigurationUtil.PASSWORD_MASK; in testValidatePositiveCases_MaskedPskString() 345 config.preSharedKey = "\"abcdffeeretretyetreteteteabe34tetrertertrsraaaaaaaaaaa345eqwrweewq" in testValidateNegativeCases_BadAsciiPskLength() 348 config.preSharedKey = "\"454\""; in testValidateNegativeCases_BadAsciiPskLength() 360 config.preSharedKey = "\"abcdffeeretretyetreteteteabe34tetrertertrsraaaaaaaaaaa345eqwrweewq" in testValidateNegativeCases_BadAsciiSaeLength() 363 config.preSharedKey = "\"\""; in testValidateNegativeCases_BadAsciiSaeLength() 376 config.preSharedKey = "\"abcdfefeeretrety"; in testValidateNegativeCases_MalformedAsciiPskString() 389 config.preSharedKey = "\"abcdfefeeretrety"; in testValidateNegativeCases_MalformedAsciiSaeString() 401 config.preSharedKey = "abcd123456788990013453445345465465476546"; in testValidateNegativeCases_BadHexPskLength() 403 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 | 283 configuration.preSharedKey = TEST_PSK; in createSaeNetwork() 292 configuration.preSharedKey = TEST_PSK; in createPskNetwork() 300 configuration.preSharedKey = TEST_PSK; in createPskNetwork() 552 assertEquals(expected.preSharedKey, actual.preSharedKey); in assertCommonConfigurationElementsEqual() 653 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 | 1740 assertFalse(pskNetwork.preSharedKey.equals(newPsk)); in testUpdatePreSharedKeyClearsHasEverConnected() 1741 pskNetwork.preSharedKey = newPsk; in testUpdatePreSharedKeyClearsHasEverConnected() 1913 someRandomNetworkWithAllMaskedFields.preSharedKey = WifiConfigurationTestUtil.TEST_PSK; in testUpdateIgnoresMaskedPasswords() 1927 assertEquals(someRandomNetworkWithAllMaskedFields.preSharedKey, in testUpdateIgnoresMaskedPasswords() 1928 retrievedNetworkWithPassword.preSharedKey); in testUpdateIgnoresMaskedPasswords() 1941 assertEquals(someRandomNetworkWithAllMaskedFields.preSharedKey, in testUpdateIgnoresMaskedPasswords() 1942 retrievedNetworkWithPassword.preSharedKey); in testUpdateIgnoresMaskedPasswords() 2045 networkWithPasswords.preSharedKey = WifiConfigurationTestUtil.TEST_PSK; in testGetConfiguredNetworksMasksPasswords() 2059 assertEquals(networkWithPasswords.preSharedKey, retrievedNetworkWithPassword.preSharedKey); in testGetConfiguredNetworksMasksPasswords() 2066 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()
|
/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 | 283 config.preSharedKey = "TestPsk"; in testSoftApConfigBackupAndRestore() 292 assertEquals(config.preSharedKey, restoredConfig.preSharedKey); in testSoftApConfigBackupAndRestore() 346 config.preSharedKey = "TestPsk"; in testGetKeyIdForCredentials() 407 config.preSharedKey = "TestPsk"; in testGetKeyIdForCredentialsForSuggestion()
|
D | WifiNetworkAgentSpecifierTest.java | 435 wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY; in createDefaultWifiConfiguration()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/ |
D | XmlUtil.java | 389 XmlSerializer out, String preSharedKey, in writePreSharedKeyToXml() argument 394 if (preSharedKey != null) { in writePreSharedKeyToXml() 395 encryptedData = encryptionUtil.encrypt(preSharedKey.getBytes()); in writePreSharedKeyToXml() 407 XmlUtil.writeNextValue(out, XML_TAG_PRE_SHARED_KEY, preSharedKey); in writePreSharedKeyToXml() 427 writePreSharedKeyToXml(out, configuration.preSharedKey, encryptionUtil); in writeCommonElementsToXml() 584 configuration.preSharedKey = (String) value; in parseFromXml() 728 configuration.preSharedKey = new String(preSharedKeyBytes); in parseFromXml()
|
/frameworks/base/wifi/java/android/net/wifi/ |
D | WifiConfiguration.java | 511 public String preSharedKey; field in WifiConfiguration 1995 if (this.preSharedKey != null) { in toString() 2374 preSharedKey = source.preSharedKey; in WifiConfiguration() 2463 dest.writeString(preSharedKey); in writeToParcel() 2537 config.preSharedKey = in.readString(); 2607 BackupUtils.writeString(out, preSharedKey); in getBytesForBackup() 2630 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 | 98 config.preSharedKey = password; in createPskConfig() 100 config.preSharedKey = quotedString(password); in createPskConfig()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/ |
D | XmlUtilTest.java | 122 when(mWifiConfigStoreEncryptionUtil.encrypt(pskNetwork.preSharedKey.getBytes())) in testPskWifiConfigurationSerializeDeserializeWithEncryption() 125 .thenReturn(pskNetwork.preSharedKey.getBytes()); in testPskWifiConfigurationSerializeDeserializeWithEncryption()
|