SSL_CTX_set_keylog_callback.pod 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. =pod
  2. =head1 NAME
  3. SSL_CTX_set_keylog_callback, SSL_CTX_get_keylog_callback,
  4. SSL_CTX_keylog_cb_func - logging TLS key material
  5. =head1 SYNOPSIS
  6. #include <openssl/ssl.h>
  7. typedef void (*SSL_CTX_keylog_cb_func)(const SSL *ssl, const char *line);
  8. void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb);
  9. SSL_CTX_keylog_cb_func SSL_CTX_get_keylog_callback(const SSL_CTX *ctx);
  10. =head1 DESCRIPTION
  11. SSL_CTX_set_keylog_callback() sets the TLS key logging callback. This callback
  12. is called whenever TLS key material is generated or received, in order to allow
  13. applications to store this keying material for debugging purposes.
  14. SSL_CTX_get_keylog_callback() retrieves the previously set TLS key logging
  15. callback. If no callback has been set, this will return NULL. When there is no
  16. key logging callback, or if SSL_CTX_set_keylog_callback is called with NULL as
  17. the value of cb, no logging of key material will be done.
  18. The key logging callback is called with two items: the B<ssl> object associated
  19. with the connection, and B<line>, a string containing the key material in the
  20. format used by NSS for its B<SSLKEYLOGFILE> debugging output. To recreate that
  21. file, the key logging callback should log B<line>, followed by a newline.
  22. B<line> will always be a NULL-terminated string.
  23. =head1 RETURN VALUES
  24. SSL_CTX_get_keylog_callback() returns a pointer to B<SSL_CTX_keylog_cb_func> or
  25. NULL if the callback is not set.
  26. =head1 SEE ALSO
  27. L<ssl(7)>
  28. =head1 COPYRIGHT
  29. Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
  30. Licensed under the OpenSSL license (the "License"). You may not use
  31. this file except in compliance with the License. You can obtain a copy
  32. in the file LICENSE in the source distribution or at
  33. L<https://www.openssl.org/source/license.html>.
  34. =cut