Commit bcf4de03 authored by Nikos Mavrogiannopoulos's avatar Nikos Mavrogiannopoulos
Browse files

handshake: treat reply to HRR as a reply to hello verify request

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's avatarNikos Mavrogiannopoulos <nmav@redhat.com>
parent 3d429ce5
......@@ -1868,9 +1868,8 @@ static int send_client_hello(gnutls_session_t session, int again)
/* 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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment