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:

         final PrintStream out = new PrintStream("~/tls.sslkeylog_file");
         SSLContext.setKeyLogCallback(ctxPtr, new KeyLogCallback() {
             @Override
             public void handle(long ssl, byte[] line) {
                 out.println(new String(line));
             }
         });
 

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.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handle(long ssl, byte[] line)
    Called when a new key log line is emitted.
  • Method Details

    • 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.