closestToRootOrNull

fun List<X509Certificate>.closestToRootOrNull(predicate: (X509Certificate) -> Boolean): X509Certificate?(source)

Returns the certificate matching the predicate that is closes to the root. Can be the root itself.