summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2017-04-28 17:17:32 -0400
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-05-06 23:07:35 +0200
commit66a8553447fc700b0fb4e8d34e868655063d156c (patch)
tree215f12c721122f48a7350fe2122894c8c5541301
parent199c8551bd571933f407ade248ee6deadd54f2a9 (diff)
downloadgnutls-tmp-fix-rsa-psk-cb.tar.gz
rsa-psk: Use the correct username datumtmp-fix-rsa-psk-cb
In rsa-psk we properly request username for the case the application uses a callback, but later we use the username cached in the credentials structure. This will lead to empty username issues. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
-rw-r--r--lib/auth/rsa_psk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/auth/rsa_psk.c b/lib/auth/rsa_psk.c
index 151e88da7f..9d65529cdc 100644
--- a/lib/auth/rsa_psk.c
+++ b/lib/auth/rsa_psk.c
@@ -224,8 +224,8 @@ _gnutls_gen_rsa_psk_client_kx(gnutls_session_t session,
*/
ret =
_gnutls_buffer_append_data_prefix(data, 16,
- cred->username.data,
- cred->username.size);
+ username.data,
+ username.size);
if (ret < 0) {
gnutls_assert();
goto cleanup;