summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-03-03 15:58:19 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-03-06 14:36:24 +0100
commit54eee745d53cddc774adc0489cecc42a40ef444a (patch)
tree8d96c0efc83d4c233e033d89b043d300ec467881
parent3d585f24f0648a34a3640bf9f2e3b091bff74150 (diff)
downloadgnutls-54eee745d53cddc774adc0489cecc42a40ef444a.tar.gz
gnutls_record_recv: do not accept a client hello while handshake is in progress
That is, do not return GNUTLS_E_REHANDSHAKE, while we are within a handshake process. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--lib/record.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/record.c b/lib/record.c
index 59b5ee114c..161db622bb 100644
--- a/lib/record.c
+++ b/lib/record.c
@@ -894,6 +894,7 @@ record_add_to_buffers(gnutls_session_t session,
*/
if (session->security_parameters.entity ==
GNUTLS_SERVER
+ && session->internals.handshake_in_progress == 0
&& bufel->htype ==
GNUTLS_HANDSHAKE_CLIENT_HELLO) {
gnutls_assert();