addressed review comments 5

This commit is contained in:
Hideki Miyazaki
2022-07-15 13:46:30 +09:00
parent fd885d89eb
commit 15725400a7
6 changed files with 26 additions and 21 deletions

View File

@@ -369,19 +369,19 @@ static void Tls_client(void *pvParam)
if (ret == 0) {
#ifdef WOLFSSL_RENESAS_TSIP_TLS
#if !defined(TLS_MULTITHREAD_TEST)
memset(&userContext, 0, sizeof(TsipUserCtx));
tsip_set_callback_ctx(ssl, &userContext);
#else
if (p->port - TLSSERVER_PORT == 0) {
memset(&userContext_taskA, 0, sizeof(TsipUserCtx));
tsip_set_callback_ctx(ssl, (void*)&userContext_taskA);
}
else {
memset(&userContext_taskB, 0, sizeof(TsipUserCtx));
tsip_set_callback_ctx(ssl, (void*)&userContext_taskB);
}
#endif
#if !defined(TLS_MULTITHREAD_TEST)
memset(&userContext, 0, sizeof(TsipUserCtx));
tsip_set_callback_ctx(ssl, &userContext);
#else
if (p->port - TLSSERVER_PORT == 0) {
memset(&userContext_taskA, 0, sizeof(TsipUserCtx));
tsip_set_callback_ctx(ssl, (void*)&userContext_taskA);
}
else {
memset(&userContext_taskB, 0, sizeof(TsipUserCtx));
tsip_set_callback_ctx(ssl, (void*)&userContext_taskB);
}
#endif
#endif
}

View File

@@ -60,7 +60,8 @@
/* use multi-thread example */
/* #define TLS_MULTITHREAD_TEST */
#if defined(TLS_MULTITHREAD_TEST) && defined(WOLFSSL_TLS13)
#error "MULTITHREAD_TEST is only available when not set WOLFSSL_TLS13"
#error "MULTITHREAD_TEST is only available when not set WOLFSSL_TLS13 \
because it is not verified yet."
#endif
#if defined(TLS_MULTITHREAD_TEST)

View File

@@ -133,7 +133,8 @@ static int tsip_aes_cbc_test(int prnt, tsip_aes_key_index_t* aes_key)
ret = -1;
#ifdef HAVE_AES_DECRYPT
ret = wc_AesInit(aes, NULL, INVALID_DEVID);
if (ret == 0)
ret = wc_AesInit(aes, NULL, INVALID_DEVID);
if (ret == 0) {
ret = wc_AesSetKey(aes, key, AES_BLOCK_SIZE, iv, AES_DECRYPTION);
XMEMCPY(&aes->ctx.tsip_keyIdx, aes_key,