Home
last modified time | relevance | path

Searched refs:chain (Results 1 – 25 of 47) sorted by relevance

12

/libcore/support/src/test/java/libcore/javax/net/ssl/
DTestTrustManager.java72 public void checkClientTrusted(X509Certificate[] chain, String authType) in checkClientTrusted() argument
75 + "chain=" + chain.length + " " in checkClientTrusted()
79 trustManager.checkClientTrusted(chain, authType); in checkClientTrusted()
88 public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) in checkClientTrusted() argument
92 checkClientTrusted(chain, authType); in checkClientTrusted()
96 + "chain=" + chain.length + " " in checkClientTrusted()
101 extendedTrustManager.checkClientTrusted(chain, authType, socket); in checkClientTrusted()
110 public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) in checkClientTrusted() argument
114 checkClientTrusted(chain, authType); in checkClientTrusted()
118 + "chain=" + chain.length + " " in checkClientTrusted()
[all …]
DTestSSLContext.java366 X509Certificate[] chain = (X509Certificate[]) serverChain; in assertServerCertificateChain() local
367 trustManager.checkServerTrusted(chain, chain[0].getPublicKey().getAlgorithm()); in assertServerCertificateChain()
373 X509Certificate[] chain = (X509Certificate[]) clientChain; in assertClientCertificateChain() local
374 trustManager.checkClientTrusted(chain, chain[0].getPublicKey().getAlgorithm()); in assertClientCertificateChain()
/libcore/ojluni/src/main/java/sun/security/validator/
DValidator.java203 public final X509Certificate[] validate(X509Certificate[] chain) in validate() argument
205 return validate(chain, null, null); in validate()
213 public final X509Certificate[] validate(X509Certificate[] chain, in validate() argument
215 return validate(chain, otherCerts, null); in validate()
233 public final X509Certificate[] validate(X509Certificate[] chain, in validate() argument
236 return validate(chain, otherCerts, null, parameter); in validate()
256 public final X509Certificate[] validate(X509Certificate[] chain, in validate() argument
260 chain = engineValidate(chain, otherCerts, constraints, parameter); in validate()
263 if (chain.length > 1) { in validate()
264 endEntityChecker.check(chain[0], parameter); in validate()
[all …]
DPKIXValidator.java202 X509Certificate[] engineValidate(X509Certificate[] chain, in engineValidate() argument
206 if ((chain == null) || (chain.length == 0)) { in engineValidate()
224 for (int i = 0; i < chain.length; i++) { in engineValidate()
225 X509Certificate cert = chain[i]; in engineValidate()
230 return doBuild(chain, otherCerts, pkixParameters); in engineValidate()
244 return new X509Certificate[] {chain[0]}; in engineValidate()
248 System.arraycopy(chain, 0, newChain, 0, i); in engineValidate()
255 X509Certificate last = chain[chain.length - 1]; in engineValidate()
260 return doValidate(chain, pkixParameters); in engineValidate()
268 if (chain.length > 1) { in engineValidate()
[all …]
DSimpleValidator.java124 X509Certificate[] engineValidate(X509Certificate[] chain, in engineValidate() argument
128 if ((chain == null) || (chain.length == 0)) { in engineValidate()
134 chain = buildTrustedChain(chain); in engineValidate()
145 TrustAnchor anchor = new TrustAnchor(chain[chain.length - 1], null); in engineValidate()
156 int maxPathLength = chain.length - 1; in engineValidate()
157 for (int i = chain.length - 2; i >= 0; i--) { in engineValidate()
158 X509Certificate issuerCert = chain[i + 1]; in engineValidate()
159 X509Certificate cert = chain[i]; in engineValidate()
212 return chain; in engineValidate()
357 private X509Certificate[] buildTrustedChain(X509Certificate[] chain) in buildTrustedChain() argument
[all …]
/libcore/ojluni/src/main/java/sun/security/ssl/
DX509TrustManagerImpl.java99 public void checkClientTrusted(X509Certificate chain[], String authType) in checkClientTrusted() argument
101 checkTrusted(chain, authType, (Socket)null, true); in checkClientTrusted()
105 public void checkServerTrusted(X509Certificate chain[], String authType) in checkServerTrusted() argument
107 checkTrusted(chain, authType, (Socket)null, false); in checkServerTrusted()
118 public void checkClientTrusted(X509Certificate[] chain, String authType, in checkClientTrusted() argument
120 checkTrusted(chain, authType, socket, true); in checkClientTrusted()
124 public void checkServerTrusted(X509Certificate[] chain, String authType, in checkServerTrusted() argument
126 checkTrusted(chain, authType, socket, false); in checkServerTrusted()
130 public void checkClientTrusted(X509Certificate[] chain, String authType, in checkClientTrusted() argument
132 checkTrusted(chain, authType, engine, true); in checkClientTrusted()
[all …]
DSSLContextImpl.java787 public void checkClientTrusted(X509Certificate[] chain, String authType) in checkClientTrusted() argument
789 tm.checkClientTrusted(chain, authType); in checkClientTrusted()
793 public void checkServerTrusted(X509Certificate[] chain, String authType) in checkServerTrusted() argument
795 tm.checkServerTrusted(chain, authType); in checkServerTrusted()
804 public void checkClientTrusted(X509Certificate[] chain, String authType, in checkClientTrusted() argument
806 tm.checkClientTrusted(chain, authType); in checkClientTrusted()
807 checkAdditionalTrust(chain, authType, socket, true); in checkClientTrusted()
811 public void checkServerTrusted(X509Certificate[] chain, String authType, in checkServerTrusted() argument
813 tm.checkServerTrusted(chain, authType); in checkServerTrusted()
814 checkAdditionalTrust(chain, authType, socket, false); in checkServerTrusted()
[all …]
DX509KeyManagerImpl.java283 boolean matches(Certificate[] chain) { in matches() argument
284 if (!chain[0].getPublicKey().getAlgorithm().equals(keyAlgorithm)) { in matches()
290 if (chain.length > 1) { in matches()
293 chain[1].getPublicKey().getAlgorithm()); in matches()
297 X509Certificate issuer = (X509Certificate)chain[0]; in matches()
449 Certificate[] chain, CheckResult checkResult) { in EntryStatus() argument
625 Certificate[] chain = ks.getCertificateChain(alias); in getAliases() local
626 if ((chain == null) || (chain.length == 0)) { in getAliases()
632 for (Certificate cert : chain) { in getAliases()
647 if (keyType.matches(chain)) { in getAliases()
[all …]
/libcore/ojluni/src/main/java/javax/net/ssl/
DX509ExtendedTrustManager.java96 public abstract void checkClientTrusted(X509Certificate[] chain, in checkClientTrusted() argument
144 public abstract void checkServerTrusted(X509Certificate[] chain, in checkServerTrusted() argument
185 public abstract void checkClientTrusted(X509Certificate[] chain, in checkClientTrusted() argument
231 public abstract void checkServerTrusted(X509Certificate[] chain, in checkServerTrusted() argument
DX509TrustManager.java58 public void checkClientTrusted(X509Certificate[] chain, String authType) in checkClientTrusted() argument
84 public void checkServerTrusted(X509Certificate[] chain, String authType) in checkServerTrusted() argument
/libcore/xml/src/main/java/org/xmlpull/v1/
DXmlPullParserException.java36 public XmlPullParserException(String msg, XmlPullParser parser, Throwable chain) { in XmlPullParserException() argument
39 + (chain == null ? "" : "caused by: "+chain)); in XmlPullParserException()
45 this.detail = chain; in XmlPullParserException()
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/
DIntermediateTestOp.java31 public static<T> AbstractPipeline chain(AbstractPipeline upstream, in chain() method
34 return StatelessTestOp.chain(upstream, (StatelessTestOp) op); in chain()
37 return StatefulTestOp.chain(upstream, (StatefulTestOp) op); in chain()
/libcore/luni/src/test/java/libcore/javax/net/ssl/
DTrustManagerFactoryTest.java156 X509Certificate[] chain = (X509Certificate[]) pke.getCertificateChain(); in test_X509TrustManager() local
159 tm.checkClientTrusted(chain, keyType); in test_X509TrustManager()
164 tm.checkServerTrusted(chain, keyType); in test_X509TrustManager()
169 tm.checkClientTrusted(chain, keyType); in test_X509TrustManager()
170 tm.checkServerTrusted(chain, keyType); in test_X509TrustManager()
214 X509Certificate[] chain = (X509Certificate[])pke.getCertificateChain(); in test_TrustManagerFactory_intermediate() local
215 assertEquals(3, chain.length); in test_TrustManagerFactory_intermediate()
221 keyStore.setCertificateEntry("alias", chain[1]); in test_TrustManagerFactory_intermediate()
240 tm.checkClientTrusted(chain, "RSA"); in test_TrustManagerFactory_intermediate()
241 tm.checkServerTrusted(chain, "RSA"); in test_TrustManagerFactory_intermediate()
[all …]
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/
DIntermediateTestOp.java33 public static<T> AbstractPipeline chain(AbstractPipeline upstream, in chain() method
36 return StatelessTestOp.chain(upstream, (StatelessTestOp) op); in chain()
39 return StatefulTestOp.chain(upstream, (StatefulTestOp) op); in chain()
/libcore/ojluni/src/main/java/java/security/
DKeyStore.java395 private final Certificate[] chain; field in KeyStore.PrivateKeyEntry
421 public PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain) { in PrivateKeyEntry() argument
422 if (privateKey == null || chain == null) { in PrivateKeyEntry()
425 if (chain.length == 0) { in PrivateKeyEntry()
430 Certificate[] clonedChain = chain.clone(); in PrivateKeyEntry()
451 this.chain = new X509Certificate[clonedChain.length]; in PrivateKeyEntry()
453 this.chain, 0, clonedChain.length); in PrivateKeyEntry()
455 this.chain = clonedChain; in PrivateKeyEntry()
480 return chain.clone(); in getCertificateChain()
494 return chain[0]; in getCertificate()
[all …]
DKeyStoreSpi.java149 Certificate[] chain) in engineSetKeyEntry() argument
174 Certificate[] chain) in engineSetKeyEntry() argument
476 Certificate[] chain = engineGetCertificateChain(alias); in engineGetEntry() local
477 return new KeyStore.PrivateKeyEntry((PrivateKey)key, chain); in engineGetEntry()
/libcore/ojluni/src/main/java/com/sun/net/ssl/internal/ssl/
DX509ExtendedTrustManager.java90 public abstract void checkClientTrusted(X509Certificate[] chain, in checkClientTrusted() argument
119 public abstract void checkServerTrusted(X509Certificate[] chain, in checkServerTrusted() argument
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DKSPrivateKeyEntryTest.java79 Certificate[] chain = null; in testPrivateKeyEntry02() local
82 new KeyStore.PrivateKeyEntry(pk, chain); in testPrivateKeyEntry02()
87 chain = new Certificate[0]; in testPrivateKeyEntry02()
88 new KeyStore.PrivateKeyEntry(pk, chain); in testPrivateKeyEntry02()
DKeyStore2Test.java632 Certificate[] chain = { new MyCertificate("DSA", testEncoding), in test_deleteEntry() local
634 KeyStore.PrivateKeyEntry pkEntry = new KeyStore.PrivateKeyEntry(getPrivateKey(), chain); in test_deleteEntry()
664 Certificate[] chain = { new MyCertificate(type, testEncoding), in test_getCreationDate() local
673 chain); in test_getCreationDate()
675 privateKey1, chain); in test_getCreationDate()
755 Certificate[] chain = { new MyCertificate(type, testEncoding), in test_getEntry() local
768 KeyStore.PrivateKeyEntry pke1 = new KeyStore.PrivateKeyEntry(getPrivateKey(), chain); in test_getEntry()
769 KeyStore.PrivateKeyEntry pke2 = new KeyStore.PrivateKeyEntry(privateKey1, chain); in test_getEntry()
780 assertTrue(Arrays.equals(chain, pkeActual1.getCertificateChain())); in test_getEntry()
785 assertTrue(Arrays.equals(chain, pkeActual2.getCertificateChain())); in test_getEntry()
[all …]
DKeyStorePrivateKeyEntryTest.java75 Certificate[] chain = privateKeyEntry.getCertificateChain(); in testGetCertificateChain() local
76 assertTrue(chain instanceof X509Certificate[]); in testGetCertificateChain()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DHandshakeCompletedEventTest.java559 private X509Certificate[] chain; field in HandshakeCompletedEventTest.TestTrustManager
563 public void checkClientTrusted(X509Certificate[] chain, String authType) { in checkClientTrusted() argument
564 this.chain = chain; in checkClientTrusted()
568 public void checkServerTrusted(X509Certificate[] chain, String authType) { in checkServerTrusted() argument
569 this.chain = chain; in checkServerTrusted()
578 return chain; in getChain()
586 java.security.cert.X509Certificate[] chain, String authType) in checkClientTrusted() argument
592 java.security.cert.X509Certificate[] chain, String authType) in checkServerTrusted() argument
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/
DMyKeyStore.java93 Certificate[] chain) throws KeyStoreException { in engineSetKeyEntry() argument
98 if (chain != null) { in engineSetKeyEntry()
99 Chain.put(alias, chain); in engineSetKeyEntry()
104 public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) in engineSetKeyEntry() argument
118 if (chain != null) { in engineSetKeyEntry()
119 Chain.put(alias, chain); in engineSetKeyEntry()
DTestKeyStoreSpi.java198 Certificate[] chain) throws KeyStoreException { in engineSetKeyEntry() argument
207 if (chain == null || chain.length == 0) { in engineSetKeyEntry()
216 public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) in engineSetKeyEntry() argument
DMyKeyStoreSpi.java69 Certificate[] chain) throws KeyStoreException { in engineSetKeyEntry() argument
74 public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) in engineSetKeyEntry() argument
/libcore/luni/src/test/java/libcore/java/security/cert/
DCertPathValidatorTest.java103 ArrayList<X509Certificate> chain = new ArrayList<>(); in runOCSPStapledTest() local
104 chain.add(serverCert); in runOCSPStapledTest()
105 chain.add((X509Certificate) caEntry.getCertificate()); in runOCSPStapledTest()
108 CertPath certPath = cf.generateCertPath(chain); in runOCSPStapledTest()

12