Skip to content
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

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

miyazakh
Copy link
Contributor

@miyazakh miyazakh commented Sep 19, 2024

Description

Periodically driver update

Testing

Run crypt, benchmark and TLS client on the board

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@miyazakh miyazakh self-assigned this Sep 19, 2024
@miyazakh
Copy link
Contributor Author

retest this please

@miyazakh miyazakh assigned wolfSSL-Bot and unassigned miyazakh Sep 19, 2024
#define TLSSERVER_PORT 11111
#define YEAR 2023
#define MON 3
#define YEAR 2024
Copy link
Contributor

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__?

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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().

Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I will.


static int YEAR;
Copy link
Contributor

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
Copy link
Contributor

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.

dgarske
dgarske previously approved these changes Sep 20, 2024
@dgarske
Copy link
Contributor

dgarske commented Sep 20, 2024

@miyazakh Looks like merge conflicts. Please rebase and squash. Thanks!

Use ASN_TEMPLATE
Extracting YEAR and MONTH from __DATE__
@dgarske dgarske merged commit a9cc880 into wolfSSL:master Sep 21, 2024
135 checks passed
@miyazakh miyazakh deleted the renesas_rx65n_rsk_update branch September 21, 2024 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants