Home
last modified time | relevance | path

Searched refs:KeyStore (Results 1 – 25 of 28) sorted by relevance

12

/frameworks/base/keystore/tests/src/android/security/
DKeyStoreTest.java21 import android.security.KeyStore;
64 private KeyStore mKeyStore = null;
119 mKeyStore = KeyStore.getInstance(); in setUp()
120 if (mKeyStore.state() != KeyStore.State.UNINITIALIZED) { in setUp()
124 KeyStore.State.UNINITIALIZED, mKeyStore.state()); in setUp()
135 assertEquals(KeyStore.State.UNINITIALIZED, mKeyStore.state()); in testState()
140 assertEquals(KeyStore.State.UNLOCKED, mKeyStore.state()); in testPassword()
147 assertTrue(mKeyStore.put(TEST_KEYNAME, TEST_KEYVALUE, KeyStore.UID_SELF, in testGet()
148 KeyStore.FLAG_ENCRYPTED)); in testGet()
154 assertFalse(mKeyStore.put(TEST_KEYNAME, TEST_KEYVALUE, KeyStore.UID_SELF, in testPut()
[all …]
DAndroidKeyStoreTest.java34 import java.security.KeyStore.Entry;
35 import java.security.KeyStore.PrivateKeyEntry;
36 import java.security.KeyStore.TrustedCertificateEntry;
66 private android.security.KeyStore mAndroidKeyStore;
68 private java.security.KeyStore mKeyStore;
1095 mAndroidKeyStore = android.security.KeyStore.getInstance(); in setUp()
1100 mKeyStore = java.security.KeyStore.getInstance("AndroidKeyStore"); in setUp()
1136 KeyStore.UID_SELF, NativeCrypto.EVP_PKEY_RSA, 1024, KeyStore.FLAG_ENCRYPTED, in testKeyStore_Aliases_Encrypted_Success()
1142 KeyStore.UID_SELF, KeyStore.FLAG_ENCRYPTED)); in testKeyStore_Aliases_Encrypted_Success()
1165 KeyStore.UID_SELF, NativeCrypto.EVP_PKEY_RSA, 1024, KeyStore.FLAG_ENCRYPTED, in testKeyStore_ContainsAliases_PrivateAndCA_Encrypted_Success()
[all …]
DKeyPairGeneratorSpecTest.java87 assertEquals("encryption flag should be on", KeyStore.FLAG_ENCRYPTED, spec.getFlags()); in testBuilder_Success()
DAndroidKeyPairGeneratorTest.java43 private android.security.KeyStore mAndroidKeyStore;
69 mAndroidKeyStore = android.security.KeyStore.getInstance(); in setUp()
/frameworks/base/keystore/java/android/security/
DKeyStoreParameter.java22 import java.security.KeyStore.ProtectionParameter;
63 return (mFlags & KeyStore.FLAG_ENCRYPTED) != 0; in isEncryptionRequired()
108 mFlags |= KeyStore.FLAG_ENCRYPTED; in setEncryptionRequired()
110 mFlags &= ~KeyStore.FLAG_ENCRYPTED; in setEncryptionRequired()
DAndroidKeyPairGenerator.java56 private android.security.KeyStore mKeyStore;
82 if (((mSpec.getFlags() & KeyStore.FLAG_ENCRYPTED) != 0) in generateKeyPair()
83 && (mKeyStore.state() != KeyStore.State.UNLOCKED)) { in generateKeyPair()
93 final int keyType = KeyStore.getKeyTypeForAlgorithm(mSpec.getKeyType()); in generateKeyPair()
97 if (!mKeyStore.generate(privateKeyAlias, KeyStore.UID_SELF, keyType, in generateKeyPair()
147 if (!mKeyStore.put(Credentials.USER_CERTIFICATE + alias, certBytes, KeyStore.UID_SELF, in generateKeyPair()
206 mKeyStore = android.security.KeyStore.getInstance(); in initialize()
DAndroidKeyStore.java30 import java.security.KeyStore.Entry;
31 import java.security.KeyStore.PrivateKeyEntry;
32 import java.security.KeyStore.ProtectionParameter;
33 import java.security.KeyStore;
75 private android.security.KeyStore mKeyStore;
328 android.security.KeyStore.UID_SELF, flags)) { in setPrivateKeyEntry()
332 android.security.KeyStore.UID_SELF, flags)) { in setPrivateKeyEntry()
337 android.security.KeyStore.UID_SELF, flags)) { in setPrivateKeyEntry()
368 android.security.KeyStore.UID_SELF, android.security.KeyStore.FLAG_NONE)) { in engineSetCertificateEntry()
527 mKeyStore = android.security.KeyStore.getInstance(); in engineLoad()
[all …]
DKeyPairGeneratorSpec.java148 final int keyTypeInt = KeyStore.getKeyTypeForAlgorithm(keyType); in KeyPairGeneratorSpec()
302 return (mFlags & KeyStore.FLAG_ENCRYPTED) != 0; in isEncryptionRequired()
381 KeyStore.getKeyTypeForAlgorithm(keyType); in setKeyType()
471 mFlags |= KeyStore.FLAG_ENCRYPTED; in setEncryptionRequired()
DKeyStore.java32 public class KeyStore { class
61 private KeyStore(IKeystoreService binder) { in KeyStore() method in KeyStore
65 public static KeyStore getInstance() { in getInstance()
68 return new KeyStore(keystore); in getInstance()
DCredentials.java216 static boolean deleteAllTypesForAlias(KeyStore keystore, String alias) { in deleteAllTypesForAlias()
230 static boolean deleteCertificateTypesForAlias(KeyStore keystore, String alias) { in deleteCertificateTypesForAlias()
DKeyChain.java397 return KeyStore.getInstance().isHardwareBacked(algorithm); in isBoundKeyAlgorithm()
/frameworks/base/core/tests/coretests/src/android/net/http/
DX509TrustManagerExtensionsTest.java19 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/base/docs/html/training/articles/
Dkeystore.jd61 To use this feature, you use the standard {@link java.security.KeyStore}
66 java.security.KeyStore} type for use with the {@link
67 java.security.KeyStore#getInstance(String) KeyStore.getInstance(type)}
87 all the standard {@link java.security.KeyStore} APIs.</p>
92 java.security.KeyStore#aliases()} method:</p>
99 java.security.KeyStore.Entry} from the keystore and using the
Dsecurity-ssl.jd174 an {@link java.io.InputStream}, uses it to create a {@link java.security.KeyStore},
178 and&mdash;by creating one from a {@link java.security.KeyStore} with one or more CAs&mdash;those
205 // Create a KeyStore containing our trusted CAs
206 String keyStoreType = KeyStore.getDefaultType();
207 KeyStore keyStore = KeyStore.getInstance(keyStoreType);
211 // Create a TrustManager that trusts the CAs in our KeyStore
Dsecurity-tips.jd85 application. For example, a key can be placed in a {@link java.security.KeyStore}
486 {@link java.security.KeyStore} for storage.</p>
517 {@link java.security.KeyStore} that
/frameworks/base/services/core/java/com/android/server/
DLockSettingsService.java44 import android.security.KeyStore;
105 final KeyStore ks = KeyStore.getInstance();
270 final KeyStore ks = KeyStore.getInstance(); in maybeUpdateKeystore()
399 final KeyStore ks = KeyStore.getInstance(); in removeUser()
DConnectivityService.java90 import android.security.KeyStore;
200 private KeyStore mKeyStore;
636 mKeyStore = KeyStore.getInstance(); in ConnectivityService()
/frameworks/base/core/java/android/net/http/
DCertificateChainValidator.java28 import java.security.KeyStore;
82 tmf.init((KeyStore) null); in CertificateChainValidator()
177 tmf.init((KeyStore) null); in handleTrustStorageUpdate()
/frameworks/base/tests/CoreTests/android/core/
DSSLSocketTest.java35 import java.security.KeyStore;
322 KeyStore ks = KeyStore.getInstance("BKS"); in testDefaultAlgorithms()
328 assertEquals("BKS", KeyStore.getDefaultType()); in testDefaultAlgorithms()
771 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in getKeyManagers()
/frameworks/base/services/core/java/com/android/server/net/
DLockdownVpnTracker.java37 import android.security.KeyStore;
88 return KeyStore.getInstance().contains(Credentials.LOCKDOWN_VPN); in isEnabled()
168 mVpn.startLegacyVpnPrivileged(mProfile, KeyStore.getInstance(), egressProp); in handleStateChangedLocked()
/frameworks/base/services/core/java/com/android/server/connectivity/
DVpn.java71 import android.security.KeyStore;
854 public void startLegacyVpn(VpnProfile profile, KeyStore keyStore, LinkProperties egress) { in startLegacyVpn()
870 public void startLegacyVpnPrivileged(VpnProfile profile, KeyStore keyStore, in startLegacyVpnPrivileged()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiConfigStore.java50 import android.security.KeyStore;
452 private final KeyStore mKeyStore = KeyStore.getInstance();
2835 if (mKeyStore.state() != KeyStore.State.UNLOCKED) { in addOrUpdateNetworkNative()
4116 KeyStore.FLAG_NONE); in installKeys()
4124 KeyStore.FLAG_ENCRYPTED); in installKeys()
4168 return mKeyStore.put(name, certData, Process.WIFI_UID, KeyStore.FLAG_NONE); in putCertInKeyStore()
/frameworks/base/docs/html/about/versions/
Dandroid-4.3.jd96 <li><a href="#KeyStore">Android key store for app-private keys</a></li>
1077 <h3 id="KeyStore">Android key store for app-private keys</h3>
1079 <p>Android now offers a custom Java Security Provider in the {@link java.security.KeyStore}
1082 {@code "AndroidKeyStore"} to {@link java.security.KeyStore#getInstance(String)
1083 KeyStore.getInstance()}.</p>
/frameworks/base/api/
Dsystem-current.txt28492 public final class KeyStoreParameter implements java.security.KeyStore.ProtectionParameter {
47104 public class KeyStore {
47105 ctor protected KeyStore(java.security.KeyStoreSpi, java.security.Provider, java.lang.String);
47109 …tryInstanceOf(java.lang.String, java.lang.Class<? extends java.security.KeyStore.Entry>) throws ja…
47115 …method public final java.security.KeyStore.Entry getEntry(java.lang.String, java.security.KeyStore
47116 …method public static java.security.KeyStore getInstance(java.lang.String) throws java.security.Key…
47117 …method public static java.security.KeyStore getInstance(java.lang.String, java.lang.String) throws…
47118 …method public static java.security.KeyStore getInstance(java.lang.String, java.security.Provider) …
47125 …method public final void load(java.security.KeyStore.LoadStoreParameter) throws java.security.cert…
47127 …blic final void setEntry(java.lang.String, java.security.KeyStore.Entry, java.security.KeyStore.Pr…
[all …]
Dcurrent.txt26900 public final class KeyStoreParameter implements java.security.KeyStore.ProtectionParameter {
44575 public class KeyStore {
44576 ctor protected KeyStore(java.security.KeyStoreSpi, java.security.Provider, java.lang.String);
44580 …tryInstanceOf(java.lang.String, java.lang.Class<? extends java.security.KeyStore.Entry>) throws ja…
44586 …method public final java.security.KeyStore.Entry getEntry(java.lang.String, java.security.KeyStore
44587 …method public static java.security.KeyStore getInstance(java.lang.String) throws java.security.Key…
44588 …method public static java.security.KeyStore getInstance(java.lang.String, java.lang.String) throws…
44589 …method public static java.security.KeyStore getInstance(java.lang.String, java.security.Provider) …
44596 …method public final void load(java.security.KeyStore.LoadStoreParameter) throws java.security.cert…
44598 …blic final void setEntry(java.lang.String, java.security.KeyStore.Entry, java.security.KeyStore.Pr…
[all …]

12