forked from wolfSSL/wolfssl
Merge pull request #206 from dgarske/FixExtraMalloc_wNotTLS12
Fixed issue with "WOLFSSL_SMALL_STACK" and pre TLS 1.2 in "SendServer…
This commit is contained in:
@@ -14178,18 +14178,18 @@ int DoSessionTicket(WOLFSSL* ssl,
|
|||||||
doUserRsa = 1;
|
doUserRsa = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WOLFSSL_SMALL_STACK
|
|
||||||
encodedSig = (byte*)XMALLOC(MAX_ENCODED_SIG_SZ, NULL,
|
|
||||||
DYNAMIC_TYPE_TMP_BUFFER);
|
|
||||||
if (encodedSig == NULL)
|
|
||||||
ERROR_OUT(MEMORY_E, done_b);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (IsAtLeastTLSv1_2(ssl)) {
|
if (IsAtLeastTLSv1_2(ssl)) {
|
||||||
byte* digest = &hash[MD5_DIGEST_SIZE];
|
byte* digest = &hash[MD5_DIGEST_SIZE];
|
||||||
int typeH = SHAh;
|
int typeH = SHAh;
|
||||||
int digestSz = SHA_DIGEST_SIZE;
|
int digestSz = SHA_DIGEST_SIZE;
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_SMALL_STACK
|
||||||
|
encodedSig = (byte*)XMALLOC(MAX_ENCODED_SIG_SZ, NULL,
|
||||||
|
DYNAMIC_TYPE_TMP_BUFFER);
|
||||||
|
if (encodedSig == NULL)
|
||||||
|
ERROR_OUT(MEMORY_E, done_b);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (ssl->suites->hashAlgo == sha256_mac) {
|
if (ssl->suites->hashAlgo == sha256_mac) {
|
||||||
#ifndef NO_SHA256
|
#ifndef NO_SHA256
|
||||||
digest = hash256;
|
digest = hash256;
|
||||||
|
Reference in New Issue
Block a user