@Nullable
    private static X509Certificate[] initCertificates(SSLSession session) {
        final Certificate[] certificates;
        try {
            certificates = session.getPeerCertificates();
        } catch (Throwable ex) {
            return null;
        }

        final List<X509Certificate> result = new ArrayList<>(certificates.length);
        for (Certificate certificate : certificates) {
            if (certificate instanceof X509Certificate) {
                result.add((X509Certificate) certificate);
            }
        }
        return !result.isEmpty() ? result.toArray(new X509Certificate[0]) : null;
    }
Default implementation of {@link SslInfo}.

@author Rossen Stoyanchev
@since 5.0.2
spring/boot3-webflux-autoconfigure/src/main/java/com/linecorp/armeria/spring/web/reactive/DefaultSslInfo.java