summaryrefslogtreecommitdiff
path: root/lib/psk.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-12-31 00:38:31 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-12-31 00:51:57 +0200
commita95807e14727a1ad53d2a65f70a8e2d2ed53e6ec (patch)
tree78daada9b6953f91e56e94c631276bb76e394cd2 /lib/psk.c
parent1a776ff8c0ec1d1378295c231c46631cb8a0d536 (diff)
downloadgnutls-a95807e14727a1ad53d2a65f70a8e2d2ed53e6ec.tar.gz
split psk functionality from ui.c
Diffstat (limited to 'lib/psk.c')
-rw-r--r--lib/psk.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/psk.c b/lib/psk.c
index 279f9d11d9..73383fabb7 100644
--- a/lib/psk.c
+++ b/lib/psk.c
@@ -394,4 +394,20 @@ gnutls_psk_set_server_params_function(gnutls_psk_server_credentials_t res,
res->params_func = func;
}
+/**
+ * gnutls_psk_set_params_function:
+ * @res: is a gnutls_psk_server_credentials_t type
+ * @func: is the function to be called
+ *
+ * This function will set a callback in order for the server to get
+ * the Diffie-Hellman or RSA parameters for PSK authentication. The
+ * callback should return %GNUTLS_E_SUCCESS (0) on success.
+ **/
+void
+gnutls_psk_set_params_function(gnutls_psk_server_credentials_t res,
+ gnutls_params_function * func)
+{
+ res->params_func = func;
+}
+
#endif /* ENABLE_PSK */