Home
last modified time | relevance | path

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

12

/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
DMyKeyStore.java63 public Key engineGetKey(String alias, char[] password) in engineGetKey() argument
65 if (Keys.containsKey(alias)) { in engineGetKey()
66 return (Key) Keys.get(alias); in engineGetKey()
71 public Certificate[] engineGetCertificateChain(String alias) { in engineGetCertificateChain() argument
72 if (Chain.containsKey(alias)) { in engineGetCertificateChain()
73 return (Certificate[]) Chain.get(alias); in engineGetCertificateChain()
78 public Certificate engineGetCertificate(String alias) { in engineGetCertificate() argument
79 if (Cert.containsKey(alias)) { in engineGetCertificate()
80 return (Certificate) Cert.get(alias); in engineGetCertificate()
85 public Date engineGetCreationDate(String alias) { in engineGetCreationDate() argument
[all …]
DTestKeyStoreSpi.java68 public boolean engineContainsAlias(String alias) { in engineContainsAlias() argument
69 return aliases.containsKey(alias); in engineContainsAlias()
73 public void engineDeleteEntry(String alias) throws KeyStoreException { in engineDeleteEntry() argument
74 throw new KeyStoreException("entry " + alias + " cannot be deleted"); in engineDeleteEntry()
78 public Certificate engineGetCertificate(String alias) { in engineGetCertificate() argument
79 return (Certificate) aliases.get(alias); in engineGetCertificate()
88 for (Map.Entry<String, Object> alias : aliases.entrySet()) { in engineGetCertificateAlias()
89 if (alias.getValue() == cert) { in engineGetCertificateAlias()
90 return alias.getKey(); in engineGetCertificateAlias()
98 public Certificate[] engineGetCertificateChain(String alias) { in engineGetCertificateChain() argument
[all …]
DMyKeyStoreSpi.java48 public Key engineGetKey(String alias, char[] password) in engineGetKey() argument
53 public Certificate[] engineGetCertificateChain(String alias) { in engineGetCertificateChain() argument
57 public Certificate engineGetCertificate(String alias) { in engineGetCertificate() argument
58 if (alias.equals("test_engineEntryInstanceOf_Alias1")) { in engineGetCertificate()
64 public Date engineGetCreationDate(String alias) { in engineGetCreationDate() argument
68 public void engineSetKeyEntry(String alias, Key key, char[] password, in engineSetKeyEntry() argument
74 public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) in engineSetKeyEntry() argument
80 public void engineSetCertificateEntry(String alias, Certificate cert) in engineSetCertificateEntry() argument
86 public void engineDeleteEntry(String alias) throws KeyStoreException { in engineDeleteEntry() argument
95 public boolean engineContainsAlias(String alias) { in engineContainsAlias() argument
[all …]
/libcore/luni/src/main/java/java/security/
DKeyStoreSpi.java54 public abstract Key engineGetKey(String alias, char[] password) in engineGetKey() argument
65 public abstract Certificate[] engineGetCertificateChain(String alias); in engineGetCertificateChain() argument
75 public abstract Certificate engineGetCertificate(String alias); in engineGetCertificate() argument
85 public abstract Date engineGetCreationDate(String alias); in engineGetCreationDate() argument
107 public abstract void engineSetKeyEntry(String alias, Key key, in engineSetKeyEntry() argument
127 public abstract void engineSetKeyEntry(String alias, byte[] key, in engineSetKeyEntry() argument
144 public abstract void engineSetCertificateEntry(String alias, in engineSetCertificateEntry() argument
156 public abstract void engineDeleteEntry(String alias) in engineDeleteEntry() argument
175 public abstract boolean engineContainsAlias(String alias); in engineContainsAlias() argument
192 public abstract boolean engineIsKeyEntry(String alias); in engineIsKeyEntry() argument
[all …]
DKeyStore.java247 public final Key getKey(String alias, char[] password) in getKey() argument
253 return implSpi.engineGetKey(alias, password); in getKey()
266 public final Certificate[] getCertificateChain(String alias) throws KeyStoreException { in getCertificateChain() argument
270 return implSpi.engineGetCertificateChain(alias); in getCertificateChain()
283 public final Certificate getCertificate(String alias) throws KeyStoreException { in getCertificate() argument
287 return implSpi.engineGetCertificate(alias); in getCertificate()
300 public final Date getCreationDate(String alias) throws KeyStoreException { in getCreationDate() argument
304 return implSpi.engineGetCreationDate(alias); in getCreationDate()
328 public final void setKeyEntry(String alias, Key key, char[] password, in setKeyEntry() argument
338 implSpi.engineSetKeyEntry(alias, key, password, chain); in setKeyEntry()
[all …]
DProvider.java493 for (String alias : s.getAliases()) { in putService()
494 aliasTable.put(key(s.type, alias), s); in putService()
518 for (String alias: s.getAliases()) { in removeService()
519 aliasTable.remove(key(s.type, alias)); in removeService()
616 for (String alias : ser.aliases) { in removeFromPropertyServiceTable()
617 propertyAliasTable.remove(key(serviceName, alias)); in removeFromPropertyServiceTable()
963 /*package*/ void addAlias(String alias) { in addAlias() argument
967 aliases.add(alias); in addAlias()
/libcore/luni/src/main/java/org/apache/harmony/security/utils/
DAlgNameMapper.java190 String alias = key.substring(keyPrfix2find.length()); in selectEntries() local
193 if (isOID(alias)) { in selectEntries()
194 if (alias.startsWith("OID.")) { in selectEntries()
195 alias = alias.substring(4); in selectEntries()
198 boolean oid2AlgContains = oid2AlgMap.containsKey(alias); in selectEntries()
202 oid2AlgMap.put(alias, algUC); in selectEntries()
205 alg2OidMap.put(algUC, alias); in selectEntries()
211 } else if (!algAliasesMap.containsKey(alias.toUpperCase(Locale.US))) { in selectEntries()
212 algAliasesMap.put(alias.toUpperCase(Locale.US), alg); in selectEntries()
225 public static boolean isOID(String alias) { in isOID() argument
[all …]
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DKeyManagerFactoryTest.java168 for (String alias : aliases) { in test_X509KeyManager()
169 test_X509KeyManager_alias(km, alias, keyType, false, empty); in test_X509KeyManager()
179 for (String alias : aliases) { in test_X509KeyManager()
180 test_X509KeyManager_alias(km, alias, keyType, false, empty); in test_X509KeyManager()
189 String alias = km.chooseClientAlias(array, null, null); in test_X509KeyManager() local
190 test_X509KeyManager_alias(km, alias, keyType, false, empty); in test_X509KeyManager()
193 String alias = km.chooseServerAlias(keyType, null, null); in test_X509KeyManager() local
194 test_X509KeyManager_alias(km, alias, keyType, false, empty); in test_X509KeyManager()
208 String alias = km.chooseEngineClientAlias(array, null, null); in test_X509ExtendedKeyManager() local
209 test_X509KeyManager_alias(km, alias, keyType, false, empty); in test_X509ExtendedKeyManager()
[all …]
DX509KeyManagerTest.java65 String alias = ((X509KeyManager) manager).chooseClientAlias(keyTypes, null, null); in test_ChooseClientAlias_KeyType() local
67 assertNotNull(alias); in test_ChooseClientAlias_KeyType()
69 assertNull(alias); in test_ChooseClientAlias_KeyType()
/libcore/support/src/test/java/libcore/javax/net/ssl/
DTestKeyManager.java116 private String dumpAlias(String alias) { in dumpAlias() argument
118 out.println(alias); in dumpAlias()
119 return alias; in dumpAlias()
122 public X509Certificate[] getCertificateChain(String alias) { in getCertificateChain() argument
125 out.print(alias); in getCertificateChain()
126 return dumpCerts(keyManager.getCertificateChain(alias)); in getCertificateChain()
159 for (String alias : aliases) { in dumpAliases()
160 out.print(alias); in dumpAliases()
167 public PrivateKey getPrivateKey(String alias) { in getPrivateKey() argument
170 out.print(alias); in getPrivateKey()
[all …]
DForwardingX509ExtendedKeyManager.java48 public X509Certificate[] getCertificateChain(String alias) { in getCertificateChain() argument
49 return delegate.getCertificateChain(alias); in getCertificateChain()
73 public PrivateKey getPrivateKey(String alias) { in getPrivateKey() argument
74 return delegate.getPrivateKey(alias); in getPrivateKey()
DTestSSLContext.java225 for (String alias: Collections.list(keyStore.aliases())) { in assertCertificateInKeyStore()
226 if (!keyStore.isCertificateEntry(alias)) { in assertCertificateInKeyStore()
229 X509Certificate keyStoreCertificate = (X509Certificate) keyStore.getCertificate(alias); in assertCertificateInKeyStore()
241 for (String alias: Collections.list(keyStore.aliases())) { in assertCertificateInKeyStore()
242 if (!keyStore.isCertificateEntry(alias)) { in assertCertificateInKeyStore()
245 Certificate keyStoreCertificate = keyStore.getCertificate(alias); in assertCertificateInKeyStore()
DRandomPrivateKeyX509ExtendedKeyManager.java45 public PrivateKey getPrivateKey(String alias) { in getPrivateKey() argument
46 PrivateKey originalPrivateKey = super.getPrivateKey(alias); in getPrivateKey()
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DKeyStoreTest.java152 String alias = "keyEntry"; in testSetKeyEntry() local
156 new KeyStoreTestSupport.MCertificate(alias, kk), in testSetKeyEntry()
157 new KeyStoreTestSupport.MCertificate(alias, kk) }; in testSetKeyEntry()
165 kss[i].setKeyEntry(alias, kk, certs); in testSetKeyEntry()
166 res = kss[i].getKey(alias, pwd).getEncoded(); in testSetKeyEntry()
171 assertEquals(kss[i].getCertificateChain(alias).length, certs.length); in testSetKeyEntry()
172 kss[i].setKeyEntry(alias, kk, null); in testSetKeyEntry()
173 res = kss[i].getKey(alias, pwd).getEncoded(); in testSetKeyEntry()
178 assertNull(kss[i].getCertificateChain(alias)); in testSetKeyEntry()
259 String alias = "alias"; in testEngineEntryInstanceOf() local
[all …]
DKeyStore2Test.java299 String alias = keyTest.getCertificateAlias(cert[1]); in test_getCertificateAliasLjava_security_cert_Certificate() local
301 "alias1", alias); in test_getCertificateAliasLjava_security_cert_Certificate()
306 alias = keyTest.getCertificateAlias(cert[0]); in test_getCertificateAliasLjava_security_cert_Certificate()
308 "alias2", alias); in test_getCertificateAliasLjava_security_cert_Certificate()
884 String alias = "alias"; in test_entryInstanceOf() local
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()
/libcore/support/src/test/java/libcore/java/security/
DTestKeyStore.java717 for (String alias : Collections.list(keyStore.aliases())) { in privateKey()
718 if (!keyStore.entryInstanceOf(alias, PrivateKeyEntry.class)) { in privateKey()
721 PrivateKeyEntry privateKey = (PrivateKeyEntry) keyStore.getEntry(alias, password); in privateKey()
772 for (String alias : Collections.list(keyStore.aliases())) { in issuer()
773 if (!keyStore.entryInstanceOf(alias, TrustedCertificateEntry.class)) { in issuer()
777 (TrustedCertificateEntry) keyStore.getEntry(alias, null); in issuer()
817 for (String alias : Collections.list(keyStore.aliases())) { in rootCertificate()
818 if (!keyStore.entryInstanceOf(alias, TrustedCertificateEntry.class)) { in rootCertificate()
822 (TrustedCertificateEntry) keyStore.getEntry(alias, null); in rootCertificate()
854 public KeyStore.Entry getEntryByAlias(String alias) { in getEntryByAlias() argument
[all …]
/libcore/support/src/test/java/org/apache/harmony/xnet/tests/support/
DX509KeyManagerImpl.java141 String alias = null; in chooseClientAlias() local
148 alias = keyTest.getCertificateAlias(cert[0]); in chooseClientAlias()
150 alias = keyTest.getCertificateAlias(cert[1]); in chooseClientAlias()
152 return alias; in chooseClientAlias()
185 String alias = null; in chooseServerAlias() local
191 return alias = keyTest.getCertificateAlias(cert[0]); in chooseServerAlias()
/libcore/luni/src/main/java/javax/net/ssl/
DX509KeyManager.java74 public X509Certificate[] getCertificateChain(String alias); in getCertificateChain() argument
112 public PrivateKey getPrivateKey(String alias); in getPrivateKey() argument
/libcore/luni/src/main/java/java/nio/charset/
DCharset.java185 for (String alias : aliases) { in Charset()
186 checkCharsetName(alias); in Charset()
187 this.aliasesSet.add(alias); in Charset()
263 for (String alias : cs.aliasesSet) { in cacheCharset()
264 CACHED_CHARSETS.put(alias, canonicalCharset); in cacheCharset()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DX509KeyManagerTest.java742 for (String alias : aliases) { in assertKnownAliases()
743 assertKnownAlias(alias); in assertKnownAliases()
747 private void assertKnownAlias(String alias) { in assertKnownAlias() argument
748 String a = alias.toLowerCase(); in assertKnownAlias()
750 … assertTrue("Expected one of clientkey_01, clientkey_02, clientkey_03. Received: " + alias, okay); in assertKnownAlias()
DX509ExtendedKeyManagerTest.java149 public X509Certificate[] getCertificateChain(String alias) { in getCertificateChain() argument
172 public PrivateKey getPrivateKey(String alias) { in getPrivateKey() argument
/libcore/luni/src/test/java/libcore/java/security/
DKeyStoreTest.java297 String alias = aliases.nextElement(); in clearKeyStore() local
298 ks.deleteEntry(alias); in clearKeyStore()
304 … public static void setPrivateKeyNoPassword(KeyStore ks, String alias, PrivateKeyEntry privateKey) in setPrivateKeyNoPassword() argument
306 ks.setKeyEntry(alias, privateKey.getPrivateKey(), null, privateKey.getCertificateChain()); in setPrivateKeyNoPassword()
311 public static void setPrivateKey(KeyStore ks, String alias) throws Exception { in setPrivateKey() argument
312 setPrivateKey(ks, alias, getPrivateKey()); in setPrivateKey()
315 String alias, in setPrivateKey() argument
318 ks.setKeyEntry(alias, in setPrivateKey()
327 public static void setPrivateKeyBytes(KeyStore ks, String alias) throws Exception { in setPrivateKeyBytes() argument
328 setPrivateKeyBytes(ks, alias, getPrivateKey()); in setPrivateKeyBytes()
[all …]
DProviderTest.java154 private static final Pattern alias = Pattern.compile("Alg\\.Alias\\.([^.]*)\\.(.*)"); field in ProviderTest
201 Matcher m = alias.matcher(key); in test_Provider_Properties()
228 String alias = entry.getKey(); in test_Provider_Properties() local
230 assertTrue("Could not find implementation " + actual + " for alias " + alias, in test_Provider_Properties()
/libcore/luni/src/main/java/org/apache/harmony/security/fortress/
DServices.java141 for (String alias : Engine.door.getAliases(service)) { in initServiceInfo()
142 key = type + "." + alias.toUpperCase(Locale.US); in initServiceInfo()
/libcore/luni/src/main/java/java/security/cert/
DPKIXParameters.java114 String alias = (String) i.nextElement(); in PKIXParameters() local
115 if (keyStore.isCertificateEntry(alias)) { in PKIXParameters()
118 Certificate c = keyStore.getCertificate(alias); in PKIXParameters()

12