summaryrefslogtreecommitdiff
path: root/lib/kx.h
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2020-02-02 08:13:50 +0100
committerDaiki Ueno <dueno@redhat.com>2020-02-07 18:03:45 +0100
commit9711755641cd9b6de323676abeab6cc80ea13e4b (patch)
tree95b303ea614c67994905ee5e18d4c9d2bcd0bcbe /lib/kx.h
parentee43a212b6bde870bf0800329972f3cab24715ec (diff)
downloadgnutls-tmp-keylog-hook.tar.gz
keylogfile: generalize with a callbacktmp-keylog-hook
This refactors the keylogfile mechanism by adding a callback to get notified when a new secret is derived and installed. That way, consumers can implement custom logging feature per session, which is particularly useful in QUIC implementation. Signed-off-by: Daiki Ueno <dueno@redhat.com>
Diffstat (limited to 'lib/kx.h')
-rw-r--r--lib/kx.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/kx.h b/lib/kx.h
index 2d98fda3cd..8d8d4225ef 100644
--- a/lib/kx.h
+++ b/lib/kx.h
@@ -38,8 +38,15 @@ int _gnutls_recv_server_crt_request(gnutls_session_t session);
int _gnutls_send_server_crt_request(gnutls_session_t session, int again);
int _gnutls_recv_client_certificate_verify_message(gnutls_session_t
session);
+int _gnutls_call_secret_func(gnutls_session_t session,
+ gnutls_handshake_secret_type_t type,
+ const uint8_t *data,
+ unsigned size);
void _gnutls_nss_keylog_write(gnutls_session_t session,
const char *label,
const uint8_t *secret, size_t secret_size);
+int _gnutls_nss_keylog_secret_func(gnutls_session_t session,
+ gnutls_handshake_secret_type_t type,
+ const gnutls_datum_t *secret);
#endif /* GNUTLS_LIB_KX_H */