Package org.conscrypt
Class CertificatePriorityComparator
- java.lang.Object
-
- org.conscrypt.CertificatePriorityComparator
-
- All Implemented Interfaces:
Comparator<X509Certificate>
@Internal public final class CertificatePriorityComparator extends Object implements Comparator<X509Certificate>
Comparatorfor prioritizing certificates in path building.The sort order is as follows:
- Self-issued certificates first.
- Strength of certificates descending (EC before RSA, key size descending, signature algorithm strength descending).
- notAfter date descending.
- notBefore date descending.
-
-
Constructor Summary
Constructors Constructor Description CertificatePriorityComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(X509Certificate lhs, X509Certificate rhs)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(X509Certificate lhs, X509Certificate rhs)
- Specified by:
comparein interfaceComparator<X509Certificate>
-
-