Merge pull request #2551 from kaleb-himes/ZD5815-EBSNET

Implement porting efforts from ZD5241 and ZD5815
This commit is contained in:
Chris Conlon
2019-11-15 09:24:10 -07:00
committed by GitHub
3 changed files with 34 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,23 @@ 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
#endif /* EBSNET */

View File

@@ -280,9 +280,12 @@ WOLFSSL_API int wolfCrypt_Cleanup(void);
#include "vfapi.h"
#include "vfile.h"
int ebsnet_fseek(int a, long b, int c); /* Not prototyped in vfile.h per
* EBSnet feedback */
#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)