Home
last modified time | relevance | path

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

/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DKeyManagementTest.java113 final String alias = "com.android.test.valid-rsa-key-1"; in testCanInstallAndRemoveValidRsaKeypair() local
118 assertThat(mDevicePolicyManager.installKeyPair(getWho(), privKey, cert, alias)).isTrue(); in testCanInstallAndRemoveValidRsaKeypair()
121 assertGranted(alias, false); in testCanInstallAndRemoveValidRsaKeypair()
122 assertThat(new KeyChainAliasFuture(alias).get()).isEqualTo(alias); in testCanInstallAndRemoveValidRsaKeypair()
123 assertGranted(alias, true); in testCanInstallAndRemoveValidRsaKeypair()
126 assertThat(KeyChain.getPrivateKey(mActivity, alias).getAlgorithm()).isEqualTo("RSA"); in testCanInstallAndRemoveValidRsaKeypair()
129 assertThat(mDevicePolicyManager.removeKeyPair(getWho(), alias)).isTrue(); in testCanInstallAndRemoveValidRsaKeypair()
132 assertGranted(alias, false); in testCanInstallAndRemoveValidRsaKeypair()
183 final String alias = "com.android.test.clientkeychain"; in testCanInstallCertChain() local
186 assertThat(mDevicePolicyManager.installKeyPair(getWho(), privKey, certChain, alias, true)) in testCanInstallCertChain() local
[all …]
DDelegatedCertInstallerTest.java213 final String alias = keyStore.getCertificateAlias(caCert); in testCaCertsOperations() local
214 assertNotNull(alias); in testCaCertsOperations()
215 verifyOwnerInstalledStatus(alias, true); in testCaCertsOperations()
225 verifyOwnerInstalledStatus(alias, false); in testCaCertsOperations()
236 final String alias = "delegated-cert-installer-test-key"; in testInstallKeyPair() local
242 installKeyPair(TEST_KEY, TEST_CERT, alias); in testInstallKeyPair()
251 installKeyPair(TEST_KEY, TEST_CERT, alias); in testInstallKeyPair()
343 private void verifyOwnerInstalledStatus(String alias, boolean expectOwnerInstalled) { in verifyOwnerInstalledStatus() argument
347 assertEquals(expectOwnerInstalled, ownerInstalledCerts.contains(alias)); in verifyOwnerInstalledStatus()
366 private void installKeyPair(String key, String cert, String alias) { in installKeyPair() argument
[all …]
/cts/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/
DCertSelectionDelegateTest.java70 String alias) { in onChoosePrivateKeyAlias() argument
101 final String alias = "com.android.test.valid-rsa-key-1"; in testCanSelectKeychainKeypairs() local
105 assertThat(mDpm.installKeyPair(null, privKey, cert, alias)).isTrue(); in testCanSelectKeychainKeypairs()
107 assertThat(new KeyChainAliasFuture(alias).get()).isEqualTo(alias); in testCanSelectKeychainKeypairs()
110 assertThat(KeyChain.getPrivateKey(mActivity, alias).getAlgorithm()).isEqualTo("RSA"); in testCanSelectKeychainKeypairs()
113 assertThat(mDpm.removeKeyPair(null, alias)).isTrue(); in testCanSelectKeychainKeypairs()
122 public void alias(final String chosenAlias) { in alias() method in CertSelectionDelegateTest.KeyChainAliasFuture
127 public KeyChainAliasFuture(String alias) in KeyChainAliasFuture() argument
133 + URLEncoder.encode(alias, "UTF-8")); in KeyChainAliasFuture()
DDirectDelegatedCertInstallerTest.java167 final String alias = "delegated-cert-installer-test-key"; in testInstallKeyPair() local
177 assertThat(mDpm.installKeyPair(null, privatekey, new Certificate[]{certificate}, alias, in testInstallKeyPair()
181 PrivateKey obtainedKey = KeyChain.getPrivateKey(getContext(), alias); in testInstallKeyPair()
186 assertThat(mDpm.removeKeyPair(null, alias)).isTrue(); in testInstallKeyPair()
187 assertThat(KeyChain.getPrivateKey(getContext(), alias)).isNull(); in testInstallKeyPair()
192 final String alias = "com.android.test.generated-rsa-1"; in testGenerateKeyPairWithoutDeviceIdAttestation() local
195 alias, in testGenerateKeyPairWithoutDeviceIdAttestation()
209 assertThat(mDpm.removeKeyPair(null, alias)).isTrue(); in testGenerateKeyPairWithoutDeviceIdAttestation()
DCertInstallerReceiver.java119 String alias = intent.getStringExtra(EXTRA_KEY_ALIAS); in onReceive() local
138 sendResult(context, dpm.installKeyPair(null, privatekey, certificate, alias), in onReceive()
/cts/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/
DAdminActionBookkeepingTest.java101 final String alias = keyStore.getCertificateAlias(cert); in testGetPolicyInstalledCaCerts() local
102 assertNotNull(alias); in testGetPolicyInstalledCaCerts()
105 verifyOwnerInstalledStatus(alias, true); in testGetPolicyInstalledCaCerts()
111 verifyOwnerInstalledStatus(alias, false); in testGetPolicyInstalledCaCerts()
114 private void verifyOwnerInstalledStatus(String alias, boolean expectOwnerInstalled) { in verifyOwnerInstalledStatus() argument
118 assertEquals(expectOwnerInstalled, ownerInstalledCerts.contains(alias)); in verifyOwnerInstalledStatus()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DKeyChainTestActivity.java199 public void alias(String alias) { in alias() argument
200 Log.i(TAG, "Got alias: " + alias); in alias()
201 if (alias == null) { in alias()
204 } else if (!alias.equals(ALIAS)) { in alias()
210 PrivateKey privateKey = KeyChain.getPrivateKey(KeyChainTestActivity.this, alias); in alias()
241 public void alias(String alias) { in alias() argument
242 Log.i(TAG, "Got alias: " + alias); in alias()
243 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.java303 String alias = aliases.nextElement(); in clearKeyStore() local
304 ks.deleteEntry(alias); in clearKeyStore()
310 … public static void setPrivateKeyNoPassword(KeyStore ks, String alias, PrivateKeyEntry privateKey) in setPrivateKeyNoPassword() argument
312 ks.setKeyEntry(alias, privateKey.getPrivateKey(), null, privateKey.getCertificateChain()); in setPrivateKeyNoPassword()
317 public static void setPrivateKey(KeyStore ks, String alias) throws Exception { in setPrivateKey() argument
318 setPrivateKey(ks, alias, getPrivateKey()); in setPrivateKey()
321 String alias, in setPrivateKey() argument
324 ks.setKeyEntry(alias, in setPrivateKey()
333 public static void setPrivateKeyBytes(KeyStore ks, String alias) throws Exception { in setPrivateKeyBytes() argument
334 setPrivateKeyBytes(ks, alias, getPrivateKey()); in setPrivateKeyBytes()
[all …]
DAndroidKeyStoreTest.java732 String alias = aliases.nextElement(); in setUp() local
733 ksTemp.deleteEntry(alias); in setUp()
753 String alias = aliases.nextElement(); in tearDown() local
754 keyStore.deleteEntry(alias); in tearDown()
798 final String alias = aliases.nextElement(); in assertAliases() local
799 assertTrue("The alias should be in the expected set", expectedSet.contains(alias)); in assertAliases()
800 expectedSet.remove(alias); in assertAliases()
1889 String alias = "MyKey"; in testKeyStore_Encrypting_RSA_NONE_NOPADDING() local
1905 .setAlias(alias) in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
1914 PrivateKey privateKey = (PrivateKey) ks.getKey(alias, null); in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
[all …]
DTestUtils.java155 static void assertKeyStoreKeyPair(KeyStore keyStore, String alias, KeyPair keyPair) { in assertKeyStoreKeyPair() argument
164 entry = keyStore.getEntry(alias, null); in assertKeyStoreKeyPair()
165 cert = keyStore.getCertificate(alias); in assertKeyStoreKeyPair()
167 throw new RuntimeException("Failed to load entry: " + alias, e); in assertKeyStoreKeyPair()
422 String alias, in importIntoAndroidKeyStore() argument
428 keyStore.setEntry(alias, in importIntoAndroidKeyStore()
432 keyStore.getCertificate(alias).getPublicKey(), in importIntoAndroidKeyStore()
433 (PrivateKey) keyStore.getKey(alias, null)); in importIntoAndroidKeyStore()
437 String alias, in importIntoAndroidKeyStore() argument
442 keyStore.setEntry(alias, in importIntoAndroidKeyStore()
[all …]
DKeyPairGeneratorTest.java1597 KeyPair keyPair, String alias, in assertGeneratedKeyPairAndSelfSignedCertificate() argument
1609 TestUtils.assertKeyStoreKeyPair(mKeyStore, alias, keyPair); in assertGeneratedKeyPairAndSelfSignedCertificate()
1611 X509Certificate cert = (X509Certificate) mKeyStore.getCertificate(alias); in assertGeneratedKeyPairAndSelfSignedCertificate()
1620 Arrays.asList(mKeyStore.getCertificateChain(alias)), cert); in assertGeneratedKeyPairAndSelfSignedCertificate()
1623 private void assertSelfSignedCertificateSignatureVerifies(String alias) throws Exception { in assertSelfSignedCertificateSignatureVerifies() argument
1624 assertSelfSignedCertificateSignatureVerifies(mKeyStore.getCertificate(alias)); in assertSelfSignedCertificateSignatureVerifies()
1627 private void assertKeyPairAndCertificateUsableForTLSPeerAuthentication(String alias) in assertKeyPairAndCertificateUsableForTLSPeerAuthentication() argument
1630 (PrivateKey) mKeyStore.getKey(alias, null), in assertKeyPairAndCertificateUsableForTLSPeerAuthentication()
1631 mKeyStore.getCertificateChain(alias)); in assertKeyPairAndCertificateUsableForTLSPeerAuthentication()
1761 public X509Certificate[] getCertificateChain(String alias) { in getCertificateChain() argument
[all …]
DImportWrappedKeyTest.java404 private KeyPair genKeyPair(String alias, boolean isStrongBoxBacked) throws Exception { in genKeyPair() argument
409 new KeyGenParameterSpec.Builder(alias, KeyProperties.PURPOSE_WRAP_KEY) in genKeyPair()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DAdminActionBookkeepingTest.java198 final String alias = keyStore.getCertificateAlias(cert); in testGetPolicyInstalledCaCerts() local
199 assertNotNull(alias); in testGetPolicyInstalledCaCerts()
202 verifyOwnerInstalledStatus(alias, true); in testGetPolicyInstalledCaCerts()
208 verifyOwnerInstalledStatus(alias, false); in testGetPolicyInstalledCaCerts()
211 private void verifyOwnerInstalledStatus(String alias, boolean expectOwnerInstalled) { in verifyOwnerInstalledStatus() argument
215 assertEquals(expectOwnerInstalled, ownerInstalledCerts.contains(alias)); in verifyOwnerInstalledStatus()
DSecurityLoggingTest.java506 private void verifyKeyGeneratedEventPresent(List<SecurityEvent> events, String alias) { in verifyKeyGeneratedEventPresent() argument
510 && getString(e, ALIAS_INDEX).contains(alias) in verifyKeyGeneratedEventPresent()
514 private void importKey(String alias) throws Exception{ in importKey() argument
517 ks.setEntry(alias, new KeyStore.SecretKeyEntry(new SecretKeySpec(new byte[32], "AES")), in importKey()
521 private void verifyKeyImportedEventPresent(List<SecurityEvent> events, String alias) { in verifyKeyImportedEventPresent() argument
525 && getString(e, ALIAS_INDEX).contains(alias) in verifyKeyImportedEventPresent()
535 private void verifyKeyDeletedEventPresent(List<SecurityEvent> events, String alias) { in verifyKeyDeletedEventPresent() argument
539 && getString(e, ALIAS_INDEX).contains(alias) in verifyKeyDeletedEventPresent()
/cts/tests/tests/security/src/android/security/cts/
DCertificateTest.java159 for (String alias : aliases) { in getDeviceWfaCertificates()
160 assertTrue(wfaKeyStore.isCertificateEntry(alias)); in getDeviceWfaCertificates()
161 X509Certificate certificate = (X509Certificate) wfaKeyStore.getCertificate(alias); in getDeviceWfaCertificates()
180 for (String alias : aliases) { in getDeviceCertificates()
181 assertTrue(keyStore.isCertificateEntry(alias)); in getDeviceCertificates()
182 X509Certificate certificate = (X509Certificate) keyStore.getCertificate(alias); in getDeviceCertificates()
/cts/tests/security/src/android/keystore/cts/
DKeyGenerationUtils.java33 private static KeyGenParameterSpec buildRsaKeySpecWithKeyAttestation(String alias) { in buildRsaKeySpecWithKeyAttestation() argument
35 alias, in buildRsaKeySpecWithKeyAttestation()
/cts/hostsidetests/devicepolicy/app/DelegateApp/src/com/android/cts/delegate/
DCertInstallDelegateTest.java157 final String alias = "delegated-cert-installer-test-key"; in testCanAccessApis() local
168 mDpm.installKeyPair(null, privatekey, certificate, alias)); in testCanAccessApis()
171 assertTrue("Key pair not removed successfully", mDpm.removeKeyPair(null, alias)); in testCanAccessApis()
/cts/tests/tests/telephony/current/preconditions/src/android/telephony/cts/preconditions/
DTelephonyPreparer.java24 @OptionClass(alias="telephony-preparer")
/cts/apps/CtsVerifier/src/com/android/cts/verifier/security/
DKeyChainTest.java433 .alias(aliasCaptor.capture()); in chooseClientAlias()
448 public X509Certificate[] getCertificateChain(String alias) { in getCertificateChain() argument
452 KeyChain.getCertificateChain(KeyChainTest.this, alias); in getCertificateChain()
483 public PrivateKey getPrivateKey(String alias) { in getPrivateKey() argument
485 log("KeyChainKeyManager.getPrivateKey(\"" + alias + "\")"); in getPrivateKey()
486 PrivateKey privateKey = KeyChain.getPrivateKey(KeyChainTest.this, alias); in getPrivateKey()
/cts/tools/vm-tests-tf/targetprep/src/android/core/vm/targetprep/
DVmTestPreparer.java39 @OptionClass(alias="vm-test-preparer")
/cts/hostsidetests/backup/src/android/cts/backup/
DBackupPreparer.java39 @OptionClass(alias = "backup-preparer")
/cts/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/
DMediaBitstreamsTest.java66 @OptionClass(alias="media-bitstreams-test")