diff --git a/src/internal.c b/src/internal.c index 872f78652..186dd4289 100644 --- a/src/internal.c +++ b/src/internal.c @@ -22521,6 +22521,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, word16 i, j; ProtocolVersion pv; Suites clSuites; + int ret = -1; (void)inSz; WOLFSSL_MSG("Got old format client hello"); @@ -22660,7 +22661,6 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, ssl->options.haveSessionId = 1; /* DoClientHello uses same resume code */ if (ssl->options.resuming) { /* let's try */ - int ret = -1; WOLFSSL_SESSION* session = GetSession(ssl, ssl->arrays->masterSecret, 1); #ifdef HAVE_SESSION_TICKET @@ -22702,7 +22702,9 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, } } - return MatchSuite(ssl, &clSuites); + ret = MatchSuite(ssl, &clSuites); + if (ret != 0)return ret; + return SanityCheckMsgReceived(ssl, client_hello); } #endif /* OLD_HELLO_ALLOWED */