@Override public TrustRootIndex buildTrustRootIndex(X509TrustManager trustManager) { try { // From org.conscrypt.TrustManagerImpl, we want the method with this signature: // private TrustAnchor findTrustAnchorByIssuerAndSignature(X509Certificate lastCert); Method method = trustManager.getClass().getDeclaredMethod( "findTrustAnchorByIssuerAndSignature", X509Certificate.class); method.setAccessible(true); return new CustomTrustRootIndex(trustManager, method); } catch (NoSuchMethodException e) { return super.buildTrustRootIndex(trustManager); } }
public CertificateChainCleaner buildCertificateChainCleaner(X509TrustManager trustManager) { return new BasicCertificateChainCleaner(buildTrustRootIndex(trustManager)); }
public CertificateChainCleaner buildCertificateChainCleaner(X509TrustManager trustManager) { return new BasicCertificateChainCleaner(buildTrustRootIndex(trustManager)); }
@Override public TrustRootIndex buildTrustRootIndex(X509TrustManager trustManager) { try { // From org.conscrypt.TrustManagerImpl, we want the method with this signature: // private TrustAnchor findTrustAnchorByIssuerAndSignature(X509Certificate lastCert); Method method = trustManager.getClass().getDeclaredMethod( "findTrustAnchorByIssuerAndSignature", X509Certificate.class); method.setAccessible(true); return new AndroidTrustRootIndex(trustManager, method); } catch (NoSuchMethodException e) { return super.buildTrustRootIndex(trustManager); } }
@Override public TrustRootIndex buildTrustRootIndex(X509TrustManager trustManager) { try { // From org.conscrypt.TrustManagerImpl, we want the method with this signature: // private TrustAnchor findTrustAnchorByIssuerAndSignature(X509Certificate lastCert); Method method = trustManager.getClass().getDeclaredMethod( "findTrustAnchorByIssuerAndSignature", X509Certificate.class); method.setAccessible(true); return new AndroidTrustRootIndex(trustManager, method); } catch (NoSuchMethodException e) { return super.buildTrustRootIndex(trustManager); } }
public CertificateChainCleaner buildCertificateChainCleaner(X509TrustManager trustManager) { return new BasicCertificateChainCleaner(buildTrustRootIndex(trustManager)); }