Merge pull request #2844 from JacobBarthelmeh/SanityChecks

set inital state of TLS 1.3 peerSuites structure
This commit is contained in:
toddouska
2020-03-13 10:16:53 -07:00
committed by GitHub
2 changed files with 5 additions and 0 deletions

View File

@ -11165,6 +11165,8 @@ int TLSX_Parse(WOLFSSL* ssl, byte* input, word16 length, byte msgType,
ret = KS_PARSE(ssl, input + offset, size, msgType);
break;
#endif
default:
WOLFSSL_MSG("Unknown TLS extension type");
}
/* offset should be updated here! */

View File

@ -3379,6 +3379,9 @@ static int DoTls13CertificateRequest(WOLFSSL* ssl, const byte* input,
WOLFSSL_START(WC_FUNC_CERTIFICATE_REQUEST_DO);
WOLFSSL_ENTER("DoTls13CertificateRequest");
#ifndef WOLFSSL_TLS13_DRAFT_18
XMEMSET(&peerSuites, 0, sizeof(Suites));
#endif
#ifdef WOLFSSL_CALLBACKS
if (ssl->hsInfoOn) AddPacketName(ssl, "CertificateRequest");
if (ssl->toInfoOn) AddLateName("CertificateRequest", &ssl->timeoutInfo);