summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/includes/gnutls/gnutls.h.in1
-rw-r--r--lib/kx.c17
-rw-r--r--lib/libgnutls.map1
3 files changed, 19 insertions, 0 deletions
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index 9fb6afa156..a6c3c0ef30 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -2312,6 +2312,7 @@ void gnutls_global_set_log_level(int level);
typedef int (*gnutls_keylog_func) (gnutls_session_t session,
const char *label,
const gnutls_datum_t *secret);
+gnutls_keylog_func gnutls_session_get_keylog_function(const gnutls_session_t session);
void gnutls_session_set_keylog_function(gnutls_session_t session,
gnutls_keylog_func func);
diff --git a/lib/kx.c b/lib/kx.c
index d5abf69ea7..a874f15114 100644
--- a/lib/kx.c
+++ b/lib/kx.c
@@ -71,6 +71,23 @@ int _gnutls_generate_master(gnutls_session_t session, int keep_premaster)
}
/**
+ * gnutls_session_get_keylog_function:
+ * @session: is #gnutls_session_t type
+ *
+ * This function will return the callback function set using
+ * gnutls_session_set_keylog_function().
+ *
+ * Returns: The function set or %NULL otherwise.
+ *
+ * Since: 3.6.13
+ */
+gnutls_keylog_func
+gnutls_session_get_keylog_function(const gnutls_session_t session)
+{
+ return session->internals.keylog_func;
+}
+
+/**
* gnutls_session_set_keylog_function:
* @session: is #gnutls_session_t type
* @func: is the function to be called
diff --git a/lib/libgnutls.map b/lib/libgnutls.map
index 7c3187541d..5541e9caba 100644
--- a/lib/libgnutls.map
+++ b/lib/libgnutls.map
@@ -1315,6 +1315,7 @@ GNUTLS_3_6_13
gnutls_hkdf_extract;
gnutls_hkdf_expand;
gnutls_pbkdf2;
+ gnutls_session_get_keylog_function;
gnutls_session_set_keylog_function;
gnutls_prf_hash_get;
gnutls_psk_server_get_username2;