diff --git a/src/internal.c b/src/internal.c index 8ea543476..b4a1ec937 100644 --- a/src/internal.c +++ b/src/internal.c @@ -1632,7 +1632,7 @@ static void BuildFinished(CYASSL* ssl, Hashes* hashes, const byte* sender) #ifndef NO_SHA256 Sha256 sha256; #endif -#if CYASSL_SHA384 +#ifdef CYASSL_SHA384 Sha384 sha384; #endif @@ -1641,7 +1641,7 @@ static void BuildFinished(CYASSL* ssl, Hashes* hashes, const byte* sender) if (IsAtLeastTLSv1_2(ssl)) sha256 = ssl->hashSha256; #endif -#if CYASSL_SHA384 +#ifdef CYASSL_SHA384 InitSha384(&sha384); if (IsAtLeastTLSv1_2(ssl)) sha384 = ssl->hashSha384; diff --git a/src/tls.c b/src/tls.c index aa4ba6740..f5ef46007 100644 --- a/src/tls.c +++ b/src/tls.c @@ -63,7 +63,7 @@ static INLINE void get_xor(byte *digest, word32 digLen, byte* md5, byte* sha) static void p_hash(byte* result, word32 resLen, const byte* secret, word32 secLen, const byte* seed, word32 seedLen, int hash) { - word32 len; + word32 len = MD5_DIGEST_SIZE; word32 times; word32 lastLen; word32 lastTime; @@ -75,7 +75,6 @@ static void p_hash(byte* result, word32 resLen, const byte* secret, Hmac hmac; if (hash == md5_mac) { - len = MD5_DIGEST_SIZE; hash = MD5; } else if (hash == sha_mac) {