Searched defs:chain (Results 1 - 19 of 19) sorted by relevance

/libcore/luni/src/main/java/javax/net/ssl/
H A DX509TrustManager.java30 * 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/crypto/src/main/java/org/conscrypt/
H A DChainStrengthAnalyzer.java28 public static final void check(X509Certificate[] chain) throws CertificateException { argument
29 for (X509Certificate cert : chain) {
H A DPinFailureLogger.java33 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 DCertPinManager.java65 * Given a hostname and a certificate chain this verifies that the chain includes
68 * If the chain doesn't include those certs and is in enforcing mode, then this method
71 public boolean chainIsNotPinned(String hostname, List<X509Certificate> chain) argument
78 return entry.chainIsNotPinned(chain);
H A DPinListEntry.java40 * 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 DTrustedCertificateKeyStoreSpi.java58 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
H A DTrustManagerImpl.java61 * The CertPinManager, which validates the chain against a host-to-pin mapping
185 @Override public void checkClientTrusted(X509Certificate[] chain, String authType) argument
187 checkTrusted(chain, authType, null, true);
190 @Override public void checkServerTrusted(X509Certificate[] chain, String authType) argument
192 checkTrusted(chain, authType, null, false);
197 * chain is pinned appropriately for that host. If null, it does not check for pinned certs.
200 public List<X509Certificate> checkServerTrusted(X509Certificate[] chain, String authType, argument
202 return checkTrusted(chain, authType, host, false);
213 private List<X509Certificate> checkTrusted(X509Certificate[] chain, String authType, argument
216 if (chain
324 cleanupCertChainAndFindTrustAnchors(X509Certificate[] chain, Set<TrustAnchor> trustAnchors) argument
[all...]
/libcore/xml/src/main/java/org/xmlpull/v1/
H A DXmlPullParserException.java36 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 DTestTrustManager.java59 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/crypto/src/test/java/org/conscrypt/
H A DCertPinManagerTest.java32 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 DTrustManagerImplTest.java93 // fail on short chain with only root trusted
95 // succeed on longer chain, learn intermediate
97 // now we can validate the short chain
101 // We should ignore duplicate cruft in the certificate chain
194 private void assertValid(X509Certificate[] chain, X509TrustManager tm) throws Exception { argument
197 tmi.checkServerTrusted(chain, "RSA");
199 tm.checkServerTrusted(chain, "RSA");
202 private void assertValidPinned(X509Certificate[] chain, X509TrustManager tm, String hostname, argument
206 List<X509Certificate> checkedChain = tmi.checkServerTrusted(chain, "RSA", hostname);
209 tm.checkServerTrusted(chain, "RS
212 assertInvalid(X509Certificate[] chain, X509TrustManager tm) argument
225 assertInvalidPinned(X509Certificate[] chain, X509TrustManager tm, String hostname) argument
[all...]
/libcore/luni/src/main/java/java/security/
H A DKeyStoreSpi.java58 * 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 DKeyStore.java256 * 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 DMyKeyStore.java93 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 DMyKeyStoreSpi.java69 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 DTestKeyStoreSpi.java198 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 DHandshakeCompletedEventTest.java557 * 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 DTestKeyStore.java451 // don't need certificate chain
898 Certificate[] chain = keyStore.getCertificateChain(alias);
899 if (chain == null) {
900 out.println("No certificate chain associated with key");
903 for (int i = 0; i < chain.length; i++) {
904 out.println("Certificate chain element #" + i);
905 out.println(chain[i]);
915 public static void assertChainLength(Object[] chain) { argument
917 * Note chain is Object[] to support both
921 assertEquals(3, chain
[all...]
/libcore/luni/src/test/java/libcore/java/net/
H A DURLConnectionTest.java2464 public void checkClientTrusted(X509Certificate[] chain, String authType) argument
2466 calls.add("checkClientTrusted " + certificatesToString(chain) + " " + authType);
2469 public void checkServerTrusted(X509Certificate[] chain, String authType) argument
2471 calls.add("checkServerTrusted " + certificatesToString(chain) + " " + authType);

Completed in 468 milliseconds