-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update EBSNET port #6410
Update EBSNET port #6410
Conversation
@dgarske - Sarah has asked me to open this PR on her behalf. I will request approval for the contributor agreement after your cursory review. |
retest this please |
@dgarske - customer is approved as a contributor. This PR is ready for review. |
wolfcrypt/src/wc_port.c
Outdated
@@ -2008,6 +2009,67 @@ int wolfSSL_CryptHwMutexUnLock(void) | |||
|
|||
return(retval); | |||
} | |||
#else | |||
int rtip_semaphore_build(wolfSSL_Mutex *m) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add static
.
wolfcrypt/src/wc_port.c
Outdated
{ | ||
int retval; | ||
|
||
retval = vf_lseek(a, b, c); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add explicit cast to int
wolfcrypt/src/wc_port.c
Outdated
|
||
int strcasecmp(const char *s1, const char *s2) | ||
{ | ||
while (rtp_tolower(*s1) == rtp_tolower(*s2)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move while brace up while() {
wolfcrypt/src/random.c
Outdated
@@ -2627,8 +2627,12 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz) | |||
#elif defined(HAVE_RTP_SYS) || defined(EBSNET) | |||
|
|||
#include "rtprand.h" /* rtp_rand () */ | |||
|
|||
#if (defined(HAVE_RTP_SYS) || RTPLATFORM) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not assume RTPLATFORM
is always defined. Should this be #if defined(HAVE_RTP_SYS) || defined(RTPLATFORM)
. Otherwise if RTPLATFORM
is not defined it will be a compiler error. If RTPLATFORM
is also an expression like RTPLATFORM != 0
please add it explicit.
wolfssl/wolfcrypt/wc_port.h
Outdated
@@ -244,7 +244,11 @@ | |||
#elif defined(MICRIUM) | |||
typedef OS_MUTEX wolfSSL_Mutex; | |||
#elif defined(EBSNET) | |||
typedef RTP_MUTEX wolfSSL_Mutex; | |||
#if (RTPLATFORM) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here. Please check that it is defined.
wolfcrypt/src/wc_port.c
Outdated
@@ -2031,6 +2031,7 @@ int wolfSSL_CryptHwMutexUnLock(void) | |||
} | |||
|
|||
#elif defined(EBSNET) | |||
#if (RTPLATFORM) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You missed a few places where RTPLATFORM
is used without checking if defined. Perhaps it is safe to assume if EBSNET is defined that RTPLATFORM
is always defined?
wolfcrypt/src/wc_port.c
Outdated
s2++; | ||
} | ||
|
||
return rtp_tolower(*(unsigned char *) s1) - rtp_tolower(*(unsigned char *) s2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check indent.
wolfcrypt/src/wc_port.c
Outdated
int strcasecmp(const char *s1, const char *s2) | ||
{ | ||
while (rtp_tolower(*s1) == rtp_tolower(*s2)) { | ||
if (*s1 == '\0' || *s2 == '\0') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here. Make sure 4 spaces and no tabs.
} | ||
|
||
#endif | ||
int ebsnet_fseek(int a, long b, int c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bring function ident back to align with strcasecmp
?
wolfcrypt/src/wc_port.c
Outdated
@@ -2072,6 +2073,66 @@ int wolfSSL_CryptHwMutexUnLock(void) | |||
|
|||
return(retval); | |||
} | |||
#else | |||
static int rtip_semaphore_build(wolfSSL_Mutex *m) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the ident on all functions in this group should be 4 spaces back.
Retest this please |
Description
Updates to EBSNET port
Author: Sarah Richardson
Fixes zd15856
Testing
Customer tested
Checklist