forked from wolfSSL/wolfssl
Merge pull request #4958 from TakayukiMatsuo/example
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
typedef unsigned long time_t;
|
typedef unsigned long time_t;
|
||||||
|
|
||||||
#define YEAR 2022
|
#define YEAR 2022
|
||||||
#define MON 2
|
#define MON 3
|
||||||
|
|
||||||
static int tick = 0;
|
static int tick = 0;
|
||||||
|
|
||||||
|
@@ -72,7 +72,7 @@
|
|||||||
<link>
|
<link>
|
||||||
<name>wolfcrypt/port/renesas_common.c</name>
|
<name>wolfcrypt/port/renesas_common.c</name>
|
||||||
<type>1</type>
|
<type>1</type>
|
||||||
<location>F:/Work/1_Renesas/tsip113_integrate/wolfssl/wolfcrypt/src/port/Renesas/renesas_common.c</location>
|
<locationURI>PARENT-6-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_common.c</locationURI>
|
||||||
</link>
|
</link>
|
||||||
<link>
|
<link>
|
||||||
<name>wolfcrypt/port/renesas_tsip_aes.c</name>
|
<name>wolfcrypt/port/renesas_tsip_aes.c</name>
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
</Category>
|
</Category>
|
||||||
<Category Name="wolfcrypt">
|
<Category Name="wolfcrypt">
|
||||||
<Category Name="port">
|
<Category Name="port">
|
||||||
<Path>..\..\..\..\..\..\..\..\tsip113_integrate\wolfssl\wolfcrypt\src\port\Renesas\renesas_common.c</Path>
|
<Path>..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_common.c</Path>
|
||||||
<Path>..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_aes.c</Path>
|
<Path>..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_aes.c</Path>
|
||||||
<Path>..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_sha.c</Path>
|
<Path>..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_sha.c</Path>
|
||||||
<Path>..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_util.c</Path>
|
<Path>..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_util.c</Path>
|
||||||
|
@@ -8,9 +8,6 @@
|
|||||||
<sections name="R_2"/>
|
<sections name="R_2"/>
|
||||||
<sections name="R"/>
|
<sections name="R"/>
|
||||||
<sections name="RPFRAM2"/>
|
<sections name="RPFRAM2"/>
|
||||||
<sections name="C_BOOTLOADER_KEY_STORAGE*">
|
|
||||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1048576"/>
|
|
||||||
</sections>
|
|
||||||
<sections name="C_PKCS11_STORAGE*">
|
<sections name="C_PKCS11_STORAGE*">
|
||||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1050624"/>
|
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1050624"/>
|
||||||
</sections>
|
</sections>
|
||||||
|
@@ -37,42 +37,36 @@
|
|||||||
#include "wolfssl/certs_test.h"
|
#include "wolfssl/certs_test.h"
|
||||||
#include "wolfssl/wolfcrypt/types.h"
|
#include "wolfssl/wolfcrypt/types.h"
|
||||||
#include "wolfssl_demo.h"
|
#include "wolfssl_demo.h"
|
||||||
|
#include <wolfcrypt/test/test.h>
|
||||||
|
#include <wolfcrypt/benchmark/benchmark.h>
|
||||||
|
|
||||||
#if defined(BENCHMARK)
|
#if defined(BENCHMARK)
|
||||||
#include "r_cmt_rx_if.h"
|
#include "r_cmt_rx_if.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(TLS_CLIENT)
|
||||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
|
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
|
||||||
#include "key_data.h"
|
#include "key_data.h"
|
||||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h>
|
#include <wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h>
|
||||||
|
|
||||||
extern const st_key_block_data_t g_key_block_data;
|
extern const st_key_block_data_t g_key_block_data;
|
||||||
user_PKCbInfo guser_PKCbInfo;
|
user_PKCbInfo guser_PKCbInfo;
|
||||||
#endif
|
uint32_t g_encrypted_root_public_key[140];
|
||||||
|
static TsipUserCtx userContext;
|
||||||
|
|
||||||
|
#endif /* WOLFSSL_RENESAS_TSIP_TLS */
|
||||||
|
|
||||||
|
static WOLFSSL_CTX* client_ctx;
|
||||||
#define YEAR 2022
|
#endif /* TLS_CLIENT */
|
||||||
#define MON 1
|
|
||||||
#define FREQ 10000 /* Hz */
|
|
||||||
|
|
||||||
#define TLSSERVER_IP "192.168.1.14"
|
#define TLSSERVER_IP "192.168.1.14"
|
||||||
#define TLSSERVER_PORT 11111
|
#define TLSSERVER_PORT 11111
|
||||||
|
#define YEAR 2022
|
||||||
typedef struct func_args {
|
#define MON 3
|
||||||
int argc;
|
#define FREQ 10000 /* Hz */
|
||||||
char** argv;
|
|
||||||
int return_code;
|
|
||||||
} func_args;
|
|
||||||
|
|
||||||
static long tick;
|
static long tick;
|
||||||
static int tmTick;
|
static int tmTick;
|
||||||
static WOLFSSL_CTX* client_ctx;
|
|
||||||
|
|
||||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
|
|
||||||
uint32_t g_encrypted_root_public_key[140];
|
|
||||||
static TsipUserCtx userContext;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* time
|
/* time
|
||||||
* returns seconds from EPOCH
|
* returns seconds from EPOCH
|
||||||
@@ -86,11 +80,13 @@ time_t time(time_t *t)
|
|||||||
/* timeTick
|
/* timeTick
|
||||||
* called periodically by H/W timer to increase tmTick.
|
* called periodically by H/W timer to increase tmTick.
|
||||||
*/
|
*/
|
||||||
|
#if defined(BENCHMARK)
|
||||||
static void timeTick(void* pdata)
|
static void timeTick(void* pdata)
|
||||||
{
|
{
|
||||||
(void)pdata;
|
(void)pdata;
|
||||||
tick++;
|
tick++;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
double current_time(int reset)
|
double current_time(int reset)
|
||||||
{
|
{
|
||||||
@@ -98,30 +94,28 @@ double current_time(int reset)
|
|||||||
return ((double)tick/FREQ) ;
|
return ((double)tick/FREQ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wolfcrypt_test();
|
|
||||||
void benchmark_test();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* --------------------------------------------------------*/
|
/* --------------------------------------------------------*/
|
||||||
/* Benchmark_demo */
|
/* Benchmark_demo */
|
||||||
/* --------------------------------------------------------*/
|
/* --------------------------------------------------------*/
|
||||||
|
#if defined(BENCHMARK)
|
||||||
static void Benchmark_demo(void)
|
static void Benchmark_demo(void)
|
||||||
{
|
{
|
||||||
uint32_t channel;
|
uint32_t channel;
|
||||||
R_CMT_CreatePeriodic(FREQ, &timeTick, &channel);
|
R_CMT_CreatePeriodic(FREQ, &timeTick, &channel);
|
||||||
|
|
||||||
printf("Start wolfCrypt Benchmark\n");
|
printf("Start wolfCrypt Benchmark\n");
|
||||||
benchmark_test();
|
benchmark_test(NULL);
|
||||||
printf("End wolfCrypt Benchmark\n");
|
printf("End wolfCrypt Benchmark\n");
|
||||||
}
|
}
|
||||||
|
#endif /* BENCHMARK */
|
||||||
/* --------------------------------------------------------*/
|
/* --------------------------------------------------------*/
|
||||||
/* CryptTest_demo */
|
/* CryptTest_demo */
|
||||||
/* --------------------------------------------------------*/
|
/* --------------------------------------------------------*/
|
||||||
|
#if defined(CRYPT_TEST)
|
||||||
static void CryptTest_demo(void)
|
static void CryptTest_demo(void)
|
||||||
{
|
{
|
||||||
func_args args = { 0 };
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if ((ret = wolfCrypt_Init()) != 0) {
|
if ((ret = wolfCrypt_Init()) != 0) {
|
||||||
@@ -129,17 +123,18 @@ static void CryptTest_demo(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
printf("Start wolfCrypt Test\n");
|
printf("Start wolfCrypt Test\n");
|
||||||
wolfcrypt_test(args);
|
wolfcrypt_test(NULL);
|
||||||
printf("End wolfCrypt Test\n");
|
printf("End wolfCrypt Test\n");
|
||||||
|
|
||||||
if ((ret = wolfCrypt_Cleanup()) != 0) {
|
if ((ret = wolfCrypt_Cleanup()) != 0) {
|
||||||
printf("wolfCrypt_Cleanup failed %d\n", ret);
|
printf("wolfCrypt_Cleanup failed %d\n", ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* CRYPT_TEST */
|
||||||
/* --------------------------------------------------------*/
|
/* --------------------------------------------------------*/
|
||||||
/* Tls_client_demo */
|
/* Tls_client_demo */
|
||||||
/* --------------------------------------------------------*/
|
/* --------------------------------------------------------*/
|
||||||
|
#if defined(TLS_CLIENT)
|
||||||
static void Tls_client_init(const char* cipherlist)
|
static void Tls_client_init(const char* cipherlist)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -392,7 +387,7 @@ static void Tls_client_demo(void)
|
|||||||
|
|
||||||
printf("End of TLS_Client demo.\n");
|
printf("End of TLS_Client demo.\n");
|
||||||
}
|
}
|
||||||
|
#endif /* TLS_CLIENT */
|
||||||
|
|
||||||
/* Demo entry function called by iot_demo_runner
|
/* Demo entry function called by iot_demo_runner
|
||||||
* To run this entry function as an aws_iot_demo, define this as
|
* To run this entry function as an aws_iot_demo, define this as
|
||||||
|
@@ -16,9 +16,6 @@
|
|||||||
<sections name="RPFRAM2*"/>
|
<sections name="RPFRAM2*"/>
|
||||||
<sections name="SU"/>
|
<sections name="SU"/>
|
||||||
<sections name="SI"/>
|
<sections name="SI"/>
|
||||||
<sections name="C_BOOTLOADER_KEY_STORAGE*">
|
|
||||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1048576"/>
|
|
||||||
</sections>
|
|
||||||
<sections name="C_PKCS11_STORAGE*">
|
<sections name="C_PKCS11_STORAGE*">
|
||||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1050624"/>
|
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1050624"/>
|
||||||
</sections>
|
</sections>
|
||||||
|
@@ -105,7 +105,7 @@
|
|||||||
* - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA256
|
* - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA256
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#define USE_ECC_CERT
|
/*#define USE_ECC_CERT*/
|
||||||
|
|
||||||
/* In this example application, Root CA cert buffer named
|
/* In this example application, Root CA cert buffer named
|
||||||
* "ca_ecc_cert_der_256" is used under the following macro definition
|
* "ca_ecc_cert_der_256" is used under the following macro definition
|
||||||
|
@@ -37,43 +37,37 @@
|
|||||||
#include "wolfssl/certs_test.h"
|
#include "wolfssl/certs_test.h"
|
||||||
#include "wolfssl/wolfcrypt/types.h"
|
#include "wolfssl/wolfcrypt/types.h"
|
||||||
#include "wolfssl_demo.h"
|
#include "wolfssl_demo.h"
|
||||||
|
#include <wolfcrypt/test/test.h>
|
||||||
|
#include <wolfcrypt/benchmark/benchmark.h>
|
||||||
|
|
||||||
#if defined(BENCHMARK)
|
#if defined(BENCHMARK)
|
||||||
#include "r_cmt_rx_if.h"
|
#include "r_cmt_rx_if.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(TLS_CLIENT)
|
||||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
|
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
|
||||||
#include "key_data.h"
|
#include "key_data.h"
|
||||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h>
|
#include <wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h>
|
||||||
|
|
||||||
extern const st_key_block_data_t g_key_block_data;
|
extern const st_key_block_data_t g_key_block_data;
|
||||||
user_PKCbInfo guser_PKCbInfo;
|
user_PKCbInfo guser_PKCbInfo;
|
||||||
#endif
|
uint32_t g_encrypted_root_public_key[140];
|
||||||
|
static TsipUserCtx userContext;
|
||||||
|
|
||||||
|
#endif /* WOLFSSL_RENESAS_TSIP_TLS */
|
||||||
|
|
||||||
|
static WOLFSSL_CTX* client_ctx;
|
||||||
|
#endif /* TLS_CLIENT */
|
||||||
|
|
||||||
#define YEAR 2022
|
#define TLSSERVER_IP "192.168.1.12"
|
||||||
#define MON 1
|
|
||||||
#define FREQ 10000 /* Hz */
|
|
||||||
|
|
||||||
#define TLSSERVER_IP "192.168.1.14"
|
|
||||||
#define TLSSERVER_PORT 11111
|
#define TLSSERVER_PORT 11111
|
||||||
|
#define YEAR 2022
|
||||||
typedef struct func_args {
|
#define MON 3
|
||||||
int argc;
|
#define FREQ 10000 /* Hz */
|
||||||
char** argv;
|
|
||||||
int return_code;
|
|
||||||
} func_args;
|
|
||||||
|
|
||||||
static long tick;
|
static long tick;
|
||||||
static int tmTick;
|
static int tmTick;
|
||||||
static WOLFSSL_CTX* client_ctx;
|
|
||||||
|
|
||||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
|
|
||||||
uint32_t g_encrypted_root_public_key[140];
|
|
||||||
static TsipUserCtx userContext;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* time
|
/* time
|
||||||
* returns seconds from EPOCH
|
* returns seconds from EPOCH
|
||||||
*/
|
*/
|
||||||
@@ -86,11 +80,13 @@ time_t time(time_t *t)
|
|||||||
/* timeTick
|
/* timeTick
|
||||||
* called periodically by H/W timer to increase tmTick.
|
* called periodically by H/W timer to increase tmTick.
|
||||||
*/
|
*/
|
||||||
|
#if defined(BENCHMARK)
|
||||||
static void timeTick(void* pdata)
|
static void timeTick(void* pdata)
|
||||||
{
|
{
|
||||||
(void)pdata;
|
(void)pdata;
|
||||||
tick++;
|
tick++;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
double current_time(int reset)
|
double current_time(int reset)
|
||||||
{
|
{
|
||||||
@@ -98,30 +94,30 @@ double current_time(int reset)
|
|||||||
return ((double)tick/FREQ) ;
|
return ((double)tick/FREQ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wolfcrypt_test();
|
|
||||||
void benchmark_test();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* --------------------------------------------------------*/
|
/* --------------------------------------------------------*/
|
||||||
/* Benchmark_demo */
|
/* Benchmark_demo */
|
||||||
/* --------------------------------------------------------*/
|
/* --------------------------------------------------------*/
|
||||||
|
#if defined(BENCHMARK)
|
||||||
static void Benchmark_demo(void)
|
static void Benchmark_demo(void)
|
||||||
{
|
{
|
||||||
uint32_t channel;
|
uint32_t channel;
|
||||||
R_CMT_CreatePeriodic(FREQ, &timeTick, &channel);
|
R_CMT_CreatePeriodic(FREQ, &timeTick, &channel);
|
||||||
|
|
||||||
printf("Start wolfCrypt Benchmark\n");
|
printf("Start wolfCrypt Benchmark\n");
|
||||||
benchmark_test();
|
benchmark_test(NULL);
|
||||||
printf("End wolfCrypt Benchmark\n");
|
printf("End wolfCrypt Benchmark\n");
|
||||||
}
|
}
|
||||||
|
#endif /* BENCHMARK */
|
||||||
/* --------------------------------------------------------*/
|
/* --------------------------------------------------------*/
|
||||||
/* CryptTest_demo */
|
/* CryptTest_demo */
|
||||||
/* --------------------------------------------------------*/
|
/* --------------------------------------------------------*/
|
||||||
|
#if defined(CRYPT_TEST)
|
||||||
static void CryptTest_demo(void)
|
static void CryptTest_demo(void)
|
||||||
{
|
{
|
||||||
func_args args = { 0 };
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if ((ret = wolfCrypt_Init()) != 0) {
|
if ((ret = wolfCrypt_Init()) != 0) {
|
||||||
@@ -129,17 +125,18 @@ static void CryptTest_demo(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
printf("Start wolfCrypt Test\n");
|
printf("Start wolfCrypt Test\n");
|
||||||
wolfcrypt_test(args);
|
wolfcrypt_test(NULL);
|
||||||
printf("End wolfCrypt Test\n");
|
printf("End wolfCrypt Test\n");
|
||||||
|
|
||||||
if ((ret = wolfCrypt_Cleanup()) != 0) {
|
if ((ret = wolfCrypt_Cleanup()) != 0) {
|
||||||
printf("wolfCrypt_Cleanup failed %d\n", ret);
|
printf("wolfCrypt_Cleanup failed %d\n", ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* CRYPT_TEST */
|
||||||
/* --------------------------------------------------------*/
|
/* --------------------------------------------------------*/
|
||||||
/* Tls_client_demo */
|
/* Tls_client_demo */
|
||||||
/* --------------------------------------------------------*/
|
/* --------------------------------------------------------*/
|
||||||
|
#if defined(TLS_CLIENT)
|
||||||
static void Tls_client_init(const char* cipherlist)
|
static void Tls_client_init(const char* cipherlist)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -169,7 +166,8 @@ static void Tls_client_init(const char* cipherlist)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Create and initialize WOLFSSL_CTX */
|
/* Create and initialize WOLFSSL_CTX */
|
||||||
if ((client_ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method_ex((void *)NULL))) == NULL) {
|
if ((client_ctx =
|
||||||
|
wolfSSL_CTX_new(wolfTLSv1_2_client_method_ex((void *)NULL))) == NULL) {
|
||||||
printf("ERROR: failed to create WOLFSSL_CTX\n");
|
printf("ERROR: failed to create WOLFSSL_CTX\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -180,7 +178,8 @@ static void Tls_client_init(const char* cipherlist)
|
|||||||
|
|
||||||
#if defined(NO_FILESYSTEM)
|
#if defined(NO_FILESYSTEM)
|
||||||
|
|
||||||
if (wolfSSL_CTX_load_verify_buffer(client_ctx, cert, SIZEOF_CERT, SSL_FILETYPE_ASN1) != SSL_SUCCESS){
|
if (wolfSSL_CTX_load_verify_buffer(client_ctx, cert,
|
||||||
|
SIZEOF_CERT, SSL_FILETYPE_ASN1) != SSL_SUCCESS) {
|
||||||
printf("ERROR: can't load certificate data\n");
|
printf("ERROR: can't load certificate data\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -197,7 +196,8 @@ static void Tls_client_init(const char* cipherlist)
|
|||||||
|
|
||||||
/* use specific cipher */
|
/* use specific cipher */
|
||||||
if (cipherlist != NULL &&
|
if (cipherlist != NULL &&
|
||||||
wolfSSL_CTX_set_cipher_list(client_ctx, cipherlist) != WOLFSSL_SUCCESS) {
|
wolfSSL_CTX_set_cipher_list(client_ctx, cipherlist) !=
|
||||||
|
WOLFSSL_SUCCESS) {
|
||||||
wolfSSL_CTX_free(client_ctx); client_ctx = NULL;
|
wolfSSL_CTX_free(client_ctx); client_ctx = NULL;
|
||||||
printf("client can't set cipher list");
|
printf("client can't set cipher list");
|
||||||
}
|
}
|
||||||
@@ -270,7 +270,8 @@ static void Tls_client()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
if (wolfSSL_write(ssl, sendBuff, strlen(sendBuff)) != strlen(sendBuff)) {
|
if (wolfSSL_write(ssl, sendBuff, strlen(sendBuff)) !=
|
||||||
|
strlen(sendBuff)) {
|
||||||
printf("ERROR wolfSSL_write: %d\n", wolfSSL_get_error(ssl, 0));
|
printf("ERROR wolfSSL_write: %d\n", wolfSSL_get_error(ssl, 0));
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
@@ -309,7 +310,7 @@ static void Tls_client()
|
|||||||
static void Tls_client_demo(void)
|
static void Tls_client_demo(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* setup ciphersuite list to use for TLS handshake */
|
/* setup ciphersuite list to use for TLS handshake */
|
||||||
|
|
||||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
|
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
|
||||||
|
|
||||||
@@ -344,7 +345,7 @@ static void Tls_client_demo(void)
|
|||||||
printf("/*------------------------------------------------*/\n");
|
printf("/*------------------------------------------------*/\n");
|
||||||
printf(" TLS_Client demo\n");
|
printf(" TLS_Client demo\n");
|
||||||
printf(" - TLS server address:" TLSSERVER_IP " port: %d\n",
|
printf(" - TLS server address:" TLSSERVER_IP " port: %d\n",
|
||||||
TLSSERVER_PORT );
|
TLSSERVER_PORT);
|
||||||
|
|
||||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) && (WOLFSSL_RENESAS_TSIP_VER >=109)
|
#if defined(WOLFSSL_RENESAS_TSIP_TLS) && (WOLFSSL_RENESAS_TSIP_VER >=109)
|
||||||
printf(" - with TSIP\n");
|
printf(" - with TSIP\n");
|
||||||
@@ -388,7 +389,7 @@ static void Tls_client_demo(void)
|
|||||||
|
|
||||||
printf("End of TLS_Client demo.\n");
|
printf("End of TLS_Client demo.\n");
|
||||||
}
|
}
|
||||||
|
#endif /* TLS_CLIENT */
|
||||||
|
|
||||||
/* Demo entry function called by iot_demo_runner
|
/* Demo entry function called by iot_demo_runner
|
||||||
* To run this entry function as an aws_iot_demo, define this as
|
* To run this entry function as an aws_iot_demo, define this as
|
||||||
|
@@ -2500,7 +2500,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
|||||||
len = sz;
|
len = sz;
|
||||||
}
|
}
|
||||||
/* return 4 words random number*/
|
/* return 4 words random number*/
|
||||||
ret = R_TSIP_GenerateRandomNumber(buffer);
|
ret = R_TSIP_GenerateRandomNumber((uint32_t*)buffer);
|
||||||
if(ret == TSIP_SUCCESS) {
|
if(ret == TSIP_SUCCESS) {
|
||||||
XMEMCPY(output, &buffer, len);
|
XMEMCPY(output, &buffer, len);
|
||||||
output += len;
|
output += len;
|
||||||
|
Reference in New Issue
Block a user