Home
last modified time | relevance | path

Searched refs:KeyStore (Results 1 – 25 of 58) sorted by relevance

123

/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DKeyStoreBuilderTest.java27 import java.security.KeyStore;
47 private KeyStore.PasswordProtection protPass = new KeyStore.PasswordProtection(
52 … private KeyStore.CallbackHandlerProtection callbackHand = new KeyStore.CallbackHandlerProtection(
67 "KeyStore." + KeyStore.getDefaultType())[0];
95 KeyStore.Builder.newInstance(null, null); in testNewInstanceKeyStoreProtectionParameter()
102 KeyStore.Builder.newInstance(null, protPass); in testNewInstanceKeyStoreProtectionParameter()
108 KeyStore.Builder ksB; in testNewInstanceKeyStoreProtectionParameter()
110 KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); in testNewInstanceKeyStoreProtectionParameter()
112 KeyStore.Builder.newInstance(ks, null); in testNewInstanceKeyStoreProtectionParameter()
118 KeyStore.PasswordProtection protPass1 = new KeyStore.PasswordProtection( in testNewInstanceKeyStoreProtectionParameter()
[all …]
DKeyStore2Test.java29 import java.security.KeyStore;
143 KeyStore keyTest = KeyStore.getInstance(KeyStore.getDefaultType()); in creatCertificate()
172 KeyStore keyTest = KeyStore.getInstance(KeyStore.getDefaultType()); in test_aliases()
217 KeyStore keyTest = KeyStore.getInstance(KeyStore.getDefaultType()); in test_containsAliasLjava_lang_String()
254 KeyStore keyTest = KeyStore.getInstance(KeyStore.getDefaultType()); in test_getCertificateLjava_lang_String()
294 KeyStore keyTest = KeyStore.getInstance(KeyStore.getDefaultType()); in test_getCertificateAliasLjava_security_cert_Certificate()
327 KeyStore keyTest = KeyStore.getInstance(KeyStore.getDefaultType()); in test_getCertificateChainLjava_lang_String()
368 KeyStore keyTest = KeyStore.getInstance(KeyStore.getDefaultType()); in test_getInstanceLjava_lang_String()
370 KeyStore.getDefaultType(), keyTest.getType()); in test_getInstanceLjava_lang_String()
385 KeyStore keyTest = KeyStore.getInstance(KeyStore.getDefaultType()); in test_getKeyLjava_lang_String$C()
[all …]
DKSSecretKeyEntryTest.java25 import java.security.KeyStore;
46 new KeyStore.SecretKeyEntry(sk); in testSecretKeyEntry()
54 KeyStore.SecretKeyEntry ske = new KeyStore.SecretKeyEntry(sk); in testSecretKeyEntry()
56 assertTrue(ske instanceof KeyStore.SecretKeyEntry); in testSecretKeyEntry()
71 new KeyStore.SecretKeyEntry(sk, null /* attributes */); in testSecretKeyEntry_nullAttributes()
83 KeyStore.SecretKeyEntry ske = new KeyStore.SecretKeyEntry(sk); in testGetSecretKey()
94 KeyStore.Entry.Attribute myAttribute = new KeyStore.Entry.Attribute() { in testGetAttributes()
105 Set<KeyStore.Entry.Attribute> attributeSet = new HashSet<KeyStore.Entry.Attribute>(); in testGetAttributes()
108 KeyStore.SecretKeyEntry ksSKE = new KeyStore.SecretKeyEntry(sk, attributeSet); in testGetAttributes()
109 Set<KeyStore.Entry.Attribute> returnedAttributeSet = ksSKE.getAttributes(); in testGetAttributes()
[all …]
DKSTrustedCertificateEntryTest.java25 import java.security.KeyStore;
50 new KeyStore.TrustedCertificateEntry(cert); in testTrustedCertificateEntry()
57 KeyStore.TrustedCertificateEntry ksTCE = new KeyStore.TrustedCertificateEntry(cert); in testTrustedCertificateEntry()
59 assertTrue(ksTCE instanceof KeyStore.TrustedCertificateEntry); in testTrustedCertificateEntry()
73 new KeyStore.TrustedCertificateEntry(cert, null /* attributes */); in testSecretKeyEntry_nullAttributes()
85 KeyStore.TrustedCertificateEntry ksTCE = in testGetTrustedCertificate()
86 new KeyStore.TrustedCertificateEntry(cert); in testGetTrustedCertificate()
97 KeyStore.Entry.Attribute myAttribute = new KeyStore.Entry.Attribute() { in testGetAttributes()
108 Set<KeyStore.Entry.Attribute> attributeSet = new HashSet<KeyStore.Entry.Attribute>(); in testGetAttributes()
111 KeyStore.TrustedCertificateEntry ksTCE = in testGetAttributes()
[all …]
DKSPrivateKeyEntryTest.java25 import java.security.KeyStore;
69 new KeyStore.PrivateKeyEntry(pk, certs); in testPrivateKeyEntry01()
85 new KeyStore.PrivateKeyEntry(pk, chain); in testPrivateKeyEntry02()
91 new KeyStore.PrivateKeyEntry(pk, chain); in testPrivateKeyEntry02()
105 new KeyStore.PrivateKeyEntry(testPrivateKey, testChain); in testPrivateKeyEntry03()
120 new KeyStore.PrivateKeyEntry(testPrivateKey, testChain); in testPrivateKeyEntry04()
136 new KeyStore.PrivateKeyEntry(testPrivateKey, testChain, null /* attributes */); in testPrivateKeyEntry05()
148 KeyStore.PrivateKeyEntry ksPKE = new KeyStore.PrivateKeyEntry( in testGetPrivateKey()
160 KeyStore.PrivateKeyEntry ksPKE = new KeyStore.PrivateKeyEntry( in testGetCertificateChain()
176 KeyStore.PrivateKeyEntry ksPKE = new KeyStore.PrivateKeyEntry( in testGetCertificate()
[all …]
DKeyStore4Test.java15 import java.security.KeyStore;
23 import java.security.KeyStore.Entry;
24 import java.security.KeyStore.ProtectionParameter;
31 KeyStore keyStore;
32 KeyStore uninitialized;
33 KeyStore failing;
43 keyStore = KeyStore.getInstance(KEY_STORE_TYPE); in setUp()
50 uninitialized = KeyStore.getInstance(KEY_STORE_TYPE); in setUp()
66 KeyStore ks = KeyStore.getInstance("TestKeyStore"); in testGetInstanceString()
74 KeyStore.getInstance("UnknownKeyStore"); in testGetInstanceString()
[all …]
DKeyStoreTest.java26 import java.security.KeyStore;
74 public KeyStore[] createKS() throws Exception { in createKS()
76 KeyStore[] kpg = new KeyStore[3]; in createKS()
78 kpg[0] = KeyStore.getInstance(defaultType); in createKS()
79 kpg[1] = KeyStore.getInstance(defaultType, defaultProvider); in createKS()
80 kpg[2] = KeyStore.getInstance(defaultType, defaultProviderName); in createKS()
113 KeyStore[] kss = createKS(); in testLoadStore02()
131 KeyStore.LoadStoreParameter lParam = new MyLoadStoreParams( in testLoadStore02()
132 new KeyStore.PasswordProtection(new char[0])); in testLoadStore02()
149 KeyStore[] kss = createKS(); in testSetKeyEntry()
[all …]
DKeyStorePrivateKeyEntryTest.java24 import java.security.KeyStore;
73 KeyStore.PrivateKeyEntry privateKeyEntry = new KeyStore.PrivateKeyEntry( in testGetCertificateChain()
/libcore/ojluni/src/main/java/java/security/
DKeyStoreSpi.java31 import java.security.KeyStore;
32 import java.security.KeyStore.*;
318 public void engineStore(KeyStore.LoadStoreParameter param) in engineStore()
380 public void engineLoad(KeyStore.LoadStoreParameter param) in engineLoad()
389 if (param instanceof KeyStore.SimpleLoadStoreParameter) { in engineLoad()
446 public KeyStore.Entry engineGetEntry(String alias, in engineGetEntry()
447 KeyStore.ProtectionParameter protParam) in engineGetEntry()
457 return new KeyStore.TrustedCertificateEntry in engineGetEntry()
467 if ((protParam == null) || protParam instanceof KeyStore.PasswordProtection) { in engineGetEntry()
478 KeyStore.PasswordProtection pp = in engineGetEntry()
[all …]
DKeyStore.java211 public class KeyStore { class
841 protected KeyStore(KeyStoreSpi keyStoreSpi, Provider provider, String type) in KeyStore() method in KeyStore
883 public static KeyStore getInstance(String type) in getInstance()
888 return new KeyStore((KeyStoreSpi)objs[0], (Provider)objs[1], type); in getInstance()
929 public static KeyStore getInstance(String type, String provider) in getInstance()
936 return new KeyStore((KeyStoreSpi)objs[0], (Provider)objs[1], type); in getInstance()
970 public static KeyStore getInstance(String type, Provider provider) in getInstance()
977 return new KeyStore((KeyStoreSpi)objs[0], (Provider)objs[1], type); in getInstance()
1621 Class<? extends KeyStore.Entry> entryClass) in entryInstanceOf()
1669 public abstract KeyStore getKeyStore() throws KeyStoreException; in getKeyStore()
[all …]
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
DMyLoadStoreParams.java25 import java.security.KeyStore;
31 KeyStore.LoadStoreParameter {
33 KeyStore.ProtectionParameter protPar;
35 public MyLoadStoreParams(KeyStore.ProtectionParameter p) { in MyLoadStoreParams()
39 public KeyStore.ProtectionParameter getProtectionParameter() { in getProtectionParameter()
/libcore/luni/src/test/java/libcore/java/security/
DDomainLoadStoreParameterTest.java22 import java.security.KeyStore;
29 private KeyStore.ProtectionParameter protectionParameter;
35 protectionParameter = new KeyStore.ProtectionParameter() {}; in setUp()
65 Map<String, KeyStore.ProtectionParameter> protectionParameters = in testGetProtectionParams()
69 Map<String, KeyStore.ProtectionParameter> returnedParams = in testGetProtectionParams()
82 Map<String, KeyStore.ProtectionParameter> originalProtectionParameters in testGetProtectionParams()
103 private Map<String, KeyStore.ProtectionParameter> createNonEmptyParameters( in createNonEmptyParameters()
104 String keyStoreName, KeyStore.ProtectionParameter protectionParameter) { in createNonEmptyParameters()
105 Map<String, KeyStore.ProtectionParameter> protectionParameters = new HashMap<>(); in createNonEmptyParameters()
/libcore/luni/src/test/java/tests/security/cert/
DPKIXBuilderParametersTest.java30 import java.security.KeyStore;
185 new PKIXBuilderParameters((KeyStore) null, new X509CertSelector()); in testPKIXBuilderParametersKeyStoreCertSelector01()
200 KeyStore keyTest = KeyStore.getInstance(KeyStore.getDefaultType()); in testPKIXBuilderParametersKeyStoreCertSelector02()
218 KeyStore keyTest = KeyStore.getInstance(KeyStore.getDefaultType()); in testPKIXBuilderParametersKeyStoreCertSelector03()
236 KeyStore keyTest = KeyStore.getInstance(KeyStore.getDefaultType()); in testPKIXBuilderParametersKeyStoreCertSelector04()
267 KeyStore keyTest = KeyStore.getInstance(KeyStore.getDefaultType()); in testGetMaxPathLength()
295 KeyStore keyTest = KeyStore.getInstance(KeyStore.getDefaultType()); in testSetMaxPathLength()
338 KeyStore keyTest = KeyStore.getInstance(KeyStore.getDefaultType()); in testToString()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DTrustManagerFactorySpiTest.java20 import java.security.KeyStore;
59 KeyStore ks = null; in test_engineInit_01()
61 ks = KeyStore.getInstance(KeyStore.getDefaultType()); in test_engineInit_01()
70 tmf.init((KeyStore) null); in test_engineInit_01()
88 KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); in test_engineInit_02()
116 KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); in test_engineGetTrustManagers()
DKeyStoreBuilderParametersTest.java20 import java.security.KeyStore;
34 new KeyStoreBuilderParameters((KeyStore.Builder) null); in test_Constructor01()
40 KeyStore.ProtectionParameter pp = new ProtectionParameterImpl(); in test_Constructor01()
41 KeyStore.Builder bld = KeyStore.Builder.newInstance("testType", null, pp); in test_Constructor01()
97 private static class ProtectionParameterImpl implements KeyStore.ProtectionParameter {
DKeyManagerFactorySpiTest.java19 import java.security.KeyStore;
50 KeyStore ks; in test_engineInit_01()
72 ks = KeyStore.getInstance(KeyStore.getDefaultType()); in test_engineInit_01()
82 KeyStore kst = KeyStore.getInstance(KeyStore.getDefaultType()); in test_engineInit_01()
DTrustManagerFactory1Test.java23 import java.security.KeyStore;
377 KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); in test_getTrustManagers()
394 KeyStore ksNull = null; in test_initLjava_security_KeyStore_01()
410 KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); in test_initLjava_security_KeyStore_02()
446 KeyStore kStore = KeyStore.getInstance(KeyStore.getDefaultType()); in test_initLjavax_net_ssl_ManagerFactoryParameters()
/libcore/support/src/test/java/org/apache/harmony/xnet/tests/support/
DMyTrustManagerFactorySpi.java21 import java.security.KeyStore;
35 protected void engineInit(KeyStore ks) throws KeyStoreException { in engineInit()
63 private KeyStore keyStore;
64 public Parameters (KeyStore ks) { in Parameters()
67 public KeyStore getKeyStore() { in getKeyStore()
DMyKeyManagerFactorySpi.java21 import java.security.KeyStore;
38 protected void engineInit(KeyStore ks, char[] password) in engineInit()
70 private KeyStore keyStore;
72 public Parameters (KeyStore ks, char[] pass) { in Parameters()
76 public KeyStore getKeyStore() { in getKeyStore()
DTrustManagerFactorySpiImpl.java4 import java.security.KeyStore;
14 private static KeyStore ks = null;
17 public void engineInit(KeyStore ks) throws KeyStoreException { in engineInit()
/libcore/luni/src/test/java/tests/targets/security/cert/
DCertPathBuilderTestPKIX.java18 import java.security.KeyStore;
19 import java.security.KeyStore.PrivateKeyEntry;
47 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in getCertPathParameters()
DCertPathValidatorTestPKIX.java19 import java.security.KeyStore;
56 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in setUp()
/libcore/luni/src/test/java/libcore/java/security/cert/
DOldPKIXParametersTest.java27 import java.security.KeyStore;
182 KeyStore store = KeyStore.getInstance("PKCS12"); in testPKIXParametersKeyStore04()
192 store = KeyStore.getInstance("PKCS12"); in testPKIXParametersKeyStore04()
204 KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType()); in testPKIXParametersKeyStore04()
/libcore/support/src/test/java/libcore/java/security/
DTestKeyStore.java27 import java.security.KeyStore;
28 import java.security.KeyStore.PasswordProtection;
29 import java.security.KeyStore.PrivateKeyEntry;
30 import java.security.KeyStore.TrustedCertificateEntry;
161 public final KeyStore keyStore;
168 private TestKeyStore(KeyStore keyStore, char[] storePassword, char[] keyPassword) { in TestKeyStore()
177 public static KeyManager[] createKeyManagers(KeyStore keyStore, char[] storePassword) { in createKeyManagers()
188 public static TrustManager[] createTrustManagers(final KeyStore keyStore) { in createTrustManagers()
495 KeyStore keyStore = createKeyStore(); in build()
540 private KeyStore createKeys(KeyStore keyStore, in createKeys()
[all …]
/libcore/ojluni/src/main/java/sun/security/util/
DAnchorCertificates.java31 import java.security.KeyStore;
55 KeyStore cacerts; in AccessController.doPrivileged()
57 cacerts = KeyStore.getInstance("JKS"); in AccessController.doPrivileged()

123