Package 

Class BasicCertificateChainCleaner


  • 
    public final class BasicCertificateChainCleaner
    extends CertificateChainCleaner
                        

    A certificate chain cleaner that uses a set of trusted root certificates to build the trusted chain. This class duplicates the clean chain building performed during the TLS handshake. We prefer other mechanisms where they exist, such as with {@code okhttp3.internal.platform.AndroidPlatform.AndroidCertificateChainCleaner}.

    This class includes code from Conscrypt's{@code * TrustManagerImpl} and {@code TrustedCertificateIndex}.

    • Method Summary

      Modifier and Type Method Description
      List<Certificate> clean(List<Certificate> chain, String hostname) Returns a cleaned chain for {@code chain}.
      int hashCode()
      boolean equals(Object other)
      • Methods inherited from class com.mobwith.httpmodule.internal.tls.CertificateChainCleaner

        get, get
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BasicCertificateChainCleaner

        BasicCertificateChainCleaner(TrustRootIndex trustRootIndex)
    • Method Detail

      • clean

         List<Certificate> clean(List<Certificate> chain, String hostname)

        Returns a cleaned chain for {@code chain}.

        This method throws if the complete chain to a trusted CA certificate cannot be constructed.This is unexpected unless the trust root index in this class has a different trust manager thanwhat was used to establish {@code chain}.