Interface KeyLogCallback


  • public interface KeyLogCallback
    Callback hooked into SSL_CTX_set_keylog_callback This is intended for TLS debugging with tools like Wireshark. For instance, a valid SSLKEYLOGFILE implementation could look like this:
    {@code
             final PrintStream out = new PrintStream("~/tls.sslkeylog_file");
             SSLContext.setKeyLogCallback(ctxPtr, new KeyLogCallback() {
    • Method Detail

      • handle

        void handle​(long ssl,
                    byte[] line)
        Called when a new key log line is emitted.

        Warning: The log output will contain secret key material, and can be used to decrypt TLS sessions! The log output should be handled with the same care given to the private keys.

        Parameters:
        ssl - the SSL instance
        line - an array of the key types on client-mode or null on server-mode.