/external/conscrypt/repackaged/testing/src/main/java/com/android/org/conscrypt/java/security/ |
D | TestKeyStore.java | 162 public final KeyStore keyStore; field in TestKeyStore 169 private TestKeyStore(KeyStore keyStore, char[] storePassword, char[] keyPassword) { in TestKeyStore() argument 170 this.keyStore = keyStore; in TestKeyStore() 173 this.keyManagers = createKeyManagers(keyStore, storePassword); in TestKeyStore() 174 this.trustManagers = createTrustManagers(keyStore); in TestKeyStore() 178 public static KeyManager[] createKeyManagers(KeyStore keyStore, char[] storePassword) { in createKeyManagers() argument 182 kmf.init(keyStore, storePassword); in createKeyManagers() 189 public static TrustManager[] createTrustManagers(final KeyStore keyStore) { in createTrustManagers() argument 193 tmf.init(keyStore); in createTrustManagers() 201 return new TestKeyStore(keyStore, storePassword, keyPassword); in copy() [all …]
|
/external/conscrypt/testing/src/main/java/org/conscrypt/java/security/ |
D | TestKeyStore.java | 160 public final KeyStore keyStore; field in TestKeyStore 167 private TestKeyStore(KeyStore keyStore, char[] storePassword, char[] keyPassword) { in TestKeyStore() argument 168 this.keyStore = keyStore; in TestKeyStore() 171 this.keyManagers = createKeyManagers(keyStore, storePassword); in TestKeyStore() 172 this.trustManagers = createTrustManagers(keyStore); in TestKeyStore() 176 public static KeyManager[] createKeyManagers(KeyStore keyStore, char[] storePassword) { in createKeyManagers() argument 180 kmf.init(keyStore, storePassword); in createKeyManagers() 187 public static TrustManager[] createTrustManagers(final KeyStore keyStore) { in createTrustManagers() argument 191 tmf.init(keyStore); in createTrustManagers() 199 return new TestKeyStore(keyStore, storePassword, keyPassword); in copy() [all …]
|
/external/conscrypt/repackaged/common/src/test/java/com/android/org/conscrypt/javax/net/ssl/ |
D | KeyManagerFactoryTest.java | 138 KeyStore.Builder builder = KeyStore.Builder.newInstance(getTestKeyStore().keyStore, pp); in test_KeyManagerFactory() 157 kmf.init(getTestKeyStore().keyStore, getTestKeyStore().storePassword); in test_KeyManagerFactory() 349 kmf.init(new NoGetEntryKeyStore(getTestKeyStore().keyStore), in test_KeyManagerFactory_Conscrypt() 355 public NoGetEntryKeyStore(KeyStore keyStore) throws Exception { in NoGetEntryKeyStore() argument 356 super(new NoGetEntryKeyStoreSpi(keyStore), keyStore.getProvider(), keyStore.getType()); in NoGetEntryKeyStore() 366 private final KeyStore keyStore; field in KeyManagerFactoryTest.NoGetEntryKeyStoreSpi 368 public NoGetEntryKeyStoreSpi(KeyStore keyStore) { in NoGetEntryKeyStoreSpi() argument 369 this.keyStore = keyStore; in NoGetEntryKeyStoreSpi() 381 return keyStore.getKey(s, chars); in engineGetKey() 390 return keyStore.getCertificateChain(s); in engineGetCertificateChain() [all …]
|
D | TrustManagerFactoryTest.java | 116 PKIXParameters pp = new PKIXParameters(getTestKeyStore().keyStore); in test_TrustManagerFactory() 126 PKIXBuilderParameters pbp = new PKIXBuilderParameters(getTestKeyStore().keyStore, xcs); in test_TrustManagerFactory() 145 tmf.init(getTestKeyStore().keyStore); in test_TrustManagerFactory() 230 final KeyStore keyStore = TestKeyStore.createKeyStore(); in test_TrustManagerFactory_intermediate() local 231 keyStore.setCertificateEntry("alias", chain[1]); in test_TrustManagerFactory_intermediate() 238 tmf.init(keyStore); in test_TrustManagerFactory_intermediate()
|
D | KeyStoreBuilderParametersTest.java | 70 testKeyStore.keyStore, new PasswordProtection(testKeyStore.storePassword)); in test_init_Builder() 93 testKeyStore1.keyStore, new PasswordProtection(testKeyStore1.storePassword)); in test_init_List() 95 testKeyStore2.keyStore, new PasswordProtection(testKeyStore2.storePassword)); in test_init_List()
|
/external/conscrypt/common/src/test/java/org/conscrypt/javax/net/ssl/ |
D | KeyManagerFactoryTest.java | 134 KeyStore.Builder builder = KeyStore.Builder.newInstance(getTestKeyStore().keyStore, pp); in test_KeyManagerFactory() 153 kmf.init(getTestKeyStore().keyStore, getTestKeyStore().storePassword); in test_KeyManagerFactory() 345 kmf.init(new NoGetEntryKeyStore(getTestKeyStore().keyStore), in test_KeyManagerFactory_Conscrypt() 351 public NoGetEntryKeyStore(KeyStore keyStore) throws Exception { in NoGetEntryKeyStore() argument 352 super(new NoGetEntryKeyStoreSpi(keyStore), keyStore.getProvider(), keyStore.getType()); in NoGetEntryKeyStore() 362 private final KeyStore keyStore; field in KeyManagerFactoryTest.NoGetEntryKeyStoreSpi 364 public NoGetEntryKeyStoreSpi(KeyStore keyStore) { in NoGetEntryKeyStoreSpi() argument 365 this.keyStore = keyStore; in NoGetEntryKeyStoreSpi() 377 return keyStore.getKey(s, chars); in engineGetKey() 386 return keyStore.getCertificateChain(s); in engineGetCertificateChain() [all …]
|
D | TrustManagerFactoryTest.java | 112 PKIXParameters pp = new PKIXParameters(getTestKeyStore().keyStore); in test_TrustManagerFactory() 122 PKIXBuilderParameters pbp = new PKIXBuilderParameters(getTestKeyStore().keyStore, xcs); in test_TrustManagerFactory() 141 tmf.init(getTestKeyStore().keyStore); in test_TrustManagerFactory() 226 final KeyStore keyStore = TestKeyStore.createKeyStore(); in test_TrustManagerFactory_intermediate() local 227 keyStore.setCertificateEntry("alias", chain[1]); in test_TrustManagerFactory_intermediate() 234 tmf.init(keyStore); in test_TrustManagerFactory_intermediate()
|
D | KeyStoreBuilderParametersTest.java | 66 testKeyStore.keyStore, new PasswordProtection(testKeyStore.storePassword)); in test_init_Builder() 89 testKeyStore1.keyStore, new PasswordProtection(testKeyStore1.storePassword)); in test_init_List() 91 testKeyStore2.keyStore, new PasswordProtection(testKeyStore2.storePassword)); in test_init_List()
|
/external/wycheproof/keystore-cts/java/android/keystore/cts/util/ |
D | KeyStoreUtil.java | 70 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in saveKeysToKeystore() local 71 keyStore.load(null); in saveKeysToKeystore() 72 keyStore.setEntry(alias, in saveKeysToKeystore() 75 return keyStore; in saveKeysToKeystore() 80 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in saveSecretKeyToKeystore() local 81 keyStore.load(null); in saveSecretKeyToKeystore() 82 keyStore.setEntry(alias, in saveSecretKeyToKeystore() 85 return keyStore; in saveSecretKeyToKeystore() 89 KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); in cleanUpKeyStore() local 90 keyStore.load(null); in cleanUpKeyStore() [all …]
|
/external/okhttp/mockwebserver/src/main/java/com/squareup/okhttp/internal/ |
D | SslContextBuilder.java | 93 KeyStore keyStore = newEmptyKeyStore(password); in build() local 100 keyStore.setKeyEntry("private", chain[0].keyPair.getPrivate(), password, certificates); in build() 104 keyStore.setCertificateEntry("cert_" + i, trustedCertificates.get(i)); in build() 110 keyManagerFactory.init(keyStore, password); in build() 113 trustManagerFactory.init(keyStore); in build() 122 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in newEmptyKeyStore() local 124 keyStore.load(in, password); in newEmptyKeyStore() 125 return keyStore; in newEmptyKeyStore()
|
/external/conscrypt/common/src/main/java/org/conscrypt/ |
D | KeyManagerFactoryImpl.java | 42 private KeyStore keyStore; field in KeyManagerFactoryImpl 55 keyStore = ks; in engineInit() 62 keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in engineInit() 67 keyStore.load(null, null); in engineInit() 83 keyStore.load(fis, pwd); in engineInit() 115 if (keyStore == null) { in engineGetKeyManagers() 118 return new KeyManager[] { new KeyManagerImpl(keyStore, pwd) }; in engineGetKeyManagers()
|
D | TrustManagerFactoryImpl.java | 53 private KeyStore keyStore; field in TrustManagerFactoryImpl 61 keyStore = ks; in engineInit() 63 keyStore = Platform.getDefaultCertKeyStore(); in engineInit() 82 if (keyStore == null) { in engineGetTrustManagers() 86 return new TrustManager[] { new TrustManagerImpl(keyStore) }; in engineGetTrustManagers()
|
D | KeyManagerImpl.java | 59 KeyManagerImpl(KeyStore keyStore, char[] pwd) { in KeyManagerImpl() argument 63 aliases = keyStore.aliases(); in KeyManagerImpl() 70 if (keyStore.entryInstanceOf(alias, PrivateKeyEntry.class)) { in KeyManagerImpl() 73 entry = (PrivateKeyEntry) keyStore in KeyManagerImpl() 78 PrivateKey key = (PrivateKey) keyStore.getKey(alias, pwd); in KeyManagerImpl() 79 Certificate[] certs = keyStore.getCertificateChain(alias); in KeyManagerImpl()
|
D | TrustManagerImpl.java | 153 public TrustManagerImpl(KeyStore keyStore) { in TrustManagerImpl() argument 154 this(keyStore, null); in TrustManagerImpl() 157 public TrustManagerImpl(KeyStore keyStore, CertPinManager manager) { in TrustManagerImpl() argument 158 this(keyStore, manager, null); in TrustManagerImpl() 161 public TrustManagerImpl(KeyStore keyStore, CertPinManager manager, in TrustManagerImpl() argument 163 this(keyStore, manager, certStore, null); in TrustManagerImpl() 166 public TrustManagerImpl(KeyStore keyStore, CertPinManager manager, in TrustManagerImpl() argument 169 this(keyStore, manager, certStore, blocklist, null, null, null); in TrustManagerImpl() 175 public TrustManagerImpl(KeyStore keyStore, CertPinManager manager, in TrustManagerImpl() argument 190 if ("AndroidCAStore".equals(keyStore.getType()) in TrustManagerImpl() [all …]
|
/external/conscrypt/repackaged/common/src/main/java/com/android/org/conscrypt/ |
D | KeyManagerFactoryImpl.java | 44 private KeyStore keyStore; field in KeyManagerFactoryImpl 57 keyStore = ks; in engineInit() 64 keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in engineInit() 69 keyStore.load(null, null); in engineInit() 85 keyStore.load(fis, pwd); in engineInit() 117 if (keyStore == null) { in engineGetKeyManagers() 120 return new KeyManager[] { new KeyManagerImpl(keyStore, pwd) }; in engineGetKeyManagers()
|
D | TrustManagerFactoryImpl.java | 55 private KeyStore keyStore; field in TrustManagerFactoryImpl 63 keyStore = ks; in engineInit() 65 keyStore = Platform.getDefaultCertKeyStore(); in engineInit() 84 if (keyStore == null) { in engineGetTrustManagers() 88 return new TrustManager[] { new TrustManagerImpl(keyStore) }; in engineGetTrustManagers()
|
D | KeyManagerImpl.java | 60 KeyManagerImpl(KeyStore keyStore, char[] pwd) { in KeyManagerImpl() argument 64 aliases = keyStore.aliases(); in KeyManagerImpl() 71 if (keyStore.entryInstanceOf(alias, PrivateKeyEntry.class)) { in KeyManagerImpl() 74 entry = (PrivateKeyEntry) keyStore.getEntry( in KeyManagerImpl() 79 PrivateKey key = (PrivateKey) keyStore.getKey(alias, pwd); in KeyManagerImpl() 80 Certificate[] certs = keyStore.getCertificateChain(alias); in KeyManagerImpl()
|
D | TrustManagerImpl.java | 156 public TrustManagerImpl(KeyStore keyStore) { in TrustManagerImpl() argument 157 this(keyStore, null); in TrustManagerImpl() 160 public TrustManagerImpl(KeyStore keyStore, CertPinManager manager) { in TrustManagerImpl() argument 161 this(keyStore, manager, null); in TrustManagerImpl() 166 KeyStore keyStore, CertPinManager manager, ConscryptCertStore certStore) { in TrustManagerImpl() argument 167 this(keyStore, manager, certStore, null); in TrustManagerImpl() 170 public TrustManagerImpl(KeyStore keyStore, CertPinManager manager, ConscryptCertStore certStore, in TrustManagerImpl() argument 172 this(keyStore, manager, certStore, blocklist, null, null, null); in TrustManagerImpl() 178 public TrustManagerImpl(KeyStore keyStore, CertPinManager manager, ConscryptCertStore certStore, in TrustManagerImpl() argument 193 if ("AndroidCAStore".equals(keyStore.getType()) in TrustManagerImpl() [all …]
|
/external/okhttp/samples/guide/src/main/java/com/squareup/okhttp/recipes/ |
D | CustomTrust.java | 169 KeyStore keyStore = newEmptyKeyStore(password); in sslContextForTrustedCertificates() local 173 keyStore.setCertificateEntry(certificateAlias, certificate); in sslContextForTrustedCertificates() 179 keyManagerFactory.init(keyStore, password); in sslContextForTrustedCertificates() 182 trustManagerFactory.init(keyStore); in sslContextForTrustedCertificates() 194 KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); in newEmptyKeyStore() local 196 keyStore.load(in, password); in newEmptyKeyStore() 197 return keyStore; in newEmptyKeyStore()
|
/external/conscrypt/testing/src/main/java/org/conscrypt/javax/net/ssl/ |
D | TestSSLContext.java | 342 return new TestSSLContext(client != null ? client.keyStore : null, in build() 343 clientStorePassword, server != null ? server.keyStore : null, in build() 386 public static void assertCertificateInKeyStore(Principal principal, KeyStore keyStore) in assertCertificateInKeyStore() argument 390 for (String alias : Collections.list(keyStore.aliases())) { in assertCertificateInKeyStore() 391 if (!keyStore.isCertificateEntry(alias)) { in assertCertificateInKeyStore() 394 X509Certificate keyStoreCertificate = (X509Certificate) keyStore.getCertificate(alias); in assertCertificateInKeyStore() 402 public static void assertCertificateInKeyStore(Certificate certificate, KeyStore keyStore) in assertCertificateInKeyStore() argument 405 for (String alias : Collections.list(keyStore.aliases())) { in assertCertificateInKeyStore() 406 if (!keyStore.isCertificateEntry(alias)) { in assertCertificateInKeyStore() 409 Certificate keyStoreCertificate = keyStore.getCertificate(alias); in assertCertificateInKeyStore()
|
/external/conscrypt/repackaged/testing/src/main/java/com/android/org/conscrypt/javax/net/ssl/ |
D | TestSSLContext.java | 347 return new TestSSLContext(client != null ? client.keyStore : null, in build() 348 clientStorePassword, server != null ? server.keyStore : null, in build() 391 public static void assertCertificateInKeyStore(Principal principal, KeyStore keyStore) in assertCertificateInKeyStore() argument 395 for (String alias : Collections.list(keyStore.aliases())) { in assertCertificateInKeyStore() 396 if (!keyStore.isCertificateEntry(alias)) { in assertCertificateInKeyStore() 399 X509Certificate keyStoreCertificate = (X509Certificate) keyStore.getCertificate(alias); in assertCertificateInKeyStore() 407 public static void assertCertificateInKeyStore(Certificate certificate, KeyStore keyStore) in assertCertificateInKeyStore() argument 410 for (String alias : Collections.list(keyStore.aliases())) { in assertCertificateInKeyStore() 411 if (!keyStore.isCertificateEntry(alias)) { in assertCertificateInKeyStore() 414 Certificate keyStoreCertificate = keyStore.getCertificate(alias); in assertCertificateInKeyStore()
|
/external/nist-sip/java/gov/nist/core/net/ |
D | SslNetworkLayer.java | 77 KeyStore keyStore = KeyStore.getInstance(keyStoreType); in SslNetworkLayer() local 79 keyStore.load(new FileInputStream(keyStoreFile), keyStorePassword); in SslNetworkLayer() 82 kmFactory.init(keyStore, keyStorePassword); in SslNetworkLayer()
|
/external/wycheproof/keystore-cts/java/com/google/security/wycheproof/testcases/ |
D | JsonEcdhTest.java | 126 KeyStore keyStore = KeyStoreUtil.saveKeysToKeystore(KEY_ALIAS_1, pubKey, privKey, in testEcdhComp() local 131 PrivateKey keyStorePrivateKey = (PrivateKey) keyStore.getKey(KEY_ALIAS_1, null); in testEcdhComp() 132 PublicKey publicKey = keyStore.getCertificate(KEY_ALIAS_1).getPublicKey(); in testEcdhComp()
|
D | RsaEncryptionTest.java | 91 KeyStore keyStore = KeyStoreUtil.saveKeysToKeystore(KEY_ALIAS_SIG, pubKey, intermediateKey, in getPrivateKey() local 96 return (PrivateKey) keyStore.getKey(KEY_ALIAS_SIG, null); in getPrivateKey()
|
D | JsonCipherTest.java | 88 KeyStore keyStore = KeyStoreUtil.saveSecretKeyToKeystore(KEY_ALIAS_1, keySpec, in initCipher() local 96 SecretKey keyStoreKey = (SecretKey) keyStore.getKey(KEY_ALIAS_1, null); in initCipher()
|