Class ClientTlsHandshakeFailureLog

java.lang.Object
org.mockserver.netty.unification.ClientTlsHandshakeFailureLog

public class ClientTlsHandshakeFailureLog extends Object
Logs a client's failed TLS handshake, on TCP and on HTTP/3: at WARN for the first failure from a client address on a transport, with a hint about its likely cause, and at DEBUG for each later one, so a client that retries, or a scan, does not fill the log. It remembers at most MAX_CLIENT_ADDRESSES addresses, forgetting the one whose handshake failed least recently. No entry carries a stack trace or a peer's bytes.
  • Field Details

  • Constructor Details

    • ClientTlsHandshakeFailureLog

      public ClientTlsHandshakeFailureLog()
  • Method Details

    • log

      public void log(org.mockserver.logging.MockServerLogger mockServerLogger, org.mockserver.configuration.Configuration configuration, String transport, SocketAddress clientAddress, Throwable cause)
    • logClientAlert

      public void logClientAlert(org.mockserver.logging.MockServerLogger mockServerLogger, org.mockserver.configuration.Configuration configuration, String transport, SocketAddress clientAddress, int alert)
      For a client that ended the handshake with a TLS alert of its own, which a QUIC server sees only as the client's close of the connection.
    • isFailedHandshake

      public static boolean isFailedHandshake(Throwable cause)
      Whether cause is or wraps a failed handshake of any TLS engine: OpenSSL's is a subclass of SSLHandshakeException.