Skip to content

Commit

Permalink
Merge pull request #7849 from miyazakh/renesas_tsip_update
Browse files Browse the repository at this point in the history
RX72N support update
  • Loading branch information
douzzer authored Aug 12, 2024
2 parents 9f9e890 + debbea3 commit 53f5ded
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,20 @@
# undef WOLFSSL_RENESAS_TSIP_TLS
# undef WOLFSSL_RENESAS_TSIP_CRYPT
#endif

/*-------------------------------------------------------------------------
* TSIP generates random numbers using the CRT-DRBG described
* in NIST SP800-90A. Recommend to define the CUSTOM_RAND_GENERATE_BLOCK
* so that wc_RNG_GenerateByte/Block() call TSIP random generatoion API
* directly. Comment out the macro will generate random number by
* wolfSSL Hash DRBG by using a seed which is generated by TSIP API.
*-----------------------------------------------------------------------*/
#define CUSTOM_RAND_GENERATE_BLOCK wc_tsip_GenerateRandBlock
#else
#define OPENSSL_EXTRA
#define WOLFSSL_GENSEED_FORTEST /* Warning: define your own seed gen */
#if !defined(min)
#define min(data1, data2) _builtin_min(data1, data2)
#endif
#endif


Expand All @@ -276,6 +286,5 @@
/*-- strcasecmp */
#define XSTRCASECMP(s1,s2) strcmp((s1),(s2))

#define CUSTOM_RAND_GENERATE_BLOCK wc_tsip_GenerateRandBlock
/* use original ASN parsing */
#define WOLFSSL_ASN_ORIGINAL
3 changes: 2 additions & 1 deletion src/ssl_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -3545,6 +3545,7 @@ WOLFSSL_ASN1_TIME* wolfSSL_ASN1_TIME_to_generalizedtime(WOLFSSL_ASN1_TIME *t,
return ret;
}

#if !defined(USER_TIME) && !defined(TIME_OVERRIDES)
WOLFSSL_ASN1_TIME* wolfSSL_ASN1_UTCTIME_set(WOLFSSL_ASN1_TIME *s, time_t t)
{
WOLFSSL_ASN1_TIME* ret = s;
Expand All @@ -3570,7 +3571,7 @@ WOLFSSL_ASN1_TIME* wolfSSL_ASN1_UTCTIME_set(WOLFSSL_ASN1_TIME *s, time_t t)

return ret;
}

#endif /* !USER_TIME && !TIME_OVERRIDES */
#endif /* OPENSSL_EXTRA */

#if defined(WOLFSSL_MYSQL_COMPATIBLE) || defined(OPENSSL_EXTRA)
Expand Down

0 comments on commit 53f5ded

Please sign in to comment.