Home
last modified time | relevance | path

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

12

/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DKeyManagementTest.java87 final String alias = "com.android.test.valid-rsa-key-1"; in testCanInstallAndRemoveValidRsaKeypair() local
92 assertTrue(mDevicePolicyManager.installKeyPair(getWho(), privKey, cert, alias)); in testCanInstallAndRemoveValidRsaKeypair() local
95 assertGranted(alias, false); in testCanInstallAndRemoveValidRsaKeypair()
96 assertEquals(alias, new KeyChainAliasFuture(alias).get()); in testCanInstallAndRemoveValidRsaKeypair()
97 assertGranted(alias, true); in testCanInstallAndRemoveValidRsaKeypair()
100 assertEquals(KeyChain.getPrivateKey(getActivity(), alias).getAlgorithm(), "RSA"); in testCanInstallAndRemoveValidRsaKeypair()
103 assertTrue(mDevicePolicyManager.removeKeyPair(getWho(), alias)); in testCanInstallAndRemoveValidRsaKeypair() local
106 assertGranted(alias, false); in testCanInstallAndRemoveValidRsaKeypair()
142 final String alias = "com.android.test.clientkeychain"; in testCanInstallCertChain() local
150 assertTrue(mDevicePolicyManager.installKeyPair(getWho(), privKey, certChain, alias, true)); in testCanInstallCertChain() local
[all …]
/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.java300 String alias = aliases.nextElement(); in clearKeyStore() local
301 ks.deleteEntry(alias); in clearKeyStore()
307 … public static void setPrivateKeyNoPassword(KeyStore ks, String alias, PrivateKeyEntry privateKey) in setPrivateKeyNoPassword() argument
309 ks.setKeyEntry(alias, privateKey.getPrivateKey(), null, privateKey.getCertificateChain()); in setPrivateKeyNoPassword()
314 public static void setPrivateKey(KeyStore ks, String alias) throws Exception { in setPrivateKey() argument
315 setPrivateKey(ks, alias, getPrivateKey()); in setPrivateKey()
318 String alias, in setPrivateKey() argument
321 ks.setKeyEntry(alias, in setPrivateKey()
330 public static void setPrivateKeyBytes(KeyStore ks, String alias) throws Exception { in setPrivateKeyBytes() argument
331 setPrivateKeyBytes(ks, alias, getPrivateKey()); in setPrivateKeyBytes()
[all …]
DAndroidKeyStoreTest.java728 String alias = aliases.nextElement(); in setUp() local
729 ksTemp.deleteEntry(alias); in setUp()
743 String alias = aliases.nextElement(); in tearDown() local
744 keyStore.deleteEntry(alias); in tearDown()
788 final String alias = aliases.nextElement(); in assertAliases() local
789 assertTrue("The alias should be in the expected set", expectedSet.contains(alias)); in assertAliases()
790 expectedSet.remove(alias); in assertAliases()
1913 String alias = "MyKey"; in testKeyStore_Encrypting_RSA_NONE_NOPADDING() local
1929 .setAlias(alias) in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
1938 PrivateKey privateKey = (PrivateKey) ks.getKey(alias, null); in testKeyStore_Encrypting_RSA_NONE_NOPADDING()
[all …]
DTestUtils.java136 static void assertKeyStoreKeyPair(KeyStore keyStore, String alias, KeyPair keyPair) { in assertKeyStoreKeyPair() argument
145 entry = keyStore.getEntry(alias, null); in assertKeyStoreKeyPair()
146 cert = keyStore.getCertificate(alias); in assertKeyStoreKeyPair()
148 throw new RuntimeException("Failed to load entry: " + alias, e); in assertKeyStoreKeyPair()
403 String alias, in importIntoAndroidKeyStore() argument
409 keyStore.setEntry(alias, in importIntoAndroidKeyStore()
413 keyStore.getCertificate(alias).getPublicKey(), in importIntoAndroidKeyStore()
414 (PrivateKey) keyStore.getKey(alias, null)); in importIntoAndroidKeyStore()
418 String alias, in importIntoAndroidKeyStore() argument
423 keyStore.setEntry(alias, in importIntoAndroidKeyStore()
[all …]
DKeyPairGeneratorTest.java1305 KeyPair keyPair, String alias, in assertGeneratedKeyPairAndSelfSignedCertificate() argument
1317 TestUtils.assertKeyStoreKeyPair(mKeyStore, alias, keyPair); in assertGeneratedKeyPairAndSelfSignedCertificate()
1319 X509Certificate cert = (X509Certificate) mKeyStore.getCertificate(alias); in assertGeneratedKeyPairAndSelfSignedCertificate()
1328 Arrays.asList(mKeyStore.getCertificateChain(alias)), cert); in assertGeneratedKeyPairAndSelfSignedCertificate()
1331 private void assertSelfSignedCertificateSignatureVerifies(String alias) throws Exception { in assertSelfSignedCertificateSignatureVerifies() argument
1332 assertSelfSignedCertificateSignatureVerifies(mKeyStore.getCertificate(alias)); in assertSelfSignedCertificateSignatureVerifies()
1335 private void assertKeyPairAndCertificateUsableForTLSPeerAuthentication(String alias) in assertKeyPairAndCertificateUsableForTLSPeerAuthentication() argument
1338 (PrivateKey) mKeyStore.getKey(alias, null), in assertKeyPairAndCertificateUsableForTLSPeerAuthentication()
1339 mKeyStore.getCertificateChain(alias)); in assertKeyPairAndCertificateUsableForTLSPeerAuthentication()
1469 public X509Certificate[] getCertificateChain(String alias) { in getCertificateChain() argument
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DDelegatedCertInstallerTest.java205 final String alias = "delegated-cert-installer-test-key"; in testInstallKeyPair() local
211 installKeyPair(TEST_KEY, TEST_CERT, alias); in testInstallKeyPair()
221 installKeyPair(TEST_KEY, TEST_CERT, alias); in testInstallKeyPair()
302 private void installKeyPair(String key, String cert, String alias) { in installKeyPair() argument
308 intent.putExtra(EXTRA_KEY_ALIAS, alias); in installKeyPair()
/cts/tests/tests/security/src/android/security/cts/
DCertificateTest.java89 for (String alias : aliases) { in getDeviceCertificates()
90 assertTrue(keyStore.isCertificateEntry(alias)); in getDeviceCertificates()
91 X509Certificate certificate = (X509Certificate) keyStore.getCertificate(alias); in getDeviceCertificates()
/cts/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/
DApkPreconditionCheck.java23 @OptionClass(alias="apk-precondition-check")
DPackageDisabler.java30 @OptionClass(alias="package-disabler")
DStayAwakePreparer.java31 @OptionClass(alias="stay-awake-preparer")
DApkInstaller.java30 @OptionClass(alias="apk-installer")
DPropertyCheck.java29 @OptionClass(alias="property-check")
DWifiCheck.java38 @OptionClass(alias="wifi-check")
DLocationCheck.java29 @OptionClass(alias="location-check")
DFilePusher.java34 @OptionClass(alias="file-pusher")
DSettingsPreparer.java32 @OptionClass(alias="settings-preparer")
DResultFilePuller.java37 @OptionClass(alias="result-file-puller")
DApkInstrumentationPreparer.java44 @OptionClass(alias="apk-instrumentation-preparer")
/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/tools/tradefed-host/src/com/android/cts/tradefed/targetprep/
DCtsFilePusher.java28 @OptionClass(alias="cts-file-pusher")
DCtsApkInstaller.java30 @OptionClass(alias="cts-apk-installer")
/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/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/
DCompatibilityBuildProvider.java34 @OptionClass(alias="compatibility-build-provider")
/cts/tools/vm-tests-tf/targetprep/src/android/core/vm/targetprep/
DVmTestPreparer.java37 @OptionClass(alias="vm-test-preparer")

12