summaryrefslogtreecommitdiff
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
parent1a776ff8c0ec1d1378295c231c46631cb8a0d536 (diff)
downloadgnutls-a95807e14727a1ad53d2a65f70a8e2d2ed53e6ec.tar.gz
split psk functionality from ui.c
-rw-r--r--lib/psk.c16
-rw-r--r--lib/ui.c17
2 files changed, 16 insertions, 17 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 */
diff --git a/lib/ui.c b/lib/ui.c
index 884c3682c9..fe03f4b2a5 100644
--- a/lib/ui.c
+++ b/lib/ui.c
@@ -81,23 +81,6 @@ gnutls_fingerprint(gnutls_digest_algorithm_t algo,
return 0;
}
-#ifdef ENABLE_PSK
-/**
- * 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
#ifdef ENABLE_ANON
/**