From 4c453d4d6998f0a52cbac99bc4838453bb9940ee Mon Sep 17 00:00:00 2001 From: toddouska Date: Fri, 28 Dec 2012 14:36:19 -0800 Subject: [PATCH] have server side reply unexpected_message for hello_request --- src/internal.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index 281800236..48f55176d 100644 --- a/src/internal.c +++ b/src/internal.c @@ -2609,7 +2609,12 @@ static int DoHelloRequest(CYASSL* ssl, const byte* input, word32* inOutIdx) } } - return SendAlert(ssl, alert_warning, no_renegotiation); + if (ssl->options.side == SERVER_END) { + SendAlert(ssl, alert_fatal, unexpected_message); /* try */ + return FATAL_ERROR; + } + else + return SendAlert(ssl, alert_warning, no_renegotiation); }