From: Stefan Bühler Date: Fri, 27 Mar 2020 16:17:57 +0000 (+0100) Subject: dtls client hello: fix zeroed random (fixes #960) X-Git-Tag: 3.6.13~6^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c01011c2d8533dbbbe754e49e256c109cb848d0d;p=thirdparty%2Fgnutls.git dtls client hello: fix zeroed random (fixes #960) This broke with bcf4de03 "handshake: treat reply to HRR as a reply to hello verify request", which failed to "De Morgan" properly. Signed-off-by: Stefan Bühler --- diff --git a/lib/handshake.c b/lib/handshake.c index 5739df213e..84a0e52101 100644 --- a/lib/handshake.c +++ b/lib/handshake.c @@ -2167,7 +2167,7 @@ static int send_client_hello(gnutls_session_t session, int again) /* Generate random data */ if (!(session->internals.hsk_flags & HSK_HRR_RECEIVED) && - !(IS_DTLS(session) && session->internals.dtls.hsk_hello_verify_requests == 0)) { + !(IS_DTLS(session) && session->internals.dtls.hsk_hello_verify_requests != 0)) { ret = _gnutls_gen_client_random(session); if (ret < 0) { gnutls_assert();