That is, re-use the client random value on the client hello which
is a reply to a hello retry request.
Relates #299
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
/* Generate random data
*/
- if (!IS_DTLS(session)
- || session->internals.dtls.hsk_hello_verify_requests ==
- 0) {
+ if (!(session->internals.hsk_flags & HSK_HRR_RECEIVED) &&
+ !(IS_DTLS(session) && session->internals.dtls.hsk_hello_verify_requests == 0)) {
ret = _gnutls_gen_client_random(session);
if (ret < 0)
return gnutls_assert_val(ret);