diff --git a/src/ssl.c b/src/ssl.c index 60971a356..51c97879c 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -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) diff --git a/wolfcrypt/src/rsa.c b/wolfcrypt/src/rsa.c index 5288f26e8..a23456320 100644 --- a/wolfcrypt/src/rsa.c +++ b/wolfcrypt/src/rsa.c @@ -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,