Home
last modified time | relevance | path

Searched refs:alias (Results 1 – 25 of 171) sorted by relevance

1234567

/frameworks/base/keystore/java/android/security/
DIKeyChainService.aidl33 String requestPrivateKey(String alias); in requestPrivateKey() argument
34 byte[] getCertificate(String alias); in getCertificate() argument
35 byte[] getCaCertificates(String alias); in getCaCertificates() argument
36 boolean isUserSelectable(String alias); in isUserSelectable() argument
37 void setUserSelectable(String alias, boolean isUserSelectable); in setUserSelectable() argument
40 boolean setKeyPairCertificate(String alias, in byte[] userCert, in byte[] certChain); in setKeyPairCertificate() argument
47 in byte[] privateKey, in byte[] userCert, in byte[] certChain, String alias, int uid); in installKeyPair() argument
48 boolean removeKeyPair(String alias); in removeKeyPair() argument
49 boolean containsKeyPair(String alias); in containsKeyPair() argument
50 int[] getGrants(String alias); in getGrants() argument
[all …]
DLegacyVpnProfileStore.java54 public static boolean put(@NonNull String alias, @NonNull byte[] profile) { in put() argument
57 getService().put(alias, ILegacyKeystore.UID_SELF, profile); in put()
74 public static byte[] get(@NonNull String alias) { in get() argument
77 return getService().get(alias, ILegacyKeystore.UID_SELF); in get()
94 public static boolean remove(@NonNull String alias) { in remove() argument
97 getService().remove(alias, ILegacyKeystore.UID_SELF); in remove()
DKeyChain.java492 @Nullable String host, int port, @Nullable String alias) { in choosePrivateKeyAlias() argument
499 choosePrivateKeyAlias(activity, response, keyTypes, issuers, uri, alias); in choosePrivateKeyAlias()
547 @Nullable Uri uri, @Nullable String alias) { in choosePrivateKeyAlias() argument
575 intent.putExtra(EXTRA_ALIAS, alias); in choosePrivateKeyAlias()
716 @Override public void alias(String alias) { in alias() argument
717 keyChainAliasResponse.alias(alias); in alias()
746 public static PrivateKey getPrivateKey(@NonNull Context context, @NonNull String alias) in getPrivateKey() argument
748 KeyPair keyPair = getKeyPair(context, alias); in getPrivateKey()
768 result.alias = null; in getGrantDescriptor()
785 public static KeyPair getKeyPair(@NonNull Context context, @NonNull String alias) in getKeyPair() argument
[all …]
DIKeyChainAliasCallback.aidl25 void alias(String alias); in alias() argument
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/
DApplicationKeyStorage.java74 public @Nullable String getGrantAlias(int userId, int uid, String alias) { in getGrantAlias() argument
75 Log.i(TAG, String.format(Locale.US, "Get %d/%d/%s", userId, uid, alias)); in getGrantAlias()
76 String keystoreAlias = getInternalAlias(userId, uid, alias); in getGrantAlias()
80 public void setSymmetricKeyEntry(int userId, int uid, String alias, byte[] secretKey) in setSymmetricKeyEntry() argument
83 userId, uid, alias, secretKey.length)); in setSymmetricKeyEntry()
86 getInternalAlias(userId, uid, alias), in setSymmetricKeyEntry()
99 public void deleteEntry(int userId, int uid, String alias) { in deleteEntry() argument
100 Log.i(TAG, String.format(Locale.US, "Del %d/%d/%s", userId, uid, alias)); in deleteEntry()
102 mKeyStore.deleteEntry(getInternalAlias(userId, uid, alias)); in deleteEntry()
119 private String getInternalAlias(int userId, int uid, String alias) { in getInternalAlias() argument
[all …]
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
DKeyStoreProxyImpl.java44 public boolean containsAlias(String alias) throws KeyStoreException { in containsAlias() argument
45 return mKeyStore.containsAlias(alias); in containsAlias()
49 public Key getKey(String alias, char[] password) in getKey() argument
51 return mKeyStore.getKey(alias, password); in getKey()
55 public void setEntry(String alias, KeyStore.Entry entry, KeyStore.ProtectionParameter protParam) in setEntry() argument
57 mKeyStore.setEntry(alias, entry, protParam); in setEntry()
61 public void deleteEntry(String alias) throws KeyStoreException { in deleteEntry() argument
62 mKeyStore.deleteEntry(alias); in deleteEntry()
DKeyStoreProxy.java34 boolean containsAlias(String alias) throws KeyStoreException; in containsAlias() argument
37 Key getKey(String alias, char[] password) in getKey() argument
41 void setEntry(String alias, KeyStore.Entry entry, KeyStore.ProtectionParameter protParam) in setEntry() argument
45 void deleteEntry(String alias) throws KeyStoreException; in deleteEntry() argument
DRecoverableKeyGenerator.java98 PlatformEncryptionKey platformKey, int userId, int uid, String alias, in generateAndStoreKey() argument
105 long result = mDatabase.insertKey(userId, uid, alias, wrappedKey); in generateAndStoreKey()
110 Locale.US, "Failed writing (%d, %s) to database.", uid, alias)); in generateAndStoreKey()
143 @NonNull PlatformEncryptionKey platformKey, int userId, int uid, @NonNull String alias, in importKey() argument
149 long result = mDatabase.insertKey(userId, uid, alias, wrappedKey); in importKey()
154 Locale.US, "Failed writing (%d, %s) to database.", uid, alias)); in importKey()
DRecoverableKeyStoreManager.java429 public void setRecoveryStatus(@NonNull String alias, int status) throws RemoteException { in setRecoveryStatus() argument
431 Objects.requireNonNull(alias, "alias is null"); in setRecoveryStatus()
432 long updatedRows = mDatabase.setRecoveryStatus(Binder.getCallingUid(), alias, status); in setRecoveryStatus()
679 for (String alias : keysByAlias.keySet()) { in importKeyMaterials()
680 mApplicationKeyStorage.setSymmetricKeyEntry(userId, uid, alias, keysByAlias.get(alias)); in importKeyMaterials()
681 String grantAlias = getAlias(userId, uid, alias); in importKeyMaterials()
682 Log.i(TAG, String.format(Locale.US, "Import %s -> %s", alias, grantAlias)); in importKeyMaterials()
683 grantAliasesByAlias.put(alias, grantAlias); in importKeyMaterials()
696 private @Nullable String getAlias(int userId, int uid, String alias) { in getAlias() argument
697 return mApplicationKeyStorage.getGrantAlias(userId, uid, alias); in getAlias()
[all …]
DWrappedKey.java209 for (String alias : wrappedKeys.keySet()) { in unwrapKeys()
210 WrappedKey wrappedKey = wrappedKeys.get(alias); in unwrapKeys()
216 alias, in unwrapKeys()
234 alias), in unwrapKeys()
238 unwrappedKeys.put(alias, Pair.create(key, wrappedKey.getKeyMetadata())); in unwrapKeys()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DTestOnlyInsecureCertificateHelperTest.java82 String alias = "secureAlias"; in testKeepOnlyWhitelistedInsecureKeys_singleNonWhitelistedKey() local
83 rawKeys.put(alias, Pair.create(TestData.generateKey(), /*metadata=*/ null)); in testKeepOnlyWhitelistedInsecureKeys_singleNonWhitelistedKey()
96 String alias = TrustedRootCertificates.INSECURE_KEY_ALIAS_PREFIX; in testKeepOnlyWhitelistedInsecureKeys_singleWhitelistedKey() local
97 rawKeys.put(alias, Pair.create(TestData.generateKey(), /*metadata=*/ null)); in testKeepOnlyWhitelistedInsecureKeys_singleWhitelistedKey()
98 expectedResult.put(alias, rawKeys.get(alias)); in testKeepOnlyWhitelistedInsecureKeys_singleWhitelistedKey()
111 String alias = "SECURE_ALIAS" + TrustedRootCertificates.INSECURE_KEY_ALIAS_PREFIX; in testKeepOnlyWhitelistedInsecureKeys() local
112 rawKeys.put(alias, Pair.create(TestData.generateKey(), /*metadata=*/ null)); in testKeepOnlyWhitelistedInsecureKeys()
114 alias = TrustedRootCertificates.INSECURE_KEY_ALIAS_PREFIX + "1"; in testKeepOnlyWhitelistedInsecureKeys()
115 rawKeys.put(alias, Pair.create(TestData.generateKey(), /*metadata=*/ null)); in testKeepOnlyWhitelistedInsecureKeys()
116 expectedResult.put(alias, rawKeys.get(alias)); in testKeepOnlyWhitelistedInsecureKeys()
[all …]
DWrappedKeyTest.java118 String alias = "karlin"; in decryptWrappedKeys_decryptsWrappedKeys_nullMetadata() local
124 keysByAlias.put(alias, wrappedKey); in decryptWrappedKeys_decryptsWrappedKeys_nullMetadata()
130 assertTrue(unwrappedKeys.containsKey(alias)); in decryptWrappedKeys_decryptsWrappedKeys_nullMetadata()
131 assertArrayEquals(appKey.getEncoded(), unwrappedKeys.get(alias).first.getEncoded()); in decryptWrappedKeys_decryptsWrappedKeys_nullMetadata()
132 assertArrayEquals(null, unwrappedKeys.get(alias).second); in decryptWrappedKeys_decryptsWrappedKeys_nullMetadata()
137 String alias = "karlin"; in decryptWrappedKeys_decryptsWrappedKeys_nonNullMetadata() local
143 keysByAlias.put(alias, wrappedKey); in decryptWrappedKeys_decryptsWrappedKeys_nonNullMetadata()
149 assertTrue(unwrappedKeys.containsKey(alias)); in decryptWrappedKeys_decryptsWrappedKeys_nonNullMetadata()
150 assertArrayEquals(appKey.getEncoded(), unwrappedKeys.get(alias).first.getEncoded()); in decryptWrappedKeys_decryptsWrappedKeys_nonNullMetadata()
151 assertArrayEquals(NON_NULL_METADATA, unwrappedKeys.get(alias).second); in decryptWrappedKeys_decryptsWrappedKeys_nonNullMetadata()
[all …]
/frameworks/base/services/companion/java/com/android/server/companion/securechannel/
DKeyStoreUtils.java70 static byte[] getEncodedCertificateChain(String alias) throws GeneralSecurityException { in getEncodedCertificateChain() argument
73 Certificate[] certificateChain = ks.getCertificateChain(alias); in getEncodedCertificateChain()
88 static void generateAttestationKeyPair(String alias, byte[] attestationChallenge) in generateAttestationKeyPair() argument
91 new KeyGenParameterSpec.Builder(alias, PURPOSE_SIGN | PURPOSE_VERIFY) in generateAttestationKeyPair()
109 static boolean aliasExists(String alias) { in aliasExists() argument
112 return ks.containsAlias(alias); in aliasExists()
119 static void cleanUp(String alias) { in cleanUp() argument
123 if (ks.containsAlias(alias)) { in cleanUp()
124 ks.deleteEntry(alias); in cleanUp()
/frameworks/base/services/core/java/com/android/server/connectivity/
DVpnProfileStore.java38 public boolean put(@NonNull String alias, @NonNull byte[] profile) { in put() argument
39 return LegacyVpnProfileStore.put(alias, profile); in put()
52 public byte[] get(@NonNull String alias) { in get() argument
53 return LegacyVpnProfileStore.get(alias); in get()
63 public boolean remove(@NonNull String alias) { in remove() argument
64 return LegacyVpnProfileStore.remove(alias); in remove()
/frameworks/base/wifi/java/src/android/net/wifi/
DWifiKeystore.java54 public static boolean put(@NonNull String alias, @NonNull byte[] blob) { in put() argument
60 Log.i(TAG, "put blob. alias " + alias); in put()
61 return WifiBlobStore.getInstance().put(alias, blob); in put()
80 public static @NonNull byte[] get(@NonNull String alias) { in get() argument
83 Log.i(TAG, "get blob. alias " + alias); in get()
84 byte[] blob = WifiBlobStore.getInstance().get(alias); in get()
89 return WifiBlobStore.getLegacyKeystore().get(alias, Process.WIFI_UID); in get()
110 public static boolean remove(@NonNull String alias) { in remove() argument
115 Log.i(TAG, "remove blob. alias " + alias); in remove()
116 blobStoreSuccess = WifiBlobStore.getInstance().remove(alias); in remove()
[all …]
/frameworks/base/keystore/java/android/security/keystore2/
DAndroidKeyStoreSpi.java120 public Key engineGetKey(String alias, char[] password) throws NoSuchAlgorithmException, in engineGetKey() argument
124 alias, in engineGetKey()
147 private KeyDescriptor makeKeyDescriptor(@NonNull String alias) { in makeKeyDescriptor() argument
151 descriptor.alias = alias; in makeKeyDescriptor()
161 private KeyEntryResponse getKeyMetadata(String alias) { in getKeyMetadata() argument
162 if (alias == null) { in getKeyMetadata()
166 KeyDescriptor descriptor = makeKeyDescriptor(alias); in getKeyMetadata()
180 public Certificate[] engineGetCertificateChain(String alias) { in engineGetCertificateChain() argument
181 KeyEntryResponse response = getKeyMetadata(alias); in engineGetCertificateChain()
216 public Certificate engineGetCertificate(String alias) { in engineGetCertificate() argument
[all …]
/frameworks/base/core/java/com/android/internal/pm/pkg/component/
DParsedActivityImpl.java167 ParsedActivityImpl alias = new ParsedActivityImpl(); in makeAlias() local
168 alias.setPackageName(target.getPackageName()); in makeAlias()
169 alias.setTargetActivity(targetActivityName); in makeAlias()
170 alias.configChanges = target.getConfigChanges(); in makeAlias()
171 alias.setFlags(target.getFlags()); in makeAlias()
172 alias.privateFlags = target.getPrivateFlags(); in makeAlias()
173 alias.setIcon(target.getIcon()); in makeAlias()
174 alias.setLogo(target.getLogo()); in makeAlias()
175 alias.setBanner(target.getBanner()); in makeAlias()
176 alias.setLabelRes(target.getLabelRes()); in makeAlias()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DPackageKeySetData.java55 protected void addUpgradeKeySet(String alias) { in addUpgradeKeySet() argument
56 if (alias == null) { in addUpgradeKeySet()
61 Long ks = mKeySetAliases.get(alias); in addUpgradeKeySet()
65 throw new IllegalArgumentException("Upgrade keyset alias " + alias in addUpgradeKeySet()
104 protected void addDefinedKeySet(long ks, String alias) { in addDefinedKeySet() argument
105 mKeySetAliases.put(alias, ks); in addDefinedKeySet()
/frameworks/base/core/java/android/security/keystore/recovery/
DRecoveryController.java455 public void setRecoveryStatus(@NonNull String alias, int status) in setRecoveryStatus() argument
458 mBinder.setRecoveryStatus(alias, status); in setRecoveryStatus()
480 public int getRecoveryStatus(@NonNull String alias) throws InternalRecoveryServiceException { in getRecoveryStatus() argument
483 Integer status = allStatuses.get(alias); in getRecoveryStatus()
550 public @NonNull Key generateKey(@NonNull String alias) throws InternalRecoveryServiceException, in generateKey() argument
553 String grantAlias = mBinder.generateKey(alias); in generateKey()
591 public @NonNull Key generateKey(@NonNull String alias, @Nullable byte[] metadata) in generateKey() argument
594 String grantAlias = mBinder.generateKeyWithMetadata(alias, metadata); in generateKey()
624 public @NonNull Key importKey(@NonNull String alias, @NonNull byte[] keyBytes) in importKey() argument
627 String grantAlias = mBinder.importKey(alias, keyBytes); in importKey()
[all …]
DWrappedApplicationKey.java75 public @NonNull Builder setAlias(@NonNull String alias) { in setAlias() argument
76 mInstance.mAlias = alias; in setAlias()
122 public WrappedApplicationKey(@NonNull String alias, @NonNull byte[] encryptedKeyMaterial) { in WrappedApplicationKey() argument
123 mAlias = Objects.requireNonNull(alias); in WrappedApplicationKey()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/
DRecoverableKeyStoreDbTest.java83 String alias = "test-alias"; in insertKey_replacesOldKey() local
90 mRecoverableKeyStoreDb.insertKey(userId, uid, alias, wrappedKey); in insertKey_replacesOldKey()
92 WrappedKey retrievedKey = mRecoverableKeyStoreDb.getKey(uid, alias); in insertKey_replacesOldKey()
103 mRecoverableKeyStoreDb.insertKey(userId, uid, alias, wrappedKey); in insertKey_replacesOldKey()
105 retrievedKey = mRecoverableKeyStoreDb.getKey(uid, alias); in insertKey_replacesOldKey()
115 String alias = "pcoulton"; in insertKey_allowsTwoUidsToHaveSameAlias() local
127 mRecoverableKeyStoreDb.insertKey(userId, /*uid=*/ 1, alias, key1); in insertKey_allowsTwoUidsToHaveSameAlias()
128 mRecoverableKeyStoreDb.insertKey(userId, /*uid=*/ 2, alias, key2); in insertKey_allowsTwoUidsToHaveSameAlias()
132 mRecoverableKeyStoreDb.getKey(1, alias).getNonce()); in insertKey_allowsTwoUidsToHaveSameAlias()
135 mRecoverableKeyStoreDb.getKey(2, alias).getNonce()); in insertKey_allowsTwoUidsToHaveSameAlias()
[all …]
/frameworks/ex/common/java/com/android/common/content/
DProjectionMap.java37 public Builder add(String alias, String expression) { in add() argument
38 mMap.putColumn(alias, expression + " AS " + alias); in add()
79 private void putColumn(String alias, String column) { in putColumn() argument
80 super.put(alias, column); in putColumn()
/frameworks/base/core/java/com/android/internal/widget/
DILockSettings.aidl80 String generateKey(String alias); in generateKey() argument
81 String generateKeyWithMetadata(String alias, in byte[] metadata); in generateKeyWithMetadata() argument
82 String importKey(String alias, in byte[] keyBytes); in importKey() argument
83 String importKeyWithMetadata(String alias, in byte[] keyBytes, in byte[] metadata); in importKeyWithMetadata() argument
84 String getKey(String alias); in getKey() argument
85 void removeKey(String alias); in removeKey() argument
88 void setRecoveryStatus(in String alias, int status); in setRecoveryStatus() argument
/frameworks/base/core/java/android/security/net/config/
DTrustedCertificateStoreAdapter.java78 public Certificate getCertificate(String alias) { in getCertificate() argument
83 public Certificate getCertificate(String alias, boolean includeDeletedSystem) { in getCertificate() argument
88 public Date getCreationDate(String alias) { in getCreationDate() argument
108 public boolean containsAlias(String alias) { in containsAlias() argument
/frameworks/base/services/companion/java/com/android/server/companion/utils/
DUtils.java62 final String alias = btDevice.getAlias(); in btDeviceToString() local
63 if (alias != null) { in btDeviceToString()
64 sb.append(", alias='").append(alias).append("'"); in btDeviceToString()

1234567