public static void fill(@Nullable SSLSession session, BiConsumer<String, Object> setter) {
        if (session == null) {
            return;
        }

        final ServletTlsAttributes attrs = getOrCreateAttrs(session);
        final String sessionId = attrs.sessionId();
        final String cipherSuite = attrs.cipherSuite();

        final int keySize = attrs.keySize();
        final List<X509Certificate> peerCerts = attrs.peerCertificates();
        setter.accept(JAVAX_SERVLET_REQUEST_SSL_SESSION_ID, sessionId);
        setter.accept(JAVAX_SERVLET_REQUEST_CIPHER_SUITE, cipherSuite);
        setter.accept(JAVAX_SERVLET_REQUEST_KEY_SIZE, keySize);

        if (!peerCerts.isEmpty()) {
            setter.accept(JAVAX_SERVLET_REQUEST_X_509_CERTIFICATE,
                          peerCerts.toArray(EmptyArrays.EMPTY_X509_CERTIFICATES));
        }
    }
Fills the Servlet TLS attributes from {@link SSLSession} into {@code ServletRequest}.

@param session the {@link SSLSession} of the current connection.
@param setter the setter that will be invoked with the Servlet attribute name and value.
core/src/main/java/com/linecorp/armeria/internal/server/servlet/ServletTlsAttributes.java