/frameworks/base/keystore/tests/src/android/security/keystore/ |
D | AndroidKeyStoreTest.java | 24 import android.security.KeyStore; 35 import java.security.KeyStore.Entry; 36 import java.security.KeyStore.PrivateKeyEntry; 37 import java.security.KeyStore.TrustedCertificateEntry; 61 private android.security.KeyStore mAndroidKeyStore; 63 private java.security.KeyStore mKeyStore; 728 mAndroidKeyStore = android.security.KeyStore.getInstance(); in setUp() 733 mKeyStore = java.security.KeyStore.getInstance("AndroidKeyStore"); in setUp() 769 KeyStore.UID_SELF, NativeConstants.EVP_PKEY_RSA, 1024, KeyStore.FLAG_ENCRYPTED, in testKeyStore_Aliases_Encrypted_Success() 775 KeyStore.UID_SELF, KeyStore.FLAG_ENCRYPTED)); in testKeyStore_Aliases_Encrypted_Success() [all …]
|
/frameworks/base/keystore/tests/src/android/security/ |
D | KeyStoreTest.java | 72 private KeyStore mKeyStore = null; 129 mKeyStore = KeyStore.getInstance(); in setUp() 130 if (mKeyStore.state() != KeyStore.State.UNINITIALIZED) { in setUp() 134 KeyStore.State.UNINITIALIZED, mKeyStore.state()); in setUp() 145 assertEquals(KeyStore.State.UNINITIALIZED, mKeyStore.state()); in testState() 150 assertEquals(KeyStore.State.UNLOCKED, mKeyStore.state()); in testPassword() 157 assertTrue(mKeyStore.put(TEST_KEYNAME, TEST_KEYVALUE, KeyStore.UID_SELF, in testGet() 158 KeyStore.FLAG_ENCRYPTED)); in testGet() 164 assertFalse(mKeyStore.put(TEST_KEYNAME, TEST_KEYVALUE, KeyStore.UID_SELF, in testPut() 165 KeyStore.FLAG_ENCRYPTED)); in testPut() [all …]
|
/frameworks/base/keystore/java/android/security/keystore/ |
D | AndroidKeyStoreProvider.java | 20 import android.security.KeyStore; 216 @NonNull KeyStore keyStore, @NonNull String privateKeyAlias, int uid) in loadAndroidKeyStorePublicKeyFromKeystore() 221 if (errorCode != KeyStore.NO_ERROR) { in loadAndroidKeyStorePublicKeyFromKeystore() 224 .initCause(KeyStore.getKeyStoreException(errorCode)); in loadAndroidKeyStorePublicKeyFromKeystore() 228 if (exportResult.resultCode != KeyStore.NO_ERROR) { in loadAndroidKeyStorePublicKeyFromKeystore() 231 .initCause(KeyStore.getKeyStoreException(errorCode)); in loadAndroidKeyStorePublicKeyFromKeystore() 256 @NonNull KeyStore keyStore, @NonNull String privateKeyAlias, int uid) in loadAndroidKeyStoreKeyPairFromKeystore() 267 @NonNull KeyStore keyStore, @NonNull String privateKeyAlias, int uid) in loadAndroidKeyStorePrivateKeyFromKeystore() 275 @NonNull KeyStore keyStore, @NonNull String secretKeyAlias, int uid) in loadAndroidKeyStoreSecretKeyFromKeystore() 280 if (errorCode != KeyStore.NO_ERROR) { in loadAndroidKeyStoreSecretKeyFromKeystore() [all …]
|
D | KeyStoreCryptoOperationUtils.java | 19 import android.security.KeyStore; 46 KeyStore keyStore, AndroidKeyStoreKey key, int beginOpResultCode) { in getInvalidKeyExceptionForInit() 47 if (beginOpResultCode == KeyStore.NO_ERROR) { in getInvalidKeyExceptionForInit() 56 case KeyStore.OP_AUTH_NEEDED: in getInvalidKeyExceptionForInit() 75 KeyStore keyStore, AndroidKeyStoreKey key, int beginOpResultCode) { in getExceptionForCipherInit() 76 if (beginOpResultCode == KeyStore.NO_ERROR) { in getExceptionForCipherInit()
|
D | AndroidKeyStoreSpi.java | 21 import android.security.KeyStore; 35 import java.security.KeyStore.Entry; 36 import java.security.KeyStore.LoadStoreParameter; 37 import java.security.KeyStore.PrivateKeyEntry; 38 import java.security.KeyStore.ProtectionParameter; 39 import java.security.KeyStore.SecretKeyEntry; 86 private KeyStore mKeyStore; 87 private int mUid = KeyStore.UID_SELF; 341 java.security.KeyStore.ProtectionParameter param) throws KeyStoreException { in setPrivateKeyEntry() 350 flags = KeyStore.FLAG_ENCRYPTED; in setPrivateKeyEntry() [all …]
|
D | KeyStoreCryptoOperationChunkedStreamer.java | 20 import android.security.KeyStore; 131 } else if (opResult.resultCode != KeyStore.NO_ERROR) { in update() 132 throw KeyStore.getKeyStoreException(opResult.resultCode); in update() 223 } else if (opResult.resultCode != KeyStore.NO_ERROR) { in doFinal() 224 throw KeyStore.getKeyStoreException(opResult.resultCode); in doFinal() 244 } else if (opResult.resultCode != KeyStore.NO_ERROR) { in flush() 245 throw KeyStore.getKeyStoreException(opResult.resultCode); in flush() 323 private final KeyStore mKeyStore; 326 public MainDataStream(KeyStore keyStore, IBinder operationToken) { in MainDataStream()
|
D | AndroidKeyStoreLoadStoreParameter.java | 19 import java.security.KeyStore; 20 import java.security.KeyStore.ProtectionParameter; 22 class AndroidKeyStoreLoadStoreParameter implements KeyStore.LoadStoreParameter {
|
D | AndroidKeyStoreAuthenticatedAESCipherSpi.java | 22 import android.security.KeyStore; 176 KeyStore keyStore, IBinder operationToken) { in createMainDataStreamer() 192 KeyStore keyStore, IBinder operationToken) { in createAdditionalAuthenticationDataStreamer() 405 private final KeyStore mKeyStore; 408 private AdditionalAuthenticationDataStream(KeyStore keyStore, IBinder operationToken) { in AdditionalAuthenticationDataStream() 422 if (result.resultCode == KeyStore.NO_ERROR) { in update() 440 KeyStore.NO_ERROR, in finish()
|
D | AndroidKeyStoreSecretKeyFactorySpi.java | 21 import android.security.KeyStore; 45 private final KeyStore mKeyStore = KeyStore.getInstance(); 76 static KeyInfo getKeyInfo(KeyStore keyStore, String entryAlias, String keyAliasInKeystore, in getKeyInfo() 81 if (errorCode != KeyStore.NO_ERROR) { in getKeyInfo()
|
D | AndroidKeyStoreKeyPairGeneratorSpi.java | 22 import android.security.KeyStore; 151 private KeyStore mKeyStore; 356 mKeyStore = KeyStore.getInstance(); in initialize() 367 mEntryUid = KeyStore.UID_SELF; in resetAll() 452 final int flags = (mEncryptionAtRestRequired) ? KeyStore.FLAG_ENCRYPTED : 0; in generateKeyPair() 453 if (((flags & KeyStore.FLAG_ENCRYPTED) != 0) in generateKeyPair() 454 && (mKeyStore.state() != KeyStore.State.UNLOCKED)) { in generateKeyPair() 501 if (errorCode != KeyStore.NO_ERROR) { in generateKeystoreKeyPair() 503 "Failed to generate key pair", KeyStore.getKeyStoreException(errorCode)); in generateKeystoreKeyPair() 577 if (insertErrorCode != KeyStore.NO_ERROR) { in storeCertificate() [all …]
|
D | AndroidKeyStoreSignatureSpiBase.java | 22 import android.security.KeyStore; 47 private final KeyStore mKeyStore; 72 mKeyStore = KeyStore.getInstance(); in AndroidKeyStoreSignatureSpiBase() 242 KeyStore keyStore, IBinder operationToken) { in createMainDataStreamer() 398 protected final KeyStore getKeyStore() { in getKeyStore()
|
D | AndroidKeyStoreKeyGeneratorSpi.java | 20 import android.security.KeyStore; 100 private final KeyStore mKeyStore = KeyStore.getInstance(); 312 if (errorCode != KeyStore.NO_ERROR) { in engineGenerateKey() 314 "Keystore operation failed", KeyStore.getKeyStoreException(errorCode)); in engineGenerateKey()
|
D | AndroidKeyStoreKeyFactorySpi.java | 20 import android.security.KeyStore; 41 private final KeyStore mKeyStore = KeyStore.getInstance();
|
D | AndroidKeyStoreECDSASignatureSpi.java | 21 import android.security.KeyStore; 46 protected KeyStoreCryptoOperationStreamer createMainDataStreamer(KeyStore keyStore, in createMainDataStreamer() 159 if (errorCode != KeyStore.NO_ERROR) { in initKey()
|
/frameworks/base/keystore/java/android/security/ |
D | Credentials.java | 224 public static boolean deleteAllTypesForAlias(KeyStore keystore, String alias) { in deleteAllTypesForAlias() 225 return deleteAllTypesForAlias(keystore, alias, KeyStore.UID_SELF); in deleteAllTypesForAlias() 233 public static boolean deleteAllTypesForAlias(KeyStore keystore, String alias, int uid) { in deleteAllTypesForAlias() 248 public static boolean deleteCertificateTypesForAlias(KeyStore keystore, String alias) { in deleteCertificateTypesForAlias() 249 return deleteCertificateTypesForAlias(keystore, alias, KeyStore.UID_SELF); in deleteCertificateTypesForAlias() 257 public static boolean deleteCertificateTypesForAlias(KeyStore keystore, String alias, int uid) { in deleteCertificateTypesForAlias() 270 static boolean deletePrivateKeyTypeForAlias(KeyStore keystore, String alias) { in deletePrivateKeyTypeForAlias() 271 return deletePrivateKeyTypeForAlias(keystore, alias, KeyStore.UID_SELF); in deletePrivateKeyTypeForAlias() 278 static boolean deletePrivateKeyTypeForAlias(KeyStore keystore, String alias, int uid) { in deletePrivateKeyTypeForAlias() 286 public static boolean deleteSecretKeyTypeForAlias(KeyStore keystore, String alias) { in deleteSecretKeyTypeForAlias() [all …]
|
D | KeyStoreParameter.java | 25 import java.security.KeyStore.ProtectionParameter; 79 return (mFlags & KeyStore.FLAG_ENCRYPTED) != 0; in isEncryptionRequired() 133 mFlags |= KeyStore.FLAG_ENCRYPTED; in setEncryptionRequired() 135 mFlags &= ~KeyStore.FLAG_ENCRYPTED; in setEncryptionRequired()
|
/frameworks/base/core/tests/coretests/src/android/net/http/ |
D | X509TrustManagerExtensionsTest.java | 19 import java.security.KeyStore; 53 String defaultType = KeyStore.getDefaultType(); in testGoodCast() 54 TrustManagerImpl tmi = new TrustManagerImpl(KeyStore.getInstance(defaultType)); in testGoodCast() 61 String defaultKeystoreType = KeyStore.getDefaultType(); in testNormalUseCase() 62 tmf.init(KeyStore.getInstance(defaultKeystoreType)); in testNormalUseCase()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/ |
D | WifiInjector.java | 19 import android.security.KeyStore; 41 private final KeyStore mKeyStore = KeyStore.getInstance(); 61 public KeyStore getKeyStore() { in getKeyStore()
|
/frameworks/base/core/java/org/apache/http/conn/ssl/ |
D | SSLSocketFactory.java | 52 import java.security.KeyStore; 184 final KeyStore keystore, in SSLSocketFactory() 186 final KeyStore truststore, in SSLSocketFactory() 210 final KeyStore keystore, in SSLSocketFactory() 212 final KeyStore truststore) in SSLSocketFactory() 218 public SSLSocketFactory(final KeyStore keystore, final String keystorePassword) in SSLSocketFactory() 224 public SSLSocketFactory(final KeyStore truststore) in SSLSocketFactory() 255 private static KeyManager[] createKeyManagers(final KeyStore keystore, final String password) in createKeyManagers() 266 private static TrustManager[] createTrustManagers(final KeyStore keystore) in createTrustManagers()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | MockKeyStore.java | 8 import android.security.KeyStore; 35 public KeyStore createMock() { in createMock() 36 KeyStore mock = mock(KeyStore.class); in createMock() 37 when(mock.state()).thenReturn(KeyStore.State.UNLOCKED); in createMock()
|
/frameworks/base/core/java/android/security/net/config/ |
D | KeyStoreCertificateSource.java | 20 import java.security.KeyStore; 36 private final KeyStore mKeyStore; 40 public KeyStoreCertificateSource(KeyStore ks) { in KeyStoreCertificateSource()
|
D | KeyStoreConfigSource.java | 20 import java.security.KeyStore; 31 public KeyStoreConfigSource(KeyStore ks) { in KeyStoreConfigSource()
|
D | NetworkSecurityTrustManager.java | 27 import java.security.KeyStore; 58 KeyStore store = KeyStore.getInstance(KeyStore.getDefaultType()); in NetworkSecurityTrustManager()
|
D | RootTrustManagerFactorySpi.java | 22 import java.security.KeyStore; 52 public void engineInit(KeyStore ks) throws KeyStoreException { in engineInit()
|
/frameworks/base/packages/Osu/src/com/android/hotspot2/osu/ |
D | OSUSocketFactory.java | 17 import java.security.KeyStore; 78 public static OSUSocketFactory getSocketFactory(KeyStore ks, HomeSP homeSP, int flowType, in getSocketFactory() 89 private OSUSocketFactory(KeyStore ks, HomeSP homeSP, int flowType, Network network, in OSUSocketFactory() 216 private final KeyStore mKeyStore; 221 private WFATrustManager(KeyStore ks, HomeSP homeSP, int flowType) in WFATrustManager() 287 private static X509Certificate getCert(KeyStore keyStore, String alias) in getCert() 296 public static Set<X509Certificate> getRootCerts(KeyStore keyStore) throws KeyStoreException { in getRootCerts()
|