-
Notifications
You must be signed in to change notification settings - Fork 822
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 TSIP driver version to v1.21 for RX65N RSK #7993
Conversation
retest this please |
#define TLSSERVER_PORT 11111 | ||
#define YEAR 2023 | ||
#define MON 3 | ||
#define YEAR 2024 |
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.
Is this here because the RTC may not be setup for the example? Can you see about extracting the year and month using __DATE__
?
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.
Thanks for the suggestion. Update to extract YEAR and MONTH from __DATE__
macro.
@@ -263,3 +270,6 @@ | |||
|
|||
/*-- strcasecmp */ | |||
#define XSTRCASECMP(s1,s2) strcmp((s1),(s2)) | |||
|
|||
/* use original ASN parsing */ | |||
#define WOLFSSL_ASN_ORIGINAL |
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.
Why use the older ASN method? Is the new ASN template not supported or not working?
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.
When using TSIP TLS, it requires key positions in a cert. It is done by RsaPublicKeyDecodeRawIndex() in asn.c and the functions still use older functions such as SkipObjectId().
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.
Can you please investigate updating support for ASN template?
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.
ok, I will.
3b2fd1a
to
93922df
Compare
|
||
static int YEAR; |
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.
It is possible to do this with compile-time macros. Consider replacing with:
#define YEAR ( \
((__DATE__)[7] - '0') * 1000 + \
((__DATE__)[8] - '0') * 100 + \
((__DATE__)[9] - '0') * 10 + \
((__DATE__)[10] - '0') * 1 \
)
#define MONTH ( \
__DATE__[2] == 'n' ? (__DATE__[1] == 'a' ? 1 : 6) \
: __DATE__[2] == 'b' ? 2 \
: __DATE__[2] == 'r' ? (__DATE__[0] == 'M' ? 3 : 4) \
: __DATE__[2] == 'y' ? 5 \
: __DATE__[2] == 'l' ? 7 \
: __DATE__[2] == 'g' ? 8 \
: __DATE__[2] == 'p' ? 9 \
: __DATE__[2] == 't' ? 10 \
: __DATE__[2] == 'v' ? 11 \
: 12 \
)
@@ -9490,6 +9490,42 @@ int EncryptContent(byte* input, word32 inputSz, byte* out, word32* outSz, | |||
#endif /* NO_PWDBASED */ | |||
|
|||
#ifndef NO_RSA | |||
#ifdef WOLFSSL_ASN_TEMPLATE |
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.
Thank you for fixing the ASN template code for TSIP.
@miyazakh Looks like merge conflicts. Please rebase and squash. Thanks! |
Use ASN_TEMPLATE Extracting YEAR and MONTH from __DATE__
e140494
to
3f0a17b
Compare
Description
Periodically driver update
Testing
Run crypt, benchmark and TLS client on the board
Checklist