Home
last modified time | relevance | path

Searched refs:mKeyStore (Results 1 – 25 of 34) 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
119 mKeyStore = keyStore; in PasspointProvider()
219 if (!mKeyStore.putCertInKeyStore(Credentials.CA_CERTIFICATE + alias, in installCertsAndKeys()
233 if (!mKeyStore.putKeyInKeyStore(keyName, in installCertsAndKeys()
253 if (!mKeyStore.putCertInKeyStore(certName, clientCert)) { in installCertsAndKeys()
271 if (!mKeyStore.putCertInKeyStore(certName, certificate)) { in installCertsAndKeys()
295 if (!mKeyStore.removeEntryFromKeyStore( in uninstallCertsAndKeys()
303 if (!mKeyStore.removeEntryFromKeyStore( in uninstallCertsAndKeys()
310 if (!mKeyStore.removeEntryFromKeyStore( in uninstallCertsAndKeys()
318 if (!mKeyStore.removeEntryFromKeyStore( in uninstallCertsAndKeys()
DPasspointConfigUserStoreData.java75 private final WifiKeyStore mKeyStore; field in PasspointConfigUserStoreData
100 mKeyStore = keyStore; in PasspointConfigUserStoreData()
340 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.java84 private final KeyStoreProxy mKeyStore; field in PlatformKeyManager
113 mKeyStore = keyStore; in PlatformKeyManager()
155 mKeyStore.deleteEntry(getEncryptAlias(userId, generationId)); in invalidatePlatformKey()
156 mKeyStore.deleteEntry(getDecryptAlias(userId, generationId)); in invalidatePlatformKey()
247 AndroidKeyStoreSecretKey key = (AndroidKeyStoreSecretKey) mKeyStore.getKey( in getEncryptKeyInternal()
301 AndroidKeyStoreSecretKey key = (AndroidKeyStoreSecretKey) mKeyStore.getKey( in getDecryptKeyInternal()
413 return mKeyStore.containsAlias(getEncryptAlias(userId, generationId)) in isKeyLoaded()
414 && mKeyStore.containsAlias(getDecryptAlias(userId, generationId)); in isKeyLoaded()
448 mKeyStore.setEntry( in generateAndLoadKey()
459 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()
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.java153 private KeyStore mKeyStore; field in AndroidKeyStoreKeyPairGeneratorSpi
354 mKeyStore = KeyStore.getInstance(); in initialize()
378 mKeyStore = null; in resetAll()
446 if (mKeyStore == null || mSpec == null) { in generateKeyPair()
452 && (mKeyStore.state() != KeyStore.State.UNLOCKED)) { in generateKeyPair()
466 Credentials.deleteAllTypesForAlias(mKeyStore, mEntryAlias, mEntryUid); in generateKeyPair()
486 Credentials.deleteAllTypesForAlias(mKeyStore, mEntryAlias, mEntryUid); in generateKeyPair()
507 int errorCode = mKeyStore.generateKey(privateKeyAlias, args, additionalEntropy, in generateKeystoreKeyPair()
522 mKeyStore, privateKeyAlias, mEntryUid); in loadKeystoreKeyPair()
580 int insertErrorCode = mKeyStore.insert( in storeCertificate()
[all …]
DKeyStoreCryptoOperationChunkedStreamer.java323 private final KeyStore mKeyStore; field in KeyStoreCryptoOperationChunkedStreamer.MainDataStream
327 mKeyStore = keyStore; in MainDataStream()
333 return mKeyStore.update(mOperationToken, null, input); in update()
338 return mKeyStore.finish(mOperationToken, null, signature, additionalEntropy); in finish()
DAndroidKeyStoreKeyGeneratorSpi.java106 private final KeyStore mKeyStore = KeyStore.getInstance(); field in AndroidKeyStoreKeyGeneratorSpi
319 Credentials.deleteAllTypesForAlias(mKeyStore, spec.getKeystoreAlias(), spec.getUid()); in engineGenerateKey()
320 int errorCode = mKeyStore.generateKey( in engineGenerateKey()
349 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()
DAndroidKeyStoreSecretKeyFactorySpi.java45 private final KeyStore mKeyStore = KeyStore.getInstance(); field in AndroidKeyStoreSecretKeyFactorySpi
76 return getKeyInfo(mKeyStore, entryAlias, keyAliasInKeystore, keystoreKey.getUid()); in engineGetKeySpec()
/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.java72 @Mock WifiKeyStore mKeyStore; field in PasspointConfigUserStoreDataTest
81 mConfigStoreData = new PasspointConfigUserStoreData(mKeyStore, mSimAccessor, mDataSource); in setUp()
245 mKeyStore, mSimAccessor, TEST_PROVIDER_ID, TEST_CREATOR_UID, TEST_CREATOR_PACKAGE, in serializeAndDeserializeUserStoreData()
249 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
279 int responseCode = mKeyStore.presentConfirmationPrompt( in presentPrompt()
313 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