forked from wolfSSL/wolfssl
remove hmac array initializers to 0 when non full because of reported compiler weirdness from user
This commit is contained in:
@@ -3581,10 +3581,11 @@ static void Hmac(CYASSL* ssl, byte* digest, const byte* in, word32 sz,
|
|||||||
Sha sha;
|
Sha sha;
|
||||||
|
|
||||||
/* data */
|
/* data */
|
||||||
byte seq[SEQ_SZ] = { 0x00, 0x00, 0x00, 0x00 };
|
byte seq[SEQ_SZ];
|
||||||
byte conLen[ENUM_LEN + LENGTH_SZ]; /* content & length */
|
byte conLen[ENUM_LEN + LENGTH_SZ]; /* content & length */
|
||||||
const byte* macSecret = GetMacSecret(ssl, verify);
|
const byte* macSecret = GetMacSecret(ssl, verify);
|
||||||
|
|
||||||
|
XMEMSET(seq, 0, SEQ_SZ);
|
||||||
conLen[0] = (byte)content;
|
conLen[0] = (byte)content;
|
||||||
c16toa((word16)sz, &conLen[ENUM_LEN]);
|
c16toa((word16)sz, &conLen[ENUM_LEN]);
|
||||||
c32toa(GetSEQIncrement(ssl, verify), &seq[sizeof(word32)]);
|
c32toa(GetSEQIncrement(ssl, verify), &seq[sizeof(word32)]);
|
||||||
|
@@ -401,11 +401,12 @@ void TLS_hmac(CYASSL* ssl, byte* digest, const byte* in, word32 sz,
|
|||||||
int content, int verify)
|
int content, int verify)
|
||||||
{
|
{
|
||||||
Hmac hmac;
|
Hmac hmac;
|
||||||
byte seq[SEQ_SZ] = { 0x00, 0x00, 0x00, 0x00 };
|
byte seq[SEQ_SZ];
|
||||||
byte length[LENGTH_SZ];
|
byte length[LENGTH_SZ];
|
||||||
byte inner[ENUM_LEN + VERSION_SZ + LENGTH_SZ]; /* type + version +len */
|
byte inner[ENUM_LEN + VERSION_SZ + LENGTH_SZ]; /* type + version +len */
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
|
XMEMSET(seq, 0, SEQ_SZ);
|
||||||
c16toa((word16)sz, length);
|
c16toa((word16)sz, length);
|
||||||
#ifdef CYASSL_DTLS
|
#ifdef CYASSL_DTLS
|
||||||
if (ssl->options.dtls)
|
if (ssl->options.dtls)
|
||||||
|
Reference in New Issue
Block a user