diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-10-06 11:16:17 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-02-19 15:29:35 +0100 |
commit | bcf4de0371efbdf0846388e2df0cb14b5db09954 (patch) | |
tree | 69505a6dfb9f367972985f6c68b927ada3b2d747 /lib/handshake.c | |
parent | 3d429ce545de071a036f6849875423fa679ee48d (diff) | |
download | gnutls-bcf4de0371efbdf0846388e2df0cb14b5db09954.tar.gz |
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 <nmav@redhat.com>
Diffstat (limited to 'lib/handshake.c')
-rw-r--r-- | lib/handshake.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/handshake.c b/lib/handshake.c index d12e80e676..3746296d44 100644 --- a/lib/handshake.c +++ b/lib/handshake.c @@ -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); |