Home
last modified time | relevance | path

Searched refs:mKeyStore (Results 1 – 25 of 35) sorted by relevance

12

/frameworks/base/services/tests/servicestests/src/com/android/server/adb/
DAdbDebuggingManagerTest.java79 private AdbDebuggingManager.AdbKeyStore mKeyStore; field in AdbDebuggingManagerTest
98 mKeyStore = mManager.new AdbKeyStore(mAdbKeyXmlFile); in setUp()
99 mHandler = mManager.new AdbDebuggingHandler(FgThread.get().getLooper(), mThread, mKeyStore); in setUp()
100 mOriginalAllowedConnectionTime = mKeyStore.getAllowedConnectionTime(); in setUp()
106 mKeyStore.deleteKeyStore(); in tearDown()
155 long lastConnectionTime = mKeyStore.getLastConnectionTime(TEST_KEY_1); in testDisconnectAlwaysAllowKey()
167 mKeyStore.getLastConnectionTime(TEST_KEY_1)); in testDisconnectAlwaysAllowKey()
216 mKeyStore.setLastConnectionTime(TEST_KEY_1, 1); in testOriginalAlwaysAllowBehavior()
237 long lastConnectionTime = mKeyStore.getLastConnectionTime(TEST_KEY_1); in testLastConnectionTimeUpdatedByScheduledJob()
247 lastConnectionTime, mKeyStore.getLastConnectionTime(TEST_KEY_1)); in testLastConnectionTimeUpdatedByScheduledJob()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiKeyStoreTest.java53 @Mock private KeyStore mKeyStore; field in WifiKeyStoreTest
67 mWifiKeyStore = new WifiKeyStore(mKeyStore); in setUp()
72 when(mKeyStore.put(anyString(), any(), anyInt(), anyInt())).thenReturn(true); in setUp()
73 when(mKeyStore.importKey(anyString(), any(), anyInt(), anyInt())).thenReturn(true); in setUp()
102 verify(mKeyStore).delete(Credentials.USER_PRIVATE_KEY + USER_CERT_ALIAS, Process.WIFI_UID); in testRemoveKeysForAppInstalledCerts()
103 verify(mKeyStore).delete(Credentials.USER_CERTIFICATE + USER_CERT_ALIAS, Process.WIFI_UID); in testRemoveKeysForAppInstalledCerts()
104 verify(mKeyStore).delete(Credentials.CA_CERTIFICATE + USER_CA_CERT_ALIAS[0], in testRemoveKeysForAppInstalledCerts()
106 verify(mKeyStore).delete(Credentials.CA_CERTIFICATE + USER_CA_CERT_ALIAS[1], in testRemoveKeysForAppInstalledCerts()
121 verify(mKeyStore).delete(Credentials.USER_PRIVATE_KEY + USER_CERT_ALIAS, Process.WIFI_UID); in testRemoveKeysForMixedInstalledCerts1()
122 verify(mKeyStore).delete(Credentials.USER_CERTIFICATE + USER_CERT_ALIAS, Process.WIFI_UID); in testRemoveKeysForMixedInstalledCerts1()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiKeyStore.java52 private final KeyStore mKeyStore; field in WifiKeyStore
55 mKeyStore = keyStore; in WifiKeyStore()
101 ret = mKeyStore.importKey(privKeyName, privKeyData, Process.WIFI_UID, in installKeys()
111 mKeyStore.delete(privKeyName, Process.WIFI_UID); in installKeys()
134 mKeyStore.delete(privKeyName, Process.WIFI_UID); in installKeys()
135 mKeyStore.delete(userCertName, Process.WIFI_UID); in installKeys()
139 mKeyStore.delete(Credentials.CA_CERTIFICATE + addedAlias, Process.WIFI_UID); in installKeys()
149 mKeyStore.delete(Credentials.CA_CERTIFICATE + oldAlias, Process.WIFI_UID); in installKeys()
190 return mKeyStore.put(name, certData, Process.WIFI_UID, KeyStore.FLAG_NONE); in putCertsInKeyStore()
207 return mKeyStore.importKey(name, privKeyData, Process.WIFI_UID, KeyStore.FLAG_NONE); in putKeyInKeyStore()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/
DWfaKeyStore.java41 private KeyStore mKeyStore = null; field in WfaKeyStore
47 if (mKeyStore != null) { in load()
52 mKeyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in load()
53 mKeyStore.load(null, null); in load()
56 mKeyStore.setCertificateEntry(String.format("%d", index), cert); in load()
73 return mKeyStore; in get()
DPasspointProvider.java73 private final WifiKeyStore mKeyStore; field in PasspointProvider
120 mKeyStore = keyStore; in PasspointProvider()
220 if (!mKeyStore.putCertInKeyStore(Credentials.CA_CERTIFICATE + alias, in installCertsAndKeys()
234 if (!mKeyStore.putKeyInKeyStore(keyName, in installCertsAndKeys()
254 if (!mKeyStore.putCertInKeyStore(certName, clientCert)) { in installCertsAndKeys()
272 if (!mKeyStore.putCertInKeyStore(certName, certificate)) { in installCertsAndKeys()
296 if (!mKeyStore.removeEntryFromKeyStore( in uninstallCertsAndKeys()
304 if (!mKeyStore.removeEntryFromKeyStore( in uninstallCertsAndKeys()
311 if (!mKeyStore.removeEntryFromKeyStore( in uninstallCertsAndKeys()
319 if (!mKeyStore.removeEntryFromKeyStore( in uninstallCertsAndKeys()
DPasspointConfigUserStoreData.java77 private final WifiKeyStore mKeyStore; field in PasspointConfigUserStoreData
102 mKeyStore = keyStore; in PasspointConfigUserStoreData()
345 return new PasspointProvider(config, mKeyStore, mSimAccessor, providerId, creatorUid, in deserializeProvider()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
DKeyStoreProxyImpl.java34 private final KeyStore mKeyStore; field in KeyStoreProxyImpl
40 mKeyStore = keyStore; in KeyStoreProxyImpl()
45 return mKeyStore.containsAlias(alias); in containsAlias()
51 return mKeyStore.getKey(alias, password); in getKey()
57 mKeyStore.setEntry(alias, entry, protParam); in setEntry()
62 mKeyStore.deleteEntry(alias); in deleteEntry()
DPlatformKeyManager.java85 private final KeyStoreProxy mKeyStore; field in PlatformKeyManager
114 mKeyStore = keyStore; in PlatformKeyManager()
156 mKeyStore.deleteEntry(getEncryptAlias(userId, generationId)); in invalidatePlatformKey()
157 mKeyStore.deleteEntry(getDecryptAlias(userId, generationId)); in invalidatePlatformKey()
248 AndroidKeyStoreSecretKey key = (AndroidKeyStoreSecretKey) mKeyStore.getKey( in getEncryptKeyInternal()
302 AndroidKeyStoreSecretKey key = (AndroidKeyStoreSecretKey) mKeyStore.getKey( in getDecryptKeyInternal()
414 return mKeyStore.containsAlias(getEncryptAlias(userId, generationId)) in isKeyLoaded()
415 && mKeyStore.containsAlias(getDecryptAlias(userId, generationId)); in isKeyLoaded()
462 mKeyStore.setEntry( in generateAndLoadKey()
466 mKeyStore.setEntry( in generateAndLoadKey()
/frameworks/base/keystore/java/android/security/keystore/
DAndroidKeyStoreSpi.java91 private KeyStore mKeyStore; field in AndroidKeyStoreSpi
99 if (!mKeyStore.contains(userKeyAlias, mUid)) { in engineGetKey()
102 if (!mKeyStore.contains(userKeyAlias, mUid)) return null; in engineGetKey()
105 key = AndroidKeyStoreProvider.loadAndroidKeyStoreKeyFromKeystore(mKeyStore, in engineGetKey()
132 final byte[] caBytes = mKeyStore.get(Credentials.CA_CERTIFICATE + alias, in engineGetCertificateChain()
160 byte[] encodedCert = mKeyStore.get(Credentials.USER_CERTIFICATE + alias, mUid); in engineGetCertificate()
165 encodedCert = mKeyStore.get(Credentials.CA_CERTIFICATE + alias, mUid); in engineGetCertificate()
202 if (mKeyStore.contains(privateKeyAlias, mUid)) { in getCertificateForPrivateKeyEntry()
254 final long epochMillis = mKeyStore.getmtime(alias, mUid); in getModificationDate()
540 Credentials.deleteAllTypesForAlias(mKeyStore, alias, mUid); in setPrivateKeyEntry()
[all …]
DAndroidKeyStoreHmacSpi.java71 private final KeyStore mKeyStore = KeyStore.getInstance(); field in AndroidKeyStoreHmacSpi
131 mKeyStore.abort(operationToken); in resetAll()
141 mKeyStore.abort(operationToken); in resetWhilePreservingInitState()
166 OperationResult opResult = mKeyStore.begin( in ensureKeystoreOperationInitialized()
185 mKeyStore, mKey, opResult.resultCode); in ensureKeystoreOperationInitialized()
199 mKeyStore, mOperationToken)); in ensureKeystoreOperationInitialized()
254 mKeyStore.abort(operationToken); in finalize()
DAndroidKeyStoreSignatureSpiBase.java47 private final KeyStore mKeyStore; field in AndroidKeyStoreSignatureSpiBase
72 mKeyStore = KeyStore.getInstance(); in AndroidKeyStoreSignatureSpiBase()
157 mKeyStore.abort(operationToken); in resetAll()
181 mKeyStore.abort(operationToken); in resetWhilePreservingInitState()
202 OperationResult opResult = mKeyStore.begin( in ensureKeystoreOperationInitialized()
220 mKeyStore, mKey, opResult.resultCode); in ensureKeystoreOperationInitialized()
232 mMessageStreamer = createMainDataStreamer(mKeyStore, opResult.token); in ensureKeystoreOperationInitialized()
399 return mKeyStore; in getKeyStore()
DKeyStoreCryptoOperationChunkedStreamer.java207 private final KeyStore mKeyStore; field in KeyStoreCryptoOperationChunkedStreamer.MainDataStream
211 mKeyStore = keyStore; in MainDataStream()
217 return mKeyStore.update(mOperationToken, null, input); in update()
222 return mKeyStore.finish(mOperationToken, null, input, signature, additionalEntropy); in finish()
DAndroidKeyStoreCipherSpiBase.java67 private final KeyStore mKeyStore; field in AndroidKeyStoreCipherSpiBase
96 mKeyStore = KeyStore.getInstance(); in AndroidKeyStoreCipherSpiBase()
188 mKeyStore.abort(operationToken); in resetAll()
214 mKeyStore.abort(operationToken); in resetWhilePreservingInitState()
248 OperationResult opResult = mKeyStore.begin( in ensureKeystoreOperationInitialized()
266 mKeyStore, mKey, opResult.resultCode); in ensureKeystoreOperationInitialized()
285 mMainDataStreamer = createMainDataStreamer(mKeyStore, opResult.token); in ensureKeystoreOperationInitialized()
287 createAdditionalAuthenticationDataStreamer(mKeyStore, opResult.token); in ensureKeystoreOperationInitialized()
744 mKeyStore.abort(operationToken); in finalize()
781 return mKeyStore; in getKeyStore()
DAndroidKeyStoreKeyPairGeneratorSpi.java152 private KeyStore mKeyStore; field in AndroidKeyStoreKeyPairGeneratorSpi
353 mKeyStore = KeyStore.getInstance(); in initialize()
377 mKeyStore = null; in resetAll()
445 if (mKeyStore == null || mSpec == null) { in generateKeyPair()
451 && (mKeyStore.state() != KeyStore.State.UNLOCKED)) { in generateKeyPair()
465 Credentials.deleteAllTypesForAlias(mKeyStore, mEntryAlias, mEntryUid); in generateKeyPair()
485 Credentials.deleteAllTypesForAlias(mKeyStore, mEntryAlias, mEntryUid); in generateKeyPair()
520 int errorCode = mKeyStore.generateKey(privateKeyAlias, args, additionalEntropy, in generateKeystoreKeyPair()
535 mKeyStore, privateKeyAlias, mEntryUid); in loadKeystoreKeyPair()
593 int insertErrorCode = mKeyStore.insert( in storeCertificate()
[all …]
DAndroidKeyStoreKeyGeneratorSpi.java106 private final KeyStore mKeyStore = KeyStore.getInstance(); field in AndroidKeyStoreKeyGeneratorSpi
315 Credentials.deleteAllTypesForAlias(mKeyStore, spec.getKeystoreAlias(), spec.getUid()); in engineGenerateKey()
316 int errorCode = mKeyStore.generateKey( in engineGenerateKey()
345 mKeyStore, spec.getKeystoreAlias(), spec.getUid()); in engineGenerateKey()
DAndroidKeyStoreKeyFactorySpi.java41 private final KeyStore mKeyStore = KeyStore.getInstance(); field in AndroidKeyStoreKeyFactorySpi
75 mKeyStore, entryAlias, keyAliasInKeystore, keystorePrivateKey.getUid()); in engineGetKeySpec()
DAndroidKeyStoreAuthenticatedAESCipherSpi.java405 private final KeyStore mKeyStore; field in AndroidKeyStoreAuthenticatedAESCipherSpi.AdditionalAuthenticationDataStream
409 mKeyStore = keyStore; in AdditionalAuthenticationDataStream()
421 OperationResult result = mKeyStore.update(mOperationToken, keymasterArgs, null); in update()
/frameworks/base/tests/net/java/com/android/server/connectivity/
DVpnTest.java167 @Mock private KeyStore mKeyStore; field in VpnTest
294 assertTrue(vpn.setAlwaysOnPackage(PKGS[1], false, Collections.emptyList(), mKeyStore)); in testGetAlwaysAndOnGetLockDown()
299 assertTrue(vpn.setAlwaysOnPackage(PKGS[1], true, Collections.emptyList(), mKeyStore)); in testGetAlwaysAndOnGetLockDown()
304 assertTrue(vpn.setAlwaysOnPackage(null, false, Collections.emptyList(), mKeyStore)); in testGetAlwaysAndOnGetLockDown()
318 assertTrue(vpn.setAlwaysOnPackage(PKGS[1], false, null, mKeyStore)); in testLockdownChangingPackage()
322 assertTrue(vpn.setAlwaysOnPackage(PKGS[1], true, null, mKeyStore)); in testLockdownChangingPackage()
331 assertTrue(vpn.setAlwaysOnPackage(PKGS[3], true, null, mKeyStore)); in testLockdownChangingPackage()
351 PKGS[1], true, Collections.singletonList(PKGS[2]), mKeyStore)); in testLockdownWhitelist()
361 PKGS[1], true, Collections.singletonList(PKGS[3]), mKeyStore)); in testLockdownWhitelist()
374 PKGS[0], true, Collections.singletonList(PKGS[3]), mKeyStore)); in testLockdownWhitelist()
[all …]
/frameworks/base/core/java/android/security/net/config/
DKeyStoreCertificateSource.java36 private final KeyStore mKeyStore; field in KeyStoreCertificateSource
41 mKeyStore = ks; in KeyStoreCertificateSource()
58 Set<X509Certificate> certificates = new ArraySet<>(mKeyStore.size()); in ensureInitialized()
59 for (Enumeration<String> en = mKeyStore.aliases(); en.hasMoreElements();) { in ensureInitialized()
61 X509Certificate cert = (X509Certificate) mKeyStore.getCertificate(alias); in ensureInitialized()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/
DApplicationKeyStorage.java51 private final KeyStoreProxy mKeyStore; field in ApplicationKeyStorage
63 mKeyStore = keyStore; in ApplicationKeyStorage()
83 mKeyStore.setEntry( in setSymmetricKeyEntry()
100 mKeyStore.deleteEntry(getInternalAlias(userId, uid, alias)); in deleteEntry()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DPasspointProviderTest.java93 @Mock WifiKeyStore mKeyStore; field in PasspointProviderTest
128 return new PasspointProvider(config, mKeyStore, mSimAccessor, PROVIDER_ID, CREATOR_UID, in createProvider()
278 when(mKeyStore.putCertInKeyStore(CA_CERTIFICATE_NAME, FakeKeys.CA_CERT0)) in installCertsAndKeysSuccess()
280 when(mKeyStore.putCertInKeyStore(CA_CERTIFICATE_NAME_2, FakeKeys.CA_CERT1)) in installCertsAndKeysSuccess()
282 when(mKeyStore.putKeyInKeyStore(CLIENT_PRIVATE_KEY_NAME, FakeKeys.RSA_KEY1)) in installCertsAndKeysSuccess()
284 when(mKeyStore.putCertInKeyStore(CLIENT_CERTIFICATE_NAME, FakeKeys.CLIENT_CERT)) in installCertsAndKeysSuccess()
286 when(mKeyStore.putCertInKeyStore(REMEDIATION_CA_CERTIFICATE_NAME, FakeKeys.CA_CERT0)) in installCertsAndKeysSuccess()
329 when(mKeyStore.putCertInKeyStore(CA_CERTIFICATE_NAME, FakeKeys.CA_CERT0)) in installCertsAndKeysFailure()
331 when(mKeyStore.putCertInKeyStore(CA_CERTIFICATE_NAME_2, FakeKeys.CA_CERT1)) in installCertsAndKeysFailure()
333 when(mKeyStore.putKeyInKeyStore(CLIENT_PRIVATE_KEY_NAME, FakeKeys.RSA_KEY1)) in installCertsAndKeysFailure()
[all …]
DPasspointConfigUserStoreDataTest.java73 @Mock WifiKeyStore mKeyStore; field in PasspointConfigUserStoreDataTest
82 mConfigStoreData = new PasspointConfigUserStoreData(mKeyStore, mSimAccessor, mDataSource); in setUp()
248 mKeyStore, mSimAccessor, TEST_PROVIDER_ID, TEST_CREATOR_UID, TEST_CREATOR_PACKAGE, in serializeAndDeserializeUserStoreData()
252 mKeyStore, mSimAccessor, TEST_PROVIDER_ID_2, TEST_CREATOR_UID, TEST_CREATOR_PACKAGE, in serializeAndDeserializeUserStoreData()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DLockSettingsServiceTestable.java42 private KeyStore mKeyStore; field in LockSettingsServiceTestable.MockInjector
58 mKeyStore = keyStore; in MockInjector()
99 return mKeyStore; in getKeyStore()
/frameworks/base/core/java/android/security/
DConfirmationPrompt.java94 private final KeyStore mKeyStore = KeyStore.getInstance(); field in ConfirmationPrompt
275 int responseCode = mKeyStore.presentConfirmationPrompt( in presentPrompt()
309 int responseCode = mKeyStore.cancelConfirmationPrompt(mCallbackBinder); in cancelPrompt()
/frameworks/base/core/java/android/security/keystore/recovery/
DRecoveryController.java265 private final KeyStore mKeyStore; field in RecoveryController
269 mKeyStore = keystore; in RecoveryController()
713 mKeyStore, in getKeyFromGrant()

12