/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | KeyStoreBuilderTest.java | 27 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 …]
|
D | KeyStore2Test.java | 29 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 …]
|
D | KSTrustedCertificateEntryTest.java | 25 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 …]
|
D | KSSecretKeyEntryTest.java | 25 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 …]
|
D | KSPrivateKeyEntryTest.java | 25 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 …]
|
D | KeyStore4Test.java | 15 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 …]
|
D | KSPasswordProtectionTest.java | 25 import java.security.KeyStore; 51 KeyStore.PasswordProtection ksPWP = new KeyStore.PasswordProtection(pass); in testGetPassword() 68 ksPWP = new KeyStore.PasswordProtection(null); in testGetPassword() 86 KeyStore.PasswordProtection ksPWP; in testGetProtectionAlgorithm() 88 ksPWP = new KeyStore.PasswordProtection( in testGetProtectionAlgorithm() 93 ksPWP = new KeyStore.PasswordProtection( in testGetProtectionAlgorithm() 110 KeyStore.PasswordProtection ksPWP = in testGetProtectionParameters() 111 new KeyStore.PasswordProtection( in testGetProtectionParameters() 114 ksPWP = new KeyStore.PasswordProtection( in testGetProtectionParameters()
|
D | KeyStoreTest.java | 26 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 …]
|
D | KSCallbackHandlerProtectionTest.java | 26 import java.security.KeyStore; 49 new KeyStore.CallbackHandlerProtection(null); in testCallbackHandlerProtection() 64 new KeyStore.CallbackHandlerProtection(new TestCallbackHandler()); in testCallbackHandlerProtection() 77 KeyStore.CallbackHandlerProtection ksCBH = new KeyStore.CallbackHandlerProtection(cbh); in testGetCallBackHandler()
|
D | KeyStoreSpiTest.java | 24 import java.security.KeyStore.LoadStoreParameter; 25 import java.security.KeyStore.Entry; 26 import java.security.KeyStore.ProtectionParameter; 27 import java.security.KeyStore; 69 KeyStore.PrivateKeyEntry.class)); in test_engineEntryInstanceOf() 73 KeyStore.SecretKeyEntry.class)); in test_engineEntryInstanceOf() 77 KeyStore.TrustedCertificateEntry.class)); in test_engineEntryInstanceOf() 80 ksSpi.engineEntryInstanceOf(null, KeyStore.TrustedCertificateEntry.class); in test_engineEntryInstanceOf() 100 KeyStore.SecretKeyEntry fakeEntry = new KeyStore.SecretKeyEntry(new SecretKey() { in testKeyStoreSpi01() 123 ksSpi.engineSetEntry("", new KeyStore.TrustedCertificateEntry( in testKeyStoreSpi01()
|
/libcore/ojluni/src/main/java/java/security/ |
D | KeyStoreSpi.java | 31 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 …]
|
D | KeyStore.java | 211 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/ojluni/annotations/hiddenapi/java/security/ |
D | KeyStore.java | 31 public class KeyStore { class 33 protected KeyStore( in KeyStore() method in KeyStore 40 public static java.security.KeyStore getInstance(java.lang.String type) in getInstance() 45 public static java.security.KeyStore getInstance( in getInstance() 51 public static java.security.KeyStore getInstance( in getInstance() 149 public final void store(java.security.KeyStore.LoadStoreParameter param) in store() 161 public final void load(java.security.KeyStore.LoadStoreParameter param) in load() 167 public final java.security.KeyStore.Entry getEntry( in getEntry() 168 java.lang.String alias, java.security.KeyStore.ProtectionParameter protParam) in getEntry() 176 java.security.KeyStore.Entry entry, in setEntry() [all …]
|
/libcore/luni/src/test/java/tests/security/cert/ |
D | PKIXBuilderParametersTest.java | 30 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/luni/src/test/java/libcore/java/security/ |
D | DomainLoadStoreParameterTest.java | 22 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/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | TrustManagerFactorySpiTest.java | 20 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()
|
D | KeyStoreBuilderParametersTest.java | 20 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 {
|
D | KeyManagerFactorySpiTest.java | 19 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()
|
D | TrustManagerFactory1Test.java | 23 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/security/tests/support/ |
D | MyLoadStoreParams.java | 25 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/support/src/test/java/org/apache/harmony/xnet/tests/support/ |
D | MyTrustManagerFactorySpi.java | 21 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()
|
D | MyKeyManagerFactorySpi.java | 21 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()
|
/libcore/luni/src/test/java/tests/targets/security/ |
D | KeyStoreTest.java | 24 import java.security.KeyStore; 25 import java.security.KeyStore.Entry; 26 import java.security.KeyStore.PasswordProtection; 27 import java.security.KeyStore.PrivateKeyEntry; 28 import java.security.KeyStore.ProtectionParameter; 52 KeyStore keyStore = null; in testKeyStoreLoad() 54 keyStore = KeyStore.getInstance(algorithmName); in testKeyStoreLoad() 79 KeyStore keyStore = null; in testKeyStoreCreate() 81 keyStore = KeyStore.getInstance(algorithmName); in testKeyStoreCreate()
|
/libcore/luni/src/test/java/tests/targets/security/cert/ |
D | CertPathBuilderTestPKIX.java | 18 import java.security.KeyStore; 19 import java.security.KeyStore.PrivateKeyEntry; 47 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in getCertPathParameters()
|
/libcore/support/src/test/java/libcore/java/security/ |
D | TestKeyStore.java | 27 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 …]
|