Skip to content

Instantly share code, notes, and snippets.

@HughJeffner
HughJeffner / CompositeX509TrustManager.java
Last active June 9, 2022 21:01
Trust both system KeyStore and custom KeyStore on Android
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.List;