diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-06-04 06:57:20 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-06-04 06:57:20 +0200 |
commit | 6f89074953f08df1c605fec6258c073fd53ff459 (patch) | |
tree | e21015b23dbfe62c8a40068e18b9f5abd67cf8e6 | |
parent | f160fdc487fcb04bb3357d6b4ed07e7b2ff7427b (diff) | |
download | gnutls-6f89074953f08df1c605fec6258c073fd53ff459.tar.gz |
Add gnutls-serv --pskhint.
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | src/serv.c | 11 | ||||
-rw-r--r-- | src/serv.gaa | 3 |
3 files changed, 16 insertions, 0 deletions
@@ -11,6 +11,8 @@ The function is gnutls_psk_client_get_hint. ** psktool: Support new --netconf-hint to generate PSK key from password. Uses the Netconf algorithm to derive PSK key from password. +** gnutls-serv: Support new --pskhint parameter to set PSK identity hint. + ** API and ABI modifications: gnutls_psk_client_get_hint: ADDED. diff --git a/src/serv.c b/src/serv.c index d77d0c67b9..01af77c826 100644 --- a/src/serv.c +++ b/src/serv.c @@ -985,6 +985,17 @@ main (int argc, char **argv) GERR (ret); } + if (info.psk_hint) + { + ret = gnutls_psk_set_server_credentials_hint (psk_cred, + info.psk_hint); + if (ret) + { + fprintf (stderr, "Error setting PSK identity hint.\n"); + GERR (ret); + } + } + gnutls_psk_set_server_params_function (psk_cred, get_params); } #endif diff --git a/src/serv.gaa b/src/serv.gaa index 2f83e995e2..ed0137b6d6 100644 --- a/src/serv.gaa +++ b/src/serv.gaa @@ -73,6 +73,9 @@ option (a, disable-client-cert) { $disable_client_cert = 1 } "Disable request fo #char *psk_passwd; option (pskpasswd) STR "FILE" { $psk_passwd = $1 } "PSK password file to use." +#char *psk_hint; +option (pskhint) STR "HINT" { $psk_hint = $1 } "PSK identity hint to use." + #char *srp_passwd; option (srppasswd) STR "FILE" { $srp_passwd = $1 } "SRP password file to use." |