From fa2db8b22eeef7eb79370b9de69ef59c98fc3562 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Wed, 20 Dec 2017 10:32:33 +1000 Subject: [PATCH] Fix for building TLS v1.3 code on Windows --- src/tls.c | 4 +++- src/tls13.c | 1 + wolfssl.vcproj | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/tls.c b/src/tls.c index fcd408e0b..7f86acde0 100644 --- a/src/tls.c +++ b/src/tls.c @@ -1622,6 +1622,8 @@ static int TLSX_SNI_Parse(WOLFSSL* ssl, byte* input, word16 length, switch(type) { case WOLFSSL_SNI_HOST_NAME: { int matchStat; + byte matched; + #ifdef WOLFSSL_TLS13 /* Don't process the second ClientHello SNI extension if there * was problems with the first. @@ -1629,7 +1631,7 @@ static int TLSX_SNI_Parse(WOLFSSL* ssl, byte* input, word16 length, if (!cacheOnly && sni->status != 0) break; #endif - byte matched = cacheOnly || + matched = cacheOnly || ((XSTRLEN(sni->data.host_name) == size) && (XSTRNCMP(sni->data.host_name, (const char*)input + offset, size) == 0)); diff --git a/src/tls13.c b/src/tls13.c index cd07c9d4d..866d8b2f8 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -6120,6 +6120,7 @@ int DoTls13HandShakeMsgType(WOLFSSL* ssl, byte* input, word32* inOutIdx, { int ret = 0; word32 inIdx = *inOutIdx; + (void)totalSz; WOLFSSL_ENTER("DoTls13HandShakeMsgType"); diff --git a/wolfssl.vcproj b/wolfssl.vcproj index 9ea5850e8..3a7a45506 100755 --- a/wolfssl.vcproj +++ b/wolfssl.vcproj @@ -319,6 +319,10 @@ RelativePath=".\src\tls.c" > + +