/packages/apps/KeyChain/robotests/src/com/android/keychain/ |
D | AliasLoaderTest.java | 152 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/KeyChain/tests/src/com/android/keychain/tests/ |
D | KeyChainActivityTest.java | 145 KeyStore keyStore = prepareKeyStoreWithLongChainCertificates(); in testCertificateParametersFilter_filtersByIntermediateIssuer() local 147 assertThat(createCheckerForIssuer(keyStore, ROOT_SUBJECT) in testCertificateParametersFilter_filtersByIntermediateIssuer() 150 assertThat(createCheckerForIssuer(keyStore, INTERMEDIATE_SUBJECT) in testCertificateParametersFilter_filtersByIntermediateIssuer() 153 assertThat(createCheckerForIssuer(keyStore, LEAF_SUBJECT) in testCertificateParametersFilter_filtersByIntermediateIssuer() 161 KeyStore keyStore = mock(KeyStore.class); in prepareKeyStoreWithLongChainCertificates() local 162 when(keyStore.get(Credentials.USER_CERTIFICATE + "client")).thenReturn(mLeafRsaCertificate); in prepareKeyStoreWithLongChainCertificates() 167 when(keyStore.get(Credentials.CA_CERTIFICATE + "client")).thenReturn(intermediatesPem); in prepareKeyStoreWithLongChainCertificates() 169 return keyStore; in prepareKeyStoreWithLongChainCertificates() 175 KeyStore keyStore, X500Principal issuer) { in createCheckerForIssuer() argument 177 keyStore, new String[] {}, in createCheckerForIssuer()
|
D | KeyChainTestActivity.java | 190 KeyStore serverKeyStore = mTestKeyStore.keyStore; in startWebServer()
|
/packages/apps/Settings/src/com/android/settings/ |
D | UserCredentialsSettings.java | 204 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/ |
D | UserCredentialsSettings.java | 204 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/ |
D | WifiConfigurationProvider.java | 192 KeyStore keyStore = loadKeystoreFromCertificate(userCertificate); in maybeUpdateClientKeyForEAPConfiguration() local 193 String alias = findAliasFromKeystore(keyStore); in maybeUpdateClientKeyForEAPConfiguration() 194 if (TextUtils.isEmpty(alias) || !keyStore.isKeyEntry(alias)) { in maybeUpdateClientKeyForEAPConfiguration() 197 Key key = keyStore.getKey(alias, PASSWORD); in maybeUpdateClientKeyForEAPConfiguration() 206 Certificate[] certificates = keyStore.getCertificateChain(alias); in maybeUpdateClientKeyForEAPConfiguration() 271 private static String findAliasFromKeystore(KeyStore keyStore) in findAliasFromKeystore() argument 273 List<String> aliases = Collections.list(keyStore.aliases()); in findAliasFromKeystore() 286 KeyStore keyStore = KeyStore.getInstance(KEYSTORE_TYPE_PKCS12); in loadKeystoreFromCertificate() local 290 keyStore.load(inputStream, PASSWORD); in loadKeystoreFromCertificate() 292 return keyStore; in loadKeystoreFromCertificate()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/bluetoothKeystore/ |
D | BluetoothKeystoreService.java | 134 KeyStore keyStore; in start() local 141 keyStore = getKeyStore(); in start() 144 if (keyStore == null) { in start() 157 if (!keyStore.containsAlias(KEYALIAS) && mIsNiapMode) { in start() 784 KeyStore keyStore = null; in getKeyStore() local 787 while ((counter <= TRY_MAX) && (keyStore == null)) { in getKeyStore() 789 keyStore = AndroidKeyStoreProvider.getKeyStoreForUid(Process.BLUETOOTH_UID); in getKeyStore() 797 return keyStore; in getKeyStore() 804 KeyStore keyStore = getKeyStore(); in getOrCreateSecretKey() local 805 if (keyStore.containsAlias(KEYALIAS)) { // The key exists in key store. Get the key. in getOrCreateSecretKey() [all …]
|
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/message/ |
D | IkeCertPayload.java | 136 KeyStore keyStore = null; in validateCertificates() local 140 keyStore = KeyStore.getInstance(KEY_STORE_TYPE_PKCS12); in validateCertificates() 141 keyStore.load(null); in validateCertificates() 147 keyStore.setCertificateEntry(alias, trustedCert); in validateCertificates() 155 tmFactory.init(keyStore); in validateCertificates()
|
/packages/apps/KeyChain/src/com/android/keychain/ |
D | KeyChainActivity.java | 225 public CertificateParametersFilter(KeyStore keyStore, in CertificateParametersFilter() argument 227 mKeyStore = keyStore; in CertificateParametersFilter() 300 public AliasLoader(KeyStore keyStore, Context context, KeyInfoProvider infoProvider, in AliasLoader() argument 302 mKeyStore = keyStore; in AliasLoader() 441 private CertificateAdapter(KeyStore keyStore, Context context, List<String> aliases) { in CertificateAdapter() argument 444 mKeyStore = keyStore; in CertificateAdapter() 609 private static X509Certificate loadCertificate(KeyStore keyStore, String alias) { in loadCertificate() argument 610 byte[] bytes = keyStore.get(Credentials.USER_CERTIFICATE + alias); in loadCertificate() 625 private static List<X509Certificate> loadCertificateChain(KeyStore keyStore, String alias) { in loadCertificateChain() argument 626 byte[] chainBytes = keyStore.get(Credentials.CA_CERTIFICATE + alias); in loadCertificateChain()
|
D | KeyChainService.java | 109 KeyStoreAliasesProvider(KeyStore keyStore) { in KeyStoreAliasesProvider() argument 110 mKeyStore = keyStore; in KeyStoreAliasesProvider()
|
/packages/services/Car/service/src/com/android/car/trust/ |
D | CarTrustedDeviceService.java | 393 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/Car/libs/connected-device-lib/src/com/android/car/connecteddevice/storage/ |
D | ConnectedDeviceStorage.java | 224 KeyStore keyStore; in getKeyStoreKey() local 226 keyStore = KeyStore.getInstance(KEYSTORE_PROVIDER); in getKeyStoreKey() 227 keyStore.load(null); in getKeyStoreKey() 228 if (!keyStore.containsAlias(keyAlias)) { in getKeyStoreKey() 241 return keyStore.getKey(keyAlias, null); in getKeyStoreKey()
|
/packages/apps/Car/Dialer/src/com/android/car/dialer/storage/ |
D | CipherConverter.java | 151 KeyStore keyStore = KeyStore.getInstance(ANDROID_KEY_STORE); in getKeyStore() local 152 keyStore.load(null); in getKeyStore() 153 return keyStore; in getKeyStore()
|
/packages/apps/Settings/src/com/android/settings/vpn2/ |
D | ConfigDialogFragment.java | 157 KeyStore keyStore = KeyStore.getInstance(); in onClick() local 158 keyStore.delete(Credentials.VPN + profile.key, KeyStore.UID_SELF); in onClick()
|
D | VpnSettings.java | 553 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/ |
D | ConfigDialogFragment.java | 153 KeyStore keyStore = KeyStore.getInstance(); in onClick() local 154 keyStore.delete(Credentials.VPN + profile.key, KeyStore.UID_SELF); in onClick()
|
D | VpnSettings.java | 553 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()
|