Skip to content

Commit 53f5ded

Browse files
authored
Merge pull request #7849 from miyazakh/renesas_tsip_update
RX72N support update
2 parents 9f9e890 + debbea3 commit 53f5ded

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

IDE/Renesas/e2studio/RX72N/EnvisionKit/wolfssl_demo/user_settings.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,20 @@
259259
# undef WOLFSSL_RENESAS_TSIP_TLS
260260
# undef WOLFSSL_RENESAS_TSIP_CRYPT
261261
#endif
262-
262+
/*-------------------------------------------------------------------------
263+
* TSIP generates random numbers using the CRT-DRBG described
264+
* in NIST SP800-90A. Recommend to define the CUSTOM_RAND_GENERATE_BLOCK
265+
* so that wc_RNG_GenerateByte/Block() call TSIP random generatoion API
266+
* directly. Comment out the macro will generate random number by
267+
* wolfSSL Hash DRBG by using a seed which is generated by TSIP API.
268+
*-----------------------------------------------------------------------*/
269+
#define CUSTOM_RAND_GENERATE_BLOCK wc_tsip_GenerateRandBlock
263270
#else
264271
#define OPENSSL_EXTRA
265272
#define WOLFSSL_GENSEED_FORTEST /* Warning: define your own seed gen */
273+
#if !defined(min)
274+
#define min(data1, data2) _builtin_min(data1, data2)
275+
#endif
266276
#endif
267277

268278

@@ -276,6 +286,5 @@
276286
/*-- strcasecmp */
277287
#define XSTRCASECMP(s1,s2) strcmp((s1),(s2))
278288

279-
#define CUSTOM_RAND_GENERATE_BLOCK wc_tsip_GenerateRandBlock
280289
/* use original ASN parsing */
281290
#define WOLFSSL_ASN_ORIGINAL

src/ssl_asn1.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3545,6 +3545,7 @@ WOLFSSL_ASN1_TIME* wolfSSL_ASN1_TIME_to_generalizedtime(WOLFSSL_ASN1_TIME *t,
35453545
return ret;
35463546
}
35473547

3548+
#if !defined(USER_TIME) && !defined(TIME_OVERRIDES)
35483549
WOLFSSL_ASN1_TIME* wolfSSL_ASN1_UTCTIME_set(WOLFSSL_ASN1_TIME *s, time_t t)
35493550
{
35503551
WOLFSSL_ASN1_TIME* ret = s;
@@ -3570,7 +3571,7 @@ WOLFSSL_ASN1_TIME* wolfSSL_ASN1_UTCTIME_set(WOLFSSL_ASN1_TIME *s, time_t t)
35703571

35713572
return ret;
35723573
}
3573-
3574+
#endif /* !USER_TIME && !TIME_OVERRIDES */
35743575
#endif /* OPENSSL_EXTRA */
35753576

35763577
#if defined(WOLFSSL_MYSQL_COMPATIBLE) || defined(OPENSSL_EXTRA)

0 commit comments

Comments
 (0)