fix for disable memory build

This commit is contained in:
Jacob Barthelmeh
2021-10-26 16:17:32 -06:00
parent 583a50a3f6
commit 3d5eea8f56
2 changed files with 10 additions and 2 deletions

View File

@ -35668,6 +35668,7 @@ static int wolfSSL_RSA_To_Der(WOLFSSL_RSA* rsa, byte** outBuf, int publicKey, vo
}
}
(void)heap; /* unused if memory is disabled */
WOLFSSL_LEAVE("wolfSSL_RSA_To_Der", derSz);
return derSz;
}
@ -46850,10 +46851,18 @@ int wolfSSL_CRYPTO_set_mem_functions(
wolfSSL_Realloc_cb r,
wolfSSL_Free_cb f)
{
#ifdef USE_WOLFSSL_MEMORY
if (wolfSSL_SetAllocators(m, f, r) == 0)
return WOLFSSL_SUCCESS;
else
return WOLFSSL_FAILURE;
#else
(void)m;
(void)r;
(void)f;
WOLFSSL_MSG("wolfSSL allocator callback functions not compiled in");
return WOLFSSL_FAILURE;
#endif
}
#if defined(WOLFSSL_KEY_GEN) && !defined(HAVE_SELFTEST)

View File

@ -3669,10 +3669,9 @@ int wc_RsaPSS_CheckPadding_ex2(const byte* in, word32 inSz, byte* sig,
if (sigCheck != NULL && sigCheck != sigCheckBuf) {
XFREE(sigCheck, heap, DYNAMIC_TYPE_RSA_BUFFER);
}
#else
(void)heap;
#endif
(void)heap; /* unused if memory is disabled */
return ret;
}
int wc_RsaPSS_CheckPadding_ex(const byte* in, word32 inSz, byte* sig,