diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-12-31 00:38:31 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-12-31 00:51:57 +0200 |
commit | a95807e14727a1ad53d2a65f70a8e2d2ed53e6ec (patch) | |
tree | 78daada9b6953f91e56e94c631276bb76e394cd2 | |
parent | 1a776ff8c0ec1d1378295c231c46631cb8a0d536 (diff) | |
download | gnutls-a95807e14727a1ad53d2a65f70a8e2d2ed53e6ec.tar.gz |
split psk functionality from ui.c
-rw-r--r-- | lib/psk.c | 16 | ||||
-rw-r--r-- | lib/ui.c | 17 |
2 files changed, 16 insertions, 17 deletions
@@ -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 */ @@ -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 /** |