Home
last modified time | relevance | path

Searched refs:preSharedKey (Results 1 – 25 of 35) 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()
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()
DWifiConfigManager.java582 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()
DHostapdHal.java376 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.java308 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.java283 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()
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.java1740 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 …]
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()
DWifiNetworkSelectorTestUtil.java180 configs[index].preSharedKey = "\"PA55W0RD\""; // needed to validate with PSK in generateWifiConfigurations()
/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.java283 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()
DWifiNetworkAgentSpecifierTest.java435 wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY; in createDefaultWifiConfiguration()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/
DXmlUtil.java389 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/
DWifiConfiguration.java511 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()
DWifiNetworkSuggestion.java322 configuration.preSharedKey = "\"" + mWpa2PskPassphrase + "\""; in setSecurityParamsInWifiConfiguration()
326 configuration.preSharedKey = "\"" + mWpa3SaePassphrase + "\""; in setSecurityParamsInWifiConfiguration()
DWifiNetworkSpecifier.java280 configuration.preSharedKey = "\"" + mWpa2PskPassphrase + "\""; in setSecurityParamsInWifiConfiguration()
284 configuration.preSharedKey = "\"" + mWpa3SaePassphrase + "\""; in setSecurityParamsInWifiConfiguration()
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/
DWifiConfigurationHelper.java98 config.preSharedKey = password; in createPskConfig()
100 config.preSharedKey = quotedString(password); in createPskConfig()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
DXmlUtilTest.java122 when(mWifiConfigStoreEncryptionUtil.encrypt(pskNetwork.preSharedKey.getBytes())) in testPskWifiConfigurationSerializeDeserializeWithEncryption()
125 .thenReturn(pskNetwork.preSharedKey.getBytes()); in testPskWifiConfigurationSerializeDeserializeWithEncryption()

12