Home
last modified time | relevance | path

Searched refs:Credentials (Results 1 – 25 of 32) sorted by relevance

12

/frameworks/base/keystore/java/android/security/keystore/
DAndroidKeyStoreSpi.java19 import android.security.Credentials;
97 String userKeyAlias = Credentials.USER_PRIVATE_KEY + alias; in engineGetKey()
101 userKeyAlias = Credentials.USER_SECRET_KEY + alias; 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()
201 String privateKeyAlias = Credentials.USER_PRIVATE_KEY + alias; in getCertificateForPrivateKeyEntry()
268 Date d = getModificationDate(Credentials.USER_PRIVATE_KEY + alias); in engineGetCreationDate()
273 d = getModificationDate(Credentials.USER_SECRET_KEY + alias); in engineGetCreationDate()
278 d = getModificationDate(Credentials.USER_CERTIFICATE + alias); in engineGetCreationDate()
[all …]
DAndroidKeyStoreSecretKeyFactorySpi.java19 import android.security.Credentials;
67 if (keyAliasInKeystore.startsWith(Credentials.USER_PRIVATE_KEY)) { in engineGetKeySpec()
68 entryAlias = keyAliasInKeystore.substring(Credentials.USER_PRIVATE_KEY.length()); in engineGetKeySpec()
69 } else if (keyAliasInKeystore.startsWith(Credentials.USER_SECRET_KEY)){ in engineGetKeySpec()
71 entryAlias = keyAliasInKeystore.substring(Credentials.USER_SECRET_KEY.length()); in engineGetKeySpec()
DAndroidKeyStoreKeyFactorySpi.java19 import android.security.Credentials;
68 if (keyAliasInKeystore.startsWith(Credentials.USER_PRIVATE_KEY)) { in engineGetKeySpec()
69 entryAlias = keyAliasInKeystore.substring(Credentials.USER_PRIVATE_KEY.length()); in engineGetKeySpec()
DAndroidKeyStoreKeyGeneratorSpi.java19 import android.security.Credentials;
311 String keyAliasInKeystore = Credentials.USER_PRIVATE_KEY + spec.getKeystoreAlias(); in engineGenerateKey()
315 Credentials.deleteAllTypesForAlias(mKeyStore, spec.getKeystoreAlias(), spec.getUid()); in engineGenerateKey()
344 Credentials.deleteAllTypesForAlias( in engineGenerateKey()
DAndroidKeyStoreKeyPairGeneratorSpi.java21 import android.security.Credentials;
465 Credentials.deleteAllTypesForAlias(mKeyStore, mEntryAlias, mEntryUid); in generateKeyPair()
466 final String privateKeyAlias = Credentials.USER_PRIVATE_KEY + mEntryAlias; in generateKeyPair()
485 Credentials.deleteAllTypesForAlias(mKeyStore, mEntryAlias, mEntryUid); in generateKeyPair()
575 Credentials.USER_CERTIFICATE, iter.next(), flags, "Failed to store certificate"); in storeCertificateChain()
587 storeCertificate(Credentials.CA_CERTIFICATE, certificateConcatenationStream.toByteArray(), in storeCertificateChain()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiKeyStore.java22 import android.security.Credentials;
89 String privKeyName = Credentials.USER_PRIVATE_KEY + name; in installKeys()
90 String userCertName = Credentials.USER_CERTIFICATE + name; in installKeys()
130 ret = putCertInKeyStore(Credentials.CA_CERTIFICATE + alias, caCertificates[i]); 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()
185 byte[] certData = Credentials.convertToPem(certs); in putCertsInKeyStore()
234 mKeyStore.delete(Credentials.USER_PRIVATE_KEY + client, Process.WIFI_UID); in removeKeys()
235 mKeyStore.delete(Credentials.USER_CERTIFICATE + client, Process.WIFI_UID); in removeKeys()
249 mKeyStore.delete(Credentials.CA_CERTIFICATE + ca, Process.WIFI_UID); in removeKeys()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiKeyStoreTest.java34 import android.security.Credentials;
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()
137 verify(mKeyStore).delete(Credentials.CA_CERTIFICATE + USER_CA_CERT_ALIAS[0], in testRemoveKeysForMixedInstalledCerts2()
139 verify(mKeyStore).delete(Credentials.CA_CERTIFICATE + USER_CA_CERT_ALIAS[1], in testRemoveKeysForMixedInstalledCerts2()
/frameworks/base/keystore/java/android/security/
DCredentials.java44 public class Credentials { class
217 return keystore.delete(Credentials.USER_CERTIFICATE + alias, uid) in deleteCertificateTypesForAlias()
218 & keystore.delete(Credentials.CA_CERTIFICATE + alias, uid); in deleteCertificateTypesForAlias()
234 int ret = keystore.delete2(Credentials.USER_PRIVATE_KEY + alias, uid); in deleteUserKeyTypeForAlias()
236 return keystore.delete(Credentials.USER_SECRET_KEY + alias, uid); in deleteUserKeyTypeForAlias()
246 return keystore.delete(Credentials.USER_SECRET_KEY + alias, uid); in deleteLegacyKeyForAlias()
/frameworks/base/core/java/android/net/
DCredentials.java23 public class Credentials { class
31 public Credentials (int pid, int uid, int gid) { in Credentials() method in Credentials
DLocalSocketImpl.java173 private native Credentials getPeerCredentials_native( in getPeerCredentials_native()
556 public Credentials getPeerCredentials() throws IOException { in getPeerCredentials()
DIkev2VpnProfile.java31 import android.security.Credentials;
558 return new String(Credentials.convertToPem(cert), StandardCharsets.US_ASCII); in certificateToPemString()
575 Credentials.convertFromPem(certStr.getBytes(StandardCharsets.US_ASCII)); in certificateFromPemString()
DLocalSocket.java330 public Credentials getPeerCredentials() throws IOException { in getPeerCredentials()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/
DPasspointProvider.java28 import android.security.Credentials;
220 if (!mKeyStore.putCertInKeyStore(Credentials.CA_CERTIFICATE + alias, in installCertsAndKeys()
233 String keyName = Credentials.USER_PRIVATE_KEY + ALIAS_HS_TYPE + mProviderId; in installCertsAndKeys()
253 String certName = Credentials.USER_CERTIFICATE + ALIAS_HS_TYPE + mProviderId; in installCertsAndKeys()
271 String certName = Credentials.CA_CERTIFICATE + mRemediationCaCertificateAlias; in installCertsAndKeys()
297 Credentials.CA_CERTIFICATE + certificateAlias)) { in uninstallCertsAndKeys()
305 Credentials.USER_PRIVATE_KEY + mClientPrivateKeyAlias)) { in uninstallCertsAndKeys()
312 Credentials.USER_CERTIFICATE + mClientCertificateAlias)) { in uninstallCertsAndKeys()
320 Credentials.CA_CERTIFICATE + mRemediationCaCertificateAlias)) { in uninstallCertsAndKeys()
/frameworks/base/wifi/tests/src/android/net/wifi/
DWifiEnterpriseConfigTest.java30 import android.security.Credentials;
47 public static final String CA_CERT_PREFIX = KEYSTORE_URI + Credentials.CA_CERTIFICATE;
177 WifiEnterpriseConfig.encodeCaCertificateAlias(Credentials.CA_CERTIFICATE + alias0), in testSaveMultipleCaCertificates()
178 … WifiEnterpriseConfig.encodeCaCertificateAlias(Credentials.CA_CERTIFICATE + alias1))); in testSaveMultipleCaCertificates()
187 WifiEnterpriseConfig.encodeCaCertificateAlias(Credentials.CA_CERTIFICATE + alias0), in testLoadMultipleCaCertificates()
188 … WifiEnterpriseConfig.encodeCaCertificateAlias(Credentials.CA_CERTIFICATE + alias1))); in testLoadMultipleCaCertificates()
/frameworks/base/wifi/java/android/net/wifi/
DWifiEnterpriseConfig.java22 import android.security.Credentials;
92 public static final String CA_CERT_PREFIX = KEYSTORE_URI + Credentials.CA_CERTIFICATE;
94 public static final String CLIENT_CERT_PREFIX = KEYSTORE_URI + Credentials.USER_CERTIFICATE;
607 sb.append(encodeCaCertificateAlias(Credentials.CA_CERTIFICATE + aliases[i])); in setCaCertificateAliases()
639 if (aliases[i].startsWith(Credentials.CA_CERTIFICATE)) { in getCaCertificateAliases()
640 aliases[i] = aliases[i].substring(Credentials.CA_CERTIFICATE.length()); in getCaCertificateAliases()
774 setFieldValue(PRIVATE_KEY_ID_KEY, alias, Credentials.USER_PRIVATE_KEY); in setClientCertificateAlias()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/
DApplicationKeyStorage.java23 import android.security.Credentials;
74 String keystoreAlias = Credentials.USER_PRIVATE_KEY + getInternalAlias(userId, uid, alias); in getGrantAlias()
/frameworks/base/core/java/com/android/internal/os/
DZygote.java24 import android.net.Credentials;
572 Credentials peerCredentials = null; in usapMain()
794 protected static void applyUidSecurityPolicy(ZygoteArguments args, Credentials peer) in applyUidSecurityPolicy()
849 protected static void applyInvokeWithSecurityPolicy(ZygoteArguments args, Credentials peer) in applyInvokeWithSecurityPolicy()
DZygoteConnection.java28 import android.net.Credentials;
72 private final Credentials peer;
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DCertificateMonitor.java37 import android.security.Credentials;
84 pemCert = Credentials.convertToPem(cert); in installCaCert()
/frameworks/base/services/core/java/com/android/server/net/
DLockdownVpnTracker.java38 import android.security.Credentials;
85 return KeyStore.getInstance().contains(Credentials.LOCKDOWN_VPN); in isEnabled()
/frameworks/base/core/tests/coretests/src/android/net/
DLocalSocketTest.java64 Credentials c = ls1.getPeerCredentials(); in testBasic()
/frameworks/base/services/core/java/com/android/server/connectivity/
DVpn.java95 import android.security.Credentials;
1940 privateKey = Credentials.USER_PRIVATE_KEY + profile.ipsecUserCert;
1941 byte[] value = keyStore.get(Credentials.USER_CERTIFICATE + profile.ipsecUserCert);
1945 byte[] value = keyStore.get(Credentials.CA_CERTIFICATE + profile.ipsecCaCert);
1949 byte[] value = keyStore.get(Credentials.USER_CERTIFICATE + profile.ipsecServerCert);
2868 return Credentials.PLATFORM_VPN + mUserHandle + "_" + packageName;
/frameworks/base/core/java/android/app/admin/
DDevicePolicyManager.java76 import android.security.Credentials;
4861 final byte[] pemCert = Credentials.convertToPem(certs[0]); in installKeyPair()
4864 pemChain = Credentials.convertToPem(Arrays.copyOfRange(certs, 1, certs.length)); in installKeyPair()
5040 final byte[] pemCert = Credentials.convertToPem(certs.get(0)); in setKeyPairCertificate()
5043 pemChain = Credentials.convertToPem( in setKeyPairCertificate()
/frameworks/base/tests/net/java/com/android/server/connectivity/
DVpnTest.java83 import android.security.Credentials;
696 final String expected = Credentials.PLATFORM_VPN + primaryUser.id + "_" + TEST_VPN_PKG; in testGetProfileNameForPackage()
/frameworks/base/services/core/java/com/android/server/pm/permission/
DDefaultPermissionGrantPolicy.java57 import android.security.Credentials;
491 getDefaultSystemHandlerActivityPackage(Credentials.INSTALL_ACTION, userId), userId, in grantDefaultSystemHandlerPermissions()

12