Implement porting efforts from ZD5241 and ZD5815

This commit is contained in:
kaleb-himes
2019-11-01 16:00:06 -06:00
parent 98a2322dd9
commit ffb80126ff
3 changed files with 32 additions and 2 deletions

View File

@ -1175,6 +1175,19 @@ int wolfSSL_CryptHwMutexUnLock(void) {
return 0;
}
int ebsnet_fseek(int a, long b, int c)
{
int retval;
retval = vf_lseek(a, b, c);
if (retval > 0)
retval = 0;
else
retval = -1;
return(retval);
}
#elif defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX)
int wc_InitMutex(wolfSSL_Mutex* m)

View File

@ -794,7 +794,24 @@ extern void uITRON4_free(void *p) ;
#define XMALLOC(s, h, type) ((void *)rtp_malloc((s), SSL_PRO_MALLOC))
#define XFREE(p, h, type) (rtp_free(p))
#define XREALLOC(p, n, h, t) realloc((p), (n))
#define XREALLOC(p, n, h, t) (rtp_realloc((p), (n)))
#if (WINMSP3)
#define XSTRNCASECMP(s1,s2,n) _strnicmp((s1),(s2),(n))
#else
#sslpro: settings.h - please implement XSTRNCASECMP - needed for HAVE_ECC
#endif
#define WOLFSSL_HAVE_MAX
#define WOLFSSL_HAVE_MIN
#define USE_FAST_MATH
#define TFM_TIMING_RESISTANT
#define WC_RSA_BLINDING
#define ECC_TIMING_RESISTANT
#define HAVE_ECC
#define WOLFSSL_STATIC_RSA
#endif /* EBSNET */

View File

@ -282,7 +282,7 @@ WOLFSSL_API int wolfCrypt_Cleanup(void);
#define XFILE int
#define XFOPEN(NAME, MODE) vf_open((const char *)NAME, VO_RDONLY, 0);
#define XFSEEK vf_lseek
#define XFSEEK ebsnet_fseek
#define XFTELL vf_tell
#define XREWIND vf_rewind
#define XFREAD(BUF, SZ, AMT, FD) vf_read(FD, BUF, SZ*AMT)