Fix for evp.c when being included directly due to improperly placed WOLFSSL_EVP_INCLUDED. Fix for FREERTOS to expose XREALLOC for normal math.

This commit is contained in:
David Garske
2020-01-28 06:33:13 -08:00
parent a90cc51a5f
commit e5426f85c9
2 changed files with 8 additions and 4 deletions

View File

@ -2086,7 +2086,6 @@ int wolfSSL_EVP_read_pw_string(char* buf, int bufSz, const char* banner, int v)
return 0;
}
#endif /* WOLFSSL_APACHE_HTTPD */
#endif /* WOLFSSL_EVP_INCLUDED */
#if defined(OPENSSL_EXTRA) && !defined(NO_PWDBASED) && !defined(NO_SHA)
int wolfSSL_PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
@ -2139,3 +2138,5 @@ WOLFSSL_API int wolfSSL_PKCS5_PBKDF2_HMAC(const char *pass, int passlen,
return WOLFSSL_FAILURE;
}
#endif /* OPENSSL_EXTRA && !NO_PWDBASED */
#endif /* WOLFSSL_EVP_INCLUDED */

View File

@ -682,14 +682,15 @@ extern void uITRON4_free(void *p) ;
#ifdef FREERTOS
#include "FreeRTOS.h"
/* FreeRTOS pvPortRealloc() only in AVR32_UC3 port */
#if !defined(XMALLOC_USER) && !defined(NO_WOLFSSL_MEMORY) && \
!defined(WOLFSSL_STATIC_MEMORY)
#define XMALLOC(s, h, type) pvPortMalloc((s))
#define XFREE(p, h, type) vPortFree((p))
#endif
#if defined(HAVE_ED25519) || defined(WOLFSSL_ESPIDF)
#define XREALLOC(p, n, h, t) wolfSSL_Realloc((p), (n))
/* FreeRTOS pvPortRealloc() implementation can be found here:
https://github.com/wolfSSL/wolfssl-freertos/pull/3/files */
#if !defined(USE_FAST_MATH) || defined(HAVE_ED25519) || defined(WOLFSSL_ESPIDF)
#define XREALLOC(p, n, h, t) pvPortRealloc((p), (n))
#endif
#ifndef NO_WRITEV
#define NO_WRITEV
@ -865,6 +866,8 @@ extern void uITRON4_free(void *p) ;
#define XMALLOC(s, h, type) pvPortMalloc((s))
#define XFREE(p, h, type) vPortFree((p))
#endif
/* FreeRTOS pvPortRealloc() implementation can be found here:
https://github.com/wolfSSL/wolfssl-freertos/pull/3/files */
#if !defined(USE_FAST_MATH) || defined(HAVE_ED25519)
#define XREALLOC(p, n, h, t) pvPortRealloc((p), (n))
#endif