From 751b26b13256b9918bdb7f833fb7d701f115ab2e Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 8 Oct 2017 23:37:01 +0900 Subject: [PATCH] Don't change client random in Client Hello in its second flight Reviewed-by: Ben Kaduk Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/4490) --- ssl/statem/statem_clnt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c index 2ad33f2e7c..88c0889023 100644 --- a/ssl/statem/statem_clnt.c +++ b/ssl/statem/statem_clnt.c @@ -1035,8 +1035,9 @@ int tls_construct_client_hello(SSL *s, WPACKET *pkt) break; } } - } else - i = 1; + } else { + i = s->hello_retry_request == 0; + } if (i && ssl_fill_hello_random(s, 0, p, sizeof(s->s3->client_random), DOWNGRADE_NONE) <= 0) -- 2.25.1