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:11:34 +0200
commit8b8aab277f32dc532891d68dbb2cd93066a24b70 (patch)
treee1a0caefe5179cdcf7107d8c87e3c2b7b55aa32f
parent50448856005d538e34bcbc0d90e0fc854fdaec09 (diff)
downloadgnutls-8b8aab277f32dc532891d68dbb2cd93066a24b70.tar.gz
rsa-psk: Use the correct username datum
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;