/libcore/luni/src/main/java/javax/net/ssl/ |
H A D | X509TrustManager.java | 30 * Checks whether the specified certificate chain (partial or complete) can 34 * @param chain 35 * the certificate chain to validate. 39 * if the certificate chain can't be validated or isn't trusted. 41 * if the specified certificate chain is empty or {@code null}, 45 public void checkClientTrusted(X509Certificate[] chain, String authType) argument 50 * Checks whether the specified certificate chain (partial or complete) can 54 * @param chain 55 * the certificate chain to validate. 59 * if the certificate chain ca 65 checkServerTrusted(X509Certificate[] chain, String authType) argument [all...] |
/libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ |
H A D | PinFailureLogger.java | 33 List<X509Certificate> chain) { 39 writeToLog(cn, chainContainsUserCert, pinIsEnforcing, chain); 46 List<X509Certificate> chain) { 54 for (X509Certificate cert : chain) { 31 log(String cn, boolean chainContainsUserCert, boolean pinIsEnforcing, List<X509Certificate> chain) argument 44 writeToLog(String cn, boolean chainContainsUserCert, boolean pinIsEnforcing, List<X509Certificate> chain) argument
|
H A D | PinListEntry.java | 40 * Determines whether a failed match here will prevent the chain from being accepted. If true, 41 * an unpinned chain will log and cause a match failure. If false, it will merely log. 91 * Checks the given chain against the pin list corresponding to this entry. 97 public boolean chainIsNotPinned(List<X509Certificate> chain) { argument 98 for (X509Certificate cert : chain) { 104 logPinFailure(chain); 139 private boolean chainContainsUserCert(List<X509Certificate> chain) { argument 143 for (X509Certificate cert : chain) { 151 private void logPinFailure(List<X509Certificate> chain) { argument 152 PinFailureLogger.log(cn, chainContainsUserCert(chain), enforcin [all...] |
H A D | CertPinManager.java | 66 * Given a hostname and a certificate chain this verifies that the chain includes 69 * If the chain doesn't include those certs and is in enforcing mode, then this method 72 public boolean chainIsNotPinned(String hostname, List<X509Certificate> chain) argument 79 return entry.chainIsNotPinned(chain);
|
H A D | TrustManagerImpl.java | 56 * The CertPinManager, which validates the chain against a host-to-pin mapping 180 @Override public void checkClientTrusted(X509Certificate[] chain, String authType) argument 182 checkTrusted(chain, authType, null); 185 @Override public void checkServerTrusted(X509Certificate[] chain, String authType) argument 187 checkTrusted(chain, authType, null); 192 * chain is pinned appropriately for that host. If null, it does not check for pinned certs. 195 public List<X509Certificate> checkServerTrusted(X509Certificate[] chain, String authType, argument 197 return checkTrusted(chain, authType, host); 208 private List<X509Certificate> checkTrusted(X509Certificate[] chain, String authType, String host) argument 210 if (chain 312 cleanupCertChainAndFindTrustAnchors(X509Certificate[] chain, Set<TrustAnchor> trustAnchors) argument [all...] |
H A D | TrustedCertificateKeyStoreSpi.java | 58 String alias, Key key, char[] password, Certificate[] chain) { 62 @Override public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) { argument 57 engineSetKeyEntry( String alias, Key key, char[] password, Certificate[] chain) argument
|
/libcore/xml/src/main/java/org/xmlpull/v1/ |
H A D | XmlPullParserException.java | 36 public XmlPullParserException(String msg, XmlPullParser parser, Throwable chain) { argument 39 + (chain == null ? "" : "caused by: "+chain)); 45 this.detail = chain;
|
/libcore/support/src/test/java/libcore/javax/net/ssl/ |
H A D | TestTrustManager.java | 59 public void checkClientTrusted(X509Certificate[] chain, String authType) argument 62 + "chain=" + chain.length + " " 66 trustManager.checkClientTrusted(chain, authType); 80 public void checkServerTrusted(X509Certificate[] chain, String authType) argument 83 + "chain=" + chain.length + " " 87 trustManager.checkServerTrusted(chain, authType);
|
/libcore/luni/src/test/java/org/apache/harmony/xnet/provider/jsse/ |
H A D | CertPinManagerTest.java | 32 private X509Certificate[] chain; field in class:CertPinManagerTest 60 chain = (X509Certificate[]) pke.getCertificateChain(); 61 X509Certificate root = chain[2]; 62 X509Certificate server = chain[0]; 97 // verify that the shorter chain doesn't work for a name matching the longer 98 assertTrue("short chain long uri failed", 100 // verify that the longer chain doesn't work for a name matching the shorter 101 assertTrue("long chain short uri failed", 103 // verify that the shorter chain works for the shorter domain 104 assertTrue("short chain shor [all...] |
H A D | TrustManagerImplTest.java | 93 // fail on short chain with only root trusted 95 // succeed on longer chain, learn intermediate 97 // now we can validate the short chain 178 private void assertValid(X509Certificate[] chain, X509TrustManager tm) throws Exception { argument 181 tmi.checkServerTrusted(chain, "RSA"); 183 tm.checkServerTrusted(chain, "RSA"); 186 private void assertValidPinned(X509Certificate[] chain, X509TrustManager tm, String hostname, argument 190 List<X509Certificate> checkedChain = tmi.checkServerTrusted(chain, "RSA", hostname); 193 tm.checkServerTrusted(chain, "RSA"); 196 private void assertInvalid(X509Certificate[] chain, X509TrustManage argument 209 assertInvalidPinned(X509Certificate[] chain, X509TrustManager tm, String hostname) argument [all...] |
/libcore/luni/src/main/java/java/security/ |
H A D | KeyStoreSpi.java | 58 * Returns the certificate chain for the entry with the given alias. 62 * @return the certificate chain for the entry with the given alias, or 88 * Associates the given alias with the key, password and certificate chain. 98 * @param chain 99 * the certificate chain. 104 * if {@code key} is a {@code PrivateKey} and {@code chain} does 108 char[] password, Certificate[] chain) throws KeyStoreException; 111 * Associates the given alias with a key and a certificate chain. 119 * @param chain 120 * the certificate chain 107 engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) argument 127 engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) argument [all...] |
H A D | KeyStore.java | 256 * Returns the certificate chain for the entry with the given alias. 260 * @return the certificate chain for the entry with the given alias, or 307 * Associates the given alias with the key, password and certificate chain. 317 * @param chain 318 * the certificate chain. 322 * if {@code key} is a {@code PrivateKey} and {@code chain} does 328 Certificate[] chain) throws KeyStoreException { 333 // Certificate chain is required for PrivateKey 334 if (key != null && key instanceof PrivateKey && (chain == null || chain 327 setKeyEntry(String alias, Key key, char[] password, Certificate[] chain) argument 364 setKeyEntry(String alias, byte[] key, Certificate[] chain) argument 1178 private Certificate[] chain; field in class:KeyStore.PrivateKeyEntry 1200 PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain) argument [all...] |
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/ |
H A D | MyKeyStore.java | 93 Certificate[] chain) throws KeyStoreException { 98 if (chain != null) { 99 Chain.put(alias, chain); 104 public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) argument 118 if (chain != null) { 119 Chain.put(alias, chain); 92 engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) argument
|
H A D | MyKeyStoreSpi.java | 69 Certificate[] chain) throws KeyStoreException { 74 public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) argument 68 engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) argument
|
H A D | TestKeyStoreSpi.java | 198 Certificate[] chain) throws KeyStoreException { 207 if (chain == null || chain.length == 0) { 216 public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) argument 197 engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) argument
|
/libcore/luni/src/test/java/tests/api/javax/net/ssl/ |
H A D | HandshakeCompletedEventTest.java | 557 * chain it sees, so it can later be queried. 561 private X509Certificate[] chain; field in class:HandshakeCompletedEventTest.TestTrustManager 565 public void checkClientTrusted(X509Certificate[] chain, String authType) { argument 566 this.chain = chain; 570 public void checkServerTrusted(X509Certificate[] chain, String authType) { argument 571 this.chain = chain; 580 return chain; 588 java.security.cert.X509Certificate[] chain, Strin 587 checkClientTrusted( java.security.cert.X509Certificate[] chain, String authType) argument 593 checkServerTrusted( java.security.cert.X509Certificate[] chain, String authType) argument [all...] |
/libcore/support/src/test/java/libcore/java/security/ |
H A D | TestKeyStore.java | 422 // don't need certificate chain 851 Certificate[] chain = keyStore.getCertificateChain(alias); 852 if (chain == null) { 853 out.println("No certificate chain associated with key"); 856 for (int i = 0; i < chain.length; i++) { 857 out.println("Certificate chain element #" + i); 858 out.println(chain[i]); 868 public static void assertChainLength(Object[] chain) { argument 870 * Note chain is Object[] to support both 874 assertEquals(3, chain [all...] |
/libcore/luni/src/test/java/libcore/java/net/ |
H A D | URLConnectionTest.java | 2396 public void checkClientTrusted(X509Certificate[] chain, String authType) argument 2398 calls.add("checkClientTrusted " + certificatesToString(chain) + " " + authType); 2401 public void checkServerTrusted(X509Certificate[] chain, String authType) argument 2403 calls.add("checkServerTrusted " + certificatesToString(chain) + " " + authType);
|
/libcore/luni/src/main/native/ |
H A D | org_apache_harmony_xnet_provider_jsse_NativeCrypto.cpp | 2089 static jobjectArray getCertificateBytes(JNIEnv* env, const STACK_OF(X509)* chain) argument 2091 if (chain == NULL) { 2096 int count = sk_X509_num(chain); 2107 X509* cert = sk_X509_value(chain, i); 3028 Unique_sk_X509 chain(sk_X509_new_null()); 3029 if (chain.get() == NULL) { 3030 jniThrowOutOfMemoryError(env, "Unable to allocate local certificate chain"); 3031 JNI_TRACE("ssl=%p NativeCrypto_SSL_use_certificate => chain allocation error", ssl); 3035 if (!sk_X509_push(chain.get(), certificatesX509.release(i))) { 3041 int chainResult = SSL_use_certificate_chain(ssl, chain [all...] |