From: Nicolas Dufresne Date: Fri, 28 Apr 2017 21:17:32 +0000 (-0400) Subject: rsa-psk: Use the correct username datum X-Git-Tag: gnutls_3_6_0~594 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=66a8553447fc700b0fb4e8d34e868655063d156c;p=thirdparty%2Fgnutls.git 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 --- 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;