Home
last modified time | relevance | path

Searched refs:keyStore (Results 1 – 13 of 13) sorted by relevance

/packages/apps/KeyChain/robotests/src/com/android/keychain/
DAliasLoaderTest.java152 KeyStore keyStore = mock(KeyStore.class); in testAliasLoader_loadsAllAliases() local
153 when(keyStore.list(Credentials.USER_PRIVATE_KEY)).thenReturn(new String[] {"b", "c", "a"}); in testAliasLoader_loadsAllAliases()
157 keyStore, in testAliasLoader_loadsAllAliases()
176 KeyStore keyStore = mock(KeyStore.class); in testAliasLoader_copesWithNoAliases() local
177 when(keyStore.list(Credentials.USER_PRIVATE_KEY)).thenReturn(null); in testAliasLoader_copesWithNoAliases()
181 keyStore, in testAliasLoader_copesWithNoAliases()
197 KeyStore keyStore = mock(KeyStore.class); in testAliasLoader_filtersNonUserSelectableAliases() local
198 when(keyStore.list(Credentials.USER_PRIVATE_KEY)).thenReturn(new String[] {"a", "b", "c"}); in testAliasLoader_filtersNonUserSelectableAliases()
207 keyStore, RuntimeEnvironment.application, infoProvider, mDummyChecker); in testAliasLoader_filtersNonUserSelectableAliases()
221 KeyStore keyStore = mock(KeyStore.class); in testAliasLoader_filtersAliasesWithNonConformingParameters() local
[all …]
/packages/apps/Settings/src/com/android/settings/
DUserCredentialsSettings.java204 final KeyStore keyStore = KeyStore.getInstance(); in deleteWifiCredential() local
209 keyStore.delete(Credentials.USER_PRIVATE_KEY + credential.getAlias(), in deleteWifiCredential()
213 keyStore.delete(Credentials.USER_CERTIFICATE + credential.getAlias(), in deleteWifiCredential()
217 keyStore.delete(Credentials.CA_CERTIFICATE + credential.getAlias(), in deleteWifiCredential()
269 final KeyStore keyStore = KeyStore.getInstance(); in doInBackground() local
277 credentials.addAll(getCredentialsForUid(keyStore, systemUid).values()); in doInBackground()
278 credentials.addAll(getCredentialsForUid(keyStore, wifiUid).values()); in doInBackground()
282 private boolean isAsymmetric(KeyStore keyStore, String alias, int uid) in isAsymmetric() argument
285 int errorCode = keyStore.getKeyCharacteristics(alias, null, null, uid, in isAsymmetric()
301 private SortedMap<String, Credential> getCredentialsForUid(KeyStore keyStore, int uid) { in getCredentialsForUid() argument
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/
DUserCredentialsSettings.java204 final KeyStore keyStore = KeyStore.getInstance(); in deleteWifiCredential() local
209 keyStore.delete(Credentials.USER_PRIVATE_KEY + credential.getAlias(), in deleteWifiCredential()
213 keyStore.delete(Credentials.USER_CERTIFICATE + credential.getAlias(), in deleteWifiCredential()
217 keyStore.delete(Credentials.CA_CERTIFICATE + credential.getAlias(), in deleteWifiCredential()
269 final KeyStore keyStore = KeyStore.getInstance(); in doInBackground() local
277 credentials.addAll(getCredentialsForUid(keyStore, systemUid).values()); in doInBackground()
278 credentials.addAll(getCredentialsForUid(keyStore, wifiUid).values()); in doInBackground()
282 private boolean isAsymmetric(KeyStore keyStore, String alias, int uid) in isAsymmetric() argument
285 int errorCode = keyStore.getKeyCharacteristics(alias, null, null, uid, in isAsymmetric()
301 private SortedMap<String, Credential> getCredentialsForUid(KeyStore keyStore, int uid) { in getCredentialsForUid() argument
[all …]
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/wifi/
DWifiConfigurationProvider.java190 KeyStore keyStore = loadKeystoreFromCertificate(userCertificate); in maybeUpdateClientKeyForEAPConfiguration() local
191 String alias = findAliasFromKeystore(keyStore); in maybeUpdateClientKeyForEAPConfiguration()
192 if (TextUtils.isEmpty(alias) || !keyStore.isKeyEntry(alias)) { in maybeUpdateClientKeyForEAPConfiguration()
195 Key key = keyStore.getKey(alias, PASSWORD); in maybeUpdateClientKeyForEAPConfiguration()
204 Certificate[] certificates = keyStore.getCertificateChain(alias); in maybeUpdateClientKeyForEAPConfiguration()
269 private static String findAliasFromKeystore(KeyStore keyStore) in findAliasFromKeystore() argument
271 List<String> aliases = Collections.list(keyStore.aliases()); in findAliasFromKeystore()
284 KeyStore keyStore = KeyStore.getInstance(KEYSTORE_TYPE_PKCS12); in loadKeystoreFromCertificate() local
288 keyStore.load(inputStream, PASSWORD); in loadKeystoreFromCertificate()
290 return keyStore; in loadKeystoreFromCertificate()
/packages/apps/KeyChain/src/com/android/keychain/
DKeyChainActivity.java200 public CertificateParametersFilter(KeyStore keyStore, in CertificateParametersFilter() argument
202 mKeyStore = keyStore; in CertificateParametersFilter()
257 public AliasLoader(KeyStore keyStore, Context context, KeyInfoProvider infoProvider, in AliasLoader() argument
259 mKeyStore = keyStore; in AliasLoader()
400 private CertificateAdapter(KeyStore keyStore, Context context, List<String> aliases, in CertificateAdapter() argument
404 mKeyStore = keyStore; in CertificateAdapter()
565 private static X509Certificate loadCertificate(KeyStore keyStore, String alias) { in loadCertificate() argument
566 byte[] bytes = keyStore.get(Credentials.USER_CERTIFICATE + alias); in loadCertificate()
DKeyChainService.java102 KeyStoreAliasesProvider(KeyStore keyStore) { in KeyStoreAliasesProvider() argument
103 mKeyStore = keyStore; in KeyStoreAliasesProvider()
/packages/services/Car/service/src/com/android/car/trust/
DCarTrustedDeviceService.java393 KeyStore keyStore; in getKeyStoreKey() local
395 keyStore = KeyStore.getInstance(KEYSTORE_PROVIDER); in getKeyStoreKey()
396 keyStore.load(null); in getKeyStoreKey()
397 if (!keyStore.containsAlias(keyAlias)) { in getKeyStoreKey()
408 return keyStore.getKey(keyAlias, null); in getKeyStoreKey()
/packages/apps/Settings/src/com/android/settings/vpn2/
DConfigDialogFragment.java153 KeyStore keyStore = KeyStore.getInstance(); in onClick() local
154 keyStore.delete(Credentials.VPN + profile.key, KeyStore.UID_SELF); in onClick()
DVpnSettings.java553 static List<VpnProfile> loadVpnProfiles(KeyStore keyStore, int... excludeTypes) { in loadVpnProfiles() argument
556 for (String key : keyStore.list(Credentials.VPN)) { in loadVpnProfiles()
557 final VpnProfile profile = VpnProfile.decode(key, keyStore.get(Credentials.VPN + key)); in loadVpnProfiles()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/vpn2/
DConfigDialogFragment.java153 KeyStore keyStore = KeyStore.getInstance(); in onClick() local
154 keyStore.delete(Credentials.VPN + profile.key, KeyStore.UID_SELF); in onClick()
DVpnSettings.java553 static List<VpnProfile> loadVpnProfiles(KeyStore keyStore, int... excludeTypes) { in loadVpnProfiles() argument
556 for (String key : keyStore.list(Credentials.VPN)) { in loadVpnProfiles()
557 final VpnProfile profile = VpnProfile.decode(key, keyStore.get(Credentials.VPN + key)); in loadVpnProfiles()
/packages/apps/KeyChain/tests/src/com/android/keychain/tests/
DKeyChainServiceTest.java168 KeyStore keyStore = KeyStore.getInstance(); in test_KeyChainService() local
214 assertEquals(KeyStore.State.UNLOCKED, keyStore.state()); in test_KeyChainService()
DKeyChainTestActivity.java190 KeyStore serverKeyStore = mTestKeyStore.keyStore; in startWebServer()