/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/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);
|
H A D | TestSSLContext.java | 198 * certificate chain from the given KeyStore and a TrustManager 251 X509Certificate[] chain = (X509Certificate[]) serverChain; 252 trustManager.checkServerTrusted(chain, chain[0].getPublicKey().getAlgorithm()); 258 X509Certificate[] chain = (X509Certificate[]) clientChain; 259 trustManager.checkClientTrusted(chain, chain[0].getPublicKey().getAlgorithm());
|
/libcore/crypto/src/main/java/org/conscrypt/ |
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 | 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 | TrustManagerImpl.java | 61 * 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...] |
H A D | ChainStrengthAnalyzer.java | 28 public static final void check(X509Certificate[] chain) throws CertificateException { argument 29 for (X509Certificate cert : chain) {
|
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
|
H A D | CertPinManager.java | 65 * 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 D | KeyManagerImpl.java | 154 final Certificate[] chain = entry.getCertificateChain(); 155 final Certificate cert = chain[0]; 193 // check that a certificate in the chain was issued by one of the specified issuers 194 for (Certificate certFromChain : chain) {
|
H A D | OpenSSLSessionImpl.java | 218 javax.security.cert.X509Certificate[] chain 223 chain[i] = javax.security.cert.X509Certificate.getInstance(encoded); 225 return chain;
|
/libcore/luni/src/main/java/java/security/ |
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/luni/src/test/java/libcore/javax/net/ssl/ |
H A D | TrustManagerFactoryTest.java | 156 X509Certificate[] chain = (X509Certificate[]) pke.getCertificateChain(); 159 tm.checkClientTrusted(chain, keyType); 164 tm.checkServerTrusted(chain, keyType); 169 tm.checkClientTrusted(chain, keyType); 170 tm.checkServerTrusted(chain, keyType); 212 // chain should be server/intermediate/root 214 X509Certificate[] chain = (X509Certificate[])pke.getCertificateChain(); 215 assertEquals(3, chain.length); 221 keyStore.setCertificateEntry("alias", chain[1]); 240 tm.checkClientTrusted(chain, "RS [all...] |
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
H A D | KSPrivateKeyEntryTest.java | 58 * Test for <code>PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain)</code> 73 * Test for <code>PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain)</code> 75 * Assertion: throws NullPointerException when chain is null 76 * and throws IllegalArgumentException when chain length is 0 79 Certificate[] chain = null; 82 new KeyStore.PrivateKeyEntry(pk, chain); 83 fail("NullPointerException must be thrown when chain is null"); 87 chain = new Certificate[0]; 88 new KeyStore.PrivateKeyEntry(pk, chain); 89 fail("IllegalArgumentException must be thrown when chain lengt [all...] |
H A D | KeyStorePrivateKeyEntryTest.java | 71 // If all the certificate in the chain is X509Certificate, 75 Certificate[] chain = privateKeyEntry.getCertificateChain(); 76 assertTrue(chain instanceof X509Certificate[]);
|
H A D | KeyStore2Test.java | 276 // testing for a certificate chain 351 assertNull("the certificate chain returned from getCertificateChain is NOT null", 632 Certificate[] chain = { new MyCertificate("DSA", testEncoding), 634 KeyStore.PrivateKeyEntry pkEntry = new KeyStore.PrivateKeyEntry(getPrivateKey(), chain); 664 Certificate[] chain = { new MyCertificate(type, testEncoding), 673 chain); 675 privateKey1, chain); 755 Certificate[] chain = { new MyCertificate(type, testEncoding), 768 KeyStore.PrivateKeyEntry pke1 = new KeyStore.PrivateKeyEntry(getPrivateKey(), chain); 769 KeyStore.PrivateKeyEntry pke2 = new KeyStore.PrivateKeyEntry(privateKey1, chain); [all...] |
/libcore/crypto/src/test/java/org/conscrypt/ |
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 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...] |
H A D | ChainStrengthAnalyzerTest.java | 119 X509Certificate[] chain = {cert}; 120 ChainStrengthAnalyzer.check(chain);
|
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...] |
/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/luni/src/main/java/org/apache/harmony/security/utils/ |
H A D | JarUtils.java | 230 LinkedList chain = new LinkedList(); 231 chain.add(0, signer); 235 return (X509Certificate[])chain.toArray(new X509Certificate[1]); 246 chain.add(issuerCert); 253 return (X509Certificate[])chain.toArray(new X509Certificate[count]);
|