@Test public void testGetFullChain() throws Exception { TestUtils.assumeExtendedTrustManagerAvailable(); KeyStore.PrivateKeyEntry pke = TestKeyStore.getServer().getPrivateKey("RSA", "RSA"); X509Certificate[] chain3 = (X509Certificate[]) pke.getCertificateChain(); X509Certificate root = chain3[2]; X509TrustManager tm = trustManager(root); X509Certificate intermediate = chain3[1]; X509Certificate server = chain3[0]; X509Certificate[] chain2 = new X509Certificate[] { server, intermediate }; X509Certificate[] chain1 = new X509Certificate[] { server }; assertTrue(tm instanceof TrustManagerImpl); TrustManagerImpl tmi = (TrustManagerImpl) tm; List<X509Certificate> certs = tmi.checkServerTrusted(chain2, "RSA", new FakeSSLSession( "purple.com")); assertEquals(Arrays.asList(chain3), certs); certs = tmi.checkServerTrusted(chain1, "RSA", new FakeSSLSession("purple.com")); assertEquals(Arrays.asList(chain3), certs); }
@Override public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { checkTrusted(chain, authType, null, null, false ); }
TrustManagerImpl extends X509ExtendedTrustManager { @Override public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { checkTrusted(chain, authType, null, null, false ); } }
TrustManagerImpl extends X509ExtendedTrustManager { @Override public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { checkTrusted(chain, authType, null, null, false ); } TrustManagerImpl(KeyStore keyStore);  TrustManagerImpl(KeyStore keyStore, CertPinManager manager);  TrustManagerImpl(KeyStore keyStore, CertPinManager manager,
            ConscryptCertStore certStore);  TrustManagerImpl(KeyStore keyStore, CertPinManager manager,
            ConscryptCertStore certStore,
                            CertBlocklist blocklist);  TrustManagerImpl(KeyStore keyStore, CertPinManager manager,
                            ConscryptCertStore certStore, CertBlocklist blocklist, CTLogStore ctLogStore,
                            CTVerifier ctVerifier, CTPolicy ctPolicy); }
TrustManagerImpl extends X509ExtendedTrustManager { @Override public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { checkTrusted(chain, authType, null, null, false ); } TrustManagerImpl(KeyStore keyStore);  TrustManagerImpl(KeyStore keyStore, CertPinManager manager);  TrustManagerImpl(KeyStore keyStore, CertPinManager manager,
            ConscryptCertStore certStore);  TrustManagerImpl(KeyStore keyStore, CertPinManager manager,
            ConscryptCertStore certStore,
                            CertBlocklist blocklist);  TrustManagerImpl(KeyStore keyStore, CertPinManager manager,
                            ConscryptCertStore certStore, CertBlocklist blocklist, CTLogStore ctLogStore,
                            CTVerifier ctVerifier, CTPolicy ctPolicy); @Override void checkClientTrusted(X509Certificate[] chain, String authType); List<X509Certificate> checkClientTrusted(X509Certificate[] chain, String authType,
            String hostname); @Override void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket); @Override void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine); @Override void checkServerTrusted(X509Certificate[] chain, String authType); List<X509Certificate> checkServerTrusted(X509Certificate[] chain, String authType,
            String hostname); List<X509Certificate> getTrustedChainForServer(X509Certificate[] certs,
            String authType, Socket socket); List<X509Certificate> getTrustedChainForServer(X509Certificate[] certs,
            String authType, SSLEngine engine); @Override void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket); @Override void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine); List<X509Certificate> checkServerTrusted(X509Certificate[] chain, String authType,
            SSLSession session); void handleTrustStorageUpdate(); @Override X509Certificate[] getAcceptedIssuers(); void setCTEnabledOverride(boolean enabled); void setCTVerifier(CTVerifier verifier); void setCTPolicy(CTPolicy policy); }
TrustManagerImpl extends X509ExtendedTrustManager { @Override public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { checkTrusted(chain, authType, null, null, false ); } TrustManagerImpl(KeyStore keyStore);  TrustManagerImpl(KeyStore keyStore, CertPinManager manager);  TrustManagerImpl(KeyStore keyStore, CertPinManager manager,
            ConscryptCertStore certStore);  TrustManagerImpl(KeyStore keyStore, CertPinManager manager,
            ConscryptCertStore certStore,
                            CertBlocklist blocklist);  TrustManagerImpl(KeyStore keyStore, CertPinManager manager,
                            ConscryptCertStore certStore, CertBlocklist blocklist, CTLogStore ctLogStore,
                            CTVerifier ctVerifier, CTPolicy ctPolicy); @Override void checkClientTrusted(X509Certificate[] chain, String authType); List<X509Certificate> checkClientTrusted(X509Certificate[] chain, String authType,
            String hostname); @Override void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket); @Override void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine); @Override void checkServerTrusted(X509Certificate[] chain, String authType); List<X509Certificate> checkServerTrusted(X509Certificate[] chain, String authType,
            String hostname); List<X509Certificate> getTrustedChainForServer(X509Certificate[] certs,
            String authType, Socket socket); List<X509Certificate> getTrustedChainForServer(X509Certificate[] certs,
            String authType, SSLEngine engine); @Override void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket); @Override void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine); List<X509Certificate> checkServerTrusted(X509Certificate[] chain, String authType,
            SSLSession session); void handleTrustStorageUpdate(); @Override X509Certificate[] getAcceptedIssuers(); void setCTEnabledOverride(boolean enabled); void setCTVerifier(CTVerifier verifier); void setCTPolicy(CTPolicy policy);  }