public final class BasicCertificateChainCleaner extends CertificateChainCleaner
okhttp3.internal.platform.AndroidPlatform.AndroidCertificateChainCleaner.
This class includes code from Conscrypt's TrustManagerImpl and TrustedCertificateIndex.
| Modifier and Type | Field and Description |
|---|---|
private static int |
MAX_SIGNERS
The maximum number of signers in a chain.
|
private TrustRootIndex |
trustRootIndex |
| Constructor and Description |
|---|
BasicCertificateChainCleaner(TrustRootIndex trustRootIndex) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.security.cert.Certificate> |
clean(java.util.List<java.security.cert.Certificate> chain,
java.lang.String hostname)
Returns a cleaned chain for
chain. |
boolean |
equals(java.lang.Object other) |
int |
hashCode() |
private boolean |
verifySignature(java.security.cert.X509Certificate toVerify,
java.security.cert.X509Certificate signingCert)
Returns true if
toVerify was signed by signingCert's public key. |
get, getprivate static final int MAX_SIGNERS
private final TrustRootIndex trustRootIndex
public BasicCertificateChainCleaner(TrustRootIndex trustRootIndex)
public java.util.List<java.security.cert.Certificate> clean(java.util.List<java.security.cert.Certificate> chain,
java.lang.String hostname)
throws javax.net.ssl.SSLPeerUnverifiedException
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 than
what was used to establish chain.
clean in class CertificateChainCleanerjavax.net.ssl.SSLPeerUnverifiedExceptionprivate boolean verifySignature(java.security.cert.X509Certificate toVerify,
java.security.cert.X509Certificate signingCert)
toVerify was signed by signingCert's public key.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Object