/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | KeyStore4Test.java | 31 KeyStore keyStore; field in KeyStore4Test 43 keyStore = KeyStore.getInstance(KEY_STORE_TYPE); in setUp() 44 keyStore.load(null, "PASSWORD".toCharArray()); in setUp() 191 Key key = keyStore.getKey("keyalias", null); in testGetKey() 202 keyStore.getKey("certalias", null); in testGetKey() 224 keyStore.getKey("unknownalias", null); in testGetKey() 235 keyStore.getKey("unknownalias", "PASSWORD".toCharArray()); in testGetKey() 250 String alias = keyStore.getCertificateAlias(TestKeyStoreSpi.CERT); in testGetCertificateAlias() 265 keyStore.getCertificateAlias(null); in testGetCertificateAlias() 274 String certificateAlias = keyStore.getCertificateAlias(new MyCertificate("fake", null)); in testGetCertificateAlias() [all …]
|
D | KeyStore2Test.java | 476 byte[] keyStore = creatCertificate(); in test_loadLjava_io_InputStream$C() 478 InputStream in = new ByteArrayInputStream(keyStore); in test_loadLjava_io_InputStream$C() 487 in = new ByteArrayInputStream(keyStore); in test_loadLjava_io_InputStream$C() 873 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in test_entryInstanceOf() local 876 keyStore.entryInstanceOf("anAlias", KeyStore.SecretKeyEntry.class); in test_entryInstanceOf() 881 keyStore.load(null, "pwd".toCharArray()); in test_entryInstanceOf() 888 keyStore.setKeyEntry(alias, getPrivateKey(), "pwd".toCharArray(), chain); in test_entryInstanceOf() 889 assertTrue(keyStore.entryInstanceOf(alias, KeyStore.PrivateKeyEntry.class)); in test_entryInstanceOf() 890 assertFalse(keyStore.entryInstanceOf(alias, KeyStore.SecretKeyEntry.class)); in test_entryInstanceOf() 891 assertFalse(keyStore.entryInstanceOf(alias, KeyStore.TrustedCertificateEntry.class)); in test_entryInstanceOf() [all …]
|
D | KeyStoreTest.java | 250 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in testEngineEntryInstanceOf() local 251 keyStore.load(null, "pwd".toCharArray()); in testEngineEntryInstanceOf() 260 keyStore.setKeyEntry(alias, secretKey, "pwd".toCharArray(), null); in testEngineEntryInstanceOf() 263 assertTrue(keyStore.entryInstanceOf(alias, in testEngineEntryInstanceOf() 267 assertFalse(keyStore.entryInstanceOf(alias, in testEngineEntryInstanceOf()
|
/libcore/support/src/test/java/libcore/java/security/ |
D | TestKeyStore.java | 161 public final KeyStore keyStore; field in TestKeyStore 168 private TestKeyStore(KeyStore keyStore, char[] storePassword, char[] keyPassword) { in TestKeyStore() argument 169 this.keyStore = keyStore; in TestKeyStore() 172 this.keyManagers = createKeyManagers(keyStore, storePassword); in TestKeyStore() 173 this.trustManagers = createTrustManagers(keyStore); in TestKeyStore() 177 public static KeyManager[] createKeyManagers(KeyStore keyStore, char[] storePassword) { in createKeyManagers() argument 181 kmf.init(keyStore, storePassword); in createKeyManagers() 188 public static TrustManager[] createTrustManagers(final KeyStore keyStore) { in createTrustManagers() argument 192 tmf.init(keyStore); in createTrustManagers() 236 CLIENT = new TestKeyStore(createClient(INTERMEDIATE_CA.keyStore), null, null); in initCerts() [all …]
|
/libcore/luni/src/test/java/tests/targets/security/cert/ |
D | CertPathValidatorTestPKIX.java | 56 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in setUp() local 57 keyStore.load(null, null); in setUp() 65 keyStore.setCertificateEntry("selfSignedCert", selfSignedcertificate); in setUp() 77 PKIXBuilderParameters parameters = new PKIXBuilderParameters(keyStore, in setUp() 88 params = new PKIXParameters(keyStore); in setUp()
|
D | CertPathBuilderTestPKIX.java | 47 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in getCertPathParameters() local 48 keyStore.load(null, null); in getCertPathParameters() 49 keyStore.setCertificateEntry("rootCA", clientAndCa.getRootCertificate("RSA")); in getCertPathParameters() 62 PKIXBuilderParameters parameters = new PKIXBuilderParameters(keyStore, targetConstraints); in getCertPathParameters()
|
D | CertificateTest.java | 743 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in createPKIXParams() local 744 keyStore.load(null, null); in createPKIXParams() 745 keyStore.setCertificateEntry("selfSignedCert", certs[0]); in createPKIXParams() 748 params = new PKIXParameters(keyStore); in createPKIXParams()
|
/libcore/support/src/test/java/org/apache/harmony/xnet/tests/support/ |
D | MyTrustManagerFactorySpi.java | 63 private KeyStore keyStore; field in MyTrustManagerFactorySpi.Parameters 65 this.keyStore = ks; in Parameters() 68 return keyStore; in getKeyStore()
|
D | MyKeyManagerFactorySpi.java | 70 private KeyStore keyStore; field in MyKeyManagerFactorySpi.Parameters 73 this.keyStore = ks; in Parameters() 77 return keyStore; in getKeyStore()
|
/libcore/luni/src/test/java/libcore/java/security/ |
D | CodeSourceTest.java | 58 KeyStore keyStore = KeyStore.getInstance("AndroidCAStore"); in createCodeSigner() local 59 keyStore.load(null); in createCodeSigner() 62 for (Enumeration<String> aliases = keyStore.aliases(); aliases.hasMoreElements(); ) { in createCodeSigner() 64 Certificate certificate = keyStore.getCertificate(alias); in createCodeSigner()
|
D | ProtectionDomainTest.java | 90 KeyStore keyStore = KeyStore.getInstance("AndroidCAStore"); in createCodeSigner() local 91 keyStore.load(null); in createCodeSigner() 94 for (Enumeration<String> aliases = keyStore.aliases(); aliases.hasMoreElements(); ) { in createCodeSigner() 96 Certificate certificate = keyStore.getCertificate(alias); in createCodeSigner()
|
/libcore/support/src/test/java/libcore/javax/net/ssl/ |
D | TestSSLContext.java | 270 return create(client.keyStore, client.storePassword, in createWithAdditionalKeyManagers() 271 server.keyStore, server.storePassword, in createWithAdditionalKeyManagers() 331 KeyStore keyStore) throws Exception { in assertCertificateInKeyStore() argument 334 for (String alias: Collections.list(keyStore.aliases())) { in assertCertificateInKeyStore() 335 if (!keyStore.isCertificateEntry(alias)) { in assertCertificateInKeyStore() 338 X509Certificate keyStoreCertificate = (X509Certificate) keyStore.getCertificate(alias); in assertCertificateInKeyStore() 348 KeyStore keyStore) throws Exception { in assertCertificateInKeyStore() argument 350 for (String alias: Collections.list(keyStore.aliases())) { in assertCertificateInKeyStore() 351 if (!keyStore.isCertificateEntry(alias)) { in assertCertificateInKeyStore() 354 Certificate keyStoreCertificate = keyStore.getCertificate(alias); in assertCertificateInKeyStore()
|
/libcore/ojluni/src/main/java/java/security/ |
D | KeyStore.java | 1708 public static Builder newInstance(final KeyStore keyStore, in newInstance() argument 1710 if ((keyStore == null) || (protectionParameter == null)) { in newInstance() 1713 if (keyStore.initialized == false) { in newInstance() 1721 return keyStore; in newInstance() 1810 private KeyStore keyStore; field in KeyStore.FileBuilder 1826 if (keyStore != null) { in getKeyStore() 1827 return keyStore; in getKeyStore() 1897 keyStore = AccessController.doPrivileged(action, context); in getKeyStore() 1898 return keyStore; in getKeyStore() 1911 if (keyStore == null) { in getProtectionParameter()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | SSLServerSocketTest.java | 400 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in getKeyManagers() local 401 keyStore.load(inputStream, PASSWORD.toCharArray()); in getKeyManagers() 406 keyManagerFactory.init(keyStore, PASSWORD.toCharArray()); in getKeyManagers()
|
D | SSLSessionTest.java | 612 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in getKeyStore() local 613 keyStore.load(inputStream, PASSWORD.toCharArray()); in getKeyStore() 615 return keyStore; in getKeyStore() 622 private KeyManager[] getKeyManagers(KeyStore keyStore) throws Exception { in getKeyManagers() argument 625 keyManagerFactory.init(keyStore, PASSWORD.toCharArray()); in getKeyManagers()
|
D | HandshakeCompletedEventTest.java | 538 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in getKeyManagers() local 539 keyStore.load(inputStream, PASSWORD.toCharArray()); in getKeyManagers() 544 keyManagerFactory.init(keyStore, PASSWORD.toCharArray()); in getKeyManagers()
|
/libcore/luni/src/test/java/libcore/java/security/cert/ |
D | PKIXParametersTest.java | 65 assertEquals(2, new PKIXParameters(server.keyStore).getTrustAnchors().size()); in keyStoreConstructor() 168 PKIXParameters parameters = new PKIXParameters(TestKeyStore.getServer().keyStore); in newPkixParameters()
|
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/ |
D | HttpsURLConnectionTest.java | 725 String keyStore = getKeyStoreFileName(); in getContext() local 726 File keyStoreFile = new File(keyStore); in getContext()
|