Home
last modified time | relevance | path

Searched refs:keyStore (Results 1 – 17 of 17) sorted by relevance

/cts/tests/tests/keystore/src/android/keystore/cts/
DKeyStoreTest.java522 for (KeyStore keyStore : keyStores()) { in test_KeyStore_getProvider()
523 assertNotNull(keyStore.getProvider()); in test_KeyStore_getProvider()
533 for (KeyStore keyStore : keyStores()) { in test_KeyStore_getType()
534 assertNotNull(keyStore.getType()); in test_KeyStore_getType()
539 for (KeyStore keyStore : keyStores()) { in test_KeyStore_getKey()
541 keyStore.getKey(null, null); in test_KeyStore_getKey()
542 fail(keyStore.getType()); in test_KeyStore_getKey()
547 for (KeyStore keyStore : keyStores()) { in test_KeyStore_getKey()
548 populate(keyStore); in test_KeyStore_getKey()
552 keyStore.getKey(null, null); in test_KeyStore_getKey()
[all …]
DKeyAttestationTest.java205 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in testEcAttestation_NoChallenge() local
206 keyStore.load(null); in testEcAttestation_NoChallenge()
209 Certificate certificates[] = keyStore.getCertificateChain(keystoreAlias); in testEcAttestation_NoChallenge()
215 keyStore.deleteEntry(keystoreAlias); in testEcAttestation_NoChallenge()
236 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in testEcAttestation_KeyStoreExceptionWhenRequestingUniqueId() local
237 keyStore.load(null); in testEcAttestation_KeyStoreExceptionWhenRequestingUniqueId()
238 keyStore.deleteEntry(keystoreAlias); in testEcAttestation_KeyStoreExceptionWhenRequestingUniqueId()
322 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in testRsaAttestation_NoChallenge() local
323 keyStore.load(null); in testRsaAttestation_NoChallenge()
326 Certificate certificates[] = keyStore.getCertificateChain(keystoreAlias); in testRsaAttestation_NoChallenge()
[all …]
DImportWrappedKeyTest.java102 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in testKeyStore_ImportWrappedKey() local
103 keyStore.load(null, null); in testKeyStore_ImportWrappedKey()
105 assertTrue("Failed to load key after wrapped import", keyStore.containsAlias(ALIAS)); in testKeyStore_ImportWrappedKey()
107 Key key = keyStore.getKey(ALIAS, null); in testKeyStore_ImportWrappedKey()
148 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in testKeyStore_ImportWrappedKey_3DES() local
149 keyStore.load(null, null); in testKeyStore_ImportWrappedKey_3DES()
151 assertTrue("Failed to load key after wrapped import", keyStore.containsAlias(ALIAS)); in testKeyStore_ImportWrappedKey_3DES()
153 Key key = keyStore.getKey(ALIAS, null); in testKeyStore_ImportWrappedKey_3DES()
225 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in importWrappedKey() local
226 keyStore.load(null, null); in importWrappedKey()
[all …]
DAESCipherNistCavpKatTest.java271 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in runKatTest() local
272 keyStore.load(null); in runKatTest()
273 keyStore.setEntry(keyAlias, in runKatTest()
282 SecretKey key = (SecretKey) keyStore.getKey(keyAlias, null); in runKatTest()
301 keyStore.deleteEntry(keyAlias); in runKatTest()
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()
426 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in importIntoAndroidKeyStore() local
427 keyStore.load(null); in importIntoAndroidKeyStore()
428 keyStore.setEntry(alias, in importIntoAndroidKeyStore()
432 keyStore.getCertificate(alias).getPublicKey(), in importIntoAndroidKeyStore()
433 (PrivateKey) keyStore.getKey(alias, null)); in importIntoAndroidKeyStore()
440 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in importIntoAndroidKeyStore() local
441 keyStore.load(null); in importIntoAndroidKeyStore()
[all …]
DAndroidKeyStoreTest.java748 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in tearDown() local
749 keyStore.load(null, null); in tearDown()
750 Enumeration<String> aliases = keyStore.aliases(); in tearDown()
753 keyStore.deleteEntry(alias); in tearDown()
DKeyPairGeneratorTest.java1368 serverKeyStore.keyStore.setCertificateEntry( in assertUsableForTLSPeerAuthentication()
1374 TestKeyStore.createTrustManagers(serverKeyStore.keyStore)); in assertUsableForTLSPeerAuthentication()
/cts/tests/tests/security/src/android/security/cts/
DCertificateTest.java122 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in createWfaKeyStore() local
123 keyStore.load(null, null); in createWfaKeyStore()
127 keyStore.setCertificateEntry(String.format("%d", index++), cert); in createWfaKeyStore()
129 return keyStore; in createWfaKeyStore()
173 KeyStore keyStore = KeyStore.getInstance("AndroidCAStore"); in getDeviceCertificates() local
174 keyStore.load(null, null); in getDeviceCertificates()
176 List<String> aliases = Collections.list(keyStore.aliases()); in getDeviceCertificates()
181 assertTrue(keyStore.isCertificateEntry(alias)); in getDeviceCertificates()
182 X509Certificate certificate = (X509Certificate) keyStore.getCertificate(alias); in getDeviceCertificates()
/cts/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/
DAdminActionBookkeepingTest.java97 KeyStore keyStore = KeyStore.getInstance("AndroidCAStore"); in testGetPolicyInstalledCaCerts() local
98 keyStore.load(null, null); in testGetPolicyInstalledCaCerts()
99 assertNull(keyStore.getCertificateAlias(cert)); in testGetPolicyInstalledCaCerts()
101 final String alias = keyStore.getCertificateAlias(cert); in testGetPolicyInstalledCaCerts()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/security/
DScreenLockBoundKeysTest.java115 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in createKey() local
116 keyStore.load(null); in createKey()
144 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in tryEncrypt() local
145 keyStore.load(null); in tryEncrypt()
146 SecretKey secretKey = (SecretKey) keyStore.getKey(KEY_NAME, null); in tryEncrypt()
DFingerprintBoundKeysTest.java131 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in createKey() local
132 keyStore.load(null); in createKey()
180 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in encryptInternal() local
181 keyStore.load(null); in encryptInternal()
182 SecretKey secretKey = (SecretKey) keyStore.getKey(KEY_NAME, null); in encryptInternal()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DAdminActionBookkeepingTest.java194 KeyStore keyStore = KeyStore.getInstance("AndroidCAStore"); in testGetPolicyInstalledCaCerts() local
195 keyStore.load(null, null); in testGetPolicyInstalledCaCerts()
196 assertNull(keyStore.getCertificateAlias(cert)); in testGetPolicyInstalledCaCerts()
198 final String alias = keyStore.getCertificateAlias(cert); in testGetPolicyInstalledCaCerts()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DAuthenticationBoundKeyTestActivity.java214 KeyStore keyStore = KeyStore.getInstance(KEYSTORE_NAME); in createKey() local
215 keyStore.load(null); in createKey()
242 KeyStore keyStore = KeyStore.getInstance(KEYSTORE_NAME); in loadSecretKey() local
243 keyStore.load(null); in loadSecretKey()
244 return (SecretKey) keyStore.getKey(getKeyName(testType), null); in loadSecretKey()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DDelegatedCertInstallerTest.java196 KeyStore keyStore = KeyStore.getInstance("AndroidCAStore"); in testCaCertsOperations() local
197 keyStore.load(null, null); in testCaCertsOperations()
198 assertNull(keyStore.getCertificateAlias(caCert)); in testCaCertsOperations()
209 final String alias = keyStore.getCertificateAlias(caCert); in testCaCertsOperations()
/cts/tests/tests/webkit/src/android/webkit/cts/
DWebViewSslTest.java1019 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in onReceivedClientCertRequest() local
1020 keyStore.load(null); in onReceivedClientCertRequest()
1022 keyStore.setEntry( in onReceivedClientCertRequest()
1027 key = (PrivateKey) keyStore.getKey("fake1", null); in onReceivedClientCertRequest()
/cts/libs/testserver/src/android/webkit/cts/
DTestWebServer.java536 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in getKeyManagers() local
537 keyStore.load(inputStream, PASSWORD.toCharArray()); in getKeyManagers()
542 keyManagerFactory.init(keyStore, PASSWORD.toCharArray()); in getKeyManagers()
DCtsTestServer.java905 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in getKeyManagers() local
906 keyStore.load(inputStream, PASSWORD.toCharArray()); in getKeyManagers()
911 keyManagerFactory.init(keyStore, PASSWORD.toCharArray()); in getKeyManagers()