Home
last modified time | relevance | path

Searched refs:alias (Results 1 – 20 of 20) 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 assertTrue(mDevicePolicyManager.installKeyPair(getWho(), privKey, cert, alias)); in testCanInstallAndRemoveValidRsaKeypair() local
121 assertGranted(alias, false); in testCanInstallAndRemoveValidRsaKeypair()
122 assertEquals(alias, new KeyChainAliasFuture(alias).get()); in testCanInstallAndRemoveValidRsaKeypair()
123 assertGranted(alias, true); in testCanInstallAndRemoveValidRsaKeypair()
126 assertEquals(KeyChain.getPrivateKey(mActivity, alias).getAlgorithm(), "RSA"); in testCanInstallAndRemoveValidRsaKeypair()
129 assertTrue(mDevicePolicyManager.removeKeyPair(getWho(), alias)); in testCanInstallAndRemoveValidRsaKeypair() local
132 assertGranted(alias, false); in testCanInstallAndRemoveValidRsaKeypair()
179 final String alias = "com.android.test.clientkeychain"; in testCanInstallCertChain() local
182 assertTrue(mDevicePolicyManager.installKeyPair(getWho(), privKey, certChain, alias, true)); in testCanInstallCertChain() local
[all …]
DDelegatedCertInstallerTest.java209 final String alias = keyStore.getCertificateAlias(caCert); in testCaCertsOperations() local
210 assertNotNull(alias); in testCaCertsOperations()
211 verifyOwnerInstalledStatus(alias, true); in testCaCertsOperations()
221 verifyOwnerInstalledStatus(alias, false); in testCaCertsOperations()
232 final String alias = "delegated-cert-installer-test-key"; in testInstallKeyPair() local
238 installKeyPair(TEST_KEY, TEST_CERT, alias); in testInstallKeyPair()
248 installKeyPair(TEST_KEY, TEST_CERT, alias); in testInstallKeyPair()
318 private void verifyOwnerInstalledStatus(String alias, boolean expectOwnerInstalled) { in verifyOwnerInstalledStatus() argument
322 assertEquals(expectOwnerInstalled, ownerInstalledCerts.contains(alias)); in verifyOwnerInstalledStatus()
341 private void installKeyPair(String key, String cert, String alias) { in installKeyPair() argument
[all …]
/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/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.java731 String alias = aliases.nextElement(); in setUp() local
732 ksTemp.deleteEntry(alias); in setUp()
752 String alias = aliases.nextElement(); in tearDown() local
753 keyStore.deleteEntry(alias); in tearDown()
797 final String alias = aliases.nextElement(); in assertAliases() local
798 assertTrue("The alias should be in the expected set", expectedSet.contains(alias)); in assertAliases()
799 expectedSet.remove(alias); in assertAliases()
1928 String alias = "MyKey"; in testKeyStore_Encrypting_RSA_NONE_NOPADDING() local
1944 .setAlias(alias) in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
1953 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.java1307 KeyPair keyPair, String alias, in assertGeneratedKeyPairAndSelfSignedCertificate() argument
1319 TestUtils.assertKeyStoreKeyPair(mKeyStore, alias, keyPair); in assertGeneratedKeyPairAndSelfSignedCertificate()
1321 X509Certificate cert = (X509Certificate) mKeyStore.getCertificate(alias); in assertGeneratedKeyPairAndSelfSignedCertificate()
1330 Arrays.asList(mKeyStore.getCertificateChain(alias)), cert); in assertGeneratedKeyPairAndSelfSignedCertificate()
1333 private void assertSelfSignedCertificateSignatureVerifies(String alias) throws Exception { in assertSelfSignedCertificateSignatureVerifies() argument
1334 assertSelfSignedCertificateSignatureVerifies(mKeyStore.getCertificate(alias)); in assertSelfSignedCertificateSignatureVerifies()
1337 private void assertKeyPairAndCertificateUsableForTLSPeerAuthentication(String alias) in assertKeyPairAndCertificateUsableForTLSPeerAuthentication() argument
1340 (PrivateKey) mKeyStore.getKey(alias, null), in assertKeyPairAndCertificateUsableForTLSPeerAuthentication()
1341 mKeyStore.getCertificateChain(alias)); in assertKeyPairAndCertificateUsableForTLSPeerAuthentication()
1471 public X509Certificate[] getCertificateChain(String alias) { in getCertificateChain() argument
[all …]
DImportWrappedKeyTest.java337 private KeyPair genKeyPair(String alias, boolean isStrongBoxBacked) throws Exception { in genKeyPair() argument
342 new KeyGenParameterSpec.Builder(alias, KeyProperties.PURPOSE_WRAP_KEY) in genKeyPair()
/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()
236 public void alias(String alias) { in alias() argument
237 Log.i(TAG, "Got alias: " + alias); in alias()
238 if (alias != null) { in alias()
/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.java495 private void verifyKeyGeneratedEventPresent(List<SecurityEvent> events, String alias) { in verifyKeyGeneratedEventPresent() argument
499 && getString(e, ALIAS_INDEX).contains(alias) in verifyKeyGeneratedEventPresent()
503 private void importKey(String alias) throws Exception{ in importKey() argument
506 ks.setEntry(alias, new KeyStore.SecretKeyEntry(new SecretKeySpec(new byte[32], "AES")), in importKey()
510 private void verifyKeyImportedEventPresent(List<SecurityEvent> events, String alias) { in verifyKeyImportedEventPresent() argument
514 && getString(e, ALIAS_INDEX).contains(alias) in verifyKeyImportedEventPresent()
524 private void verifyKeyDeletedEventPresent(List<SecurityEvent> events, String alias) { in verifyKeyDeletedEventPresent() argument
528 && 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/tests/telephony/preconditions/src/android/telephony/cts/preconditions/
DTelephonyPreparer.java24 @OptionClass(alias="telephony-preparer")
/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/apps/CtsVerifier/src/com/android/cts/verifier/security/
DKeyChainTest.java381 .alias(aliasCaptor.capture()); in chooseClientAlias()
396 public X509Certificate[] getCertificateChain(String alias) { in getCertificateChain() argument
400 KeyChain.getCertificateChain(KeyChainTest.this, alias); in getCertificateChain()
431 public PrivateKey getPrivateKey(String alias) { in getPrivateKey() argument
433 log("KeyChainKeyManager.getPrivateKey(\"" + alias + "\")"); in getPrivateKey()
434 PrivateKey privateKey = KeyChain.getPrivateKey(KeyChainTest.this, alias); in getPrivateKey()
/cts/hostsidetests/devicepolicy/app/CertInstaller/src/com/android/cts/certinstaller/
DCertInstallerReceiver.java119 String alias = intent.getStringExtra(EXTRA_KEY_ALIAS); in onReceive() local
138 sendResult(context, dpm.installKeyPair(null, privatekey, certificate, alias), in onReceive()
/cts/tools/vm-tests-tf/targetprep/src/android/core/vm/targetprep/
DVmTestPreparer.java37 @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.java65 @OptionClass(alias="media-bitstreams-test")