Home
last modified time | relevance | path

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

12

/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DKeyManagementTest.java174 final String alias = "com.android.test.clientkeychain"; in testCanInstallCertChain() local
177 assertThat(mDevicePolicyManager.installKeyPair(getWho(), privKey, certChain, alias, true)) in testCanInstallCertChain() local
181 assertGranted(alias, true); in testCanInstallCertChain()
184 assertThat(KeyChain.getPrivateKey(mActivity, alias).getAlgorithm()).isEqualTo("RSA"); in testCanInstallCertChain()
187 assertThat(KeyChain.getCertificateChain(mActivity, alias)).isEqualTo(certChain); in testCanInstallCertChain()
190 assertThat(mDevicePolicyManager.removeKeyPair(getWho(), alias)).isTrue(); in testCanInstallCertChain()
193 assertGranted(alias, false); in testCanInstallCertChain()
218 private KeyGenParameterSpec buildRsaKeySpec(String alias, boolean useStrongBox) { in buildRsaKeySpec() argument
220 alias, in buildRsaKeySpec()
231 final String alias = "com.android.test.generated-rsa-1"; in testCanGenerateRSAKeyPair() local
[all …]
DDelegatedCertInstallerTest.java147 final String alias = keyStore.getCertificateAlias(caCert); in testCaCertsOperations() local
148 assertNotNull(alias); in testCaCertsOperations()
149 verifyOwnerInstalledStatus(alias, true); in testCaCertsOperations()
159 verifyOwnerInstalledStatus(alias, false); in testCaCertsOperations()
170 final String alias = "delegated-cert-installer-test-key"; in testInstallKeyPair() local
176 installKeyPair(TestCertificates.TEST_KEY, TestCertificates.TEST_CERT, alias); in testInstallKeyPair()
186 installKeyPair(TestCertificates.TEST_KEY, TestCertificates.TEST_CERT, alias); in testInstallKeyPair()
291 private void verifyOwnerInstalledStatus(String alias, boolean expectOwnerInstalled) { in verifyOwnerInstalledStatus() argument
295 assertEquals(expectOwnerInstalled, ownerInstalledCerts.contains(alias)); in verifyOwnerInstalledStatus()
314 private void installKeyPair(String key, String cert, String alias) { in installKeyPair() argument
[all …]
/cts/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/
DCertSelectionDelegateTest.java72 String alias) { in onChoosePrivateKeyAlias() argument
103 final String alias = "com.android.test.valid-rsa-key-1"; in testCanSelectKeychainKeypairs() local
107 assertThat(mDpm.installKeyPair(null, privKey, cert, alias)).isTrue(); in testCanSelectKeychainKeypairs()
109 assertThat(new KeyChainAliasFuture(alias).get()).isEqualTo(alias); in testCanSelectKeychainKeypairs()
112 assertThat(KeyChain.getPrivateKey(mActivity, alias).getAlgorithm()).isEqualTo("RSA"); in testCanSelectKeychainKeypairs()
115 assertThat(mDpm.removeKeyPair(null, alias)).isTrue(); in testCanSelectKeychainKeypairs()
134 public void alias(final String chosenAlias) { in alias() method in CertSelectionDelegateTest.KeyChainAliasFuture
139 public KeyChainAliasFuture(String alias) in KeyChainAliasFuture() argument
145 + URLEncoder.encode(alias, "UTF-8")); in KeyChainAliasFuture()
DDirectDelegatedCertInstallerTest.java131 final String alias = "delegated-cert-installer-test-key"; in testInstallKeyPair() local
134 alias, true)).isTrue(); in testInstallKeyPair()
137 PrivateKey obtainedKey = KeyChain.getPrivateKey(getContext(), alias); in testInstallKeyPair()
142 assertThat(mDpm.removeKeyPair(null, alias)).isTrue(); in testInstallKeyPair()
143 assertThat(KeyChain.getPrivateKey(getContext(), alias)).isNull(); in testInstallKeyPair()
148 final String alias = "com.android.test.generated-rsa-1"; in testGenerateKeyPairWithoutDeviceIdAttestation() local
151 alias, in testGenerateKeyPairWithoutDeviceIdAttestation()
165 assertThat(mDpm.removeKeyPair(null, alias)).isTrue(); in testGenerateKeyPairWithoutDeviceIdAttestation()
DCertInstallerReceiver.java122 String alias = intent.getStringExtra(EXTRA_KEY_ALIAS); in onReceive() local
141 sendResult(context, dpm.installKeyPair(null, privatekey, certificate, alias), in onReceive()
/cts/tests/security/src/android/keystore/cts/
DKeyGenerationUtils.java33 private static KeyGenParameterSpec buildRsaKeySpecWithKeyAttestation(String alias) { in buildRsaKeySpecWithKeyAttestation() argument
35 alias, in buildRsaKeySpecWithKeyAttestation()
47 int deviceIdAttestationFlags, String alias) { in generateRsaKeyPair() argument
49 admin, "RSA", buildRsaKeySpecWithKeyAttestation(alias), in generateRsaKeyPair()
64 public static void generateRsaKey(DevicePolicyManager dpm, ComponentName admin, String alias) { in generateRsaKey() argument
65 assertThat(generateRsaKeyPair(dpm, admin, 0, alias)).isNotNull(); in generateRsaKey()
/cts/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/
DAdminActionBookkeepingTest.java72 final String alias = keyStore.getCertificateAlias(cert); in testGetPolicyInstalledCaCerts() local
73 assertNotNull(alias); in testGetPolicyInstalledCaCerts()
76 verifyOwnerInstalledStatus(alias, true); in testGetPolicyInstalledCaCerts()
82 verifyOwnerInstalledStatus(alias, false); in testGetPolicyInstalledCaCerts()
85 private void verifyOwnerInstalledStatus(String alias, boolean expectOwnerInstalled) { in verifyOwnerInstalledStatus() argument
89 assertEquals(expectOwnerInstalled, ownerInstalledCerts.contains(alias)); in verifyOwnerInstalledStatus()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DKeyChainTestActivity.java194 public void alias(String alias) { in alias() argument
195 Log.i(TAG, "Got alias: " + alias); in alias()
196 if (alias == null) { in alias()
199 } else if (!alias.equals(ALIAS)) { in alias()
205 PrivateKey privateKey = KeyChain.getPrivateKey(KeyChainTestActivity.this, alias); in alias()
236 public void alias(String alias) { in alias() method in KeyChainTestActivity.SelectCertificateExpectingNone
237 Log.i(TAG, "Got alias: " + alias); in alias()
238 if (alias != null) { in alias()
/cts/tests/tests/keystore/src/android/keystore/cts/
DImportedKey.java32 public ImportedKey(String alias, KeyPair original, KeyPair keystoreBacked) { in ImportedKey() argument
33 mAlias = alias; in ImportedKey()
41 public ImportedKey(String alias, SecretKey original, SecretKey keystoreBacked) { in ImportedKey() argument
42 mAlias = alias; in ImportedKey()
DKeyStoreTest.java304 String alias = aliases.nextElement(); in clearKeyStore() local
305 ks.deleteEntry(alias); in clearKeyStore()
311 … public static void setPrivateKeyNoPassword(KeyStore ks, String alias, PrivateKeyEntry privateKey) in setPrivateKeyNoPassword() argument
313 ks.setKeyEntry(alias, privateKey.getPrivateKey(), null, privateKey.getCertificateChain()); in setPrivateKeyNoPassword()
318 public static void setPrivateKey(KeyStore ks, String alias) throws Exception { in setPrivateKey() argument
319 setPrivateKey(ks, alias, getPrivateKey()); in setPrivateKey()
322 String alias, in setPrivateKey() argument
325 ks.setKeyEntry(alias, in setPrivateKey()
334 public static void setPrivateKeyBytes(KeyStore ks, String alias) throws Exception { in setPrivateKeyBytes() argument
335 setPrivateKeyBytes(ks, alias, getPrivateKey()); in setPrivateKeyBytes()
[all …]
DAndroidKeyStoreTest.java736 String alias = aliases.nextElement(); in setUp() local
737 ksTemp.deleteEntry(alias); in setUp()
757 String alias = aliases.nextElement(); in tearDown() local
758 keyStore.deleteEntry(alias); in tearDown()
802 final String alias = aliases.nextElement(); in assertAliases() local
803 assertTrue("The alias should be in the expected set", expectedSet.contains(alias)); in assertAliases()
804 expectedSet.remove(alias); in assertAliases()
1930 String alias = "MyKey"; in testKeyStore_Encrypting_RSA_NONE_NOPADDING() local
1946 .setAlias(alias) in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
1955 PrivateKey privateKey = (PrivateKey) ks.getKey(alias, null); in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
[all …]
DTestUtils.java211 static void assertKeyStoreKeyPair(KeyStore keyStore, String alias, KeyPair keyPair) { in assertKeyStoreKeyPair() argument
220 entry = keyStore.getEntry(alias, null); in assertKeyStoreKeyPair()
221 cert = keyStore.getCertificate(alias); in assertKeyStoreKeyPair()
223 throw new RuntimeException("Failed to load entry: " + alias, e); in assertKeyStoreKeyPair()
481 String alias, in importIntoAndroidKeyStore() argument
487 keyStore.setEntry(alias, in importIntoAndroidKeyStore()
491 keyStore.getCertificate(alias).getPublicKey(), in importIntoAndroidKeyStore()
492 (PrivateKey) keyStore.getKey(alias, null)); in importIntoAndroidKeyStore()
496 String alias, in importIntoAndroidKeyStore() argument
501 keyStore.setEntry(alias, in importIntoAndroidKeyStore()
[all …]
DKeyAgreementTest.java156 private static KeyPair generateEphemeralAndroidKeyPair(String alias) in generateEphemeralAndroidKeyPair() argument
161 new KeyGenParameterSpec.Builder(alias, KeyProperties.PURPOSE_AGREE_KEY).build()); in generateEphemeralAndroidKeyPair()
DAttestKeyTest.java73 for (String alias : mAliasesToDelete) { in tearDown()
75 mKeyStore.deleteEntry(alias); in tearDown()
/cts/common/device-side/bedstead/eventlib/src/main/java/com/android/eventlib/events/deviceadminreceivers/
DDeviceAdminChoosePrivateKeyAliasEvent.java144 Intent intent, int uid, Uri uri, String alias) { in logger() argument
146 deviceAdminReceiver, context, intent, uid, uri, alias); in logger()
154 int uid, Uri uri, String alias) { in DeviceAdminChoosePrivateKeyAliasEventLogger() argument
159 mEvent.mAlias = alias; in DeviceAdminChoosePrivateKeyAliasEventLogger()
203 public DeviceAdminChoosePrivateKeyAliasEventLogger setAlias(String alias) { in setAlias() argument
204 mEvent.mAlias = alias; in setAlias()
254 public String alias() { in alias() method in DeviceAdminChoosePrivateKeyAliasEvent
/cts/tests/tests/security/src/android/security/cts/
DCertificateTest.java157 for (String alias : aliases) { in getDeviceWfaCertificates()
158 assertTrue(wfaKeyStore.isCertificateEntry(alias)); in getDeviceWfaCertificates()
159 X509Certificate certificate = (X509Certificate) wfaKeyStore.getCertificate(alias); in getDeviceWfaCertificates()
178 for (String alias : aliases) { in getDeviceCertificates()
179 assertTrue(keyStore.isCertificateEntry(alias)); in getDeviceCertificates()
180 X509Certificate certificate = (X509Certificate) keyStore.getCertificate(alias); in getDeviceCertificates()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DAdminActionBookkeepingTest.java242 final String alias = keyStore.getCertificateAlias(cert); in testGetPolicyInstalledCaCerts() local
243 assertWithMessage("keystore.getCertificateAlias()").that(alias).isNotNull(); in testGetPolicyInstalledCaCerts()
246 verifyOwnerInstalledStatus(alias, true); in testGetPolicyInstalledCaCerts()
252 verifyOwnerInstalledStatus(alias, false); in testGetPolicyInstalledCaCerts()
255 private void verifyOwnerInstalledStatus(String alias, boolean expectOwnerInstalled) { in verifyOwnerInstalledStatus() argument
263 .contains(alias); in verifyOwnerInstalledStatus()
266 .doesNotContain(alias); in verifyOwnerInstalledStatus()
/cts/hostsidetests/devicepolicy/app/DelegateApp/src/com/android/cts/delegate/
DCertInstallDelegateTest.java79 final String alias = "delegated-cert-installer-test-key"; in testCanAccessApis() local
87 mDpm.installKeyPair(null, privateKey, certificate, alias)); in testCanAccessApis()
90 assertTrue("Key pair not removed successfully", mDpm.removeKeyPair(null, alias)); in testCanAccessApis()
/cts/tests/tests/graphics/src/android/graphics/fonts/
DFontManagerTest.java131 for (FontConfig.Alias alias : aliases) { in fontManager_getFontConfig_checkAlias()
132 assertThat(alias.getName()).isNotEmpty(); in fontManager_getFontConfig_checkAlias()
133 assertThat(alias.getOriginal()).isNotEmpty(); in fontManager_getFontConfig_checkAlias()
134 assertThat(alias.getWeight()).isAtLeast(0); in fontManager_getFontConfig_checkAlias()
135 assertThat(alias.getWeight()).isAtMost(1000); in fontManager_getFontConfig_checkAlias()
138 assertThat(alias.getOriginal()).isIn(fallbackNames); in fontManager_getFontConfig_checkAlias()
/cts/tests/tests/telephony/current/preconditions/src/android/telephony/cts/preconditions/
DTelephonyPreparer.java24 @OptionClass(alias="telephony-preparer")
DTelephonyCleaner.java24 @OptionClass(alias="telephony-cleaner")
/cts/tests/tests/identity/src/android/security/identity/cts/
DUserAuthTest.java141 private boolean checkAuthBoundKey(String alias) { in checkAuthBoundKey() argument
147 KeyStore.Entry entry = ks.getEntry(alias, null); in checkAuthBoundKey()
162 void createAuthBoundKey(String alias, int timeoutSeconds) { in createAuthBoundKey() argument
168 alias, in createAuthBoundKey()
186 String alias = "authbound"; in testUserAuth() local
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DKeyManagementTest.java89 private static Uri getUri(String alias) { in getUri() argument
91 return Uri.parse("https://example.org/?alias=" + URLEncoder.encode(alias, "UTF-8")); in getUri()
97 private static void choosePrivateKeyAlias(KeyChainAliasCallback callback, String alias) { in choosePrivateKeyAlias() argument
104 null, /* issuers= */ null, getUri(alias), /* alias = */ null) in choosePrivateKeyAlias()
111 private static PrivateKey getPrivateKey(Context context, String alias) { in getPrivateKey() argument
113 return KeyChain.getPrivateKey(context, alias); in getPrivateKey()
563 public void alias(final String chosenAlias) { in alias() method in KeyManagementTest.KeyChainAliasCallback
/cts/common/device-side/bedstead/testapp/src/testapps/main/java/com/android/bedstead/testapp/
DBaseTestAppDeviceAdminReceiver.java111 String alias) { in onChoosePrivateKeyAlias() argument
112 return super.onChoosePrivateKeyAlias(context, intent, uid, uri, alias); in onChoosePrivateKeyAlias()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/security/
DCredentialManagementAppActivity.java361 public void alias(String alias) { in alias() argument
362 mChosenAlias = alias; in alias()

12