Home
last modified time | relevance | path

Searched refs:preSharedKey (Results 1 – 25 of 31) sorted by relevance

12

/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiApConfigStore.java292 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()
DDppManager.java210 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()
DWifiConfigurationUtil.java313 if (!Objects.equals(existingConfig.preSharedKey, newConfig.preSharedKey)) { in hasCredentialChanged()
599 && !validatePassword(config.preSharedKey, isAdd, false)) { in validate()
613 if (!validatePassword(config.preSharedKey, isAdd, true)) { in validate()
751 && !validatePassword(config.preSharedKey, true, false)) { in validateNetworkSpecifier()
765 if (!validatePassword(config.preSharedKey, true, true)) { in validateNetworkSpecifier()
DWifiConfigManager.java498 if (!TextUtils.isEmpty(configuration.preSharedKey)) { in maskPasswordsInWifiConfiguration()
499 configuration.preSharedKey = PASSWORD_MASK; in maskPasswordsInWifiConfiguration()
875 if (externalConfig.preSharedKey != null in mergeWithInternalWifiConfiguration()
876 && !externalConfig.preSharedKey.equals(PASSWORD_MASK)) { in mergeWithInternalWifiConfiguration()
877 internalConfig.preSharedKey = externalConfig.preSharedKey; in mergeWithInternalWifiConfiguration()
2331 if (!TextUtils.equals(network1.preSharedKey, network2.preSharedKey)) { in shouldNetworksBeLinked()
DHostapdHal.java344 nwParams.pskPassphrase = (config.preSharedKey != null) ? config.preSharedKey : ""; in addAccessPoint()
DSupplicantStaNetworkHal.java210 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()
DWifiBackupDataV1Parser.java307 configuration.preSharedKey = (String) value; in parseWifiConfigurationFromXmlInternal()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiApConfigStoreTest.java157 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 …]
DWifiConfigurationUtilTest.java238 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 …]
DDppManagerTest.java170 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()
DWifiConfigurationTestUtil.java282 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()
DHostapdHalTest.java226 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()
DWifiConfigManagerTest.java1683 assertFalse(pskNetwork.preSharedKey.equals(newPsk)); in testUpdatePreSharedKeyClearsHasEverConnected()
1684 pskNetwork.preSharedKey = newPsk; in testUpdatePreSharedKeyClearsHasEverConnected()
1856 someRandomNetworkWithAllMaskedFields.preSharedKey = WifiConfigurationTestUtil.TEST_PSK; in testUpdateIgnoresMaskedPasswords()
1870 assertEquals(someRandomNetworkWithAllMaskedFields.preSharedKey, in testUpdateIgnoresMaskedPasswords()
1871 retrievedNetworkWithPassword.preSharedKey); in testUpdateIgnoresMaskedPasswords()
1884 assertEquals(someRandomNetworkWithAllMaskedFields.preSharedKey, in testUpdateIgnoresMaskedPasswords()
1885 retrievedNetworkWithPassword.preSharedKey); in testUpdateIgnoresMaskedPasswords()
1950 networkWithPasswords.preSharedKey = WifiConfigurationTestUtil.TEST_PSK; in testGetConfiguredNetworksMasksPasswords()
1964 assertEquals(networkWithPasswords.preSharedKey, retrievedNetworkWithPassword.preSharedKey); in testGetConfiguredNetworksMasksPasswords()
1971 assertEquals(networkWithPasswords.preSharedKey, retrievedNetworkWithPassword.preSharedKey); in testGetConfiguredNetworksMasksPasswords()
[all …]
DWifiBackupRestoreTest.java918 expectedConfiguration.preSharedKey = WifiConfigurationTestUtil.TEST_PSK; in testSingleNetworkSupplicantBackupRestoreWithUnknownEAPKey()
1066 if (configuration.preSharedKey != null) { in writeConfigurationToWpaSupplicantConf()
1067 out.write(" " + "psk=" + configuration.preSharedKey + "\n"); in writeConfigurationToWpaSupplicantConf()
DSupplicantStaNetworkHalTest.java188 config.preSharedKey = "945ef00c463c2a7c2496376b13263d1531366b46377179a4b17b393687450779"; in testPskNetworkWifiConfigurationSaveLoad()
205 config.preSharedKey = "\"quoted_psd\""; in testPskNetworkWifiConfigurationSaveRemovesPskQuotes()
208 NativeUtil.removeEnclosingQuotes(config.preSharedKey)); in testPskNetworkWifiConfigurationSaveRemovesPskQuotes()
DWifiNetworkFactoryTest.java1149 wifiConfiguration.preSharedKey = TEST_WPA_PRESHARED_KEY; in testNetworkSpecifierHandleUserSelectionConnectToNetworkUsingLiteralSsidAndBssidMatch()
1205 wifiConfiguration.preSharedKey = TEST_WPA_PRESHARED_KEY; in testNetworkSpecifierHandleUserSelectionConnectToNetworkMultipleBssidMatches()
2386 wifiConfiguration.preSharedKey = TEST_WPA_PRESHARED_KEY; in sendNetworkRequestAndSetupForUserSelection()
2618 expectedWifiConfiguration.preSharedKey = TEST_WPA_PRESHARED_KEY; in validateConnectParams()
/frameworks/base/wifi/tests/src/android/net/wifi/
DWifiNetworkSpecifierTest.java99 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()
DWifiNetworkSuggestionTest.java85 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()
DWifiConfigurationTest.java281 config.preSharedKey = "TestPsk"; in testSoftApConfigBackupAndRestore()
290 assertEquals(config.preSharedKey, restoredConfig.preSharedKey); in testSoftApConfigBackupAndRestore()
344 config.preSharedKey = "TestPsk"; in testGetKeyIdForCredentials()
DWifiNetworkAgentSpecifierTest.java446 wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY; in createDefaultWifiConfiguration()
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/
DWifiConfigurationHelper.java97 config.preSharedKey = password; in createPskConfig()
99 config.preSharedKey = quotedString(password); in createPskConfig()
/frameworks/base/wifi/java/android/net/wifi/
DWifiNetworkSuggestion.java322 configuration.preSharedKey = "\"" + mWpa2PskPassphrase + "\""; in setSecurityParamsInWifiConfiguration()
326 configuration.preSharedKey = "\"" + mWpa3SaePassphrase + "\""; in setSecurityParamsInWifiConfiguration()
DWifiConfiguration.java510 public String preSharedKey; field in WifiConfiguration
1994 if (this.preSharedKey != null) { in toString()
2365 preSharedKey = source.preSharedKey; in WifiConfiguration()
2454 dest.writeString(preSharedKey); in writeToParcel()
2528 config.preSharedKey = in.readString();
2598 BackupUtils.writeString(out, preSharedKey); in getBytesForBackup()
2621 config.preSharedKey = BackupUtils.readString(in); in getWifiConfigFromBackup()
DWifiNetworkSpecifier.java280 configuration.preSharedKey = "\"" + mWpa2PskPassphrase + "\""; in setSecurityParamsInWifiConfiguration()
284 configuration.preSharedKey = "\"" + mWpa3SaePassphrase + "\""; in setSecurityParamsInWifiConfiguration()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/
DXmlUtil.java392 XmlUtil.writeNextValue(out, XML_TAG_PRE_SHARED_KEY, configuration.preSharedKey); in writeCommonElementsToXml()
542 configuration.preSharedKey = (String) value; in parseFromXml()

12