Class CertificateChainCleaner



  • public final class CertificateChainCleaner
    extends Object
    Computes the effective certificate chain from the raw array returned by Java's built in TLS APIs. Cleaning a chain returns a list of certificates where the first element is chain[0], each certificate is signed by the certificate that follows, and the last certificate is a trusted CA certificate.

    Use of the chain cleaner is necessary to omit unexpected certificates that aren't relevant to the TLS handshake and to extract the trusted CA certificate for the benefit of certificate pinning.

    This class includes code from Conscrypt's TrustManagerImpl and TrustedCertificateIndex.

    • Constructor Detail

      • CertificateChainCleaner

        public CertificateChainCleaner(TrustRootIndex trustRootIndex)