private static X509TrustManager findFirstX509TrustManager(TrustManager[] tms) {
        for (TrustManager tm : tms) {
            if (tm instanceof X509TrustManager) {
                return (X509TrustManager) tm;
            }
        }
        return null;
    }
Returns X.509 key manager or null for none.
common/src/main/java/org/conscrypt/SSLParametersImpl.java