add SanityCheckMsgReceived in ProcessOldClientHello

This commit is contained in:
Takashi Kojo
2017-07-31 14:23:12 +09:00
committed by Jacob Barthelmeh
parent d6e22346e3
commit 0a3d6534c7

View File

@ -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 */