diff --git a/.gitignore b/.gitignore
index 6d4149397..31e9b4a56 100644
--- a/.gitignore
+++ b/.gitignore
@@ -354,6 +354,24 @@ IDE/XCODE/Index
/IDE/Renesas/e2studio/Projects/test/*.launch
/IDE/Renesas/e2studio/Projects/test/*.scfg
+/IDE/Renesas/e2studio/RX65N/GR-ROSE/.metadata
+/IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/src
+/IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/trash
+/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/smc_gen
+/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/generate
+
+/IDE/Renesas/e2studio/RX65N/RSK/.metadata
+/IDE/Renesas/e2studio/RX65N/RSK/smc/src
+/IDE/Renesas/e2studio/RX65N/RSK/smc/trash
+/IDE/Renesas/e2studio/RX65N/RSK/test/src/smc_gen
+/IDE/Renesas/e2studio/RX65N/RSK/test/generate
+
+/IDE/Renesas/e2studio/RX72N/EnvisionKit/.metadata
+/IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/src
+/IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/trash
+/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/smc_gen
+/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/generate
+
# QNX CAAM
/IDE/QNX/example-server/server-tls
/IDE/QNX/example-client/client-tls
diff --git a/IDE/Renesas/e2studio/GR-ROSE/README b/IDE/Renesas/e2studio/GR-ROSE/README
deleted file mode 100644
index 7d067731e..000000000
--- a/IDE/Renesas/e2studio/GR-ROSE/README
+++ /dev/null
@@ -1,149 +0,0 @@
------------------------------------------------------
-0. 初めに
------------------------------------------------------
-
-このドキュメントではE2Studio上でwolfsslを含んだテストアプリケーションを作成する手順を示します。
-
-このREADMEが含まれているフォルダには
- 1.smc ---スマートコンフィギュレータ用プロジェクトが格納されているフォルダです
- 2.test ---テストアプリケーション用プロジェクトが格納されているフォルダです
- 3.wolfssl ---テストアプリケーションにリンクされて使用されるwolfsslライブラリ用プロジェクトが格納されているフォルダです
- 4.common ---設定ファイル等が格納されたフォルダです
-
-フォルダが存在しています。
-
--------------------------------------
-1.プロジェクトのインポート
--------------------------------------
-
-e2studioを起動したら、プロジェクト・エクスプローラー画面を表示させ、"ファイル"メニュー > ”ファイル・システムからプロジェクトを開く...”を選択し、
-プロジェクトインポートダイアログを表示させます。
-
-ディレクトリボタンを押して、上記の1~3のフォルダの3プロジェクトをインポートしてください。
-
--------------------------------------
-2.smcプロジェクトでソースファイルを生成させる
--------------------------------------
-
-smcプロジェクトにはsmc.scfgファイルが既に用意してあります。
-このファイルをダブルクリックするとスマートコンフィギュレータパースペクティブが開き、複数のタブを含んだ設定ページが表示されます。
-概要タブに現在選択されているコンポーネントがバージョンとともにリストアップされています。
-これらはテストアプリケーションの実行に必要なものが設定済みとなっています。
-ボード情報、クロック設定などもGR-ROSEに合わせて設定済みです。
-
-設定が必要な個所は、
-コンポーネントタブで r_t4_rx コンポーネントの設定を表示させます。ここで、次のプロパティの値
-#IP address for ch0,when DHCP disable.
-
-として、GR-ROSEに設定するIPv4アドレスを皆さんの環境に合った値に設定してください。
-ここだけが設定が必要な個所です。
-
-設定を保存し、画面右上のソースファイル生成ボタンを押してソースファイルを生成させてください。
-
--------------------------------------
-3.testプロジェクトに生成させたソースファイルをコピーする
--------------------------------------
-
-e2studioのプロジェクト・エクスプローラー画面のtestプロジェクトのフォルダを展開すると、
-srcフォルダがあります。このフォルダに、smcプロジェクトフォルダ内のsrc/smc_genをコピーしてください。
-
--------------------------------------
-4.testプロジェクトの動作を選択する
--------------------------------------
-
-テストアプリケーションは、暗号化テスト、ベンチマーク、TLSクライアント、TLSサーバーの
-4種類の動作を選択できます。選択は、common/user_settings.hの
-定義文を有効化することで行います。
-
--------------------------------------
-5.wolfsslプロジェクト、testプロジェクトをビルドする
--------------------------------------
-
-ビルド前に必ず上記4の設定が終わっていることを確認してください。
-ビルドはwolfssl,testの順に行います。
-
--------------------------------------
-6.エミュレータを使ってtestアプリケーションを実行する
--------------------------------------
-
-エミュレータとターゲットボードとPCをケーブルで接続したら、すでに、test HardwareDebug.launchが用意してありますから
-e2studioの”実行” >”デバッグ”を選択してデバッグを開始してください。
-
-お手持ちのエミュレータが異なる場合はデバッグ構成を変更して上記ファイルを更新してください。
-
-
-=================================================================================
-
------------------------------------------------------
-0. About this document
------------------------------------------------------
-
-This document will show you how to create a test application containing wolfssl on E2Studio.
-
-The folder that contains this README has:
- 1.smc --- the folder where the smart configurator project is stored.
- 2.test --- the folder where the test application project is stored
- 3. wolfssl --- the folder where the project for the wolfssl library used by the test application is stored.
- 4.common --- the folder where the configuration files etc. are stored
-
-
--------------------------------------
-1. Import projects
--------------------------------------
-
-After starting e2studio, display the project explorer screen,
-select "File" menu> "Open project from file system...",
-Display the project import dialog.
-
-Press the directory button and import the 3 projects in the folders 1 to 3 above.
-
--------------------------------------
-2. Generate source files in smc project
--------------------------------------
-
-The smc.scfg file is already prepared in the smc project.
-Double-clicking on this file will open the Smart Configurator perspective,
-displaying a configuration page with multiple tabs.
-The components currently selected in the Overview tab are listed along with their version.
-These are already set up to run the test application.
-Board information and clock settings are already set according to GR-ROSE.
-
-The points that need to be set are
-Display the r_t4_rx component settings in the component tab. Where the value of the following property
-#IP address for ch0,when DHCP disable.
-
-Then, set the IPv4 address set in GR-ROSE to a value that suits your environment.
-This is the only place that needs to be set.
-
-Save the settings and press the source file generation button at the top right of the screen to generate the source file.
-
--------------------------------------
-3. Copy the source files generated in the test project
--------------------------------------
-
-When you expand the test project folder on the e2studio Project Explorer screen,
-There is a src folder. Copy src/smc_gen in the smc project folder to test/src folder.
-
--------------------------------------
-4. Select the behavior of the test project
--------------------------------------
-
-Test applications include encryption test, benchmark, TLS client, TLS server
-You can select four types of operation. Select from common/user_settings.h
-This is done by activating one of those commented definition statements.
-
--------------------------------------
-5. Build wolfssl project, test project
--------------------------------------
-
-Make sure that the above 4 settings are completed before building.
-Build in order of wolfssl and test.
-
--------------------------------------
-6. Run the test application using the emulator
--------------------------------------
-
-After connecting the emulator, target board and PC with a cable, test HardwareDebug.launch is already prepared.
-Select "Run"> "Debug" in e2 studio to start debugging.
-
-If the emulator you have is different, change the debug configuration and update the above file.
diff --git a/IDE/Renesas/e2studio/GR-ROSE/include.am b/IDE/Renesas/e2studio/GR-ROSE/include.am
deleted file mode 100644
index c56df0796..000000000
--- a/IDE/Renesas/e2studio/GR-ROSE/include.am
+++ /dev/null
@@ -1,23 +0,0 @@
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/README
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/wolfssl/.cproject
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/wolfssl/.project
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/.cproject
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/.project
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/test_HardwareDebug.launch
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/src/test_main.c
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/src/key_data.c
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/src/key_data.h
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/src/wolf_client.c
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/src/wolf_server.c
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/test/src/wolfssl_demo.h
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/common/wolfssl_dummy.c
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/common/strings.h
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/common/unistd.h
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/common/user_settings.h
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/smc/.cproject
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/smc/.project
-EXTRA_DIST+= IDE/Renesas/e2studio/GR-ROSE/smc/smc.scfg
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/GR-ROSE/smc/smc.scfg b/IDE/Renesas/e2studio/GR-ROSE/smc/smc.scfg
deleted file mode 100644
index a3a47ef41..000000000
--- a/IDE/Renesas/e2studio/GR-ROSE/smc/smc.scfg
+++ /dev/null
@@ -1,818 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/IDE/Renesas/e2studio/GR-ROSE/test/src/key_data.c b/IDE/Renesas/e2studio/GR-ROSE/test/src/key_data.c
deleted file mode 100644
index 4a4fd08a3..000000000
--- a/IDE/Renesas/e2studio/GR-ROSE/test/src/key_data.c
+++ /dev/null
@@ -1,278 +0,0 @@
-/* key_data.c
- *
- * Copyright (C) 2006-2021 wolfSSL Inc.
- *
- * This file is part of wolfSSL.
- *
- * wolfSSL is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * wolfSSL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
- */
-
-
-
-#include "key_data.h"
-
-/*-------------------------------------------------------------------------
- TSIP v1.09
---------------------------------------------------------------------------*/
-#if defined(WOLFSSL_RENESAS_TSIP_TLS) && (WOLFSSL_RENESAS_TSIP_VER >=109)
-
-/* Key type of the encrypted user_public_key 0: RSA-2048 2: ECDSA-P256*/
-const uint32_t encrypted_user_key_type = 0;
-
-const st_key_block_data_t g_key_block_data =
-{
- /* uint8_t encrypted_provisioning_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2]; */
- {
- 0xE9,0x67,0x79,0xF7,0x38,0x73,0xC8,0x59,0x94,0x62,0x7D,0xB9,0x83,0xDE,0x59,0x4A,
- 0x92,0x53,0x6B,0x14,0x1B,0x2A,0x99,0xDF,0x95,0xFD,0x35,0x84,0x93,0xCE, 0xDB,0x10
- },
- /* uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE]; */
- {
- 0xF6, 0xA9, 0x83, 0x5A, 0xA1, 0x65, 0x1D, 0x28, 0xC8, 0x1A, 0xA6, 0x9D, 0x34, 0xB2, 0x4D, 0x92
- },
- /* uint8_t encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16]; */
- {
- 0x34, 0x59, 0xFF, 0xFE, 0xAA, 0xE9, 0x26, 0x60, 0x8C, 0xB8, 0x76, 0xD2, 0x98, 0x65, 0x72, 0x3B,
- 0x19, 0x78, 0xB8, 0x9B, 0x0D, 0xD4, 0xFC, 0x2A, 0xF8, 0x54, 0x3B, 0x75, 0x0E, 0x40, 0x21, 0xF5,
- 0xF2, 0x6D, 0x3F, 0x60, 0xD2, 0xDF, 0xE7, 0xDB, 0x67, 0xF1, 0xC7, 0x66, 0x5F, 0x37, 0xAF, 0x9D,
- 0x08, 0xE7, 0xFD, 0xEF, 0x63, 0xA9, 0x78, 0x73, 0x1A, 0xE2, 0x47, 0x91, 0xB5, 0xA0, 0xCE, 0xA2,
- 0xC7, 0x4F, 0x8A, 0xE5, 0x03, 0x6F, 0xC5, 0xB8, 0xC4, 0x40, 0x12, 0x2D, 0x37, 0x2F, 0xF2, 0xC5,
- 0x73, 0x2D, 0xF8, 0xBF, 0x4A, 0xDC, 0xB7, 0x98, 0xDF, 0xE8, 0xED, 0xF8, 0x3B, 0x24, 0x8A, 0x01,
- 0xAE, 0x64, 0x89, 0x9C, 0x79, 0x66, 0x99, 0xE4, 0xF8, 0xC1, 0x3E, 0x04, 0x56, 0x1E, 0x6E, 0xBA,
- 0x2D, 0xAA, 0xB9, 0xE8, 0xA0, 0xC2, 0x27, 0xCF, 0x7C, 0x0F, 0xAD, 0x0A, 0x22, 0xEE, 0x61, 0xA8,
- 0x32, 0xBE, 0xEE, 0xE7, 0x3F, 0x5D, 0xE5, 0xBD, 0x75, 0x6B, 0x35, 0xC1, 0x77, 0xCC, 0x7D, 0x0E,
- 0x2E, 0x26, 0x67, 0xC4, 0x0E, 0x84, 0x34, 0xBD, 0x33, 0xB3, 0x0C, 0xD9, 0x07, 0xE5, 0x8E, 0x3E,
- 0x7E, 0xCC, 0x56, 0x5D, 0x23, 0x5A, 0x96, 0x83, 0x0C, 0xD9, 0x7F, 0xB0, 0xF7, 0x53, 0xD9, 0x5C,
- 0xE2, 0x1B, 0xDA, 0x63, 0x62, 0x19, 0x16, 0x9D, 0x75, 0x7B, 0xBB, 0x7E, 0xC9, 0xB5, 0xAD, 0x7D,
- 0xBB, 0x5A, 0xFA, 0xA5, 0x5B, 0x54, 0xA1, 0x93, 0x6D, 0x53, 0x3C, 0x85, 0x69, 0x00, 0x15, 0x40,
- 0x0E, 0x54, 0xD2, 0xBA, 0xB5, 0x80, 0x1C, 0x25, 0x85, 0x0E, 0x60, 0x87, 0x2A, 0x1A, 0xE7, 0x60,
- 0xCB, 0x6A, 0xF5, 0xAF, 0x84, 0x4B, 0xB7, 0x0D, 0x0C, 0xC0, 0xB5, 0x02, 0xB2, 0x38, 0x9D, 0x7C,
- 0xFA, 0x31, 0xF3, 0x50, 0xB3, 0x32, 0x69, 0x3A, 0x3C, 0x7A, 0xA5, 0x67, 0x19, 0x66, 0xD5, 0x62,
- 0xA3, 0xF2, 0xF7, 0x77, 0x73, 0xF6, 0xE7, 0x8D, 0x51, 0x0C, 0x19, 0xA3, 0x0F, 0x8C, 0x79, 0xE0,
- 0x7C, 0xCF, 0x8A, 0x03, 0x70, 0xC7, 0x25, 0x9D, 0xCE, 0x89, 0x77, 0x8E, 0x4C, 0xE6, 0x97, 0xC8
- },
- /* uint8_t encrypted_user_update_key[R_TSIP_AES256_KEY_BYTE_SIZE + 16]; */
- {
- 0x69, 0xDB, 0xC6, 0x86, 0xA5, 0x06, 0x22, 0x59, 0x11, 0x14, 0x73, 0x56, 0x3A, 0x9E, 0x44, 0xC3,
- 0x9C, 0xA8, 0x76, 0xC6, 0xF6, 0xE8, 0xD8, 0xE2, 0x17, 0x66, 0x90, 0x65, 0x08, 0xB5, 0x39, 0x7F,
- 0xD5, 0xC5, 0x6F, 0xD1, 0xCB, 0xFB, 0xB2, 0x76, 0x33, 0xA1, 0x22, 0x0F, 0xBE, 0x83, 0x91, 0x24
- },
-};
-
-
-/* ./ca-cert.der.sign, */
-const unsigned char ca_cert_sig[] =
-{
- 0x25,0x7B,0x10,0x4D,0xAF,0xB1,0xC1,0x50,0x7B,0x63,0x17,0xA0,0x38,0xA7,0x03,0x44,
- 0x7A,0x7E,0x8D,0x3D,0x38,0xEE,0x4B,0xE4,0xB2,0x48,0x76,0x07,0xF8,0x06,0xB1,0x9D,
- 0xBB,0xD1,0x46,0xB5,0xF9,0x86,0x08,0x85,0x29,0x6F,0xED,0x26,0x2F,0x91,0x7B,0x2B,
- 0x36,0xAC,0x7E,0x56,0x2D,0x2B,0x8E,0x81,0x1B,0x3C,0xFA,0x08,0x80,0x05,0x01,0xC1,
- 0xF3,0x71,0xFE,0xE9,0x59,0xA7,0xB6,0x82,0x62,0x04,0xA5,0xE4,0x6E,0xC9,0x32,0xCC,
- 0xB1,0x19,0xBC,0xDE,0x6A,0x9B,0xEB,0x60,0x92,0xC5,0x46,0xB7,0xFF,0xF4,0xC1,0x77,
- 0x5A,0xF4,0x53,0x41,0x6A,0x44,0x8B,0x46,0x3B,0xBE,0x74,0xBA,0x62,0xAF,0xFF,0xF2,
- 0x32,0xCD,0x7A,0x97,0xE1,0xA8,0xBF,0x62,0x76,0xDA,0xBF,0x93,0x8B,0x1E,0x87,0xCC,
- 0xEE,0x5D,0xCF,0xE9,0xBE,0xA6,0x25,0x6C,0xC4,0x92,0x2E,0x69,0x29,0x8F,0xCD,0x4C,
- 0x07,0x91,0x20,0xD1,0x16,0xF9,0x6A,0x23,0xC8,0x5E,0xD4,0x7C,0x38,0xA2,0x80,0xCB,
- 0x59,0x32,0xDD,0x28,0x46,0x6E,0x19,0xE9,0xAD,0x68,0x2B,0x0C,0xA0,0xB5,0x2A,0x8F,
- 0x73,0xC2,0xED,0xF2,0x60,0x4F,0xF3,0xCE,0xDC,0x1B,0xA7,0x88,0x66,0x42,0xF0,0xFD,
- 0x9D,0x77,0x2C,0x04,0xC2,0x54,0x4C,0x1D,0x58,0x9E,0x6D,0x4E,0x21,0x73,0x7E,0x1A,
- 0x2A,0xDC,0x54,0x24,0x66,0x63,0xBA,0xF1,0xF8,0x16,0xE7,0x29,0xB2,0x01,0x98,0xE5,
- 0x49,0x6E,0x97,0x86,0x82,0x6C,0xF3,0x3B,0x54,0x57,0x2C,0xD8,0x8F,0xC5,0x70,0x3E,
- 0x22,0xD7,0x6D,0x9F,0x27,0xEC,0xD6,0x12,0xE5,0x4F,0x1E,0x05,0x36,0x07,0xBA,0xB2
-};
-const int sizeof_ca_cert_sig = sizeof(ca_cert_sig);
-
-/* ./client-cert.der.sign, */
-const unsigned char client_cert_der_sign[] =
-{
- 0x5D, 0x1F, 0x89, 0x41, 0xEC, 0x47, 0xC8, 0x90, 0x61, 0x79,
- 0x8A, 0x16, 0x1F, 0x31, 0x96, 0x67, 0xD9, 0x3C, 0xEC, 0x6B,
- 0x58, 0xC6, 0x5A, 0xED, 0x99, 0xB3, 0xEF, 0x27, 0x6F, 0x04,
- 0x8C, 0xD9, 0x68, 0xB1, 0xD6, 0x23, 0x15, 0x84, 0x00, 0xE1,
- 0x27, 0xD1, 0x1F, 0x68, 0xB7, 0x3F, 0x13, 0x53, 0x8A, 0x95,
- 0x5A, 0x20, 0x7C, 0xB2, 0x76, 0x5B, 0xDC, 0xE0, 0xA6, 0x21,
- 0x7C, 0x49, 0xCF, 0x93, 0xBA, 0xD5, 0x12, 0x9F, 0xEE, 0x90,
- 0x5B, 0x3F, 0xA3, 0x9D, 0x13, 0x72, 0xAC, 0x72, 0x16, 0xFE,
- 0x1D, 0xBE, 0xEB, 0x8E, 0xC7, 0xDC, 0xC4, 0xF8, 0x1A, 0xD8,
- 0xA0, 0xA4, 0xF6, 0x04, 0x30, 0xF6, 0x7E, 0xB6, 0xC8, 0xE1,
- 0xAB, 0x88, 0x37, 0x08, 0x63, 0x72, 0xAA, 0x46, 0xCC, 0xCA,
- 0xF0, 0x9E, 0x02, 0x1E, 0x65, 0x67, 0xFF, 0x2C, 0x9D, 0x81,
- 0x6C, 0x1E, 0xF1, 0x54, 0x05, 0x68, 0x68, 0x18, 0x72, 0x26,
- 0x55, 0xB6, 0x2C, 0x95, 0xC0, 0xC9, 0xB2, 0xA7, 0x0B, 0x60,
- 0xD7, 0xEB, 0x1D, 0x08, 0x1A, 0xA2, 0x54, 0x15, 0x89, 0xCB,
- 0x83, 0x21, 0x5D, 0x15, 0x9B, 0x38, 0xAC, 0x89, 0x63, 0xD5,
- 0x4B, 0xF4, 0x8B, 0x47, 0x93, 0x78, 0x43, 0xCB, 0x9B, 0x71,
- 0xBF, 0x94, 0x76, 0xB5, 0xCE, 0x35, 0xA9, 0x1A, 0xD5, 0xA5,
- 0xD8, 0x19, 0xA6, 0x04, 0x39, 0xB1, 0x09, 0x8C, 0x65, 0x02,
- 0x58, 0x3A, 0x95, 0xEF, 0xA2, 0xC3, 0x85, 0x18, 0x61, 0x23,
- 0x2D, 0xC5, 0xCD, 0x62, 0xC1, 0x19, 0x31, 0xE5, 0x36, 0x95,
- 0x22, 0xDB, 0x3E, 0x1A, 0x3C, 0xE8, 0xC6, 0x2E, 0xDF, 0xD9,
- 0x2F, 0x84, 0xC1, 0xF0, 0x38, 0x2B, 0xE5, 0x73, 0x35, 0x4F,
- 0x05, 0xE2, 0xA5, 0x60, 0x79, 0xB0, 0x23, 0xDC, 0x56, 0x4C,
- 0xE7, 0xD9, 0x1F, 0xCF, 0x6A, 0xFC, 0x55, 0xEB, 0xAA, 0x48,
- 0x3E, 0x95, 0x2A, 0x10, 0x01, 0x05
-};
-const int sizeof_client_cert_der_sign = sizeof(client_cert_der_sign);
-
-uint32_t s_inst1[R_TSIP_SINST_WORD_SIZE] = { 0 };
-uint32_t s_inst2[R_TSIP_SINST2_WORD_SIZE]= { 0 };
-
-
-/*-------------------------------------------------------------------------
- TSIP v1.06
---------------------------------------------------------------------------*/
-#elif defined(WOLFSSL_RENESAS_TSIP_TLS) && (WOLFSSL_RENESAS_TSIP_VER >= 106)
-
-const st_key_block_data_t g_key_block_data =
-{
-
- /* uint8_t encrypted_session_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2]; */
- {
- 0xCE, 0xE0, 0xE9, 0x86, 0x62, 0x59, 0xF9, 0x8F, 0x3C, 0xFB, 0x81, 0x39, 0xC2, 0x82, 0xC7, 0xC9,
- 0xCD, 0xEA, 0x6B, 0x16, 0x66, 0x77, 0x38, 0xCA, 0xF5, 0x6E, 0x6D, 0x5B, 0xF0, 0x30, 0xA2, 0x94
- },
- /* uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE]; */
- {
- 0xF6, 0xA9, 0x83, 0x5A, 0xA1, 0x65, 0x1D, 0x28, 0xC8, 0x1A, 0xA6, 0x9D, 0x34, 0xB2, 0x4D, 0x92
- },
- /* uint8_t encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16]; */
- {
- 0xFC, 0xB4, 0x0F, 0x72, 0xFE, 0xB4, 0xB1, 0xF7, 0xDB, 0xA7, 0x49, 0x9E, 0x0F, 0xF6, 0x4B, 0xA7,
- 0x08, 0x0D, 0x3A, 0xFD, 0xAB, 0x7D, 0x82, 0xD7, 0x26, 0x36, 0xFC, 0xED, 0x3E, 0x53, 0xBC, 0xA1,
- 0x3D, 0x75, 0x03, 0x5B, 0x53, 0x6D, 0x63, 0xBB, 0xB0, 0x9A, 0xD7, 0xEB, 0x7C, 0x99, 0x3B, 0xE4,
- 0xB7, 0xA3, 0x83, 0xE7, 0x27, 0xBE, 0x88, 0x06, 0x2B, 0x81, 0x66, 0xF8, 0x94, 0x3E, 0x86, 0x02,
- 0x5F, 0x97, 0x05, 0xFD, 0x93, 0x78, 0x06, 0x3A, 0xC6, 0xD0, 0x3A, 0x82, 0x5D, 0x10, 0xC4, 0xE3,
- 0x30, 0x68, 0x48, 0x25, 0x31, 0xCD, 0x50, 0xBC, 0x91, 0xAF, 0x00, 0x4B, 0xAA, 0x6E, 0x3F, 0x6E,
- 0x7F, 0x6A, 0x43, 0xAB, 0xB7, 0x06, 0x8D, 0x05, 0x1D, 0x26, 0x17, 0xE9, 0xD9, 0x72, 0x35, 0xED,
- 0x79, 0x13, 0xEB, 0x57, 0xED, 0x33, 0x3B, 0x9B, 0x75, 0x15, 0xAB, 0x13, 0xEE, 0xDB, 0xCC, 0x9F,
- 0x78, 0xF0, 0x51, 0x67, 0x53, 0xC2, 0xC3, 0xEF, 0xB1, 0x16, 0x39, 0xCB, 0x24, 0x5D, 0x11, 0x43,
- 0x3F, 0xDC, 0x90, 0xD2, 0xA9, 0x4B, 0x6C, 0x9C, 0xBC, 0x77, 0x7B, 0xA4, 0x02, 0x8A, 0xB3, 0x7A,
- 0x99, 0x75, 0x76, 0x86, 0xE2, 0xEA, 0x83, 0x8D, 0x07, 0xB0, 0xF1, 0xF0, 0x6E, 0x21, 0x19, 0x2E,
- 0x16, 0x6B, 0xA3, 0x81, 0xB2, 0xE6, 0x29, 0x16, 0xAA, 0xBC, 0x43, 0x73, 0x1C, 0xC4, 0xDB, 0x92,
- 0x2A, 0xA9, 0x20, 0x37, 0x64, 0x4C, 0xE1, 0x95, 0x91, 0x8C, 0x1E, 0xCD, 0xA3, 0xFE, 0x8B, 0x23,
- 0x89, 0x2B, 0x6D, 0xA8, 0x6D, 0xD1, 0x7C, 0x20, 0xB9, 0x32, 0xA3, 0x0C, 0x8A, 0x5E, 0xE8, 0x7B,
- 0xC8, 0x32, 0xA2, 0x81, 0x30, 0x7D, 0x21, 0x56, 0x97, 0x9C, 0x0C, 0x68, 0xAD, 0xFD, 0x6D, 0xFD,
- 0xE0, 0x04, 0xE5, 0xB3, 0xC7, 0xED, 0x84, 0xCB, 0xD4, 0xB0, 0x84, 0x09, 0x99, 0xC3, 0xFB, 0x8B,
- 0x91, 0x55, 0x2C, 0xCB, 0x48, 0x06, 0xD1, 0x6C, 0xE0, 0x42, 0x13, 0xDF, 0x2B, 0x73, 0x25, 0xB3,
- 0x15, 0xC5, 0x8A, 0xDF, 0x01, 0x2B, 0x96, 0x01, 0x95, 0x84, 0xE4, 0x8E, 0xBA, 0x32, 0xCB, 0x77
- },
-};
-
-const uint32_t s_flash[] =
-{
- 0xa6f0651c, 0xa17c5a15, 0xa23e1bfb, 0xc04e1bb9,
- 0x5594fc81, 0x67fad158, 0xfda808ae, 0x7e01cb88,
- 0xbf12d558, 0x9ec08adc, 0x21c25af2, 0x60d43062,
- 0x82e6b470, 0x178879a6, 0x9ddb263f, 0xddb57b53,
- 0x220ea793, 0x24de7b88, 0x9fa846e4, 0xdf9059f9,
- 0x7ce55a19, 0x686689e5, 0x9aaef400, 0x88fd178a,
- 0xf4e33b46, 0xc9394a88, 0x712823b9, 0xca75513f,
- 0x63859e61, 0x45477873, 0x357b5776, 0x83cc1def,
- 0x74cb65ab, 0xa919863c, 0x9f75e62e, 0x5fd62143,
- 0xdbae440a, 0x34053525, 0x56e221e1, 0x8ffbaeb5,
- 0xa75c55f0, 0x34727e44, 0x2c791463, 0x7670923f,
- 0xc0287d97, 0x0a09b5c9, 0xfaecf18e, 0x09ceab85,
- 0x687ad46f, 0x7e4d8adb, 0x6def5893, 0x6f236da3,
- 0xab6e15e1, 0x653f41d0, 0x05652571, 0x9ec8ec15,
- 0x2d4acb06, 0x7d5c2c26, 0xf49455cb, 0x9872dc50,
- 0xb9fe50a2, 0x34bf45ae, 0x4cf2b6bf, 0xe1c75c7b,
- 0x6e23718f, 0x227b0a55, 0x3a5e8b00, 0x83222dba,
- 0x4041008f, 0x40fc8d01, 0xcd6c5c64, 0x0b8183b5,
- 0x678bf9e7, 0x57844b52, 0xb4c81735, 0x559e77f3,
- 0xb2b6800e, 0x715de4e2, 0x7a2720bb, 0x7b434710,
- 0xee264103, 0x9db8c751, 0x78291c62, 0x77b883f4,
- 0xa27d1216, 0x4e733ba6, 0x8a5f40dc, 0x32d2dd82,
- 0x8a5fdc67, 0xd8fb0926, 0x9d5aec51, 0x08bfce4d,
- 0x2a54839b, 0xe6601069, 0x564fbdbf, 0x9bb43dc7,
- 0x9bb59d3a, 0xc3aaa60c, 0x2f2e75d7, 0x6a953972,
- 0x6de4fd23, 0x546c212b, 0xe8aad33f, 0xca416c37,
- 0xa74b36f9, 0x520330f0, 0x96145828, 0x09c21110,
- 0x0b29365a, 0xfe9a9e60, 0x82b3a215, 0x752daa46,
- 0x45bd59d6, 0x145ba47f, 0x75e40f92, 0x2f904860,
- 0x609e3b0a, 0x8e6e6aa8, 0xe88ea1c3, 0x22a1db60,
- 0x9947e0c7, 0x28416ca7, 0x3cb6abe6, 0x0e367da7,
- 0x17b16976, 0x5323ccde, 0xc7337459, 0xf07293ad,
-};
-
-/* ./ca-cert.der.sign, */
-const unsigned char ca_cert_sig[] =
-{
- 0x86, 0xD6, 0xC5, 0xB0, 0xE1, 0x37, 0x4C, 0x21, 0xF7, 0x8D,
- 0x7C, 0x36, 0x80, 0xDB, 0x51, 0x58, 0x9D, 0x32, 0x5A, 0x1C,
- 0xF3, 0xAC, 0x24, 0x17, 0xD4, 0x61, 0x9F, 0x09, 0x73, 0xA0,
- 0x1E, 0x30, 0xE7, 0x6F, 0x00, 0xF8, 0xDB, 0xAA, 0x34, 0x4E,
- 0x96, 0xA3, 0x3D, 0xBC, 0xE8, 0xFF, 0xBE, 0x4E, 0x62, 0x70,
- 0x7B, 0xC7, 0x65, 0x2E, 0x9D, 0x1C, 0xE1, 0x5A, 0x7C, 0x2B,
- 0xCD, 0x57, 0xEA, 0xF4, 0x16, 0xBC, 0x47, 0x26, 0xF5, 0x41,
- 0x1F, 0x4E, 0xFD, 0xA5, 0x65, 0xAE, 0x31, 0xEB, 0xDF, 0x10,
- 0xAF, 0xCB, 0xCB, 0x27, 0x84, 0xB6, 0x59, 0x3C, 0x6B, 0x9B,
- 0x68, 0xAF, 0xEF, 0x35, 0xAF, 0x59, 0x9B, 0x07, 0x69, 0x75,
- 0x1A, 0x99, 0x92, 0x0F, 0x0D, 0x02, 0x5A, 0x2C, 0x14, 0xD5,
- 0x38, 0x8B, 0xD2, 0xB5, 0x35, 0xC7, 0x2D, 0xEB, 0x97, 0x4C,
- 0xC8, 0x53, 0xCF, 0x7C, 0x0C, 0xB3, 0x00, 0x90, 0x99, 0x0B,
- 0xB1, 0xBE, 0x8B, 0xEA, 0x96, 0xB4, 0x75, 0x35, 0x9D, 0xA1,
- 0x2E, 0xF3, 0xF3, 0xEA, 0xF5, 0x7B, 0x83, 0xEF, 0x03, 0x06,
- 0x3C, 0x41, 0x1C, 0x32, 0x84, 0x4A, 0xB8, 0xB0, 0xAE, 0x67,
- 0xE9, 0xE4, 0xEE, 0x58, 0x43, 0x0C, 0x0D, 0xAE, 0x6C, 0xB8,
- 0x94, 0x7F, 0x80, 0x33, 0xD3, 0xDC, 0x04, 0x02, 0xDC, 0x6F,
- 0x17, 0xDC, 0xAE, 0x79, 0xED, 0xE3, 0x99, 0xAA, 0xE8, 0x4E,
- 0x6A, 0x43, 0x73, 0xE6, 0xF3, 0xF8, 0x5A, 0x51, 0x55, 0x5E,
- 0x55, 0x2D, 0xD6, 0xF7, 0xD5, 0xAB, 0xBE, 0xBD, 0xC8, 0x7D,
- 0xB0, 0xA7, 0x9A, 0x46, 0xC0, 0xDC, 0x16, 0x83, 0xE9, 0x2C,
- 0x56, 0x6C, 0x45, 0x52, 0x3E, 0x05, 0x4D, 0x5F, 0x11, 0xD0,
- 0x93, 0x0F, 0x82, 0x6D, 0x6E, 0xC0, 0x01, 0x38, 0x3B, 0x2F,
- 0xD9, 0x80, 0x51, 0x6D, 0xD1, 0x1B, 0x22, 0x72, 0xBB, 0x15,
- 0x5D, 0xBC, 0xB8, 0x07, 0xBB, 0x96
-};
-const int sizeof_ca_cert_sig = sizeof(ca_cert_sig);
-
-/* ./client-cert.der.sign, */
-const unsigned char client_cert_der_sign[] =
-{
- 0x5D, 0x1F, 0x89, 0x41, 0xEC, 0x47, 0xC8, 0x90, 0x61, 0x79,
- 0x8A, 0x16, 0x1F, 0x31, 0x96, 0x67, 0xD9, 0x3C, 0xEC, 0x6B,
- 0x58, 0xC6, 0x5A, 0xED, 0x99, 0xB3, 0xEF, 0x27, 0x6F, 0x04,
- 0x8C, 0xD9, 0x68, 0xB1, 0xD6, 0x23, 0x15, 0x84, 0x00, 0xE1,
- 0x27, 0xD1, 0x1F, 0x68, 0xB7, 0x3F, 0x13, 0x53, 0x8A, 0x95,
- 0x5A, 0x20, 0x7C, 0xB2, 0x76, 0x5B, 0xDC, 0xE0, 0xA6, 0x21,
- 0x7C, 0x49, 0xCF, 0x93, 0xBA, 0xD5, 0x12, 0x9F, 0xEE, 0x90,
- 0x5B, 0x3F, 0xA3, 0x9D, 0x13, 0x72, 0xAC, 0x72, 0x16, 0xFE,
- 0x1D, 0xBE, 0xEB, 0x8E, 0xC7, 0xDC, 0xC4, 0xF8, 0x1A, 0xD8,
- 0xA0, 0xA4, 0xF6, 0x04, 0x30, 0xF6, 0x7E, 0xB6, 0xC8, 0xE1,
- 0xAB, 0x88, 0x37, 0x08, 0x63, 0x72, 0xAA, 0x46, 0xCC, 0xCA,
- 0xF0, 0x9E, 0x02, 0x1E, 0x65, 0x67, 0xFF, 0x2C, 0x9D, 0x81,
- 0x6C, 0x1E, 0xF1, 0x54, 0x05, 0x68, 0x68, 0x18, 0x72, 0x26,
- 0x55, 0xB6, 0x2C, 0x95, 0xC0, 0xC9, 0xB2, 0xA7, 0x0B, 0x60,
- 0xD7, 0xEB, 0x1D, 0x08, 0x1A, 0xA2, 0x54, 0x15, 0x89, 0xCB,
- 0x83, 0x21, 0x5D, 0x15, 0x9B, 0x38, 0xAC, 0x89, 0x63, 0xD5,
- 0x4B, 0xF4, 0x8B, 0x47, 0x93, 0x78, 0x43, 0xCB, 0x9B, 0x71,
- 0xBF, 0x94, 0x76, 0xB5, 0xCE, 0x35, 0xA9, 0x1A, 0xD5, 0xA5,
- 0xD8, 0x19, 0xA6, 0x04, 0x39, 0xB1, 0x09, 0x8C, 0x65, 0x02,
- 0x58, 0x3A, 0x95, 0xEF, 0xA2, 0xC3, 0x85, 0x18, 0x61, 0x23,
- 0x2D, 0xC5, 0xCD, 0x62, 0xC1, 0x19, 0x31, 0xE5, 0x36, 0x95,
- 0x22, 0xDB, 0x3E, 0x1A, 0x3C, 0xE8, 0xC6, 0x2E, 0xDF, 0xD9,
- 0x2F, 0x84, 0xC1, 0xF0, 0x38, 0x2B, 0xE5, 0x73, 0x35, 0x4F,
- 0x05, 0xE2, 0xA5, 0x60, 0x79, 0xB0, 0x23, 0xDC, 0x56, 0x4C,
- 0xE7, 0xD9, 0x1F, 0xCF, 0x6A, 0xFC, 0x55, 0xEB, 0xAA, 0x48,
- 0x3E, 0x95, 0x2A, 0x10, 0x01, 0x05
-};
-const int sizeof_client_cert_der_sign = sizeof(client_cert_der_sign);
-
-uint32_t s_inst1[R_TSIP_SINST_WORD_SIZE] = { 0 };
-uint32_t s_inst2[R_TSIP_SINST2_WORD_SIZE]= { 0 };
-
-
-
-#endif
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/GR-ROSE/test/test_HardwareDebug.launch b/IDE/Renesas/e2studio/GR-ROSE/test/test_HardwareDebug.launch
deleted file mode 100644
index 1aecc2d2e..000000000
--- a/IDE/Renesas/e2studio/GR-ROSE/test/test_HardwareDebug.launch
+++ /dev/null
@@ -1,136 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/IDE/Renesas/e2studio/RX65N/GR-ROSE/README_EN.md b/IDE/Renesas/e2studio/RX65N/GR-ROSE/README_EN.md
new file mode 100644
index 000000000..f3ba54c3f
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/README_EN.md
@@ -0,0 +1,243 @@
+wolfSSL sample application project for GR-ROSE evaluation board
+======
+
+
+
+## 1. Overview
+-----
+
+We provide a sample program for evaluating wolfSSL targeting the GR-ROSE evaluation board, which has RX65N MCU on it. The sample program runs in a bare metal environment that does not use a real-time OS and uses e2 studio as an IDE. This document describes the procedure from build to execution of the sample program.
+
+The sample provided is a single application that can evaluate the following three functions:
+
+- CryptoTest: A program that automatically tests various cryptographic operation functions
+- Benchmark: A program that measures the execution speed of various cryptographic operations
+- TlsClient: A program that performs TLS communication with the opposite TLS server application
+
+
+Since the H/W settings and S/W settings for operating the evaluation board have already been prepared, the minimum settings are required to operate the sample application. In addition, the RootCA certificate and server-side certificate required for TLS communication have already been set for sample use only.
+
+The following sections will walk you through the steps leading up to running the sample application.
+
+
+## 2. Target H/W, components and libraries
+-----
+
+This sample program uses the following hardware and software libraries. If a new version of the software component is available at the time of use, please update it as appropriate.
+
+|item|name & version|
+|:--|:--|
+|Board|GR-ROSE|
+|Device|R5F565NEHxFP|
+|IDE| Renesas e2Studio Version:2021-10 |
+|Emulator| E1, E2 Emulator Lite |
+|Toolchain|CCRX v3.03.00|
+|TSIP| TSIP v1.14|
+
+
+The project of this sample program has a configuration file that uses the following FIT components.
+However, the FIT components themselves are not included in the distribution of this sample application. You need to download it by operating in the IDE. Some FIT components (TSIPs) cannot be downloaded directly from within the IDE and may need to be downloaded separately from the Renesas download site.
+
+
+|FIT component|version|name|
+|:--|:--|:--|
+|Board Support Packages|6.21|r_bsp|
+|CMT driver|4.90|r_cmt_rx|
+|Ethernet Driver|1.21|r_ether_rx|1.21|r_ether_rx|
+|Generic system timer for RX MCUs|1.01|r_sys_time_rx|
+|TCP/IP protocol stack[M3S-T4-Tiny] - RX Ethernet Driver Interface|1.09|r_t4_driver_rx|
+|TCP/IP protocol stack[M3S-T4-Tiny] for Renesas MCUs|2.10|r_t4_rx|
+|TSIP(Trusted Secure IP) driver|1.14|r_tsip_rx|
+
+
+Note) As of December 2021, TIPS v1.14 does not seem to be able to be added as a FIT component by adding a component in the Smart Configurator Perspective. Add it manually along the method described later.
+
+
+## 3. Importing sample application project into e2Studio
+----
+
+There is no need to create a new sample program. Since the project file is already prepared, please import the project from the IDE by following the steps below.
+
++ e2studio "File" menu> "Open project from file system ..."> "Directory (R) ..." Click the import source button and select the folder from which the project will be imported. Select the folder (Renesas/e2studio/\/\/)) where this README file exists.
++ Four projects that can be imported are listed, but check only the three projects "smc", "test" and "wolfssl" and click the "Finish" button.
+
+You should see the **smc**, **test**, and **wolfssl** 3 projects you imported into the project explorer.
+
+
+## 4. FIT module download and smart configurator file generation
+----
+
+You will need to get the required FIT modules yourself. Follow the steps below to get them.
+
+1. Open the smc project in Project Explorer and double-click the **smc.scfg** file to open the Smart Configurator Perspective.
+
+2. Select the "Components" tab on the software component settings pane. Then click the "Add Component" button at the top right of the pane. The software component selection dialog will pop up. Click "Download the latest version of FIT driver and middleware" at the bottom of the dialog to get the modules. You can check the dowmload destination folder by pressing "Basic settings...".
+
+3. The latest version of the TSIP component may not be automatically obtained due to the delay in Renesas' support by the method in step 2 above. In that case, you can download it manually from the Renesas website. Unzip the downloaded component and store the files contained in the FIT Modules folder in the download destination folder of step 2.
+
+4. Select the required FIT components shown from the list and press the "Finish" button. Repeat this operation until you have the required FIT components.
+
+5. Select the Components tab on the Software Component Settings pane and select the r_t4_rx component. In the settings pane on the right, specify the IP address of this board as the value of the "# IP address for ch0, when DHCP disable." Property (e.g. 192.168.1.9).
+
+6. Press the "Generate Code" button at the top right of the software component settings pane to have the smart configurator generate the source files. A src/smc_gen folder will be created under the smc project to store source files, libraries, etc.
+
+
+
+## 5. Adding smc_gen files to the test project
+----
+
+The test project is a sample application project. When you open the test project in the project explorer, there is a src folder, which contains the source files of the sample application. Add the source files by copying and pasting the smc_gen folder generated in the step5, directly under this src folder.
+
+Make sure you have a folder hierarchy like this:
+
+```
+/test/src/smc_gen
+```
+
+
+## 6. Select the behavior of the test application
+----
+
+The test project is a single sample application, but you can specify to perform one of the following by switching the settings:
+
+- CryptoTest: A program that automatically tests various encryption operation functions
+- Benchmark: A program that measures the execution speed of various cryptographic operations
+- TlsClient: A program that performs TLS communication with the opposite TLS server application
+
+Open the /test/src/wolfssl_demo.h file and enable one of the following definitions:
+
+- #define CRYPT_TEST
+- #define BENCHMARK
+- #define TLS_CLIENT
+
+Then build the test application.
+
+
+
+## 7. Build and run the test application
+-----
+
+Now that the test application is ready to build.
+
+1. Build the wolfssl project on the project explorer, then the test project.
+
+2. After a successful build, connect the target board to the emulator and supply external power.
+
+3. Select "Run" menu> "Debug" to open the debug perspective.
+
+4. The test application outputs the operating status to the standard output. Keep the "Renesas Debug Virtual Console" open for viewing this standard output.
+
+5. Press the run button to run the test application.
+
+6. CryptoTest, Benchmark or TLS_Client After displaying the execution result according to the selected behavior, it enters an infinite loop, so if you think that the output has stopped, stop debugging.
+
+
+## 8. Running test application as TLS_Client
+-----
+
+### 8.1 Generate a server application
+
+To operate as TLS_Client, an opposite application for TLS communication is required. A wolfSSL package provides a server sample application that you can use for this purpose. This program is generated by building wolfssl. You can build wolfSSL on Linux (including MacOS and WSL) with gcc installed or build using Visual Studio. The following introduces the build on WSL.
+
+
+```
+$ cd
+$ ./autogen.sh
+$ ./configure CFLAGS="-DWOLFSSL_STATIC_RSA -DHAVEAES_CBC"
+$ make
+```
+
+
+
+With the above build, /examples/server/server
+Is generated. This executable acts as a TLS server application. If you execute it with the following options, it will be in the listening state for the connection from TLS_Client.
+
+
+```
+$ examples/server/server -b -d -i
+```
+
+
+For the test application, specify the IP address assigned to the server application.
+
+Open wolf_client.c to specify ip address of the server in "#define SIMPLE_TLSSEVER_IP" like as:
+
+
+```
+-- /test/src/wolf_client.c --
+
+...
+#define SIMPLE_TLSSEVER_IP 192.168.53.9
+...
+```
+
+Save the file and rebuild the test application. When you run the test application, it makes a TLS connection with the opposite application, then exchanges a simple string and displays the following on the standard output.
+
+
+```
+cipher : ECDHE-RSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : AES256-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+```
+
+
+### 8.2 Change server certificate (change authentication method)
+
+The above is an execution example when the server certificate presented by the server application contains the RSA public key (RSA authentication). TSIP can also handle cases where the server certificate contains an ECC public key (ECDSA authentication).
+
+
+If you want to use a cipher suite that includes ECDSA, you will need to change the settings of the test application and rebuild. Open common/ user_settings.h, enable the USE_ECC_CERT definition and rebuild.
+
+
+```
+-- /common/user_settings.h --
+
+#define USE_ECC_CERT
+```
+
+This definition causes the test application to use a RootCA certificate that can validate the server certificate containing the ECC public key presented by the server.
+
+
+In addition, the opposite server application also needs to specify the server certificate and private key file containing the ECC public key as an option, and then execute it as shown below.
+
+
+```
+$ ./examples/server/server -b -d -i -c ./certs/server-ecc.pem -k ./certs/ecc-key.pem
+```
+
+The following is displayed as the execution result.
+
+
+```
+cipher : ECDHE-ECDSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-ECDSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+```
+
+
+## 9. What you need to do to use the RootCA certificate prepared by the user
+----
+
+In this sample program, the RootCA certificate required to operate as TLS_Client and the server certificate used by the sample TLS server application are certificates that can be used only for evaluation.
+If you want to use it for purposes beyond functional evaluation, you need to prepare the RootCA certificate yourself. with this,
+ 1. Provisioning key
+ 2. RSA key pair required for RootCA certificate validation
+ 3. The signature generated by the RootCA certificate with the private key in 2 above.
+
+will become necessary. Please refer to the manual provided by Renesas for how to generate them.
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/RX65N/GR-ROSE/README_JP.md b/IDE/Renesas/e2studio/RX65N/GR-ROSE/README_JP.md
new file mode 100644
index 000000000..ef4b0b980
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/README_JP.md
@@ -0,0 +1,249 @@
+評価ボードGR-ROSE 用 wolfSSLサンプルプロジェクト
+======
+
+
+
+## 1. 概要
+-----
+
+Renesas社製MCU RX65Nを搭載した評価ボードGR-ROSEをターゲットとしてwolfSSLを評価するためのサンプルプログラムを提供します。サンプルプログラムはリアルタイムOSを使わないベアメタル環境で動作し、IDEとしてe2 studioを使用するものです。本ドキュメントではサンプルプログラムのビルドから実行までの手順を説明します。
+
+提供するサンプルプログラムは次の3機能を評価できる単一のアプリケーションです:
+
+- CryptoTest: 各種暗号化オペレーション機能を自動テストするプログラム
+- Benchmark: 各種暗号化オペレーションの実行速度を測定するプログラム
+- TlsClient: 対向するTLSサーバーアプリケーションとTLS通信を行うプログラム
+
+評価ボードを動作させる為のH/W設定、S/W設定は既に用意していますから、サンプルプロジェクトの動作までは最少の設定で済むようになっています。また、TLS通信において必要となる、RootCA証明書、サーバー側証明書もサンプル使用に限定したものが既に設定済みです。
+
+以降のセクションはサンプルアプリケーションの実行までのステップを順に説明していきます。
+
+
+
+## 2. ターゲットとしているH/W、コンポーネント、ライブラリ
+-----
+
+このサンプルプログラムでは以下のハードウエアやソソフトウエアライブラリを使用しています。皆さんがご利用時にバージョンの新しいソフトウエアコンポーネントが利用可能であれば適宜更新の上ご利用ください。
+
+
+|要素|名称/バージョン|
+|:--|:--|
+|評価ボード|GR-ROSE|
+|Device|R5F565NEHxFP|
+|IDE| Renesas e2Studio Version:2021-10 |
+|エミュレーター| E1, E2エミュレーターLite |
+|Toolchain|CCRX v3.03.00|
+|TSIP| TSIP v1.14|
+
+
+本サンプルプログラムのプロジェクトには以下のFITコンポーネントを使用する設定ファイルが用意されています。
+しかし、FITコンポーネント群そのものは本サンプルアプリケーションの配布物としては含まれていません。皆さん自身でIDE内の操作によってダウンロードしていただく必要があります。一部のFITコンポーネント(TSIP)はIDE内から直接ダウンロードできず、Renesas社のダウンロードサイトから別途ダウンロードが必要なものがあります。
+
+
+
+
+|FITコンポーネント|バージョン|略称|
+|:--|:--|:--|
+|Board Support Packages|6.21|r_bsp|
+|CMT driver|4.90|r_cmt_rx|
+|Ethernet Driver|1.21|r_ether_rx|1.21|r_ether_rx|
+|Generic system timer for RX MCUs|1.01|r_sys_time_rx|
+|TCP/IP protocol stack[M3S-T4-Tiny] - RX Ethernet Driver Interface|1.09|r_t4_driver_rx|
+|TCP/IP protocol stack[M3S-T4-Tiny] for Renesas MCUs|2.10|r_t4_rx|
+|TSIP(Trusted Secure IP) driver|1.14|r_tsip_rx|
+
+(注意)2021年12月現在、TIPSv1.14はFITコンポーネントとしてスマートコンフィギュレータパースペクティブのコンポーネントの追加操作では追加できないようです。後ほど説明する手動での追加方法を使って追加してください。
+
+
+
+
+## 3. サンプルプログラムプロジェクトのe2Studioへのインポート
+----
+
+サンプルプログラムは新規作成する必要はありません。すでにプロジェクトファイルが用意されていますからIDEから以下の手順でプロジェクトをインポートしてください。
+
+
++ 1.e2studioの"ファイル"メニュー > "ファイル・システムからプロジェクトを開く..." > "ディレクトリ(R)..."インポート元ボタンを押して、プロジェクトのインポート元となるフォルダーを選択します。本READMEファイルが存在するフォルダ(Renesas/e2studio/\/\/))を選択してください。
+
++ インポートできるプロジェクトが4つリストアップされますが、"smc", "test" と"wolfssl"の3プロジェクトにのみチェックを入れて”終了”ボタンを押してください。
+
+プロジェクト・エクスプローラーにインポートしたsmc,test,wolfsslの3プロジェクトが表示されるはずです。
+
+
+## 4. FITモジュールの取得とスマートコンフィギュレータによるファイル生成
+----
+
+FITモジュールは皆さん自身で取得していただく必要があります。以下の手順で取得してください。
+
+
+
+1. プロジェクト・エクスプローラー上でsmcプロジェクトを開き**smc.scfg**ファイルをダブルクリックして、スマートコンフィギュレータパースペクティブを開きます。
+
+2. ソフトウエアコンポーネント設定画面の"コンポーネント"タブを選択 > 画面右上の"コンポーネントの追加" ボタンを押して下さい。ソフトウエアコンポーネントの選択ダイアログが表示されます。ここで、画面下部の"最新版のFITドライバとミドルウエアをダウンロードする"を押して、モジュール群を取得しておいてください。ダウンロード先のフォルダは"基本設定..."を押して確認することができます。
+
+3. TSIPコンポーネントは上記ステップ2の方法ではRenesas社の対応が遅れていて最新版が自動的には取得できないことがあります。その場合にはRenesas社のサイトから手動でダウンロードできます。ダウンロードしたコンポーネントのを解凍し、FITModulesフォルダに含まれているファイル群をステップ2のダウンロード先フォルダに格納してください。
+
+4. 先に示したFITコンポーネントを一覧から選択して"終了"ボタンを押します。この操作を必要なFITコンポーネントを得るまで繰り返し行います。
+
+5. ソフトウエアコンポーネント設定画面のコンポーネントタブを選択し、r_t4_rxコンポーネントを選択します。右の設定ペインに"# IP address for ch0, when DHCP disable."プロパティの値として、このボードのIPアドレスを皆さんの環境に合わせてて指定します(例:
+192.168.1.9)。
+
+6. ソフトウエアコンポーネント設定画面の右上の”コードの生成"ボタンを押して、スマートコンフィギュレータにソースファイルを生成させます。smcプロジェクトの下にsrc/smc_genフォルダが生成され、ソースファイル、ライブラリ等が格納されされます。
+
+
+## 5. testプロジェクトへのsmc_genファイル群の追加
+----
+
+testプロジェクトはサンプルアプリケーションのプロジェクトです。プロジェクト・エクスプローラー上でtestプロジェクトを開くとsrcフォルダが存在し、そこにサンプルアプリケーションのソースファイルが格納されています。このsrcフォルダ直下に4-5で生成したsmc_genフォルダごとコピー&ペーストしてソースファイルを追加します。
+
+test/src/smc_gen
+
+のようなフォルダ階層になることを確認してください。
+
+
+## 6. testアプリケーションの動作を選択する
+----
+testプロジェクトが唯一のサンプルアプリケーションですが、その動作を設定で切り替えることによって、
+
+- CryptoTest: 各種暗号化オペレーション機能を自動テストするプログラム
+- Benchmark: 各種暗号化オペレーションの実行速度を測定するプログラム
+- TlsClient: 対向するTLSサーバーアプリケーションとTLS通信を行うプログラム
+
+のいずれかの動作を行うよう指定できます。
+
+設定はtest/src/wolfssl_demo.h ファイル内の、
+
+- #define CRYPT_TEST
+- #define BENCHMARK
+- #define TLS_CLIENT
+
+のいずれか一つを有効にしてアプリケーションをビルドすることで行います。
+
+
+
+## 7. testアプリケーションのビルドと実行
+-----
+
+testアプリケーションのビルドの準備が整ったので、ビルドを行います。
+
+1.プロジェクト・エクスプローラー上のwolfsslプロジェクトをビルドし、次にtestプロジェクトをビルドします。
+
+2.ビルドが成功したら、ターゲットボードとエミュレーターを接続し、外部電源を入力します。
+
+3."実行"メニュー > "デバッグ"を選択し、デバッグパースペクティブを開きます。
+
+4. testアプリケーションは標準出力に動作状況を出力します。この標準出力の表示用に、"Renesas Debug Virtual Console"を開いておきます。
+
+5.実行ボタンを押してtestアプリケーションを動作させます。
+
+6.CryptoTest、BenchmarkあるいはTLS_Client選択していた動作に応じた実行結果を表示したあと無限ループに入るので出力が停止したと思われたらデバッグを停止させます。
+
+
+## 8. TLS_Clientとしてのtestアプリケーションの実行
+-----
+
+
+### 8.1 TLS対向アプリケーションの生成と実行
+
+
+testアプリケーションをTLS_Clientとしての動作を行わせる場合には、TLS通信の相手方となる対向アプリケーションが必要となります。wolfSSLパッケージにはこの用途に使用できるTLSserverサンプルアプリケーションが用意されています。このプログラムはwolfsslをビルドすることで生成されます。wolfSSLのビルドにはgccがインストールされているLinux(MacOS, WSLも含む)でのビルドとVisualStudioを使ってのビルドが可能です。以下ではWSL上でのビルドを紹介します。
+
+
+```
+$ cd
+$ ./autogen.sh
+$ ./configure CFLAGS="-DWOLFSSL_STATIC_RSA -DHAVEAES_CBC"
+$ make
+```
+
+
+上記のビルドによって、/examples/server/server
+が生成されます。この実行プログラムがサーバーアプリケーションとして機能します。以下のオプションを与えて実行させるとTLS_Clientからの接続を待ち受け状態になります。
+
+
+```
+$ examples/server/server -b -d -i
+```
+
+testアプリケーションには、サーバーアプリケーションに割り当てられたIPアドレスを指定します。
+
+wolf_client.cを開き、#define SIMPLE_TLSSEVER_IPにアドレスを指定します。
+
+```
+-- wolf_client.c --
+
+...
+#define SIMPLE_TLSSEVER_IP 192.168.53.9
+...
+```
+
+ファイルをセーブしてtestアプリケーションを再ビルドしてください。testアプリケーションを実行すると、対向アプリケーションとの間でTLS接続が行われ、その後簡単な文字列を交換して標準出力に以下のような表示を行います。
+
+
+```
+cipher : ECDHE-RSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : AES256-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+```
+
+
+### 8.2 サーバー証明書の変更(認証方式の変更)
+
+
+上記はサーバーアプリケーションが提示すサーバー証明書にRSA公開鍵が含まれている(RSA認証)場合の実行例です。TSIPにはこのほかにサーバー証明書にECC公開鍵を含む場合(ECDSA認証)も扱えます。
+
+
+ECDSAを含む暗号化スイートを使用したい場合には、testアプリケーションの設定を変更して再ビルドが必要となります。\/common/user_settings.h を開き、USE_ECC_CERT定義を有効化して再ビルドしてください。
+
+
+```
+#define USE_ECC_CERT
+```
+
+
+この定義により、testアプリケーションはサーバーの提示するECC公開鍵を含んだサーバー証明書を検証できるRootCA証明書を使うようになります。
+
+
+さらに対向するサーバーアプリケーションの方でも以下のようにECC公開鍵を含んだサーバー証明書と秘密鍵ファイルをオプションで指定して実行する必要があります。
+
+
+```
+$ ./examples/server/server -b -d -i -c ./certs/server-ecc.pem -k ./certs/ecc-key.pem
+```
+
+実行結果として以下が表示されます。
+
+
+```
+cipher : ECDHE-ECDSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-ECDSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+```
+
+
+## 9. ユーザーが用意したRootCA証明書を利用する際に必要なこと
+-----
+
+本サンプルプログラムでは、TLS_Clientとして動作する際に必要なRootCA証明書とサンプルTLSサーバーアプリケーションが使用するサーバー証明書などは評価用でのみ利用可能な証明書です。
+機能評価を超えた目的で利用する場合にはRootCA証明書をユーザー自身で用意する必要があります。それに伴い、
+ 1. Provisioning key
+ 2. RootCA証明書の検証の為に必要なRSA鍵ペア
+ 3. RootCA証明書を上記2の秘密鍵で生成した署名
+
+が必要になります。それらの生成方法はRenesas社提供のマニュアルを参照してください。
diff --git a/IDE/Renesas/e2studio/GR-ROSE/common/strings.h b/IDE/Renesas/e2studio/RX65N/GR-ROSE/common/strings.h
similarity index 100%
rename from IDE/Renesas/e2studio/GR-ROSE/common/strings.h
rename to IDE/Renesas/e2studio/RX65N/GR-ROSE/common/strings.h
diff --git a/IDE/Renesas/e2studio/GR-ROSE/common/unistd.h b/IDE/Renesas/e2studio/RX65N/GR-ROSE/common/unistd.h
similarity index 100%
rename from IDE/Renesas/e2studio/GR-ROSE/common/unistd.h
rename to IDE/Renesas/e2studio/RX65N/GR-ROSE/common/unistd.h
diff --git a/IDE/Renesas/e2studio/RX65N/GR-ROSE/common/user_settings.h b/IDE/Renesas/e2studio/RX65N/GR-ROSE/common/user_settings.h
new file mode 100644
index 000000000..509040ec2
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/common/user_settings.h
@@ -0,0 +1,221 @@
+/* user_settings.h
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+/*-- Renesas MCU type ---------------------------------------------------------
+ *
+ *
+ *----------------------------------------------------------------------------*/
+#define WOLFSSL_RENESAS_RX65N
+
+
+
+/*-- Renesas TSIP usage and its version ---------------------------------------
+ *
+ * "WOLFSSL_RENESAS_TSIP" definition makes wolfSSL to use H/W acceleration
+ * for cipher operations.
+ * TSIP definition asks to have its version number.
+ * "WOLFSSL_RENESAS_TSIP_VER" takes following value:
+ * 106: TSIPv1.06
+ * 109: TSIPv1.09
+ * 113: TSIPv1.13
+ * 114: TSIPv1.14
+ *----------------------------------------------------------------------------*/
+ #define WOLFSSL_RENESAS_TSIP
+ #define WOLFSSL_RENESAS_TSIP_VER 114
+
+
+/*-- TLS version definitions --------------------------------------------------
+ *
+ * wolfSSL supports TLSv1.2 by default. In case you want your system to support
+ * TLSv1.3, uncomment line below.
+ *
+ *----------------------------------------------------------------------------*/
+/*#define WOLFSSL_TLS13*/
+
+
+/*-- Operating System related definitions --------------------------------------
+ *
+ * In case any real-time OS is used, define its name(e.g. FREERTOS).
+ * Otherwise, define "SINGLE_THREADED". They are exclusive each other.
+ *
+ *----------------------------------------------------------------------------*/
+ #define SINGLE_THREADED
+/*#define FREERTOS*/
+
+
+/*-- Cipher related definitions -----------------------------------------------
+ *
+ *
+ *----------------------------------------------------------------------------*/
+
+ #define NO_DEV_RANDOM
+
+ #define WOLFSSL_DH_CONST
+ #define HAVE_TLS_EXTENSIONS
+
+ #define HAVE_AESGCM
+ #define HAVE_AES_CBC
+ #define WOLFSSL_SHA512
+
+ #define HAVE_SUPPORTED_CURVES
+ #define HAVE_ECC
+ #define HAVE_CURVE25519
+ #define CURVE25519_SMALL
+ #define HAVE_ED25519
+
+ #define WOLFSSL_STATIC_RSA
+
+ /* USE_ECC_CERT
+ * This macro is for selecting root CA certificate to load, it is valid only
+ * in example applications. wolfSSL does not refer this macro.
+ * If you want to use cipher suites including ECDSA authentication in
+ * the example applications with TSIP, enable this macro.
+ * In TSIP 1.13 or later version, following cipher suites are
+ * available:
+ * - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
+ * - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SAH256
+ *
+ * Note that, this macro disables cipher suites including RSA
+ * authentication such as:
+ * - TLS_RSA_WITH_AES_128_CBC_SHA
+ * - TLS_RSA_WITH_AES_256_CBC_SHA
+ * - TLS_RSA_WITH_AES_128_CBC_SHA256
+ * - TLS_RSA_WITH_AES_256_CBC_SHA256
+ * - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
+ * - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA256
+ *
+ */
+ /*#define USE_ECC_CERT*/
+
+ /* In this example application, Root CA cert buffer named
+ * "ca_ecc_cert_der_256" is used under the following macro definition
+ * for ECDSA.
+ */
+ #define USE_CERT_BUFFERS_256
+
+ /* In this example application, Root CA cert buffer named
+ * "ca_cert_der_2048" is used under the following macro definition
+ * for RSA authentication.
+ */
+ #define USE_CERT_BUFFERS_2048
+
+/*-- Misc definitions ---------------------------------------------------------
+ *
+ *
+ *----------------------------------------------------------------------------*/
+ #define SIZEOF_LONG_LONG 8
+
+#if !defined(min)
+ #define min(data1, data2) _builtin_min(data1, data2)
+#endif
+
+ /*
+ * -- "NO_ASN_TIME" macro is to avoid certificate expiration validation --
+ *
+ * Note. In your actual products, do not forget to comment-out
+ * "NO_ASN_TIME" macro. And prepare time function to get calender time,
+ * otherwise, certificate expiration validation will not work.
+ */
+ /*#define NO_ASN_TIME*/
+
+ #define NO_MAIN_DRIVER
+ #define BENCH_EMBEDDED
+ #define NO_WOLFSSL_DIR
+ #define WOLFSSL_NO_CURRDIR
+ #define NO_FILESYSTEM
+ #define WOLFSSL_LOG_PRINTF
+ #define WOLFSSL_HAVE_MIN
+ #define WOLFSSL_HAVE_MAX
+ #define WOLFSSL_SMALL_STACK
+ #define NO_WRITEV
+ #define WOLFSSL_USER_IO
+
+ #define WOLFSSL_USER_CURRTIME /* for benchmark */
+ #define USER_TIME
+ #define XTIME time
+ #define USE_WOLF_SUSECONDS_T
+ #define USE_WOLF_TIMEVAL_T
+
+
+ #define WC_RSA_BLINDING
+ #define TFM_TIMING_RESISTANT
+ #define ECC_TIMING_RESISTANT
+
+
+/*-- Debugging options ------------------------------------------------------
+ *
+ * "DEBUG_WOLFSSL" definition enables log to output into stdout.
+ * Note: wolfSSL_Debugging_ON() must be called just after wolfSSL_Init().
+ *----------------------------------------------------------------------------*/
+
+/*#define DEBUG_WOLFSSL*/
+
+/*-- Definitions for functionality negation -----------------------------------
+ *
+ *
+ *----------------------------------------------------------------------------*/
+
+/*#define NO_RENESAS_TSIP_CRYPT*/
+/*#define NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION*/
+
+#if defined(WOLFCRYPT_ONLY)
+ #undef WOLFSSL_RENESAS_TSIP
+#endif
+
+/*-- Consistency checking between definitions ---------------------------------
+ *
+ *
+ *----------------------------------------------------------------------------*/
+
+/*-- TSIP TLS specific definitions --*/
+#if defined(WOLFSSL_RENESAS_TSIP)
+ #if !defined(WOLFSSL_RENESAS_TSIP_VER)
+ #error "WOLFSSL_RENESAS_TSIP_VER is required to be defined and have value"
+ #endif
+#endif
+
+/*-- Complementary definitions ------------------------------------------------
+ *
+ *
+ *----------------------------------------------------------------------------*/
+
+#if defined(WOLFSSL_RENESAS_TSIP)
+
+ #if !defined(NO_RENESAS_TSIP_CRYPT)
+ #define WOLFSSL_RENESAS_TSIP_CRYPT
+ #define WOLFSSL_RENESAS_TSIP_TLS
+ #define WOLFSSL_RENESAS_TSIP_TLS_AES_CRYPT
+ #define HAVE_PK_CALLBACKS
+ #define WOLF_CRYPTO_CB
+ #endif
+
+#else
+ #define OPENSSL_EXTRA
+ #define WOLFSSL_GENSEED_FORTEST /* Warning: define your own seed gen */
+#endif
+
+
+/*-- TLS version and required definitions --*/
+#if defined(WOLFSSL_TLS13)
+ #define HAVE_FFDHE_2048
+ #define HAVE_HKDF
+ #define WC_RSA_PSS
+#endif
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/common/wolfssl_dummy.c b/IDE/Renesas/e2studio/RX65N/GR-ROSE/common/wolfssl_dummy.c
similarity index 100%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/common/wolfssl_dummy.c
rename to IDE/Renesas/e2studio/RX65N/GR-ROSE/common/wolfssl_dummy.c
diff --git a/IDE/Renesas/e2studio/RX65N/GR-ROSE/include.am b/IDE/Renesas/e2studio/RX65N/GR-ROSE/include.am
new file mode 100644
index 000000000..60df793e5
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/include.am
@@ -0,0 +1,26 @@
+# vim:ft=automake
+# included from Top Level Makefile.am
+# All paths should be given relative to the root
+
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/README_EN.md
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/README_JP.md
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/wolfssl/.cproject
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/wolfssl/.project
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/wolfssl/wolfssl.rcpc
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/test/.cproject
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/test/.project
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/test/test_HardwareDebug.launch
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/test/test.rcpc
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/test_main.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/key_data.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/key_data.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolf_client.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolf_server.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolfssl_demo.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/common/wolfssl_dummy.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/common/strings.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/common/unistd.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/common/user_settings.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/.cproject
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/.project
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/smc.scfg
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/GR-ROSE/smc/.cproject b/IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/.cproject
similarity index 95%
rename from IDE/Renesas/e2studio/GR-ROSE/smc/.cproject
rename to IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/.cproject
index 0738090c8..399cd9586 100644
--- a/IDE/Renesas/e2studio/GR-ROSE/smc/.cproject
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/.cproject
@@ -43,20 +43,20 @@
-
-
-
-
+
+
+
+
-
+
+
+
+
-
-
-
@@ -77,7 +77,7 @@
-
+
@@ -100,6 +100,7 @@
+
@@ -120,6 +121,7 @@
+
@@ -140,4 +142,4 @@
-
+
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/GR-ROSE/smc/.project b/IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/.project
similarity index 84%
rename from IDE/Renesas/e2studio/GR-ROSE/smc/.project
rename to IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/.project
index eb9d9de48..4f66ca88d 100644
--- a/IDE/Renesas/e2studio/GR-ROSE/smc/.project
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/.project
@@ -5,6 +5,11 @@
+
+ com.renesas.smc.ui.pgsupport.SCContentBuilder
+
+
+
org.eclipse.cdt.managedbuilder.core.genmakebuilder
clean,full,incremental,
diff --git a/IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/smc.scfg b/IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/smc.scfg
new file mode 100644
index 000000000..ff0c4ac0c
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/smc.scfg
@@ -0,0 +1,840 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IDE/Renesas/e2studio/GR-ROSE/test/.cproject b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/.cproject
similarity index 78%
rename from IDE/Renesas/e2studio/GR-ROSE/test/.cproject
rename to IDE/Renesas/e2studio/RX65N/GR-ROSE/test/.cproject
index fba4a3d05..0d19cf328 100644
--- a/IDE/Renesas/e2studio/GR-ROSE/test/.cproject
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/.cproject
@@ -14,7 +14,7 @@
-
+
@@ -45,7 +45,7 @@
-
+
@@ -75,7 +75,7 @@
-
+
@@ -86,7 +86,7 @@
-
+
@@ -112,6 +112,8 @@
+
+
@@ -146,114 +148,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -261,10 +155,12 @@
+
+
@@ -286,6 +182,7 @@
+
@@ -296,6 +193,7 @@
+
@@ -379,7 +277,7 @@
-
+
@@ -426,6 +324,7 @@
+
@@ -454,4 +353,4 @@
-
+
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/GR-ROSE/test/.project b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/.project
similarity index 88%
rename from IDE/Renesas/e2studio/GR-ROSE/test/.project
rename to IDE/Renesas/e2studio/RX65N/GR-ROSE/test/.project
index 0a6806653..567eaad89 100644
--- a/IDE/Renesas/e2studio/GR-ROSE/test/.project
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/.project
@@ -32,17 +32,17 @@
src/benchmark.c
1
- $%7BPARENT-5-PROJECT_LOC%7D/wolfcrypt/benchmark/benchmark.c
+ $%7BPARENT-6-PROJECT_LOC%7D/wolfcrypt/benchmark/benchmark.c
src/benchmark.h
1
- $%7BPARENT-5-PROJECT_LOC%7D/wolfcrypt/benchmark/benchmark.h
+ $%7BPARENT-6-PROJECT_LOC%7D/wolfcrypt/benchmark/benchmark.h
src/test.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/test/test.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/test/test.c
src/wolfssl_dummy.c
diff --git a/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/key_data.c b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/key_data.c
new file mode 100644
index 000000000..9d5785545
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/key_data.c
@@ -0,0 +1,179 @@
+/* key_data.c
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+#include "key_data.h"
+
+/*-------------------------------------------------------------------------
+ TSIP v1.09 or later
+--------------------------------------------------------------------------*/
+#if defined(WOLFSSL_RENESAS_TSIP_TLS) && (WOLFSSL_RENESAS_TSIP_VER >=109)
+
+const st_key_block_data_t g_key_block_data =
+{
+ /* uint8_t encrypted_provisioning_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2]; */
+ {
+ 0xE9, 0x67, 0x79, 0xF7, 0x38, 0x73, 0xC8, 0x59, 0x94, 0x62, 0x7D, 0xB9,
+ 0x83, 0xDE, 0x59, 0x4A, 0x92, 0x53, 0x6B, 0x14, 0x1B, 0x2A, 0x99, 0xDF,
+ 0x95, 0xFD, 0x35, 0x84, 0x93, 0xCE, 0xDB, 0x10
+ },
+ /* uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE]; */
+ {
+ 0xF6, 0xA9, 0x83, 0x5A, 0xA1, 0x65, 0x1D, 0x28, 0xC8, 0x1A, 0xA6, 0x9D,
+ 0x34, 0xB2, 0x4D, 0x92
+ },
+ /*
+ * uint8_t
+ * encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16];
+ */
+ {
+ 0x34, 0x59, 0xFF, 0xFE, 0xAA, 0xE9, 0x26, 0x60, 0x8C, 0xB8, 0x76, 0xD2,
+ 0x98, 0x65, 0x72, 0x3B, 0x19, 0x78, 0xB8, 0x9B, 0x0D, 0xD4, 0xFC, 0x2A,
+ 0xF8, 0x54, 0x3B, 0x75, 0x0E, 0x40, 0x21, 0xF5, 0xF2, 0x6D, 0x3F, 0x60,
+ 0xD2, 0xDF, 0xE7, 0xDB, 0x67, 0xF1, 0xC7, 0x66, 0x5F, 0x37, 0xAF, 0x9D,
+ 0x08, 0xE7, 0xFD, 0xEF, 0x63, 0xA9, 0x78, 0x73, 0x1A, 0xE2, 0x47, 0x91,
+ 0xB5, 0xA0, 0xCE, 0xA2, 0xC7, 0x4F, 0x8A, 0xE5, 0x03, 0x6F, 0xC5, 0xB8,
+ 0xC4, 0x40, 0x12, 0x2D, 0x37, 0x2F, 0xF2, 0xC5, 0x73, 0x2D, 0xF8, 0xBF,
+ 0x4A, 0xDC, 0xB7, 0x98, 0xDF, 0xE8, 0xED, 0xF8, 0x3B, 0x24, 0x8A, 0x01,
+ 0xAE, 0x64, 0x89, 0x9C, 0x79, 0x66, 0x99, 0xE4, 0xF8, 0xC1, 0x3E, 0x04,
+ 0x56, 0x1E, 0x6E, 0xBA, 0x2D, 0xAA, 0xB9, 0xE8, 0xA0, 0xC2, 0x27, 0xCF,
+ 0x7C, 0x0F, 0xAD, 0x0A, 0x22, 0xEE, 0x61, 0xA8, 0x32, 0xBE, 0xEE, 0xE7,
+ 0x3F, 0x5D, 0xE5, 0xBD, 0x75, 0x6B, 0x35, 0xC1, 0x77, 0xCC, 0x7D, 0x0E,
+ 0x2E, 0x26, 0x67, 0xC4, 0x0E, 0x84, 0x34, 0xBD, 0x33, 0xB3, 0x0C, 0xD9,
+ 0x07, 0xE5, 0x8E, 0x3E, 0x7E, 0xCC, 0x56, 0x5D, 0x23, 0x5A, 0x96, 0x83,
+ 0x0C, 0xD9, 0x7F, 0xB0, 0xF7, 0x53, 0xD9, 0x5C, 0xE2, 0x1B, 0xDA, 0x63,
+ 0x62, 0x19, 0x16, 0x9D, 0x75, 0x7B, 0xBB, 0x7E, 0xC9, 0xB5, 0xAD, 0x7D,
+ 0xBB, 0x5A, 0xFA, 0xA5, 0x5B, 0x54, 0xA1, 0x93, 0x6D, 0x53, 0x3C, 0x85,
+ 0x69, 0x00, 0x15, 0x40, 0x0E, 0x54, 0xD2, 0xBA, 0xB5, 0x80, 0x1C, 0x25,
+ 0x85, 0x0E, 0x60, 0x87, 0x2A, 0x1A, 0xE7, 0x60, 0xCB, 0x6A, 0xF5, 0xAF,
+ 0x84, 0x4B, 0xB7, 0x0D, 0x0C, 0xC0, 0xB5, 0x02, 0xB2, 0x38, 0x9D, 0x7C,
+ 0xFA, 0x31, 0xF3, 0x50, 0xB3, 0x32, 0x69, 0x3A, 0x3C, 0x7A, 0xA5, 0x67,
+ 0x19, 0x66, 0xD5, 0x62, 0xA3, 0xF2, 0xF7, 0x77, 0x73, 0xF6, 0xE7, 0x8D,
+ 0x51, 0x0C, 0x19, 0xA3, 0x0F, 0x8C, 0x79, 0xE0, 0x7C, 0xCF, 0x8A, 0x03,
+ 0x70, 0xC7, 0x25, 0x9D, 0xCE, 0x89, 0x77, 0x8E, 0x4C, 0xE6, 0x97, 0xC8
+ },
+ /* uint8_t encrypted_user_update_key[R_TSIP_AES256_KEY_BYTE_SIZE + 16]; */
+ {
+ 0x69, 0xDB, 0xC6, 0x86, 0xA5, 0x06, 0x22, 0x59, 0x11, 0x14, 0x73, 0x56,
+ 0x3A, 0x9E, 0x44, 0xC3, 0x9C, 0xA8, 0x76, 0xC6, 0xF6, 0xE8, 0xD8, 0xE2,
+ 0x17, 0x66, 0x90, 0x65, 0x08, 0xB5, 0x39, 0x7F, 0xD5, 0xC5, 0x6F, 0xD1,
+ 0xCB, 0xFB, 0xB2, 0x76, 0x33, 0xA1, 0x22, 0x0F, 0xBE, 0x83, 0x91, 0x24
+ },
+
+};
+
+/* Public key type of CA root cert: 0: RSA-2048 2: ECDSA-P256*/
+#if defined(USE_ECC_CERT)
+const uint32_t encrypted_user_key_type =
+ R_TSIP_TLS_PUBLIC_KEY_TYPE_ECDSA_P256;
+#else
+const uint32_t encrypted_user_key_type =
+ R_TSIP_TLS_PUBLIC_KEY_TYPE_RSA2048;
+#endif
+
+const unsigned char ca_ecc_cert_der_sig[] =
+{
+ 0x81, 0x87, 0x55, 0x02, 0x9c, 0xf8, 0x0b, 0x5c, 0x69, 0xba, 0x4b, 0xe9,
+ 0x51, 0x19, 0x7b, 0x3c, 0x22, 0xaf, 0x6b, 0xd5, 0x23, 0x80, 0x64, 0xb8,
+ 0x1e, 0xe7, 0x99, 0xab, 0x89, 0x6d, 0xff, 0x93, 0xe1, 0xb5, 0xd8, 0x8d,
+ 0x7f, 0x53, 0xe7, 0x74, 0x8a, 0xd6, 0x06, 0x6a, 0x61, 0x2a, 0xab, 0x4a,
+ 0x65, 0x0d, 0x28, 0xbd, 0xc7, 0x92, 0x70, 0xd8, 0x79, 0xdc, 0xf7, 0xd2,
+ 0xf7, 0xf9, 0xa9, 0x13, 0x16, 0x5f, 0x4d, 0x4b, 0xae, 0x12, 0x5b, 0xfe,
+ 0x08, 0x09, 0x26, 0x1f, 0xae, 0x15, 0xd9, 0x16, 0x51, 0x4a, 0x92, 0xfe,
+ 0x61, 0xeb, 0x6a, 0x82, 0x8c, 0xf8, 0xa8, 0x94, 0x26, 0x81, 0x9b, 0xb8,
+ 0x74, 0xd6, 0x32, 0x2b, 0x6f, 0xa6, 0xad, 0x9a, 0x91, 0x63, 0xe6, 0x03,
+ 0x5f, 0x25, 0xee, 0xc2, 0xfd, 0x54, 0x58, 0x13, 0xee, 0x53, 0xae, 0xe3,
+ 0xda, 0x6b, 0xb5, 0x08, 0x45, 0xbe, 0xf2, 0xa8, 0x22, 0x92, 0x53, 0x8c,
+ 0xa4, 0xd9, 0xb6, 0x4e, 0xb9, 0xbf, 0x76, 0xb0, 0x96, 0x9f, 0xd7, 0xf6,
+ 0x53, 0xf3, 0x65, 0xf0, 0xe7, 0xff, 0xe8, 0x93, 0x2d, 0xc2, 0x08, 0x91,
+ 0xf8, 0x27, 0x33, 0x92, 0x95, 0x23, 0x1e, 0x6e, 0xd1, 0x91, 0x50, 0xc6,
+ 0x06, 0xb1, 0x16, 0x69, 0xee, 0xcf, 0xad, 0xc9, 0x4b, 0xf2, 0x38, 0x65,
+ 0x1d, 0xa9, 0xff, 0xd3, 0xf4, 0xd5, 0x84, 0xa9, 0xdd, 0xa7, 0x04, 0x77,
+ 0x64, 0xb5, 0xed, 0xe8, 0x0c, 0x15, 0x77, 0x7e, 0xfc, 0x02, 0xdd, 0x4e,
+ 0xf1, 0xd1, 0x36, 0xfe, 0xac, 0x3f, 0x5c, 0xd3, 0xdf, 0x51, 0xa3, 0x5c,
+ 0x8d, 0xed, 0x9f, 0x8d, 0xc8, 0xa7, 0xff, 0x46, 0xbc, 0x1d, 0x83, 0x12,
+ 0x4f, 0x49, 0xaa, 0xf5, 0xd1, 0x04, 0xc8, 0xee, 0x95, 0xda, 0xa0, 0x61,
+ 0x28, 0xff, 0x25, 0x8c, 0xfc, 0x35, 0x8f, 0xdc, 0x00, 0x47, 0x01, 0xfd,
+ 0x7c, 0xed, 0x05, 0xff
+};
+const int sizeof_ca_ecc_cert_sig = sizeof(ca_ecc_cert_der_sig);
+
+/* ./ca-cert.der.sign, */
+const unsigned char ca_cert_der_sig[] =
+{
+ 0x0E, 0xC3, 0x9B, 0x77, 0xF8, 0x58, 0x08, 0x9E, 0x5D, 0x1E, 0x03, 0x8D,
+ 0x60, 0xD1, 0xF6, 0x3E, 0x3D, 0xFF, 0x89, 0x4C, 0x91, 0x5C, 0x00, 0xEB,
+ 0x05, 0xE5, 0x65, 0x62, 0x17, 0xFB, 0xD4, 0x52, 0x69, 0x9D, 0xB8, 0x07,
+ 0xAF, 0xA9, 0x4C, 0xA5, 0xB9, 0x8D, 0x52, 0xC0, 0xF3, 0x34, 0x13, 0x67,
+ 0x40, 0xAA, 0xE1, 0xA3, 0x9E, 0x5D, 0x0F, 0xCE, 0x87, 0xB0, 0x10, 0xB4,
+ 0x79, 0x8F, 0x84, 0x21, 0x81, 0xC2, 0xF9, 0xF7, 0xDB, 0xCB, 0x8F, 0xE4,
+ 0x9B, 0xF5, 0x85, 0x9D, 0x11, 0x04, 0xFB, 0xA7, 0xFD, 0x13, 0x6F, 0x02,
+ 0xA5, 0xBF, 0xE0, 0x89, 0x62, 0x5E, 0x24, 0x95, 0xF6, 0x01, 0x7D, 0x7F,
+ 0xB5, 0xD1, 0xDD, 0xF3, 0x3B, 0xD5, 0x04, 0x54, 0xE1, 0x8E, 0xA8, 0x3D,
+ 0x30, 0xB3, 0x35, 0x76, 0xAF, 0xA7, 0x94, 0xD7, 0x59, 0x82, 0x38, 0x2C,
+ 0xD6, 0x95, 0x57, 0xD1, 0xD5, 0x62, 0xB1, 0x69, 0x60, 0xCD, 0x3F, 0x7D,
+ 0x0E, 0x9F, 0x00, 0x21, 0x04, 0xFE, 0x43, 0xBD, 0x7D, 0x3D, 0xA7, 0x6B,
+ 0xC5, 0x82, 0x92, 0xDE, 0xB7, 0xA3, 0xD4, 0x7D, 0x3C, 0x14, 0x46, 0x28,
+ 0x50, 0xCA, 0x86, 0x9F, 0x66, 0x4C, 0xB0, 0x46, 0x46, 0x4D, 0x31, 0xD6,
+ 0x7B, 0xEC, 0xBA, 0xED, 0xA1, 0xF9, 0x88, 0x68, 0xB9, 0xA9, 0xDA, 0x88,
+ 0x63, 0x01, 0x95, 0x5B, 0x78, 0x38, 0x03, 0xD6, 0xDF, 0x86, 0xC4, 0x3E,
+ 0x3B, 0xCF, 0xED, 0x8B, 0x2A, 0x41, 0x49, 0x65, 0x3E, 0x2F, 0x45, 0x71,
+ 0xD8, 0x0B, 0xF1, 0xF0, 0xC7, 0xB5, 0x2E, 0xBE, 0xF0, 0x71, 0xDE, 0x40,
+ 0xB0, 0x54, 0x25, 0xD7, 0x4A, 0x86, 0xF1, 0xB9, 0xF6, 0xAB, 0x07, 0x07,
+ 0x21, 0x7C, 0x15, 0x7B, 0x1F, 0xCF, 0xE4, 0x1F, 0x0B, 0xEB, 0x0E, 0x96,
+ 0xE5, 0x59, 0x34, 0xC6, 0x4B, 0x1B, 0xF6, 0xC7, 0x6C, 0x4C, 0x16, 0x43,
+ 0x72, 0xAF, 0x82, 0x1E
+};
+const int sizeof_ca_cert_sig = sizeof(ca_cert_der_sig);
+/* ./client-cert.der.sign, */
+const unsigned char client_cert_der_sign[] =
+{
+ 0x5D, 0x1F, 0x89, 0x41, 0xEC, 0x47, 0xC8, 0x90, 0x61, 0x79,
+ 0x8A, 0x16, 0x1F, 0x31, 0x96, 0x67, 0xD9, 0x3C, 0xEC, 0x6B,
+ 0x58, 0xC6, 0x5A, 0xED, 0x99, 0xB3, 0xEF, 0x27, 0x6F, 0x04,
+ 0x8C, 0xD9, 0x68, 0xB1, 0xD6, 0x23, 0x15, 0x84, 0x00, 0xE1,
+ 0x27, 0xD1, 0x1F, 0x68, 0xB7, 0x3F, 0x13, 0x53, 0x8A, 0x95,
+ 0x5A, 0x20, 0x7C, 0xB2, 0x76, 0x5B, 0xDC, 0xE0, 0xA6, 0x21,
+ 0x7C, 0x49, 0xCF, 0x93, 0xBA, 0xD5, 0x12, 0x9F, 0xEE, 0x90,
+ 0x5B, 0x3F, 0xA3, 0x9D, 0x13, 0x72, 0xAC, 0x72, 0x16, 0xFE,
+ 0x1D, 0xBE, 0xEB, 0x8E, 0xC7, 0xDC, 0xC4, 0xF8, 0x1A, 0xD8,
+ 0xA0, 0xA4, 0xF6, 0x04, 0x30, 0xF6, 0x7E, 0xB6, 0xC8, 0xE1,
+ 0xAB, 0x88, 0x37, 0x08, 0x63, 0x72, 0xAA, 0x46, 0xCC, 0xCA,
+ 0xF0, 0x9E, 0x02, 0x1E, 0x65, 0x67, 0xFF, 0x2C, 0x9D, 0x81,
+ 0x6C, 0x1E, 0xF1, 0x54, 0x05, 0x68, 0x68, 0x18, 0x72, 0x26,
+ 0x55, 0xB6, 0x2C, 0x95, 0xC0, 0xC9, 0xB2, 0xA7, 0x0B, 0x60,
+ 0xD7, 0xEB, 0x1D, 0x08, 0x1A, 0xA2, 0x54, 0x15, 0x89, 0xCB,
+ 0x83, 0x21, 0x5D, 0x15, 0x9B, 0x38, 0xAC, 0x89, 0x63, 0xD5,
+ 0x4B, 0xF4, 0x8B, 0x47, 0x93, 0x78, 0x43, 0xCB, 0x9B, 0x71,
+ 0xBF, 0x94, 0x76, 0xB5, 0xCE, 0x35, 0xA9, 0x1A, 0xD5, 0xA5,
+ 0xD8, 0x19, 0xA6, 0x04, 0x39, 0xB1, 0x09, 0x8C, 0x65, 0x02,
+ 0x58, 0x3A, 0x95, 0xEF, 0xA2, 0xC3, 0x85, 0x18, 0x61, 0x23,
+ 0x2D, 0xC5, 0xCD, 0x62, 0xC1, 0x19, 0x31, 0xE5, 0x36, 0x95,
+ 0x22, 0xDB, 0x3E, 0x1A, 0x3C, 0xE8, 0xC6, 0x2E, 0xDF, 0xD9,
+ 0x2F, 0x84, 0xC1, 0xF0, 0x38, 0x2B, 0xE5, 0x73, 0x35, 0x4F,
+ 0x05, 0xE2, 0xA5, 0x60, 0x79, 0xB0, 0x23, 0xDC, 0x56, 0x4C,
+ 0xE7, 0xD9, 0x1F, 0xCF, 0x6A, 0xFC, 0x55, 0xEB, 0xAA, 0x48,
+ 0x3E, 0x95, 0x2A, 0x10, 0x01, 0x05
+};
+const int sizeof_client_cert_der_sign = sizeof(client_cert_der_sign);
+
+uint32_t s_inst1[R_TSIP_SINST_WORD_SIZE] = { 0 };
+uint32_t s_inst2[R_TSIP_SINST2_WORD_SIZE]= { 0 };
+#endif
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/key_data.h b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/key_data.h
similarity index 88%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/key_data.h
rename to IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/key_data.h
index b04ea27ea..4666db3a6 100644
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/key_data.h
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/key_data.h
@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
-
+
@@ -44,12 +44,12 @@ typedef struct st_key_block_data
extern const uint32_t encrypted_user_key_type;
extern const st_key_block_data_t g_key_block_data;
-extern const unsigned char ca_cert_sig[];
-extern const unsigned char ca_cert_der[];
+extern const unsigned char ca_cert_der_sig[];
+extern const unsigned char ca_ecc_cert_der_sig[];
extern const unsigned char client_cert_der_sign[];
extern const int sizeof_ca_cert_der;
-#endif /* (WOLFSSL_RENESAS_TSIP */
+#endif /* WOLFSSL_RENESAS_TSIP */
#endif /* KEY_DATA_H_ */
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/test_main.c b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/test_main.c
similarity index 77%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/test_main.c
rename to IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/test_main.c
index 5979896f8..4c74b64a1 100644
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/test_main.c
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/test_main.c
@@ -29,7 +29,7 @@
void main(void);
#ifdef __cplusplus
extern "C" {
-void abort(void);
+
}
#endif
@@ -41,14 +41,14 @@ void abort(void);
#define T4_WORK_SIZE (14800)
static UW tcpudp_work[(T4_WORK_SIZE / 4) + 1];
+#endif
- #if defined(WOLFSSL_RENESAS_TSIP)
- #include "key_data.h"
- #include
-
- extern const st_key_block_data_t g_key_block_data;
- #endif
+#if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ #include "key_data.h"
+ #include
+ extern const st_key_block_data_t g_key_block_data;
+ user_PKCbInfo guser_PKCbInfo;
#endif
static long tick;
@@ -79,27 +79,38 @@ int SetTsiptlsKey()
{
#if defined(WOLFSSL_RENESAS_TSIP) && (WOLFSSL_RENESAS_TSIP_VER >=109)
- #if defined(TLS_CLIENT)
-
- tsip_inform_cert_sign((const byte *)ca_cert_sig);
- tsip_inform_user_keys_ex(
- (byte*)&g_key_block_data.encrypted_provisioning_key,
- (byte*)&g_key_block_data.iv,
- (byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key,
- encrypted_user_key_type);
-
- #elif defined(TLS_SERVER)
-
- tsip_inform_cert_sign((const byte *)client_cert_der_sign);
- tsip_inform_user_keys_ex(
- (byte*)&g_key_block_data.encrypted_provisioning_key,
- (byte*)&g_key_block_data.iv,
- (byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key,
- encrypted_user_key_type);
-
+#if defined(TLS_CLIENT)
+
+ #if defined(USE_ECC_CERT)
+ /* Root CA cert has ECC-P256 public key */
+ tsip_inform_cert_sign((const byte *)ca_ecc_cert_der_sig);
+ #else
+ /* Root CA cert has RSA public key */
+ tsip_inform_cert_sign((const byte *)ca_cert_der_sig);
#endif
-#elif defined(WOLFSSL_RENESAS_TSIP) && (WOLFSSL_RENESAS_TSIP_VER >=106)
+ tsip_inform_user_keys_ex(
+ (byte*)&g_key_block_data.encrypted_provisioning_key,
+ (byte*)&g_key_block_data.iv,
+ (byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key,
+ encrypted_user_key_type);
+
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ guser_PKCbInfo.user_key_id = 0;
+ #endif
+
+#elif defined(TLS_SERVER)
+
+ tsip_inform_cert_sign((const byte *)client_cert_der_sign);
+ tsip_inform_user_keys_ex(
+ (byte *)&g_key_block_data.encrypted_provisioning_key,
+ (byte *)&g_key_block_data.iv,
+ (byte *)&g_key_block_data.encrypted_user_rsa2048_ne_key,
+ encrypted_user_key_type);
+
+#endif
+
+#elif defined(WOLFSSL_RENESAS_TSIP) && (WOLFSSL_RENESAS_TSIP_VER < 109)
#if defined(TLS_CLIENT)
@@ -197,15 +208,28 @@ void main(void)
#elif defined(TLS_CLIENT)
#include "r_cmt_rx_if.h"
-#if defined(WOLFSSL_RENESAS_TSIP)
- const char* cipherlist[] = {
+#if defined(WOLFSSL_RENESAS_TSIP_TLS)
- "AES128-SHA",
- "AES128-SHA256",
- "AES256-SHA",
- "AES256-SHA256"
+ #ifdef USE_ECC_CERT
+ const char* cipherlist[] = {
+ "ECDHE-ECDSA-AES128-GCM-SHA256",
+ "ECDHE-ECDSA-AES128-SHA256"
};
- const int cipherlist_sz = 4;
+ const int cipherlist_sz = 2;
+
+ #else
+ const char* cipherlist[] = {
+ "ECDHE-RSA-AES128-GCM-SHA256",
+ "ECDHE-RSA-AES128-SHA256",
+ "AES128-SHA",
+ "AES128-SHA256",
+ "AES256-SHA",
+ "AES256-SHA256"
+ };
+ const int cipherlist_sz = 6;
+
+ #endif
+
#else
const char* cipherlist[] = { NULL };
const int cipherlist_sz = 0;
@@ -214,7 +238,8 @@ void main(void)
int i = 0;
Open_tcp();
-#if defined(WOLFSSL_RENESAS_TSIP)
+
+#if defined(WOLFSSL_RENESAS_TSIP_TLS)
SetTsiptlsKey();
#endif
diff --git a/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolf_client.c b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolf_client.c
new file mode 100644
index 000000000..942e37dbe
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolf_client.c
@@ -0,0 +1,224 @@
+/* wolf_client.c
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+#include
+#include
+#include "r_t4_itcpip.h"
+#include "wolfssl/wolfcrypt/settings.h"
+#include "wolfssl/ssl.h"
+#include "wolfssl/certs_test.h"
+#include "key_data.h"
+#include "wolfssl_demo.h"
+
+
+#define SIMPLE_TLSSEVER_IP "192.168.1.14"
+#define SIMPLE_TLSSERVER_PORT "11111"
+
+ER t4_tcp_callback(ID cepid, FN fncd , VP p_parblk);
+
+static WOLFSSL_CTX *client_ctx;
+
+#if defined(WOLFSSL_RENESAS_TSIP_TLS)
+uint32_t g_encrypted_root_public_key[140];
+static TsipUserCtx userContext;
+#endif
+
+static int my_IORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx)
+{
+ int ret;
+ ID cepid;
+
+ if(ctx != NULL)
+ cepid = *(ID *)ctx;
+ else
+ return WOLFSSL_CBIO_ERR_GENERAL;
+
+ ret = tcp_rcv_dat(cepid, buff, sz, TMO_FEVR);
+ if(ret > 0)
+ return ret;
+ else
+ return WOLFSSL_CBIO_ERR_GENERAL;
+}
+
+static int my_IOSend(WOLFSSL* ssl, char* buff, int sz, void* ctx)
+{
+ int ret;
+ ID cepid;
+
+ if(ctx != NULL)
+ cepid = *(ID *)ctx;
+ else
+ return WOLFSSL_CBIO_ERR_GENERAL;
+
+ ret = tcp_snd_dat(cepid, buff, sz, TMO_FEVR);
+ if(ret == sz)
+ return ret;
+ else
+ return WOLFSSL_CBIO_ERR_GENERAL;
+}
+
+static int getIPaddr(char *arg)
+{
+ int a1, a2, a3, a4;
+ if(sscanf(arg, "%d.%d.%d.%d", &a1, &a2, &a3, &a4) == 4)
+ return (a1 << 24) | (a2 << 16) | (a3 << 8) | a4;
+ else return 0;
+}
+
+static int getPort(char *arg)
+{
+ int port;
+ if(sscanf(arg, "%d", &port) == 1)
+ return port;
+ else return 0;
+}
+
+void wolfSSL_TLS_client_init(const char* cipherlist)
+{
+
+ #ifndef NO_FILESYSTEM
+ #ifdef USE_ECC_CERT
+ char *cert = "./certs/ca-ecc-cert.pem";
+ #else
+ char *cert = "./certs/ca-cert.pem";
+ #endif
+ #else
+ #if defined(USE_ECC_CERT) && defined(USE_CERT_BUFFERS_256)
+ const unsigned char *cert = ca_ecc_cert_der_256;
+ #define SIZEOF_CERT sizeof_ca_ecc_cert_der_256
+ #else
+ const unsigned char *cert = ca_cert_der_2048;
+ #define SIZEOF_CERT sizeof_ca_cert_der_2048
+ #endif
+ #endif
+
+ wolfSSL_Init();
+ #ifdef DEBUG_WOLFSSL
+ wolfSSL_Debugging_ON();
+ #endif
+
+ /* Create and initialize WOLFSSL_CTX */
+ if ((client_ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method_ex((void *)NULL))) == NULL) {
+ printf("ERROR: failed to create WOLFSSL_CTX\n");
+ return;
+ }
+
+ #ifdef WOLFSSL_RENESAS_TSIP_TLS
+ tsip_set_callbacks(client_ctx);
+ #endif
+
+ #if !defined(NO_FILESYSTEM)
+ if (wolfSSL_CTX_load_verify_locations(client_ctx, cert, 0) != SSL_SUCCESS) {
+ printf("ERROR: can't load \"%s\"\n", cert);
+ return NULL;
+ }
+ #else
+ if (wolfSSL_CTX_load_verify_buffer(client_ctx, cert, SIZEOF_CERT, SSL_FILETYPE_ASN1) != SSL_SUCCESS){
+ printf("ERROR: can't load certificate data\n");
+ return;
+ }
+ #endif
+
+ /* Register callbacks */
+ wolfSSL_SetIORecv(client_ctx, my_IORecv);
+ wolfSSL_SetIOSend(client_ctx, my_IOSend);
+
+ /* use specific cipher */
+ if (cipherlist != NULL &&
+ wolfSSL_CTX_set_cipher_list(client_ctx, cipherlist) != WOLFSSL_SUCCESS) {
+ wolfSSL_CTX_free(client_ctx); client_ctx = NULL;
+ printf("client can't set cipher list");
+ }
+}
+
+void wolfSSL_TLS_client( )
+{
+ ID cepid = 1;
+ ER ercd;
+ int ret;
+ WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)client_ctx;
+ WOLFSSL *ssl;
+
+ #define BUFF_SIZE 256
+ static const char sendBuff[]= "Hello Server\n" ;
+
+ char rcvBuff[BUFF_SIZE] = {0};
+
+ static T_IPV4EP my_addr = { 0, 0 };
+
+ T_IPV4EP dst_addr;
+
+ if((dst_addr.ipaddr = getIPaddr(SIMPLE_TLSSEVER_IP)) == 0){
+ printf("ERROR: IP address\n");
+ return;
+ }
+ if((dst_addr.portno = getPort(SIMPLE_TLSSERVER_PORT)) == 0){
+ printf("ERROR: IP address\n");
+ return;
+ }
+
+ if((ercd = tcp_con_cep(cepid, &my_addr, &dst_addr, TMO_FEVR)) != E_OK) {
+ printf("ERROR TCP Connect: %d\n", ercd);
+ return;
+ }
+
+ if((ssl = wolfSSL_new(ctx)) == NULL) {
+ printf("ERROR wolfSSL_new: %d\n", wolfSSL_get_error(ssl, 0));
+ return;
+ }
+
+ #ifdef WOLFSSL_RENESAS_TSIP_TLS
+ tsip_set_callback_ctx(ssl, &userContext);
+ #endif
+
+ /* set callback context */
+ wolfSSL_SetIOReadCtx(ssl, (void *)&cepid);
+ wolfSSL_SetIOWriteCtx(ssl, (void *)&cepid);
+
+
+ if(wolfSSL_connect(ssl) != SSL_SUCCESS) {
+ printf("ERROR SSL connect: %d\n", wolfSSL_get_error(ssl, 0));
+ return;
+ }
+
+ if (wolfSSL_write(ssl, sendBuff, strlen(sendBuff)) != strlen(sendBuff)) {
+ printf("ERROR SSL write: %d\n", wolfSSL_get_error(ssl, 0));
+ return;
+ }
+
+ if ((ret=wolfSSL_read(ssl, rcvBuff, BUFF_SIZE)) < 0) {
+ printf("ERROR SSL read: %d\n", wolfSSL_get_error(ssl, 0));
+ return;
+ }
+
+ rcvBuff[ret] = '\0' ;
+ printf("Received: %s\n\n", rcvBuff);
+
+ /* frees all data before client termination */
+ wolfSSL_free(ssl);
+ wolfSSL_CTX_free(ctx);
+ wolfSSL_Cleanup();
+
+ tcp_sht_cep(cepid);
+ tcp_cls_cep(cepid, TMO_FEVR);
+
+ return;
+}
diff --git a/IDE/Renesas/e2studio/GR-ROSE/test/src/wolf_server.c b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolf_server.c
similarity index 82%
rename from IDE/Renesas/e2studio/GR-ROSE/test/src/wolf_server.c
rename to IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolf_server.c
index b193fbe71..0f3d301f5 100644
--- a/IDE/Renesas/e2studio/GR-ROSE/test/src/wolf_server.c
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolf_server.c
@@ -73,26 +73,28 @@ void wolfSSL_TLS_server_init(byte doClientCheck)
#ifndef NO_FILESYSTEM
#ifdef USE_ECC_CERT
- char *cert = "./certs/server-ecc-cert.pem";
- char *key = "./certs/server-ecc-key.pem";
+ char *cert = "./certs/server-ecc-cert.pem";
+ char *key = "./certs/server-ecc-key.pem";
#else
- char *cert = "./certs/server-cert.pem";
- char *key = "./certs/server-key.pem";
+ char *cert = "./certs/server-cert.pem";
+ char *key = "./certs/server-key.pem";
#endif
- char *clientCert = "./certs/client-cert.pem";
+ char *clientCert = "./certs/client-cert.pem";
#else
- #ifdef USE_ECC_CERT
- char *cert = serv_ecc_der_256;
- int sizeof_cert = sizeof_serv_ecc_der_256;
- char *cert = serv_ecc_key_der_256;
- int sizeof_key = sizeof_serv_ecc_key_der_256;
+ #if defined(USE_ECC_CERT) && defined(USE_CERT_BUFFERS_256)
+ const unsigned char *cert = serv_ecc_der_256;
+ #define sizeof_cert sizeof_serv_ecc_der_256
+ const unsigned char *key = NULL;
+ #define sizeof_key NULL
+ const unsigned char *clientCert = NULL;
+ #define sizeof_clicert NULL
#else
- const unsigned char *cert = server_cert_der_2048;
- #define sizeof_cert sizeof_server_cert_der_2048
- const unsigned char *key = server_key_der_2048;
- #define sizeof_key sizeof_server_key_der_2048
- const unsigned char *clientCert = client_cert_der_2048;
- #define sizeof_clicert sizeof_client_cert_der_2048
+ const unsigned char *cert = server_cert_der_2048;
+ #define sizeof_cert sizeof_server_cert_der_2048
+ const unsigned char *key = server_key_der_2048;
+ #define sizeof_key sizeof_server_key_der_2048
+ const unsigned char *clientCert = client_cert_der_2048;
+ #define sizeof_clicert sizeof_client_cert_der_2048
#endif
#endif
@@ -199,5 +201,7 @@ void wolfSSL_TLS_server( )
}
wolfSSL_free(ssl);
+ wolfSSL_CTX_free(ctx);
+ wolfSSL_Cleanup();
tcp_sht_cep(cepid);
}
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolfssl_demo.h b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolfssl_demo.h
similarity index 94%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolfssl_demo.h
rename to IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolfssl_demo.h
index 6f577a7aa..664186b36 100644
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolfssl_demo.h
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolfssl_demo.h
@@ -26,7 +26,7 @@
/* Enable wolfcrypt test */
/* can be enabled with benchmark test */
-/* #define CRYPT_TEST */
+/*#define CRYPT_TEST*/
/* Enable benchmark */
/* can be enabled with cyrpt test */
@@ -34,7 +34,7 @@
/* Enable TLS client */
/* cannot enable with other definition */
- #define TLS_CLIENT
+#define TLS_CLIENT
/* Enable TLS server */
/* cannot enable with other definition */
@@ -42,7 +42,7 @@
void wolfSSL_TLS_client_init();
void wolfSSL_TLS_client();
-void wolfSSL_TLS_server_init();
+void wolfSSL_TLS_server_init(byte);
void wolfSSL_TLS_server();
#endif /* WOLFSSL_DEMO_H_ */
diff --git a/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/test.rcpc b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/test.rcpc
new file mode 100644
index 000000000..b7b4b104e
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/test.rcpc
@@ -0,0 +1,527 @@
+
+
+
+
+ ${
+ }
+
+
+
+
+ ..\..\..\..\..\..\wolfcrypt\benchmark\benchmark.c
+ ..\..\..\..\..\..\wolfcrypt\benchmark\benchmark.h
+ src\key_data.c
+ src\key_data.h
+ ..\..\..\..\..\..\wolfcrypt\test\test.c
+ src\test_main.c
+ src\wolf_client.c
+ src\wolf_server.c
+ src\wolfssl_demo.h
+ ..\common\wolfssl_dummy.c
+
+
+ src\smc_gen\general\r_cg_hardware_setup.c
+ src\smc_gen\general\r_cg_macrodriver.h
+ src\smc_gen\general\r_cg_userdefine.h
+ src\smc_gen\general\r_smc_cgc.c
+ src\smc_gen\general\r_smc_cgc.h
+ src\smc_gen\general\r_smc_cgc_user.c
+ src\smc_gen\general\r_smc_entry.h
+ src\smc_gen\general\r_smc_interrupt.c
+ src\smc_gen\general\r_smc_interrupt.h
+
+
+ src\smc_gen\r_bsp\platform.h
+ src\smc_gen\r_bsp\readme.txt
+
+
+ src\smc_gen\r_bsp\board\generic_rx65n\hwsetup.c
+ src\smc_gen\r_bsp\board\generic_rx65n\hwsetup.h
+ src\smc_gen\r_bsp\board\generic_rx65n\r_bsp.h
+ src\smc_gen\r_bsp\board\generic_rx65n\r_bsp_config_reference.h
+ src\smc_gen\r_bsp\board\generic_rx65n\r_bsp_interrupt_config_reference.h
+
+
+ src\smc_gen\r_bsp\board\user\r_bsp.h
+
+
+
+
+ src\smc_gen\r_bsp\doc\en\r01an1685ej0621-rx-bsp.pdf
+
+
+ src\smc_gen\r_bsp\doc\ja\r01an1685jj0621-rx-bsp.pdf
+
+
+
+
+ src\smc_gen\r_bsp\mcu\all\dbsct.c
+ src\smc_gen\r_bsp\mcu\all\fsp_common_api.h
+ src\smc_gen\r_bsp\mcu\all\lowlvl.c
+ src\smc_gen\r_bsp\mcu\all\lowlvl.h
+ src\smc_gen\r_bsp\mcu\all\lowsrc.c
+ src\smc_gen\r_bsp\mcu\all\lowsrc.h
+ src\smc_gen\r_bsp\mcu\all\mcu_locks.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_common.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_common.h
+ src\smc_gen\r_bsp\mcu\all\r_bsp_cpu.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_interrupts.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_interrupts.h
+ src\smc_gen\r_bsp\mcu\all\r_bsp_locking.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_mcu_startup.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_mcu_startup.h
+ src\smc_gen\r_bsp\mcu\all\r_bsp_software_interrupt.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_software_interrupt.h
+ src\smc_gen\r_bsp\mcu\all\r_fsp_error.h
+ src\smc_gen\r_bsp\mcu\all\r_rtos.h
+ src\smc_gen\r_bsp\mcu\all\r_rx_compiler.h
+ src\smc_gen\r_bsp\mcu\all\r_rx_intrinsic_functions.c
+ src\smc_gen\r_bsp\mcu\all\r_rx_intrinsic_functions.h
+ src\smc_gen\r_bsp\mcu\all\r_typedefs.h
+ src\smc_gen\r_bsp\mcu\all\resetprg.c
+ src\smc_gen\r_bsp\mcu\all\sbrk.c
+ src\smc_gen\r_bsp\mcu\all\sbrk.h
+
+
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_clocks.c
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_clocks.h
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_info.h
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_init.c
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_init.h
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_interrupts.c
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_interrupts.h
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_locks.h
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_mapped_interrupts.c
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_mapped_interrupts.h
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_mapped_interrupts_private.h
+ src\smc_gen\r_bsp\mcu\rx65n\r_bsp_cpu.h
+ src\smc_gen\r_bsp\mcu\rx65n\r_bsp_locking.h
+ src\smc_gen\r_bsp\mcu\rx65n\vecttbl.c
+ src\smc_gen\r_bsp\mcu\rx65n\vecttbl.h
+
+
+ src\smc_gen\r_bsp\mcu\rx65n\register_access\ccrx\iodefine.h
+
+
+
+
+
+
+ src\smc_gen\r_cmt_rx\r_cmt_rx_if.h
+ src\smc_gen\r_cmt_rx\readme.txt
+
+
+ src\smc_gen\r_cmt_rx\doc\en\r01an1856ej0490-rx-timer.pdf
+
+
+ src\smc_gen\r_cmt_rx\doc\ja\r01an1856jj0490-rx-timer.pdf
+
+
+
+ src\smc_gen\r_cmt_rx\src\r_cmt_rx.c
+
+
+
+ src\smc_gen\r_config\r_bsp_config.h
+ src\smc_gen\r_config\r_bsp_config_readme.txt
+ src\smc_gen\r_config\r_bsp_interrupt_config.h
+ src\smc_gen\r_config\r_cmt_rx_config.h
+ src\smc_gen\r_config\r_ether_rx_config.h
+ src\smc_gen\r_config\r_sys_time_rx_config.h
+ src\smc_gen\r_config\r_t4_driver_rx_config.h
+ src\smc_gen\r_config\r_t4_rx_config.h
+ src\smc_gen\r_config\r_tsip_rx_config.h
+
+
+ src\smc_gen\r_ether_rx\r_ether_rx_if.h
+ src\smc_gen\r_ether_rx\readme.txt
+
+
+ src\smc_gen\r_ether_rx\doc\en\r01an2009ej0121-rx-ether.pdf
+
+
+ src\smc_gen\r_ether_rx\doc\ja\r01an2009jj0121-rx-ether.pdf
+
+
+
+ src\smc_gen\r_ether_rx\ref\r_ether_rx_config_reference.h
+
+
+ src\smc_gen\r_ether_rx\src\r_ether_rx.c
+ src\smc_gen\r_ether_rx\src\r_ether_rx_private.h
+
+ src\smc_gen\r_ether_rx\src\phy\phy.c
+ src\smc_gen\r_ether_rx\src\phy\phy.h
+
+
+
+ src\smc_gen\r_ether_rx\src\targets\rx65n\r_ether_setting_rx65n.c
+
+
+
+
+
+ src\smc_gen\r_pincfg\Pin.c
+ src\smc_gen\r_pincfg\Pin.h
+ src\smc_gen\r_pincfg\r_ether_rx_pinset.c
+ src\smc_gen\r_pincfg\r_ether_rx_pinset.h
+ src\smc_gen\r_pincfg\r_pinset.h
+
+
+ src\smc_gen\r_sys_time_rx\r_sys_time_rx_if.h
+ src\smc_gen\r_sys_time_rx\readme.txt
+
+
+ src\smc_gen\r_sys_time_rx\doc\en\r20an0431ej0101-rx-middle.pdf
+
+
+ src\smc_gen\r_sys_time_rx\doc\ja\r20an0431jj0101-rx-middle.pdf
+
+
+
+ src\smc_gen\r_sys_time_rx\ref\r_sys_time_rx_config_reference.h
+
+
+ src\smc_gen\r_sys_time_rx\src\r_sys_time_rx.c
+ src\smc_gen\r_sys_time_rx\src\r_sys_time_rx_private.h
+
+
+
+ src\smc_gen\r_t4_driver_rx\readme.txt
+
+
+ src\smc_gen\r_t4_driver_rx\doc\en\r20an0311ej0109-rx-t4.pdf
+
+
+ src\smc_gen\r_t4_driver_rx\doc\ja\r20an0311jj0109-rx-t4.pdf
+
+
+
+ src\smc_gen\r_t4_driver_rx\ref\r_t4_driver_rx_config_reference.h
+
+
+ src\smc_gen\r_t4_driver_rx\src\ether_callback.c
+ src\smc_gen\r_t4_driver_rx\src\t4_driver.c
+ src\smc_gen\r_t4_driver_rx\src\timer.c
+ src\smc_gen\r_t4_driver_rx\src\timer.h
+
+
+
+ src\smc_gen\r_t4_rx\readme.txt
+
+
+ src\smc_gen\r_t4_rx\doc\en\r20an0051ej0210-rx-t4.pdf
+ src\smc_gen\r_t4_rx\doc\en\r20uw0031ej0111-t4tiny.pdf
+ src\smc_gen\r_t4_rx\doc\en\r20uw0032ej0109-t4tiny.pdf
+
+
+ src\smc_gen\r_t4_rx\doc\ja\r20an0051jj0210-rx-t4.pdf
+ src\smc_gen\r_t4_rx\doc\ja\r20uw0031jj0111-t4tiny.pdf
+ src\smc_gen\r_t4_rx\doc\ja\r20uw0032jj0109-t4tiny.pdf
+
+
+
+ src\smc_gen\r_t4_rx\lib\r_mw_version.h
+ src\smc_gen\r_t4_rx\lib\r_stdint.h
+ src\smc_gen\r_t4_rx\lib\r_t4_itcpip.h
+
+
+ src\smc_gen\r_t4_rx\ref\r_t4_rx_config_reference.h
+
+
+ src\smc_gen\r_t4_rx\src\config_tcpudp.c
+
+
+
+ src\smc_gen\r_tsip_rx\r_tsip_rx_if.h
+ src\smc_gen\r_tsip_rx\readme.txt
+
+
+ src\smc_gen\r_tsip_rx\doc\en\r20an0548ej0114-rx-tsip-security.pdf
+
+
+ src\smc_gen\r_tsip_rx\doc\ja\r20an0548jj0114-rx-tsip-security.pdf
+
+
+
+ src\smc_gen\r_tsip_rx\ref\r_tsip_rx_config_reference.h
+
+
+
+
+
+ R5F565NEHxFP
+
+
+
+
+ -isa=rxv2
+ -fpu
+ -include="${ProjDirPath}\..\common"
+ -include="${ProjDirPath}\..\..\..\..\..\..\"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx65n"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ -define=DEBUG_CONSOLE,WOLFSSL_USER_SETTINGS
+ -utf8
+ -nomessage
+ -debug
+ -outcode=utf8
+ -optimize=0
+ -nologo
+ -lang=c99
+ -lang=cpp
+ -output=obj=${CONFIGDIR}\${FILELEAF}.obj
+ -obj_path=${CONFIGDIR}
+
+
+ -isa=rxv2
+ -fpu
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ -utf8
+ -debug
+ -nologo
+ -output=${CONFIGDIR}
+
+
+ -output="${ProjName}.abs"
+ -form=absolute
+ -nomessage
+ -vect=_undefined_interrupt_source_isr
+ -list=${ProjName}.map
+ -nooptimize
+ -rom=D=R,D_1=R_1,D_2=R_2
+ -cpu=RAM=00000000-0003ffff,FIX=00080000-00083fff,FIX=00086000-00087fff,FIX=00088000-0009ffff,FIX=000a0000-000a3fff,RAM=000a4000-000a5fff,FIX=000a6000-000bffff,FIX=000c0000-000dffff,FIX=000e0000-000fffff,ROM=00100000-00107fff,FIX=007fc000-007fcfff,FIX=007fe000-007fffff,RAM=00800000-0085ffff,RAM=fe7f5d00-fe7f5d7f,RAM=fe7f7d70-fe7f7d9f,ROM=ffe00000-ffffffff
+ -nologo
+ -library="${ProjDirPath}/../${ProjName}/src/smc_gen/r_t4_rx/lib/ccrx/T4_Library_ether_ccrx_rxv1_little_debug.lib"
+ -library="${ProjDirPath}/../${ProjName}/src/smc_gen/r_tsip_rx/lib/ccrx/r_tsip_rx65n_little.lib"
+ -library="${ProjDirPath}/../wolfssl/Debug/wolfssl.lib"
+ -start=SU,SI,B_1,R_1,B_2,R_2,B,R/04,B_ETHERNET_BUFFERS_1,B_RX_DESC_1,B_TX_DESC_1/020000,C_1,C_2,C,C$*,D*,W*,L,P*/0FFE00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC
+ Auto
+
+
+ -isa=rxv2
+ -fpu
+ -lang=c99
+ -head=runtime,ctype,stdio,stdlib,string,new
+ -output="${ProjName}.lib"
+ -nologo
+ BuildOptionChanged
+
+
+ HardwareDebug\benchmark.obj
+ HardwareDebug\key_data.obj
+ HardwareDebug\r_cg_hardware_setup.obj
+ HardwareDebug\r_smc_cgc.obj
+ HardwareDebug\r_smc_cgc_user.obj
+ HardwareDebug\r_smc_interrupt.obj
+ HardwareDebug\hwsetup.obj
+ HardwareDebug\dbsct.obj
+ HardwareDebug\lowlvl.obj
+ HardwareDebug\lowsrc.obj
+ HardwareDebug\mcu_locks.obj
+ HardwareDebug\r_bsp_common.obj
+ HardwareDebug\r_bsp_cpu.obj
+ HardwareDebug\r_bsp_interrupts.obj
+ HardwareDebug\r_bsp_locking.obj
+ HardwareDebug\r_bsp_mcu_startup.obj
+ HardwareDebug\r_bsp_software_interrupt.obj
+ HardwareDebug\r_rx_intrinsic_functions.obj
+ HardwareDebug\resetprg.obj
+ HardwareDebug\sbrk.obj
+ HardwareDebug\mcu_clocks.obj
+ HardwareDebug\mcu_init.obj
+ HardwareDebug\mcu_interrupts.obj
+ HardwareDebug\mcu_mapped_interrupts.obj
+ HardwareDebug\vecttbl.obj
+ HardwareDebug\r_cmt_rx.obj
+ HardwareDebug\phy.obj
+ HardwareDebug\r_ether_rx.obj
+ HardwareDebug\r_ether_setting_rx65n.obj
+ HardwareDebug\Pin.obj
+ HardwareDebug\r_ether_rx_pinset.obj
+ HardwareDebug\r_sys_time_rx.obj
+ HardwareDebug\ether_callback.obj
+ HardwareDebug\t4_driver.obj
+ HardwareDebug\timer.obj
+ HardwareDebug\config_tcpudp.obj
+ HardwareDebug\test.obj
+ HardwareDebug\test_main.obj
+ HardwareDebug\wolf_client.obj
+ HardwareDebug\wolf_server.obj
+ HardwareDebug\wolfssl_dummy.obj
+ HardwareDebug\test.lib
+
+
+ "${ProjDirPath}\..\common"
+ "${ProjDirPath}\..\..\..\..\..\..\"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx65n"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ DEBUG_CONSOLE
+ WOLFSSL_USER_SETTINGS
+
+
+
+
+
+ -isa=rxv2
+ -fpu
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx231"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx66t"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx65n"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ -define=DEBUG_CONSOLE
+ -utf8
+ -nomessage
+ -debug
+ -outcode=utf8
+ -nologo
+ -lang=c99
+ -lang=cpp
+ -output=obj=${CONFIGDIR}\${FILELEAF}.obj
+ -obj_path=${CONFIGDIR}
+
+
+ -isa=rxv2
+ -fpu
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ -utf8
+ -debug
+ -nologo
+ -output=${CONFIGDIR}
+
+
+ -output="${ProjName}.abs"
+ -form=absolute
+ -nomessage
+ -vect=_undefined_interrupt_source_isr
+ -list=${ProjName}.map
+ -nooptimize
+ -rom=D=R,D_1=R_1,D_2=R_2
+ -cpu=RAM=00000000-0003ffff,FIX=00080000-00083fff,FIX=00086000-00087fff,FIX=00088000-0009ffff,FIX=000a0000-000a3fff,RAM=000a4000-000a5fff,FIX=000a6000-000bffff,FIX=000c0000-000dffff,FIX=000e0000-000fffff,ROM=00100000-00107fff,FIX=007fc000-007fcfff,FIX=007fe000-007fffff,RAM=00800000-0085ffff,RAM=fe7f5d00-fe7f5d7f,RAM=fe7f7d70-fe7f7d9f,ROM=ffe00000-ffffffff
+ -nologo
+ -library="${ProjDirPath}/../${ProjName}/src/smc_gen/r_t4_rx/lib/T4_Library_rxv1_ether_little.lib"
+ -start=SU,SI,B_1,R_1,B_2,R_2,B,R/04,C_1,C_2,C,C$*,D*,W*,L,P*/0FFE00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC,B_ETHERNET_BUFFERS_1,B_RX_DESC_1,B_TX_DESC_1/00010000
+ Auto
+
+
+ -isa=rxv2
+ -fpu
+ -lang=c99
+ -head=runtime,stdio,stdlib,string,new
+ -output="${ProjName}.lib"
+ -nologo
+ BuildOptionChanged
+
+
+ Debug\benchmark.obj
+ Debug\key_data.obj
+ Debug\r_cg_hardware_setup.obj
+ Debug\r_smc_cgc.obj
+ Debug\r_smc_cgc_user.obj
+ Debug\r_smc_interrupt.obj
+ Debug\hwsetup.obj
+ Debug\dbsct.obj
+ Debug\lowlvl.obj
+ Debug\lowsrc.obj
+ Debug\mcu_locks.obj
+ Debug\r_bsp_common.obj
+ Debug\r_bsp_cpu.obj
+ Debug\r_bsp_interrupts.obj
+ Debug\r_bsp_locking.obj
+ Debug\r_bsp_mcu_startup.obj
+ Debug\r_bsp_software_interrupt.obj
+ Debug\r_rx_intrinsic_functions.obj
+ Debug\resetprg.obj
+ Debug\sbrk.obj
+ Debug\mcu_clocks.obj
+ Debug\mcu_init.obj
+ Debug\mcu_interrupts.obj
+ Debug\mcu_mapped_interrupts.obj
+ Debug\vecttbl.obj
+ Debug\r_cmt_rx.obj
+ Debug\phy.obj
+ Debug\r_ether_rx.obj
+ Debug\r_ether_setting_rx65n.obj
+ Debug\Pin.obj
+ Debug\r_ether_rx_pinset.obj
+ Debug\r_sys_time_rx.obj
+ Debug\ether_callback.obj
+ Debug\t4_driver.obj
+ Debug\timer.obj
+ Debug\config_tcpudp.obj
+ Debug\test.obj
+ Debug\test_main.obj
+ Debug\wolf_client.obj
+ Debug\wolf_server.obj
+ Debug\wolfssl_dummy.obj
+ Debug\test.lib
+
+
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx231"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx66t"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx65n"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ DEBUG_CONSOLE
+
+
+
+
+
diff --git a/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/test_HardwareDebug.launch b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/test_HardwareDebug.launch
new file mode 100644
index 000000000..ebc09c918
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/test_HardwareDebug.launch
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/wolfssl/.cproject b/IDE/Renesas/e2studio/RX65N/GR-ROSE/wolfssl/.cproject
similarity index 96%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/wolfssl/.cproject
rename to IDE/Renesas/e2studio/RX65N/GR-ROSE/wolfssl/.cproject
index 99cd9a27b..84b50cc25 100644
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/wolfssl/.cproject
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/wolfssl/.cproject
@@ -1,107 +1,108 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/RX65N/GR-ROSE/wolfssl/.project b/IDE/Renesas/e2studio/RX65N/GR-ROSE/wolfssl/.project
new file mode 100644
index 000000000..062ba096d
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/wolfssl/.project
@@ -0,0 +1,403 @@
+
+
+ wolfssl
+
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ clean,full,incremental,
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+
+
+
+ src/crl.c
+ 1
+ PARENT-6-PROJECT_LOC/src/crl.c
+
+
+ src/internal.c
+ 1
+ PARENT-6-PROJECT_LOC/src/internal.c
+
+
+ src/keys.c
+ 1
+ PARENT-6-PROJECT_LOC/src/keys.c
+
+
+ src/ocsp.c
+ 1
+ PARENT-6-PROJECT_LOC/src/ocsp.c
+
+
+ src/sniffer.c
+ 1
+ PARENT-6-PROJECT_LOC/src/sniffer.c
+
+
+ src/ssl.c
+ 1
+ PARENT-6-PROJECT_LOC/src/ssl.c
+
+
+ src/tls.c
+ 1
+ PARENT-6-PROJECT_LOC/src/tls.c
+
+
+ src/tls13.c
+ 1
+ PARENT-6-PROJECT_LOC/src/tls13.c
+
+
+ src/wolfio.c
+ 1
+ PARENT-6-PROJECT_LOC/src/wolfio.c
+
+
+ wolfcrypt/port/renesas_common.c
+ 1
+ F:/Work/1_Renesas/tsip113_integrate/wolfssl/wolfcrypt/src/port/Renesas/renesas_common.c
+
+
+ wolfcrypt/port/renesas_tsip_aes.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c
+
+
+ wolfcrypt/port/renesas_tsip_sha.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c
+
+
+ wolfcrypt/port/renesas_tsip_util.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_util.c
+
+
+ wolfcrypt/src/aes.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/aes.c
+
+
+ wolfcrypt/src/arc4.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/arc4.c
+
+
+ wolfcrypt/src/asm.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/asm.c
+
+
+ wolfcrypt/src/asn.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/asn.c
+
+
+ wolfcrypt/src/blake2b.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/blake2b.c
+
+
+ wolfcrypt/src/camellia.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/camellia.c
+
+
+ wolfcrypt/src/chacha.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/chacha.c
+
+
+ wolfcrypt/src/chacha20_poly1305.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/chacha20_poly1305.c
+
+
+ wolfcrypt/src/cmac.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/cmac.c
+
+
+ wolfcrypt/src/coding.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/coding.c
+
+
+ wolfcrypt/src/compress.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/compress.c
+
+
+ wolfcrypt/src/cpuid.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/cpuid.c
+
+
+ wolfcrypt/src/cryptocb.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/cryptocb.c
+
+
+ wolfcrypt/src/curve25519.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/curve25519.c
+
+
+ wolfcrypt/src/des3.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/des3.c
+
+
+ wolfcrypt/src/dh.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/dh.c
+
+
+ wolfcrypt/src/dsa.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/dsa.c
+
+
+ wolfcrypt/src/ecc.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ecc.c
+
+
+ wolfcrypt/src/ecc_fp.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ecc_fp.c
+
+
+ wolfcrypt/src/ed25519.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ed25519.c
+
+
+ wolfcrypt/src/error.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/error.c
+
+
+ wolfcrypt/src/fe_low_mem.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/fe_low_mem.c
+
+
+ wolfcrypt/src/fe_operations.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/fe_operations.c
+
+
+ wolfcrypt/src/ge_low_mem.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ge_low_mem.c
+
+
+ wolfcrypt/src/ge_operations.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ge_operations.c
+
+
+ wolfcrypt/src/hash.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/hash.c
+
+
+ wolfcrypt/src/hc128.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/hc128.c
+
+
+ wolfcrypt/src/hmac.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/hmac.c
+
+
+ wolfcrypt/src/idea.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/idea.c
+
+
+ wolfcrypt/src/include.am
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/include.am
+
+
+ wolfcrypt/src/integer.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/integer.c
+
+
+ wolfcrypt/src/kdf.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/kdf.c
+
+
+ wolfcrypt/src/logging.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/logging.c
+
+
+ wolfcrypt/src/md2.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/md2.c
+
+
+ wolfcrypt/src/md4.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/md4.c
+
+
+ wolfcrypt/src/md5.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/md5.c
+
+
+ wolfcrypt/src/memory.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/memory.c
+
+
+ wolfcrypt/src/pkcs12.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/pkcs12.c
+
+
+ wolfcrypt/src/pkcs7.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/pkcs7.c
+
+
+ wolfcrypt/src/poly1305.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/poly1305.c
+
+
+ wolfcrypt/src/pwdbased.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/pwdbased.c
+
+
+ wolfcrypt/src/rabbit.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/rabbit.c
+
+
+ wolfcrypt/src/random.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/random.c
+
+
+ wolfcrypt/src/ripemd.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ripemd.c
+
+
+ wolfcrypt/src/rsa.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/rsa.c
+
+
+ wolfcrypt/src/sha.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sha.c
+
+
+ wolfcrypt/src/sha256.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sha256.c
+
+
+ wolfcrypt/src/sha3.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sha3.c
+
+
+ wolfcrypt/src/sha512.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sha512.c
+
+
+ wolfcrypt/src/signature.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/signature.c
+
+
+ wolfcrypt/src/sp_arm32.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_arm32.c
+
+
+ wolfcrypt/src/sp_arm64.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_arm64.c
+
+
+ wolfcrypt/src/sp_c32.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_c32.c
+
+
+ wolfcrypt/src/sp_c64.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_c64.c
+
+
+ wolfcrypt/src/sp_int.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_int.c
+
+
+ wolfcrypt/src/sp_x86_64.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_x86_64.c
+
+
+ wolfcrypt/src/srp.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/srp.c
+
+
+ wolfcrypt/src/tfm.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/tfm.c
+
+
+ wolfcrypt/src/wc_encrypt.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/wc_encrypt.c
+
+
+ wolfcrypt/src/wc_port.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/wc_port.c
+
+
+ wolfcrypt/src/wolfevent.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/wolfevent.c
+
+
+ wolfcrypt/src/wolfmath.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/wolfmath.c
+
+
+
diff --git a/IDE/Renesas/e2studio/RX65N/GR-ROSE/wolfssl/wolfssl.rcpc b/IDE/Renesas/e2studio/RX65N/GR-ROSE/wolfssl/wolfssl.rcpc
new file mode 100644
index 000000000..27734f4da
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/GR-ROSE/wolfssl/wolfssl.rcpc
@@ -0,0 +1,220 @@
+
+
+
+
+ ${
+ }
+
+
+
+
+ ..\..\..\..\..\..\src\crl.c
+ ..\..\..\..\..\..\src\internal.c
+ ..\..\..\..\..\..\src\keys.c
+ ..\..\..\..\..\..\src\ocsp.c
+ ..\..\..\..\..\..\src\sniffer.c
+ ..\..\..\..\..\..\src\ssl.c
+ ..\..\..\..\..\..\src\tls.c
+ ..\..\..\..\..\..\src\tls13.c
+ ..\..\..\..\..\..\src\wolfio.c
+
+
+
+ ..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_common.c
+ ..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_aes.c
+ ..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_sha.c
+ ..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_util.c
+
+
+ ..\..\..\..\..\..\wolfcrypt\src\aes.c
+ ..\..\..\..\..\..\wolfcrypt\src\arc4.c
+ ..\..\..\..\..\..\wolfcrypt\src\asm.c
+ ..\..\..\..\..\..\wolfcrypt\src\asn.c
+ ..\..\..\..\..\..\wolfcrypt\src\blake2b.c
+ ..\..\..\..\..\..\wolfcrypt\src\camellia.c
+ ..\..\..\..\..\..\wolfcrypt\src\chacha.c
+ ..\..\..\..\..\..\wolfcrypt\src\chacha20_poly1305.c
+ ..\..\..\..\..\..\wolfcrypt\src\cmac.c
+ ..\..\..\..\..\..\wolfcrypt\src\coding.c
+ ..\..\..\..\..\..\wolfcrypt\src\compress.c
+ ..\..\..\..\..\..\wolfcrypt\src\cpuid.c
+ ..\..\..\..\..\..\wolfcrypt\src\cryptocb.c
+ ..\..\..\..\..\..\wolfcrypt\src\curve25519.c
+ ..\..\..\..\..\..\wolfcrypt\src\des3.c
+ ..\..\..\..\..\..\wolfcrypt\src\dh.c
+ ..\..\..\..\..\..\wolfcrypt\src\dsa.c
+ ..\..\..\..\..\..\wolfcrypt\src\ecc.c
+ ..\..\..\..\..\..\wolfcrypt\src\ecc_fp.c
+ ..\..\..\..\..\..\wolfcrypt\src\ed25519.c
+ ..\..\..\..\..\..\wolfcrypt\src\error.c
+ ..\..\..\..\..\..\wolfcrypt\src\fe_low_mem.c
+ ..\..\..\..\..\..\wolfcrypt\src\fe_operations.c
+ ..\..\..\..\..\..\wolfcrypt\src\ge_low_mem.c
+ ..\..\..\..\..\..\wolfcrypt\src\ge_operations.c
+ ..\..\..\..\..\..\wolfcrypt\src\hash.c
+ ..\..\..\..\..\..\wolfcrypt\src\hc128.c
+ ..\..\..\..\..\..\wolfcrypt\src\hmac.c
+ ..\..\..\..\..\..\wolfcrypt\src\idea.c
+ ..\..\..\..\..\..\wolfcrypt\src\integer.c
+ ..\..\..\..\..\..\wolfcrypt\src\kdf.c
+ ..\..\..\..\..\..\wolfcrypt\src\logging.c
+ ..\..\..\..\..\..\wolfcrypt\src\md2.c
+ ..\..\..\..\..\..\wolfcrypt\src\md4.c
+ ..\..\..\..\..\..\wolfcrypt\src\md5.c
+ ..\..\..\..\..\..\wolfcrypt\src\memory.c
+ ..\..\..\..\..\..\wolfcrypt\src\pkcs12.c
+ ..\..\..\..\..\..\wolfcrypt\src\pkcs7.c
+ ..\..\..\..\..\..\wolfcrypt\src\poly1305.c
+ ..\..\..\..\..\..\wolfcrypt\src\pwdbased.c
+ ..\..\..\..\..\..\wolfcrypt\src\rabbit.c
+ ..\..\..\..\..\..\wolfcrypt\src\random.c
+ ..\..\..\..\..\..\wolfcrypt\src\ripemd.c
+ ..\..\..\..\..\..\wolfcrypt\src\rsa.c
+ ..\..\..\..\..\..\wolfcrypt\src\sha.c
+ ..\..\..\..\..\..\wolfcrypt\src\sha256.c
+ ..\..\..\..\..\..\wolfcrypt\src\sha3.c
+ ..\..\..\..\..\..\wolfcrypt\src\sha512.c
+ ..\..\..\..\..\..\wolfcrypt\src\signature.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_arm32.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_arm64.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_c32.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_c64.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_int.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_x86_64.c
+ ..\..\..\..\..\..\wolfcrypt\src\srp.c
+ ..\..\..\..\..\..\wolfcrypt\src\tfm.c
+ ..\..\..\..\..\..\wolfcrypt\src\wc_encrypt.c
+ ..\..\..\..\..\..\wolfcrypt\src\wc_port.c
+ ..\..\..\..\..\..\wolfcrypt\src\wolfevent.c
+ ..\..\..\..\..\..\wolfcrypt\src\wolfmath.c
+
+
+
+ R5F571MLCxFC
+
+
+
+
+ -isa=rxv2
+ -include="${ProjDirPath}\..\common"
+ -include="${ProjDirPath}\\..\..\..\..\..\..\"
+ -include="${ProjDirPath}\..\test\src\smc_gen\"
+ -include="${ProjDirPath}\..\test\src\smc_gen\r_bsp"
+ -include="${ProjDirPath}\..\test\src\smc_gen\r_config"
+ -include="${ProjDirPath}\..\test\src\smc_gen\r_tsip_rx"
+ -define=WOLFSSL_USER_SETTINGS
+ -nomessage
+ -debug
+ -optimize=0
+ -nologo
+ -lang=c99
+ -lang=cpp
+ -output=obj=${CONFIGDIR}\${FILELEAF}.obj
+ -obj_path=${CONFIGDIR}
+
+
+ -isa=rxv2
+ -debug
+ -nologo
+ -output=${CONFIGDIR}
+
+
+ -output="${ProjName}.lib"
+ -form=library=u
+ -nomessage
+ -list=${ProjName}.lbp
+ -nologo
+ Auto
+
+
+ None
+
+
+ Debug\crl.obj
+ Debug\internal.obj
+ Debug\keys.obj
+ Debug\ocsp.obj
+ Debug\sniffer.obj
+ Debug\ssl.obj
+ Debug\tls.obj
+ Debug\tls13.obj
+ Debug\wolfio.obj
+ Debug\renesas_common.obj
+ Debug\renesas_tsip_aes.obj
+ Debug\renesas_tsip_sha.obj
+ Debug\renesas_tsip_util.obj
+ Debug\aes.obj
+ Debug\arc4.obj
+ Debug\asm.obj
+ Debug\asn.obj
+ Debug\blake2b.obj
+ Debug\camellia.obj
+ Debug\chacha.obj
+ Debug\chacha20_poly1305.obj
+ Debug\cmac.obj
+ Debug\coding.obj
+ Debug\compress.obj
+ Debug\cpuid.obj
+ Debug\cryptocb.obj
+ Debug\curve25519.obj
+ Debug\des3.obj
+ Debug\dh.obj
+ Debug\dsa.obj
+ Debug\ecc.obj
+ Debug\ecc_fp.obj
+ Debug\ed25519.obj
+ Debug\error.obj
+ Debug\fe_low_mem.obj
+ Debug\fe_operations.obj
+ Debug\ge_low_mem.obj
+ Debug\ge_operations.obj
+ Debug\hash.obj
+ Debug\hc128.obj
+ Debug\hmac.obj
+ Debug\idea.obj
+ Debug\integer.obj
+ Debug\kdf.obj
+ Debug\logging.obj
+ Debug\md2.obj
+ Debug\md4.obj
+ Debug\md5.obj
+ Debug\memory.obj
+ Debug\pkcs12.obj
+ Debug\pkcs7.obj
+ Debug\poly1305.obj
+ Debug\pwdbased.obj
+ Debug\rabbit.obj
+ Debug\random.obj
+ Debug\ripemd.obj
+ Debug\rsa.obj
+ Debug\sha.obj
+ Debug\sha256.obj
+ Debug\sha3.obj
+ Debug\sha512.obj
+ Debug\signature.obj
+ Debug\sp_arm32.obj
+ Debug\sp_arm64.obj
+ Debug\sp_c32.obj
+ Debug\sp_c64.obj
+ Debug\sp_int.obj
+ Debug\sp_x86_64.obj
+ Debug\srp.obj
+ Debug\tfm.obj
+ Debug\wc_encrypt.obj
+ Debug\wc_port.obj
+ Debug\wolfevent.obj
+ Debug\wolfmath.obj
+
+
+ "${ProjDirPath}\..\common"
+ "${ProjDirPath}\\..\..\..\..\..\..\"
+ "${ProjDirPath}\..\test\src\smc_gen\"
+ "${ProjDirPath}\..\test\src\smc_gen\r_bsp"
+ "${ProjDirPath}\..\test\src\smc_gen\r_config"
+ "${ProjDirPath}\..\test\src\smc_gen\r_tsip_rx"
+ WOLFSSL_USER_SETTINGS
+
+
+
+
+
diff --git a/IDE/Renesas/e2studio/RX65N/RSK/README_EN.md b/IDE/Renesas/e2studio/RX65N/RSK/README_EN.md
new file mode 100644
index 000000000..8bce2d35a
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/RSK/README_EN.md
@@ -0,0 +1,243 @@
+wolfSSL sample application project for Renesas RSK+RX65N-2MB evaluation board
+======
+
+
+
+## 1. Overview
+-----
+
+We provide a sample program for evaluating wolfSSL targeting the Renesas RSK + RX65N-2MB evaluation board. The sample program runs in a bare metal environment that does not use a real-time OS and uses e2 studio as an IDE. This document describes the procedure from build to execution of the sample program.
+
+The sample provided is a single application that can evaluate the following three functions:
+
+- CryptoTest: A program that automatically tests various cryptographic operation functions
+- Benchmark: A program that measures the execution speed of various cryptographic operations
+- TlsClient: A program that performs TLS communication with the opposite TLS server application
+
+
+Since the H/W settings and S/W settings for operating the evaluation board have already been prepared, the minimum settings are required to operate the sample application. In addition, the RootCA certificate and server-side certificate required for TLS communication have already been set for sample use only.
+
+The following sections will walk you through the steps leading up to running the sample application.
+
+
+## 2. Target H/W, components and libraries
+-----
+
+This sample program uses the following hardware and software libraries. If a new version of the software component is available at the time of use, please update it as appropriate.
+
+|item|name & version|
+|:--|:--|
+|Board|Renesas Starter Kit+ for RX65N-2MB|
+|Device|R5F565NEHxFC|
+|IDE| Renesas e2Studio Version:2021-10 |
+|Emulator| E1, E2 Emulator Lite |
+|Toolchain|CCRX v3.03.00|
+|TSIP| TSIP v1.14|
+
+
+The project of this sample program has a configuration file that uses the following FIT components.
+However, the FIT components themselves are not included in the distribution of this sample application. You need to download it by operating in the IDE. Some FIT components (TSIPs) cannot be downloaded directly from within the IDE and may need to be downloaded separately from the Renesas download site.
+
+
+|FIT component|version|name|
+|:--|:--|:--|
+|8bit timer|1.9.0|Config_TMR0|
+|Board Support Packages|6.21|r_bsp|
+|CMT driver|4.90|r_cmt_rx|
+|Ethernet Driver|1.21|r_ether_rx|1.21|r_ether_rx|
+|Generic system timer for RX MCUs|1.01|r_sys_time_rx|
+|TCP/IP protocol stack[M3S-T4-Tiny] - RX Ethernet Driver Interface|1.09|r_t4_driver_rx|
+|TCP/IP protocol stack[M3S-T4-Tiny] for Renesas MCUs|2.10|r_t4_rx|
+|TSIP(Trusted Secure IP) driver|1.14|r_tsip_rx|
+
+
+Note) As of December 2021, TIPS v1.13 does not seem to be able to be added as a FIT component by adding a component in the Smart Configurator Perspective. Add it manually along the method described later.
+
+
+## 3. Importing sample application project into e2Studio
+----
+
+There is no need to create a new sample program. Since the project file is already prepared, please import the project from the IDE by following the steps below.
+
++ e2studio "File" menu> "Open project from file system ..."> "Directory (R) ..." Click the import source button and select the folder from which the project will be imported. Select the folder (Renesas/e2studio/\/\/)) where this README file exists.
++ Four projects that can be imported are listed, but check only the three projects "smc", "test" and "wolfssl" and click the "Finish" button.
+
+You should see the **smc**, **test**, and **wolfssl** 3 projects you imported into the project explorer.
+
+
+## 4. FIT module download and smart configurator file generation
+----
+
+You will need to get the required FIT modules yourself. Follow the steps below to get them.
+
+1. Open the smc project in Project Explorer and double-click the **smc.scfg** file to open the Smart Configurator Perspective.
+
+2. Select the "Components" tab on the software component settings pane. Then click the "Add Component" button at the top right of the pane. The software component selection dialog will pop up. Click "Download the latest version of FIT driver and middleware" at the bottom of the dialog to get the modules. You can check the dowmload destination folder by pressing "Basic settings...".
+
+3. The latest version of the TSIP component may not be automatically obtained due to the delay in Renesas' support by the method in step 2 above. In that case, you can download it manually from the Renesas website. Unzip the downloaded component and store the files contained in the FIT Modules folder in the download destination folder of step 2.
+
+4. Select the required FIT components shown from the list and press the "Finish" button. Repeat this operation until you have the required FIT components.
+
+5. Select the Components tab on the Software Component Settings pane and select the r_t4_rx component. In the settings pane on the right, specify the IP address of this board as the value of the "# IP address for ch0, when DHCP disable." Property (e.g. 192.168.1.9).
+
+6. Press the "Generate Code" button at the top right of the software component settings pane to have the smart configurator generate the source files. A src/smc_gen folder will be created under the smc project to store source files, libraries, etc.
+
+
+## 5. Adding smc_gen files to the test project
+----
+
+The test project is a sample application project. When you open the test project in the project explorer, there is a src folder, which contains the source files of the sample application. Add the source files by copying and pasting the smc_gen folder generated in the step5, directly under this src folder.
+
+Make sure you have a folder hierarchy like this:
+
+```
+/test/src/smc_gen
+```
+
+
+## 6. Select the behavior of the test application
+----
+
+The test project is a single sample application, but you can specify to perform one of the following by switching the settings:
+
+- CryptoTest: A program that automatically tests various encryption operation functions
+- Benchmark: A program that measures the execution speed of various cryptographic operations
+- TlsClient: A program that performs TLS communication with the opposite TLS server application
+
+Open the /test/src/wolfssl_demo.h file and enable one of the following definitions:
+
+- #define CRYPT_TEST
+- #define BENCHMARK
+- #define TLS_CLIENT
+
+Then build the test application.
+
+
+
+## 7. Build and run the test application
+-----
+
+Now that the test application is ready to build.
+
+1. Build the wolfssl project on the project explorer, then the test project.
+
+2. After a successful build, connect the target board to the emulator and supply external power.
+
+3. Select "Run" menu> "Debug" to open the debug perspective.
+
+4. The test application outputs the operating status to the standard output. Keep the "Renesas Debug Virtual Console" open for viewing this standard output.
+
+5. Press the run button to run the test application.
+
+6. CryptoTest, Benchmark or TLS_Client After displaying the execution result according to the selected behavior, it enters an infinite loop, so if you think that the output has stopped, stop debugging.
+
+
+## 8. Running test application as TLS_Client
+-----
+
+### 8.1 Generate a server application
+
+To operate as TLS_Client, an opposite application for TLS communication is required. A wolfSSL package provides a server sample application that you can use for this purpose. This program is generated by building wolfssl. You can build wolfSSL on Linux (including MacOS and WSL) with gcc installed or build using Visual Studio. The following introduces the build on WSL.
+
+
+```
+$ cd
+$ ./autogen.sh
+$ ./configure CFLAGS="-DWOLFSSL_STATIC_RSA -DHAVEAES_CBC"
+$ make
+```
+
+
+
+With the above build, /examples/server/server
+Is generated. This executable acts as a TLS server application. If you execute it with the following options, it will be in the listening state for the connection from TLS_Client.
+
+
+```
+$ examples/server/server -b -d -i
+```
+
+
+For the test application, specify the IP address assigned to the server application.
+
+Open wolf_client.c to specify ip address of the server in "#define SIMPLE_TLSSEVER_IP" like as:
+
+
+```
+-- /test/src/wolf_client.c --
+
+...
+#define SIMPLE_TLSSEVER_IP 192.168.53.9
+...
+```
+
+Save the file and rebuild the test application. When you run the test application, it makes a TLS connection with the opposite application, then exchanges a simple string and displays the following on the standard output.
+
+
+```
+cipher : ECDHE-RSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : AES256-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+```
+
+
+### 8.2 Change server certificate (change authentication method)
+
+The above is an execution example when the server certificate presented by the server application contains the RSA public key (RSA authentication). TSIP can also handle cases where the server certificate contains an ECC public key (ECDSA authentication).
+
+
+If you want to use a cipher suite that includes ECDSA, you will need to change the settings of the test application and rebuild. Open common/ user_settings.h, enable the USE_ECC_CERT definition and rebuild.
+
+
+```
+-- /common/user_settings.h --
+
+#define USE_ECC_CERT
+```
+
+This definition causes the test application to use a RootCA certificate that can validate the server certificate containing the ECC public key presented by the server.
+
+
+In addition, the opposite server application also needs to specify the server certificate and private key file containing the ECC public key as an option, and then execute it as shown below.
+
+
+```
+$ ./examples/server/server -b -d -i -c ./certs/server-ecc.pem -k ./certs/ecc-key.pem
+```
+
+The following is displayed as the execution result.
+
+
+```
+cipher : ECDHE-ECDSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-ECDSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+```
+
+
+## 9. What you need to do to use the RootCA certificate prepared by the user
+----
+
+In this sample program, the RootCA certificate required to operate as TLS_Client and the server certificate used by the sample TLS server application are certificates that can be used only for evaluation.
+If you want to use it for purposes beyond functional evaluation, you need to prepare the RootCA certificate yourself. with this,
+ 1. Provisioning key
+ 2. RSA key pair required for RootCA certificate validation
+ 3. The signature generated by the RootCA certificate with the private key in 2 above.
+
+will become necessary. Please refer to the manual provided by Renesas for how to generate them.
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/RX65N/RSK/README_JP.md b/IDE/Renesas/e2studio/RX65N/RSK/README_JP.md
new file mode 100644
index 000000000..fb6ba922c
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/RSK/README_JP.md
@@ -0,0 +1,250 @@
+Renesas RSK+RX65N-2MB 評価ボード用 wolfSSLサンプルプロジェクト
+======
+
+
+
+## 1. 概要
+-----
+
+Renesas社製 RSK+RX65N-2MB 評価ボードをターゲットとしてwolfSSLを評価するためのサンプルプログラムを提供します。サンプルプログラムはリアルタイムOSを使わないベアメタル環境で動作し、IDEとしてe2 studioを使用するものです。本ドキュメントではサンプルプログラムのビルドから実行までの手順を説明します。
+
+提供するサンプルプログラムは次の3機能を評価できる単一のアプリケーションです:
+
+- CryptoTest: 各種暗号化オペレーション機能を自動テストするプログラム
+- Benchmark: 各種暗号化オペレーションの実行速度を測定するプログラム
+- TlsClient: 対向するTLSサーバーアプリケーションとTLS通信を行うプログラム
+
+評価ボードを動作させる為のH/W設定、S/W設定は既に用意していますから、サンプルプロジェクトの動作までは最少の設定で済むようになっています。また、TLS通信において必要となる、RootCA証明書、サーバー側証明書もサンプル使用に限定したものが既に設定済みです。
+
+以降のセクションはサンプルアプリケーションの実行までのステップを順に説明していきます。
+
+
+
+## 2. ターゲットとしているH/W、コンポーネント、ライブラリ
+-----
+
+このサンプルプログラムでは以下のハードウエアやソソフトウエアライブラリを使用しています。皆さんがご利用時にバージョンの新しいソフトウエアコンポーネントが利用可能であれば適宜更新の上ご利用ください。
+
+
+|要素|名称/バージョン|
+|:--|:--|
+|評価ボード|Renesas Starter Kit+ for RX65N-2MB|
+|Device|R5F565NEHxFC|
+|IDE| Renesas e2Studio Version:2021-10 |
+|エミュレーター| E1, E2エミュレーターLite |
+|Toolchain|CCRX v3.03.00|
+|TSIP| TSIP v1.14|
+
+
+本サンプルプログラムのプロジェクトには以下のFITコンポーネントを使用する設定ファイルが用意されています。
+しかし、FITコンポーネント群そのものは本サンプルアプリケーションの配布物としては含まれていません。皆さん自身でIDE内の操作によってダウンロードしていただく必要があります。一部のFITコンポーネント(TSIP)はIDE内から直接ダウンロードできず、Renesas社のダウンロードサイトから別途ダウンロードが必要なものがあります。
+
+
+
+
+|FITコンポーネント|バージョン|略称|
+|:--|:--|:--|
+|8ビットタイマー|1.9.0|Config_TMR0|
+|Board Support Packages|6.21|r_bsp|
+|CMT driver|4.90|r_cmt_rx|
+|Ethernet Driver|1.21|r_ether_rx|1.21|r_ether_rx|
+|Generic system timer for RX MCUs|1.01|r_sys_time_rx|
+|TCP/IP protocol stack[M3S-T4-Tiny] - RX Ethernet Driver Interface|1.09|r_t4_driver_rx|
+|TCP/IP protocol stack[M3S-T4-Tiny] for Renesas MCUs|2.10|r_t4_rx|
+|TSIP(Trusted Secure IP) driver|1.14|r_tsip_rx|
+
+(注意)2021年12月現在、TIPSv1.14はFITコンポーネントとしてスマートコンフィギュレータパースペクティブのコンポーネントの追加操作では追加できないようです。後ほど説明する手動での追加方法を使って追加してください。
+
+
+
+
+## 3. サンプルプログラムプロジェクトのe2Studioへのインポート
+----
+
+サンプルプログラムは新規作成する必要はありません。すでにプロジェクトファイルが用意されていますからIDEから以下の手順でプロジェクトをインポートしてください。
+
+
++ 1.e2studioの"ファイル"メニュー > "ファイル・システムからプロジェクトを開く..." > "ディレクトリ(R)..."インポート元ボタンを押して、プロジェクトのインポート元となるフォルダーを選択します。本READMEファイルが存在するフォルダ(Renesas/e2studio/\/\/))を選択してください。
+
++ インポートできるプロジェクトが4つリストアップされますが、"smc", "test" と"wolfssl"の3プロジェクトにのみチェックを入れて”終了”ボタンを押してください。
+
+プロジェクト・エクスプローラーにインポートしたsmc,test,wolfsslの3プロジェクトが表示されるはずです。
+
+
+## 4. FITモジュールの取得とスマートコンフィギュレータによるファイル生成
+----
+
+FITモジュールは皆さん自身で取得していただく必要があります。以下の手順で取得してください。
+
+
+
+1. プロジェクト・エクスプローラー上でsmcプロジェクトを開き**smc.scfg**ファイルをダブルクリックして、スマートコンフィギュレータパースペクティブを開きます。
+
+2. ソフトウエアコンポーネント設定画面の"コンポーネント"タブを選択 > 画面右上の"コンポーネントの追加" ボタンを押して下さい。ソフトウエアコンポーネントの選択ダイアログが表示されます。ここで、画面下部の"最新版のFITドライバとミドルウエアをダウンロードする"を押して、モジュール群を取得しておいてください。ダウンロード先のフォルダは"基本設定..."を押して確認することができます。
+
+3. TSIPコンポーネントは上記ステップ2の方法ではRenesas社の対応が遅れていて最新版が自動的には取得できないことがあります。その場合にはRenesas社のサイトから手動でダウンロードできます。ダウンロードしたコンポーネントのを解凍し、FITModulesフォルダに含まれているファイル群をステップ2のダウンロード先フォルダに格納してください。
+
+4. 先に示したFITコンポーネントを一覧から選択して"終了"ボタンを押します。この操作を必要なFITコンポーネントを得るまで繰り返し行います。
+
+5. ソフトウエアコンポーネント設定画面のコンポーネントタブを選択し、r_t4_rxコンポーネントを選択します。右の設定ペインに"# IP address for ch0, when DHCP disable."プロパティの値として、このボードのIPアドレスを皆さんの環境に合わせてて指定します(例:
+192.168.1.9)。
+
+6. ソフトウエアコンポーネント設定画面の右上の”コードの生成"ボタンを押して、スマートコンフィギュレータにソースファイルを生成させます。smcプロジェクトの下にsrc/smc_genフォルダが生成され、ソースファイル、ライブラリ等が格納されされます。
+
+
+## 5. testプロジェクトへのsmc_genファイル群の追加
+----
+
+testプロジェクトはサンプルアプリケーションのプロジェクトです。プロジェクト・エクスプローラー上でtestプロジェクトを開くとsrcフォルダが存在し、そこにサンプルアプリケーションのソースファイルが格納されています。このsrcフォルダ直下に4-5で生成したsmc_genフォルダごとコピー&ペーストしてソースファイルを追加します。
+
+test/src/smc_gen
+
+のようなフォルダ階層になることを確認してください。
+
+
+## 6. testアプリケーションの動作を選択する
+----
+testプロジェクトが唯一のサンプルアプリケーションですが、その動作を設定で切り替えることによって、
+
+- CryptoTest: 各種暗号化オペレーション機能を自動テストするプログラム
+- Benchmark: 各種暗号化オペレーションの実行速度を測定するプログラム
+- TlsClient: 対向するTLSサーバーアプリケーションとTLS通信を行うプログラム
+
+のいずれかの動作を行うよう指定できます。
+
+設定はtest/src/wolfssl_demo.h ファイル内の、
+
+- #define CRYPT_TEST
+- #define BENCHMARK
+- #define TLS_CLIENT
+
+のいずれか一つを有効にしてアプリケーションをビルドすることで行います。
+
+
+
+## 7. testアプリケーションのビルドと実行
+-----
+
+testアプリケーションのビルドの準備が整ったので、ビルドを行います。
+
+1.プロジェクト・エクスプローラー上のwolfsslプロジェクトをビルドし、次にtestプロジェクトをビルドします。
+
+2.ビルドが成功したら、ターゲットボードとエミュレーターを接続し、外部電源を入力します。
+
+3."実行"メニュー > "デバッグ"を選択し、デバッグパースペクティブを開きます。
+
+4. testアプリケーションは標準出力に動作状況を出力します。この標準出力の表示用に、"Renesas Debug Virtual Console"を開いておきます。
+
+5.実行ボタンを押してtestアプリケーションを動作させます。
+
+6.CryptoTest、BenchmarkあるいはTLS_Client選択していた動作に応じた実行結果を表示したあと無限ループに入るので出力が停止したと思われたらデバッグを停止させます。
+
+
+## 8. TLS_Clientとしてのtestアプリケーションの実行
+-----
+
+
+### 8.1 TLS対向アプリケーションの生成と実行
+
+
+testアプリケーションをTLS_Clientとしての動作を行わせる場合には、TLS通信の相手方となる対向アプリケーションが必要となります。wolfSSLパッケージにはこの用途に使用できるTLSserverサンプルアプリケーションが用意されています。このプログラムはwolfsslをビルドすることで生成されます。wolfSSLのビルドにはgccがインストールされているLinux(MacOS, WSLも含む)でのビルドとVisualStudioを使ってのビルドが可能です。以下ではWSL上でのビルドを紹介します。
+
+
+```
+$ cd
+$ ./autogen.sh
+$ ./configure CFLAGS="-DWOLFSSL_STATIC_RSA -DHAVEAES_CBC"
+$ make
+```
+
+
+上記のビルドによって、/examples/server/server
+が生成されます。この実行プログラムがサーバーアプリケーションとして機能します。以下のオプションを与えて実行させるとTLS_Clientからの接続を待ち受け状態になります。
+
+
+```
+$ examples/server/server -b -d -i
+```
+
+testアプリケーションには、サーバーアプリケーションに割り当てられたIPアドレスを指定します。
+
+wolf_client.cを開き、#define SIMPLE_TLSSEVER_IPにアドレスを指定します。
+
+```
+-- wolf_client.c --
+
+...
+#define SIMPLE_TLSSEVER_IP 192.168.53.9
+...
+```
+
+ファイルをセーブしてtestアプリケーションを再ビルドしてください。testアプリケーションを実行すると、対向アプリケーションとの間でTLS接続が行われ、その後簡単な文字列を交換して標準出力に以下のような表示を行います。
+
+
+```
+cipher : ECDHE-RSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : AES256-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+```
+
+
+### 8.2 サーバー証明書の変更(認証方式の変更)
+
+
+上記はサーバーアプリケーションが提示すサーバー証明書にRSA公開鍵が含まれている(RSA認証)場合の実行例です。TSIPにはこのほかにサーバー証明書にECC公開鍵を含む場合(ECDSA認証)も扱えます。
+
+
+ECDSAを含む暗号化スイートを使用したい場合には、testアプリケーションの設定を変更して再ビルドが必要となります。\/common/user_settings.h を開き、USE_ECC_CERT定義を有効化して再ビルドしてください。
+
+
+```
+#define USE_ECC_CERT
+```
+
+
+この定義により、testアプリケーションはサーバーの提示するECC公開鍵を含んだサーバー証明書を検証できるRootCA証明書を使うようになります。
+
+
+さらに対向するサーバーアプリケーションの方でも以下のようにECC公開鍵を含んだサーバー証明書と秘密鍵ファイルをオプションで指定して実行する必要があります。
+
+
+```
+$ ./examples/server/server -b -d -i -c ./certs/server-ecc.pem -k ./certs/ecc-key.pem
+```
+
+実行結果として以下が表示されます。
+
+
+```
+cipher : ECDHE-ECDSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-ECDSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+```
+
+
+## 9. ユーザーが用意したRootCA証明書を利用する際に必要なこと
+-----
+
+本サンプルプログラムでは、TLS_Clientとして動作する際に必要なRootCA証明書とサンプルTLSサーバーアプリケーションが使用するサーバー証明書などは評価用でのみ利用可能な証明書です。
+機能評価を超えた目的で利用する場合にはRootCA証明書をユーザー自身で用意する必要があります。それに伴い、
+ 1. Provisioning key
+ 2. RootCA証明書の検証の為に必要なRSA鍵ペア
+ 3. RootCA証明書を上記2の秘密鍵で生成した署名
+
+が必要になります。それらの生成方法はRenesas社提供のマニュアルを参照してください。
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/common/strings.h b/IDE/Renesas/e2studio/RX65N/RSK/common/strings.h
similarity index 100%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/common/strings.h
rename to IDE/Renesas/e2studio/RX65N/RSK/common/strings.h
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/common/unistd.h b/IDE/Renesas/e2studio/RX65N/RSK/common/unistd.h
similarity index 100%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/common/unistd.h
rename to IDE/Renesas/e2studio/RX65N/RSK/common/unistd.h
diff --git a/IDE/Renesas/e2studio/GR-ROSE/common/user_settings.h b/IDE/Renesas/e2studio/RX65N/RSK/common/user_settings.h
similarity index 75%
rename from IDE/Renesas/e2studio/GR-ROSE/common/user_settings.h
rename to IDE/Renesas/e2studio/RX65N/RSK/common/user_settings.h
index 52d87c9c6..75cae36a6 100644
--- a/IDE/Renesas/e2studio/GR-ROSE/common/user_settings.h
+++ b/IDE/Renesas/e2studio/RX65N/RSK/common/user_settings.h
@@ -23,8 +23,8 @@
*
*
*----------------------------------------------------------------------------*/
- #define WOLFSSL_RENESAS_RX65N
-/*#define WOLFSSL_RENESAS_RX72N*/
+#define WOLFSSL_RENESAS_RX65N
+
/*-- Renesas TSIP usage and its version ---------------------------------------
@@ -35,15 +35,16 @@
* "WOLFSSL_RENESAS_TSIP_VER" takes following value:
* 106: TSIPv1.06
* 109: TSIPv1.09
- *
+ * 113: TSIPv1.13
+ * 114: TSIPv1.14
*----------------------------------------------------------------------------*/
#define WOLFSSL_RENESAS_TSIP
- #define WOLFSSL_RENESAS_TSIP_VER 109
+ #define WOLFSSL_RENESAS_TSIP_VER 114
/*-- TLS version definitions --------------------------------------------------
*
- * wolfSSL supports TLSv1.2 by default. In case you want your system suppots
+ * wolfSSL supports TLSv1.2 by default. In case you want your system to support
* TLSv1.3, uncomment line below.
*
*----------------------------------------------------------------------------*/
@@ -52,7 +53,7 @@
/*-- Operating System related definitions --------------------------------------
*
- * In case any realtime OS is used, define its name(e.g. FREERTOS).
+ * In case any real-time OS is used, define its name(e.g. FREERTOS).
* Otherwise, define "SINGLE_THREADED". They are exclusive each other.
*
*----------------------------------------------------------------------------*/
@@ -66,7 +67,7 @@
*----------------------------------------------------------------------------*/
#define NO_DEV_RANDOM
- #define USE_CERT_BUFFERS_2048
+
#define WOLFSSL_DH_CONST
#define HAVE_TLS_EXTENSIONS
@@ -82,7 +83,40 @@
#define WOLFSSL_STATIC_RSA
-
+ /* USE_ECC_CERT
+ * This macro is for selecting root CA certificate to load, it is valid only
+ * in example applications. wolfSSL does not refer this macro.
+ * If you want to use cipher suites including ECDSA authentication in
+ * the example applications with TSIP, enable this macro.
+ * In TSIP 1.13 or later version, following cipher suites are
+ * available:
+ * - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
+ * - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SAH256
+ *
+ * Note that, this macro disables cipher suites including RSA
+ * authentication such as:
+ * - TLS_RSA_WITH_AES_128_CBC_SHA
+ * - TLS_RSA_WITH_AES_256_CBC_SHA
+ * - TLS_RSA_WITH_AES_128_CBC_SHA256
+ * - TLS_RSA_WITH_AES_256_CBC_SHA256
+ * - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
+ * - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA256
+ *
+ */
+ /*#define USE_ECC_CERT*/
+
+ /* In this example application, Root CA cert buffer named
+ * "ca_ecc_cert_der_256" is used under the following macro definition
+ * for ECDSA.
+ */
+ #define USE_CERT_BUFFERS_256
+
+ /* In this example application, Root CA cert buffer named
+ * "ca_cert_der_2048" is used under the following macro definition
+ * for RSA authentication.
+ */
+ #define USE_CERT_BUFFERS_2048
+
/*-- Misc definitions ---------------------------------------------------------
*
*
@@ -100,7 +134,7 @@
* "NO_ASN_TIME" macro. And prepare time function to get calender time,
* otherwise, certificate expiration validation will not work.
*/
- #define NO_ASN_TIME
+ /*#define NO_ASN_TIME*/
#define NO_MAIN_DRIVER
#define BENCH_EMBEDDED
@@ -114,17 +148,18 @@
#define NO_WRITEV
#define WOLFSSL_USER_IO
- #define WOLFSSL_USER_CURRTIME
+ #define WOLFSSL_USER_CURRTIME /* for benchmark */
#define USER_TIME
#define XTIME time
#define USE_WOLF_SUSECONDS_T
#define USE_WOLF_TIMEVAL_T
- #define WOLFSSL_USER_CURRTIME /* for benchmark */
+
#define WC_RSA_BLINDING
#define TFM_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
+
/*-- Debugging options ------------------------------------------------------
*
* "DEBUG_WOLFSSL" definition enables log to output into stdout.
@@ -133,7 +168,7 @@
/*#define DEBUG_WOLFSSL*/
-/*-- Definitions for fuctionality negation -----------------------------------
+/*-- Definitions for functionality negation -----------------------------------
*
*
*----------------------------------------------------------------------------*/
@@ -141,7 +176,9 @@
/*#define NO_RENESAS_TSIP_CRYPT*/
/*#define NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION*/
-
+#if defined(WOLFCRYPT_ONLY)
+ #undef WOLFSSL_RENESAS_TSIP
+#endif
/*-- Consistency checking between definitions ---------------------------------
*
*
@@ -165,6 +202,8 @@
#define WOLFSSL_RENESAS_TSIP_CRYPT
#define WOLFSSL_RENESAS_TSIP_TLS
#define WOLFSSL_RENESAS_TSIP_TLS_AES_CRYPT
+ #define HAVE_PK_CALLBACKS
+ #define WOLF_CRYPTO_CB
#endif
#else
diff --git a/IDE/Renesas/e2studio/GR-ROSE/common/wolfssl_dummy.c b/IDE/Renesas/e2studio/RX65N/RSK/common/wolfssl_dummy.c
similarity index 98%
rename from IDE/Renesas/e2studio/GR-ROSE/common/wolfssl_dummy.c
rename to IDE/Renesas/e2studio/RX65N/RSK/common/wolfssl_dummy.c
index a31c43cdc..28644d760 100644
--- a/IDE/Renesas/e2studio/GR-ROSE/common/wolfssl_dummy.c
+++ b/IDE/Renesas/e2studio/RX65N/RSK/common/wolfssl_dummy.c
@@ -21,7 +21,7 @@
typedef unsigned long time_t;
-#define YEAR 2020
+#define YEAR 2021
#define MON 7
static int tick = 0;
diff --git a/IDE/Renesas/e2studio/RX65N/RSK/include.am b/IDE/Renesas/e2studio/RX65N/RSK/include.am
new file mode 100644
index 000000000..885ff73bc
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/RSK/include.am
@@ -0,0 +1,26 @@
+# vim:ft=automake
+# included from Top Level Makefile.am
+# All paths should be given relative to the root
+
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/README_EN.md
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/README_JP.md
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/wolfssl/.cproject
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/wolfssl/.project
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/wolfssl/wolfssl.rcpc
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/test/.cproject
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/test/.project
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/test/test_HardwareDebug.launch
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/test/test.rcpc
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/test/src/test_main.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/test/src/key_data.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/test/src/key_data.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/test/src/wolf_client.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/test/src/wolf_server.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/test/src/wolfssl_demo.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/common/wolfssl_dummy.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/common/strings.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/common/unistd.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/common/user_settings.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/smc/.cproject
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/smc/.project
+EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/smc/smc.scfg
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/RX65N/RSK/smc/.cproject b/IDE/Renesas/e2studio/RX65N/RSK/smc/.cproject
new file mode 100644
index 000000000..1f2cc696b
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/RSK/smc/.cproject
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/smc/.project b/IDE/Renesas/e2studio/RX65N/RSK/smc/.project
similarity index 84%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/smc/.project
rename to IDE/Renesas/e2studio/RX65N/RSK/smc/.project
index eb9d9de48..4f66ca88d 100644
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/smc/.project
+++ b/IDE/Renesas/e2studio/RX65N/RSK/smc/.project
@@ -5,6 +5,11 @@
+
+ com.renesas.smc.ui.pgsupport.SCContentBuilder
+
+
+
org.eclipse.cdt.managedbuilder.core.genmakebuilder
clean,full,incremental,
diff --git a/IDE/Renesas/e2studio/RX65N/RSK/smc/smc.scfg b/IDE/Renesas/e2studio/RX65N/RSK/smc/smc.scfg
new file mode 100644
index 000000000..4af528854
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/RSK/smc/smc.scfg
@@ -0,0 +1,935 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IDE/Renesas/e2studio/RX65N/RSK/test/.cproject b/IDE/Renesas/e2studio/RX65N/RSK/test/.cproject
new file mode 100644
index 000000000..67e6e64ce
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/RSK/test/.cproject
@@ -0,0 +1,361 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/.project b/IDE/Renesas/e2studio/RX65N/RSK/test/.project
similarity index 88%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/test/.project
rename to IDE/Renesas/e2studio/RX65N/RSK/test/.project
index 0a6806653..567eaad89 100644
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/.project
+++ b/IDE/Renesas/e2studio/RX65N/RSK/test/.project
@@ -32,17 +32,17 @@
src/benchmark.c
1
- $%7BPARENT-5-PROJECT_LOC%7D/wolfcrypt/benchmark/benchmark.c
+ $%7BPARENT-6-PROJECT_LOC%7D/wolfcrypt/benchmark/benchmark.c
src/benchmark.h
1
- $%7BPARENT-5-PROJECT_LOC%7D/wolfcrypt/benchmark/benchmark.h
+ $%7BPARENT-6-PROJECT_LOC%7D/wolfcrypt/benchmark/benchmark.h
src/test.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/test/test.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/test/test.c
src/wolfssl_dummy.c
diff --git a/IDE/Renesas/e2studio/RX65N/RSK/test/src/key_data.c b/IDE/Renesas/e2studio/RX65N/RSK/test/src/key_data.c
new file mode 100644
index 000000000..9d5785545
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/RSK/test/src/key_data.c
@@ -0,0 +1,179 @@
+/* key_data.c
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+#include "key_data.h"
+
+/*-------------------------------------------------------------------------
+ TSIP v1.09 or later
+--------------------------------------------------------------------------*/
+#if defined(WOLFSSL_RENESAS_TSIP_TLS) && (WOLFSSL_RENESAS_TSIP_VER >=109)
+
+const st_key_block_data_t g_key_block_data =
+{
+ /* uint8_t encrypted_provisioning_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2]; */
+ {
+ 0xE9, 0x67, 0x79, 0xF7, 0x38, 0x73, 0xC8, 0x59, 0x94, 0x62, 0x7D, 0xB9,
+ 0x83, 0xDE, 0x59, 0x4A, 0x92, 0x53, 0x6B, 0x14, 0x1B, 0x2A, 0x99, 0xDF,
+ 0x95, 0xFD, 0x35, 0x84, 0x93, 0xCE, 0xDB, 0x10
+ },
+ /* uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE]; */
+ {
+ 0xF6, 0xA9, 0x83, 0x5A, 0xA1, 0x65, 0x1D, 0x28, 0xC8, 0x1A, 0xA6, 0x9D,
+ 0x34, 0xB2, 0x4D, 0x92
+ },
+ /*
+ * uint8_t
+ * encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16];
+ */
+ {
+ 0x34, 0x59, 0xFF, 0xFE, 0xAA, 0xE9, 0x26, 0x60, 0x8C, 0xB8, 0x76, 0xD2,
+ 0x98, 0x65, 0x72, 0x3B, 0x19, 0x78, 0xB8, 0x9B, 0x0D, 0xD4, 0xFC, 0x2A,
+ 0xF8, 0x54, 0x3B, 0x75, 0x0E, 0x40, 0x21, 0xF5, 0xF2, 0x6D, 0x3F, 0x60,
+ 0xD2, 0xDF, 0xE7, 0xDB, 0x67, 0xF1, 0xC7, 0x66, 0x5F, 0x37, 0xAF, 0x9D,
+ 0x08, 0xE7, 0xFD, 0xEF, 0x63, 0xA9, 0x78, 0x73, 0x1A, 0xE2, 0x47, 0x91,
+ 0xB5, 0xA0, 0xCE, 0xA2, 0xC7, 0x4F, 0x8A, 0xE5, 0x03, 0x6F, 0xC5, 0xB8,
+ 0xC4, 0x40, 0x12, 0x2D, 0x37, 0x2F, 0xF2, 0xC5, 0x73, 0x2D, 0xF8, 0xBF,
+ 0x4A, 0xDC, 0xB7, 0x98, 0xDF, 0xE8, 0xED, 0xF8, 0x3B, 0x24, 0x8A, 0x01,
+ 0xAE, 0x64, 0x89, 0x9C, 0x79, 0x66, 0x99, 0xE4, 0xF8, 0xC1, 0x3E, 0x04,
+ 0x56, 0x1E, 0x6E, 0xBA, 0x2D, 0xAA, 0xB9, 0xE8, 0xA0, 0xC2, 0x27, 0xCF,
+ 0x7C, 0x0F, 0xAD, 0x0A, 0x22, 0xEE, 0x61, 0xA8, 0x32, 0xBE, 0xEE, 0xE7,
+ 0x3F, 0x5D, 0xE5, 0xBD, 0x75, 0x6B, 0x35, 0xC1, 0x77, 0xCC, 0x7D, 0x0E,
+ 0x2E, 0x26, 0x67, 0xC4, 0x0E, 0x84, 0x34, 0xBD, 0x33, 0xB3, 0x0C, 0xD9,
+ 0x07, 0xE5, 0x8E, 0x3E, 0x7E, 0xCC, 0x56, 0x5D, 0x23, 0x5A, 0x96, 0x83,
+ 0x0C, 0xD9, 0x7F, 0xB0, 0xF7, 0x53, 0xD9, 0x5C, 0xE2, 0x1B, 0xDA, 0x63,
+ 0x62, 0x19, 0x16, 0x9D, 0x75, 0x7B, 0xBB, 0x7E, 0xC9, 0xB5, 0xAD, 0x7D,
+ 0xBB, 0x5A, 0xFA, 0xA5, 0x5B, 0x54, 0xA1, 0x93, 0x6D, 0x53, 0x3C, 0x85,
+ 0x69, 0x00, 0x15, 0x40, 0x0E, 0x54, 0xD2, 0xBA, 0xB5, 0x80, 0x1C, 0x25,
+ 0x85, 0x0E, 0x60, 0x87, 0x2A, 0x1A, 0xE7, 0x60, 0xCB, 0x6A, 0xF5, 0xAF,
+ 0x84, 0x4B, 0xB7, 0x0D, 0x0C, 0xC0, 0xB5, 0x02, 0xB2, 0x38, 0x9D, 0x7C,
+ 0xFA, 0x31, 0xF3, 0x50, 0xB3, 0x32, 0x69, 0x3A, 0x3C, 0x7A, 0xA5, 0x67,
+ 0x19, 0x66, 0xD5, 0x62, 0xA3, 0xF2, 0xF7, 0x77, 0x73, 0xF6, 0xE7, 0x8D,
+ 0x51, 0x0C, 0x19, 0xA3, 0x0F, 0x8C, 0x79, 0xE0, 0x7C, 0xCF, 0x8A, 0x03,
+ 0x70, 0xC7, 0x25, 0x9D, 0xCE, 0x89, 0x77, 0x8E, 0x4C, 0xE6, 0x97, 0xC8
+ },
+ /* uint8_t encrypted_user_update_key[R_TSIP_AES256_KEY_BYTE_SIZE + 16]; */
+ {
+ 0x69, 0xDB, 0xC6, 0x86, 0xA5, 0x06, 0x22, 0x59, 0x11, 0x14, 0x73, 0x56,
+ 0x3A, 0x9E, 0x44, 0xC3, 0x9C, 0xA8, 0x76, 0xC6, 0xF6, 0xE8, 0xD8, 0xE2,
+ 0x17, 0x66, 0x90, 0x65, 0x08, 0xB5, 0x39, 0x7F, 0xD5, 0xC5, 0x6F, 0xD1,
+ 0xCB, 0xFB, 0xB2, 0x76, 0x33, 0xA1, 0x22, 0x0F, 0xBE, 0x83, 0x91, 0x24
+ },
+
+};
+
+/* Public key type of CA root cert: 0: RSA-2048 2: ECDSA-P256*/
+#if defined(USE_ECC_CERT)
+const uint32_t encrypted_user_key_type =
+ R_TSIP_TLS_PUBLIC_KEY_TYPE_ECDSA_P256;
+#else
+const uint32_t encrypted_user_key_type =
+ R_TSIP_TLS_PUBLIC_KEY_TYPE_RSA2048;
+#endif
+
+const unsigned char ca_ecc_cert_der_sig[] =
+{
+ 0x81, 0x87, 0x55, 0x02, 0x9c, 0xf8, 0x0b, 0x5c, 0x69, 0xba, 0x4b, 0xe9,
+ 0x51, 0x19, 0x7b, 0x3c, 0x22, 0xaf, 0x6b, 0xd5, 0x23, 0x80, 0x64, 0xb8,
+ 0x1e, 0xe7, 0x99, 0xab, 0x89, 0x6d, 0xff, 0x93, 0xe1, 0xb5, 0xd8, 0x8d,
+ 0x7f, 0x53, 0xe7, 0x74, 0x8a, 0xd6, 0x06, 0x6a, 0x61, 0x2a, 0xab, 0x4a,
+ 0x65, 0x0d, 0x28, 0xbd, 0xc7, 0x92, 0x70, 0xd8, 0x79, 0xdc, 0xf7, 0xd2,
+ 0xf7, 0xf9, 0xa9, 0x13, 0x16, 0x5f, 0x4d, 0x4b, 0xae, 0x12, 0x5b, 0xfe,
+ 0x08, 0x09, 0x26, 0x1f, 0xae, 0x15, 0xd9, 0x16, 0x51, 0x4a, 0x92, 0xfe,
+ 0x61, 0xeb, 0x6a, 0x82, 0x8c, 0xf8, 0xa8, 0x94, 0x26, 0x81, 0x9b, 0xb8,
+ 0x74, 0xd6, 0x32, 0x2b, 0x6f, 0xa6, 0xad, 0x9a, 0x91, 0x63, 0xe6, 0x03,
+ 0x5f, 0x25, 0xee, 0xc2, 0xfd, 0x54, 0x58, 0x13, 0xee, 0x53, 0xae, 0xe3,
+ 0xda, 0x6b, 0xb5, 0x08, 0x45, 0xbe, 0xf2, 0xa8, 0x22, 0x92, 0x53, 0x8c,
+ 0xa4, 0xd9, 0xb6, 0x4e, 0xb9, 0xbf, 0x76, 0xb0, 0x96, 0x9f, 0xd7, 0xf6,
+ 0x53, 0xf3, 0x65, 0xf0, 0xe7, 0xff, 0xe8, 0x93, 0x2d, 0xc2, 0x08, 0x91,
+ 0xf8, 0x27, 0x33, 0x92, 0x95, 0x23, 0x1e, 0x6e, 0xd1, 0x91, 0x50, 0xc6,
+ 0x06, 0xb1, 0x16, 0x69, 0xee, 0xcf, 0xad, 0xc9, 0x4b, 0xf2, 0x38, 0x65,
+ 0x1d, 0xa9, 0xff, 0xd3, 0xf4, 0xd5, 0x84, 0xa9, 0xdd, 0xa7, 0x04, 0x77,
+ 0x64, 0xb5, 0xed, 0xe8, 0x0c, 0x15, 0x77, 0x7e, 0xfc, 0x02, 0xdd, 0x4e,
+ 0xf1, 0xd1, 0x36, 0xfe, 0xac, 0x3f, 0x5c, 0xd3, 0xdf, 0x51, 0xa3, 0x5c,
+ 0x8d, 0xed, 0x9f, 0x8d, 0xc8, 0xa7, 0xff, 0x46, 0xbc, 0x1d, 0x83, 0x12,
+ 0x4f, 0x49, 0xaa, 0xf5, 0xd1, 0x04, 0xc8, 0xee, 0x95, 0xda, 0xa0, 0x61,
+ 0x28, 0xff, 0x25, 0x8c, 0xfc, 0x35, 0x8f, 0xdc, 0x00, 0x47, 0x01, 0xfd,
+ 0x7c, 0xed, 0x05, 0xff
+};
+const int sizeof_ca_ecc_cert_sig = sizeof(ca_ecc_cert_der_sig);
+
+/* ./ca-cert.der.sign, */
+const unsigned char ca_cert_der_sig[] =
+{
+ 0x0E, 0xC3, 0x9B, 0x77, 0xF8, 0x58, 0x08, 0x9E, 0x5D, 0x1E, 0x03, 0x8D,
+ 0x60, 0xD1, 0xF6, 0x3E, 0x3D, 0xFF, 0x89, 0x4C, 0x91, 0x5C, 0x00, 0xEB,
+ 0x05, 0xE5, 0x65, 0x62, 0x17, 0xFB, 0xD4, 0x52, 0x69, 0x9D, 0xB8, 0x07,
+ 0xAF, 0xA9, 0x4C, 0xA5, 0xB9, 0x8D, 0x52, 0xC0, 0xF3, 0x34, 0x13, 0x67,
+ 0x40, 0xAA, 0xE1, 0xA3, 0x9E, 0x5D, 0x0F, 0xCE, 0x87, 0xB0, 0x10, 0xB4,
+ 0x79, 0x8F, 0x84, 0x21, 0x81, 0xC2, 0xF9, 0xF7, 0xDB, 0xCB, 0x8F, 0xE4,
+ 0x9B, 0xF5, 0x85, 0x9D, 0x11, 0x04, 0xFB, 0xA7, 0xFD, 0x13, 0x6F, 0x02,
+ 0xA5, 0xBF, 0xE0, 0x89, 0x62, 0x5E, 0x24, 0x95, 0xF6, 0x01, 0x7D, 0x7F,
+ 0xB5, 0xD1, 0xDD, 0xF3, 0x3B, 0xD5, 0x04, 0x54, 0xE1, 0x8E, 0xA8, 0x3D,
+ 0x30, 0xB3, 0x35, 0x76, 0xAF, 0xA7, 0x94, 0xD7, 0x59, 0x82, 0x38, 0x2C,
+ 0xD6, 0x95, 0x57, 0xD1, 0xD5, 0x62, 0xB1, 0x69, 0x60, 0xCD, 0x3F, 0x7D,
+ 0x0E, 0x9F, 0x00, 0x21, 0x04, 0xFE, 0x43, 0xBD, 0x7D, 0x3D, 0xA7, 0x6B,
+ 0xC5, 0x82, 0x92, 0xDE, 0xB7, 0xA3, 0xD4, 0x7D, 0x3C, 0x14, 0x46, 0x28,
+ 0x50, 0xCA, 0x86, 0x9F, 0x66, 0x4C, 0xB0, 0x46, 0x46, 0x4D, 0x31, 0xD6,
+ 0x7B, 0xEC, 0xBA, 0xED, 0xA1, 0xF9, 0x88, 0x68, 0xB9, 0xA9, 0xDA, 0x88,
+ 0x63, 0x01, 0x95, 0x5B, 0x78, 0x38, 0x03, 0xD6, 0xDF, 0x86, 0xC4, 0x3E,
+ 0x3B, 0xCF, 0xED, 0x8B, 0x2A, 0x41, 0x49, 0x65, 0x3E, 0x2F, 0x45, 0x71,
+ 0xD8, 0x0B, 0xF1, 0xF0, 0xC7, 0xB5, 0x2E, 0xBE, 0xF0, 0x71, 0xDE, 0x40,
+ 0xB0, 0x54, 0x25, 0xD7, 0x4A, 0x86, 0xF1, 0xB9, 0xF6, 0xAB, 0x07, 0x07,
+ 0x21, 0x7C, 0x15, 0x7B, 0x1F, 0xCF, 0xE4, 0x1F, 0x0B, 0xEB, 0x0E, 0x96,
+ 0xE5, 0x59, 0x34, 0xC6, 0x4B, 0x1B, 0xF6, 0xC7, 0x6C, 0x4C, 0x16, 0x43,
+ 0x72, 0xAF, 0x82, 0x1E
+};
+const int sizeof_ca_cert_sig = sizeof(ca_cert_der_sig);
+/* ./client-cert.der.sign, */
+const unsigned char client_cert_der_sign[] =
+{
+ 0x5D, 0x1F, 0x89, 0x41, 0xEC, 0x47, 0xC8, 0x90, 0x61, 0x79,
+ 0x8A, 0x16, 0x1F, 0x31, 0x96, 0x67, 0xD9, 0x3C, 0xEC, 0x6B,
+ 0x58, 0xC6, 0x5A, 0xED, 0x99, 0xB3, 0xEF, 0x27, 0x6F, 0x04,
+ 0x8C, 0xD9, 0x68, 0xB1, 0xD6, 0x23, 0x15, 0x84, 0x00, 0xE1,
+ 0x27, 0xD1, 0x1F, 0x68, 0xB7, 0x3F, 0x13, 0x53, 0x8A, 0x95,
+ 0x5A, 0x20, 0x7C, 0xB2, 0x76, 0x5B, 0xDC, 0xE0, 0xA6, 0x21,
+ 0x7C, 0x49, 0xCF, 0x93, 0xBA, 0xD5, 0x12, 0x9F, 0xEE, 0x90,
+ 0x5B, 0x3F, 0xA3, 0x9D, 0x13, 0x72, 0xAC, 0x72, 0x16, 0xFE,
+ 0x1D, 0xBE, 0xEB, 0x8E, 0xC7, 0xDC, 0xC4, 0xF8, 0x1A, 0xD8,
+ 0xA0, 0xA4, 0xF6, 0x04, 0x30, 0xF6, 0x7E, 0xB6, 0xC8, 0xE1,
+ 0xAB, 0x88, 0x37, 0x08, 0x63, 0x72, 0xAA, 0x46, 0xCC, 0xCA,
+ 0xF0, 0x9E, 0x02, 0x1E, 0x65, 0x67, 0xFF, 0x2C, 0x9D, 0x81,
+ 0x6C, 0x1E, 0xF1, 0x54, 0x05, 0x68, 0x68, 0x18, 0x72, 0x26,
+ 0x55, 0xB6, 0x2C, 0x95, 0xC0, 0xC9, 0xB2, 0xA7, 0x0B, 0x60,
+ 0xD7, 0xEB, 0x1D, 0x08, 0x1A, 0xA2, 0x54, 0x15, 0x89, 0xCB,
+ 0x83, 0x21, 0x5D, 0x15, 0x9B, 0x38, 0xAC, 0x89, 0x63, 0xD5,
+ 0x4B, 0xF4, 0x8B, 0x47, 0x93, 0x78, 0x43, 0xCB, 0x9B, 0x71,
+ 0xBF, 0x94, 0x76, 0xB5, 0xCE, 0x35, 0xA9, 0x1A, 0xD5, 0xA5,
+ 0xD8, 0x19, 0xA6, 0x04, 0x39, 0xB1, 0x09, 0x8C, 0x65, 0x02,
+ 0x58, 0x3A, 0x95, 0xEF, 0xA2, 0xC3, 0x85, 0x18, 0x61, 0x23,
+ 0x2D, 0xC5, 0xCD, 0x62, 0xC1, 0x19, 0x31, 0xE5, 0x36, 0x95,
+ 0x22, 0xDB, 0x3E, 0x1A, 0x3C, 0xE8, 0xC6, 0x2E, 0xDF, 0xD9,
+ 0x2F, 0x84, 0xC1, 0xF0, 0x38, 0x2B, 0xE5, 0x73, 0x35, 0x4F,
+ 0x05, 0xE2, 0xA5, 0x60, 0x79, 0xB0, 0x23, 0xDC, 0x56, 0x4C,
+ 0xE7, 0xD9, 0x1F, 0xCF, 0x6A, 0xFC, 0x55, 0xEB, 0xAA, 0x48,
+ 0x3E, 0x95, 0x2A, 0x10, 0x01, 0x05
+};
+const int sizeof_client_cert_der_sign = sizeof(client_cert_der_sign);
+
+uint32_t s_inst1[R_TSIP_SINST_WORD_SIZE] = { 0 };
+uint32_t s_inst2[R_TSIP_SINST2_WORD_SIZE]= { 0 };
+#endif
diff --git a/IDE/Renesas/e2studio/GR-ROSE/test/src/key_data.h b/IDE/Renesas/e2studio/RX65N/RSK/test/src/key_data.h
similarity index 70%
rename from IDE/Renesas/e2studio/GR-ROSE/test/src/key_data.h
rename to IDE/Renesas/e2studio/RX65N/RSK/test/src/key_data.h
index efc8c4576..4666db3a6 100644
--- a/IDE/Renesas/e2studio/GR-ROSE/test/src/key_data.h
+++ b/IDE/Renesas/e2studio/RX65N/RSK/test/src/key_data.h
@@ -18,7 +18,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
-
+
+
+
#ifndef KEY_DATA_H_
#define KEY_DATA_H_
@@ -28,7 +30,7 @@
#if defined(WOLFSSL_RENESAS_TSIP)
- #include "r_tsip_rx_if.h"
+#include "r_tsip_rx_if.h"
typedef struct st_key_block_data
{
@@ -38,19 +40,16 @@ typedef struct st_key_block_data
uint8_t encrypted_user_update_key[R_TSIP_AES256_KEY_BYTE_SIZE + 16];
} st_key_block_data_t;
- #if (WOLFSSL_RENESAS_TSIP_VER >= 109)
- extern const uint32_t encrypted_user_key_type;
- #endif
- extern const st_key_block_data_t g_key_block_data;
-
-
- extern const unsigned char ca_cert_sig[];
- extern const unsigned char ca_cert_der[];
- extern const unsigned char client_cert_der_sign[];
- extern const int sizeof_ca_cert_der;
+extern const uint32_t encrypted_user_key_type;
+extern const st_key_block_data_t g_key_block_data;
+
+extern const unsigned char ca_cert_der_sig[];
+extern const unsigned char ca_ecc_cert_der_sig[];
+extern const unsigned char client_cert_der_sign[];
+extern const int sizeof_ca_cert_der;
-#endif /* (WOLFSSL_RENESAS_TSIP */
+#endif /* WOLFSSL_RENESAS_TSIP */
#endif /* KEY_DATA_H_ */
diff --git a/IDE/Renesas/e2studio/GR-ROSE/test/src/test_main.c b/IDE/Renesas/e2studio/RX65N/RSK/test/src/test_main.c
similarity index 77%
rename from IDE/Renesas/e2studio/GR-ROSE/test/src/test_main.c
rename to IDE/Renesas/e2studio/RX65N/RSK/test/src/test_main.c
index 5979896f8..2492e2c78 100644
--- a/IDE/Renesas/e2studio/GR-ROSE/test/src/test_main.c
+++ b/IDE/Renesas/e2studio/RX65N/RSK/test/src/test_main.c
@@ -29,7 +29,7 @@
void main(void);
#ifdef __cplusplus
extern "C" {
-void abort(void);
+
}
#endif
@@ -41,14 +41,14 @@ void abort(void);
#define T4_WORK_SIZE (14800)
static UW tcpudp_work[(T4_WORK_SIZE / 4) + 1];
+#endif
- #if defined(WOLFSSL_RENESAS_TSIP)
- #include "key_data.h"
- #include
-
- extern const st_key_block_data_t g_key_block_data;
- #endif
+#if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ #include "key_data.h"
+ #include
+ extern const st_key_block_data_t g_key_block_data;
+ user_PKCbInfo guser_PKCbInfo;
#endif
static long tick;
@@ -79,27 +79,38 @@ int SetTsiptlsKey()
{
#if defined(WOLFSSL_RENESAS_TSIP) && (WOLFSSL_RENESAS_TSIP_VER >=109)
- #if defined(TLS_CLIENT)
-
- tsip_inform_cert_sign((const byte *)ca_cert_sig);
- tsip_inform_user_keys_ex(
- (byte*)&g_key_block_data.encrypted_provisioning_key,
- (byte*)&g_key_block_data.iv,
- (byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key,
- encrypted_user_key_type);
-
- #elif defined(TLS_SERVER)
-
- tsip_inform_cert_sign((const byte *)client_cert_der_sign);
- tsip_inform_user_keys_ex(
- (byte*)&g_key_block_data.encrypted_provisioning_key,
- (byte*)&g_key_block_data.iv,
- (byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key,
- encrypted_user_key_type);
-
+#if defined(TLS_CLIENT)
+
+ #if defined(USE_ECC_CERT)
+ /* Root CA cert has ECC-P256 public key */
+ tsip_inform_cert_sign((const byte *)ca_ecc_cert_der_sig);
+ #else
+ /* Root CA cert has RSA public key */
+ tsip_inform_cert_sign((const byte *)ca_cert_der_sig);
#endif
-#elif defined(WOLFSSL_RENESAS_TSIP) && (WOLFSSL_RENESAS_TSIP_VER >=106)
+ tsip_inform_user_keys_ex(
+ (byte*)&g_key_block_data.encrypted_provisioning_key,
+ (byte*)&g_key_block_data.iv,
+ (byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key,
+ encrypted_user_key_type);
+
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ guser_PKCbInfo.user_key_id = 0;
+ #endif
+
+#elif defined(TLS_SERVER)
+
+ tsip_inform_cert_sign((const byte *)client_cert_der_sign);
+ tsip_inform_user_keys_ex(
+ (byte *)&g_key_block_data.encrypted_provisioning_key,
+ (byte *)&g_key_block_data.iv,
+ (byte *)&g_key_block_data.encrypted_user_rsa2048_ne_key,
+ encrypted_user_key_type);
+
+#endif
+
+#else
#if defined(TLS_CLIENT)
@@ -197,15 +208,28 @@ void main(void)
#elif defined(TLS_CLIENT)
#include "r_cmt_rx_if.h"
-#if defined(WOLFSSL_RENESAS_TSIP)
- const char* cipherlist[] = {
+#if defined(WOLFSSL_RENESAS_TSIP_TLS)
- "AES128-SHA",
- "AES128-SHA256",
- "AES256-SHA",
- "AES256-SHA256"
+ #ifdef USE_ECC_CERT
+ const char* cipherlist[] = {
+ "ECDHE-ECDSA-AES128-GCM-SHA256",
+ "ECDHE-ECDSA-AES128-SHA256"
};
- const int cipherlist_sz = 4;
+ const int cipherlist_sz = 2;
+
+ #else
+ const char* cipherlist[] = {
+ "ECDHE-RSA-AES128-GCM-SHA256",
+ "ECDHE-RSA-AES128-SHA256",
+ "AES128-SHA",
+ "AES128-SHA256",
+ "AES256-SHA",
+ "AES256-SHA256"
+ };
+ const int cipherlist_sz = 6;
+
+ #endif
+
#else
const char* cipherlist[] = { NULL };
const int cipherlist_sz = 0;
@@ -214,7 +238,8 @@ void main(void)
int i = 0;
Open_tcp();
-#if defined(WOLFSSL_RENESAS_TSIP)
+
+#if defined(WOLFSSL_RENESAS_TSIP_TLS)
SetTsiptlsKey();
#endif
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolf_client.c b/IDE/Renesas/e2studio/RX65N/RSK/test/src/wolf_client.c
similarity index 84%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolf_client.c
rename to IDE/Renesas/e2studio/RX65N/RSK/test/src/wolf_client.c
index cc1eeac79..39602bae3 100644
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolf_client.c
+++ b/IDE/Renesas/e2studio/RX65N/RSK/test/src/wolf_client.c
@@ -29,14 +29,17 @@
#include "wolfssl_demo.h"
-#define SIMPLE_TLSSEVER_IP "192.168.1.3"
+#define SIMPLE_TLSSEVER_IP "192.168.1.7"
#define SIMPLE_TLSSERVER_PORT "11111"
ER t4_tcp_callback(ID cepid, FN fncd , VP p_parblk);
-uint32_t g_encrypted_root_public_key[140];
static WOLFSSL_CTX *client_ctx;
+#if defined(WOLFSSL_RENESAS_TSIP_TLS)
+uint32_t g_encrypted_root_public_key[140];
+static TsipUserCtx userContext;
+#endif
static int my_IORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx)
{
@@ -93,17 +96,17 @@ void wolfSSL_TLS_client_init(const char* cipherlist)
#ifndef NO_FILESYSTEM
#ifdef USE_ECC_CERT
- char *cert = "./certs/ca-ecc-cert.pem";
+ char *cert = "./certs/ca-ecc-cert.pem";
#else
- char *cert = "./certs/ca-cert.pem";
+ char *cert = "./certs/ca-cert.pem";
#endif
#else
- #ifdef USE_ECC_CERT
- const unsigned char *cert = ca_ecc_der_256;
- #define SIZEOF_CERT sizeof_ca_ecc_der_256
+ #if defined(USE_ECC_CERT) && defined(USE_CERT_BUFFERS_256)
+ const unsigned char *cert = ca_ecc_cert_der_256;
+ #define SIZEOF_CERT sizeof_ca_ecc_cert_der_256
#else
- const unsigned char *cert = ca_cert_der_2048;
- #define SIZEOF_CERT sizeof_ca_cert_der_2048
+ const unsigned char *cert = ca_cert_der_2048;
+ #define SIZEOF_CERT sizeof_ca_cert_der_2048
#endif
#endif
@@ -118,6 +121,10 @@ void wolfSSL_TLS_client_init(const char* cipherlist)
return;
}
+ #ifdef WOLFSSL_RENESAS_TSIP_TLS
+ tsip_set_callbacks(client_ctx);
+ #endif
+
#if !defined(NO_FILESYSTEM)
if (wolfSSL_CTX_load_verify_locations(client_ctx, cert, 0) != SSL_SUCCESS) {
printf("ERROR: can't load \"%s\"\n", cert);
@@ -135,9 +142,10 @@ void wolfSSL_TLS_client_init(const char* cipherlist)
wolfSSL_SetIOSend(client_ctx, my_IOSend);
/* use specific cipher */
- if (cipherlist != NULL && wolfSSL_CTX_set_cipher_list(client_ctx, cipherlist) != WOLFSSL_SUCCESS) {
+ if (cipherlist != NULL &&
+ wolfSSL_CTX_set_cipher_list(client_ctx, cipherlist) != WOLFSSL_SUCCESS) {
wolfSSL_CTX_free(client_ctx); client_ctx = NULL;
- printf("client can't set cipher list 1");
+ printf("client can't set cipher list");
}
}
@@ -177,6 +185,10 @@ void wolfSSL_TLS_client( )
return;
}
+ #ifdef WOLFSSL_RENESAS_TSIP_TLS
+ tsip_set_callback_ctx(ssl, &userContext);
+ #endif
+
/* set callback context */
wolfSSL_SetIOReadCtx(ssl, (void *)&cepid);
wolfSSL_SetIOWriteCtx(ssl, (void *)&cepid);
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolf_server.c b/IDE/Renesas/e2studio/RX65N/RSK/test/src/wolf_server.c
similarity index 82%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolf_server.c
rename to IDE/Renesas/e2studio/RX65N/RSK/test/src/wolf_server.c
index b193fbe71..0f3d301f5 100644
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolf_server.c
+++ b/IDE/Renesas/e2studio/RX65N/RSK/test/src/wolf_server.c
@@ -73,26 +73,28 @@ void wolfSSL_TLS_server_init(byte doClientCheck)
#ifndef NO_FILESYSTEM
#ifdef USE_ECC_CERT
- char *cert = "./certs/server-ecc-cert.pem";
- char *key = "./certs/server-ecc-key.pem";
+ char *cert = "./certs/server-ecc-cert.pem";
+ char *key = "./certs/server-ecc-key.pem";
#else
- char *cert = "./certs/server-cert.pem";
- char *key = "./certs/server-key.pem";
+ char *cert = "./certs/server-cert.pem";
+ char *key = "./certs/server-key.pem";
#endif
- char *clientCert = "./certs/client-cert.pem";
+ char *clientCert = "./certs/client-cert.pem";
#else
- #ifdef USE_ECC_CERT
- char *cert = serv_ecc_der_256;
- int sizeof_cert = sizeof_serv_ecc_der_256;
- char *cert = serv_ecc_key_der_256;
- int sizeof_key = sizeof_serv_ecc_key_der_256;
+ #if defined(USE_ECC_CERT) && defined(USE_CERT_BUFFERS_256)
+ const unsigned char *cert = serv_ecc_der_256;
+ #define sizeof_cert sizeof_serv_ecc_der_256
+ const unsigned char *key = NULL;
+ #define sizeof_key NULL
+ const unsigned char *clientCert = NULL;
+ #define sizeof_clicert NULL
#else
- const unsigned char *cert = server_cert_der_2048;
- #define sizeof_cert sizeof_server_cert_der_2048
- const unsigned char *key = server_key_der_2048;
- #define sizeof_key sizeof_server_key_der_2048
- const unsigned char *clientCert = client_cert_der_2048;
- #define sizeof_clicert sizeof_client_cert_der_2048
+ const unsigned char *cert = server_cert_der_2048;
+ #define sizeof_cert sizeof_server_cert_der_2048
+ const unsigned char *key = server_key_der_2048;
+ #define sizeof_key sizeof_server_key_der_2048
+ const unsigned char *clientCert = client_cert_der_2048;
+ #define sizeof_clicert sizeof_client_cert_der_2048
#endif
#endif
@@ -199,5 +201,7 @@ void wolfSSL_TLS_server( )
}
wolfSSL_free(ssl);
+ wolfSSL_CTX_free(ctx);
+ wolfSSL_Cleanup();
tcp_sht_cep(cepid);
}
diff --git a/IDE/Renesas/e2studio/GR-ROSE/test/src/wolfssl_demo.h b/IDE/Renesas/e2studio/RX65N/RSK/test/src/wolfssl_demo.h
similarity index 92%
rename from IDE/Renesas/e2studio/GR-ROSE/test/src/wolfssl_demo.h
rename to IDE/Renesas/e2studio/RX65N/RSK/test/src/wolfssl_demo.h
index 96e0eab3f..664186b36 100644
--- a/IDE/Renesas/e2studio/GR-ROSE/test/src/wolfssl_demo.h
+++ b/IDE/Renesas/e2studio/RX65N/RSK/test/src/wolfssl_demo.h
@@ -26,15 +26,15 @@
/* Enable wolfcrypt test */
/* can be enabled with benchmark test */
-/* #define CRYPT_TEST */
+/*#define CRYPT_TEST*/
/* Enable benchmark */
/* can be enabled with cyrpt test */
-/* #define BENCHMARK*/
+/*#define BENCHMARK*/
/* Enable TLS client */
/* cannot enable with other definition */
-/*#define TLS_CLIENT*/
+#define TLS_CLIENT
/* Enable TLS server */
/* cannot enable with other definition */
@@ -42,7 +42,7 @@
void wolfSSL_TLS_client_init();
void wolfSSL_TLS_client();
-void wolfSSL_TLS_server_init();
+void wolfSSL_TLS_server_init(byte);
void wolfSSL_TLS_server();
#endif /* WOLFSSL_DEMO_H_ */
diff --git a/IDE/Renesas/e2studio/RX65N/RSK/test/test.rcpc b/IDE/Renesas/e2studio/RX65N/RSK/test/test.rcpc
new file mode 100644
index 000000000..c95d7611c
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/RSK/test/test.rcpc
@@ -0,0 +1,569 @@
+
+
+
+
+ ${
+ }
+
+
+
+
+ generate\dbsct.c
+ generate\hwsetup.c
+ generate\intprg.c
+ generate\iodefine.h
+ generate\resetprg.c
+ generate\sbrk.c
+ generate\sbrk.h
+ generate\stacksct.h
+ generate\typedefine.h
+ generate\vect.h
+ generate\vecttbl.c
+
+
+ ..\..\..\..\..\..\wolfcrypt\benchmark\benchmark.c
+ ..\..\..\..\..\..\wolfcrypt\benchmark\benchmark.h
+ src\key_data.c
+ src\key_data.h
+ ..\..\..\..\..\..\wolfcrypt\test\test.c
+ src\test_main.c
+ src\wolf_client.c
+ src\wolf_server.c
+ src\wolfssl_demo.h
+ ..\common\wolfssl_dummy.c
+
+
+ src\smc_gen\Config_TMR0\Config_TMR0.c
+ src\smc_gen\Config_TMR0\Config_TMR0.h
+ src\smc_gen\Config_TMR0\Config_TMR0_user.c
+
+
+ src\smc_gen\general\r_cg_hardware_setup.c
+ src\smc_gen\general\r_cg_macrodriver.h
+ src\smc_gen\general\r_cg_tmr.h
+ src\smc_gen\general\r_cg_userdefine.h
+ src\smc_gen\general\r_smc_cgc.c
+ src\smc_gen\general\r_smc_cgc.h
+ src\smc_gen\general\r_smc_cgc_user.c
+ src\smc_gen\general\r_smc_entry.h
+ src\smc_gen\general\r_smc_interrupt.c
+ src\smc_gen\general\r_smc_interrupt.h
+
+
+ src\smc_gen\r_bsp\platform.h
+ src\smc_gen\r_bsp\readme.txt
+
+
+ src\smc_gen\r_bsp\board\generic_rx65n\hwsetup.c
+ src\smc_gen\r_bsp\board\generic_rx65n\hwsetup.h
+ src\smc_gen\r_bsp\board\generic_rx65n\r_bsp.h
+ src\smc_gen\r_bsp\board\generic_rx65n\r_bsp_config_reference.h
+ src\smc_gen\r_bsp\board\generic_rx65n\r_bsp_interrupt_config_reference.h
+
+
+ src\smc_gen\r_bsp\board\user\r_bsp.h
+
+
+
+
+ src\smc_gen\r_bsp\doc\en\r01an1685ej0621-rx-bsp.pdf
+
+
+ src\smc_gen\r_bsp\doc\ja\r01an1685jj0621-rx-bsp.pdf
+
+
+
+
+ src\smc_gen\r_bsp\mcu\all\dbsct.c
+ src\smc_gen\r_bsp\mcu\all\fsp_common_api.h
+ src\smc_gen\r_bsp\mcu\all\lowlvl.c
+ src\smc_gen\r_bsp\mcu\all\lowlvl.h
+ src\smc_gen\r_bsp\mcu\all\lowsrc.c
+ src\smc_gen\r_bsp\mcu\all\lowsrc.h
+ src\smc_gen\r_bsp\mcu\all\mcu_locks.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_common.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_common.h
+ src\smc_gen\r_bsp\mcu\all\r_bsp_cpu.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_interrupts.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_interrupts.h
+ src\smc_gen\r_bsp\mcu\all\r_bsp_locking.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_mcu_startup.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_mcu_startup.h
+ src\smc_gen\r_bsp\mcu\all\r_bsp_software_interrupt.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_software_interrupt.h
+ src\smc_gen\r_bsp\mcu\all\r_fsp_error.h
+ src\smc_gen\r_bsp\mcu\all\r_rtos.h
+ src\smc_gen\r_bsp\mcu\all\r_rx_compiler.h
+ src\smc_gen\r_bsp\mcu\all\r_rx_intrinsic_functions.c
+ src\smc_gen\r_bsp\mcu\all\r_rx_intrinsic_functions.h
+ src\smc_gen\r_bsp\mcu\all\r_typedefs.h
+ src\smc_gen\r_bsp\mcu\all\resetprg.c
+ src\smc_gen\r_bsp\mcu\all\sbrk.c
+ src\smc_gen\r_bsp\mcu\all\sbrk.h
+
+
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_clocks.c
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_clocks.h
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_info.h
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_init.c
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_init.h
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_interrupts.c
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_interrupts.h
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_locks.h
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_mapped_interrupts.c
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_mapped_interrupts.h
+ src\smc_gen\r_bsp\mcu\rx65n\mcu_mapped_interrupts_private.h
+ src\smc_gen\r_bsp\mcu\rx65n\r_bsp_cpu.h
+ src\smc_gen\r_bsp\mcu\rx65n\r_bsp_locking.h
+ src\smc_gen\r_bsp\mcu\rx65n\vecttbl.c
+ src\smc_gen\r_bsp\mcu\rx65n\vecttbl.h
+
+
+ src\smc_gen\r_bsp\mcu\rx65n\register_access\ccrx\iodefine.h
+
+
+
+
+
+
+ src\smc_gen\r_cmt_rx\r_cmt_rx_if.h
+ src\smc_gen\r_cmt_rx\readme.txt
+
+
+ src\smc_gen\r_cmt_rx\doc\en\r01an1856ej0490-rx-timer.pdf
+
+
+ src\smc_gen\r_cmt_rx\doc\ja\r01an1856jj0490-rx-timer.pdf
+
+
+
+ src\smc_gen\r_cmt_rx\src\r_cmt_rx.c
+
+
+
+ src\smc_gen\r_config\r_bsp_config.h
+ src\smc_gen\r_config\r_bsp_config_readme.txt
+ src\smc_gen\r_config\r_bsp_interrupt_config.h
+ src\smc_gen\r_config\r_cmt_rx_config.h
+ src\smc_gen\r_config\r_ether_rx_config.h
+ src\smc_gen\r_config\r_sys_time_rx_config.h
+ src\smc_gen\r_config\r_t4_driver_rx_config.h
+ src\smc_gen\r_config\r_t4_rx_config.h
+ src\smc_gen\r_config\r_tsip_rx_config.h
+
+
+ src\smc_gen\r_ether_rx\r_ether_rx_if.h
+ src\smc_gen\r_ether_rx\readme.txt
+
+
+ src\smc_gen\r_ether_rx\doc\en\r01an2009ej0121-rx-ether.pdf
+
+
+ src\smc_gen\r_ether_rx\doc\ja\r01an2009jj0121-rx-ether.pdf
+
+
+
+ src\smc_gen\r_ether_rx\ref\r_ether_rx_config_reference.h
+
+
+ src\smc_gen\r_ether_rx\src\r_ether_rx.c
+ src\smc_gen\r_ether_rx\src\r_ether_rx_private.h
+
+ src\smc_gen\r_ether_rx\src\phy\phy.c
+ src\smc_gen\r_ether_rx\src\phy\phy.h
+
+
+
+ src\smc_gen\r_ether_rx\src\targets\rx65n\r_ether_setting_rx65n.c
+
+
+
+
+
+ src\smc_gen\r_pincfg\Pin.c
+ src\smc_gen\r_pincfg\Pin.h
+ src\smc_gen\r_pincfg\r_ether_rx_pinset.c
+ src\smc_gen\r_pincfg\r_ether_rx_pinset.h
+ src\smc_gen\r_pincfg\r_pinset.h
+
+
+ src\smc_gen\r_sys_time_rx\r_sys_time_rx_if.h
+ src\smc_gen\r_sys_time_rx\readme.txt
+
+
+ src\smc_gen\r_sys_time_rx\doc\en\r20an0431ej0101-rx-middle.pdf
+
+
+ src\smc_gen\r_sys_time_rx\doc\ja\r20an0431jj0101-rx-middle.pdf
+
+
+
+ src\smc_gen\r_sys_time_rx\ref\r_sys_time_rx_config_reference.h
+
+
+ src\smc_gen\r_sys_time_rx\src\r_sys_time_rx.c
+ src\smc_gen\r_sys_time_rx\src\r_sys_time_rx_private.h
+
+
+
+ src\smc_gen\r_t4_driver_rx\readme.txt
+
+
+ src\smc_gen\r_t4_driver_rx\doc\en\r20an0311ej0109-rx-t4.pdf
+
+
+ src\smc_gen\r_t4_driver_rx\doc\ja\r20an0311jj0109-rx-t4.pdf
+
+
+
+ src\smc_gen\r_t4_driver_rx\ref\r_t4_driver_rx_config_reference.h
+
+
+ src\smc_gen\r_t4_driver_rx\src\ether_callback.c
+ src\smc_gen\r_t4_driver_rx\src\t4_driver.c
+ src\smc_gen\r_t4_driver_rx\src\timer.c
+ src\smc_gen\r_t4_driver_rx\src\timer.h
+
+
+
+ src\smc_gen\r_t4_rx\readme.txt
+
+
+ src\smc_gen\r_t4_rx\doc\en\r20an0051ej0210-rx-t4.pdf
+ src\smc_gen\r_t4_rx\doc\en\r20uw0031ej0111-t4tiny.pdf
+ src\smc_gen\r_t4_rx\doc\en\r20uw0032ej0109-t4tiny.pdf
+
+
+ src\smc_gen\r_t4_rx\doc\ja\r20an0051jj0210-rx-t4.pdf
+ src\smc_gen\r_t4_rx\doc\ja\r20uw0031jj0111-t4tiny.pdf
+ src\smc_gen\r_t4_rx\doc\ja\r20uw0032jj0109-t4tiny.pdf
+
+
+
+ src\smc_gen\r_t4_rx\lib\r_mw_version.h
+ src\smc_gen\r_t4_rx\lib\r_stdint.h
+ src\smc_gen\r_t4_rx\lib\r_t4_itcpip.h
+
+
+ src\smc_gen\r_t4_rx\ref\r_t4_rx_config_reference.h
+
+
+ src\smc_gen\r_t4_rx\src\config_tcpudp.c
+
+
+
+ src\smc_gen\r_tsip_rx\r_tsip_rx_if.h
+ src\smc_gen\r_tsip_rx\readme.txt
+
+
+ src\smc_gen\r_tsip_rx\doc\en\r20an0548ej0114-rx-tsip-security.pdf
+
+
+ src\smc_gen\r_tsip_rx\doc\ja\r20an0548jj0114-rx-tsip-security.pdf
+
+
+
+ src\smc_gen\r_tsip_rx\ref\r_tsip_rx_config_reference.h
+
+
+
+
+
+ R5F565NEHxFC
+
+
+
+
+ -isa=rxv2
+ -fpu
+ -round=zero
+ -include="${ProjDirPath}\..\common"
+ -include="${ProjDirPath}\..\..\..\..\..\..\"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\Config_TMR0"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ -include="${ProjDirPath}\generate"
+ -define=DEBUG_CONSOLE,WOLFSSL_USER_SETTINGS
+ -utf8
+ -nomessage
+ -debug
+ -outcode=utf8
+ -optimize=0
+ -nologo
+ -lang=c99
+ -lang=cpp
+ -output=obj=${CONFIGDIR}\${FILELEAF}.obj
+ -obj_path=${CONFIGDIR}
+
+
+ -isa=rxv2
+ -fpu
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ -utf8
+ -debug
+ -nologo
+ -output=${CONFIGDIR}
+
+
+ -output="${ProjName}.abs"
+ -form=absolute
+ -nomessage
+ -vect=_undefined_interrupt_source_isr
+ -list=${ProjName}.map
+ -nooptimize
+ -rom=D=R,D_1=R_1,D_2=R_2
+ -cpu=RAM=00000000-0003ffff,FIX=00080000-00083fff,FIX=00086000-00087fff,FIX=00088000-0009ffff,FIX=000a0000-000a3fff,RAM=000a4000-000a5fff,FIX=000a6000-000bffff,FIX=000c0000-000dffff,FIX=000e0000-000fffff,ROM=00100000-00107fff,FIX=007fc000-007fcfff,FIX=007fe000-007fffff,RAM=00800000-0085ffff,RAM=fe7f5d00-fe7f5d7f,RAM=fe7f7d70-fe7f7d9f,ROM=ffe00000-ffffffff
+ -nologo
+ -library="${ProjDirPath}/../${ProjName}/src/smc_gen/r_t4_rx/lib/ccrx/T4_Library_ether_ccrx_rxv1_little_debug.lib"
+ -library="${ProjDirPath}/../${ProjName}/src/smc_gen/r_tsip_rx/lib/ccrx/r_tsip_rx65n_little.lib"
+ -library="${ProjDirPath}/../wolfssl/Debug/wolfssl.lib"
+ -start=SU,SI,B_1,R_1,B_2,R_2,B,R/04,B_ETHERNET_BUFFERS_1,B_RX_DESC_1,B_TX_DESC_1/020000,C_1,C_2,C,C$*,D*,W*,L,P/0FFE00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC
+ Auto
+
+
+ -isa=rxv2
+ -fpu
+ -round=zero
+ -lang=c99
+ -head=runtime,ctype,stdio,stdlib,string,new
+ -output="${ProjName}.lib"
+ -optimize=0
+ -nologo
+ BuildOptionChanged
+
+
+ HardwareDebug\benchmark.obj
+ HardwareDebug\key_data.obj
+ HardwareDebug\Config_TMR0.obj
+ HardwareDebug\Config_TMR0_user.obj
+ HardwareDebug\r_cg_hardware_setup.obj
+ HardwareDebug\r_smc_cgc.obj
+ HardwareDebug\r_smc_cgc_user.obj
+ HardwareDebug\r_smc_interrupt.obj
+ HardwareDebug\hwsetup.obj
+ HardwareDebug\dbsct.obj
+ HardwareDebug\lowlvl.obj
+ HardwareDebug\lowsrc.obj
+ HardwareDebug\mcu_locks.obj
+ HardwareDebug\r_bsp_common.obj
+ HardwareDebug\r_bsp_cpu.obj
+ HardwareDebug\r_bsp_interrupts.obj
+ HardwareDebug\r_bsp_locking.obj
+ HardwareDebug\r_bsp_mcu_startup.obj
+ HardwareDebug\r_bsp_software_interrupt.obj
+ HardwareDebug\r_rx_intrinsic_functions.obj
+ HardwareDebug\resetprg.obj
+ HardwareDebug\sbrk.obj
+ HardwareDebug\mcu_clocks.obj
+ HardwareDebug\mcu_init.obj
+ HardwareDebug\mcu_interrupts.obj
+ HardwareDebug\mcu_mapped_interrupts.obj
+ HardwareDebug\vecttbl.obj
+ HardwareDebug\r_cmt_rx.obj
+ HardwareDebug\phy.obj
+ HardwareDebug\r_ether_rx.obj
+ HardwareDebug\r_ether_setting_rx65n.obj
+ HardwareDebug\Pin.obj
+ HardwareDebug\r_ether_rx_pinset.obj
+ HardwareDebug\r_sys_time_rx.obj
+ HardwareDebug\ether_callback.obj
+ HardwareDebug\t4_driver.obj
+ HardwareDebug\timer.obj
+ HardwareDebug\config_tcpudp.obj
+ HardwareDebug\test.obj
+ HardwareDebug\test_main.obj
+ HardwareDebug\wolf_client.obj
+ HardwareDebug\wolf_server.obj
+ HardwareDebug\wolfssl_dummy.obj
+ HardwareDebug\test.lib
+
+
+
+
+
+
+
+
+ "${ProjDirPath}\..\common"
+ "${ProjDirPath}\..\..\..\..\..\..\"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\Config_TMR0"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ "${ProjDirPath}\generate"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ DEBUG_CONSOLE
+ WOLFSSL_USER_SETTINGS
+
+
+
+
+
+ -isa=rxv2
+ -fpu
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx231"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx66t"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx65n"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ -include="${ProjDirPath}\generate"
+ -define=DEBUG_CONSOLE
+ -utf8
+ -nomessage
+ -debug
+ -outcode=utf8
+ -nologo
+ -lang=c99
+ -lang=cpp
+ -output=obj=${CONFIGDIR}\${FILELEAF}.obj
+ -obj_path=${CONFIGDIR}
+
+
+ -isa=rxv2
+ -fpu
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ -utf8
+ -debug
+ -nologo
+ -output=${CONFIGDIR}
+
+
+ -output="${ProjName}.abs"
+ -form=absolute
+ -nomessage
+ -vect=_undefined_interrupt_source_isr
+ -list=${ProjName}.map
+ -nooptimize
+ -rom=D=R,D_1=R_1,D_2=R_2
+ -cpu=RAM=00000000-0003ffff,FIX=00080000-00083fff,FIX=00086000-00087fff,FIX=00088000-0009ffff,FIX=000a0000-000a3fff,RAM=000a4000-000a5fff,FIX=000a6000-000bffff,FIX=000c0000-000dffff,FIX=000e0000-000fffff,ROM=00100000-00107fff,FIX=007fc000-007fcfff,FIX=007fe000-007fffff,RAM=00800000-0085ffff,RAM=fe7f5d00-fe7f5d7f,RAM=fe7f7d70-fe7f7d9f,ROM=ffe00000-ffffffff
+ -nologo
+ -library="${ProjDirPath}/../${ProjName}/src/smc_gen/r_t4_rx/lib/T4_Library_rxv1_ether_little.lib"
+ -start=SU,SI,B_1,R_1,B_2,R_2,B,R/04,C_1,C_2,C,C$*,D*,W*,L,P*/0FFE00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC,B_ETHERNET_BUFFERS_1,B_RX_DESC_1,B_TX_DESC_1/00010000
+ Auto
+
+
+ -isa=rxv2
+ -fpu
+ -lang=c99
+ -head=runtime,stdio,stdlib,string,new
+ -output="${ProjName}.lib"
+ -nologo
+ BuildOptionChanged
+
+
+ Debug\benchmark.obj
+ Debug\key_data.obj
+ Debug\Config_TMR0.obj
+ Debug\Config_TMR0_user.obj
+ Debug\r_cg_hardware_setup.obj
+ Debug\r_smc_cgc.obj
+ Debug\r_smc_cgc_user.obj
+ Debug\r_smc_interrupt.obj
+ Debug\hwsetup.obj
+ Debug\dbsct.obj
+ Debug\lowlvl.obj
+ Debug\lowsrc.obj
+ Debug\mcu_locks.obj
+ Debug\r_bsp_common.obj
+ Debug\r_bsp_cpu.obj
+ Debug\r_bsp_interrupts.obj
+ Debug\r_bsp_locking.obj
+ Debug\r_bsp_mcu_startup.obj
+ Debug\r_bsp_software_interrupt.obj
+ Debug\r_rx_intrinsic_functions.obj
+ Debug\resetprg.obj
+ Debug\sbrk.obj
+ Debug\mcu_clocks.obj
+ Debug\mcu_init.obj
+ Debug\mcu_interrupts.obj
+ Debug\mcu_mapped_interrupts.obj
+ Debug\vecttbl.obj
+ Debug\r_cmt_rx.obj
+ Debug\phy.obj
+ Debug\r_ether_rx.obj
+ Debug\r_ether_setting_rx65n.obj
+ Debug\Pin.obj
+ Debug\r_ether_rx_pinset.obj
+ Debug\r_sys_time_rx.obj
+ Debug\ether_callback.obj
+ Debug\t4_driver.obj
+ Debug\timer.obj
+ Debug\config_tcpudp.obj
+ Debug\test.obj
+ Debug\test_main.obj
+ Debug\wolf_client.obj
+ Debug\wolf_server.obj
+ Debug\wolfssl_dummy.obj
+ Debug\test.lib
+
+
+
+
+
+
+
+
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx231"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx66t"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx65n"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ "${ProjDirPath}\generate"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ DEBUG_CONSOLE
+
+
+
+
+
diff --git a/IDE/Renesas/e2studio/RX65N/RSK/test/test_HardwareDebug.launch b/IDE/Renesas/e2studio/RX65N/RSK/test/test_HardwareDebug.launch
new file mode 100644
index 000000000..6c2a55cc8
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/RSK/test/test_HardwareDebug.launch
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/IDE/Renesas/e2studio/RX65N/RSK/wolfssl/.cproject b/IDE/Renesas/e2studio/RX65N/RSK/wolfssl/.cproject
new file mode 100644
index 000000000..eefb6e873
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/RSK/wolfssl/.cproject
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/GR-ROSE/wolfssl/.project b/IDE/Renesas/e2studio/RX65N/RSK/wolfssl/.project
similarity index 59%
rename from IDE/Renesas/e2studio/GR-ROSE/wolfssl/.project
rename to IDE/Renesas/e2studio/RX65N/RSK/wolfssl/.project
index a2f1351e7..b97788fd0 100644
--- a/IDE/Renesas/e2studio/GR-ROSE/wolfssl/.project
+++ b/IDE/Renesas/e2studio/RX65N/RSK/wolfssl/.project
@@ -27,372 +27,377 @@
src/crl.c
1
- PARENT-5-PROJECT_LOC/src/crl.c
+ PARENT-6-PROJECT_LOC/src/crl.c
src/internal.c
1
- PARENT-5-PROJECT_LOC/src/internal.c
+ PARENT-6-PROJECT_LOC/src/internal.c
src/keys.c
1
- PARENT-5-PROJECT_LOC/src/keys.c
+ PARENT-6-PROJECT_LOC/src/keys.c
src/ocsp.c
1
- PARENT-5-PROJECT_LOC/src/ocsp.c
+ PARENT-6-PROJECT_LOC/src/ocsp.c
src/sniffer.c
1
- PARENT-5-PROJECT_LOC/src/sniffer.c
+ PARENT-6-PROJECT_LOC/src/sniffer.c
src/ssl.c
1
- PARENT-5-PROJECT_LOC/src/ssl.c
+ PARENT-6-PROJECT_LOC/src/ssl.c
src/tls.c
1
- PARENT-5-PROJECT_LOC/src/tls.c
+ PARENT-6-PROJECT_LOC/src/tls.c
src/tls13.c
1
- PARENT-5-PROJECT_LOC/src/tls13.c
+ PARENT-6-PROJECT_LOC/src/tls13.c
src/wolfio.c
1
- PARENT-5-PROJECT_LOC/src/wolfio.c
+ PARENT-6-PROJECT_LOC/src/wolfio.c
+
+
+ wolfcrypt/port/renesas_common.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_common.c
wolfcrypt/port/renesas_tsip_aes.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c
wolfcrypt/port/renesas_tsip_sha.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c
wolfcrypt/port/renesas_tsip_util.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_util.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_util.c
wolfcrypt/src/aes.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/aes.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/aes.c
wolfcrypt/src/arc4.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/arc4.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/arc4.c
wolfcrypt/src/asm.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/asm.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/asm.c
wolfcrypt/src/asn.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/asn.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/asn.c
wolfcrypt/src/blake2b.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/blake2b.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/blake2b.c
wolfcrypt/src/camellia.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/camellia.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/camellia.c
wolfcrypt/src/chacha.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/chacha.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/chacha.c
wolfcrypt/src/chacha20_poly1305.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/chacha20_poly1305.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/chacha20_poly1305.c
wolfcrypt/src/cmac.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/cmac.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/cmac.c
wolfcrypt/src/coding.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/coding.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/coding.c
wolfcrypt/src/compress.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/compress.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/compress.c
wolfcrypt/src/cpuid.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/cpuid.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/cpuid.c
wolfcrypt/src/cryptocb.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/cryptocb.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/cryptocb.c
wolfcrypt/src/curve25519.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/curve25519.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/curve25519.c
wolfcrypt/src/des3.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/des3.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/des3.c
wolfcrypt/src/dh.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/dh.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/dh.c
wolfcrypt/src/dsa.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/dsa.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/dsa.c
wolfcrypt/src/ecc.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/ecc.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ecc.c
wolfcrypt/src/ecc_fp.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/ecc_fp.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ecc_fp.c
wolfcrypt/src/ed25519.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/ed25519.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ed25519.c
wolfcrypt/src/error.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/error.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/error.c
wolfcrypt/src/fe_low_mem.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/fe_low_mem.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/fe_low_mem.c
wolfcrypt/src/fe_operations.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/fe_operations.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/fe_operations.c
wolfcrypt/src/ge_low_mem.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/ge_low_mem.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ge_low_mem.c
wolfcrypt/src/ge_operations.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/ge_operations.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ge_operations.c
wolfcrypt/src/hash.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/hash.c
-
-
- wolfcrypt/src/kdf.c
- 1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/kdf.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/hash.c
wolfcrypt/src/hc128.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/hc128.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/hc128.c
wolfcrypt/src/hmac.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/hmac.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/hmac.c
wolfcrypt/src/idea.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/idea.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/idea.c
wolfcrypt/src/include.am
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/include.am
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/include.am
wolfcrypt/src/integer.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/integer.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/integer.c
+
+
+ wolfcrypt/src/kdf.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/kdf.c
wolfcrypt/src/logging.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/logging.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/logging.c
wolfcrypt/src/md2.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/md2.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/md2.c
wolfcrypt/src/md4.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/md4.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/md4.c
wolfcrypt/src/md5.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/md5.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/md5.c
wolfcrypt/src/memory.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/memory.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/memory.c
wolfcrypt/src/pkcs12.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/pkcs12.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/pkcs12.c
wolfcrypt/src/pkcs7.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/pkcs7.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/pkcs7.c
wolfcrypt/src/poly1305.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/poly1305.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/poly1305.c
wolfcrypt/src/pwdbased.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/pwdbased.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/pwdbased.c
wolfcrypt/src/rabbit.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/rabbit.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/rabbit.c
wolfcrypt/src/random.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/random.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/random.c
wolfcrypt/src/ripemd.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/ripemd.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ripemd.c
wolfcrypt/src/rsa.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/rsa.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/rsa.c
wolfcrypt/src/sha.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sha.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sha.c
wolfcrypt/src/sha256.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sha256.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sha256.c
wolfcrypt/src/sha3.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sha3.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sha3.c
wolfcrypt/src/sha512.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sha512.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sha512.c
wolfcrypt/src/signature.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/signature.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/signature.c
wolfcrypt/src/sp_arm32.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_arm32.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_arm32.c
wolfcrypt/src/sp_arm64.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_arm64.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_arm64.c
wolfcrypt/src/sp_c32.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_c32.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_c32.c
wolfcrypt/src/sp_c64.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_c64.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_c64.c
wolfcrypt/src/sp_int.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_int.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_int.c
wolfcrypt/src/sp_x86_64.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_x86_64.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_x86_64.c
wolfcrypt/src/srp.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/srp.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/srp.c
wolfcrypt/src/tfm.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/tfm.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/tfm.c
wolfcrypt/src/wc_encrypt.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/wc_encrypt.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/wc_encrypt.c
wolfcrypt/src/wc_port.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/wc_port.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/wc_port.c
wolfcrypt/src/wolfevent.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/wolfevent.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/wolfevent.c
wolfcrypt/src/wolfmath.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/wolfmath.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/wolfmath.c
diff --git a/IDE/Renesas/e2studio/RX65N/RSK/wolfssl/wolfssl.rcpc b/IDE/Renesas/e2studio/RX65N/RSK/wolfssl/wolfssl.rcpc
new file mode 100644
index 000000000..042906520
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX65N/RSK/wolfssl/wolfssl.rcpc
@@ -0,0 +1,225 @@
+
+
+
+
+ ${
+ }
+
+
+
+
+ ..\..\..\..\..\..\src\crl.c
+ ..\..\..\..\..\..\src\internal.c
+ ..\..\..\..\..\..\src\keys.c
+ ..\..\..\..\..\..\src\ocsp.c
+ ..\..\..\..\..\..\src\sniffer.c
+ ..\..\..\..\..\..\src\ssl.c
+ ..\..\..\..\..\..\src\tls.c
+ ..\..\..\..\..\..\src\tls13.c
+ ..\..\..\..\..\..\src\wolfio.c
+
+
+
+ ..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_common.c
+ ..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_aes.c
+ ..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_sha.c
+ ..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_util.c
+
+
+ ..\..\..\..\..\..\wolfcrypt\src\aes.c
+ ..\..\..\..\..\..\wolfcrypt\src\arc4.c
+ ..\..\..\..\..\..\wolfcrypt\src\asm.c
+ ..\..\..\..\..\..\wolfcrypt\src\asn.c
+ ..\..\..\..\..\..\wolfcrypt\src\blake2b.c
+ ..\..\..\..\..\..\wolfcrypt\src\camellia.c
+ ..\..\..\..\..\..\wolfcrypt\src\chacha.c
+ ..\..\..\..\..\..\wolfcrypt\src\chacha20_poly1305.c
+ ..\..\..\..\..\..\wolfcrypt\src\cmac.c
+ ..\..\..\..\..\..\wolfcrypt\src\coding.c
+ ..\..\..\..\..\..\wolfcrypt\src\compress.c
+ ..\..\..\..\..\..\wolfcrypt\src\cpuid.c
+ ..\..\..\..\..\..\wolfcrypt\src\cryptocb.c
+ ..\..\..\..\..\..\wolfcrypt\src\curve25519.c
+ ..\..\..\..\..\..\wolfcrypt\src\des3.c
+ ..\..\..\..\..\..\wolfcrypt\src\dh.c
+ ..\..\..\..\..\..\wolfcrypt\src\dsa.c
+ ..\..\..\..\..\..\wolfcrypt\src\ecc.c
+ ..\..\..\..\..\..\wolfcrypt\src\ecc_fp.c
+ ..\..\..\..\..\..\wolfcrypt\src\ed25519.c
+ ..\..\..\..\..\..\wolfcrypt\src\error.c
+ ..\..\..\..\..\..\wolfcrypt\src\fe_low_mem.c
+ ..\..\..\..\..\..\wolfcrypt\src\fe_operations.c
+ ..\..\..\..\..\..\wolfcrypt\src\ge_low_mem.c
+ ..\..\..\..\..\..\wolfcrypt\src\ge_operations.c
+ ..\..\..\..\..\..\wolfcrypt\src\hash.c
+ ..\..\..\..\..\..\wolfcrypt\src\hc128.c
+ ..\..\..\..\..\..\wolfcrypt\src\hmac.c
+ ..\..\..\..\..\..\wolfcrypt\src\idea.c
+ ..\..\..\..\..\..\wolfcrypt\src\integer.c
+ ..\..\..\..\..\..\wolfcrypt\src\kdf.c
+ ..\..\..\..\..\..\wolfcrypt\src\logging.c
+ ..\..\..\..\..\..\wolfcrypt\src\md2.c
+ ..\..\..\..\..\..\wolfcrypt\src\md4.c
+ ..\..\..\..\..\..\wolfcrypt\src\md5.c
+ ..\..\..\..\..\..\wolfcrypt\src\memory.c
+ ..\..\..\..\..\..\wolfcrypt\src\pkcs12.c
+ ..\..\..\..\..\..\wolfcrypt\src\pkcs7.c
+ ..\..\..\..\..\..\wolfcrypt\src\poly1305.c
+ ..\..\..\..\..\..\wolfcrypt\src\pwdbased.c
+ ..\..\..\..\..\..\wolfcrypt\src\rabbit.c
+ ..\..\..\..\..\..\wolfcrypt\src\random.c
+ ..\..\..\..\..\..\wolfcrypt\src\ripemd.c
+ ..\..\..\..\..\..\wolfcrypt\src\rsa.c
+ ..\..\..\..\..\..\wolfcrypt\src\sha.c
+ ..\..\..\..\..\..\wolfcrypt\src\sha256.c
+ ..\..\..\..\..\..\wolfcrypt\src\sha3.c
+ ..\..\..\..\..\..\wolfcrypt\src\sha512.c
+ ..\..\..\..\..\..\wolfcrypt\src\signature.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_arm32.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_arm64.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_c32.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_c64.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_int.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_x86_64.c
+ ..\..\..\..\..\..\wolfcrypt\src\srp.c
+ ..\..\..\..\..\..\wolfcrypt\src\tfm.c
+ ..\..\..\..\..\..\wolfcrypt\src\wc_encrypt.c
+ ..\..\..\..\..\..\wolfcrypt\src\wc_port.c
+ ..\..\..\..\..\..\wolfcrypt\src\wolfevent.c
+ ..\..\..\..\..\..\wolfcrypt\src\wolfmath.c
+
+
+
+ R5F565NEHxFC
+
+
+
+
+ -isa=rxv2
+ -fpu
+ -include="${ProjDirPath}\..\common"
+ -include="${ProjDirPath}\\..\..\..\..\..\..\"
+ -include="${ProjDirPath}\..\test\src\smc_gen\"
+ -include="${ProjDirPath}\..\test\src\smc_gen\r_bsp"
+ -include="${ProjDirPath}\..\test\src\smc_gen\r_config"
+ -include="${ProjDirPath}\..\test\src\smc_gen\r_tsip_rx"
+ -define=WOLFSSL_USER_SETTINGS
+ -utf8
+ -nomessage
+ -debug
+ -outcode=utf8
+ -optimize=0
+ -nologo
+ -lang=c99
+ -lang=cpp
+ -output=obj=${CONFIGDIR}\${FILELEAF}.obj
+ -obj_path=${CONFIGDIR}
+
+
+ -isa=rxv2
+ -fpu
+ -utf8
+ -debug
+ -nologo
+ -output=${CONFIGDIR}
+
+
+ -output="${ProjName}.lib"
+ -form=library=u
+ -nomessage
+ -list=${ProjName}.lbp
+ -nologo
+ Auto
+
+
+ None
+
+
+ Debug\crl.obj
+ Debug\internal.obj
+ Debug\keys.obj
+ Debug\ocsp.obj
+ Debug\sniffer.obj
+ Debug\ssl.obj
+ Debug\tls.obj
+ Debug\tls13.obj
+ Debug\wolfio.obj
+ Debug\renesas_common.obj
+ Debug\renesas_tsip_aes.obj
+ Debug\renesas_tsip_sha.obj
+ Debug\renesas_tsip_util.obj
+ Debug\aes.obj
+ Debug\arc4.obj
+ Debug\asm.obj
+ Debug\asn.obj
+ Debug\blake2b.obj
+ Debug\camellia.obj
+ Debug\chacha.obj
+ Debug\chacha20_poly1305.obj
+ Debug\cmac.obj
+ Debug\coding.obj
+ Debug\compress.obj
+ Debug\cpuid.obj
+ Debug\cryptocb.obj
+ Debug\curve25519.obj
+ Debug\des3.obj
+ Debug\dh.obj
+ Debug\dsa.obj
+ Debug\ecc.obj
+ Debug\ecc_fp.obj
+ Debug\ed25519.obj
+ Debug\error.obj
+ Debug\fe_low_mem.obj
+ Debug\fe_operations.obj
+ Debug\ge_low_mem.obj
+ Debug\ge_operations.obj
+ Debug\hash.obj
+ Debug\hc128.obj
+ Debug\hmac.obj
+ Debug\idea.obj
+ Debug\integer.obj
+ Debug\kdf.obj
+ Debug\logging.obj
+ Debug\md2.obj
+ Debug\md4.obj
+ Debug\md5.obj
+ Debug\memory.obj
+ Debug\pkcs12.obj
+ Debug\pkcs7.obj
+ Debug\poly1305.obj
+ Debug\pwdbased.obj
+ Debug\rabbit.obj
+ Debug\random.obj
+ Debug\ripemd.obj
+ Debug\rsa.obj
+ Debug\sha.obj
+ Debug\sha256.obj
+ Debug\sha3.obj
+ Debug\sha512.obj
+ Debug\signature.obj
+ Debug\sp_arm32.obj
+ Debug\sp_arm64.obj
+ Debug\sp_c32.obj
+ Debug\sp_c64.obj
+ Debug\sp_int.obj
+ Debug\sp_x86_64.obj
+ Debug\srp.obj
+ Debug\tfm.obj
+ Debug\wc_encrypt.obj
+ Debug\wc_port.obj
+ Debug\wolfevent.obj
+ Debug\wolfmath.obj
+
+
+ "${ProjDirPath}\..\common"
+ "${ProjDirPath}\\..\..\..\..\..\..\"
+ "${ProjDirPath}\..\test\src\smc_gen\"
+ "${ProjDirPath}\..\test\src\smc_gen\r_bsp"
+ "${ProjDirPath}\..\test\src\smc_gen\r_config"
+ "${ProjDirPath}\..\test\src\smc_gen\r_tsip_rx"
+ WOLFSSL_USER_SETTINGS
+
+
+
+
+
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/README_EN.md b/IDE/Renesas/e2studio/RX72N/EnvisionKit/README_EN.md
new file mode 100644
index 000000000..d9c34f1d7
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/README_EN.md
@@ -0,0 +1,244 @@
+wolfSSL sample application project for Renesas RX72N EnvisionKit evaluation board
+======
+
+
+
+## 1. Overview
+-----
+
+We provide a sample program for evaluating wolfSSL targeting the Renesas RX72N EnvisionKit evaluation board. The sample program runs in a bare metal environment that does not use a real-time OS and uses e2 studio as an IDE. This document describes the procedure from build to execution of the sample program.
+
+The sample provided is a single application that can evaluate the following three functions:
+
+- CryptoTest: A program that automatically tests various cryptographic operation functions
+- Benchmark: A program that measures the execution speed of various cryptographic operations
+- TlsClient: A program that performs TLS communication with the opposite TLS server application
+
+
+Since the H/W settings and S/W settings for operating the evaluation board have already been prepared, the minimum settings are required to operate the sample application. In addition, the RootCA certificate and server-side certificate required for TLS communication have already been set for sample use only.
+
+The following sections will walk you through the steps leading up to running the sample application.
+
+
+## 2. Target H/W, components and libraries
+-----
+
+This sample program uses the following hardware and software libraries. If a new version of the software component is available at the time of use, please update it as appropriate.
+
+|item|name & version|
+|:--|:--|
+|Board|Renesas RX72N EnvisionKit|
+|Device|R5F572NNHxFB|
+|IDE| Renesas e2Studio Version:2021-10 |
+|Emulator| On-board Emulator E2 Lite |
+|Toolchain|CCRX v3.03.00|
+|TSIP| TSIP v1.14|
+
+
+The project of this sample program has a configuration file that uses the following FIT components.
+However, the FIT components themselves are not included in the distribution of this sample application. You need to download it by operating in the IDE. Some FIT components (TSIPs) cannot be downloaded directly from within the IDE and may need to be downloaded separately from the Renesas download site.
+
+
+|FIT component|version|name|
+|:--|:--|:--|
+|8bit timer|1.9.0|Config_TMR0|
+|Board Support Packages|6.21|r_bsp|
+|CMT driver|4.90|r_cmt_rx|
+|Ethernet Driver|1.21|r_ether_rx|1.21|r_ether_rx|
+|Generic system timer for RX MCUs|1.01|r_sys_time_rx|
+|TCP/IP protocol stack[M3S-T4-Tiny] - RX Ethernet Driver Interface|1.09|r_t4_driver_rx|
+|TCP/IP protocol stack[M3S-T4-Tiny] for Renesas MCUs|2.10|r_t4_rx|
+|TSIP(Trusted Secure IP) driver|1.14|r_tsip_rx|
+
+
+Note) As of December 2021, TIPS v1.13 does not seem to be able to be added as a FIT component by adding a component in the Smart Configurator Perspective. Add it manually along the method described later.
+
+
+## 3. Importing sample application project into e2Studio
+----
+
+There is no need to create a new sample program. Since the project file is already prepared, please import the project from the IDE by following the steps below.
+
++ e2studio "File" menu> "Open project from file system ..."> "Directory (R) ..." Click the import source button and select the folder from which the project will be imported. Select the folder (Renesas/e2studio/\/\/)) where this README file exists.
++ Four projects that can be imported are listed, but check only the three projects "smc", "test" and "wolfssl" and click the "Finish" button.
+
+You should see the **smc**, **test**, and **wolfssl** 3 projects you imported into the project explorer.
+
+
+## 4. FIT module download and smart configurator file generation
+----
+
+You will need to get the required FIT modules yourself. Follow the steps below to get them.
+
+1. Open the smc project in Project Explorer and double-click the **smc.scfg** file to open the Smart Configurator Perspective.
+
+2. Select the "Components" tab on the software component settings pane. Then click the "Add Component" button at the top right of the pane. The software component selection dialog will pop up. Click "Download the latest version of FIT driver and middleware" at the bottom of the dialog to get the modules. You can check the dowmload destination folder by pressing "Basic settings...".
+
+3. The latest version of the TSIP component may not be automatically obtained due to the delay in Renesas' support by the method in step 2 above. In that case, you can download it manually from the Renesas website. Unzip the downloaded component and store the files contained in the FIT Modules folder in the download destination folder of step 2.
+
+4. Select the required FIT components shown from the list and press the "Finish" button. Repeat this operation until you have the required FIT components.
+
+5. Select the Components tab on the Software Component Settings pane and select the r_t4_rx component. In the settings pane on the right, specify the IP address of this board as the value of the "# IP address for ch0, when DHCP disable." Property (e.g. 192.168.1.9).
+
+6. Press the "Generate Code" button at the top right of the software component settings pane to have the smart configurator generate the source files. A src/smc_gen folder will be created under the smc project to store source files, libraries, etc.
+
+
+
+## 5. Adding smc_gen files to the test project
+----
+
+The test project is a sample application project. When you open the test project in the project explorer, there is a src folder, which contains the source files of the sample application. Add the source files by copying and pasting the smc_gen folder generated in the step5, directly under this src folder.
+
+Make sure you have a folder hierarchy like this:
+
+```
+/test/src/smc_gen
+```
+
+
+## 6. Select the behavior of the test application
+----
+
+The test project is a single sample application, but you can specify to perform one of the following by switching the settings:
+
+- CryptoTest: A program that automatically tests various encryption operation functions
+- Benchmark: A program that measures the execution speed of various cryptographic operations
+- TlsClient: A program that performs TLS communication with the opposite TLS server application
+
+Open the /test/src/wolfssl_demo.h file and enable one of the following definitions:
+
+- #define CRYPT_TEST
+- #define BENCHMARK
+- #define TLS_CLIENT
+
+Then build the test application.
+
+
+
+## 7. Build and run the test application
+-----
+
+Now that the test application is ready to build.
+
+1. Build the wolfssl project on the project explorer, then the test project.
+
+2. After a successful build, connect the target board to the emulator and supply external power.
+
+3. Select "Run" menu> "Debug" to open the debug perspective.
+
+4. The test application outputs the operating status to the standard output. Keep the "Renesas Debug Virtual Console" open for viewing this standard output.
+
+5. Press the run button to run the test application.
+
+6. CryptoTest, Benchmark or TLS_Client After displaying the execution result according to the selected behavior, it enters an infinite loop, so if you think that the output has stopped, stop debugging.
+
+
+## 8. Running test application as TLS_Client
+-----
+
+### 8.1 Generate a server application
+
+To operate as TLS_Client, an opposite application for TLS communication is required. A wolfSSL package provides a server sample application that you can use for this purpose. This program is generated by building wolfssl. You can build wolfSSL on Linux (including MacOS and WSL) with gcc installed or build using Visual Studio. The following introduces the build on WSL.
+
+
+```
+$ cd
+$ ./autogen.sh
+$ ./configure CFLAGS="-DWOLFSSL_STATIC_RSA -DHAVEAES_CBC"
+$ make
+```
+
+
+
+With the above build, /examples/server/server
+Is generated. This executable acts as a TLS server application. If you execute it with the following options, it will be in the listening state for the connection from TLS_Client.
+
+
+```
+$ examples/server/server -b -d -i
+```
+
+
+For the test application, specify the IP address assigned to the server application.
+
+Open wolf_client.c to specify ip address of the server in "#define SIMPLE_TLSSEVER_IP" like as:
+
+
+```
+-- /test/src/wolf_client.c --
+
+...
+#define SIMPLE_TLSSEVER_IP 192.168.53.9
+...
+```
+
+Save the file and rebuild the test application. When you run the test application, it makes a TLS connection with the opposite application, then exchanges a simple string and displays the following on the standard output.
+
+
+```
+cipher : ECDHE-RSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : AES256-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+```
+
+
+### 8.2 Change server certificate (change authentication method)
+
+The above is an execution example when the server certificate presented by the server application contains the RSA public key (RSA authentication). TSIP can also handle cases where the server certificate contains an ECC public key (ECDSA authentication).
+
+
+If you want to use a cipher suite that includes ECDSA, you will need to change the settings of the test application and rebuild. Open common/ user_settings.h, enable the USE_ECC_CERT definition and rebuild.
+
+
+```
+-- /common/user_settings.h --
+
+#define USE_ECC_CERT
+```
+
+This definition causes the test application to use a RootCA certificate that can validate the server certificate containing the ECC public key presented by the server.
+
+
+In addition, the opposite server application also needs to specify the server certificate and private key file containing the ECC public key as an option, and then execute it as shown below.
+
+
+```
+$ ./examples/server/server -b -d -i -c ./certs/server-ecc.pem -k ./certs/ecc-key.pem
+```
+
+The following is displayed as the execution result.
+
+
+```
+cipher : ECDHE-ECDSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-ECDSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+```
+
+
+## 9. What you need to do to use the RootCA certificate prepared by the user
+----
+
+In this sample program, the RootCA certificate required to operate as TLS_Client and the server certificate used by the sample TLS server application are certificates that can be used only for evaluation.
+If you want to use it for purposes beyond functional evaluation, you need to prepare the RootCA certificate yourself. with this,
+ 1. Provisioning key
+ 2. RSA key pair required for RootCA certificate validation
+ 3. The signature generated by the RootCA certificate with the private key in 2 above.
+
+will become necessary. Please refer to the manual provided by Renesas for how to generate them.
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/README_JP.md b/IDE/Renesas/e2studio/RX72N/EnvisionKit/README_JP.md
new file mode 100644
index 000000000..08ddc0d4f
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/README_JP.md
@@ -0,0 +1,251 @@
+Renesas RX72N EnvisionKit用 wolfSSLサンプルプロジェクト
+======
+
+
+
+## 1. 概要
+-----
+
+Renesas社製 RX72N EnvisionKit 評価ボードをターゲットとしてwolfSSLを評価するためのサンプルプログラムを提供します。サンプルプログラムはリアルタイムOSを使わないベアメタル環境で動作し、IDEとしてe2 studioを使用するものです。本ドキュメントではサンプルプログラムのビルドから実行までの手順を説明します。
+
+提供するサンプルプログラムは次の3機能を評価できる単一のアプリケーションです:
+
+- CryptoTest: 各種暗号化オペレーション機能を自動テストするプログラム
+- Benchmark: 各種暗号化オペレーションの実行速度を測定するプログラム
+- TlsClient: 対向するTLSサーバーアプリケーションとTLS通信を行うプログラム
+
+評価ボードを動作させる為のH/W設定、S/W設定は既に用意していますから、サンプルプロジェクトの動作までは最少の設定で済むようになっています。また、TLS通信において必要となる、RootCA証明書、サーバー側証明書もサンプル使用に限定したものが既に設定済みです。
+
+以降のセクションはサンプルアプリケーションの実行までのステップを順に説明していきます。
+
+
+
+## 2. ターゲットとしているH/W、コンポーネント、ライブラリ
+-----
+
+このサンプルプログラムでは以下のハードウエアやソソフトウエアライブラリを使用しています。皆さんがご利用時にバージョンの新しいソフトウエアコンポーネントが利用可能であれば適宜更新の上ご利用ください。
+
+
+|要素|名称/バージョン|
+|:--|:--|
+|評価ボード|RX72N EnvisionKit|
+|Device|R5F572NNHxFB|
+|IDE| Renesas e2Studio Version:2021-10 |
+|エミュレーター| On-board Emulator E2 Lite|
+|Toolchain|CCRX v3.03.00|
+|TSIP| TSIP v1.14|
+
+
+本サンプルプログラムのプロジェクトには以下のFITコンポーネントを使用する設定ファイルが用意されています。
+しかし、FITコンポーネント群そのものは本サンプルアプリケーションの配布物としては含まれていません。皆さん自身でIDE内の操作によってダウンロードしていただく必要があります。一部のFITコンポーネント(TSIP)はIDE内から直接ダウンロードできず、Renesas社のダウンロードサイトから別途ダウンロードが必要なものがあります。
+
+
+
+
+|FITコンポーネント|バージョン|略称|
+|:--|:--|:--|
+|8ビットタイマー|1.9.0|Config_TMR0|
+|Board Support Packages|6.21|r_bsp|
+|CMT driver|4.90|r_cmt_rx|
+|Ethernet Driver|1.21|r_ether_rx|1.21|r_ether_rx|
+|Generic system timer for RX MCUs|1.01|r_sys_time_rx|
+|TCP/IP protocol stack[M3S-T4-Tiny] - RX Ethernet Driver Interface|1.09|r_t4_driver_rx|
+|TCP/IP protocol stack[M3S-T4-Tiny] for Renesas MCUs|2.10|r_t4_rx|
+|TSIP(Trusted Secure IP) driver|1.14|r_tsip_rx|
+
+(注意)2021年12月現在、TIPSv1.14はFITコンポーネントとしてスマートコンフィギュレータパースペクティブのコンポーネントの追加操作では追加できないようです。後ほど説明する手動での追加方法を使って追加してください。
+
+
+
+
+## 3. サンプルプログラムプロジェクトのe2Studioへのインポート
+----
+
+サンプルプログラムは新規作成する必要はありません。すでにプロジェクトファイルが用意されていますからIDEから以下の手順でプロジェクトをインポートしてください。
+
+
++ 1.e2studioの"ファイル"メニュー > "ファイル・システムからプロジェクトを開く..." > "ディレクトリ(R)..."インポート元ボタンを押して、プロジェクトのインポート元となるフォルダーを選択します。本READMEファイルが存在するフォルダ(wolfssl/IDE/Renesas/e2studio/\/\/)を選択してください。
+
++ インポートできるプロジェクトが4つリストアップされますが、"smc", "test" と"wolfssl"の3プロジェクトにのみチェックを入れて”終了”ボタンを押してください。
+
+プロジェクト・エクスプローラーにインポートしたsmc,test,wolfsslの3プロジェクトが表示されるはずです。
+
+
+## 4. FITモジュールの取得とスマートコンフィギュレータによるファイル生成
+----
+
+FITモジュールは皆さん自身で取得していただく必要があります。以下の手順で取得してください。
+
+
+
+1. プロジェクト・エクスプローラー上でsmcプロジェクトを開き**smc.scfg**ファイルをダブルクリックして、スマートコンフィギュレータパースペクティブを開きます。
+
+2. ソフトウエアコンポーネント設定画面の"コンポーネント"タブを選択 > 画面右上の"コンポーネントの追加" ボタンを押して下さい。ソフトウエアコンポーネントの選択ダイアログが表示されます。ここで、画面下部の"最新版のFITドライバとミドルウエアをダウンロードする"を押して、モジュール群を取得しておいてください。ダウンロード先のフォルダは"基本設定..."を押して確認することができます。
+
+3. TSIPコンポーネントは上記ステップ2の方法ではRenesas社の対応が遅れていて最新版が自動的には取得できないことがあります。その場合にはRenesas社のサイトから手動でダウンロードできます。ダウンロードしたコンポーネントのを解凍し、FITModulesフォルダに含まれているファイル群をステップ2のダウンロード先フォルダに格納してください。
+
+4. 先に示したFITコンポーネントを一覧から選択して"終了"ボタンを押します。この操作を必要なFITコンポーネントを得るまで繰り返し行います。
+
+5. ソフトウエアコンポーネント設定画面のコンポーネントタブを選択し、r_t4_rxコンポーネントを選択します。右の設定ペインに"# IP address for ch0, when DHCP disable."プロパティの値として、このボードのIPアドレスを皆さんの環境に合わせてて指定します(例:
+192.168.1.9)。
+
+6. ソフトウエアコンポーネント設定画面の右上の”コードの生成"ボタンを押して、スマートコンフィギュレータにソースファイルを生成させます。smcプロジェクトの下にsrc/smc_genフォルダが生成され、ソースファイル、ライブラリ等が格納されされます。
+
+
+
+## 5. testプロジェクトへのsmc_genファイル群の追加
+----
+
+testプロジェクトはサンプルアプリケーションのプロジェクトです。プロジェクト・エクスプローラー上でtestプロジェクトを開くとsrcフォルダが存在し、そこにサンプルアプリケーションのソースファイルが格納されています。このsrcフォルダ直下に4-5で生成したsmc_genフォルダごとコピー&ペーストしてソースファイルを追加します。
+
+test/src/smc_gen
+
+のようなフォルダ階層になることを確認してください。
+
+
+## 6. testアプリケーションの動作を選択する
+----
+testプロジェクトが唯一のサンプルアプリケーションですが、その動作を設定で切り替えることによって、
+
+- CryptoTest: 各種暗号化オペレーション機能を自動テストするプログラム
+- Benchmark: 各種暗号化オペレーションの実行速度を測定するプログラム
+- TlsClient: 対向するTLSサーバーアプリケーションとTLS通信を行うプログラム
+
+のいずれかの動作を行うよう指定できます。
+
+設定はtest/src/wolfssl_demo.hファイル内の、
+
+- #define CRYPT_TEST
+- #define BENCHMARK
+- #define TLS_CLIENT
+
+のいずれか一つを有効にしてアプリケーションをビルドすることで行います。
+
+
+
+## 7. testアプリケーションのビルドと実行
+-----
+
+testアプリケーションのビルドの準備が整ったので、ビルドを行います。
+
+1.プロジェクト・エクスプローラー上のwolfsslプロジェクトをビルドし、次にtestプロジェクトをビルドします。
+
+2.ビルドが成功したら、ターゲットボードとエミュレーターを接続し、外部電源を入力します。
+
+3."実行"メニュー > "デバッグ"を選択し、デバッグパースペクティブを開きます。
+
+4. testアプリケーションは標準出力に動作状況を出力します。この標準出力の表示用に、"Renesas Debug Virtual Console"を開いておきます。
+
+5.実行ボタンを押してtestアプリケーションを動作させます。
+
+6.CryptoTest、BenchmarkあるいはTLS_Client選択していた動作に応じた実行結果を表示したあと無限ループに入るので出力が停止したと思われたらデバッグを停止させます。
+
+
+## 8. TLS_Clientとしてのtestアプリケーションの実行
+-----
+
+
+### 8.1 TLS対向アプリケーションの生成と実行
+
+
+testアプリケーションをTLS_Clientとしての動作を行わせる場合には、TLS通信の相手方となる対向アプリケーションが必要となります。wolfSSLパッケージにはこの用途に使用できるTLSserverサンプルアプリケーションが用意されています。このプログラムはwolfsslをビルドすることで生成されます。wolfSSLのビルドにはgccがインストールされているLinux(MacOS, WSLも含む)でのビルドとVisualStudioを使ってのビルドが可能です。以下ではWSL上でのビルドを紹介します。
+
+
+```
+$ cd
+$ ./autogen.sh
+$ ./configure CFLAGS="-DWOLFSSL_STATIC_RSA -DHAVEAES_CBC"
+$ make
+```
+
+
+上記のビルドによって、/examples/server/server
+が生成されます。この実行プログラムがサーバーアプリケーションとして機能します。以下のオプションを与えて実行させるとTLS_Clientからの接続を待ち受け状態になります。
+
+
+```
+$ examples/server/server -b -d -i
+```
+
+testアプリケーションには、サーバーアプリケーションに割り当てられたIPアドレスを指定します。
+
+wolf_client.cを開き、#define SIMPLE_TLSSEVER_IPにアドレスを指定します。
+
+```
+-- wolf_client.c --
+
+...
+#define SIMPLE_TLSSEVER_IP 192.168.53.9
+...
+```
+
+ファイルをセーブしてtestアプリケーションを再ビルドしてください。testアプリケーションを実行すると、対向アプリケーションとの間でTLS接続が行われ、その後簡単な文字列を交換して標準出力に以下のような表示を行います。
+
+
+```
+cipher : ECDHE-RSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : AES256-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-RSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+```
+
+
+### 8.2 サーバー証明書の変更(認証方式の変更)
+
+
+上記はサーバーアプリケーションが提示すサーバー証明書にRSA公開鍵が含まれている(RSA認証)場合の実行例です。TSIPにはこのほかにサーバー証明書にECC公開鍵を含む場合(ECDSA認証)も扱えます。
+
+
+ECDSAを含む暗号化スイートを使用したい場合には、testアプリケーションの設定を変更して再ビルドが必要となります。\/common/user_settings.h を開き、USE_ECC_CERT定義を有効化して再ビルドしてください。
+
+
+```
+#define USE_ECC_CERT
+```
+
+
+この定義により、testアプリケーションはサーバーの提示するECC公開鍵を含んだサーバー証明書を検証できるRootCA証明書を使うようになります。
+
+
+さらに対向するサーバーアプリケーションの方でも以下のようにECC公開鍵を含んだサーバー証明書と秘密鍵ファイルをオプションで指定して実行する必要があります。
+
+
+```
+$ ./examples/server/server -b -d -i -c ./certs/server-ecc.pem -k ./certs/ecc-key.pem
+```
+
+実行結果として以下が表示されます。
+
+
+```
+cipher : ECDHE-ECDSA-AES128-SHA256
+Received: I hear you fa shizzle!
+
+cipher : ECDHE-ECDSA-AES128-GCM-SHA256
+Received: I hear you fa shizzle!
+```
+
+
+## 9. ユーザーが用意したRootCA証明書を利用する際に必要なこと
+-----
+
+本サンプルプログラムでは、TLS_Clientとして動作する際に必要なRootCA証明書とサンプルTLSサーバーアプリケーションが使用するサーバー証明書などは評価用でのみ利用可能な証明書です。
+機能評価を超えた目的で利用する場合にはRootCA証明書をユーザー自身で用意する必要があります。それに伴い、
+ 1. Provisioning key
+ 2. RootCA証明書の検証の為に必要なRSA鍵ペア
+ 3. RootCA証明書を上記2の秘密鍵で生成した署名
+
+が必要になります。それらの生成方法はRenesas社提供のマニュアルを参照してください。
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/common/strings.h b/IDE/Renesas/e2studio/RX72N/EnvisionKit/common/strings.h
new file mode 100644
index 000000000..e3752588e
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/common/strings.h
@@ -0,0 +1,22 @@
+/* strings.h
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+int strncasecmp(const char *s1, const char * s2, unsigned int sz);
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/common/unistd.h b/IDE/Renesas/e2studio/RX72N/EnvisionKit/common/unistd.h
new file mode 100644
index 000000000..962ad47ee
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/common/unistd.h
@@ -0,0 +1,22 @@
+/* unistd.h
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+/* DUMMY Header */
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/common/user_settings.h b/IDE/Renesas/e2studio/RX72N/EnvisionKit/common/user_settings.h
similarity index 79%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/common/user_settings.h
rename to IDE/Renesas/e2studio/RX72N/EnvisionKit/common/user_settings.h
index d738e3232..5d2e6db55 100644
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/common/user_settings.h
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/common/user_settings.h
@@ -23,7 +23,6 @@
*
*
*----------------------------------------------------------------------------*/
-/*#define WOLFSSL_RENESAS_RX65N*/
#define WOLFSSL_RENESAS_RX72N
@@ -36,14 +35,15 @@
* 106: TSIPv1.06
* 109: TSIPv1.09
* 113: TSIPv1.13
+ * 114: TSIPv1.14
*----------------------------------------------------------------------------*/
#define WOLFSSL_RENESAS_TSIP
- #define WOLFSSL_RENESAS_TSIP_VER 113
+ #define WOLFSSL_RENESAS_TSIP_VER 114
/*-- TLS version definitions --------------------------------------------------
*
- * wolfSSL supports TLSv1.2 by default. In case you want your system supports
+ * wolfSSL supports TLSv1.2 by default. In case you want your system to support
* TLSv1.3, uncomment line below.
*
*----------------------------------------------------------------------------*/
@@ -66,7 +66,7 @@
*----------------------------------------------------------------------------*/
#define NO_DEV_RANDOM
- #define USE_CERT_BUFFERS_2048
+
#define WOLFSSL_DH_CONST
#define HAVE_TLS_EXTENSIONS
@@ -82,7 +82,40 @@
#define WOLFSSL_STATIC_RSA
-
+ /* USE_ECC_CERT
+ * This macro is for selecting root CA certificate to load, it is valid only
+ * in example applications. wolfSSL does not refer this macro.
+ * If you want to use cipher suites including ECDSA authentication in
+ * the example applications with TSIP, enable this macro.
+ * In TSIP 1.13 or later version, following cipher suites are
+ * available:
+ * - TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
+ * - TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SAH256
+ *
+ * Note that, this macro disables cipher suites including RSA
+ * authentication such as:
+ * - TLS_RSA_WITH_AES_128_CBC_SHA
+ * - TLS_RSA_WITH_AES_256_CBC_SHA
+ * - TLS_RSA_WITH_AES_128_CBC_SHA256
+ * - TLS_RSA_WITH_AES_256_CBC_SHA256
+ * - TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
+ * - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA256
+ *
+ */
+ /*#define USE_ECC_CERT*/
+
+ /* In this example application, Root CA cert buffer named
+ * "ca_ecc_cert_der_256" is used under the following macro definition
+ * for ECDSA.
+ */
+ #define USE_CERT_BUFFERS_256
+
+ /* In this example application, Root CA cert buffer named
+ * "ca_cert_der_2048" is used under the following macro definition
+ * for RSA authentication.
+ */
+ #define USE_CERT_BUFFERS_2048
+
/*-- Misc definitions ---------------------------------------------------------
*
*
@@ -114,17 +147,18 @@
#define NO_WRITEV
#define WOLFSSL_USER_IO
- #define WOLFSSL_USER_CURRTIME
+ #define WOLFSSL_USER_CURRTIME /* for benchmark */
#define USER_TIME
#define XTIME time
#define USE_WOLF_SUSECONDS_T
#define USE_WOLF_TIMEVAL_T
- #define WOLFSSL_USER_CURRTIME /* for benchmark */
+
#define WC_RSA_BLINDING
#define TFM_TIMING_RESISTANT
#define ECC_TIMING_RESISTANT
+
/*-- Debugging options ------------------------------------------------------
*
* "DEBUG_WOLFSSL" definition enables log to output into stdout.
@@ -141,7 +175,9 @@
/*#define NO_RENESAS_TSIP_CRYPT*/
/*#define NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION*/
-
+#if defined(WOLFCRYPT_ONLY)
+ #undef WOLFSSL_RENESAS_TSIP
+#endif
/*-- Consistency checking between definitions ---------------------------------
*
*
@@ -165,6 +201,8 @@
#define WOLFSSL_RENESAS_TSIP_CRYPT
#define WOLFSSL_RENESAS_TSIP_TLS
#define WOLFSSL_RENESAS_TSIP_TLS_AES_CRYPT
+ #define HAVE_PK_CALLBACKS
+ #define WOLF_CRYPTO_CB
#endif
#else
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/common/wolfssl_dummy.c b/IDE/Renesas/e2studio/RX72N/EnvisionKit/common/wolfssl_dummy.c
new file mode 100644
index 000000000..28644d760
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/common/wolfssl_dummy.c
@@ -0,0 +1,41 @@
+/* wolfssl_dummy.c
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+typedef unsigned long time_t;
+
+#define YEAR 2021
+#define MON 7
+
+static int tick = 0;
+
+time_t time(time_t *t)
+{
+ return ((YEAR-1970)*365+30*MON)*24*60*60 + tick++;
+}
+
+#include
+int strncasecmp(const char *s1, const char * s2, unsigned int sz)
+{
+ for( ; sz>0; sz--)
+ if(toupper(s1++) != toupper(s2++))
+ return 1;
+ return 0;
+}
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/include.am b/IDE/Renesas/e2studio/RX72N/EnvisionKit/include.am
new file mode 100644
index 000000000..da97af51b
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/include.am
@@ -0,0 +1,26 @@
+# vim:ft=automake
+# included from Top Level Makefile.am
+# All paths should be given relative to the root
+
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/README_EN.md
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/README_JP.md
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/wolfssl/.cproject
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/wolfssl/.project
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/wolfssl/wolfssl.rcpc
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/test/.cproject
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/test/.project
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/test/test_HardwareDebug.launch
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/test/test.rcpc
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/test_main.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/key_data.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/key_data.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/wolf_client.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/wolf_server.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/wolfssl_demo.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/common/wolfssl_dummy.c
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/common/strings.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/common/unistd.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/common/user_settings.h
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/.cproject
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/.project
+EXTRA_DIST+= IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/smc.scfg
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/smc/.cproject b/IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/.cproject
similarity index 97%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/smc/.cproject
rename to IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/.cproject
index 2dbb92b52..109b9d26e 100644
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/smc/.cproject
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/.cproject
@@ -44,11 +44,12 @@
+
+
-
@@ -57,8 +58,7 @@
-
-
+
@@ -103,10 +103,7 @@
-
-
-
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/.project b/IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/.project
new file mode 100644
index 000000000..4f66ca88d
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/.project
@@ -0,0 +1,36 @@
+
+
+ smc
+
+
+
+
+
+ com.renesas.smc.ui.pgsupport.SCContentBuilder
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ clean,full,incremental,
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+ com.renesas.cdt.managedbuild.renesas.misrachecker.builder
+
+
+
+
+
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+
+
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/smc/smc.scfg b/IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/smc.scfg
similarity index 90%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/smc/smc.scfg
rename to IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/smc.scfg
index 1070cc913..7bf952767 100644
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/smc/smc.scfg
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/smc.scfg
@@ -13,7 +13,7 @@
-
+
@@ -24,10 +24,10 @@
-
+
-
+
@@ -41,7 +41,7 @@
-
+
@@ -71,26 +71,26 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -125,19 +125,19 @@
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -149,61 +149,61 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
-
+
+
-
+
-
+
@@ -213,7 +213,7 @@
-
+
@@ -223,7 +223,7 @@
-
+
@@ -232,7 +232,7 @@
-
+
@@ -241,7 +241,7 @@
-
+
@@ -249,7 +249,7 @@
-
+
@@ -262,7 +262,7 @@
-
+
@@ -273,7 +273,7 @@
-
+
@@ -292,48 +292,48 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
@@ -355,7 +355,7 @@
-
+
@@ -585,27 +585,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
@@ -614,7 +614,7 @@
-
+
@@ -639,7 +639,7 @@
-
+
@@ -652,7 +652,7 @@
-
+
@@ -737,7 +737,7 @@
-
+
@@ -748,15 +748,76 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -782,6 +843,7 @@
+
@@ -823,6 +885,7 @@
+
@@ -863,18 +926,20 @@
-
-
+
+
+
+
-
+
-
+
@@ -959,119 +1024,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/.cproject b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/.cproject
similarity index 99%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/test/.cproject
rename to IDE/Renesas/e2studio/RX72N/EnvisionKit/test/.cproject
index edbd30814..729c09ed4 100644
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/.cproject
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/.cproject
@@ -45,7 +45,7 @@
-
+
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/.project b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/.project
new file mode 100644
index 000000000..567eaad89
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/.project
@@ -0,0 +1,59 @@
+
+
+ test
+
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ clean,full,incremental,
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+ com.renesas.cdt.managedbuild.renesas.misrachecker.builder
+
+
+
+
+
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+
+
+
+ src/benchmark.c
+ 1
+ $%7BPARENT-6-PROJECT_LOC%7D/wolfcrypt/benchmark/benchmark.c
+
+
+ src/benchmark.h
+ 1
+ $%7BPARENT-6-PROJECT_LOC%7D/wolfcrypt/benchmark/benchmark.h
+
+
+ src/test.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/test/test.c
+
+
+ src/wolfssl_dummy.c
+ 1
+ $%7BPARENT-1-PROJECT_LOC%7D/common/wolfssl_dummy.c
+
+
+
+
+ copy_PARENT
+ $%7BPARENT-3-ECLIPSE_HOME%7D/workspace/wolfssl
+
+
+
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/key_data.c b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/key_data.c
new file mode 100644
index 000000000..06440a051
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/key_data.c
@@ -0,0 +1,178 @@
+/* key_data.c
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+#include "key_data.h"
+
+/*-------------------------------------------------------------------------
+ TSIP v1.09 or later
+--------------------------------------------------------------------------*/
+#if defined(WOLFSSL_RENESAS_TSIP_TLS) && (WOLFSSL_RENESAS_TSIP_VER >=109)
+
+const st_key_block_data_t g_key_block_data =
+{
+ /* uint8_t encrypted_provisioning_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2]; */
+ {
+ 0xD8, 0xB3, 0xA7, 0xDB, 0xD1, 0x5E, 0x44, 0x24, 0x00, 0xDA, 0xEB, 0xB3,
+ 0x33, 0xE1, 0x49, 0xAF, 0x4B, 0xAC, 0xC5, 0xF5, 0xC8, 0xD5, 0xAC, 0x12,
+ 0x7F, 0xF7, 0x58, 0xAE, 0x59, 0xFE, 0xFB, 0x32
+ },
+ /* uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE]; */
+ {
+ 0xF6, 0xA9, 0x83, 0x5A, 0xA1, 0x65, 0x1D, 0x28, 0xC8, 0x1A, 0xA6, 0x9D,
+ 0x34, 0xB2, 0x4D, 0x92
+ },
+ /* uint8_t
+ * encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16];
+ */
+ {
+ 0xC1, 0xB7, 0xCC, 0x99, 0x0A, 0xC8, 0x3E, 0xAB, 0x74, 0x35, 0x9D, 0x1C,
+ 0x81, 0x32, 0x72, 0xA7, 0xA8, 0x0D, 0xBA, 0x1B, 0x35, 0x42, 0x2F, 0x7B,
+ 0xB4, 0x1C, 0x86, 0x81, 0xC4, 0xFA, 0xD9, 0x65, 0xCE, 0x8A, 0x70, 0x1A,
+ 0x28, 0x09, 0x72, 0xC0, 0x4F, 0x7A, 0x4A, 0xC7, 0xE6, 0x21, 0x65, 0x6E,
+ 0xEB, 0x11, 0x45, 0x23, 0x35, 0xC0, 0x0F, 0x1D, 0x48, 0xC6, 0x8A, 0x1C,
+ 0x27, 0x70, 0xA6, 0x26, 0xD0, 0x49, 0xCD, 0x42, 0x8D, 0x65, 0x2F, 0xFC,
+ 0x32, 0x12, 0x6F, 0xE6, 0x61, 0xB6, 0x2F, 0xD9, 0xA7, 0xC3, 0xB0, 0x3A,
+ 0x4F, 0x58, 0xFD, 0x1E, 0x8E, 0xDE, 0x5C, 0xD4, 0xF3, 0x4E, 0xF7, 0x45,
+ 0x01, 0xDC, 0x39, 0x38, 0x15, 0x37, 0x8A, 0xFD, 0x59, 0x1A, 0x6C, 0x04,
+ 0x55, 0x31, 0x56, 0x14, 0x07, 0x71, 0x9A, 0x19, 0x81, 0x7F, 0x69, 0x88,
+ 0xD7, 0xD5, 0xBE, 0xB4, 0x95, 0x83, 0xC5, 0x35, 0xA8, 0xDE, 0x65, 0x5E,
+ 0x95, 0xBB, 0xE3, 0x9C, 0x81, 0x4C, 0x8B, 0x18, 0x4C, 0xEA, 0x12, 0xEE,
+ 0xF3, 0x98, 0x68, 0x35, 0xC8, 0xA5, 0x69, 0x6F, 0x71, 0x8C, 0xAA, 0xB5,
+ 0x3F, 0xF7, 0x3C, 0x10, 0xC0, 0xD4, 0x46, 0x4D, 0xD0, 0x56, 0xDB, 0x7F,
+ 0xC1, 0x52, 0xE0, 0x06, 0xD8, 0xB9, 0x5E, 0x41, 0x43, 0x0E, 0xBB, 0xCD,
+ 0x5C, 0x4D, 0x02, 0x37, 0xD1, 0xFD, 0x88, 0xCB, 0x49, 0xC3, 0x51, 0x0C,
+ 0x8A, 0x17, 0x71, 0xFE, 0x97, 0x8F, 0xF6, 0x65, 0xFC, 0xF8, 0xB4, 0xC2,
+ 0x65, 0x4B, 0x5B, 0x74, 0x4B, 0xFF, 0x35, 0xE9, 0x33, 0x3A, 0xBE, 0xDF,
+ 0x23, 0x4F, 0xDB, 0x3F, 0x94, 0x6F, 0x34, 0x21, 0x76, 0x14, 0xAF, 0x2B,
+ 0x96, 0x62, 0xA5, 0x52, 0x80, 0xB9, 0x36, 0x7E, 0x25, 0xAF, 0xB6, 0x75,
+ 0xE5, 0x79, 0x8E, 0xE8, 0x67, 0xE4, 0xDD, 0x4B, 0x3D, 0xB2, 0x7F, 0xAF,
+ 0x32, 0xC5, 0xF5, 0x1B, 0x90, 0x0E, 0x41, 0x97, 0x5D, 0xFD, 0xC1, 0x9A,
+ 0xA1, 0xF9, 0x57, 0xF1, 0x21, 0x94, 0xF9, 0x31, 0xC9, 0xC7, 0x16, 0xAA,
+ 0xD8, 0xE9, 0x78, 0x03, 0xAD, 0xEF, 0x3E, 0x98, 0x1F, 0x32, 0x3D, 0x8E
+ },
+ /* uint8_t encrypted_user_update_key[R_TSIP_AES256_KEY_BYTE_SIZE + 16]; */
+ {
+ 0x70, 0xA8, 0xB5, 0x63, 0xE9, 0xC2, 0xA0, 0xFC, 0xE5, 0xA5, 0x4D, 0x94,
+ 0x6E, 0x69, 0xE8, 0x94, 0xAC, 0xE6, 0x68, 0x7C, 0xB2, 0xB9, 0xDC, 0xCF,
+ 0x69, 0xBC, 0xE6, 0xB9, 0x8C, 0xDA, 0x72, 0x5C, 0x62, 0xE9, 0xB9, 0xC1,
+ 0xB4, 0xC7, 0x60, 0x21, 0xAE, 0x1B, 0x52, 0x25, 0x06, 0x8A, 0x91, 0xA1
+ },
+
+};
+
+/* Public key type of CA root cert: 0: RSA-2048 2: ECDSA-P256*/
+#if defined(USE_ECC_CERT)
+const uint32_t encrypted_user_key_type =
+ R_TSIP_TLS_PUBLIC_KEY_TYPE_ECDSA_P256;
+#else
+const uint32_t encrypted_user_key_type =
+ R_TSIP_TLS_PUBLIC_KEY_TYPE_RSA2048;
+#endif
+
+const unsigned char ca_ecc_cert_der_sig[] =
+{
+ 0x7D, 0x73, 0xF9, 0x15, 0x6A, 0x87, 0x5C, 0xE9, 0x36, 0x4B, 0xA5, 0x8B,
+ 0xE8, 0xC1, 0xBD, 0x78, 0x01, 0x51, 0x93, 0xC1, 0xAF, 0xF7, 0xCB, 0xE0,
+ 0x61, 0xD4, 0x33, 0x67, 0xEC, 0x6E, 0x37, 0x92, 0xE2, 0x16, 0x99, 0xC5,
+ 0x5E, 0x74, 0xB0, 0xF3, 0xFD, 0xE0, 0x13, 0x1C, 0xA0, 0x5D, 0x10, 0x41,
+ 0xE6, 0x8B, 0xAE, 0x48, 0xF5, 0x3E, 0x5E, 0xEA, 0xED, 0x17, 0x45, 0xD5,
+ 0xCA, 0xDC, 0xB4, 0xC6, 0xA5, 0xD7, 0x9E, 0xAA, 0x06, 0x99, 0xA2, 0x70,
+ 0x8C, 0x4C, 0xC0, 0x19, 0xB2, 0xF9, 0x6E, 0x1C, 0x96, 0x58, 0xE0, 0xFD,
+ 0x26, 0x02, 0x34, 0xA6, 0x1D, 0x4A, 0x03, 0x76, 0x3E, 0x84, 0x7A, 0xAA,
+ 0xB4, 0xBF, 0x1E, 0x5A, 0x77, 0x97, 0x12, 0x56, 0x23, 0x55, 0xF6, 0xC7,
+ 0xED, 0x61, 0x75, 0x42, 0x99, 0x67, 0xCD, 0x10, 0xCA, 0x79, 0x4E, 0x9A,
+ 0x91, 0x67, 0xCF, 0x49, 0x6F, 0xC1, 0xD2, 0x0C, 0x16, 0x90, 0xE4, 0x2E,
+ 0x27, 0x63, 0x13, 0xF9, 0x4F, 0x6C, 0xE3, 0x55, 0x09, 0x18, 0xC2, 0xB3,
+ 0x70, 0x5C, 0x0C, 0x52, 0x5B, 0xC4, 0x81, 0xFD, 0x30, 0xE9, 0x41, 0xB1,
+ 0x1C, 0x84, 0x07, 0x36, 0xFC, 0x2F, 0x68, 0x97, 0x2D, 0x73, 0x56, 0x88,
+ 0x39, 0x5C, 0x9E, 0x50, 0xA8, 0x47, 0x1E, 0x83, 0xF5, 0x4E, 0xD0, 0xA5,
+ 0xAD, 0xFA, 0xE0, 0x52, 0xFC, 0x47, 0x15, 0x58, 0x2E, 0xC5, 0x53, 0x0F,
+ 0x3F, 0x98, 0x11, 0xF3, 0x5C, 0x3A, 0x83, 0x35, 0xF7, 0x9E, 0x1B, 0x94,
+ 0x7A, 0x84, 0x7D, 0x51, 0x72, 0x32, 0xE2, 0x29, 0xF2, 0x9D, 0xC0, 0xED,
+ 0x25, 0x9A, 0xD6, 0x76, 0x07, 0x75, 0x18, 0xA8, 0x29, 0xAA, 0x2D, 0x69,
+ 0xE2, 0xAF, 0xEE, 0x03, 0xE9, 0xDC, 0xCC, 0x4E, 0x92, 0x71, 0x05, 0x3A,
+ 0x74, 0x4A, 0x21, 0xA4, 0x3B, 0xB3, 0xCF, 0x8A, 0x73, 0x02, 0x8C, 0x84,
+ 0x8B, 0x6B, 0xDA, 0x46
+};
+const int sizeof_ca_ecc_cert_sig = sizeof(ca_ecc_cert_der_sig);
+
+/* ./ca-cert.der.sign, */
+const unsigned char ca_cert_der_sig[] =
+{
+ 0x0E, 0xC3, 0x9B, 0x77, 0xF8, 0x58, 0x08, 0x9E, 0x5D, 0x1E, 0x03, 0x8D,
+ 0x60, 0xD1, 0xF6, 0x3E, 0x3D, 0xFF, 0x89, 0x4C, 0x91, 0x5C, 0x00, 0xEB,
+ 0x05, 0xE5, 0x65, 0x62, 0x17, 0xFB, 0xD4, 0x52, 0x69, 0x9D, 0xB8, 0x07,
+ 0xAF, 0xA9, 0x4C, 0xA5, 0xB9, 0x8D, 0x52, 0xC0, 0xF3, 0x34, 0x13, 0x67,
+ 0x40, 0xAA, 0xE1, 0xA3, 0x9E, 0x5D, 0x0F, 0xCE, 0x87, 0xB0, 0x10, 0xB4,
+ 0x79, 0x8F, 0x84, 0x21, 0x81, 0xC2, 0xF9, 0xF7, 0xDB, 0xCB, 0x8F, 0xE4,
+ 0x9B, 0xF5, 0x85, 0x9D, 0x11, 0x04, 0xFB, 0xA7, 0xFD, 0x13, 0x6F, 0x02,
+ 0xA5, 0xBF, 0xE0, 0x89, 0x62, 0x5E, 0x24, 0x95, 0xF6, 0x01, 0x7D, 0x7F,
+ 0xB5, 0xD1, 0xDD, 0xF3, 0x3B, 0xD5, 0x04, 0x54, 0xE1, 0x8E, 0xA8, 0x3D,
+ 0x30, 0xB3, 0x35, 0x76, 0xAF, 0xA7, 0x94, 0xD7, 0x59, 0x82, 0x38, 0x2C,
+ 0xD6, 0x95, 0x57, 0xD1, 0xD5, 0x62, 0xB1, 0x69, 0x60, 0xCD, 0x3F, 0x7D,
+ 0x0E, 0x9F, 0x00, 0x21, 0x04, 0xFE, 0x43, 0xBD, 0x7D, 0x3D, 0xA7, 0x6B,
+ 0xC5, 0x82, 0x92, 0xDE, 0xB7, 0xA3, 0xD4, 0x7D, 0x3C, 0x14, 0x46, 0x28,
+ 0x50, 0xCA, 0x86, 0x9F, 0x66, 0x4C, 0xB0, 0x46, 0x46, 0x4D, 0x31, 0xD6,
+ 0x7B, 0xEC, 0xBA, 0xED, 0xA1, 0xF9, 0x88, 0x68, 0xB9, 0xA9, 0xDA, 0x88,
+ 0x63, 0x01, 0x95, 0x5B, 0x78, 0x38, 0x03, 0xD6, 0xDF, 0x86, 0xC4, 0x3E,
+ 0x3B, 0xCF, 0xED, 0x8B, 0x2A, 0x41, 0x49, 0x65, 0x3E, 0x2F, 0x45, 0x71,
+ 0xD8, 0x0B, 0xF1, 0xF0, 0xC7, 0xB5, 0x2E, 0xBE, 0xF0, 0x71, 0xDE, 0x40,
+ 0xB0, 0x54, 0x25, 0xD7, 0x4A, 0x86, 0xF1, 0xB9, 0xF6, 0xAB, 0x07, 0x07,
+ 0x21, 0x7C, 0x15, 0x7B, 0x1F, 0xCF, 0xE4, 0x1F, 0x0B, 0xEB, 0x0E, 0x96,
+ 0xE5, 0x59, 0x34, 0xC6, 0x4B, 0x1B, 0xF6, 0xC7, 0x6C, 0x4C, 0x16, 0x43,
+ 0x72, 0xAF, 0x82, 0x1E
+};
+const int sizeof_ca_cert_sig = sizeof(ca_cert_der_sig);
+/* ./client-cert.der.sign, */
+const unsigned char client_cert_der_sign[] =
+{
+ 0x5D, 0x1F, 0x89, 0x41, 0xEC, 0x47, 0xC8, 0x90, 0x61, 0x79,
+ 0x8A, 0x16, 0x1F, 0x31, 0x96, 0x67, 0xD9, 0x3C, 0xEC, 0x6B,
+ 0x58, 0xC6, 0x5A, 0xED, 0x99, 0xB3, 0xEF, 0x27, 0x6F, 0x04,
+ 0x8C, 0xD9, 0x68, 0xB1, 0xD6, 0x23, 0x15, 0x84, 0x00, 0xE1,
+ 0x27, 0xD1, 0x1F, 0x68, 0xB7, 0x3F, 0x13, 0x53, 0x8A, 0x95,
+ 0x5A, 0x20, 0x7C, 0xB2, 0x76, 0x5B, 0xDC, 0xE0, 0xA6, 0x21,
+ 0x7C, 0x49, 0xCF, 0x93, 0xBA, 0xD5, 0x12, 0x9F, 0xEE, 0x90,
+ 0x5B, 0x3F, 0xA3, 0x9D, 0x13, 0x72, 0xAC, 0x72, 0x16, 0xFE,
+ 0x1D, 0xBE, 0xEB, 0x8E, 0xC7, 0xDC, 0xC4, 0xF8, 0x1A, 0xD8,
+ 0xA0, 0xA4, 0xF6, 0x04, 0x30, 0xF6, 0x7E, 0xB6, 0xC8, 0xE1,
+ 0xAB, 0x88, 0x37, 0x08, 0x63, 0x72, 0xAA, 0x46, 0xCC, 0xCA,
+ 0xF0, 0x9E, 0x02, 0x1E, 0x65, 0x67, 0xFF, 0x2C, 0x9D, 0x81,
+ 0x6C, 0x1E, 0xF1, 0x54, 0x05, 0x68, 0x68, 0x18, 0x72, 0x26,
+ 0x55, 0xB6, 0x2C, 0x95, 0xC0, 0xC9, 0xB2, 0xA7, 0x0B, 0x60,
+ 0xD7, 0xEB, 0x1D, 0x08, 0x1A, 0xA2, 0x54, 0x15, 0x89, 0xCB,
+ 0x83, 0x21, 0x5D, 0x15, 0x9B, 0x38, 0xAC, 0x89, 0x63, 0xD5,
+ 0x4B, 0xF4, 0x8B, 0x47, 0x93, 0x78, 0x43, 0xCB, 0x9B, 0x71,
+ 0xBF, 0x94, 0x76, 0xB5, 0xCE, 0x35, 0xA9, 0x1A, 0xD5, 0xA5,
+ 0xD8, 0x19, 0xA6, 0x04, 0x39, 0xB1, 0x09, 0x8C, 0x65, 0x02,
+ 0x58, 0x3A, 0x95, 0xEF, 0xA2, 0xC3, 0x85, 0x18, 0x61, 0x23,
+ 0x2D, 0xC5, 0xCD, 0x62, 0xC1, 0x19, 0x31, 0xE5, 0x36, 0x95,
+ 0x22, 0xDB, 0x3E, 0x1A, 0x3C, 0xE8, 0xC6, 0x2E, 0xDF, 0xD9,
+ 0x2F, 0x84, 0xC1, 0xF0, 0x38, 0x2B, 0xE5, 0x73, 0x35, 0x4F,
+ 0x05, 0xE2, 0xA5, 0x60, 0x79, 0xB0, 0x23, 0xDC, 0x56, 0x4C,
+ 0xE7, 0xD9, 0x1F, 0xCF, 0x6A, 0xFC, 0x55, 0xEB, 0xAA, 0x48,
+ 0x3E, 0x95, 0x2A, 0x10, 0x01, 0x05
+};
+const int sizeof_client_cert_der_sign = sizeof(client_cert_der_sign);
+
+uint32_t s_inst1[R_TSIP_SINST_WORD_SIZE] = { 0 };
+uint32_t s_inst2[R_TSIP_SINST2_WORD_SIZE]= { 0 };
+#endif
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/key_data.h b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/key_data.h
new file mode 100644
index 000000000..4666db3a6
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/key_data.h
@@ -0,0 +1,55 @@
+/* key_data.h
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+
+
+
+#ifndef KEY_DATA_H_
+#define KEY_DATA_H_
+
+#include
+
+
+#if defined(WOLFSSL_RENESAS_TSIP)
+
+#include "r_tsip_rx_if.h"
+
+typedef struct st_key_block_data
+{
+ uint8_t encrypted_provisioning_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2];
+ uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE];
+ uint8_t encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16];
+ uint8_t encrypted_user_update_key[R_TSIP_AES256_KEY_BYTE_SIZE + 16];
+} st_key_block_data_t;
+
+
+extern const uint32_t encrypted_user_key_type;
+extern const st_key_block_data_t g_key_block_data;
+
+extern const unsigned char ca_cert_der_sig[];
+extern const unsigned char ca_ecc_cert_der_sig[];
+extern const unsigned char client_cert_der_sign[];
+extern const int sizeof_ca_cert_der;
+
+
+#endif /* WOLFSSL_RENESAS_TSIP */
+#endif /* KEY_DATA_H_ */
+
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/test_main.c b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/test_main.c
new file mode 100644
index 000000000..2492e2c78
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/test_main.c
@@ -0,0 +1,276 @@
+/* test_main.c
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+
+#include "stdio.h"
+#include "stdint.h"
+#include
+#include "wolfssl/wolfcrypt/types.h"
+#include "wolfssl_demo.h"
+
+void main(void);
+#ifdef __cplusplus
+extern "C" {
+
+}
+#endif
+
+
+#if defined(TLS_CLIENT) || defined(TLS_SERVER)
+ #include "r_t4_itcpip.h"
+ #include "r_sys_time_rx_if.h"
+ #include "Pin.h"
+
+ #define T4_WORK_SIZE (14800)
+ static UW tcpudp_work[(T4_WORK_SIZE / 4) + 1];
+#endif
+
+#if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ #include "key_data.h"
+ #include
+
+ extern const st_key_block_data_t g_key_block_data;
+ user_PKCbInfo guser_PKCbInfo;
+#endif
+
+static long tick;
+static void timeTick(void *pdata)
+{
+ tick++;
+}
+
+typedef struct func_args {
+ int argc;
+ char** argv;
+ int return_code;
+} func_args;
+
+
+void wolfcrypt_test(func_args args);
+int benchmark_test(void *args);
+
+double current_time(int reset)
+{
+ if(reset) tick = 0 ;
+ return ((double)tick/FREQ) ;
+}
+
+#if defined(TLS_CLIENT) || defined(TLS_SERVER)
+
+int SetTsiptlsKey()
+{
+#if defined(WOLFSSL_RENESAS_TSIP) && (WOLFSSL_RENESAS_TSIP_VER >=109)
+
+#if defined(TLS_CLIENT)
+
+ #if defined(USE_ECC_CERT)
+ /* Root CA cert has ECC-P256 public key */
+ tsip_inform_cert_sign((const byte *)ca_ecc_cert_der_sig);
+ #else
+ /* Root CA cert has RSA public key */
+ tsip_inform_cert_sign((const byte *)ca_cert_der_sig);
+ #endif
+
+ tsip_inform_user_keys_ex(
+ (byte*)&g_key_block_data.encrypted_provisioning_key,
+ (byte*)&g_key_block_data.iv,
+ (byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key,
+ encrypted_user_key_type);
+
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ guser_PKCbInfo.user_key_id = 0;
+ #endif
+
+#elif defined(TLS_SERVER)
+
+ tsip_inform_cert_sign((const byte *)client_cert_der_sign);
+ tsip_inform_user_keys_ex(
+ (byte *)&g_key_block_data.encrypted_provisioning_key,
+ (byte *)&g_key_block_data.iv,
+ (byte *)&g_key_block_data.encrypted_user_rsa2048_ne_key,
+ encrypted_user_key_type);
+
+#endif
+
+#else
+
+ #if defined(TLS_CLIENT)
+
+ tsip_inform_cert_sign((const byte *)ca_cert_sig);
+ tsip_inform_user_keys((byte*)&g_key_block_data.encrypted_session_key,
+ (byte*)&g_key_block_data.iv,
+ (byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key);
+
+ #elif defined(TLS_SERVER)
+
+ tsip_inform_cert_sign((const byte *)client_cert_der_sign);
+ tsip_inform_user_keys((byte*)&g_key_block_data.encrypted_session_key,
+ (byte*)&g_key_block_data.iv,
+ (byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key);
+
+ #endif
+
+#endif
+ return 0;
+}
+
+int Open_tcp( )
+{
+ ER ercd;
+ W size;
+ sys_time_err_t sys_ercd;
+ char ver[128];
+
+ /* cast from uint8_t to char* */
+ strcpy(ver, (char*)R_t4_version.library);
+
+ sys_ercd = R_SYS_TIME_Open();
+ if (sys_ercd != SYS_TIME_SUCCESS) {
+ printf("ERROR : R_SYS_TIME_Open() failed\n");
+ return -1;
+ }
+ R_Pins_Create();
+ /* start LAN controller */
+ ercd = lan_open();
+ /* initialize TCP/IP */
+ size = tcpudp_get_ramsize();
+ if (size > (sizeof(tcpudp_work))) {
+ printf("size > (sizeof(tcpudp_work))!\n");
+ return -1;
+ }
+ ercd = tcpudp_open(tcpudp_work);
+ if (ercd != E_OK) {
+ printf("ERROR : tcpudp_open failed\n");
+ return -1;
+ }
+
+ return 0;
+}
+
+void Close_tcp()
+{
+ /* end TCP/IP */
+ tcpudp_close();
+ lan_close();
+ R_SYS_TIME_Close();
+}
+#endif
+
+void main(void)
+{
+ (void)timeTick;
+
+#if defined(CRYPT_TEST) || defined(BENCHMARK)
+#if defined(CRYPT_TEST)
+ int ret;
+ func_args args = { 0 };
+
+ if ((ret = wolfCrypt_Init()) != 0) {
+ printf("wolfCrypt_Init failed %d\n", ret);
+ }
+
+ printf("Start wolfCrypt Test\n");
+ wolfcrypt_test(args);
+ printf("End wolfCrypt Test\n");
+
+ if ((ret = wolfCrypt_Cleanup()) != 0) {
+ printf("wolfCrypt_Cleanup failed %d\n", ret);
+ }
+#endif
+#if defined(BENCHMARK)
+ #include "r_cmt_rx_if.h"
+
+ uint32_t channel;
+ R_CMT_CreatePeriodic(FREQ, &timeTick, &channel);
+
+ printf("Start wolfCrypt Benchmark\n");
+ benchmark_test(NULL);
+ printf("End wolfCrypt Benchmark\n");
+#endif
+#elif defined(TLS_CLIENT)
+ #include "r_cmt_rx_if.h"
+
+#if defined(WOLFSSL_RENESAS_TSIP_TLS)
+
+ #ifdef USE_ECC_CERT
+ const char* cipherlist[] = {
+ "ECDHE-ECDSA-AES128-GCM-SHA256",
+ "ECDHE-ECDSA-AES128-SHA256"
+ };
+ const int cipherlist_sz = 2;
+
+ #else
+ const char* cipherlist[] = {
+ "ECDHE-RSA-AES128-GCM-SHA256",
+ "ECDHE-RSA-AES128-SHA256",
+ "AES128-SHA",
+ "AES128-SHA256",
+ "AES256-SHA",
+ "AES256-SHA256"
+ };
+ const int cipherlist_sz = 6;
+
+ #endif
+
+#else
+ const char* cipherlist[] = { NULL };
+ const int cipherlist_sz = 0;
+
+#endif
+ int i = 0;
+
+ Open_tcp();
+
+#if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ SetTsiptlsKey();
+#endif
+
+ do {
+ if(cipherlist_sz > 0 ) printf("cipher : %s\n", cipherlist[i]);
+
+ wolfSSL_TLS_client_init(cipherlist[i]);
+
+ wolfSSL_TLS_client();
+
+ i++;
+ } while (i < cipherlist_sz);
+
+ Close_tcp();
+#elif defined(TLS_SERVER)
+
+ Open_tcp();
+#if defined(WOLFSSL_RENESAS_TSIP)
+ SetTsiptlsKey();
+#endif
+
+ wolfSSL_TLS_server_init();
+ wolfSSL_TLS_server();
+
+ Close_tcp();
+#endif
+}
+
+#ifdef __cplusplus
+void abort(void)
+{
+
+}
+#endif
diff --git a/IDE/Renesas/e2studio/GR-ROSE/test/src/wolf_client.c b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/wolf_client.c
similarity index 84%
rename from IDE/Renesas/e2studio/GR-ROSE/test/src/wolf_client.c
rename to IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/wolf_client.c
index cc1eeac79..39602bae3 100644
--- a/IDE/Renesas/e2studio/GR-ROSE/test/src/wolf_client.c
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/wolf_client.c
@@ -29,14 +29,17 @@
#include "wolfssl_demo.h"
-#define SIMPLE_TLSSEVER_IP "192.168.1.3"
+#define SIMPLE_TLSSEVER_IP "192.168.1.7"
#define SIMPLE_TLSSERVER_PORT "11111"
ER t4_tcp_callback(ID cepid, FN fncd , VP p_parblk);
-uint32_t g_encrypted_root_public_key[140];
static WOLFSSL_CTX *client_ctx;
+#if defined(WOLFSSL_RENESAS_TSIP_TLS)
+uint32_t g_encrypted_root_public_key[140];
+static TsipUserCtx userContext;
+#endif
static int my_IORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx)
{
@@ -93,17 +96,17 @@ void wolfSSL_TLS_client_init(const char* cipherlist)
#ifndef NO_FILESYSTEM
#ifdef USE_ECC_CERT
- char *cert = "./certs/ca-ecc-cert.pem";
+ char *cert = "./certs/ca-ecc-cert.pem";
#else
- char *cert = "./certs/ca-cert.pem";
+ char *cert = "./certs/ca-cert.pem";
#endif
#else
- #ifdef USE_ECC_CERT
- const unsigned char *cert = ca_ecc_der_256;
- #define SIZEOF_CERT sizeof_ca_ecc_der_256
+ #if defined(USE_ECC_CERT) && defined(USE_CERT_BUFFERS_256)
+ const unsigned char *cert = ca_ecc_cert_der_256;
+ #define SIZEOF_CERT sizeof_ca_ecc_cert_der_256
#else
- const unsigned char *cert = ca_cert_der_2048;
- #define SIZEOF_CERT sizeof_ca_cert_der_2048
+ const unsigned char *cert = ca_cert_der_2048;
+ #define SIZEOF_CERT sizeof_ca_cert_der_2048
#endif
#endif
@@ -118,6 +121,10 @@ void wolfSSL_TLS_client_init(const char* cipherlist)
return;
}
+ #ifdef WOLFSSL_RENESAS_TSIP_TLS
+ tsip_set_callbacks(client_ctx);
+ #endif
+
#if !defined(NO_FILESYSTEM)
if (wolfSSL_CTX_load_verify_locations(client_ctx, cert, 0) != SSL_SUCCESS) {
printf("ERROR: can't load \"%s\"\n", cert);
@@ -135,9 +142,10 @@ void wolfSSL_TLS_client_init(const char* cipherlist)
wolfSSL_SetIOSend(client_ctx, my_IOSend);
/* use specific cipher */
- if (cipherlist != NULL && wolfSSL_CTX_set_cipher_list(client_ctx, cipherlist) != WOLFSSL_SUCCESS) {
+ if (cipherlist != NULL &&
+ wolfSSL_CTX_set_cipher_list(client_ctx, cipherlist) != WOLFSSL_SUCCESS) {
wolfSSL_CTX_free(client_ctx); client_ctx = NULL;
- printf("client can't set cipher list 1");
+ printf("client can't set cipher list");
}
}
@@ -177,6 +185,10 @@ void wolfSSL_TLS_client( )
return;
}
+ #ifdef WOLFSSL_RENESAS_TSIP_TLS
+ tsip_set_callback_ctx(ssl, &userContext);
+ #endif
+
/* set callback context */
wolfSSL_SetIOReadCtx(ssl, (void *)&cepid);
wolfSSL_SetIOWriteCtx(ssl, (void *)&cepid);
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/wolf_server.c b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/wolf_server.c
new file mode 100644
index 000000000..0f3d301f5
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/wolf_server.c
@@ -0,0 +1,207 @@
+/* wolf_server.c
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+#include
+#include
+#include "r_t4_itcpip.h"
+
+#include "wolfssl/wolfcrypt/settings.h"
+#include "wolfssl/ssl.h"
+#include "wolfssl/certs_test.h"
+#include "wolfssl_demo.h"
+
+static WOLFSSL_CTX *server_ctx;
+static byte doCliCertCheck;
+
+static int my_IORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx)
+{
+ int ret;
+ ID cepid;
+
+ if(ctx != NULL)
+ cepid = *(ID *)ctx;
+ else
+ return WOLFSSL_CBIO_ERR_GENERAL;
+
+ ret = tcp_rcv_dat(cepid, buff, sz, TMO_FEVR);
+ if(ret == sz)
+ return ret;
+ else
+ return WOLFSSL_CBIO_ERR_GENERAL;
+}
+
+static int my_IOSend(WOLFSSL* ssl, char* buff, int sz, void* ctx)
+{
+ int ret;
+ ID cepid;
+
+ if(ctx != NULL)
+ cepid = *(ID *)ctx;
+ else
+ return WOLFSSL_CBIO_ERR_GENERAL;
+
+ ret = tcp_snd_dat(cepid, buff, sz, TMO_FEVR);
+ if(ret == sz)
+ return ret;
+ else
+ return WOLFSSL_CBIO_ERR_GENERAL;
+}
+
+
+void wolfSSL_TLS_server_init(byte doClientCheck)
+{
+
+ int ret;
+
+
+ #ifndef NO_FILESYSTEM
+ #ifdef USE_ECC_CERT
+ char *cert = "./certs/server-ecc-cert.pem";
+ char *key = "./certs/server-ecc-key.pem";
+ #else
+ char *cert = "./certs/server-cert.pem";
+ char *key = "./certs/server-key.pem";
+ #endif
+ char *clientCert = "./certs/client-cert.pem";
+ #else
+ #if defined(USE_ECC_CERT) && defined(USE_CERT_BUFFERS_256)
+ const unsigned char *cert = serv_ecc_der_256;
+ #define sizeof_cert sizeof_serv_ecc_der_256
+ const unsigned char *key = NULL;
+ #define sizeof_key NULL
+ const unsigned char *clientCert = NULL;
+ #define sizeof_clicert NULL
+ #else
+ const unsigned char *cert = server_cert_der_2048;
+ #define sizeof_cert sizeof_server_cert_der_2048
+ const unsigned char *key = server_key_der_2048;
+ #define sizeof_key sizeof_server_key_der_2048
+ const unsigned char *clientCert = client_cert_der_2048;
+ #define sizeof_clicert sizeof_client_cert_der_2048
+ #endif
+ #endif
+
+
+ wolfSSL_Init();
+ #ifdef DEBUG_WOLFSSL
+ wolfSSL_Debugging_ON();
+ #endif
+
+ /* Create and initialize WOLFSSL_CTX */
+ if ((server_ctx = wolfSSL_CTX_new(wolfSSLv23_server_method_ex((void *)NULL)))
+ == NULL) {
+ printf("ERROR: failed to create WOLFSSL_CTX\n");
+ return;
+ }
+
+ #if !defined(NO_FILESYSTEM)
+ ret = wolfSSL_CTX_use_certificate_file(server_ctx, cert, 0);
+ #else
+ ret = wolfSSL_CTX_use_certificate_buffer(server_ctx, cert,
+ sizeof_cert, SSL_FILETYPE_ASN1);
+ #endif
+ if (ret != SSL_SUCCESS) {
+ printf("Error %d loading server-cert!\n", ret);
+ return;
+ }
+
+ /* Load server key into WOLFSSL_CTX */
+ #if !defined(NO_FILESYSTEM)
+ ret = wolfSSL_CTX_use_PrivateKey_file(server_ctx, key, 0);
+ #else
+ ret = wolfSSL_CTX_use_PrivateKey_buffer(server_ctx, key, sizeof_key,
+ SSL_FILETYPE_ASN1);
+ #endif
+ if (ret != SSL_SUCCESS) {
+ printf("Error %d loading server-key!\n", ret);
+ return;
+ }
+#if defined(WOLFSSL_RENESAS_TSIP)
+ doCliCertCheck = 1;
+#endif
+ if (doCliCertCheck) {
+ wolfSSL_CTX_set_verify(server_ctx, WOLFSSL_VERIFY_PEER |
+ WOLFSSL_VERIFY_FAIL_IF_NO_PEER_CERT, 0);
+#if !defined(NO_FILESYSTEM)
+ if (wolfSSL_CTX_load_verify_locations(server_ctx, clientCert, 0)
+ != WOLFSSL_SUCCESS)
+#else
+ if (wolfSSL_CTX_load_verify_buffer(server_ctx, clientCert,
+ sizeof_clicert,
+ SSL_FILETYPE_ASN1) != SSL_SUCCESS)
+#endif
+ printf("can't load ca file, Please run from wolfSSL home dir\n");
+ }
+
+ /* Register callbacks */
+ wolfSSL_SetIORecv(server_ctx, my_IORecv);
+ wolfSSL_SetIOSend(server_ctx, my_IOSend);
+
+}
+
+void wolfSSL_TLS_server( )
+{
+ ID cepid = 1;
+ ID repid = 1;
+ ER ercd;
+ WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)server_ctx;
+
+ WOLFSSL *ssl;
+ int len;
+ #define BUFF_SIZE 256
+ char buff[BUFF_SIZE];
+ T_IPV4EP dst_addr = {0, 0};
+
+ if((ercd = tcp_acp_cep(cepid, repid, &dst_addr, TMO_FEVR)) != E_OK) {
+ printf("ERROR TCP Accept: %d\n", ercd);
+ return;
+ }
+
+ if((ssl = wolfSSL_new(ctx)) == NULL) {
+ printf("ERROR: failed wolfSSL_new\n");
+ return;
+ }
+
+ wolfSSL_SetIOReadCtx(ssl, (void *)&cepid);
+ wolfSSL_SetIOWriteCtx(ssl, (void *)&cepid);
+
+ if (wolfSSL_accept(ssl) < 0) {
+ printf("ERROR: SSL Accept(%d)\n", wolfSSL_get_error(ssl, 0));
+ return;
+ }
+
+ if ((len = wolfSSL_read(ssl, buff, sizeof(buff) - 1)) < 0) {
+ printf("ERROR: SSL Read(%d)\n", wolfSSL_get_error(ssl, 0));
+ return;
+ }
+
+ buff[len] = '\0';
+ printf("Received: %s\n", buff);
+
+ if (wolfSSL_write(ssl, buff, len) != len) {
+ printf("ERROR: SSL Write(%d)\n", wolfSSL_get_error(ssl, 0));
+ return;
+ }
+
+ wolfSSL_free(ssl);
+ wolfSSL_CTX_free(ctx);
+ wolfSSL_Cleanup();
+ tcp_sht_cep(cepid);
+}
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/wolfssl_demo.h b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/wolfssl_demo.h
new file mode 100644
index 000000000..664186b36
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/src/wolfssl_demo.h
@@ -0,0 +1,48 @@
+/* wolfssl_demo.h
+ *
+ * Copyright (C) 2006-2021 wolfSSL Inc.
+ *
+ * This file is part of wolfSSL.
+ *
+ * wolfSSL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * wolfSSL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
+ */
+
+#ifndef WOLFSSL_DEMO_H_
+#define WOLFSSL_DEMO_H_
+
+#define FREQ 10000 /* Hz */
+
+/* Enable wolfcrypt test */
+/* can be enabled with benchmark test */
+/*#define CRYPT_TEST*/
+
+/* Enable benchmark */
+/* can be enabled with cyrpt test */
+/*#define BENCHMARK*/
+
+/* Enable TLS client */
+/* cannot enable with other definition */
+#define TLS_CLIENT
+
+/* Enable TLS server */
+/* cannot enable with other definition */
+/* #define TLS_SERVER */
+
+void wolfSSL_TLS_client_init();
+void wolfSSL_TLS_client();
+void wolfSSL_TLS_server_init(byte);
+void wolfSSL_TLS_server();
+
+#endif /* WOLFSSL_DEMO_H_ */
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/test.rcpc b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/test.rcpc
new file mode 100644
index 000000000..224a4a639
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/test.rcpc
@@ -0,0 +1,542 @@
+
+
+
+
+ ${
+ }
+
+
+
+
+ ..\..\..\..\..\..\wolfcrypt\benchmark\benchmark.c
+ ..\..\..\..\..\..\wolfcrypt\benchmark\benchmark.h
+ src\key_data.c
+ src\key_data.h
+ ..\..\..\..\..\..\wolfcrypt\test\test.c
+ src\test_main.c
+ src\wolf_client.c
+ src\wolf_server.c
+ src\wolfssl_demo.h
+ ..\common\wolfssl_dummy.c
+
+
+ src\smc_gen\Config_TMR0\Config_TMR0.c
+ src\smc_gen\Config_TMR0\Config_TMR0.h
+ src\smc_gen\Config_TMR0\Config_TMR0_user.c
+
+
+ src\smc_gen\general\r_cg_hardware_setup.c
+ src\smc_gen\general\r_cg_macrodriver.h
+ src\smc_gen\general\r_cg_tmr.h
+ src\smc_gen\general\r_cg_userdefine.h
+ src\smc_gen\general\r_smc_cgc.c
+ src\smc_gen\general\r_smc_cgc.h
+ src\smc_gen\general\r_smc_cgc_user.c
+ src\smc_gen\general\r_smc_entry.h
+ src\smc_gen\general\r_smc_interrupt.c
+ src\smc_gen\general\r_smc_interrupt.h
+
+
+ src\smc_gen\r_bsp\platform.h
+ src\smc_gen\r_bsp\readme.txt
+
+
+ src\smc_gen\r_bsp\board\generic_rx72n\hwsetup.c
+ src\smc_gen\r_bsp\board\generic_rx72n\hwsetup.h
+ src\smc_gen\r_bsp\board\generic_rx72n\r_bsp.h
+ src\smc_gen\r_bsp\board\generic_rx72n\r_bsp_config_reference.h
+ src\smc_gen\r_bsp\board\generic_rx72n\r_bsp_interrupt_config_reference.h
+
+
+ src\smc_gen\r_bsp\board\user\r_bsp.h
+
+
+
+
+ src\smc_gen\r_bsp\doc\en\r01an1685ej0621-rx-bsp.pdf
+
+
+ src\smc_gen\r_bsp\doc\ja\r01an1685jj0621-rx-bsp.pdf
+
+
+
+
+ src\smc_gen\r_bsp\mcu\all\dbsct.c
+ src\smc_gen\r_bsp\mcu\all\fsp_common_api.h
+ src\smc_gen\r_bsp\mcu\all\lowlvl.c
+ src\smc_gen\r_bsp\mcu\all\lowlvl.h
+ src\smc_gen\r_bsp\mcu\all\lowsrc.c
+ src\smc_gen\r_bsp\mcu\all\lowsrc.h
+ src\smc_gen\r_bsp\mcu\all\mcu_locks.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_common.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_common.h
+ src\smc_gen\r_bsp\mcu\all\r_bsp_cpu.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_interrupts.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_interrupts.h
+ src\smc_gen\r_bsp\mcu\all\r_bsp_locking.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_mcu_startup.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_mcu_startup.h
+ src\smc_gen\r_bsp\mcu\all\r_bsp_software_interrupt.c
+ src\smc_gen\r_bsp\mcu\all\r_bsp_software_interrupt.h
+ src\smc_gen\r_bsp\mcu\all\r_fsp_error.h
+ src\smc_gen\r_bsp\mcu\all\r_rtos.h
+ src\smc_gen\r_bsp\mcu\all\r_rx_compiler.h
+ src\smc_gen\r_bsp\mcu\all\r_rx_intrinsic_functions.c
+ src\smc_gen\r_bsp\mcu\all\r_rx_intrinsic_functions.h
+ src\smc_gen\r_bsp\mcu\all\r_typedefs.h
+ src\smc_gen\r_bsp\mcu\all\resetprg.c
+ src\smc_gen\r_bsp\mcu\all\sbrk.c
+ src\smc_gen\r_bsp\mcu\all\sbrk.h
+
+
+ src\smc_gen\r_bsp\mcu\rx72n\mcu_clocks.c
+ src\smc_gen\r_bsp\mcu\rx72n\mcu_clocks.h
+ src\smc_gen\r_bsp\mcu\rx72n\mcu_info.h
+ src\smc_gen\r_bsp\mcu\rx72n\mcu_init.c
+ src\smc_gen\r_bsp\mcu\rx72n\mcu_init.h
+ src\smc_gen\r_bsp\mcu\rx72n\mcu_interrupts.c
+ src\smc_gen\r_bsp\mcu\rx72n\mcu_interrupts.h
+ src\smc_gen\r_bsp\mcu\rx72n\mcu_locks.h
+ src\smc_gen\r_bsp\mcu\rx72n\mcu_mapped_interrupts.c
+ src\smc_gen\r_bsp\mcu\rx72n\mcu_mapped_interrupts.h
+ src\smc_gen\r_bsp\mcu\rx72n\mcu_mapped_interrupts_private.h
+ src\smc_gen\r_bsp\mcu\rx72n\r_bsp_cpu.h
+ src\smc_gen\r_bsp\mcu\rx72n\r_bsp_locking.h
+ src\smc_gen\r_bsp\mcu\rx72n\vecttbl.c
+ src\smc_gen\r_bsp\mcu\rx72n\vecttbl.h
+
+
+ src\smc_gen\r_bsp\mcu\rx72n\register_access\ccrx\iodefine.h
+
+
+
+
+
+
+ src\smc_gen\r_cmt_rx\r_cmt_rx_if.h
+ src\smc_gen\r_cmt_rx\readme.txt
+
+
+ src\smc_gen\r_cmt_rx\doc\en\r01an1856ej0490-rx-timer.pdf
+
+
+ src\smc_gen\r_cmt_rx\doc\ja\r01an1856jj0490-rx-timer.pdf
+
+
+
+ src\smc_gen\r_cmt_rx\src\r_cmt_rx.c
+
+
+
+ src\smc_gen\r_config\r_bsp_config.h
+ src\smc_gen\r_config\r_bsp_config_readme.txt
+ src\smc_gen\r_config\r_bsp_interrupt_config.h
+ src\smc_gen\r_config\r_cmt_rx_config.h
+ src\smc_gen\r_config\r_ether_rx_config.h
+ src\smc_gen\r_config\r_sys_time_rx_config.h
+ src\smc_gen\r_config\r_t4_driver_rx_config.h
+ src\smc_gen\r_config\r_t4_rx_config.h
+ src\smc_gen\r_config\r_tsip_rx_config.h
+
+
+ src\smc_gen\r_ether_rx\r_ether_rx_if.h
+ src\smc_gen\r_ether_rx\readme.txt
+
+
+ src\smc_gen\r_ether_rx\doc\en\r01an2009ej0121-rx-ether.pdf
+
+
+ src\smc_gen\r_ether_rx\doc\ja\r01an2009jj0121-rx-ether.pdf
+
+
+
+ src\smc_gen\r_ether_rx\ref\r_ether_rx_config_reference.h
+
+
+ src\smc_gen\r_ether_rx\src\r_ether_rx.c
+ src\smc_gen\r_ether_rx\src\r_ether_rx_private.h
+
+ src\smc_gen\r_ether_rx\src\phy\phy.c
+ src\smc_gen\r_ether_rx\src\phy\phy.h
+
+
+
+ src\smc_gen\r_ether_rx\src\targets\rx72n\r_ether_setting_rx72n.c
+
+
+
+
+
+ src\smc_gen\r_pincfg\Pin.c
+ src\smc_gen\r_pincfg\Pin.h
+ src\smc_gen\r_pincfg\r_ether_rx_pinset.c
+ src\smc_gen\r_pincfg\r_ether_rx_pinset.h
+ src\smc_gen\r_pincfg\r_pinset.h
+
+
+ src\smc_gen\r_sys_time_rx\r_sys_time_rx_if.h
+ src\smc_gen\r_sys_time_rx\readme.txt
+
+
+ src\smc_gen\r_sys_time_rx\doc\en\r20an0431ej0101-rx-middle.pdf
+
+
+ src\smc_gen\r_sys_time_rx\doc\ja\r20an0431jj0101-rx-middle.pdf
+
+
+
+ src\smc_gen\r_sys_time_rx\ref\r_sys_time_rx_config_reference.h
+
+
+ src\smc_gen\r_sys_time_rx\src\r_sys_time_rx.c
+ src\smc_gen\r_sys_time_rx\src\r_sys_time_rx_private.h
+
+
+
+ src\smc_gen\r_t4_driver_rx\readme.txt
+
+
+ src\smc_gen\r_t4_driver_rx\doc\en\r20an0311ej0109-rx-t4.pdf
+
+
+ src\smc_gen\r_t4_driver_rx\doc\ja\r20an0311jj0109-rx-t4.pdf
+
+
+
+ src\smc_gen\r_t4_driver_rx\ref\r_t4_driver_rx_config_reference.h
+
+
+ src\smc_gen\r_t4_driver_rx\src\ether_callback.c
+ src\smc_gen\r_t4_driver_rx\src\t4_driver.c
+ src\smc_gen\r_t4_driver_rx\src\timer.c
+ src\smc_gen\r_t4_driver_rx\src\timer.h
+
+
+
+ src\smc_gen\r_t4_rx\readme.txt
+
+
+ src\smc_gen\r_t4_rx\doc\en\r20an0051ej0210-rx-t4.pdf
+ src\smc_gen\r_t4_rx\doc\en\r20uw0031ej0111-t4tiny.pdf
+ src\smc_gen\r_t4_rx\doc\en\r20uw0032ej0109-t4tiny.pdf
+
+
+ src\smc_gen\r_t4_rx\doc\ja\r20an0051jj0210-rx-t4.pdf
+ src\smc_gen\r_t4_rx\doc\ja\r20uw0031jj0111-t4tiny.pdf
+ src\smc_gen\r_t4_rx\doc\ja\r20uw0032jj0109-t4tiny.pdf
+
+
+
+ src\smc_gen\r_t4_rx\lib\r_mw_version.h
+ src\smc_gen\r_t4_rx\lib\r_stdint.h
+ src\smc_gen\r_t4_rx\lib\r_t4_itcpip.h
+
+
+ src\smc_gen\r_t4_rx\ref\r_t4_rx_config_reference.h
+
+
+ src\smc_gen\r_t4_rx\src\config_tcpudp.c
+
+
+
+ src\smc_gen\r_tsip_rx\r_tsip_rx_if.h
+ src\smc_gen\r_tsip_rx\readme.txt
+
+
+ src\smc_gen\r_tsip_rx\doc\en\r20an0548ej0114-rx-tsip-security.pdf
+
+
+ src\smc_gen\r_tsip_rx\doc\ja\r20an0548jj0114-rx-tsip-security.pdf
+
+
+
+ src\smc_gen\r_tsip_rx\ref\r_tsip_rx_config_reference.h
+
+
+
+
+
+ R5F572NNHxFB
+
+
+
+
+ -isa=rxv3
+ -fpu
+ -nodpfpu
+ -include="${ProjDirPath}\..\common"
+ -include="${ProjDirPath}\..\..\..\..\..\..\"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\Config_TMR0"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ -define=DEBUG_CONSOLE,WOLFSSL_USER_SETTINGS
+ -asmopt=-bank
+ -utf8
+ -nomessage
+ -debug
+ -outcode=utf8
+ -tfu=intrinsic
+ -nologo
+ -lang=c99
+ -lang=cpp
+ -output=obj=${CONFIGDIR}\${FILELEAF}.obj
+ -obj_path=${CONFIGDIR}
+
+
+ -isa=rxv3
+ -fpu
+ -nodpfpu
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ -utf8
+ -bank
+ -debug
+ -nologo
+ -output=${CONFIGDIR}
+
+
+ -output="${ProjName}.abs"
+ -form=absolute
+ -nomessage
+ -vect=_undefined_interrupt_source_isr
+ -list=${ProjName}.map
+ -nooptimize
+ -rom=D=R,D_1=R_1,D_2=R_2,D_8=R_8
+ -cpu=RAM=00000000-0007ffff,FIX=00080000-00083fff,FIX=00086000-00087fff,FIX=00088000-0009ffff,FIX=000a0000-000a3fff,RAM=000a4000-000a5fff,FIX=000a6000-000bffff,FIX=000c0000-000dffff,FIX=000e0000-000fffff,ROM=00100000-00107fff,FIX=007fc000-007fcfff,FIX=007fe000-007fffff,RAM=00800000-0087ffff,RAM=00ff8000-00ffffff,RAM=fe7f5d00-fe7f5d7f,RAM=fe7f7d70-fe7f7d9f,ROM=ffc00000-ffffffff
+ -nologo
+ -library="${ProjDirPath}/../${ProjName}/src/smc_gen/r_t4_rx/lib/ccrx/T4_Library_ether_ccrx_rxv1_little_debug.lib"
+ -library="${ProjDirPath}/../${ProjName}/src/smc_gen/r_tsip_rx/lib/ccrx/r_tsip_rx72m_rx72n_rx66n_little.lib"
+ -library="${ProjDirPath}/../wolfssl/Debug/wolfssl.lib"
+ -start=SU,SI,B_1,R_1,B_2,R_2,B,R,B_8,R_8/04,B_ETHERNET_BUFFERS_1,B_RX_DESC_1,B_TX_DESC_1/020000,C_1,C_2,C,C_8,C$*,D*,W*,L,P*/0FFC00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC
+ Auto
+
+
+ -isa=rxv3
+ -fpu
+ -nodpfpu
+ -lang=c99
+ -head=runtime,ctype,stdio,stdlib,string,new
+ -output="${ProjName}.lib"
+ -nologo
+ BuildOptionChanged
+
+
+ HardwareDebug\benchmark.obj
+ HardwareDebug\key_data.obj
+ HardwareDebug\Config_TMR0.obj
+ HardwareDebug\Config_TMR0_user.obj
+ HardwareDebug\r_cg_hardware_setup.obj
+ HardwareDebug\r_smc_cgc.obj
+ HardwareDebug\r_smc_cgc_user.obj
+ HardwareDebug\r_smc_interrupt.obj
+ HardwareDebug\hwsetup.obj
+ HardwareDebug\dbsct.obj
+ HardwareDebug\lowlvl.obj
+ HardwareDebug\lowsrc.obj
+ HardwareDebug\mcu_locks.obj
+ HardwareDebug\r_bsp_common.obj
+ HardwareDebug\r_bsp_cpu.obj
+ HardwareDebug\r_bsp_interrupts.obj
+ HardwareDebug\r_bsp_locking.obj
+ HardwareDebug\r_bsp_mcu_startup.obj
+ HardwareDebug\r_bsp_software_interrupt.obj
+ HardwareDebug\r_rx_intrinsic_functions.obj
+ HardwareDebug\resetprg.obj
+ HardwareDebug\sbrk.obj
+ HardwareDebug\mcu_clocks.obj
+ HardwareDebug\mcu_init.obj
+ HardwareDebug\mcu_interrupts.obj
+ HardwareDebug\mcu_mapped_interrupts.obj
+ HardwareDebug\vecttbl.obj
+ HardwareDebug\r_cmt_rx.obj
+ HardwareDebug\phy.obj
+ HardwareDebug\r_ether_rx.obj
+ HardwareDebug\r_ether_setting_rx72n.obj
+ HardwareDebug\Pin.obj
+ HardwareDebug\r_ether_rx_pinset.obj
+ HardwareDebug\r_sys_time_rx.obj
+ HardwareDebug\ether_callback.obj
+ HardwareDebug\t4_driver.obj
+ HardwareDebug\timer.obj
+ HardwareDebug\config_tcpudp.obj
+ HardwareDebug\test.obj
+ HardwareDebug\test_main.obj
+ HardwareDebug\wolf_client.obj
+ HardwareDebug\wolf_server.obj
+ HardwareDebug\wolfssl_dummy.obj
+ HardwareDebug\test.lib
+
+
+ "${ProjDirPath}\..\common"
+ "${ProjDirPath}\..\..\..\..\..\..\"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\Config_TMR0"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ DEBUG_CONSOLE
+ WOLFSSL_USER_SETTINGS
+
+
+
+
+
+ -isa=rxv2
+ -fpu
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx231"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx66t"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx65n"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ -define=DEBUG_CONSOLE
+ -utf8
+ -nomessage
+ -debug
+ -outcode=utf8
+ -nologo
+ -lang=c99
+ -lang=cpp
+ -output=obj=${CONFIGDIR}\${FILELEAF}.obj
+ -obj_path=${CONFIGDIR}
+
+
+ -isa=rxv2
+ -fpu
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ -include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ -utf8
+ -debug
+ -nologo
+ -output=${CONFIGDIR}
+
+
+ -output="${ProjName}.abs"
+ -form=absolute
+ -nomessage
+ -vect=_undefined_interrupt_source_isr
+ -list=${ProjName}.map
+ -nooptimize
+ -rom=D=R,D_1=R_1,D_2=R_2
+ -cpu=RAM=00000000-0003ffff,FIX=00080000-00083fff,FIX=00086000-00087fff,FIX=00088000-0009ffff,FIX=000a0000-000a3fff,RAM=000a4000-000a5fff,FIX=000a6000-000bffff,FIX=000c0000-000dffff,FIX=000e0000-000fffff,ROM=00100000-00107fff,FIX=007fc000-007fcfff,FIX=007fe000-007fffff,RAM=00800000-0085ffff,RAM=fe7f5d00-fe7f5d7f,RAM=fe7f7d70-fe7f7d9f,ROM=ffe00000-ffffffff
+ -nologo
+ -library="${ProjDirPath}/../${ProjName}/src/smc_gen/r_t4_rx/lib/T4_Library_rxv1_ether_little.lib"
+ -start=SU,SI,B_1,R_1,B_2,R_2,B,R/04,C_1,C_2,C,C$*,D*,W*,L,P*/0FFE00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC,B_ETHERNET_BUFFERS_1,B_RX_DESC_1,B_TX_DESC_1/00010000
+ Auto
+
+
+ -isa=rxv2
+ -fpu
+ -lang=c99
+ -head=runtime,stdio,stdlib,string,new
+ -output="${ProjName}.lib"
+ -nologo
+ BuildOptionChanged
+
+
+ Debug\benchmark.obj
+ Debug\key_data.obj
+ Debug\Config_TMR0.obj
+ Debug\Config_TMR0_user.obj
+ Debug\r_cg_hardware_setup.obj
+ Debug\r_smc_cgc.obj
+ Debug\r_smc_cgc_user.obj
+ Debug\r_smc_interrupt.obj
+ Debug\hwsetup.obj
+ Debug\dbsct.obj
+ Debug\lowlvl.obj
+ Debug\lowsrc.obj
+ Debug\mcu_locks.obj
+ Debug\r_bsp_common.obj
+ Debug\r_bsp_cpu.obj
+ Debug\r_bsp_interrupts.obj
+ Debug\r_bsp_locking.obj
+ Debug\r_bsp_mcu_startup.obj
+ Debug\r_bsp_software_interrupt.obj
+ Debug\r_rx_intrinsic_functions.obj
+ Debug\resetprg.obj
+ Debug\sbrk.obj
+ Debug\mcu_clocks.obj
+ Debug\mcu_init.obj
+ Debug\mcu_interrupts.obj
+ Debug\mcu_mapped_interrupts.obj
+ Debug\vecttbl.obj
+ Debug\r_cmt_rx.obj
+ Debug\phy.obj
+ Debug\r_ether_rx.obj
+ Debug\r_ether_setting_rx72n.obj
+ Debug\Pin.obj
+ Debug\r_ether_rx_pinset.obj
+ Debug\r_sys_time_rx.obj
+ Debug\ether_callback.obj
+ Debug\t4_driver.obj
+ Debug\timer.obj
+ Debug\config_tcpudp.obj
+ Debug\test.obj
+ Debug\test_main.obj
+ Debug\wolf_client.obj
+ Debug\wolf_server.obj
+ Debug\wolfssl_dummy.obj
+ Debug\test.lib
+
+
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx231"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx66t"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx65n"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\general"
+ "${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"
+ DEBUG_CONSOLE
+
+
+
+
+
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/test_HardwareDebug.launch b/IDE/Renesas/e2studio/RX72N/EnvisionKit/test/test_HardwareDebug.launch
similarity index 100%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/test/test_HardwareDebug.launch
rename to IDE/Renesas/e2studio/RX72N/EnvisionKit/test/test_HardwareDebug.launch
diff --git a/IDE/Renesas/e2studio/GR-ROSE/wolfssl/.cproject b/IDE/Renesas/e2studio/RX72N/EnvisionKit/wolfssl/.cproject
similarity index 63%
rename from IDE/Renesas/e2studio/GR-ROSE/wolfssl/.cproject
rename to IDE/Renesas/e2studio/RX72N/EnvisionKit/wolfssl/.cproject
index 6b500a870..39d22a2b2 100644
--- a/IDE/Renesas/e2studio/GR-ROSE/wolfssl/.cproject
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/wolfssl/.cproject
@@ -1,104 +1,178 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/wolfssl/.project b/IDE/Renesas/e2studio/RX72N/EnvisionKit/wolfssl/.project
similarity index 59%
rename from IDE/Renesas/e2studio/RX72NEnvisionKit/wolfssl/.project
rename to IDE/Renesas/e2studio/RX72N/EnvisionKit/wolfssl/.project
index a2f1351e7..b97788fd0 100644
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/wolfssl/.project
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/wolfssl/.project
@@ -27,372 +27,377 @@
src/crl.c
1
- PARENT-5-PROJECT_LOC/src/crl.c
+ PARENT-6-PROJECT_LOC/src/crl.c
src/internal.c
1
- PARENT-5-PROJECT_LOC/src/internal.c
+ PARENT-6-PROJECT_LOC/src/internal.c
src/keys.c
1
- PARENT-5-PROJECT_LOC/src/keys.c
+ PARENT-6-PROJECT_LOC/src/keys.c
src/ocsp.c
1
- PARENT-5-PROJECT_LOC/src/ocsp.c
+ PARENT-6-PROJECT_LOC/src/ocsp.c
src/sniffer.c
1
- PARENT-5-PROJECT_LOC/src/sniffer.c
+ PARENT-6-PROJECT_LOC/src/sniffer.c
src/ssl.c
1
- PARENT-5-PROJECT_LOC/src/ssl.c
+ PARENT-6-PROJECT_LOC/src/ssl.c
src/tls.c
1
- PARENT-5-PROJECT_LOC/src/tls.c
+ PARENT-6-PROJECT_LOC/src/tls.c
src/tls13.c
1
- PARENT-5-PROJECT_LOC/src/tls13.c
+ PARENT-6-PROJECT_LOC/src/tls13.c
src/wolfio.c
1
- PARENT-5-PROJECT_LOC/src/wolfio.c
+ PARENT-6-PROJECT_LOC/src/wolfio.c
+
+
+ wolfcrypt/port/renesas_common.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_common.c
wolfcrypt/port/renesas_tsip_aes.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c
wolfcrypt/port/renesas_tsip_sha.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c
wolfcrypt/port/renesas_tsip_util.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_util.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_util.c
wolfcrypt/src/aes.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/aes.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/aes.c
wolfcrypt/src/arc4.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/arc4.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/arc4.c
wolfcrypt/src/asm.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/asm.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/asm.c
wolfcrypt/src/asn.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/asn.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/asn.c
wolfcrypt/src/blake2b.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/blake2b.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/blake2b.c
wolfcrypt/src/camellia.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/camellia.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/camellia.c
wolfcrypt/src/chacha.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/chacha.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/chacha.c
wolfcrypt/src/chacha20_poly1305.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/chacha20_poly1305.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/chacha20_poly1305.c
wolfcrypt/src/cmac.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/cmac.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/cmac.c
wolfcrypt/src/coding.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/coding.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/coding.c
wolfcrypt/src/compress.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/compress.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/compress.c
wolfcrypt/src/cpuid.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/cpuid.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/cpuid.c
wolfcrypt/src/cryptocb.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/cryptocb.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/cryptocb.c
wolfcrypt/src/curve25519.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/curve25519.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/curve25519.c
wolfcrypt/src/des3.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/des3.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/des3.c
wolfcrypt/src/dh.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/dh.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/dh.c
wolfcrypt/src/dsa.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/dsa.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/dsa.c
wolfcrypt/src/ecc.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/ecc.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ecc.c
wolfcrypt/src/ecc_fp.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/ecc_fp.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ecc_fp.c
wolfcrypt/src/ed25519.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/ed25519.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ed25519.c
wolfcrypt/src/error.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/error.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/error.c
wolfcrypt/src/fe_low_mem.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/fe_low_mem.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/fe_low_mem.c
wolfcrypt/src/fe_operations.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/fe_operations.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/fe_operations.c
wolfcrypt/src/ge_low_mem.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/ge_low_mem.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ge_low_mem.c
wolfcrypt/src/ge_operations.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/ge_operations.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ge_operations.c
wolfcrypt/src/hash.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/hash.c
-
-
- wolfcrypt/src/kdf.c
- 1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/kdf.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/hash.c
wolfcrypt/src/hc128.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/hc128.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/hc128.c
wolfcrypt/src/hmac.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/hmac.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/hmac.c
wolfcrypt/src/idea.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/idea.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/idea.c
wolfcrypt/src/include.am
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/include.am
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/include.am
wolfcrypt/src/integer.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/integer.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/integer.c
+
+
+ wolfcrypt/src/kdf.c
+ 1
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/kdf.c
wolfcrypt/src/logging.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/logging.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/logging.c
wolfcrypt/src/md2.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/md2.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/md2.c
wolfcrypt/src/md4.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/md4.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/md4.c
wolfcrypt/src/md5.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/md5.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/md5.c
wolfcrypt/src/memory.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/memory.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/memory.c
wolfcrypt/src/pkcs12.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/pkcs12.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/pkcs12.c
wolfcrypt/src/pkcs7.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/pkcs7.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/pkcs7.c
wolfcrypt/src/poly1305.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/poly1305.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/poly1305.c
wolfcrypt/src/pwdbased.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/pwdbased.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/pwdbased.c
wolfcrypt/src/rabbit.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/rabbit.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/rabbit.c
wolfcrypt/src/random.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/random.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/random.c
wolfcrypt/src/ripemd.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/ripemd.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/ripemd.c
wolfcrypt/src/rsa.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/rsa.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/rsa.c
wolfcrypt/src/sha.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sha.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sha.c
wolfcrypt/src/sha256.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sha256.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sha256.c
wolfcrypt/src/sha3.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sha3.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sha3.c
wolfcrypt/src/sha512.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sha512.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sha512.c
wolfcrypt/src/signature.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/signature.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/signature.c
wolfcrypt/src/sp_arm32.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_arm32.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_arm32.c
wolfcrypt/src/sp_arm64.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_arm64.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_arm64.c
wolfcrypt/src/sp_c32.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_c32.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_c32.c
wolfcrypt/src/sp_c64.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_c64.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_c64.c
wolfcrypt/src/sp_int.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_int.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_int.c
wolfcrypt/src/sp_x86_64.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_x86_64.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/sp_x86_64.c
wolfcrypt/src/srp.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/srp.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/srp.c
wolfcrypt/src/tfm.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/tfm.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/tfm.c
wolfcrypt/src/wc_encrypt.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/wc_encrypt.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/wc_encrypt.c
wolfcrypt/src/wc_port.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/wc_port.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/wc_port.c
wolfcrypt/src/wolfevent.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/wolfevent.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/wolfevent.c
wolfcrypt/src/wolfmath.c
1
- PARENT-5-PROJECT_LOC/wolfcrypt/src/wolfmath.c
+ PARENT-6-PROJECT_LOC/wolfcrypt/src/wolfmath.c
diff --git a/IDE/Renesas/e2studio/RX72N/EnvisionKit/wolfssl/wolfssl.rcpc b/IDE/Renesas/e2studio/RX72N/EnvisionKit/wolfssl/wolfssl.rcpc
new file mode 100644
index 000000000..2f2a6ad59
--- /dev/null
+++ b/IDE/Renesas/e2studio/RX72N/EnvisionKit/wolfssl/wolfssl.rcpc
@@ -0,0 +1,220 @@
+
+
+
+
+ ${
+ }
+
+
+
+
+ ..\..\..\..\..\..\src\crl.c
+ ..\..\..\..\..\..\src\internal.c
+ ..\..\..\..\..\..\src\keys.c
+ ..\..\..\..\..\..\src\ocsp.c
+ ..\..\..\..\..\..\src\sniffer.c
+ ..\..\..\..\..\..\src\ssl.c
+ ..\..\..\..\..\..\src\tls.c
+ ..\..\..\..\..\..\src\tls13.c
+ ..\..\..\..\..\..\src\wolfio.c
+
+
+
+ ..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_common.c
+ ..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_aes.c
+ ..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_sha.c
+ ..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_util.c
+
+
+ ..\..\..\..\..\..\wolfcrypt\src\aes.c
+ ..\..\..\..\..\..\wolfcrypt\src\arc4.c
+ ..\..\..\..\..\..\wolfcrypt\src\asm.c
+ ..\..\..\..\..\..\wolfcrypt\src\asn.c
+ ..\..\..\..\..\..\wolfcrypt\src\blake2b.c
+ ..\..\..\..\..\..\wolfcrypt\src\camellia.c
+ ..\..\..\..\..\..\wolfcrypt\src\chacha.c
+ ..\..\..\..\..\..\wolfcrypt\src\chacha20_poly1305.c
+ ..\..\..\..\..\..\wolfcrypt\src\cmac.c
+ ..\..\..\..\..\..\wolfcrypt\src\coding.c
+ ..\..\..\..\..\..\wolfcrypt\src\compress.c
+ ..\..\..\..\..\..\wolfcrypt\src\cpuid.c
+ ..\..\..\..\..\..\wolfcrypt\src\cryptocb.c
+ ..\..\..\..\..\..\wolfcrypt\src\curve25519.c
+ ..\..\..\..\..\..\wolfcrypt\src\des3.c
+ ..\..\..\..\..\..\wolfcrypt\src\dh.c
+ ..\..\..\..\..\..\wolfcrypt\src\dsa.c
+ ..\..\..\..\..\..\wolfcrypt\src\ecc.c
+ ..\..\..\..\..\..\wolfcrypt\src\ecc_fp.c
+ ..\..\..\..\..\..\wolfcrypt\src\ed25519.c
+ ..\..\..\..\..\..\wolfcrypt\src\error.c
+ ..\..\..\..\..\..\wolfcrypt\src\fe_low_mem.c
+ ..\..\..\..\..\..\wolfcrypt\src\fe_operations.c
+ ..\..\..\..\..\..\wolfcrypt\src\ge_low_mem.c
+ ..\..\..\..\..\..\wolfcrypt\src\ge_operations.c
+ ..\..\..\..\..\..\wolfcrypt\src\hash.c
+ ..\..\..\..\..\..\wolfcrypt\src\hc128.c
+ ..\..\..\..\..\..\wolfcrypt\src\hmac.c
+ ..\..\..\..\..\..\wolfcrypt\src\idea.c
+ ..\..\..\..\..\..\wolfcrypt\src\integer.c
+ ..\..\..\..\..\..\wolfcrypt\src\kdf.c
+ ..\..\..\..\..\..\wolfcrypt\src\logging.c
+ ..\..\..\..\..\..\wolfcrypt\src\md2.c
+ ..\..\..\..\..\..\wolfcrypt\src\md4.c
+ ..\..\..\..\..\..\wolfcrypt\src\md5.c
+ ..\..\..\..\..\..\wolfcrypt\src\memory.c
+ ..\..\..\..\..\..\wolfcrypt\src\pkcs12.c
+ ..\..\..\..\..\..\wolfcrypt\src\pkcs7.c
+ ..\..\..\..\..\..\wolfcrypt\src\poly1305.c
+ ..\..\..\..\..\..\wolfcrypt\src\pwdbased.c
+ ..\..\..\..\..\..\wolfcrypt\src\rabbit.c
+ ..\..\..\..\..\..\wolfcrypt\src\random.c
+ ..\..\..\..\..\..\wolfcrypt\src\ripemd.c
+ ..\..\..\..\..\..\wolfcrypt\src\rsa.c
+ ..\..\..\..\..\..\wolfcrypt\src\sha.c
+ ..\..\..\..\..\..\wolfcrypt\src\sha256.c
+ ..\..\..\..\..\..\wolfcrypt\src\sha3.c
+ ..\..\..\..\..\..\wolfcrypt\src\sha512.c
+ ..\..\..\..\..\..\wolfcrypt\src\signature.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_arm32.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_arm64.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_c32.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_c64.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_int.c
+ ..\..\..\..\..\..\wolfcrypt\src\sp_x86_64.c
+ ..\..\..\..\..\..\wolfcrypt\src\srp.c
+ ..\..\..\..\..\..\wolfcrypt\src\tfm.c
+ ..\..\..\..\..\..\wolfcrypt\src\wc_encrypt.c
+ ..\..\..\..\..\..\wolfcrypt\src\wc_port.c
+ ..\..\..\..\..\..\wolfcrypt\src\wolfevent.c
+ ..\..\..\..\..\..\wolfcrypt\src\wolfmath.c
+
+
+
+ R5F572NNHxFB
+
+
+
+
+ -isa=rxv2
+ -include="${ProjDirPath}\..\common"
+ -include="${ProjDirPath}\\..\..\..\..\..\..\"
+ -include="${ProjDirPath}\..\test\src\smc_gen\"
+ -include="${ProjDirPath}\..\test\src\smc_gen\r_bsp"
+ -include="${ProjDirPath}\..\test\src\smc_gen\r_config"
+ -include="${ProjDirPath}\..\test\src\smc_gen\r_tsip_rx"
+ -define=WOLFSSL_USER_SETTINGS
+ -nomessage
+ -debug
+ -tfu=intrinsic
+ -nologo
+ -lang=c99
+ -lang=cpp
+ -output=obj=${CONFIGDIR}\${FILELEAF}.obj
+ -obj_path=${CONFIGDIR}
+
+
+ -isa=rxv2
+ -debug
+ -nologo
+ -output=${CONFIGDIR}
+
+
+ -output="${ProjName}.lib"
+ -form=library=u
+ -nomessage
+ -list=${ProjName}.lbp
+ -nologo
+ Auto
+
+
+ None
+
+
+ Debug\crl.obj
+ Debug\internal.obj
+ Debug\keys.obj
+ Debug\ocsp.obj
+ Debug\sniffer.obj
+ Debug\ssl.obj
+ Debug\tls.obj
+ Debug\tls13.obj
+ Debug\wolfio.obj
+ Debug\renesas_common.obj
+ Debug\renesas_tsip_aes.obj
+ Debug\renesas_tsip_sha.obj
+ Debug\renesas_tsip_util.obj
+ Debug\aes.obj
+ Debug\arc4.obj
+ Debug\asm.obj
+ Debug\asn.obj
+ Debug\blake2b.obj
+ Debug\camellia.obj
+ Debug\chacha.obj
+ Debug\chacha20_poly1305.obj
+ Debug\cmac.obj
+ Debug\coding.obj
+ Debug\compress.obj
+ Debug\cpuid.obj
+ Debug\cryptocb.obj
+ Debug\curve25519.obj
+ Debug\des3.obj
+ Debug\dh.obj
+ Debug\dsa.obj
+ Debug\ecc.obj
+ Debug\ecc_fp.obj
+ Debug\ed25519.obj
+ Debug\error.obj
+ Debug\fe_low_mem.obj
+ Debug\fe_operations.obj
+ Debug\ge_low_mem.obj
+ Debug\ge_operations.obj
+ Debug\hash.obj
+ Debug\hc128.obj
+ Debug\hmac.obj
+ Debug\idea.obj
+ Debug\integer.obj
+ Debug\kdf.obj
+ Debug\logging.obj
+ Debug\md2.obj
+ Debug\md4.obj
+ Debug\md5.obj
+ Debug\memory.obj
+ Debug\pkcs12.obj
+ Debug\pkcs7.obj
+ Debug\poly1305.obj
+ Debug\pwdbased.obj
+ Debug\rabbit.obj
+ Debug\random.obj
+ Debug\ripemd.obj
+ Debug\rsa.obj
+ Debug\sha.obj
+ Debug\sha256.obj
+ Debug\sha3.obj
+ Debug\sha512.obj
+ Debug\signature.obj
+ Debug\sp_arm32.obj
+ Debug\sp_arm64.obj
+ Debug\sp_c32.obj
+ Debug\sp_c64.obj
+ Debug\sp_int.obj
+ Debug\sp_x86_64.obj
+ Debug\srp.obj
+ Debug\tfm.obj
+ Debug\wc_encrypt.obj
+ Debug\wc_port.obj
+ Debug\wolfevent.obj
+ Debug\wolfmath.obj
+
+
+ "${ProjDirPath}\..\common"
+ "${ProjDirPath}\\..\..\..\..\..\..\"
+ "${ProjDirPath}\..\test\src\smc_gen\"
+ "${ProjDirPath}\..\test\src\smc_gen\r_bsp"
+ "${ProjDirPath}\..\test\src\smc_gen\r_config"
+ "${ProjDirPath}\..\test\src\smc_gen\r_tsip_rx"
+ WOLFSSL_USER_SETTINGS
+
+
+
+
+
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/README b/IDE/Renesas/e2studio/RX72NEnvisionKit/README
deleted file mode 100644
index 331debab1..000000000
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/README
+++ /dev/null
@@ -1,155 +0,0 @@
------------------------------------------------------
-0. 初めに
------------------------------------------------------
-
-このドキュメントではE2Studio上でwolfsslを含んだテストアプリケーションを作成する手順を示します。
-
-このREADMEが含まれているフォルダには
- 1.smc ---スマートコンフィギュレータ用プロジェクトが格納されているフォルダです
- 2.test ---テストアプリケーション用プロジェクトが格納されているフォルダです
- 3.wolfssl ---テストアプリケーションにリンクされて使用されるwolfsslライブラリ用プロジェクトが格納されているフォルダです
- 4.common ---設定ファイル等が格納されたフォルダです
-
-フォルダが存在しています。
-
--------------------------------------
-1.プロジェクトのインポート
--------------------------------------
-
-e2studioを起動したら、プロジェクト・エクスプローラー画面を表示させ、"ファイル"メニュー > ”ファイル・システムからプロジェクトを開く...”を選択し、
-プロジェクトインポートダイアログを表示させます。
-
-ディレクトリボタンを押して、上記の1~3のフォルダの3プロジェクトをインポートしてください。
-
--------------------------------------
-2.smcプロジェクトでソースファイルを生成させる
--------------------------------------
-
-smcプロジェクトにはsmc.scfgファイルが既に用意してあります。
-このファイルをダブルクリックするとスマートコンフィギュレータパースペクティブが開き、複数のタブを含んだ設定ページが表示されます。
-概要タブに現在選択されているコンポーネントがバージョンとともにリストアップされています。
-これらはテストアプリケーションの実行に必要なものが設定済みとなっています。
-ボード情報、クロック設定などもRX72N EnvisionKitに合わせて設定済みです。
-
-設定が必要な個所は、
-コンポーネントタブで r_t4_rx コンポーネントの設定を表示させます。ここで、次のプロパティの値
-#IP address for ch0,when DHCP disable.
-
-として、RX72N EnvisionKitに設定するIPv4アドレスを皆さんの環境に合った値に設定してください。
-ここだけが設定が必要な個所です。
-
-設定を保存し、画面右上のソースファイル生成ボタンを押してソースファイルを生成させてください。
-
--------------------------------------
-3.testプロジェクトに生成させたソースファイルをコピーする
--------------------------------------
-
-e2studioのプロジェクト・エクスプローラー画面のtestプロジェクトのフォルダを展開すると、
-srcフォルダがあります。このフォルダに、smcプロジェクトフォルダ内のsrc/smc_genをコピーしてください。
-
--------------------------------------
-4.testプロジェクトの動作を選択する
--------------------------------------
-
-テストアプリケーションは、暗号化テスト、ベンチマーク、TLSクライアント、TLSサーバーの
-4種類の動作を選択できます。選択は、common/user_settings.hの
-定義文のいずれか一つを有効化することで行います。
-
--------------------------------------
-5.wolfsslプロジェクト、testプロジェクトをビルドする
--------------------------------------
-
-ビルド前に必ず上記4の設定が終わっていることを確認してください。
-ビルドはwolfssl,testの順に行います。
-
--------------------------------------
-6.エミュレータを使ってtestアプリケーションを実行する
--------------------------------------
-
-エミュレータとターゲットボードとPCをケーブルで接続したら、すでに、test HardwareDebug.launchが用意してありますから
-e2studioのメニュー”実行” >”デバッグ”を選択してデバッグを開始してください。
-
-お手持ちのエミュレータが異なる場合はデバッグ構成を変更して上記ファイルを更新してください。
-
-デバッグパースペクティブ表示になったら、e2studioのメニュー”Renesas Views” > ”デバッグ” > "Renesas Debug Virtual Console"を選択して
-デバッグコンソール画面を表示してください。 testアプリケーション実行時の経過、結果等の表示がこのコンソールに出力されます。
-
-
-=================================================================================
-
------------------------------------------------------
-0. About this document
------------------------------------------------------
-
-This document will show you how to create a test application containing wolfssl on E2Studio.
-
-The folder that contains this README has:
- 1.smc --- the folder where the smart configurator project is stored.
- 2.test --- the folder where the test application project is stored
- 3.wolfssl --- the folder where the project for the wolfssl library used by the test application is stored.
- 4.common --- the folder where the configuration files etc. are stored
-
-
--------------------------------------
-1. Import projects
--------------------------------------
-
-After starting e2studio, display the project explorer screen,
-select "File" menu> "Open project from file system...",
-Display the project import dialog.
-
-Press the directory button and import the 3 projects in the folders 1 to 3 above.
-
--------------------------------------
-2. Generate source files in smc project
--------------------------------------
-
-The smc.scfg file is already prepared in the smc project.
-Double-clicking on this file will open the Smart Configurator perspective,
-displaying a configuration page with multiple tabs.
-The components currently selected in the Overview tab are listed along with their version.
-These are already set up to run the test application.
-Board information and clock settings are already set according to RX72N EnvisionKit.
-
-The points that need to be set are
-Display the r_t4_rx component settings in the component tab. Where the value of the following property
-#IP address for ch0,when DHCP disable.
-
-Then, set the IPv4 address set in RX72N EnvisionKit to a value that suits your environment.
-This is the only place that needs to be set.
-
-Save the settings and press the source file generation button at the top right of the screen to generate the source file.
-
--------------------------------------
-3. Copy the source files generated in the test project
--------------------------------------
-
-When you expand the test project folder on the e2studio Project Explorer screen,
-There is a src folder. Copy src/smc_gen in the smc project folder to test/src folder.
-
--------------------------------------
-4. Select the behavior of the test project
--------------------------------------
-
-Test applications include encryption test, benchmark, TLS client, TLS server
-You can select four types of operation.
-This is done by activating one of those commented definition statements in common/user_settings.h.
-
--------------------------------------
-5. Build wolfssl project, test project
--------------------------------------
-
-Make sure that the above settings are completed before building.
-Build in order of wolfssl and test.
-
--------------------------------------
-6. Run the test application using the emulator
--------------------------------------
-
-After connecting the emulator, target board and PC with a cable, test HardwareDebug.launch is already prepared.
-Select "Run"> "Debug" in e2 studio to start debugging.
-
-If the emulator you have is different, change the debug configuration and update the above file.
-
-When the debug perspective is displayed, select the e2 studio menu "Renesas Views"> "Debug"> "Renesas Debug Virtual Console"
-Display the debug console screen. The progress and results of the test application execution are output to this console.
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/include.am b/IDE/Renesas/e2studio/RX72NEnvisionKit/include.am
deleted file mode 100644
index 1b59192e7..000000000
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/include.am
+++ /dev/null
@@ -1,23 +0,0 @@
-# vim:ft=automake
-# included from Top Level Makefile.am
-# All paths should be given relative to the root
-
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/README
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/wolfssl/.cproject
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/wolfssl/.project
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/.cproject
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/.project
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/test_HardwareDebug.launch
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/test_main.c
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/key_data.c
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/key_data.h
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolf_client.c
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolf_server.c
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolfssl_demo.h
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/common/wolfssl_dummy.c
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/common/strings.h
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/common/unistd.h
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/common/user_settings.h
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/smc/.cproject
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/smc/.project
-EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/smc/smc.scfg
\ No newline at end of file
diff --git a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/key_data.c b/IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/key_data.c
deleted file mode 100644
index 3bd0e8df5..000000000
--- a/IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/key_data.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* key_data.c
- *
- * Copyright (C) 2006-2021 wolfSSL Inc.
- *
- * This file is part of wolfSSL.
- *
- * wolfSSL is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * wolfSSL is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
- */
-
-#include "key_data.h"
-
-/*-------------------------------------------------------------------------
- TSIP v1.09
---------------------------------------------------------------------------*/
-#if defined(WOLFSSL_RENESAS_TSIP_TLS) && (WOLFSSL_RENESAS_TSIP_VER >=109)
-
-/* Key type of the encrypted user_public_key 0: RSA-2048 2: ECDSA-P256*/
-const uint32_t encrypted_user_key_type = 0;
-
-const st_key_block_data_t g_key_block_data =
-{
- /* uint8_t encrypted_provisioning_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2]; */
- {
- 0xD8, 0xB3, 0xA7, 0xDB, 0xD1, 0x5E, 0x44, 0x24, 0x00, 0xDA, 0xEB, 0xB3, 0x33, 0xE1, 0x49, 0xAF,
- 0x4B, 0xAC, 0xC5, 0xF5, 0xC8, 0xD5, 0xAC, 0x12, 0x7F, 0xF7, 0x58, 0xAE, 0x59, 0xFE, 0xFB, 0x32
- },
- /* uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE]; */
- {
- 0xF6, 0xA9, 0x83, 0x5A, 0xA1, 0x65, 0x1D, 0x28, 0xC8, 0x1A, 0xA6, 0x9D, 0x34, 0xB2, 0x4D, 0x92
- },
- /* uint8_t encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16]; */
- {
- 0xC1, 0xB7, 0xCC, 0x99, 0x0A, 0xC8, 0x3E, 0xAB, 0x74, 0x35, 0x9D, 0x1C, 0x81, 0x32, 0x72, 0xA7,
- 0xA8, 0x0D, 0xBA, 0x1B, 0x35, 0x42, 0x2F, 0x7B, 0xB4, 0x1C, 0x86, 0x81, 0xC4, 0xFA, 0xD9, 0x65,
- 0xCE, 0x8A, 0x70, 0x1A, 0x28, 0x09, 0x72, 0xC0, 0x4F, 0x7A, 0x4A, 0xC7, 0xE6, 0x21, 0x65, 0x6E,
- 0xEB, 0x11, 0x45, 0x23, 0x35, 0xC0, 0x0F, 0x1D, 0x48, 0xC6, 0x8A, 0x1C, 0x27, 0x70, 0xA6, 0x26,
- 0xD0, 0x49, 0xCD, 0x42, 0x8D, 0x65, 0x2F, 0xFC, 0x32, 0x12, 0x6F, 0xE6, 0x61, 0xB6, 0x2F, 0xD9,
- 0xA7, 0xC3, 0xB0, 0x3A, 0x4F, 0x58, 0xFD, 0x1E, 0x8E, 0xDE, 0x5C, 0xD4, 0xF3, 0x4E, 0xF7, 0x45,
- 0x01, 0xDC, 0x39, 0x38, 0x15, 0x37, 0x8A, 0xFD, 0x59, 0x1A, 0x6C, 0x04, 0x55, 0x31, 0x56, 0x14,
- 0x07, 0x71, 0x9A, 0x19, 0x81, 0x7F, 0x69, 0x88, 0xD7, 0xD5, 0xBE, 0xB4, 0x95, 0x83, 0xC5, 0x35,
- 0xA8, 0xDE, 0x65, 0x5E, 0x95, 0xBB, 0xE3, 0x9C, 0x81, 0x4C, 0x8B, 0x18, 0x4C, 0xEA, 0x12, 0xEE,
- 0xF3, 0x98, 0x68, 0x35, 0xC8, 0xA5, 0x69, 0x6F, 0x71, 0x8C, 0xAA, 0xB5, 0x3F, 0xF7, 0x3C, 0x10,
- 0xC0, 0xD4, 0x46, 0x4D, 0xD0, 0x56, 0xDB, 0x7F, 0xC1, 0x52, 0xE0, 0x06, 0xD8, 0xB9, 0x5E, 0x41,
- 0x43, 0x0E, 0xBB, 0xCD, 0x5C, 0x4D, 0x02, 0x37, 0xD1, 0xFD, 0x88, 0xCB, 0x49, 0xC3, 0x51, 0x0C,
- 0x8A, 0x17, 0x71, 0xFE, 0x97, 0x8F, 0xF6, 0x65, 0xFC, 0xF8, 0xB4, 0xC2, 0x65, 0x4B, 0x5B, 0x74,
- 0x4B, 0xFF, 0x35, 0xE9, 0x33, 0x3A, 0xBE, 0xDF, 0x23, 0x4F, 0xDB, 0x3F, 0x94, 0x6F, 0x34, 0x21,
- 0x76, 0x14, 0xAF, 0x2B, 0x96, 0x62, 0xA5, 0x52, 0x80, 0xB9, 0x36, 0x7E, 0x25, 0xAF, 0xB6, 0x75,
- 0xE5, 0x79, 0x8E, 0xE8, 0x67, 0xE4, 0xDD, 0x4B, 0x3D, 0xB2, 0x7F, 0xAF, 0x32, 0xC5, 0xF5, 0x1B,
- 0x90, 0x0E, 0x41, 0x97, 0x5D, 0xFD, 0xC1, 0x9A, 0xA1, 0xF9, 0x57, 0xF1, 0x21, 0x94, 0xF9, 0x31,
- 0xC9, 0xC7, 0x16, 0xAA, 0xD8, 0xE9, 0x78, 0x03, 0xAD, 0xEF, 0x3E, 0x98, 0x1F, 0x32, 0x3D, 0x8E
- },
- /* uint8_t encrypted_user_update_key[R_TSIP_AES256_KEY_BYTE_SIZE + 16]; */
- {
- 0x70, 0xA8, 0xB5, 0x63, 0xE9, 0xC2, 0xA0, 0xFC, 0xE5, 0xA5, 0x4D, 0x94, 0x6E, 0x69, 0xE8, 0x94,
- 0xAC, 0xE6, 0x68, 0x7C, 0xB2, 0xB9, 0xDC, 0xCF, 0x69, 0xBC, 0xE6, 0xB9, 0x8C, 0xDA, 0x72, 0x5C,
- 0x62, 0xE9, 0xB9, 0xC1, 0xB4, 0xC7, 0x60, 0x21, 0xAE, 0x1B, 0x52, 0x25, 0x06, 0x8A, 0x91, 0xA1
- },
-
-};
-/* ./ca-cert.der.sign, */
-const unsigned char ca_cert_sig[] =
-{
- 0x0E,0xC3,0x9B,0x77,0xF8,0x58,0x08,0x9E,0x5D,0x1E,0x03,0x8D,0x60,0xD1,0xF6,0x3E,
- 0x3D,0xFF,0x89,0x4C,0x91,0x5C,0x00,0xEB,0x05,0xE5,0x65,0x62,0x17,0xFB,0xD4,0x52,
- 0x69,0x9D,0xB8,0x07,0xAF,0xA9,0x4C,0xA5,0xB9,0x8D,0x52,0xC0,0xF3,0x34,0x13,0x67,
- 0x40,0xAA,0xE1,0xA3,0x9E,0x5D,0x0F,0xCE,0x87,0xB0,0x10,0xB4,0x79,0x8F,0x84,0x21,
- 0x81,0xC2,0xF9,0xF7,0xDB,0xCB,0x8F,0xE4,0x9B,0xF5,0x85,0x9D,0x11,0x04,0xFB,0xA7,
- 0xFD,0x13,0x6F,0x02,0xA5,0xBF,0xE0,0x89,0x62,0x5E,0x24,0x95,0xF6,0x01,0x7D,0x7F,
- 0xB5,0xD1,0xDD,0xF3,0x3B,0xD5,0x04,0x54,0xE1,0x8E,0xA8,0x3D,0x30,0xB3,0x35,0x76,
- 0xAF,0xA7,0x94,0xD7,0x59,0x82,0x38,0x2C,0xD6,0x95,0x57,0xD1,0xD5,0x62,0xB1,0x69,
- 0x60,0xCD,0x3F,0x7D,0x0E,0x9F,0x00,0x21,0x04,0xFE,0x43,0xBD,0x7D,0x3D,0xA7,0x6B,
- 0xC5,0x82,0x92,0xDE,0xB7,0xA3,0xD4,0x7D,0x3C,0x14,0x46,0x28,0x50,0xCA,0x86,0x9F,
- 0x66,0x4C,0xB0,0x46,0x46,0x4D,0x31,0xD6,0x7B,0xEC,0xBA,0xED,0xA1,0xF9,0x88,0x68,
- 0xB9,0xA9,0xDA,0x88,0x63,0x01,0x95,0x5B,0x78,0x38,0x03,0xD6,0xDF,0x86,0xC4,0x3E,
- 0x3B,0xCF,0xED,0x8B,0x2A,0x41,0x49,0x65,0x3E,0x2F,0x45,0x71,0xD8,0x0B,0xF1,0xF0,
- 0xC7,0xB5,0x2E,0xBE,0xF0,0x71,0xDE,0x40,0xB0,0x54,0x25,0xD7,0x4A,0x86,0xF1,0xB9,
- 0xF6,0xAB,0x07,0x07,0x21,0x7C,0x15,0x7B,0x1F,0xCF,0xE4,0x1F,0x0B,0xEB,0x0E,0x96,
- 0xE5,0x59,0x34,0xC6,0x4B,0x1B,0xF6,0xC7,0x6C,0x4C,0x16,0x43,0x72,0xAF,0x82,0x1E
-};
-const int sizeof_ca_cert_sig = sizeof(ca_cert_sig);
-/* ./client-cert.der.sign, */
-const unsigned char client_cert_der_sign[] =
-{
- 0x5D, 0x1F, 0x89, 0x41, 0xEC, 0x47, 0xC8, 0x90, 0x61, 0x79,
- 0x8A, 0x16, 0x1F, 0x31, 0x96, 0x67, 0xD9, 0x3C, 0xEC, 0x6B,
- 0x58, 0xC6, 0x5A, 0xED, 0x99, 0xB3, 0xEF, 0x27, 0x6F, 0x04,
- 0x8C, 0xD9, 0x68, 0xB1, 0xD6, 0x23, 0x15, 0x84, 0x00, 0xE1,
- 0x27, 0xD1, 0x1F, 0x68, 0xB7, 0x3F, 0x13, 0x53, 0x8A, 0x95,
- 0x5A, 0x20, 0x7C, 0xB2, 0x76, 0x5B, 0xDC, 0xE0, 0xA6, 0x21,
- 0x7C, 0x49, 0xCF, 0x93, 0xBA, 0xD5, 0x12, 0x9F, 0xEE, 0x90,
- 0x5B, 0x3F, 0xA3, 0x9D, 0x13, 0x72, 0xAC, 0x72, 0x16, 0xFE,
- 0x1D, 0xBE, 0xEB, 0x8E, 0xC7, 0xDC, 0xC4, 0xF8, 0x1A, 0xD8,
- 0xA0, 0xA4, 0xF6, 0x04, 0x30, 0xF6, 0x7E, 0xB6, 0xC8, 0xE1,
- 0xAB, 0x88, 0x37, 0x08, 0x63, 0x72, 0xAA, 0x46, 0xCC, 0xCA,
- 0xF0, 0x9E, 0x02, 0x1E, 0x65, 0x67, 0xFF, 0x2C, 0x9D, 0x81,
- 0x6C, 0x1E, 0xF1, 0x54, 0x05, 0x68, 0x68, 0x18, 0x72, 0x26,
- 0x55, 0xB6, 0x2C, 0x95, 0xC0, 0xC9, 0xB2, 0xA7, 0x0B, 0x60,
- 0xD7, 0xEB, 0x1D, 0x08, 0x1A, 0xA2, 0x54, 0x15, 0x89, 0xCB,
- 0x83, 0x21, 0x5D, 0x15, 0x9B, 0x38, 0xAC, 0x89, 0x63, 0xD5,
- 0x4B, 0xF4, 0x8B, 0x47, 0x93, 0x78, 0x43, 0xCB, 0x9B, 0x71,
- 0xBF, 0x94, 0x76, 0xB5, 0xCE, 0x35, 0xA9, 0x1A, 0xD5, 0xA5,
- 0xD8, 0x19, 0xA6, 0x04, 0x39, 0xB1, 0x09, 0x8C, 0x65, 0x02,
- 0x58, 0x3A, 0x95, 0xEF, 0xA2, 0xC3, 0x85, 0x18, 0x61, 0x23,
- 0x2D, 0xC5, 0xCD, 0x62, 0xC1, 0x19, 0x31, 0xE5, 0x36, 0x95,
- 0x22, 0xDB, 0x3E, 0x1A, 0x3C, 0xE8, 0xC6, 0x2E, 0xDF, 0xD9,
- 0x2F, 0x84, 0xC1, 0xF0, 0x38, 0x2B, 0xE5, 0x73, 0x35, 0x4F,
- 0x05, 0xE2, 0xA5, 0x60, 0x79, 0xB0, 0x23, 0xDC, 0x56, 0x4C,
- 0xE7, 0xD9, 0x1F, 0xCF, 0x6A, 0xFC, 0x55, 0xEB, 0xAA, 0x48,
- 0x3E, 0x95, 0x2A, 0x10, 0x01, 0x05
-};
-const int sizeof_client_cert_der_sign = sizeof(client_cert_der_sign);
-
-uint32_t s_inst1[R_TSIP_SINST_WORD_SIZE] = { 0 };
-uint32_t s_inst2[R_TSIP_SINST2_WORD_SIZE]= { 0 };
-#endif
diff --git a/IDE/include.am b/IDE/include.am
index f20b73715..129a1d11c 100644
--- a/IDE/include.am
+++ b/IDE/include.am
@@ -29,8 +29,9 @@ include IDE/Renesas/e2studio/DK-S7G2/include.am
include IDE/Renesas/cs+/Projects/include.am
include IDE/Renesas/e2studio/Projects/include.am
include IDE/Renesas/e2studio/RA6M3/include.am
-include IDE/Renesas/e2studio/GR-ROSE/include.am
-include IDE/Renesas/e2studio/RX72NEnvisionKit/include.am
+include IDE/Renesas/e2studio/RX65N/GR-ROSE/include.am
+include IDE/Renesas/e2studio/RX72N/EnvisionKit/include.am
+include IDE/Renesas/e2studio/RX65N/RSK/include.am
include IDE/Renesas/e2studio/RA6M4/include.am
include IDE/WICED-STUDIO/include.am
include IDE/CRYPTOCELL/include.am
diff --git a/src/internal.c b/src/internal.c
index 65ac2d73b..34298ca7b 100644
--- a/src/internal.c
+++ b/src/internal.c
@@ -220,12 +220,8 @@ static int SSL_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz,
#endif /* !WOLFSSL_NO_TLS12 */
-#ifdef WOLFSSL_RENESAS_TSIP_TLS
- int tsip_useable(const WOLFSSL *ssl);
- int tsip_generatePremasterSecret();
- int tsip_generateEncryptPreMasterSecret(WOLFSSL *ssl, byte *out, word32 *outSz);
-#endif
-#if defined(WOLFSSL_RENESAS_SCEPROTECT)
+
+#if defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_TSIP_TLS)
#include
#endif
@@ -1821,7 +1817,8 @@ int wolfSSL_session_import_internal(WOLFSSL* ssl, const unsigned char* buf,
/* set hmac function to use when verifying */
if (ssl->options.tls == 1 || ssl->options.tls1_1 == 1 ||
ssl->options.dtls == 1) {
- #if !defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if !defined(WOLFSSL_RENESAS_SCEPROTECT) && \
+ !defined(WOLFSSL_RENESAS_TSIP_TLS)
ssl->hmac = TLS_hmac;
#else
ssl->hmac = Renesas_cmn_TLS_hmac;
@@ -4360,7 +4357,8 @@ int RsaVerify(WOLFSSL* ssl, byte* in, word32 inSz, byte** out, int sigAlgo,
void* ctx = wolfSSL_GetRsaVerifyCtx(ssl);
ret = ssl->ctx->RsaVerifyCb(ssl, in, inSz, out, keyBuf, keySz, ctx);
}
- #if !defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if !defined(WOLFSSL_RENESAS_SCEPROTECT) && \
+ !defined(WOLFSSL_RENESAS_TSIP_TLS)
else
#else
if (!ssl->ctx->RsaVerifyCb || ret == CRYPTOCB_UNAVAILABLE)
@@ -4609,7 +4607,8 @@ int RsaEnc(WOLFSSL* ssl, const byte* in, word32 inSz, byte* out, word32* outSz,
void* ctx = wolfSSL_GetRsaEncCtx(ssl);
ret = ssl->ctx->RsaEncCb(ssl, in, inSz, out, outSz, keyBuf, keySz, ctx);
}
- #if !defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if !defined(WOLFSSL_RENESAS_SCEPROTECT) && \
+ !defined(WOLFSSL_RENESAS_TSIP_TLS)
else
#else
if (!ssl->ctx->RsaEncCb || ret == CRYPTOCB_UNAVAILABLE)
@@ -4727,7 +4726,8 @@ int EccVerify(WOLFSSL* ssl, const byte* in, word32 inSz, const byte* out,
ret = ssl->ctx->EccVerifyCb(ssl, in, inSz, out, outSz, keyBuf, keySz,
&ssl->eccVerifyRes, ctx);
}
- #if !defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if !defined(WOLFSSL_RENESAS_SCEPROTECT) && \
+ !defined(WOLFSSL_RENESAS_TSIP_TLS)
else
#else
if (!ssl->ctx->EccVerifyCb || ret == CRYPTOCB_UNAVAILABLE)
@@ -6407,7 +6407,8 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
#ifndef NO_OLD_TLS
ssl->hmac = SSL_hmac; /* default to SSLv3 */
#elif !defined(WOLFSSL_NO_TLS12)
- #if !defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if !defined(WOLFSSL_RENESAS_SCEPROTECT) && \
+ !defined(WOLFSSL_RENESAS_TSIP_TLS)
ssl->hmac = TLS_hmac;
#else
ssl->hmac = Renesas_cmn_TLS_hmac;
@@ -11080,7 +11081,7 @@ int InitSigPkCb(WOLFSSL* ssl, SignatureCtx* sigCtx)
/* only setup the verify callback if a PK is set */
#ifdef HAVE_ECC
- #if defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_TSIP_TLS)
sigCtx->pkCbEcc = Renesas_cmn_SigPkCbEccVerify;
sigCtx->pkCtxEcc = (void*)&sigCtx->CertAtt;
(void)SigPkCbEccVerify;
@@ -11094,7 +11095,7 @@ int InitSigPkCb(WOLFSSL* ssl, SignatureCtx* sigCtx)
#endif
#ifndef NO_RSA
/* only setup the verify callback if a PK is set */
- #if defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_TSIP_TLS)
sigCtx->pkCbRsa = Renesas_cmn_SigPkCbRsaVerify;
sigCtx->pkCtxRsa = (void*)&sigCtx->CertAtt;
(void)SigPkCbRsaVerify;
@@ -12901,7 +12902,8 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
{
int keyRet = 0;
word32 idx = 0;
- #if defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if defined(WOLFSSL_RENESAS_SCEPROTECT) || \
+ defined(WOLFSSL_RENESAS_TSIP_TLS)
/* copy encrypted tsip/sce key index into ssl object */
if (args->dCert->sce_tsip_encRsaKeyIdx) {
if (!ssl->peerSceTsipEncRsaKeyIndex) {
@@ -15502,12 +15504,6 @@ static WC_INLINE int EncryptDo(WOLFSSL* ssl, byte* out, const byte* input,
ret = wolfSSL_AsyncInit(ssl, asyncDev, event_flags);
if (ret != 0)
break;
- #endif
- #if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- if (tsip_useable(ssl)) {
- ret = wc_tsip_AesCbcEncrypt(ssl->encrypt.aes, out, input, sz);
- } else
#endif
ret = wc_AesCbcEncrypt(ssl->encrypt.aes, out, input, sz);
#ifdef WOLFSSL_ASYNC_CRYPT
@@ -15784,12 +15780,6 @@ static WC_INLINE int DecryptDo(WOLFSSL* ssl, byte* plain, const byte* input,
WC_ASYNC_FLAG_CALL_AGAIN);
if (ret != 0)
break;
- #endif
- #if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- if (tsip_useable(ssl)) {
- ret = wc_tsip_AesCbcDecrypt(ssl->decrypt.aes, plain, input, sz);
- } else
#endif
ret = wc_AesCbcDecrypt(ssl->decrypt.aes, plain, input, sz);
#ifdef WOLFSSL_ASYNC_CRYPT
@@ -25019,8 +25009,9 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
#endif
case rsa_sa_algo:
{
- #if defined(WOLFSSL_RENESAS_SCEPROTECT) && \
- defined(WOLFSSL_RENESAS_SCEPROTECT_ECC)
+ #if (defined(WOLFSSL_RENESAS_SCEPROTECT) && \
+ defined(WOLFSSL_RENESAS_SCEPROTECT_ECC)) || \
+ defined(WOLFSSL_RENESAS_TSIP_TLS)
/* already checked signature result by SCE */
/* skip the sign checks below */
if (Renesas_cmn_usable(ssl, 0)) {
@@ -25501,21 +25492,9 @@ int SendClientKeyExchange(WOLFSSL* ssl)
if (!ssl->ctx->GenPreMasterCb || ret == PROTOCOLCB_UNAVAILABLE) {
#endif
/* build PreMasterSecret with RNG data */
- #if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- if (tsip_useable(ssl)) {
- ret = tsip_generatePremasterSecret(
- &ssl->arrays->preMasterSecret[VERSION_SZ],
- ENCRYPT_LEN - VERSION_SZ);
- } else {
- #endif
ret = wc_RNG_GenerateBlock(ssl->rng,
&ssl->arrays->preMasterSecret[VERSION_SZ],
SECRET_LEN - VERSION_SZ);
- #if (defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION))
- }
- #endif
if (ret != 0) {
goto exit_scke;
}
@@ -25891,16 +25870,6 @@ int SendClientKeyExchange(WOLFSSL* ssl)
#ifndef NO_RSA
case rsa_kea:
{
- #if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- if (tsip_useable(ssl) &&
- wc_RsaEncryptSize(ssl->peerRsaKey) == 256) {
- ret = tsip_generateEncryptPreMasterSecret(ssl,
- args->encSecret,
- &args->encSz);
-
- } else
- #endif
ret = RsaEnc(ssl,
ssl->arrays->preMasterSecret, SECRET_LEN,
args->encSecret, &args->encSz,
diff --git a/src/keys.c b/src/keys.c
index 95d75a06b..b7218974c 100644
--- a/src/keys.c
+++ b/src/keys.c
@@ -38,12 +38,7 @@
#endif
#endif
-#if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- int tsip_useable(const WOLFSSL *ssl);
-#endif
-
-#if defined(WOLFSSL_RENESAS_SCEPROTECT)
+#if defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_TSIP_TLS)
#include
#endif
@@ -2107,7 +2102,8 @@ int SetCipherSpecs(WOLFSSL* ssl)
#ifndef NO_TLS
ssl->options.tls = 1;
#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_AEAD_ONLY)
- #if !defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if !defined(WOLFSSL_RENESAS_SCEPROTECT) && \
+ !defined(WOLFSSL_RENESAS_TSIP_TLS)
ssl->hmac = TLS_hmac;
#else
ssl->hmac = Renesas_cmn_TLS_hmac;
@@ -2128,7 +2124,8 @@ int SetCipherSpecs(WOLFSSL* ssl)
#if defined(WOLFSSL_DTLS) && !defined(WOLFSSL_AEAD_ONLY)
if (ssl->options.dtls)
- #if !defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if !defined(WOLFSSL_RENESAS_SCEPROTECT) && \
+ !defined(WOLFSSL_RENESAS_TSIP_TLS)
ssl->hmac = TLS_hmac;
#else
ssl->hmac = Renesas_cmn_TLS_hmac;
@@ -3110,14 +3107,6 @@ int SetKeysSide(WOLFSSL* ssl, enum encrypt_side side)
}
#endif
-#if (defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION))
- /* check if keys for TSIP has been created */
- if (tsip_useable(ssl) == 1)
- ret = 0;
- else
-#endif
-
#if !defined(NO_CERTS) && defined(HAVE_PK_CALLBACKS)
ret = PROTOCOLCB_UNAVAILABLE;
if (ssl->ctx->EncryptKeysCb) {
diff --git a/src/tls.c b/src/tls.c
index a955c3e9c..e27393b75 100644
--- a/src/tls.c
+++ b/src/tls.c
@@ -120,37 +120,6 @@ static int TLSX_PopulateSupportedGroups(WOLFSSL* ssl, TLSX** extensions);
#define HSHASH_SZ FINISHED_SZ
#endif
-#ifdef WOLFSSL_RENESAS_TSIP_TLS
-
- #if (WOLFSSL_RENESAS_TSIP_VER >=109)
-
- int tsip_generateMasterSecretEx(
- byte cipherSuiteFirst,
- byte cipherSuite,
- const byte* pr, /* pre-master */
- const byte* cr, /* client random */
- const byte* sr, /* server random */
- byte* ms);
-
- #elif (WOLFSSL_RENESAS_TSIP_VER >=106)
-
- int tsip_generateMasterSecret(
- const byte* pre,
- const byte* cr,
- const byte* sr,
- byte* ms);
-
- #endif
-
- int tsip_useable(const WOLFSSL *ssl);
- int tsip_generateSeesionKey(WOLFSSL *ssl);
- int tsip_generateVerifyData(
- const byte* ms,
- const byte* side,
- const byte* handshake_hash,
- byte* hashes);
-
-#endif /*WOLFSSL_RENESAS_TSIP_TLS*/
int BuildTlsHandshakeHash(WOLFSSL* ssl, byte* hash, word32* hashLen)
{
@@ -219,13 +188,6 @@ int BuildTlsFinished(WOLFSSL* ssl, Hashes* hashes, const byte* sender)
(byte*)hashes, ctx);
}
if (!ssl->ctx->TlsFinishedCb || ret == PROTOCOLCB_UNAVAILABLE)
-#endif
-#if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- if (tsip_useable(ssl)) {
- ret = tsip_generateVerifyData(ssl->arrays->tsip_masterSecret,
- side, handshake_hash, (byte*)hashes /* out */);
- } else
#endif
{
PRIVATE_KEY_UNLOCK();
@@ -397,12 +359,6 @@ int DeriveTlsKeys(WOLFSSL* ssl)
return MEMORY_E;
}
#endif
-#if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- if (tsip_useable(ssl))
- ret = tsip_generateSeesionKey(ssl);
- else {
-#endif
#if !defined(NO_CERTS) && defined(HAVE_PK_CALLBACKS)
ret = PROTOCOLCB_UNAVAILABLE;
if (ssl->ctx->GenSessionKeyCb) {
@@ -418,10 +374,6 @@ int DeriveTlsKeys(WOLFSSL* ssl)
ssl->heap, ssl->devId);
if (ret == 0)
ret = StoreKeys(ssl, key_dig, PROVISION_CLIENT_SERVER);
-#if (defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION))
- }
-#endif
#ifdef WOLFSSL_SMALL_STACK
XFREE(key_dig, ssl->heap, DYNAMIC_TYPE_DIGEST);
@@ -566,35 +518,7 @@ int MakeTlsMasterSecret(WOLFSSL* ssl)
else
#endif /* HAVE_EXTENDED_MASTER */
{
-#if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- if (tsip_useable(ssl)) {
- #if (WOLFSSL_RENESAS_TSIP_VER>=109)
-
- ret = tsip_generateMasterSecretEx(
- ssl->options.cipherSuite0,
- ssl->options.cipherSuite,
- &ssl->arrays->preMasterSecret[VERSION_SZ],
- ssl->arrays->clientRandom,
- ssl->arrays->serverRandom,
- ssl->arrays->tsip_masterSecret);
-
- #elif (WOLFSSL_RENESAS_TSIP_VER>=106)
-
- ret = tsip_generateMasterSecret(
- &ssl->arrays->preMasterSecret[VERSION_SZ],
- ssl->arrays->clientRandom,
- ssl->arrays->serverRandom,
- ssl->arrays->tsip_masterSecret);
-
- #else
-
- ret = NOT_COMPILED_IN;
-
- #endif
- } else
-#endif
#if !defined(NO_CERTS) && defined(HAVE_PK_CALLBACKS)
ret = PROTOCOLCB_UNAVAILABLE;
if (ssl->ctx->GenMasterCb) {
@@ -1207,21 +1131,6 @@ int TLS_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz, int padSz,
wolfSSL_SetTlsHmacInner(ssl, myInner, sz, content, verify);
else
wolfSSL_SetTlsHmacInner(ssl, myInner, sz, content, epochOrder);
-#if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
- if (tsip_useable(ssl)) {
- if (ssl->specs.hash_size == WC_SHA_DIGEST_SIZE)
- ret = tsip_Sha1Hmac(ssl, myInner, WOLFSSL_TLS_HMAC_INNER_SZ,
- in, sz, digest, verify);
- else if (ssl->specs.hash_size == WC_SHA256_DIGEST_SIZE)
- ret = tsip_Sha256Hmac(ssl, myInner, WOLFSSL_TLS_HMAC_INNER_SZ,
- in, sz, digest, verify);
- else
- ret = TSIP_MAC_DIGSZ_E;
-
- return ret;
- }
-#endif
ret = wc_HmacInit(&hmac, ssl->heap, ssl->devId);
if (ret != 0)
diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c
index 5eb7edfde..6e16e0eab 100644
--- a/wolfcrypt/src/asn.c
+++ b/wolfcrypt/src/asn.c
@@ -141,7 +141,7 @@ ASN Options:
#include
#endif
-#ifdef WOLFSSL_RENESAS_SCEPROTECT
+#if defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_TSIP_TLS)
#include
#endif
@@ -194,16 +194,6 @@ extern int wc_InitRsaHw(RsaKey* key);
#endif
#endif /* HAVE_SELFTEST */
#endif
-#ifdef WOLFSSL_RENESAS_TSIP_TLS
-void tsip_inform_key_position(const word32 key_n_start,
- const word32 key_n_len, const word32 key_e_start,
- const word32 key_e_len);
-int tsip_tls_CertVerify(const byte *cert, word32 certSz,
- const byte *signature, word32 sigSz,
- word32 key_n_start, word32 key_n_len,
- word32 key_e_start, word32 key_e_len,
- byte *tsip_encRsaKeyIdx);
-#endif
/* Calculates the minimum number of bytes required to encode the value.
@@ -7758,7 +7748,7 @@ int EncryptContent(byte* input, word32 inputSz, byte* out, word32* outSz,
#ifndef NO_RSA
#ifndef HAVE_USER_RSA
-#if defined(WOLFSSL_RENESAS_TSIP) || defined(WOLFSSL_RENESAS_SCEPROTECT)
+#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT)
/* This function is to retrieve key position information in a cert.*
* The information will be used to call TSIP TLS-linked API for *
* certificate verification. */
@@ -9916,7 +9906,7 @@ static int StoreRsaKey(DecodedCert* cert, const byte* source, word32* srcIdx,
if (GetSequence(source, srcIdx, &length, pubIdx + pubLen) < 0)
return ASN_PARSE_E;
-#if defined(WOLFSSL_RENESAS_TSIP) || defined(WOLFSSL_RENESAS_SCEPROTECT)
+#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT)
cert->sigCtx.CertAtt.pubkey_n_start =
cert->sigCtx.CertAtt.pubkey_e_start = pubIdx;
#endif
@@ -9944,7 +9934,7 @@ static int StoreRsaKey(DecodedCert* cert, const byte* source, word32* srcIdx,
GetASN_GetConstRef(&dataASN[RSACERTKEYASN_IDX_STR],
&cert->publicKey, &cert->pubKeySize);
- #if defined(WOLFSSL_RENESAS_TSIP) || defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT)
/* Start of SEQUENCE. */
cert->sigCtx.CertAtt.pubkey_n_start =
cert->sigCtx.CertAtt.pubkey_e_start = dataASN[RSACERTKEYASN_IDX_SEQ].offset;
@@ -10025,7 +10015,7 @@ static int StoreEccKey(DecodedCert* cert, const byte* source, word32* srcIdx,
if ((ret = CheckCurve(cert->pkCurveOID)) < 0)
return ECC_CURVE_OID_E;
- #if defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_TSIP_TLS)
cert->sigCtx.CertAtt.curve_id = ret;
#else
(void)ret;
@@ -10034,7 +10024,7 @@ static int StoreEccKey(DecodedCert* cert, const byte* source, word32* srcIdx,
ret = CheckBitString(source, srcIdx, &length, maxIdx, 1, NULL);
if (ret != 0)
return ret;
- #if defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_TSIP_TLS)
cert->sigCtx.CertAtt.pubkey_n_start =
cert->sigCtx.CertAtt.pubkey_e_start = (*srcIdx + 1);
cert->sigCtx.CertAtt.pubkey_n_len = ((length - 1) >> 1);
@@ -13736,41 +13726,21 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
#ifndef NO_RSA
case RSAk:
{
- #if defined(HAVE_PK_CALLBACKS) && \
- !defined(WOLFSSL_RENESAS_TSIP_TLS)
+ #if defined(HAVE_PK_CALLBACKS)
if (sigCtx->pkCbRsa) {
ret = sigCtx->pkCbRsa(
sigCtx->sigCpy, sigSz, &sigCtx->out,
key, keySz,
sigCtx->pkCtxRsa);
}
- #if !defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if !defined(WOLFSSL_RENESAS_SCEPROTECT) && \
+ !defined(WOLFSSL_RENESAS_TSIP_TLS)
else
#else
if (!sigCtx->pkCbRsa || ret == CRYPTOCB_UNAVAILABLE)
#endif /* WOLFSSL_RENESAS_SCEPROTECT */
#endif /* HAVE_PK_CALLBACKS */
{
- #ifdef WOLFSSL_RENESAS_TSIP_TLS
- if (rsaKeyIdx != NULL)
- {
- ret = tsip_tls_CertVerify(buf, bufSz, sigCtx->sigCpy,
- sigSz,
- sigCtx->.CertAtt.pubkey_n_start - sigCtx->certBegin,
- sigCtx->.CertAtt.pubkey_n_len - 1,
- sigCtx->.CertAtt.pubkey_e_start - sigCtx->certBegin,
- sigCtx->.CertAtt.pubkey_e_len - 1,
- rsaKeyIdx);
-
- if (ret == 0){
- sigCtx->verifyByTSIP_SCE = 1;
- ret = 0;
- } else {
- WOLFSSL_MSG("RSA Verify by tsip didn't match");
- ret = ASN_SIG_CONFIRM_E;
- }
- } else
- #endif
ret = wc_RsaSSL_VerifyInline(sigCtx->sigCpy, sigSz,
&sigCtx->out, sigCtx->key.rsa);
}
@@ -13796,7 +13766,8 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
key, keySz, &sigCtx->verify,
sigCtx->pkCtxEcc);
}
- #if !defined(WOLFSSL_RENESAS_SCEPROTECT)
+ #if !defined(WOLFSSL_RENESAS_SCEPROTECT) && \
+ !defined(WOLFSSL_RENESAS_TSIP_TLS)
else
#else
if (!sigCtx->pkCbEcc || ret == CRYPTOCB_UNAVAILABLE)
@@ -13864,7 +13835,7 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
case RSAk:
{
int encodedSigSz, verifySz;
- #if defined(WOLFSSL_RENESAS_TSIP) || \
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS) || \
defined(WOLFSSL_RENESAS_SCEPROTECT)
if (sigCtx->CertAtt.verifyByTSIP_SCE == 1) break;
#endif
@@ -18332,7 +18303,7 @@ int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
int len = 0;
#endif
#endif
-#if defined(WOLFSSL_RENESAS_TSIP) || defined(WOLFSSL_RENESAS_SCEPROTECT)
+#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT)
int idx = 0;
#endif
byte* sce_tsip_encRsaKeyIdx;
@@ -18690,7 +18661,7 @@ int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
}
#endif /* HAVE_OCSP */
}
-#if defined(WOLFSSL_RENESAS_TSIP) || defined(WOLFSSL_RENESAS_SCEPROTECT)
+#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT)
/* prepare for TSIP TLS cert verification API use */
if (cert->keyOID == RSAk) {
/* to call TSIP API, it needs keys position info in bytes */
diff --git a/wolfcrypt/src/port/Renesas/renesas_common.c b/wolfcrypt/src/port/Renesas/renesas_common.c
index ff3fbe199..9b8ecfe8f 100644
--- a/wolfcrypt/src/port/Renesas/renesas_common.c
+++ b/wolfcrypt/src/port/Renesas/renesas_common.c
@@ -55,22 +55,96 @@ static int devId = 7890; /* dev Id for Crypt Callback */
static int Renesas_cmn_CryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
{
int ret = NOT_COMPILED_IN; /* return this to bypass HW and use SW */
+
+ WOLFSSL_ENTER("Renesas_cmn_CryptoDevCb");
+
+#if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ TsipUserCtx* cbInfo = (TsipUserCtx*)ctx;
+#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
User_SCEPKCbInfo* cbInfo = (User_SCEPKCbInfo*) ctx;
-
+#endif
+
if (info == NULL || ctx == NULL)
return BAD_FUNC_ARG;
#ifdef DEBUG_WOLFSSL
- printf("CryptoDevCb: Algo Type %d\n", info->algo_type);
+ printf("CryptoDevCb: Algo Type %d session key set: %d\n",
+ info->algo_type, cbInfo->session_key_set);
#endif
- #if defined(WOLFSSL_RENESAS_TSIP)
- /* TODO call tsip aes api */
- #elif defined(WOLFSSL_RENESAS_SCEPROTECT)
-
+
+#if defined(WOLFSSL_RENESAS_TSIP)
+
if (info->algo_type == WC_ALGO_TYPE_CIPHER) {
-
+
#if !defined(NO_AES) || !defined(NO_DES3)
- #ifdef HAVE_AESGCM
+ #ifdef HAVE_AESGCM
+ if (info->cipher.type == WC_CIPHER_AES_GCM &&
+ cbInfo->session_key_set == 1) {
+
+ if (info->cipher.enc) {
+
+ ret = wc_tsip_AesGcmEncrypt(
+ info->cipher.aesgcm_enc.aes,
+ (byte*)info->cipher.aesgcm_enc.out,
+ (byte*)info->cipher.aesgcm_enc.in,
+ info->cipher.aesgcm_enc.sz,
+ (byte*)info->cipher.aesgcm_enc.iv,
+ info->cipher.aesgcm_enc.ivSz,
+ (byte*)info->cipher.aesgcm_enc.authTag,
+ info->cipher.aesgcm_enc.authTagSz,
+ (byte*)info->cipher.aesgcm_enc.authIn,
+ info->cipher.aesgcm_enc.authInSz,
+ (void*)ctx);
+
+ }
+ else {
+
+ ret = wc_tsip_AesGcmDecrypt(
+ info->cipher.aesgcm_dec.aes,
+ (byte*)info->cipher.aesgcm_dec.out,
+ (byte*)info->cipher.aesgcm_dec.in,
+ info->cipher.aesgcm_dec.sz,
+ (byte*)info->cipher.aesgcm_dec.iv,
+ info->cipher.aesgcm_dec.ivSz,
+ (byte*)info->cipher.aesgcm_dec.authTag,
+ info->cipher.aesgcm_dec.authTagSz,
+ (byte*)info->cipher.aesgcm_dec.authIn,
+ info->cipher.aesgcm_dec.authInSz,
+ (void*)ctx);
+ }
+ }
+ #endif /* HAVE_AESGCM */
+ #ifdef HAVE_AES_CBC
+ if (info->cipher.type == WC_CIPHER_AES_CBC &&
+ cbInfo->session_key_set == 1) {
+
+ if (info->cipher.enc) {
+
+ ret = wc_tsip_AesCbcEncrypt(
+ info->cipher.aescbc.aes,
+ (byte*)info->cipher.aescbc.out,
+ (byte*)info->cipher.aescbc.in,
+ info->cipher.aescbc.sz);
+
+ }
+ else {
+
+ ret = wc_tsip_AesCbcDecrypt(
+ info->cipher.aescbc.aes,
+ (byte*)info->cipher.aescbc.out,
+ (byte*)info->cipher.aescbc.in,
+ info->cipher.aescbc.sz);
+ }
+ }
+ #endif /* HAVE_AES_CBC */
+ #endif /* !NO_AES || !NO_DES3 */
+ }
+#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
+
+ if (info->algo_type == WC_ALGO_TYPE_CIPHER) {
+
+ #if !defined(NO_AES) || !defined(NO_DES3)
+ #ifdef HAVE_AESGCM
if (info->cipher.type == WC_CIPHER_AES_GCM) {
if (info->cipher.enc &&
@@ -88,7 +162,8 @@ static int Renesas_cmn_CryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
sizeof(sce_aes_wrapped_key_t));
info->cipher.aesgcm_enc.aes->ctx.keySize = 32;
- } else if (cbInfo->aes128_installedkey_set == 1 &&
+ }
+ else if (cbInfo->aes128_installedkey_set == 1 &&
info->cipher.aesgcm_enc.aes->keylen == 16) {
XMEMCPY(&info->cipher.aesgcm_enc.aes->ctx.sce_wrapped_key,
@@ -110,7 +185,8 @@ static int Renesas_cmn_CryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
info->cipher.aesgcm_enc.authInSz,
(void*)ctx);
- } else if (cbInfo->session_key_set == 1 ||
+ }
+ else if (cbInfo->session_key_set == 1 ||
(cbInfo->aes256_installedkey_set == 1 &&
info->cipher.aesgcm_dec.aes->keylen == 32) ||
(cbInfo->aes128_installedkey_set == 1 &&
@@ -124,7 +200,8 @@ static int Renesas_cmn_CryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
sizeof(sce_aes_wrapped_key_t));
info->cipher.aesgcm_dec.aes->ctx.keySize = 32;
- } else if (cbInfo->aes128_installedkey_set == 1 &&
+ }
+ else if (cbInfo->aes128_installedkey_set == 1 &&
info->cipher.aesgcm_dec.aes->keylen == 16) {
XMEMCPY(&info->cipher.aesgcm_dec.aes->ctx.sce_wrapped_key,
@@ -147,8 +224,8 @@ static int Renesas_cmn_CryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
(void*)ctx);
}
}
- #endif /* HAVE_AESGCM */
- #ifdef HAVE_AES_CBC
+ #endif /* HAVE_AESGCM */
+ #ifdef HAVE_AES_CBC
if ((info->cipher.type == WC_CIPHER_AES_CBC) &&
(cbInfo->session_key_set == 1 ||
(cbInfo->aes256_installedkey_set == 1 &&
@@ -164,7 +241,8 @@ static int Renesas_cmn_CryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
sizeof(sce_aes_wrapped_key_t));
info->cipher.aescbc.aes->ctx.keySize = 32;
- } else if (cbInfo->aes128_installedkey_set == 1 &&
+ }
+ else if (cbInfo->aes128_installedkey_set == 1 &&
info->cipher.aescbc.aes->keylen == 16) {
XMEMCPY(&info->cipher.aescbc.aes->ctx.sce_wrapped_key,
&cbInfo->sce_wrapped_key_aes128,
@@ -201,10 +279,10 @@ static int Renesas_cmn_CryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
info->cipher.aescbc.sz);
}
}
- #endif /* HAVE_AES_CBC */
+ #endif /* HAVE_AES_CBC */
#endif /* !NO_AES || !NO_DES3 */
- #endif /* TSIP or SCE */
}
+#endif /* TSIP or SCE */
(void)devIdArg;
(void)ctx;
@@ -223,8 +301,8 @@ int Renesas_cmn_usable(const WOLFSSL* ssl, byte session_key_generated)
{
int ret;
- #if defined(WOLFSSL_RENESAS_TSIP)
- /* TODO call tsip api */
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ ret = tsip_usable(ssl, session_key_generated);
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
ret = wc_sce_usable(ssl, session_key_generated);
#endif
@@ -244,8 +322,8 @@ int wc_CryptoCb_CryptInitRenesasCmn(WOLFSSL* ssl, void* ctx)
(void)ssl;
(void)ctx;
- #if defined(WOLFSSL_RENESAS_TSIP)
- void* cbInfo = NULL;/* TODO cast tsip cb context */
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ TsipUserCtx* cbInfo = (TsipUserCtx*)ctx;
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
User_SCEPKCbInfo* cbInfo = (User_SCEPKCbInfo*)ctx;
#endif
@@ -283,6 +361,7 @@ void wc_CryptoCb_CleanupRenesasCmn(int* id)
*/
WOLFSSL_LOCAL byte Renesas_cmn_checkCA(word32 cmIdx)
{
+ WOLFSSL_ENTER("Renesas_cmn_checkCA");
return (cmIdx == g_CAscm_Idx? 1:0);
}
@@ -291,6 +370,7 @@ WOLFSSL_LOCAL byte Renesas_cmn_checkCA(word32 cmIdx)
*/
static byte sce_tsip_rootCAverified( )
{
+ WOLFSSL_ENTER("sce_tsip_rootCAverified");
return (g_CAscm_Idx != (uint32_t)-1 ? 1:0);
}
/* Renesas Security Library Common Callback
@@ -307,10 +387,24 @@ static byte sce_tsip_rootCAverified( )
WOLFSSL_LOCAL int Renesas_cmn_RsaVerify(WOLFSSL* ssl, byte* sig, word32 sigSz,
byte** out, const byte* key, word32 keySz, void* ctx)
{
- int ret;
+ int ret = 0;
- #if defined(WOLFSSL_RENESAS_TSIP)
- /* TODO TSIP */
+ WOLFSSL_ENTER("Renesas_cmn_RsaVerify");
+
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ ret = wc_tsip_RsaVerify(ssl, sig, sigSz, out, key, keySz, ctx);
+
+ if (ret == 0) {
+ /* Set Call back for SharedScret when being successful */
+ wolfSSL_CTX_SetEccSharedSecretCb(ssl->ctx, wc_tsip_EccSharedSecret);
+ wolfSSL_SetEccSharedSecretCtx(ssl, ctx);
+ }
+ else {
+ WOLFSSL_MSG("failed wc_tsip_RsaVerify");
+ wolfSSL_CTX_SetEccSharedSecretCb(ctx, NULL);
+ wolfSSL_SetEccSharedSecretCtx(ssl, NULL);
+ }
+
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
ret = wc_SCE_RsaVerify(ssl, sig, sigSz, out,key, keySz, ctx);
@@ -318,7 +412,8 @@ WOLFSSL_LOCAL int Renesas_cmn_RsaVerify(WOLFSSL* ssl, byte* sig, word32 sigSz,
/* Set Call back for SharedScret when being successful */
wolfSSL_CTX_SetEccSharedSecretCb(ssl->ctx, SCE_EccSharedSecret);
wolfSSL_SetEccSharedSecretCtx(ssl, ctx);
- } else {
+ }
+ else {
WOLFSSL_MSG("failed R_SCE_TLS_ServerKeyExchangeVerify");
wolfSSL_CTX_SetEccSharedSecretCb(ctx, NULL);
wolfSSL_SetEccSharedSecretCtx(ssl, NULL);
@@ -344,18 +439,32 @@ WOLFSSL_LOCAL int Renesas_cmn_EccVerify(WOLFSSL* ssl, const uint8_t* sig,
uint32_t sigSz, const uint8_t* hash, uint32_t hashSz,
const uint8_t* key, uint32_t keySz, int* result, void* ctx)
{
- int ret;
+ int ret = 0;
+ WOLFSSL_ENTER("Renesas_cmn_EccVerify");
+
#if defined(WOLFSSL_RENESAS_TSIP)
- /* TODO TSIP */
+ ret = wc_tsip_EccVerify(ssl, sig, sigSz, hash, hashSz, key, keySz,
+ result, ctx);
+ if (ret == 0 && *result == 1) {
+ /* Set callback for SharedScret when being successful */
+ wolfSSL_CTX_SetEccSharedSecretCb(ssl->ctx, wc_tsip_EccSharedSecret);
+ wolfSSL_SetEccSharedSecretCtx(ssl, ctx);
+ }
+ else {
+ WOLFSSL_MSG("failed wc_tsip_EccVerify");
+ wolfSSL_CTX_SetEccSharedSecretCb(ctx, NULL);
+ wolfSSL_SetEccSharedSecretCtx(ssl, NULL);
+ }
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
ret = wc_SCE_EccVerify(ssl, sig, sigSz, hash, hashSz, key, keySz,
result, ctx);
if (ret == 0 && *result == 1 && ret != CRYPTOCB_UNAVAILABLE) {
- /* Set Call back for SharedScret when being successful */
+ /* Set callback for SharedScret when being successful */
wolfSSL_CTX_SetEccSharedSecretCb(ssl->ctx, SCE_EccSharedSecret);
wolfSSL_SetEccSharedSecretCtx(ssl, ctx);
- } else {
+ }
+ else {
WOLFSSL_MSG("failed R_SCE_TLS_ServerKeyExchangeVerify");
wolfSSL_CTX_SetEccSharedSecretCb(ctx, NULL);
wolfSSL_SetEccSharedSecretCtx(ssl, NULL);
@@ -381,10 +490,12 @@ int wc_Renesas_cmn_RootCertVerify(const byte* cert, word32 cert_len, word32 key_
{
int ret;
+ WOLFSSL_ENTER("wc_Renesas_cmn_RootCertVerify");
+
if (sce_tsip_rootCAverified() == 0) {
- #if defined(WOLFSSL_RENESAS_TSIP)
- ret = tsip_tls_RootCertVerify(cert, cert_len, key_n_start,
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ ret = wc_tsip_tls_RootCertVerify(cert, cert_len, key_n_start,
key_n_len, key_e_start, key_e_len, cm_row);
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
@@ -392,7 +503,8 @@ int wc_Renesas_cmn_RootCertVerify(const byte* cert, word32 cert_len, word32 key_
ret = wc_sce_tls_RootCertVerify(cert, cert_len, key_n_start,
key_n_len, key_e_start, key_e_len, cm_row);
#endif
- } else {
+ }
+ else {
/* already verified. skipped */
ret = 0;
}
@@ -416,12 +528,15 @@ WOLFSSL_LOCAL int Renesas_cmn_TlsFinished(WOLFSSL* ssl, const byte *side,
(void)ctx;
+ WOLFSSL_ENTER("Renesas_cmn_TlsFinished");
+
/* sanity check */
if (ssl == NULL || ctx == NULL || side == NULL || handshake_hash == NULL ||
hashes == NULL )
return BAD_FUNC_ARG;
- #if defined(WOLFSSL_RENESAS_TSIP)
- /* TODO call tsip api */
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ ret = wc_tsip_generateVerifyData(ssl->arrays->tsip_masterSecret,
+ side, handshake_hash, hashes);
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
ret = wc_sce_generateVerifyData(ssl->arrays->sce_masterSecret, /* master secret */
side, handshake_hash, hashes);
@@ -442,25 +557,30 @@ static int Renesas_cmn_EncryptKeys(WOLFSSL* ssl, void* ctx)
{
int ret;
+ WOLFSSL_ENTER("Renesas_cmn_EncryptKeys");
+
/* sanity check */
if (ssl == NULL || ctx == NULL)
return BAD_FUNC_ARG;
- #if defined(WOLFSSL_RENESAS_TSIP)
- /* TODO call tsip api */
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ TsipUserCtx* cbInfo = (TsipUserCtx*)ctx;
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
User_SCEPKCbInfo* cbInfo = (User_SCEPKCbInfo*)ctx;
+ #endif
+
if (cbInfo->session_key_set == 1) {
ret = 0;
wolfSSL_CTX_SetTlsFinishedCb(ssl->ctx, Renesas_cmn_TlsFinished);
wolfSSL_SetTlsFinishedCtx(ssl, cbInfo);
- } else {
+ }
+ else {
wolfSSL_CTX_SetTlsFinishedCb(ssl->ctx, NULL);
wolfSSL_SetTlsFinishedCtx(ssl, NULL);
ret = -1;
}
- #endif
+
return ret;
}
@@ -473,27 +593,31 @@ static int Renesas_cmn_EncryptKeys(WOLFSSL* ssl, void* ctx)
* ctx Callback context
* return FSP_SUCCESS(0) on sucess, otherwise SCE/TSIP error code
*/
-WOLFSSL_LOCAL int Renesas_cmn_generateSeesionKey(WOLFSSL* ssl, void* ctx)
+WOLFSSL_LOCAL int Renesas_cmn_generateSessionKey(WOLFSSL* ssl, void* ctx)
{
int ret = -1;
(void)ctx;
+ WOLFSSL_ENTER("Renesas_cmn_generateSessionKey");
+
/* sanity check */
if (ssl == NULL || ctx == NULL)
return BAD_FUNC_ARG;
- #if defined(WOLFSSL_RENESAS_TSIP)
- /* TODO call tsip api */
- #elif defined(WOLFSSL_RENESAS_SCEPROTECT)
- ret = wc_sce_generateSeesionKey(ssl, ctx, devId);
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ ret = wc_tsip_generateSessionKey(ssl, (TsipUserCtx*)ctx, devId);
+#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
+ ret = wc_sce_generateSessionKey(ssl, ctx, devId);
+#endif
if (ret == 0) {
wolfSSL_CTX_SetEncryptKeysCb(ssl->ctx, Renesas_cmn_EncryptKeys);
wolfSSL_SetEncryptKeysCtx(ssl, ctx);
- } else {
+ }
+ else {
wolfSSL_CTX_SetEncryptKeysCb(ssl->ctx, NULL);
wolfSSL_SetEncryptKeysCtx(ssl, NULL);
}
- #endif
+
return ret;
}
@@ -518,13 +642,22 @@ WOLFSSL_LOCAL int Renesas_cmn_generatePremasterSecret(WOLFSSL* ssl,
(void) ctx;
(void) ssl;
- #if defined(WOLFSSL_RENESAS_TSIP)
- /* TODO call tsip api */
+ WOLFSSL_ENTER("Renesas_cmn_generatePremasterSecret");
+
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ if (Renesas_cmn_usable(ssl, 0)) {
+ ret = wc_tsip_generatePremasterSecret(premaster, preSz);
+ ssl->arrays->preMasterSz = preSz;
+ }
+ else
+ ret = PROTOCOLCB_UNAVAILABLE;
+
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
if (Renesas_cmn_usable(ssl, 0)) {
ret = wc_sce_generatePremasterSecret(premaster, preSz);
ssl->arrays->preMasterSz = preSz;
- } else
+ }
+ else
ret = PROTOCOLCB_UNAVAILABLE;
#endif
@@ -549,8 +682,42 @@ WOLFSSL_LOCAL int Renesas_cmn_genMasterSecret(struct WOLFSSL* ssl, void* ctx)
(void) ret;
(void) ctx;
- #if defined(WOLFSSL_RENESAS_TSIP)
- /* TODO call tsip api */
+ WOLFSSL_ENTER("Renesas_cmn_genMasterSecret");
+
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+
+ if (Renesas_cmn_usable(ssl, 0)) {
+ #if (WOLFSSL_RENESAS_TSIP_VER >= 109 )
+ ret = wc_tsip_generateMasterSecretEx(
+ ssl->options.cipherSuite0,
+ ssl->options.cipherSuite,
+ ssl->arrays->preMasterSecret,
+ ssl->arrays->clientRandom,
+ ssl->arrays->serverRandom,
+ ssl->arrays->tsip_masterSecret);
+ #else
+ ret = wc_tsip_generateMasterSecret(
+ ssl->arrays->preMasterSecret,
+ ssl->arrays->clientRandom,
+ ssl->arrays->serverRandom,
+ ssl->arrays->tsip_masterSecret);
+ #endif
+
+ if (ret == 0) {
+ wc_tsip_storeKeyCtx(ssl, (TsipUserCtx*)ctx);
+ /* set Session Key generation Callback for use */
+ wolfSSL_CTX_SetGenSessionKeyCb(ssl->ctx,
+ Renesas_cmn_generateSessionKey);
+ wolfSSL_SetGenSessionKeyCtx(ssl, ctx);
+ }
+ else {
+ wolfSSL_CTX_SetGenSessionKeyCb(ssl->ctx, NULL);
+ wolfSSL_SetGenSessionKeyCtx(ssl, NULL);
+ }
+ }
+ else
+ ret = PROTOCOLCB_UNAVAILABLE;
+
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
if (Renesas_cmn_usable(ssl, 0)) {
ret = wc_sce_generateMasterSecret(
@@ -564,13 +731,15 @@ WOLFSSL_LOCAL int Renesas_cmn_genMasterSecret(struct WOLFSSL* ssl, void* ctx)
wc_sce_storeKeyCtx(ssl, ctx);
/* set Session Key generation Callback for use */
wolfSSL_CTX_SetGenSessionKeyCb(ssl->ctx,
- Renesas_cmn_generateSeesionKey);
+ Renesas_cmn_generateSessionKey);
wolfSSL_SetGenSessionKeyCtx(ssl, ctx);
- } else {
+ }
+ else {
wolfSSL_CTX_SetGenSessionKeyCb(ssl->ctx, NULL);
wolfSSL_SetGenSessionKeyCtx(ssl, NULL);
}
- } else
+ }
+ else
ret = PROTOCOLCB_UNAVAILABLE;
#endif
@@ -606,6 +775,8 @@ WOLFSSL_LOCAL int Renesas_cmn_RsaEnc(WOLFSSL* ssl, const unsigned char* in,
(void)keySz;
(void)EncSz;
+ WOLFSSL_ENTER("Renesas_cmn_RsaEnc");
+
/* sanity check */
if (ssl == NULL || in == NULL || out == NULL || keyDer == NULL ||
ctx == NULL) {
@@ -614,12 +785,26 @@ WOLFSSL_LOCAL int Renesas_cmn_RsaEnc(WOLFSSL* ssl, const unsigned char* in,
EncSz = wc_RsaEncryptSize(ssl->peerRsaKey);
- #if defined(WOLFSSL_RENESAS_TSIP)
- /* TODO call tsip api */
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+
+ if (tsip_usable(ssl, 0)) {
+ if (EncSz == 256) {
+ ret = wc_tsip_generateEncryptPreMasterSecret(ssl, out, outSz);
+ }
+ else {
+ WOLFSSL_MSG("TSIP can only handle 256 bytes for RSA encrypt size.");
+ ret = CRYPTOCB_UNAVAILABLE;
+ }
+ }
+ else {
+ ret = CRYPTOCB_UNAVAILABLE;
+ }
+
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
if (wc_sce_usable(ssl, 0) && EncSz == 256) {
ret = wc_sce_generateEncryptPreMasterSecret(ssl, out, outSz);
- } else {
+ }
+ else {
if (EncSz != 256)
WOLFSSL_MSG("SCE cannot use"
"because Rsa Encrypt Size isn't 256 bytes(2048 bits).");
@@ -649,12 +834,19 @@ WOLFSSL_LOCAL int Renesas_cmn_VerifyHmac(WOLFSSL *ssl, const byte* message,
int ret;
(void)ctx;
- #if defined(WOLFSSL_RENESAS_TSIP)
- /* TODO call tsip api */
+ WOLFSSL_ENTER("Renesas_cmn_VerifyHmac");
+
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ if (tsip_usable(ssl, 1)) {
+ ret = wc_tsip_ShaXHmacVerify(ssl, message, messageSz, macSz, content);
+ }
+ else
+ ret = PROTOCOLCB_UNAVAILABLE;
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
if (wc_sce_usable(ssl, 1)) {
ret = wc_sce_Sha256VerifyHmac(ssl, message, messageSz, macSz, content);
- } else
+ }
+ else
ret = PROTOCOLCB_UNAVAILABLE;
#endif
@@ -679,8 +871,32 @@ WOLFSSL_LOCAL int Renesas_cmn_TLS_hmac(WOLFSSL* ssl, byte* digest,
int ret;
byte myInner[WOLFSSL_TLS_HMAC_INNER_SZ];
- #if defined(WOLFSSL_RENESAS_TSIP)
- /* TODO call tsip api */
+ WOLFSSL_ENTER("Renesas_cmn_TLS_hmac");
+
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ if (Renesas_cmn_usable(ssl, 1)) {
+
+ wolfSSL_SetTlsHmacInner(ssl, myInner, sz, content, verify);
+
+ if (ssl->specs.hash_size == WC_SHA_DIGEST_SIZE) {
+ ret = wc_tsip_Sha1HmacGenerate(ssl, myInner,
+ WOLFSSL_TLS_HMAC_INNER_SZ, in, sz, digest);
+ }
+ else if (ssl->specs.hash_size == WC_SHA256_DIGEST_SIZE) {
+ ret = wc_tsip_Sha256HmacGenerate(ssl, myInner,
+ WOLFSSL_TLS_HMAC_INNER_SZ, in, sz, digest);
+ }
+ else {
+ ret = TSIP_MAC_DIGSZ_E;
+ }
+ }
+ else {
+ WOLFSSL_MSG("TLS_hmac is used instead of TSIP");
+ /* fall through to original TLS hmac method when TSIP cannot be used */
+ ret = TLS_hmac(ssl, digest, in, sz, padSz, content, verify, epochOrder);
+
+ }
+
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
if (Renesas_cmn_usable(ssl, 1)) {
if (ssl->specs.hash_size == WC_SHA256_DIGEST_SIZE) {
@@ -690,7 +906,8 @@ WOLFSSL_LOCAL int Renesas_cmn_TLS_hmac(WOLFSSL* ssl, byte* digest,
}
else
ret = TSIP_MAC_DIGSZ_E;
- } else {
+ }
+ else {
/* fall through to original TLS hmac method when SCE cannot be used */
ret = TLS_hmac(ssl, digest, in, sz, padSz, content, verify, epochOrder);
}
@@ -724,6 +941,8 @@ WOLFSSL_LOCAL int Renesas_cmn_SigPkCbRsaVerify(unsigned char* sig,
(void)keyDer;
(void)keySz;
+ WOLFSSL_ENTER("Renesas_cmn_SigPkCbRsaVerify");
+
/* sanity check */
if (sig == NULL || out == NULL || keyDer == NULL || ctx == NULL)
return BAD_FUNC_ARG;
@@ -733,8 +952,26 @@ WOLFSSL_LOCAL int Renesas_cmn_SigPkCbRsaVerify(unsigned char* sig,
return CRYPTOCB_UNAVAILABLE;
}
- #if defined(WOLFSSL_RENESAS_TSIP)
- /* TODO call tsip api */
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ if (CertAtt->keyIndex != NULL)
+ {
+ ret = wc_tsip_tls_CertVerify(CertAtt->cert, CertAtt->certSz, sig, sigSz,
+ CertAtt->pubkey_n_start - CertAtt->certBegin,
+ CertAtt->pubkey_n_len - 1,
+ CertAtt->pubkey_e_start - CertAtt->certBegin,
+ CertAtt->pubkey_e_len -1,
+ (uint8_t*)CertAtt->keyIndex);
+ if (ret == 0){
+ CertAtt->verifyByTSIP_SCE = 1;
+ }
+ else {
+ WOLFSSL_MSG("RSA Verify by TSIP didn't match");
+ ret = ASN_SIG_CONFIRM_E;
+ }
+ }
+ else
+ ret = CRYPTOCB_UNAVAILABLE;
+
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
if (CertAtt->keyIndex != NULL)
{
@@ -746,11 +983,13 @@ WOLFSSL_LOCAL int Renesas_cmn_SigPkCbRsaVerify(unsigned char* sig,
(uint8_t*)CertAtt->keyIndex);
if (ret == 0){
CertAtt->verifyByTSIP_SCE = 1;
- } else {
+ }
+ else {
WOLFSSL_MSG("RSA Verify by SCE didn't match");
ret = ASN_SIG_CONFIRM_E;
}
- } else
+ }
+ else
ret = CRYPTOCB_UNAVAILABLE;
#endif
@@ -785,6 +1024,9 @@ WOLFSSL_LOCAL int Renesas_cmn_SigPkCbEccVerify(const unsigned char* sig,
(void)keySz;
(void)hash;
(void)hashSz;
+
+ WOLFSSL_ENTER("Renesas_cmn_SigPkCbEccVerify");
+
/* sanity check */
if (sig == NULL || keyDer == NULL || hash == NULL || ctx == NULL ||
result == NULL)
@@ -796,8 +1038,26 @@ WOLFSSL_LOCAL int Renesas_cmn_SigPkCbEccVerify(const unsigned char* sig,
return CRYPTOCB_UNAVAILABLE;
}
- #if defined(WOLFSSL_RENESAS_TSIP)
- /* TODO call tsip api */
+ #if defined(WOLFSSL_RENESAS_TSIP_TLS)
+ if (CertAtt->keyIndex != NULL)
+ {
+ ret = wc_tsip_tls_CertVerify(CertAtt->cert, CertAtt->certSz, sig, sigSz,
+ CertAtt->pubkey_n_start - CertAtt->certBegin,
+ CertAtt->pubkey_n_len - 1,
+ CertAtt->pubkey_e_start - CertAtt->certBegin,
+ CertAtt->pubkey_e_len -1,
+ (uint8_t*)CertAtt->keyIndex);
+ if (ret == 0) {
+ CertAtt->verifyByTSIP_SCE = 1;
+ *result = 1;
+ }
+ else {
+ WOLFSSL_MSG("RSA Verify by TSIP didn't match");
+ ret = ASN_SIG_CONFIRM_E;
+ }
+ }
+ else
+ ret = CRYPTOCB_UNAVAILABLE;
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
if (CertAtt->keyIndex != NULL)
{
@@ -810,11 +1070,13 @@ WOLFSSL_LOCAL int Renesas_cmn_SigPkCbEccVerify(const unsigned char* sig,
if (ret == 0) {
CertAtt->verifyByTSIP_SCE = 1;
*result = 1;
- } else {
+ }
+ else {
WOLFSSL_MSG("RSA Verify by SCE didn't match");
ret = ASN_SIG_CONFIRM_E;
}
- } else
+ }
+ else
ret = CRYPTOCB_UNAVAILABLE;
#endif
diff --git a/wolfcrypt/src/port/Renesas/renesas_sce_aes.c b/wolfcrypt/src/port/Renesas/renesas_sce_aes.c
index 1ae2641ec..d45383cc4 100644
--- a/wolfcrypt/src/port/Renesas/renesas_sce_aes.c
+++ b/wolfcrypt/src/port/Renesas/renesas_sce_aes.c
@@ -172,7 +172,8 @@ WOLFSSL_LOCAL int wc_sce_AesGcmEncrypt(struct Aes* aes, byte* out,
ret = -1;
}
- } else if (info->aes256_installedkey_set == 1) {
+ }
+ else if (info->aes256_installedkey_set == 1) {
XMEMCPY(&key_client_aes, &info->sce_wrapped_key_aes256,
sizeof(sce_aes_wrapped_key_t));
iv_l = iv;
@@ -344,7 +345,8 @@ WOLFSSL_LOCAL int wc_sce_AesGcmDecrypt(struct Aes* aes, byte* out,
WOLFSSL_MSG("R_SCE_TLS_SessionKeyGenerate failed");
ret = -1;
}
- } else if (info->aes256_installedkey_set == 1) {
+ }
+ else if (info->aes256_installedkey_set == 1) {
XMEMCPY(&key_server_aes, &info->sce_wrapped_key_aes256,
sizeof(sce_aes_wrapped_key_t));
iv_l = iv;
@@ -430,9 +432,11 @@ WOLFSSL_LOCAL int wc_sce_AesCbcEncrypt(struct Aes* aes, byte* out,
if (aes->ctx.keySize == 16) {
ret = R_SCE_AES128CBC_EncryptInit(&_handle, &aes->ctx.sce_wrapped_key, iv);
- } else if (aes->ctx.keySize == 32) {
+ }
+ else if (aes->ctx.keySize == 32) {
ret = R_SCE_AES256CBC_EncryptInit(&_handle, &aes->ctx.sce_wrapped_key, iv);
- } else {
+ }
+ else {
WOLFSSL_MSG("invalid key Size for SCE. Key size is neither 16 or 32.");
wc_sce_hw_unlock();
return -1;
@@ -454,10 +458,12 @@ WOLFSSL_LOCAL int wc_sce_AesCbcEncrypt(struct Aes* aes, byte* out,
if (ret == FSP_SUCCESS) {
if (aes->ctx.keySize == 16) {
ret = R_SCE_AES128CBC_EncryptFinal(&_handle, out, &dataLength);
- } else {
+ }
+ else {
ret = R_SCE_AES256CBC_EncryptFinal(&_handle, out, &dataLength);
}
- } else {
+ }
+ else {
WOLFSSL_MSG("SCE AES CBC encryption failed");
ret = -1;
}
@@ -493,9 +499,11 @@ WOLFSSL_LOCAL int wc_sce_AesCbcDecrypt(struct Aes* aes, byte* out, const byte* i
if (aes->ctx.keySize == 16) {
ret = R_SCE_AES128CBC_DecryptInit(&_handle, &aes->ctx.sce_wrapped_key, iv);
- } else if (aes->ctx.keySize == 32) {
+ }
+ else if (aes->ctx.keySize == 32) {
ret = R_SCE_AES256CBC_DecryptInit(&_handle, &aes->ctx.sce_wrapped_key, iv);
- } else {
+ }
+ else {
wc_sce_hw_unlock();
return -1;
}
@@ -518,7 +526,8 @@ WOLFSSL_LOCAL int wc_sce_AesCbcDecrypt(struct Aes* aes, byte* out, const byte* i
ret = R_SCE_AES128CBC_DecryptFinal(&_handle, out, &dataLength);
else
ret = R_SCE_AES256CBC_DecryptFinal(&_handle, out, &dataLength);
- } else {
+ }
+ else {
WOLFSSL_MSG("SCE AES CBC decryption failed");
ret = -1;
}
diff --git a/wolfcrypt/src/port/Renesas/renesas_sce_sha.c b/wolfcrypt/src/port/Renesas/renesas_sce_sha.c
index a705e81eb..d695d6ff7 100644
--- a/wolfcrypt/src/port/Renesas/renesas_sce_sha.c
+++ b/wolfcrypt/src/port/Renesas/renesas_sce_sha.c
@@ -93,7 +93,8 @@ static int SCEHashUpdate(wolfssl_SCE_Hash* hash, const byte* data, word32 sz)
if (hash->msg == NULL) {
hash->msg = (byte*)XMALLOC(hash->used + sz, hash->heap,
DYNAMIC_TYPE_TMP_BUFFER);
- } else {
+ }
+ else {
#ifdef FREERTOS
byte* pt = (byte*)XMALLOC(hash->used + sz, hash->heap,
DYNAMIC_TYPE_TMP_BUFFER);
@@ -151,7 +152,8 @@ static int SCEHashFinal(wolfssl_SCE_Hash* hash, byte* out, word32 outSz)
Init = R_SCE_SHA256_Init;
Update = R_SCE_SHA256_Update;
Final = R_SCE_SHA256_Final;
- } else
+ }
+ else
return BAD_FUNC_ARG;
heap = hash->heap;
@@ -191,7 +193,8 @@ static int SCEHashGet(wolfssl_SCE_Hash* hash, byte* out, word32 outSz)
Init = R_SCE_SHA256_Init;
Update = R_SCE_SHA256_Update;
Final = R_SCE_SHA256_Final;
- } else
+ }
+ else
return BAD_FUNC_ARG;
wc_sce_hw_lock();
diff --git a/wolfcrypt/src/port/Renesas/renesas_sce_util.c b/wolfcrypt/src/port/Renesas/renesas_sce_util.c
index 13d03a41f..00a70fa23 100644
--- a/wolfcrypt/src/port/Renesas/renesas_sce_util.c
+++ b/wolfcrypt/src/port/Renesas/renesas_sce_util.c
@@ -88,7 +88,8 @@ WOLFSSL_LOCAL int wc_sce_hw_lock()
if(ret == 0) {
sce_CryptHwMutexInit_ = 1;
- } else {
+ }
+ else {
WOLFSSL_MSG(" mutex initialization failed.");
return -1;
}
@@ -118,10 +119,10 @@ WOLFSSL_LOCAL int wc_sce_Open()
ret = R_SCE_Open(&sce_ctrl, &sce_cfg);
- if( ret != FSP_SUCCESS ) {
+ if ( ret != FSP_SUCCESS ) {
WOLFSSL_MSG("RENESAS SCE Open failed");
}
- if( ret == FSP_SUCCESS && g_user_key_info.encrypted_user_tls_key ){
+ if ( ret == FSP_SUCCESS && g_user_key_info.encrypted_user_tls_key ) {
ret = R_SCE_TLS_RootCertificateRSA2048PublicKeyInstall(
g_user_key_info.encrypted_provisioning_key,
@@ -132,7 +133,8 @@ WOLFSSL_LOCAL int wc_sce_Open()
/* init vars */
g_CAscm_Idx = (uint32_t)-1;
- } else {
+ }
+ else {
WOLFSSL_MSG("Failed to lock sce hw ");
}
@@ -160,7 +162,8 @@ WOLFSSL_LOCAL void wc_sce_Close()
if( ret != FSP_SUCCESS ) {
WOLFSSL_MSG("RENESAS SCE Close failed");
}
- } else {
+ }
+ else {
WOLFSSL_MSG("Failed to unlock sce hw ");
}
}
@@ -217,7 +220,8 @@ static int SCE_ServerKeyExVerify(uint32_t type, WOLFSSL* ssl, const uint8_t* sig
if (ret != FSP_SUCCESS) {
WOLFSSL_MSG("failed R_SCE_TLS_ServerKeyExchangeVerify");
cbInfo->pk_key_set = 0;
- } else {
+ }
+ else {
ret = WOLFSSL_SUCCESS;
cbInfo->pk_key_set = 1;
}
@@ -291,17 +295,20 @@ WOLFSSL_LOCAL int wc_SCE_EccVerify(WOLFSSL* ssl, const uint8_t* sig,
/* s */
if (sig[offset] == 0x20) {
XMEMCPY(&sigforSCE[rs_size], &sig[offset+1], rs_size);
- } else {
+ }
+ else {
XMEMCPY(&sigforSCE[rs_size], &sig[offset+2], rs_size);
}
- } else {
+ }
+ else {
XMEMCPY(sigforSCE, &sig[offset+2], rs_size);
offset = 0x26;
/* s */
if (sig[offset] == rs_size) {
XMEMCPY(&sigforSCE[rs_size], &sig[offset+1], rs_size);
- } else {
+ }
+ else {
XMEMCPY(&sigforSCE[rs_size], &sig[offset+2], rs_size);
}
}
@@ -313,7 +320,8 @@ WOLFSSL_LOCAL int wc_SCE_EccVerify(WOLFSSL* ssl, const uint8_t* sig,
if (ret == WOLFSSL_SUCCESS) {
*result = 1;
ret = 0; /* for success */
- } else
+ }
+ else
*result = 0;
WOLFSSL_PKMSG("SCE ECC Verify: ret %d, result %d\n", ret, *result);
@@ -366,7 +374,8 @@ WOLFSSL_LOCAL int SCE_EccSharedSecret(WOLFSSL* ssl, ecc_key* otherKey,
if (ret != FSP_SUCCESS) {
WOLFSSL_PKMSG("Failed PreMasterSecretGenerateForECC_secp256r1 %d\n", ret);
return ret;
- } else {
+ }
+ else {
/* set master secret generation callback for use */
wolfSSL_CTX_SetGenMasterSecretCb(ssl->ctx, Renesas_cmn_genMasterSecret);
wolfSSL_SetGenMasterSecretCtx(ssl, cbInfo);
@@ -636,10 +645,10 @@ WOLFSSL_LOCAL int wc_sce_generateVerifyData(const uint8_t *ms, /* master secret
}
/* generate keys for TLS communication */
-WOLFSSL_LOCAL int wc_sce_generateSeesionKey(struct WOLFSSL *ssl,
+WOLFSSL_LOCAL int wc_sce_generateSessionKey(struct WOLFSSL *ssl,
User_SCEPKCbInfo* cbInfo, int devId)
{
- WOLFSSL_MSG("sce_generateSeesionKey()");
+ WOLFSSL_MSG("sce_generateSessionKey()");
int ret;
Ciphers *enc;
Ciphers *dec;
@@ -663,7 +672,8 @@ WOLFSSL_LOCAL int wc_sce_generateSeesionKey(struct WOLFSSL *ssl,
wolfSSL_KeepArrays(ssl);
ret = FSP_SUCCESS;
- } else {
+ }
+ else {
ret = R_SCE_TLS_SessionKeyGenerate(
GetSceCipherSuite(
ssl->options.cipherSuite0,
@@ -681,7 +691,8 @@ WOLFSSL_LOCAL int wc_sce_generateSeesionKey(struct WOLFSSL *ssl,
if (ret != FSP_SUCCESS) {
WOLFSSL_MSG("R_SCE_TLS_SessionKeyGenerate failed");
- } else {
+ }
+ else {
/* succeeded creating session keys */
/* alloc aes instance for both enc and dec */
enc = &ssl->encrypt;
@@ -717,7 +728,8 @@ WOLFSSL_LOCAL int wc_sce_generateSeesionKey(struct WOLFSSL *ssl,
sizeof(key_client_aes));
XMEMCPY(&dec->aes->ctx.sce_wrapped_key, &key_server_aes,
sizeof(key_server_aes));
- } else {
+ }
+ else {
XMEMCPY(&enc->aes->ctx.sce_wrapped_key, &key_server_aes,
sizeof(key_server_aes));
XMEMCPY(&dec->aes->ctx.sce_wrapped_key, &key_client_aes,
@@ -728,7 +740,7 @@ WOLFSSL_LOCAL int wc_sce_generateSeesionKey(struct WOLFSSL *ssl,
ssl->keys.sce_server_write_MAC_secret = key_server_mac;
/* set up key size and marked ready */
- if (enc){
+ if (enc) {
enc->aes->ctx.keySize = ssl->specs.key_size;
enc->aes->ctx.setup = 1;
/* ready for use */
@@ -755,10 +767,11 @@ WOLFSSL_LOCAL int wc_sce_generateSeesionKey(struct WOLFSSL *ssl,
}
/* unlock hw */
wc_sce_hw_unlock();
- } else
+ }
+ else
WOLFSSL_LEAVE("hw lock failed", ret);
- WOLFSSL_LEAVE("sce_generateSeesionKey", ret);
+ WOLFSSL_LEAVE("sce_generateSessionKey", ret);
return ret;
}
@@ -792,7 +805,8 @@ WOLFSSL_LOCAL int wc_sce_generateMasterSecret(
}
/* unlock hw */
wc_sce_hw_unlock();
- } else {
+ }
+ else {
WOLFSSL_MSG(" hw lock failed ");
}
WOLFSSL_LEAVE("sce_generateMasterSecret", ret);
@@ -818,7 +832,8 @@ WOLFSSL_LOCAL int wc_sce_generatePremasterSecret(uint8_t *premaster,
}
/* unlock hw */
wc_sce_hw_unlock();
- } else {
+ }
+ else {
WOLFSSL_MSG(" hw lock failed or preSz is smaller than 80");
}
@@ -852,7 +867,8 @@ WOLFSSL_LOCAL int wc_sce_generateEncryptPreMasterSecret(
if (ret != FSP_SUCCESS) {
WOLFSSL_MSG("R_SCE_TLS_PreMasterSecretEncryptWithRSA2048 failed");
- } else {
+ }
+ else {
*outSz = 256; /* SCE can only handles 2048 RSA */
/* set GenMaster Callback for Master secret generation */
void* ctx = wolfSSL_GetRsaVerifyCtx(ssl);
@@ -862,7 +878,8 @@ WOLFSSL_LOCAL int wc_sce_generateEncryptPreMasterSecret(
}
wc_sce_hw_unlock();
- } else {
+ }
+ else {
WOLFSSL_MSG(" hw lock failed ");
}
WOLFSSL_LEAVE("sce_generateEncryptPreMasterSecret", ret);
@@ -918,21 +935,25 @@ WOLFSSL_LOCAL int wc_sce_tls_CertVerify(
offset = 0x25;
if (signature[offset] == 0x20) {
XMEMCPY(&sigforSCE[rs_size], &signature[offset+1], rs_size);
- } else {
+ }
+ else {
XMEMCPY(&sigforSCE[rs_size], &signature[offset+2], rs_size);
}
- } else {
+ }
+ else {
XMEMCPY(sigforSCE, &signature[offset+2], rs_size);
offset = 0x26;
if (signature[offset] == rs_size) {
XMEMCPY(&sigforSCE[rs_size], &signature[offset+1], rs_size);
- } else {
+ }
+ else {
XMEMCPY(&sigforSCE[rs_size], &signature[offset+2], rs_size);
}
}
pSig = sigforSCE;
- } else {
+ }
+ else {
pSig = (uint8_t*)signature;
}
@@ -957,7 +978,8 @@ WOLFSSL_LOCAL int wc_sce_tls_CertVerify(
XFREE(sigforSCE, NULL, DYNAMIC_TYPE_TEMP);
}
wc_sce_hw_unlock();
- } else {
+ }
+ else {
WOLFSSL_MSG(" hw lock failed ");
}
WOLFSSL_LEAVE("sce_tls_CertVerify", ret);
@@ -999,11 +1021,13 @@ WOLFSSL_LOCAL int wc_sce_tls_RootCertVerify(
/* ECDSA 96 bytes */
if (ret != FSP_SUCCESS) {
WOLFSSL_MSG(" R_SCE_TLS_RootCertificateVerify() failed");
- } else {
+ }
+ else {
g_CAscm_Idx = cm_row;
}
wc_sce_hw_unlock();
- } else {
+ }
+ else {
WOLFSSL_MSG(" hw lock failed ");
}
WOLFSSL_LEAVE("wc_sce_tls_RootCertVerify", ret);
@@ -1017,7 +1041,7 @@ WOLFSSL_LOCAL int wc_sce_storeKeyCtx(struct WOLFSSL* ssl, User_SCEPKCbInfo* info
{
int ret = 0;
- WOLFSSL_MSG(">> sce_storeKeyCtx");
+ WOLFSSL_ENTER("sce_storeKeyCtx");
if (ssl == NULL || info == NULL)
ret = BAD_FUNC_ARG;
@@ -1031,7 +1055,7 @@ WOLFSSL_LOCAL int wc_sce_storeKeyCtx(struct WOLFSSL* ssl, User_SCEPKCbInfo* info
info->sce_cipher = GetSceCipherSuite(ssl->options.cipherSuite0,
ssl->options.cipherSuite);
}
-
+ WOLFSSL_LEAVE("sce_storeKeyCtx", ret);
return ret;
}
diff --git a/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c b/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c
index e4fd7f93d..7a3e040da 100644
--- a/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c
+++ b/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c
@@ -35,16 +35,32 @@
#include
#include
-
+#include
#include
#include "wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h"
-struct Aes;
+
+#define TSIP_AES_GCM_AUTH_TAG_SIZE 16
+
+typedef e_tsip_err_t (*aesGcmEncInitFn)
+ (tsip_gcm_handle_t*, tsip_aes_key_index_t*, uint8_t*, uint32_t);
+typedef e_tsip_err_t (*aesGcmEncUpdateFn)
+ (tsip_gcm_handle_t*,uint8_t*, uint8_t*, uint32_t, uint8_t*, uint32_t);
+typedef e_tsip_err_t (*aesGcmEncFinalFn)
+ (tsip_gcm_handle_t*, uint8_t*, uint32_t*, uint8_t*);
+typedef e_tsip_err_t (*aesGcmDecInitFn)
+ (tsip_gcm_handle_t*, tsip_aes_key_index_t*, uint8_t*, uint32_t);
+typedef e_tsip_err_t (*aesGcmDecUpdateFn)
+ (tsip_gcm_handle_t*,uint8_t*, uint8_t*, uint32_t, uint8_t*, uint32_t);
+typedef e_tsip_err_t (*aesGcmDecFinalFn)
+ (tsip_gcm_handle_t*, uint8_t*, uint32_t*, uint8_t*, uint32_t);
+
+
int wc_tsip_AesCbcEncrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
{
tsip_aes_handle_t _handle;
- word32 ret;
+ int ret;
word32 blocks = (sz / AES_BLOCK_SIZE);
uint32_t dataLength;
byte *iv;
@@ -63,9 +79,11 @@ int wc_tsip_AesCbcEncrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
if (aes->ctx.keySize == 16) {
ret = R_TSIP_Aes128CbcEncryptInit(&_handle, &aes->ctx.tsip_keyIdx, iv);
- } else if (aes->ctx.keySize == 32) {
+ }
+ else if (aes->ctx.keySize == 32) {
ret = R_TSIP_Aes256CbcEncryptInit(&_handle, &aes->ctx.tsip_keyIdx, iv);
- } else {
+ }
+ else {
tsip_hw_unlock();
return -1;
}
@@ -86,10 +104,12 @@ int wc_tsip_AesCbcEncrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
if (ret == TSIP_SUCCESS) {
if (aes->ctx.keySize == 16) {
ret = R_TSIP_Aes128CbcEncryptFinal(&_handle, out, &dataLength);
- } else {
+ }
+ else {
ret = R_TSIP_Aes256CbcEncryptFinal(&_handle, out, &dataLength);
}
- } else {
+ }
+ else {
WOLFSSL_MSG("TSIP AES CBC encryption failed");
ret = -1;
}
@@ -101,7 +121,7 @@ int wc_tsip_AesCbcEncrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
int wc_tsip_AesCbcDecrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
{
tsip_aes_handle_t _handle;
- word32 ret;
+ int ret;
word32 blocks = (sz / AES_BLOCK_SIZE);
uint32_t dataLength;
byte *iv;
@@ -118,9 +138,11 @@ int wc_tsip_AesCbcDecrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
if (aes->ctx.keySize == 16) {
ret = R_TSIP_Aes128CbcDecryptInit(&_handle, &aes->ctx.tsip_keyIdx, iv);
- } else if (aes->ctx.keySize == 32) {
+ }
+ else if (aes->ctx.keySize == 32) {
ret = R_TSIP_Aes256CbcDecryptInit(&_handle, &aes->ctx.tsip_keyIdx, iv);
- } else {
+ }
+ else {
tsip_hw_unlock();
return -1;
}
@@ -143,7 +165,8 @@ int wc_tsip_AesCbcDecrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
ret = R_TSIP_Aes128CbcDecryptFinal(&_handle, out, &dataLength);
else
ret = R_TSIP_Aes256CbcDecryptFinal(&_handle, out, &dataLength);
- } else {
+ }
+ else {
WOLFSSL_MSG("TSIP AES CBC decryption failed");
ret = -1;
}
@@ -151,6 +174,353 @@ int wc_tsip_AesCbcDecrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
tsip_hw_unlock();
return ret;
}
+/*
+ * Encrypt plain data then output encrypted data and authentication tag data.
+ * The session key used for encryption is generated inside this function and
+ * the key which has been generated and stored in Aes is not used.
+ * parameter
+ * - aes: Aes structure
+ * - out: buffer where the cipher text is output
+ * - in: buffer where the plain data is storead
+ * - sz: size of plain data and also means output size
+ * - iv: iv should be consist of implicit-iv of 4 bytes and exp-iv of 8 bytes
+ * - authTag: buffer where the authentication data is output.
+ * - authTagSz: buffer size for authentication data.
+ * - authIn: buffer holding Additionnal Authentication Data(AAD)
+ * - authInSz: AAD size
+ * - ctx: TsipUserCtx
+ * return 0 on success, otherwise on error.
+ * Note: As of TSIPv1.13, only accept 128 and 256 bit of key size
+ *
+ */
+int wc_tsip_AesGcmEncrypt(
+ struct Aes* aes, byte* out,
+ const byte* in, word32 sz,
+ byte* iv, word32 ivSz,
+ byte* authTag, word32 authTagSz, /* auth Tag */
+ const byte* authIn, word32 authInSz, /* AAD */
+ void* ctx)
+{
+ int ret = -1;
+ e_tsip_err_t err;
+ tsip_gcm_handle_t hdl;
+ uint32_t dataLen = sz;
+ uint32_t cipherBufSz;
+ aesGcmEncInitFn initFn;
+ aesGcmEncUpdateFn updateFn;
+ aesGcmEncFinalFn finalFn;
+
+ uint8_t* plainBuf = NULL;
+ uint8_t* cipherBuf = NULL;
+ uint8_t* aTagBuf = NULL;
+ uint8_t* aadBuf = NULL;
+
+ tsip_aes_key_index_t key_client_aes;
+ TsipUserCtx *userCtx;
+
+ WOLFSSL_ENTER("wc_tsip_AesGcmEncrypt");
+
+ if (aes == NULL || ctx == NULL ||
+ (sz != 0 && (in == NULL || out == NULL)) ||
+ (ivSz != 0 && iv == NULL) ||
+ (ivSz < AESGCM_NONCE_SZ && iv != NULL) || /* Requires 12 bytes of iv */
+ (authInSz != 0 && authIn == NULL) ||
+ (authTagSz < AES_BLOCK_SIZE)) {
+ WOLFSSL_LEAVE("wc_tsip_AesGcmEncrypt", BAD_FUNC_ARG);
+ return BAD_FUNC_ARG;
+ }
+ /* TSIP can handle 128 and 256 bit key only */
+ if (aes->ctx.keySize != 16 && aes->ctx.keySize != 32) {
+ WOLFSSL_MSG("illegal key size");
+ WOLFSSL_LEAVE("wc_tsip_AesGcmEncrypt", BAD_FUNC_ARG);
+ return BAD_FUNC_ARG;
+ }
+
+ if (aes->ctx.keySize == 16) {
+ initFn = R_TSIP_Aes128GcmEncryptInit;
+ updateFn = R_TSIP_Aes128GcmEncryptUpdate;
+ finalFn = R_TSIP_Aes128GcmEncryptFinal;
+ }
+ else {
+ initFn = R_TSIP_Aes256GcmEncryptInit;
+ updateFn = R_TSIP_Aes256GcmEncryptUpdate;
+ finalFn = R_TSIP_Aes256GcmEncryptFinal;
+ }
+
+ userCtx = (TsipUserCtx*)ctx;
+
+ /* buffer for cipher data output must be multiple of AES_BLOCK_SIZE */
+ cipherBufSz = ((sz / AES_BLOCK_SIZE) + 1) * AES_BLOCK_SIZE;
+
+ if ((ret = tsip_hw_lock()) == 0) {
+
+ /* allocate buffers for plaintext, ciphertext, authTag and aad to make
+ * sure those buffers 32bit aligned as TSIP requests.
+ */
+ plainBuf = XMALLOC(sz, aes->heap, DYNAMIC_TYPE_AES);
+ cipherBuf = XMALLOC(cipherBufSz, aes->heap, DYNAMIC_TYPE_AES);
+ aTagBuf = XMALLOC(TSIP_AES_GCM_AUTH_TAG_SIZE, aes->heap,
+ DYNAMIC_TYPE_AES);
+ aadBuf = XMALLOC(authTagSz, aes->heap, DYNAMIC_TYPE_AES);
+
+ if (plainBuf == NULL || cipherBuf == NULL || aTagBuf == NULL ||
+ aadBuf == NULL ) {
+ WOLFSSL_MSG("wc_tsip_AesGcmEncrypt: buffer allocation faild");
+ ret = -1;
+ }
+
+ if (ret == 0) {
+ XMEMCPY(plainBuf, in, sz);
+ XMEMSET(cipherBuf, 0, cipherBufSz);
+ XMEMSET(authTag, 0, authTagSz);
+ XMEMCPY(aadBuf, authIn, min(authInSz, TSIP_AES_GCM_AUTH_TAG_SIZE));
+ }
+
+ if (ret == 0) {
+ /* generate AES-GCM session key. The key stored in
+ * Aes.ctx.tsip_keyIdx is not used here.
+ */
+ err = R_TSIP_TlsGenerateSessionKey(
+ userCtx->tsip_cipher,
+ (uint32_t*)userCtx->tsip_masterSecret,
+ (uint8_t*) userCtx->tsip_clientRandom,
+ (uint8_t*) userCtx->tsip_serverRandom,
+ &iv[AESGCM_IMP_IV_SZ], /* use exp_IV */
+ NULL,
+ NULL,
+ &key_client_aes,
+ NULL,
+ NULL, NULL);
+ if (err != TSIP_SUCCESS) {
+
+ WOLFSSL_MSG("R_TSIP_TlsGenerateSessionKey failed");
+ ret = -1;
+ }
+ }
+
+ if (ret == 0) {
+
+ /* since generated session key is coupled to iv, no need to pass
+ * iv init func.
+ */
+ err = initFn(&hdl, &key_client_aes, NULL, 0UL);
+
+ if (err == TSIP_SUCCESS) {
+ err = updateFn(&hdl, NULL, NULL, 0UL, (uint8_t*)aadBuf,
+ min(authInSz, TSIP_AES_GCM_AUTH_TAG_SIZE));
+ }
+ if (err == TSIP_SUCCESS) {
+ err = updateFn(&hdl, plainBuf, cipherBuf, sz, NULL, 0UL);
+ }
+ if (err != TSIP_SUCCESS) {
+ WOLFSSL_MSG("R_TSIP_AesXXXGcmEncryptUpdate: failed");
+ ret = -1;
+ }
+
+ /* Once R_TSIP_AesxxxGcmEncryptInit or R_TSIP_AesxxxEncryptUpdate is
+ * called, R_TSIP_AesxxxGcmEncryptFinal must be called regardless of
+ * the result of the previous call. Otherwise, TSIP can not come out
+ * from its error state and all the trailing APIs will fail.
+ */
+ dataLen = 0;
+ err = finalFn(&hdl,
+ cipherBuf + (sz / AES_BLOCK_SIZE) * AES_BLOCK_SIZE,
+ &dataLen,
+ aTagBuf); /* aad of 16 bytes will be output */
+
+ if (err == TSIP_SUCCESS) {
+ /* copy encrypted data to out */
+ XMEMCPY(out, cipherBuf, sz);
+
+ /* copy auth tag to caller's buffer */
+ XMEMCPY((void*)authTag, (void*)aTagBuf,
+ min(authTagSz, TSIP_AES_GCM_AUTH_TAG_SIZE ));
+
+ }
+ else {
+ WOLFSSL_MSG("R_TSIP_AesxxxGcmEncryptFinal: failed");
+ ret = -1;
+ }
+ }
+
+ XFREE(plainBuf, aes->heap, DYNAMIC_TYPE_AES);
+ XFREE(cipherBuf, aes->heap, DYNAMIC_TYPE_AES);
+ XFREE(aTagBuf, aes->heap, DYNAMIC_TYPE_AES);
+ XFREE(aadBuf, aes->heap, DYNAMIC_TYPE_AES);
+
+ tsip_hw_unlock();
+ }
+ return ret;
+}
+/*
+ * Decrypt cipher data into plaindata and output authentication tag data.
+ * The session key used for decryption is generated inside this function and
+ * the key which has been generated and stored in Aes is not used.
+ * parameter
+ * - aes: Aes structure
+ * - out: buffer where the plain text is output
+ * - in: buffer where the cipher data is storead
+ * - sz: size of cipher data and also means output size
+ * - iv: iv should be consist of implicit-iv of 4 bytes and exp-iv of 8 bytes
+ * - authTag: buffer where the authentication data is stored.
+ * - authTagSz: buffer size for authentication data.
+ * - authIn: buffer where Additionnal Authentication Data(AAD) is stored
+ * - authInSz: AAD size
+ * return 0 on success, otherwise on error.
+ * Note: As of TSIPv1.13, only accept 128 and 256 bit of key size
+ *
+ */
+int wc_tsip_AesGcmDecrypt(
+ Aes* aes, byte* out,
+ const byte* in, word32 sz,
+ const byte* iv, word32 ivSz,
+ const byte* authTag, word32 authTagSz,
+ const byte* authIn, word32 authInSz,
+ void* ctx)
+{
+ int ret = -1;
+ e_tsip_err_t err;
+ tsip_gcm_handle_t hdl;
+
+ uint32_t dataLen = sz;
+ uint32_t plainBufSz;
+
+ aesGcmDecInitFn initFn;
+ aesGcmDecUpdateFn updateFn;
+ aesGcmDecFinalFn finalFn;
+
+ uint8_t* cipherBuf = NULL;
+ uint8_t* plainBuf = NULL;
+ uint8_t* aTagBuf = NULL;
+ uint8_t* aadBuf = NULL;
+
+ tsip_aes_key_index_t key_server_aes;
+ TsipUserCtx *userCtx;
+
+ WOLFSSL_ENTER("wc_tsip_AesGcmDecrypt");
+
+ if (aes == NULL || in == NULL || out == NULL || sz == 0 || ctx == NULL ||
+ (ivSz < AESGCM_NONCE_SZ && iv != NULL) || /* Requires 12 bytes of iv */
+ (authInSz != 0 && authIn == NULL) ||
+ (authInSz == 0 && authIn != NULL) ||
+ (authTagSz != 0 && authTag == NULL) ||
+ (authTagSz == 0 && authTag != NULL)) {
+ WOLFSSL_LEAVE("wc_tsip_AesGcmDecrypt", BAD_FUNC_ARG);
+ return BAD_FUNC_ARG;
+ }
+ if (aes->ctx.keySize != 16 && aes->ctx.keySize != 32) {
+ WOLFSSL_MSG("illegal key size");
+ WOLFSSL_LEAVE("wc_tsip_AesGcmDecrypt", BAD_FUNC_ARG);
+ return BAD_FUNC_ARG;
+ }
+
+ if (aes->ctx.keySize == 16) {
+ initFn = R_TSIP_Aes128GcmDecryptInit;
+ updateFn = R_TSIP_Aes128GcmDecryptUpdate;
+ finalFn = R_TSIP_Aes128GcmDecryptFinal;
+ }
+ else {
+ initFn = R_TSIP_Aes256GcmDecryptInit;
+ updateFn = R_TSIP_Aes256GcmDecryptUpdate;
+ finalFn = R_TSIP_Aes256GcmDecryptFinal;
+ }
+
+ userCtx = (TsipUserCtx *)ctx;
+
+ /* buffer for plain data output must be multiple of AES_BLOCK_SIZE */
+ plainBufSz = ((sz / AES_BLOCK_SIZE) + 1) * AES_BLOCK_SIZE;
+
+ if ((ret = tsip_hw_lock()) == 0) {
+
+ /* allocate buffers for plaintext, cipher-text, authTag and AAD.
+ * TSIP requests those buffers 32bit aligned.
+ */
+ cipherBuf = XMALLOC(sz, aes->heap, DYNAMIC_TYPE_AES);
+ plainBuf = XMALLOC(plainBufSz, aes->heap, DYNAMIC_TYPE_AES);
+ aTagBuf = XMALLOC(TSIP_AES_GCM_AUTH_TAG_SIZE, aes->heap,
+ DYNAMIC_TYPE_AES);
+ aadBuf = XMALLOC(authInSz, aes->heap, DYNAMIC_TYPE_AES);
+
+ if (plainBuf == NULL || cipherBuf == NULL || aTagBuf == NULL ||
+ aadBuf == NULL) {
+ ret = -1;
+ }
+
+ if (ret == 0) {
+ XMEMSET(plainBuf, 0, plainBufSz);
+ XMEMCPY(cipherBuf, in, sz);
+ XMEMSET(aTagBuf, 0, TSIP_AES_GCM_AUTH_TAG_SIZE);
+ XMEMCPY(aTagBuf,authTag,min(authTagSz, TSIP_AES_GCM_AUTH_TAG_SIZE));
+ XMEMCPY(aadBuf, authIn, authInSz);
+ }
+
+ if (ret == 0) {
+ /* generate AES-GCM session key. The key stored in
+ * Aes.ctx.tsip_keyIdx is not used here.
+ */
+ err = R_TSIP_TlsGenerateSessionKey(
+ userCtx->tsip_cipher,
+ (uint32_t*)userCtx->tsip_masterSecret,
+ (uint8_t*) userCtx->tsip_clientRandom,
+ (uint8_t*) userCtx->tsip_serverRandom,
+ (uint8_t*)&iv[AESGCM_IMP_IV_SZ], /* use exp_IV */
+ NULL,
+ NULL,
+ NULL,
+ &key_server_aes,
+ NULL, NULL);
+ if (err != TSIP_SUCCESS) {
+ WOLFSSL_MSG("R_TSIP_TlsGenerateSessionKey failed");
+ ret = -1;
+ }
+ }
+
+ if (ret == 0) {
+ /* since key_index has iv and ivSz in it, no need to pass them init
+ * func. Pass NULL and 0 as 3rd and 4th parameter respectively.
+ */
+ err = initFn(&hdl, &key_server_aes, NULL, 0UL);
+
+ if (err == TSIP_SUCCESS) {
+ /* pass only AAD and it's size before passing cipher text */
+ err = updateFn(&hdl, NULL, NULL, 0UL, (uint8_t*)authIn,
+ authInSz);
+ }
+ if (err == TSIP_SUCCESS) {
+ err = updateFn(&hdl, cipherBuf, plainBuf, sz, NULL, 0UL);
+ }
+ if (err != TSIP_SUCCESS) {
+ WOLFSSL_MSG("R_TSIP_AesXXXGcmDecryptUpdate: failed in decrypt");
+ ret = -1;
+ }
+ if (err == TSIP_SUCCESS) {
+ dataLen = 0;
+ err = finalFn(&hdl,
+ plainBuf + (sz / AES_BLOCK_SIZE) * AES_BLOCK_SIZE,
+ &dataLen,
+ aTagBuf,
+ min(16, authTagSz)); /* TSIP accepts upto 16 byte */
+ }
+ if (err == TSIP_SUCCESS) {
+ /* copy plain data to out */
+ XMEMCPY(out, plainBuf, sz);
+ }
+ else {
+ WOLFSSL_MSG("R_TSIP_AesXXXGcmDecryptFinal: failed");
+ ret = -1;
+ }
+ }
+
+ XFREE(plainBuf, aes->heap, DYNAMIC_TYPE_AES);
+ XFREE(cipherBuf, aes->heap, DYNAMIC_TYPE_AES);
+ XFREE(aTagBuf, aes->heap, DYNAMIC_TYPE_AES);
+ XFREE(aadBuf, aes->heap, DYNAMIC_TYPE_AES);
+
+ tsip_hw_unlock();
+ }
+ WOLFSSL_LEAVE("wc_tsip_AesGcmDecrypt", ret);
+ return ret;
+}
#endif /* WOLFSSL_RENESAS_TSIP_CRYPT */
#endif /* NO_AES */
diff --git a/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c b/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c
index c485eecd5..264f158c7 100644
--- a/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c
+++ b/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c
@@ -78,7 +78,8 @@ static int TSIPHashUpdate(wolfssl_TSIP_Hash* hash, const byte* data, word32 sz)
if (hash->msg == NULL) {
hash->msg = (byte*)XMALLOC(hash->used + sz, hash->heap,
DYNAMIC_TYPE_TMP_BUFFER);
- } else {
+ }
+ else {
#ifdef FREERTOS
byte* pt = (byte*)XMALLOC(hash->used + sz, hash->heap,
DYNAMIC_TYPE_TMP_BUFFER);
@@ -128,11 +129,13 @@ static int TSIPHashFinal(wolfssl_TSIP_Hash* hash, byte* out, word32 outSz)
Init = R_TSIP_Sha1Init;
Update = R_TSIP_Sha1Update;
Final = R_TSIP_Sha1Final;
- } else if (hash->sha_type == TSIP_SHA256) {
+ }
+ else if (hash->sha_type == TSIP_SHA256) {
Init = R_TSIP_Sha256Init;
Update = R_TSIP_Sha256Update;
Final = R_TSIP_Sha256Final;
- } else
+ }
+ else
return BAD_FUNC_ARG;
heap = hash->heap;
@@ -172,11 +175,13 @@ static int TSIPHashGet(wolfssl_TSIP_Hash* hash, byte* out, word32 outSz)
Init = R_TSIP_Sha1Init;
Update = R_TSIP_Sha1Update;
Final = R_TSIP_Sha1Final;
- } else if (hash->sha_type == TSIP_SHA256) {
+ }
+ else if (hash->sha_type == TSIP_SHA256) {
Init = R_TSIP_Sha256Init;
Update = R_TSIP_Sha256Update;
Final = R_TSIP_Sha256Final;
- } else
+ }
+ else
return BAD_FUNC_ARG;
tsip_hw_lock();
diff --git a/wolfcrypt/src/port/Renesas/renesas_tsip_util.c b/wolfcrypt/src/port/Renesas/renesas_tsip_util.c
index e7275921f..ef4dd61e5 100644
--- a/wolfcrypt/src/port/Renesas/renesas_tsip_util.c
+++ b/wolfcrypt/src/port/Renesas/renesas_tsip_util.c
@@ -23,19 +23,23 @@
#if defined(WOLFSSL_RENESAS_TSIP)
#include
-#include
-
-#include
#include
#include
#include
#include
#include
-
+#include
+#include
#include
-
+/* function pointer typedefs for TSIP SHAxx HMAC Verification */
+typedef e_tsip_err_t (*shaHmacInitFn)
+ (tsip_hmac_sha_handle_t*, tsip_hmac_sha_key_index_t*);
+typedef e_tsip_err_t (*shaHmacUpdateFn)
+ (tsip_hmac_sha_handle_t*, uint8_t*, uint32_t);
+typedef e_tsip_err_t (*shaHmacFinalFn)
+ (tsip_hmac_sha_handle_t*, uint8_t*, uint32_t);
/* ./ca-cert.der.sign, */
/* expect to have these variables defined at user application */
@@ -49,11 +53,15 @@ static int tsip_CryptHwMutexInit_ = 0;
static const byte* ca_cert_sig;
static tsip_key_data g_user_key_info;
+
/* tsip only keep one encrypted ca public key */
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
static uint32_t g_encrypted_publicCA_key[R_TSIP_SINST_WORD_SIZE];
-static uint32_t g_CAscm_Idx = (uint32_t)-1; /* index of CM table */
-#endif
+
+/* index of CM table. must be global since renesas_common access it. */
+extern uint32_t g_CAscm_Idx;
+
+#endif /* WOLFSSL_RENESAS_TSIP_TLS */
@@ -78,7 +86,7 @@ static uint32_t GetTsipCipherSuite(
uint8_t cipherSuiteFirst,
uint8_t cipherSuite)
{
- WOLFSSL_MSG(">> GetTsipCipherSuite");
+ WOLFSSL_ENTER("GetTsipCipherSuite");
uint32_t tsipCipher;
if(cipherSuiteFirst == CIPHER_BYTE )
@@ -105,13 +113,13 @@ static uint32_t GetTsipCipherSuite(
tsipCipher = (uint32_t)WOLFSSL_TSIP_ILLEGAL_CIPHERSUITE;
break;
}
- WOLFSSL_MSG( "<< GetTsipCipherSuite");
+ WOLFSSL_LEAVE("GetTsipCipherSuite", tsipCipher);
return tsipCipher;
}
else if( cipherSuiteFirst == ECC_BYTE )
{
tsipCipher = (uint32_t)WOLFSSL_TSIP_ILLEGAL_CIPHERSUITE;
- /* comment out until implementation completes
+
switch(cipherSuite){
case TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256:
@@ -133,16 +141,299 @@ static uint32_t GetTsipCipherSuite(
default:
tsipCipher = (uint32_t)WOLFSSL_TSIP_ILLEGAL_CIPHERSUITE;
break;
- } */
+ }
}
else{
tsipCipher = (uint32_t)WOLFSSL_TSIP_ILLEGAL_CIPHERSUITE;
}
- WOLFSSL_MSG( "<< GetTsipCipherSuite" );
+ WOLFSSL_LEAVE("GetTsipCipherSuite", tsipCipher);
return tsipCipher;
}
+
+/* Attempt to get a public key exchaged with the peer in ECDHE.
+ * the public key is verified by given signature then stored into ctx.
+ *
+ * return WOLFSSL_SUCCESS on success, WOLFSSL_FAILURE on failure.
+ */
+static int tsip_ServerKeyExVerify(
+ word32 type, /* public key type 0:RSA2048 2:ECDSA P-256 */
+ WOLFSSL* ssl,
+ const byte* sig,
+ word32 sigSz,
+ void* ctx)
+{
+ int ret = WOLFSSL_FAILURE;
+ byte qx[MAX_ECC_BYTES], qy[MAX_ECC_BYTES];
+ byte* peerkey = NULL;
+ word32 qxLen = sizeof(qx), qyLen = sizeof(qy);
+ TsipUserCtx* userCtx;
+
+ WOLFSSL_ENTER("tsip_ServerKeyExVerify");
+
+ /* sanity check */
+ if (ssl == NULL || sig == NULL || ctx == NULL)
+ return ret;
+
+ userCtx = (TsipUserCtx*)ctx;
+
+ /* export public peer public key */
+ ret = wc_ecc_export_public_raw(ssl->peerEccKey, qx, &qxLen, qy, &qyLen);
+
+ if (ret != 0){
+ WOLFSSL_MSG("failed to export peer ecc key");
+ WOLFSSL_LEAVE("tsip_ServerKeyExVerify", ret);
+ return ret;
+ }
+ /* make peer ecc key data for SCE */
+ /* 0padding(24bit) || 04(8bit) || Qx(256bit) || Qy(256bit) */
+ peerkey = (byte*)XMALLOC((3 + 1 + qxLen + qyLen), NULL,
+ DYNAMIC_TYPE_TMP_BUFFER);
+ if (peerkey == NULL) {
+ WOLFSSL_MSG("failed to malloc ecc key");
+ WOLFSSL_LEAVE("tsip_ServerKeyExVerify", ret);
+ return WOLFSSL_FAILURE;
+ }
+
+ XMEMSET(peerkey, 0, (3 + 1 + qxLen + qyLen));
+ peerkey[3] = ECC_POINT_UNCOMP;
+ XMEMCPY(&peerkey[4], qx, qxLen);
+ XMEMCPY(&peerkey[4+qxLen], qy, qyLen);
+
+ /* 0 : RSA 2048bit, 1 : Reserved, 2 : ECDSA P-256 */
+ if ((ret = tsip_hw_lock()) == 0) {
+ ret = R_TSIP_TlsServersEphemeralEcdhPublicKeyRetrieves(
+ type,
+ (uint8_t*) ssl->arrays->clientRandom,
+ (uint8_t*) ssl->arrays->serverRandom,
+ (uint8_t*) peerkey,
+ (uint8_t*) sig,
+ (uint32_t*)ssl->peerSceTsipEncRsaKeyIndex,
+ (uint32_t*)userCtx->encrypted_ephemeral_ecdh_public_key);
+
+ if (ret !=TSIP_SUCCESS) {
+ WOLFSSL_MSG("R_TSIP_TlsServersEphemeralEcdhPublicKeyRetrieves failed");
+ }
+ else {
+ ret = WOLFSSL_SUCCESS;
+ }
+
+ tsip_hw_unlock();
+ }
+ else {
+ WOLFSSL_MSG("Failed to lock tsip hw");
+ }
+
+ XFREE(peerkey, 0, DYNAMIC_TYPE_TMP_BUFFER);
+
+ WOLFSSL_LEAVE("tsip_ServerKeyExVerify", ret);
+ return ret;
+}
+/*
+ * return 0 on success
+ */
+int wc_tsip_RsaVerify(
+ WOLFSSL* ssl,
+ byte* sig, word32 sigSz,
+ byte** out,
+ const byte* key,
+ word32 keySz,
+ void* ctx)
+{
+ int ret;
+
+ WOLFSSL_ENTER("tsip_RsaVerify");
+
+ if (tsip_usable(ssl, 0))
+ ret = tsip_ServerKeyExVerify(0, ssl, sig, sigSz, ctx);
+ else
+ ret = CRYPTOCB_UNAVAILABLE;
+
+ if (ret == WOLFSSL_SUCCESS)
+ ret = 0;
+
+ WOLFSSL_LEAVE("tsip_RsaVerify", ret);
+ return ret;
+}
+/*
+ * return 0 on success
+ */
+int wc_tsip_EccVerify(
+ WOLFSSL* ssl,
+ const byte* sig, word32 sigSz,
+ const byte* hash, word32 hashSz,
+ const byte* key, word32 keySz,
+ int* result, void* ctx)
+{
+ int ret = WOLFSSL_FAILURE;
+ uint8_t* sigforSCE;
+ uint8_t* pSig;
+ const byte rs_size = R_TSIP_ECDSA_DATA_BYTE_SIZE/2;
+ byte offset = 0x3;
+
+ WOLFSSL_ENTER("wc_tsip_EccVerify");
+
+ /* check if TSIP can handle given cipher suite */
+ if (!tsip_usable(ssl, 0)) {
+ WOLFSSL_MSG("Cannot handle cipher suite by TSIP");
+ WOLFSSL_LEAVE("wc_tsip_EccVerify", CRYPTOCB_UNAVAILABLE);
+ return CRYPTOCB_UNAVAILABLE;
+ }
+
+ sigforSCE = (uint8_t*)XMALLOC(R_TSIP_ECDSA_DATA_BYTE_SIZE, NULL,
+ DYNAMIC_TYPE_TMP_BUFFER);
+
+ if (sigforSCE == NULL) {
+ WOLFSSL_MSG("failed to malloc memory");
+ WOLFSSL_LEAVE("wc_tsip_EccVerify", MEMORY_E);
+ return MEMORY_E;
+ }
+
+ /* initialization */
+ XMEMCPY(sigforSCE, 0, R_TSIP_ECDSA_DATA_BYTE_SIZE);
+
+ /* r */
+ if (sig[offset] == 0x20) {
+ XMEMCPY(sigforSCE, &sig[offset+1], rs_size);
+
+ offset = 0x25;
+ /* s */
+ if (sig[offset] == 0x20) {
+ XMEMCPY(&sigforSCE[rs_size], &sig[offset+1], rs_size);
+ }
+ else {
+ XMEMCPY(&sigforSCE[rs_size], &sig[offset+2], rs_size);
+ }
+ }
+ else {
+ XMEMCPY(sigforSCE, &sig[offset+2], rs_size);
+
+ offset = 0x26;
+ /* s */
+ if (sig[offset] == rs_size) {
+ XMEMCPY(&sigforSCE[rs_size], &sig[offset+1], rs_size);
+ }
+ else {
+ XMEMCPY(&sigforSCE[rs_size], &sig[offset+2], rs_size);
+ }
+ }
+
+ pSig = sigforSCE;
+
+ ret = tsip_ServerKeyExVerify(2, ssl, pSig, 64, ctx);
+
+ if (ret == WOLFSSL_SUCCESS) {
+ *result = 1;
+ ret = 0; /* for success */
+ }
+ else
+ *result = 0;
+
+ WOLFSSL_LEAVE("wc_tsip_EccVerify", ret);
+ return ret;
+}
+
+/*
+ * generate premaster secret
+ * 1. generate P256 ECC key pair for ECDHE key exchange
+ * 2. generate pre-master secret
+ * output 64 bytes premaster secret to "out" buffer.
+ */
+int wc_tsip_EccSharedSecret(
+ struct WOLFSSL* ssl,
+ ecc_key* otherKey,
+ unsigned char* pubKeyDer, unsigned int* pubKeySz,
+ unsigned char* out, unsigned int* outlen,
+ int side, void* ctx)
+{
+ int ret;
+ TsipUserCtx* usrCtx = (TsipUserCtx*)ctx;
+
+ (void)ssl;
+ (void)otherKey;
+
+ WOLFSSL_ENTER("wc_tsip_EccSharedSecret");
+ /* sanity check */
+ if (ssl == NULL || pubKeyDer == NULL || pubKeySz == NULL ||
+ out == NULL || outlen == NULL || ctx == NULL) {
+ WOLFSSL_LEAVE("wc_tsip_EccSharedSecret", WOLFSSL_FAILURE);
+ return WOLFSSL_FAILURE;
+ }
+ if ((ret = tsip_hw_lock()) == 0) {
+ /* Generate ECC public key for key exchange */
+ ret = R_TSIP_GenerateTlsP256EccKeyIndex(
+ &usrCtx->ecc_p256_wrapped_key,
+ (uint8_t*)&usrCtx->ecc_ecdh_public_key);
+
+ if (ret == TSIP_SUCCESS) {
+
+ /* copy generated ecdh public key into buffer */
+ pubKeyDer[0] = ECC_POINT_UNCOMP;
+ *pubKeySz = 1 + sizeof(usrCtx->ecc_ecdh_public_key);
+ XMEMCPY(&pubKeyDer[1], &usrCtx->ecc_ecdh_public_key,
+ sizeof(usrCtx->ecc_ecdh_public_key));
+
+ /* Generate Premaster Secret */
+ ret = R_TSIP_TlsGeneratePreMasterSecretWithEccP256Key(
+ (uint32_t*)&usrCtx->encrypted_ephemeral_ecdh_public_key,
+ &usrCtx->ecc_p256_wrapped_key,
+ (uint32_t*)out/* pre-master secret 64 bytes */);
+ }
+ if (ret == TSIP_SUCCESS) {
+ *outlen = 64;
+ wolfSSL_CTX_SetGenMasterSecretCb(ssl->ctx,
+ Renesas_cmn_genMasterSecret);
+ wolfSSL_SetGenMasterSecretCtx(ssl, usrCtx);
+
+ }
+
+ tsip_hw_unlock();
+ }
+ else {
+ WOLFSSL_MSG("Failed to lock tsip hw");
+ }
+ WOLFSSL_LEAVE("wc_tsip_EccSharedSecret", ret);
+ return ret;
+}
+
+
+WOLFSSL_API void tsip_set_callbacks(struct WOLFSSL_CTX* ctx)
+{
+ WOLFSSL_ENTER("tsip_set_callbacks");
+ wolfSSL_CTX_SetEccVerifyCb(ctx, (CallbackEccVerify)Renesas_cmn_EccVerify);
+ wolfSSL_CTX_SetRsaVerifyCb(ctx, (CallbackRsaVerify)Renesas_cmn_RsaVerify);
+ wolfSSL_CTX_SetGenPreMasterCb(ctx, Renesas_cmn_generatePremasterSecret);
+ wolfSSL_CTX_SetRsaEncCb(ctx, Renesas_cmn_RsaEnc);
+ wolfSSL_CTX_SetVerifyMacCb(ctx, (CallbackVerifyMac)Renesas_cmn_VerifyHmac);
+ wolfSSL_CTX_SetEccSharedSecretCb(ctx, NULL);
+ WOLFSSL_LEAVE("tsip_set_callbacks", 0);
+}
+
+WOLFSSL_API int tsip_set_callback_ctx(struct WOLFSSL* ssl, void* user_ctx)
+{
+ WOLFSSL_ENTER("tsip_set_callback_ctx");
+
+ TsipUserCtx* uCtx = (TsipUserCtx*)user_ctx;
+ if (user_ctx == NULL) {
+ WOLFSSL_LEAVE("tsip_set_callback_ctx", 0);
+ return 0;
+ }
+ XMEMSET( uCtx, 0, sizeof(TsipUserCtx));
+
+ wolfSSL_SetEccVerifyCtx(ssl, user_ctx);
+ wolfSSL_SetRsaEncCtx(ssl, user_ctx);
+ wolfSSL_SetRsaVerifyCtx(ssl, user_ctx);
+ wolfSSL_SetGenPreMasterCtx(ssl, user_ctx);
+ wolfSSL_SetEccSharedSecretCtx(ssl, NULL);
+ wolfSSL_SetVerifyMacCtx(ssl, user_ctx);
+
+ /* set up crypt callback */
+ wc_CryptoCb_CryptInitRenesasCmn(ssl, user_ctx);
+ WOLFSSL_LEAVE("tsip_set_callback_ctx", 0);
+ return 0;
+}
+
#elif defined(WOLFSSL_RENESAS_TSIP_TLS) && (WOLFSSL_RENESAS_TSIP_VER >=106)
/* convert def to tsip define */
@@ -170,22 +461,23 @@ static byte _tls2tsipdef(byte cipher)
* lock hw engine.
* this should be called before using engine.
*/
-int tsip_hw_lock()
+WOLFSSL_LOCAL int tsip_hw_lock()
{
int ret = 0;
- if(tsip_CryptHwMutexInit_ == 0){
+ if (tsip_CryptHwMutexInit_ == 0) {
ret = tsip_CryptHwMutexInit(&tsip_mutex);
- if(ret == 0) {
+ if (ret == 0) {
tsip_CryptHwMutexInit_ = 1;
- } else {
+ }
+ else {
WOLFSSL_MSG(" mutex initialization failed.");
return -1;
}
}
- if(tsip_CryptHwMutexLock(&tsip_mutex) != 0) {
+ if (tsip_CryptHwMutexLock(&tsip_mutex) != 0) {
/* this should not happens */
return -1;
}
@@ -196,102 +488,155 @@ int tsip_hw_lock()
/*
* release hw engine
*/
-void tsip_hw_unlock( void )
+WOLFSSL_LOCAL void tsip_hw_unlock( void )
{
tsip_CryptHwMutexUnLock(&tsip_mutex);
}
/* check if tsip tls functions can be used for the cipher */
-/* cipher0 : in the some cipher suite, */
-/* first byte becomes greater than 0, otherwise 0x00 */
-/* side : CLIENT END or SEVER END */
-int tsip_useable(const struct WOLFSSL *ssl)
+/* return :1 when tsip can be used , 0 not be used. */
+int tsip_usable(const struct WOLFSSL *ssl, uint8_t session_key_generated)
{
- WOLFSSL_MSG(">> tsip_useable");
- byte cipher0;
- byte cipher;
- byte side;
+ byte cipher0 = ssl->options.cipherSuite0;
+ byte cipher = ssl->options.cipherSuite;
+ byte side = ssl->options.side;
+ int ret = WOLFSSL_SUCCESS;
+ const Ciphers *enc;
+ const Ciphers *dec;
+
+ WOLFSSL_ENTER("tsip_usable");
/* sanity check */
- if (ssl == NULL)
- return BAD_FUNC_ARG;
+ if (ssl == NULL) {
+ WOLFSSL_MSG( "ssl is NULL");
+ ret = BAD_FUNC_ARG;
+ }
/* when rsa key index == NULL, tsip isn't used for cert verification. */
/* in the case, we cannot use TSIP. */
- if (!ssl->peerSceTsipEncRsaKeyIndex)
- return 0;
-
+ if (ret == WOLFSSL_SUCCESS) {
+ if (!ssl->peerSceTsipEncRsaKeyIndex) {
+ WOLFSSL_MSG( "ssl->peerSceTsipEncRsaKeyIndex is NULL");
+ ret = WOLFSSL_FAILURE;
+ }
+ }
+
+ if (ret == WOLFSSL_SUCCESS) {
+ if (session_key_generated) {
+ enc = &ssl->encrypt;
+ dec = &ssl->decrypt;
+ if (enc == NULL || dec == NULL) {
+ /* something wrong */
+ ret = WOLFSSL_FAILURE;
+ }
+ if (enc->aes == NULL || dec->aes == NULL) {
+ ret = WOLFSSL_FAILURE;
+ }
+ if (enc->aes->ctx.setup == 0) {
+ /* session key for SCE is not created */
+ ret = WOLFSSL_FAILURE;
+ }
+ }
+ }
+
/* when enabled Extended Master Secret, we cannot use TSIP. */
- if (ssl->options.haveEMS)
- return 0;
- cipher0 = ssl->options.cipherSuite0;
- cipher = ssl->options.cipherSuite;
- side = ssl->options.side;
-
- if (cipher0 > 0x00)
- return 0;
-
- if ((cipher == l_TLS_RSA_WITH_AES_128_CBC_SHA ||
- cipher == l_TLS_RSA_WITH_AES_128_CBC_SHA256 ||
- cipher == l_TLS_RSA_WITH_AES_256_CBC_SHA ||
- cipher == l_TLS_RSA_WITH_AES_256_CBC_SHA256) &&
- side == WOLFSSL_CLIENT_END)
- return 1;
- else
- return 0;
+ if (ret == WOLFSSL_SUCCESS) {
+ if (ssl->options.haveEMS) {
+ WOLFSSL_MSG( "ssl->options.haveEMS");
+ ret = WOLFSSL_FAILURE;
+ }
+ }
+ /* TSIP works only for TLS client */
+ if (ret == WOLFSSL_SUCCESS) {
+ if (side != WOLFSSL_CLIENT_END) {
+ WOLFSSL_MSG( "Not client side");
+ ret = WOLFSSL_FAILURE;
+ }
+ }
+ /* Check if TSIP can handle cipher suite */
+ if (ret == WOLFSSL_SUCCESS) {
+ if (
+ cipher0 == CIPHER_BYTE &&
+ (cipher == l_TLS_RSA_WITH_AES_128_CBC_SHA ||
+ cipher == l_TLS_RSA_WITH_AES_128_CBC_SHA256 ||
+ cipher == l_TLS_RSA_WITH_AES_256_CBC_SHA ||
+ cipher == l_TLS_RSA_WITH_AES_256_CBC_SHA256)
+ # if (WOLFSSL_RENESAS_TSIP_VER >= TSIP109)
+ ||
+ cipher0 == ECC_BYTE &&
+ (cipher == l_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 ||
+ cipher == l_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 ||
+ cipher == l_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ||
+ cipher == l_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256)
+ #endif
+ ) {
+ WOLFSSL_MSG("supported cipher suite");
+ }
+ else {
+ WOLFSSL_MSG("unsupported cipher suite");
+ ret = WOLFSSL_FAILURE;;
+ }
+ }
+
+ WOLFSSL_LEAVE("tsip_usable", ret);
+ return ret;
}
-/* open TSIP driver for use */
-int tsip_Open()
+/* open TSIP driver
+ * return 0 on success.
+ */
+WOLFSSL_LOCAL int tsip_Open()
{
- WOLFSSL_MSG(">> tsip_Open");
- int ret;
-
+ int ret = TSIP_SUCCESS;
+
+ WOLFSSL_ENTER("tsip_Open");
+
if ((ret = tsip_hw_lock()) == 0) {
#if defined(WOLFSSL_RENESAS_TSIP_TLS) && (WOLFSSL_RENESAS_TSIP_VER>=109)
- ret = R_TSIP_Open(NULL,NULL);
- if( ret != TSIP_SUCCESS ) {
- WOLFSSL_MSG("RENESAS TSIP Open failed");
- }
-
- if( ret == TSIP_SUCCESS && g_user_key_info.encrypted_user_tls_key ){
-
- ret = R_TSIP_GenerateTlsRsaPublicKeyIndex(
- g_user_key_info.encrypted_provisioning_key,
- g_user_key_info.iv,
- g_user_key_info.encrypted_user_tls_key,
- &g_user_key_info.user_rsa2048_tls_pubindex); /* OUT */
-
- R_TSIP_Close(); /* close once */
-
- if( ret != TSIP_SUCCESS ){
-
- WOLFSSL_MSG("R_TSIP_GenerataeTlsRsa: NG" );
-
- } else {
-
- /* open again with newly created TLS public key index*/
- ret = R_TSIP_Open(
- &g_user_key_info.user_rsa2048_tls_pubindex,
- (tsip_update_key_ring_t*)s_inst2);
-
- if (ret != TSIP_SUCCESS) {
- WOLFSSL_MSG("R_TSIP_(Re)Open: NG");
- }
- /* init vars */
- g_CAscm_Idx = (uint32_t)-1;
+ ret = R_TSIP_Open(NULL,NULL);
+ if ( ret != TSIP_SUCCESS ) {
+ WOLFSSL_MSG("RENESAS TSIP Open failed");
+ }
+
+ if (ret == TSIP_SUCCESS && g_user_key_info.encrypted_user_tls_key) {
+
+ ret = R_TSIP_GenerateTlsRsaPublicKeyIndex(
+ g_user_key_info.encrypted_provisioning_key,
+ g_user_key_info.iv,
+ g_user_key_info.encrypted_user_tls_key,
+ &g_user_key_info.user_rsa2048_tls_pubindex); /* OUT */
+
+ R_TSIP_Close(); /* close once */
+
+ if (ret != TSIP_SUCCESS){
+
+ WOLFSSL_MSG("R_TSIP_GenerataeTlsRsa: NG" );
+
+ }
+ else {
+
+ /* open again with newly created TLS public key index*/
+ ret = R_TSIP_Open(
+ &g_user_key_info.user_rsa2048_tls_pubindex,
+ (tsip_update_key_ring_t*)s_inst2);
+
+ if (ret != TSIP_SUCCESS) {
+ WOLFSSL_MSG("R_TSIP_(Re)Open: NG");
+ }
+ /* init vars */
+ g_CAscm_Idx = (uint32_t)-1;
+ }
}
- }
#elif defined(WOLFSSL_RENESAS_TSIP_TLS) && (WOLFSSL_RENESAS_TSIP_VER>=106)
ret = R_TSIP_Open((uint32_t*)s_flash, s_inst1, s_inst2);
- if( ret != TSIP_SUCCESS ) {
+ if (ret != TSIP_SUCCESS) {
WOLFSSL_MSG("RENESAS TSIP Open failed");
}
@@ -305,7 +650,8 @@ int tsip_Open()
if (ret != TSIP_SUCCESS) {
WOLFSSL_MSG("R_TSIP_GenerateTlsRsaPublicKeyIndex failed");
- } else {
+ }
+ else {
/* close once */
tsip_Close( );
/* open again with s_inst[] */
@@ -322,23 +668,24 @@ int tsip_Open()
}
#else
ret = R_TSIP_Open((uint32_t*)s_flash, s_inst1, s_inst2);
- if( ret != TSIP_SUCCESS ) {
+ if (ret != TSIP_SUCCESS) {
WOLFSSL_MSG("RENESAS TSIP Open failed");
}
#endif
/* unlock hw */
tsip_hw_unlock();
- } else
+ }
+ else
WOLFSSL_MSG("Failed to lock tsip hw ");
- WOLFSSL_MSG( "<< tsip_Open");
+ WOLFSSL_LEAVE( "tsip_Open", ret);
return ret;
}
/* close TSIP driver */
-void tsip_Close()
+WOLFSSL_LOCAL void tsip_Close()
{
- WOLFSSL_MSG(">> tsip_Close");
+ WOLFSSL_ENTER("tsip_Close");
int ret;
if ((ret = tsip_hw_lock()) == 0) {
@@ -349,12 +696,13 @@ void tsip_Close()
#endif
/* unlock hw */
tsip_hw_unlock();
- if( ret != TSIP_SUCCESS ) {
+ if (ret != TSIP_SUCCESS) {
WOLFSSL_MSG("RENESAS TSIP Close failed");
}
- } else
+ }
+ else
WOLFSSL_MSG("Failed to unlock tsip hw ");
- WOLFSSL_MSG("<< tsip_Close");
+ WOLFSSL_LEAVE("tsip_Close", 0);
}
/* Support functions for TSIP TLS Capability */
@@ -374,10 +722,9 @@ void tsip_inform_user_keys_ex(
byte* encrypted_user_tls_key,
word32 encrypted_user_tls_key_type)
{
- WOLFSSL_MSG(">> tsip_inform_user_keys_ex");
+ WOLFSSL_ENTER("tsip_inform_user_keys_ex");
g_user_key_info.encrypted_provisioning_key = NULL;
g_user_key_info.iv = NULL;
- g_user_key_info.encrypted_user_tls_key = NULL;
if ( encrypted_provisioning_key ) {
g_user_key_info.encrypted_provisioning_key = encrypted_provisioning_key;
@@ -390,7 +737,7 @@ void tsip_inform_user_keys_ex(
}
g_user_key_info.encrypted_user_tls_key_type = encrypted_user_tls_key_type;
- WOLFSSL_MSG("<< tsip_inform_user_keys_ex");
+ WOLFSSL_LEAVE("tsip_inform_user_keys_ex", 0);
}
#elif (WOLFSSL_RENESAS_TSIP_VER>=106)
/* inform user key */
@@ -417,40 +764,36 @@ void tsip_inform_user_keys(
}
#endif
-#ifndef NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION
/* Sha1Hmac */
-int tsip_Sha1Hmac(
+int wc_tsip_Sha1HmacGenerate(
const struct WOLFSSL *ssl,
const byte* myInner,
word32 innerSz,
const byte* in,
word32 sz,
- byte* digest,
- word32 verify)
+ byte* digest)
{
- WOLFSSL_MSG(">> tsip_Sha1Hmac()");
+ WOLFSSL_ENTER("wc_tsip_Sha1HmacGenerate()");
tsip_hmac_sha_handle_t _handle;
tsip_hmac_sha_key_index_t key_index;
int ret;
if ((ssl == NULL) || (myInner == NULL) || (in == NULL) ||
- (digest == NULL))
- return BAD_FUNC_ARG;
+ (digest == NULL)){
+ WOLFSSL_LEAVE("wc_tsip_Sha1HmacGenerate", BAD_FUNC_ARG);
+ return BAD_FUNC_ARG;
+ }
if ((ret = tsip_hw_lock()) != 0) {
WOLFSSL_MSG("hw lock failed");
+ WOLFSSL_LEAVE("wc_tsip_Sha1HmacGenerate", ret);
return ret;
}
- if ( (ssl->options.side == WOLFSSL_CLIENT_END && !verify) ||
- (ssl->options.side == WOLFSSL_SERVER_END && verify) )
-
- key_index = ssl->keys.tsip_client_write_MAC_secret;
- else
- key_index = ssl->keys.tsip_server_write_MAC_secret;
+ key_index = ssl->keys.tsip_client_write_MAC_secret;
ret = R_TSIP_Sha1HmacGenerateInit(
&_handle,
@@ -472,24 +815,24 @@ int tsip_Sha1Hmac(
ret = R_TSIP_Sha1HmacGenerateFinal(
&_handle,
digest);
-
-
+
tsip_hw_unlock();
- WOLFSSL_MSG("<< tsip_Sha1Hmac");
+
+ WOLFSSL_LEAVE("wc_tsip_Sha1HmacGenerate", ret);
return ret;
}
+
/* Sha256Hmac */
-int tsip_Sha256Hmac(
+int wc_tsip_Sha256HmacGenerate(
const struct WOLFSSL *ssl,
const byte* myInner,
word32 innerSz,
const byte* in,
word32 sz,
- byte* digest,
- word32 verify)
+ byte* digest)
{
- WOLFSSL_MSG(">> tsip_Sha256Hmac");
+ WOLFSSL_ENTER("wc_tsip_Sha256HmacGenerate");
tsip_hmac_sha_handle_t _handle;
tsip_hmac_sha_key_index_t key_index;
@@ -499,12 +842,7 @@ int tsip_Sha256Hmac(
(digest == NULL))
return BAD_FUNC_ARG;
- if ( (ssl->options.side == WOLFSSL_CLIENT_END && !verify) ||
- (ssl->options.side == WOLFSSL_SERVER_END && verify) )
-
- key_index = ssl->keys.tsip_client_write_MAC_secret;
- else
- key_index = ssl->keys.tsip_server_write_MAC_secret;
+ key_index = ssl->keys.tsip_client_write_MAC_secret;
if ((ret = tsip_hw_lock()) != 0) {
WOLFSSL_MSG("hw lock failed");
@@ -515,42 +853,136 @@ int tsip_Sha256Hmac(
&_handle,
&key_index);
- if (ret == TSIP_SUCCESS)
+ if (ret == TSIP_SUCCESS) {
ret = R_TSIP_Sha256HmacGenerateUpdate(
&_handle,
(uint8_t*)myInner,
innerSz);
-
- if (ret == TSIP_SUCCESS)
+ }
+ else {
+ WOLFSSL_MSG("R_TSIP_Sha256HmacGenerateInit failed");
+ }
+
+ if (ret == TSIP_SUCCESS) {
ret = R_TSIP_Sha256HmacGenerateUpdate(
&_handle,
(uint8_t*)in,
sz);
-
- if (ret == TSIP_SUCCESS)
+ }
+ else {
+ WOLFSSL_MSG("R_TSIP_Sha256HmacGenerateUpdate: inner failed");
+ }
+ if (ret == TSIP_SUCCESS) {
+
ret = R_TSIP_Sha256HmacGenerateFinal(
&_handle,
digest);
+ }
+ else {
+ WOLFSSL_MSG("R_TSIP_Sha256HmacGenerateUpdate: in failed");
+ }
+ if (ret != TSIP_SUCCESS) {
+ WOLFSSL_MSG("R_TSIP_Sha256HmacGenerateFinal failed");
+ ret = 1;
+ }
+ /* unlock hw */
+ tsip_hw_unlock();
+ WOLFSSL_LEAVE("wc_tsip_Sha256HmacGenerate", ret);
+ return ret;
+}
+/*
+ * Perform SHA1 and SHA256 Hmac verification
+ */
+int wc_tsip_ShaXHmacVerify(
+ const struct WOLFSSL *ssl,
+ const byte* message,
+ word32 messageSz,
+ word32 macSz,
+ word32 content)
+{
+ WOLFSSL_ENTER("tsip_ShaXHmacVerify");
+
+ tsip_hmac_sha_handle_t handle;
+ tsip_hmac_sha_key_index_t wrapped_key;
+
+ shaHmacInitFn initFn = NULL;
+ shaHmacUpdateFn updateFn = NULL;
+ shaHmacFinalFn finalFn = NULL;
+
+ byte myInner[WOLFSSL_TLS_HMAC_INNER_SZ];
+ int ret;
+
+ if ((ssl == NULL) || (message == NULL)){
+ WOLFSSL_LEAVE("tsip_ShaXHmacVerify", BAD_FUNC_ARG);
+ return BAD_FUNC_ARG;
+ }
+ wrapped_key = ssl->keys.tsip_server_write_MAC_secret;
+
+ if (wrapped_key.type == TSIP_KEY_INDEX_TYPE_HMAC_SHA1_FOR_TLS) {
+ WOLFSSL_MSG("perform Sha1-Hmac verification");
+ initFn = R_TSIP_Sha1HmacVerifyInit;
+ updateFn = R_TSIP_Sha1HmacVerifyUpdate;
+ finalFn = R_TSIP_Sha1HmacVerifyFinal;
+ }
+ else if (wrapped_key.type == TSIP_KEY_INDEX_TYPE_HMAC_SHA256_FOR_TLS) {
+ WOLFSSL_MSG("perform Sha256-Hmac verification");
+ initFn = R_TSIP_Sha256HmacVerifyInit;
+ updateFn = R_TSIP_Sha256HmacVerifyUpdate;
+ finalFn = R_TSIP_Sha256HmacVerifyFinal;
+ }
+ else {
+ WOLFSSL_MSG("unsupported key type");
+ WOLFSSL_LEAVE("tsip_ShaXHmacVerify", BAD_FUNC_ARG);
+ return BAD_FUNC_ARG;
+ }
+
+ if ((ret = tsip_hw_lock()) != 0) {
+ WOLFSSL_MSG("hw lock failed\n");
+ WOLFSSL_LEAVE("tsip_ShaXHmacVerify", ret);
+ return ret;
+ }
+
+ wolfSSL_SetTlsHmacInner((struct WOLFSSL*)ssl, (byte*)myInner,
+ messageSz, content, 1);
+
+ ret = initFn(&handle, &wrapped_key);
+
+ if (ret == TSIP_SUCCESS) {
+ ret = updateFn(&handle, myInner, WOLFSSL_TLS_HMAC_INNER_SZ);
+ }
+ if (ret == TSIP_SUCCESS) {
+ ret = updateFn(&handle, (uint8_t*)message, (uint32_t)messageSz);
+ }
+ if (ret == TSIP_SUCCESS) {
+ ret = finalFn(&handle, (uint8_t*)(message + messageSz), (uint32_t)macSz);
+ }
+ if (ret != TSIP_SUCCESS) {
+ WOLFSSL_MSG("TSIP Mac verification failed");
+ }
/* unlock hw */
tsip_hw_unlock();
- WOLFSSL_MSG("<< tsip_Sha256Hmac");
+ WOLFSSL_LEAVE("tsip_ShaXHmacVerify", ret);
return ret;
}
/* generate Verify Data based on master secret */
-int tsip_generateVerifyData(const byte *ms, /* master secret */
- const byte *side, const byte *handshake_hash,
- byte *hashes /* out */)
+int wc_tsip_generateVerifyData(
+ const byte* ms, /* master secret */
+ const byte* side, /* 0:client-side 1:server-side */
+ const byte* handshake_hash,
+ byte* hashes) /* out */
{
- WOLFSSL_MSG(">> tsip_generateVerifyData");
int ret ;
uint32_t l_side = R_TSIP_TLS_GENERATE_CLIENT_VERIFY;
+
+ WOLFSSL_ENTER("tsip_generateVerifyData");
if ((ms == NULL) || (side == NULL) || (handshake_hash == NULL) ||
- (hashes == NULL))
- return BAD_FUNC_ARG;
-
+ (hashes == NULL)) {
+ WOLFSSL_LEAVE("tsip_generateVerifyData", BAD_FUNC_ARG);
+ return BAD_FUNC_ARG;
+ }
if (XSTRNCMP((const char*)side, (const char*)tls_server, FINISHED_LABEL_SZ)
== 0)
{
@@ -566,14 +998,16 @@ int tsip_generateVerifyData(const byte *ms, /* master secret */
}
/* unlock hw */
tsip_hw_unlock();
- WOLFSSL_MSG("<< tsip_generateVerifyData");
+ WOLFSSL_LEAVE("tsip_generateVerifyData", ret);
return ret;
}
/* generate keys for TLS communication */
-int tsip_generateSeesionKey(struct WOLFSSL *ssl)
+int wc_tsip_generateSessionKey(
+ struct WOLFSSL *ssl,
+ TsipUserCtx* ctx,
+ int devId)
{
- WOLFSSL_MSG(">> tsip_generateSeesionKey()");
int ret;
Ciphers *enc;
Ciphers *dec;
@@ -581,6 +1015,8 @@ int tsip_generateSeesionKey(struct WOLFSSL *ssl)
tsip_hmac_sha_key_index_t key_server_mac;
tsip_aes_key_index_t key_client_aes;
tsip_aes_key_index_t key_server_aes;
+
+ WOLFSSL_ENTER("wc_tsip_generateSessionKey()");
if (ssl== NULL)
return BAD_FUNC_ARG;
@@ -589,24 +1025,35 @@ int tsip_generateSeesionKey(struct WOLFSSL *ssl)
#if (WOLFSSL_RENESAS_TSIP_VER>=109)
- uint8_t nonce[TSIP_SESSIONKEY_NONCE_SIZE] = {0};
- wc_RNG_GenerateBlock(ssl->rng, nonce,TSIP_SESSIONKEY_NONCE_SIZE);
+ uint32_t tsipCS = GetTsipCipherSuite(ssl->options.cipherSuite0,
+ ssl->options.cipherSuite);
- ret = R_TSIP_TlsGenerateSessionKey(
- GetTsipCipherSuite(
- ssl->options.cipherSuite0,
- ssl->options.cipherSuite),
+ if (tsipCS == R_TSIP_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ||
+ tsipCS == R_TSIP_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) {
+ WOLFSSL_MSG("Session key for AES-GCM generation skipped.");
+
+ /* Do not release ssl-> arrays to reference the master secret and
+ * randoms, as the AES GCM session key will be generated in
+ * encryption or decription timing.
+ */
+ wolfSSL_KeepArrays(ssl);
+ ret = TSIP_SUCCESS;
+ }
+ else {
+
+ ret = R_TSIP_TlsGenerateSessionKey(
+ tsipCS,
(uint32_t*)ssl->arrays->tsip_masterSecret,
(uint8_t*) ssl->arrays->clientRandom,
(uint8_t*) ssl->arrays->serverRandom,
- nonce,
+ NULL, /* nonce is required only for AES-GCM key */
&key_client_mac,
&key_server_mac,
&key_client_aes,
&key_server_aes,
NULL, NULL);
-
-#elif (WOLFSSL_RENESAS_TSIP_VER>=106)
+ }
+#else /* WOLFSSL_RENESAS_TSIP_VER < 109 */
ret = R_TSIP_TlsGenerateSessionKey(
_tls2tsipdef(ssl->options.cipherSuite),
@@ -621,7 +1068,8 @@ int tsip_generateSeesionKey(struct WOLFSSL *ssl)
#endif
if (ret != TSIP_SUCCESS) {
WOLFSSL_MSG("R_TSIP_TlsGenerateSessionKey failed");
- } else {
+ }
+ else {
/* succeeded creating session keys */
/* alloc aes instance for both enc and dec */
enc = &ssl->encrypt;
@@ -651,49 +1099,69 @@ int tsip_generateSeesionKey(struct WOLFSSL *ssl)
XMEMSET(dec->aes, 0, sizeof(Aes));
}
+
/* copy key index into aes */
if (ssl->options.side == PROVISION_CLIENT) {
XMEMCPY(&enc->aes->ctx.tsip_keyIdx, &key_client_aes,
sizeof(key_client_aes));
XMEMCPY(&dec->aes->ctx.tsip_keyIdx, &key_server_aes,
sizeof(key_server_aes));
- } else {
+ }
+ else {
XMEMCPY(&enc->aes->ctx.tsip_keyIdx, &key_server_aes,
sizeof(key_server_aes));
XMEMCPY(&dec->aes->ctx.tsip_keyIdx, &key_client_aes,
sizeof(key_client_aes));
}
- /* copy hac key index into keys */
-
+ /* copy hac key index into keys */
ssl->keys.tsip_client_write_MAC_secret = key_client_mac;
ssl->keys.tsip_server_write_MAC_secret = key_server_mac;
-
- /* set up key size and marked readly */
+
+ /* set up key size and marked ready */
if (enc){
enc->aes->ctx.keySize = ssl->specs.key_size;
+ enc->aes->ctx.setup = 1;
/* ready for use */
enc->setup = 1;
}
- /* set up key size and marked readly */
+ /* set up key size and marked ready */
if (dec) {
dec->aes->ctx.keySize = ssl->specs.key_size;
+ dec->aes->ctx.setup = 1;
/* ready for use */
dec->setup = 1;
}
+
+ if (ctx->tsip_cipher ==
+ R_TSIP_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 ||
+ ctx->tsip_cipher ==
+ R_TSIP_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256) {
+ enc->aes->nonceSz = AEAD_MAX_IMP_SZ;
+ dec->aes->nonceSz = AEAD_MAX_IMP_SZ;
+ }
+
+ enc->aes->devId = devId;
+ dec->aes->devId = devId;
+
+ ctx->session_key_set = 1;
}
/* unlock hw */
tsip_hw_unlock();
- } else
+ }
+ else
WOLFSSL_MSG("hw lock failed");
- WOLFSSL_MSG("<< tsip_generateSeesionKey");
+ WOLFSSL_LEAVE("wc_tsip_generateSessionKey", ret);
return ret;
}
+
+
+
/* generate Master secrete by TSIP */
#if (WOLFSSL_RENESAS_TSIP_VER>=109)
-int tsip_generateMasterSecretEx(
+int wc_tsip_generateMasterSecretEx(
byte cipherSuiteFirst,
byte cipherSuite,
const byte *pr, /* pre-master */
@@ -701,15 +1169,16 @@ int tsip_generateMasterSecretEx(
const byte *sr, /* server random */
byte *ms)
{
- WOLFSSL_MSG(">> tsip_generateMasterSecretEx");
int ret;
+
+ WOLFSSL_ENTER("tsip_generateMasterSecretEx");
if ((pr == NULL) || (cr == NULL) || (sr == NULL) ||
(ms == NULL))
return BAD_FUNC_ARG;
uint32_t tsipCS = GetTsipCipherSuite(cipherSuiteFirst,cipherSuite );
- if( tsipCS == 0xffffffff)
+ if (tsipCS == 0xffffffff)
return BAD_FUNC_ARG;
if ((ret = tsip_hw_lock()) == 0) {
@@ -722,23 +1191,24 @@ int tsip_generateMasterSecretEx(
}
/* unlock hw */
tsip_hw_unlock();
- } else {
+ }
+ else {
WOLFSSL_MSG(" hw lock failed ");
}
- WOLFSSL_MSG("<< tsip_generateMasterSecretEx");
+ WOLFSSL_LEAVE("tsip_generateMasterSecretEx", ret);
return ret;
}
-#elif (WOLFSSL_RENESAS_TSIP_VER>=106)
+#else /* WOLFSSL_RENESAS_TSIP_VER < 109 */
-int tsip_generateMasterSecret(
+int wc_tsip_generateMasterSecret(
const byte* pr, /* pre-master */
const byte* cr, /* client random */
const byte* sr, /* server random */
byte* ms)
{
int ret;
-
+ WOLFSSL_ENTER("tsip_generateMasterSecret");
if ((pr == NULL) || (cr == NULL) || (sr == NULL) ||
(ms == NULL))
return BAD_FUNC_ARG;
@@ -755,17 +1225,46 @@ int tsip_generateMasterSecret(
}
/* unlock hw */
tsip_hw_unlock();
- } else {
+ }
+ else {
WOLFSSL_MSG(" hw lock failed ");
}
-
+ WOLFSSL_LEAVE("tsip_generateMasterSecret", ret);
return ret;
}
-#endif
-/* generate pre-Master secrete by TSIP */
-int tsip_generatePremasterSecret(byte *premaster, word32 preSz )
+#endif /* WOLFSSL_RENESAS_TSIP_VER */
+
+/* store elements for session key generation into ssl->keys.
+ * return 0 on success, negative value on failure
+ */
+int wc_tsip_storeKeyCtx(struct WOLFSSL* ssl, TsipUserCtx* userCtx)
{
- WOLFSSL_MSG(">> tsip_generatePremasterSecret");
+ int ret = 0;
+
+ WOLFSSL_ENTER("tsip_storeKeyCtx");
+
+ if (ssl == NULL || userCtx == NULL)
+ ret = BAD_FUNC_ARG;
+
+ if (ret == 0) {
+ XMEMCPY(userCtx->tsip_masterSecret, ssl->arrays->tsip_masterSecret,
+ TSIP_TLS_MASTERSECRET_SIZE);
+ XMEMCPY(userCtx->tsip_clientRandom, ssl->arrays->clientRandom,
+ TSIP_TLS_CLIENTRANDOM_SZ);
+ XMEMCPY(userCtx->tsip_serverRandom, ssl->arrays->serverRandom,
+ TSIP_TLS_SERVERRANDOM_SZ);
+ userCtx->tsip_cipher = GetTsipCipherSuite(ssl->options.cipherSuite0,
+ ssl->options.cipherSuite);
+ }
+
+ WOLFSSL_LEAVE("tsip_storeKeyCtx", ret);
+ return ret;
+}
+
+/* generate pre-Master secrete by TSIP */
+int wc_tsip_generatePremasterSecret(byte *premaster, word32 preSz )
+{
+ WOLFSSL_ENTER("tsip_generatePremasterSecret");
int ret;
if (premaster == NULL)
@@ -781,23 +1280,25 @@ int tsip_generatePremasterSecret(byte *premaster, word32 preSz )
/* unlock hw */
tsip_hw_unlock();
- } else {
+ }
+ else {
WOLFSSL_MSG(" hw lock failed or preSz is smaller than 80");
}
- WOLFSSL_MSG("<< tsip_generatePremasterSecret");
+ WOLFSSL_LEAVE("tsip_generatePremasterSecret", ret);
return ret;
}
/*
* generate encrypted pre-Master secrete by TSIP
*/
-int tsip_generateEncryptPreMasterSecret(
+int wc_tsip_generateEncryptPreMasterSecret(
WOLFSSL* ssl,
byte* out,
word32* outSz)
{
- WOLFSSL_MSG(">> tsip_generateEncryptPreMasterSecret");
int ret;
+
+ WOLFSSL_ENTER("tsip_generateEncryptPreMasterSecret");
if ((ssl == NULL) || (out == NULL) || (outSz == NULL))
return BAD_FUNC_ARG;
@@ -809,14 +1310,14 @@ int tsip_generateEncryptPreMasterSecret(
ret = R_TSIP_TlsEncryptPreMasterSecretWithRsa2048PublicKey(
(uint32_t*)ssl->peerSceTsipEncRsaKeyIndex,
- (uint32_t*)&ssl->arrays->preMasterSecret[VERSION_SZ],
+ (uint32_t*)ssl->arrays->preMasterSecret,
(uint8_t*)out);
- #elif (WOLFSSL_RENESAS_TSIP_VER>=106)
+ #else
ret = R_TSIP_TlsEncryptPreMasterSecret(
(uint32_t*)ssl->peerSceTsipEncRsaKeyIndex,
- (uint32_t*)&ssl->arrays->preMasterSecret[VERSION_SZ],
+ (uint32_t*)ssl->arrays->preMasterSecret,
(uint8_t*)out);
#endif
@@ -825,31 +1326,42 @@ int tsip_generateEncryptPreMasterSecret(
if (ret != TSIP_SUCCESS) {
WOLFSSL_MSG(" R_TSIP_TlsEncryptPreMasterSecret failed");
- } else {
+ }
+ else {
*outSz = 256; /* TSIP can only handles 2048 RSA */
+ void* ctx = wolfSSL_GetRsaVerifyCtx(ssl);
+ wolfSSL_CTX_SetGenMasterSecretCb(ssl->ctx,
+ Renesas_cmn_genMasterSecret);
+ wolfSSL_SetGenMasterSecretCtx(ssl, ctx);
}
tsip_hw_unlock();
- } else {
+ }
+ else {
WOLFSSL_MSG(" hw lock failed ");
}
- WOLFSSL_MSG("<< tsip_generateEncryptPreMasterSecret");
+ WOLFSSL_LEAVE("tsip_generateEncryptPreMasterSecret", ret);
return ret;
}
-#endif /* NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION */
+
/* Certificate verification by TSIP */
-int tsip_tls_CertVerify(
- const byte* cert, word32 certSz,
- const byte* signature, word32 sigSz,
- word32 key_n_start,word32 key_n_len,
- word32 key_e_start,word32 key_e_len,
- byte* tsip_encRsaKeyIndex)
+int wc_tsip_tls_CertVerify(
+ const uint8_t* cert, uint32_t certSz,
+ const uint8_t* signature, uint32_t sigSz,
+ uint32_t key_n_start, uint32_t key_n_len,
+ uint32_t key_e_start, uint32_t key_e_len,
+ uint8_t* tsip_encRsaKeyIndex)
{
- WOLFSSL_MSG(">> tsip_tls_CertVerify");
int ret;
-
+ uint8_t *sigforSCE;
+ uint8_t *pSig;
+ const byte rs_size = 0x20;
+ byte offset = 0x3;
+
+ WOLFSSL_ENTER("wc_tsip_tls_CertVerify");
+
if (cert == NULL)
return BAD_FUNC_ARG;
@@ -862,6 +1374,47 @@ int tsip_tls_CertVerify(
return -1;
}
+ /* Public key type: Prime256r1 */
+ if (g_user_key_info.encrypted_user_tls_key_type ==
+ R_TSIP_TLS_PUBLIC_KEY_TYPE_ECDSA_P256) {
+
+ if ((sigforSCE = (uint8_t*)XMALLOC(R_TSIP_ECDSA_DATA_BYTE_SIZE,
+ NULL, DYNAMIC_TYPE_ECC)) == NULL) {
+ WOLFSSL_MSG("failed to malloc memory");
+ return MEMORY_E;
+ }
+ /* initialization */
+ XMEMCPY(sigforSCE, 0, R_TSIP_ECDSA_DATA_BYTE_SIZE);
+
+ if (signature[offset] == 0x20) {
+ XMEMCPY(sigforSCE, &signature[offset+1], rs_size);
+
+ offset = 0x25;
+ if (signature[offset] == 0x20) {
+ XMEMCPY(&sigforSCE[rs_size], &signature[offset+1], rs_size);
+ }
+ else {
+ XMEMCPY(&sigforSCE[rs_size], &signature[offset+2], rs_size);
+ }
+ }
+ else {
+ XMEMCPY(sigforSCE, &signature[offset+2], rs_size);
+ offset = 0x26;
+
+ if (signature[offset] == rs_size) {
+ XMEMCPY(&sigforSCE[rs_size], &signature[offset+1], rs_size);
+ }
+ else {
+ XMEMCPY(&sigforSCE[rs_size], &signature[offset+2], rs_size);
+ }
+ }
+ pSig = sigforSCE;
+ }
+ /* Public key type: RSA 2048bit */
+ else {
+ pSig = (uint8_t*)signature;
+ }
+
if ((ret = tsip_hw_lock()) == 0) {
#if (WOLFSSL_RENESAS_TSIP_VER>=109)
@@ -871,7 +1424,7 @@ int tsip_tls_CertVerify(
(uint32_t*)g_encrypted_publicCA_key,/* encrypted public key */
(uint8_t*)cert, /* certificate der */
certSz, /* length of der */
- (uint8_t*)signature, /* sign data by RSA PSS */
+ (uint8_t*)pSig, /* sign data by RSA PSS */
key_n_start, /* start position of public key n in bytes */
(key_n_start + key_n_len), /* length of the public key n */
key_e_start, /* start pos, key e in bytes */
@@ -885,7 +1438,7 @@ int tsip_tls_CertVerify(
(uint32_t*)g_encrypted_publicCA_key,/* encrypted public key */
(uint8_t*)cert, /* certificate der */
certSz, /* length of der */
- (uint8_t*)signature, /* sign data by RSA PSS */
+ (uint8_t*)pSig, /* sign data by RSA PSS */
key_n_start, /* start position of public key n in bytes */
(key_n_start + key_n_len), /* length of the public key n */
key_e_start, /* start pos, key e in bytes */
@@ -897,24 +1450,29 @@ int tsip_tls_CertVerify(
if (ret != TSIP_SUCCESS) {
WOLFSSL_MSG(" R_TSIP_TlsCertificateVerification() failed");
}
+ if (sigforSCE) {
+ XFREE(sigforSCE, NULL, DYNAMIC_TYPE_ECC);
+ }
tsip_hw_unlock();
- } else {
+ }
+ else {
WOLFSSL_MSG(" hw lock failed ");
}
- WOLFSSL_MSG("<< tsip_tls_CertVerify");
+ WOLFSSL_LEAVE("wc_tsip_tls_CertVerify", ret);
return ret;
}
/* Root Certificate verification */
-int tsip_tls_RootCertVerify(
+int wc_tsip_tls_RootCertVerify(
const byte* cert, word32 cert_len,
word32 key_n_start, word32 key_n_len,
word32 key_e_start, word32 key_e_len,
word32 cm_row)
{
- WOLFSSL_MSG(">> tsip_tls_RootCertVerify");
int ret;
/* call to generate encrypted public key for certificate verification */
uint8_t *signature = (uint8_t*)ca_cert_sig;
+
+ WOLFSSL_ENTER("wc_tsip_tls_RootCertVerify");
if (cert == NULL)
return BAD_FUNC_ARG;
@@ -939,7 +1497,7 @@ int tsip_tls_RootCertVerify(
(uint8_t*)ca_cert_sig, /* "RSA 2048 PSS with SHA256" */
g_encrypted_publicCA_key); /* RSA-2048 public key 560 bytes */
- #elif (WOLFSSL_RENESAS_TSIP_VER>=106)
+ #else /* WOLFSSL_RENESAS_TSIP_VER < 109 */
ret = R_TSIP_TlsRootCertificateVerification(
(uint8_t*)cert,/* CA cert */
@@ -956,16 +1514,18 @@ int tsip_tls_RootCertVerify(
#endif
if (ret != TSIP_SUCCESS) {
- WOLFSSL_MSG(" R_TSIP_TlsRootCertVerify() failed");
- } else {
+ WOLFSSL_MSG(" R_TSIP_TlsRootCertificateVerification() failed");
+ }
+ else {
g_CAscm_Idx = cm_row;
}
tsip_hw_unlock();
- } else {
+ }
+ else {
WOLFSSL_MSG(" hw lock failed ");
}
- WOLFSSL_MSG("<< tsip_tls_RootCertVerify");
+ WOLFSSL_LEAVE("wc_tsip_tls_RootCertVerify", ret);
return ret;
}
#endif /* WOLFSSL_RENESAS_TSIP_TLS */
diff --git a/wolfcrypt/src/sha256.c b/wolfcrypt/src/sha256.c
index a3890dba3..f2de00fa4 100644
--- a/wolfcrypt/src/sha256.c
+++ b/wolfcrypt/src/sha256.c
@@ -1647,7 +1647,7 @@ void wc_Sha256Free(wc_Sha256* sha256)
#if (defined(WOLFSSL_AFALG_HASH) && defined(WOLFSSL_AFALG_HASH_KEEP)) || \
(defined(WOLFSSL_DEVCRYPTO_HASH) && defined(WOLFSSL_DEVCRYPTO_HASH_KEEP)) || \
(defined(WOLFSSL_RENESAS_TSIP_CRYPT) && \
- !defined(NO_WOLFSSL_RENESAS_TSIP_CRYPT_HASH)) && \
+ !defined(NO_WOLFSSL_RENESAS_TSIP_CRYPT_HASH)) || \
(defined(WOLFSSL_RENESAS_SCEPROTECT) && \
!defined(NO_WOLFSSL_RENESAS_SCEPROTECT_HASH))
diff --git a/wolfcrypt/src/wc_port.c b/wolfcrypt/src/wc_port.c
index ec618dc93..3a2b99f4d 100644
--- a/wolfcrypt/src/wc_port.c
+++ b/wolfcrypt/src/wc_port.c
@@ -367,6 +367,10 @@ int wolfCrypt_Cleanup(void)
wolfAsync_HardwareStop();
#endif
+ #ifdef WOLFSSL_RENESAS_TSIP
+ tsip_Close();
+ #endif
+
#ifdef WOLFSSL_RENESAS_SCEPROTECT
wc_sce_Close();
#endif
diff --git a/wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h b/wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h
index a05d62e5d..40d0428f8 100644
--- a/wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h
+++ b/wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h
@@ -176,12 +176,21 @@ WOLFSSL_LOCAL int wc_sce_Sha256VerifyHmac(
uint32_t macSz,
uint32_t content);
-WOLFSSL_LOCAL int wc_sce_storeKeyCtx(struct WOLFSSL* ssl, User_SCEPKCbInfo* info);
-WOLFSSL_LOCAL int wc_sce_generateVerifyData(const uint8_t *ms, /* master secret */
- const uint8_t *side, const uint8_t *handshake_hash,
- uint8_t *hashes /* out */);
-WOLFSSL_LOCAL int wc_sce_generateSeesionKey(struct WOLFSSL *ssl, User_SCEPKCbInfo* cbInfo,
- int devId);
+WOLFSSL_LOCAL int wc_sce_storeKeyCtx(
+ struct WOLFSSL* ssl,
+ User_SCEPKCbInfo* info);
+
+WOLFSSL_LOCAL int wc_sce_generateVerifyData(
+ const uint8_t* ms, /* master secret */
+ const uint8_t* side,
+ const uint8_t* handshake_hash,
+ uint8_t* hashes /* out */);
+
+WOLFSSL_LOCAL int wc_sce_generateSessionKey(
+ struct WOLFSSL* ssl,
+ User_SCEPKCbInfo* cbInfo,
+ int devId);
+
WOLFSSL_LOCAL int wc_sce_generateMasterSecret(
uint8_t cipherSuiteFirst,
uint8_t cipherSuite,
diff --git a/wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h b/wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h
index 7902b002d..678c08162 100644
--- a/wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h
+++ b/wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h
@@ -21,6 +21,8 @@
#ifndef __RENESAS_TSIP_CRYPT_H__
#define __RENESAS_TSIP_CRYPT_H__
+#if !defined(WOLFCRYPT_ONLY)
+
#if defined(WOLFSSL_RENESAS_TSIP_IAREWRX)
#include "r_bsp/mcu/all/r_rx_compiler.h"
#include "r_bsp/platform.h"
@@ -37,6 +39,9 @@ extern "C" {
#define TSIP_SESSIONKEY_NONCE_SIZE 8
+#define tsip_Sha256HmacVerify tsip_ShaXHmacVerify /* for backward compat */
+#define sce_tsip_checkCA tsip_checkCA
+
typedef enum {
WOLFSSL_TSIP_NOERROR = 0,
WOLFSSL_TSIP_ILLEGAL_CIPHERSUITE = 0xffffffff,
@@ -53,124 +58,23 @@ typedef enum {
} wolfssl_TSIP_KEY_IV;
enum {
- l_TLS_RSA_WITH_AES_128_CBC_SHA = 0x2F,
- l_TLS_RSA_WITH_AES_128_CBC_SHA256 = 0x3c,
- l_TLS_RSA_WITH_AES_256_CBC_SHA = 0x35,
- l_TLS_RSA_WITH_AES_256_CBC_SHA256 = 0x3d,
+ l_TLS_RSA_WITH_AES_128_CBC_SHA = 0x2F,
+ l_TLS_RSA_WITH_AES_128_CBC_SHA256 = 0x3c,
+ l_TLS_RSA_WITH_AES_256_CBC_SHA = 0x35,
+ l_TLS_RSA_WITH_AES_256_CBC_SHA256 = 0x3d,
+ l_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = 0x23,
+ l_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = 0x27,
+ l_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0x2b,
+ l_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0x2f,
};
-#if defined(WOLFSSL_RENESAS_TSIP_TLS) && (WOLFSSL_RENESAS_TSIP_VER >=109)
+enum {
+ ENCRYPTED_ECDHE_PUBKEY_SZ = 96,
+ ECCP256_PUBKEY_SZ = 64,
+ TSIP_TLS_CLIENTRANDOM_SZ = 32,
+ TSIP_TLS_SERVERRANDOM_SZ = 32,
+};
-typedef struct
-{
- uint8_t *encrypted_provisioning_key;
- uint8_t *iv;
- uint8_t *encrypted_user_tls_key;
- uint32_t encrypted_user_tls_key_type;
- tsip_tls_ca_certification_public_key_index_t user_rsa2048_tls_pubindex;
-} tsip_key_data;
-
-void tsip_inform_user_keys_ex(
- byte* provisioning_key, /* key got from DLM server */
- byte* iv, /* iv used for public key */
- byte* encrypted_public_key,/*RSA2048 or ECDSAp256 public key*/
- word32 public_key_type); /* 0: RSA-2048 2:ECDSA P-256 */
-
-int tsip_generateMasterSecretEx(
- byte cipherSuiteFirst,
- byte cipherSuite,
- const byte* pr, /* pre-master */
- const byte* cr, /* client random */
- const byte* sr, /* server random */
- byte* ms);
-
-
-#elif defined(WOLFSSL_RENESAS_TSIP_TLS) && (WOLFSSL_RENESAS_TSIP_VER >=106)
-
-typedef struct
-{
- uint8_t *encrypted_session_key;
- uint8_t *iv;
- uint8_t *encrypted_user_tls_key;
- tsip_tls_ca_certification_public_key_index_t user_rsa2048_tls_pubindex;
-} tsip_key_data;
-
-void tsip_inform_user_keys(byte *encrypted_session_key, byte *iv,
- byte *encrypted_user_tls_key);
-int tsip_generateMasterSecret(const byte *pre, const byte *cr,const byte *sr,
- byte *ms);
-#endif
-
-struct WOLFSSL;
-
-int tsip_Open();
-
-void tsip_Close();
-
-int tsip_hw_lock();
-
-void tsip_hw_unlock( void );
-
-int tsip_usable(const struct WOLFSSL *ssl);
-
-void tsip_inform_sflash_signedcacert(
- const byte* ps_flash,
- const byte* psigned_ca_cert,
- word32 len);
-void tsip_inform_cert_sign(const byte *sign);
-
-byte tsip_rootCAverified();
-
-byte tsip_checkCA(word32 cmIdx);
-
-int tsip_tls_RootCertVerify(
- const byte* cert, word32 cert_len,
- word32 key_n_start, word32 key_n_len,
- word32 key_e_start, word32 key_e_len,
- word32 cm_row);
-
-int tsip_tls_CertVerify(
- const byte* cert, word32 certSz,
- const byte* signature, word32 sigSz,
- word32 key_n_start, word32 key_n_len,
- word32 key_e_start, word32 key_e_len,
- byte* tsip_encRsaKeyIdx);
-
-void tsip_inform_key_position(
- const word32 key_n_start,
- const word32 key_n_len,
- const word32 key_e_start,
- const word32 key_e_len);
-
-int tsip_generatePremasterSecret(
- byte* premaster,
- word32 preSz);
-
-int tsip_generateEncryptPreMasterSecret(
- struct WOLFSSL* ssl,
- byte* out,
- word32* outSz);
-
-int tsip_generateSeesionKey(struct WOLFSSL *ssl);
-
-int tsip_Sha256Hmac(
- const struct WOLFSSL *ssl,
- const byte* myInner,
- word32 innerSz,
- const byte* in,
- word32 sz,
- byte* digest,
- word32 verify);
-
-int tsip_Sha1Hmac(
- const struct WOLFSSL *ssl,
- const byte* myInner,
- word32 innerSz,
- const byte* in,
- word32 sz,
- byte* digest,
- word32 verify);
-
#if (!defined(NO_SHA) || !defined(NO_SHA256)) && \
!defined(NO_WOLFSSL_RENESAS_TSIP_CRYPT_HASH)
@@ -185,6 +89,10 @@ typedef struct {
word32 used;
word32 len;
word32 sha_type;
+#if defined(WOLF_CRYPTO_CB)
+ word32 flags;
+ int devId;
+#endif
} wolfssl_TSIP_Hash;
/* RAW hash function APIs are not implemented with TSIP */
@@ -202,15 +110,273 @@ typedef wolfssl_TSIP_Hash wc_Sha;
typedef struct {
tsip_aes_key_index_t tsip_keyIdx;
word32 keySize;
+ byte setup;
} TSIP_AES_CTX;
+#endif
+
+
+
+/*
+ * structure for ECDH key exchange
+ */
+typedef struct TsipUserCtx {
- struct Aes;
- int wc_tsip_AesCbcEncrypt(struct Aes* aes, byte* out, const byte* in,
- word32 sz);
- int wc_tsip_AesCbcDecrypt(struct Aes* aes, byte* out, const byte* in,
- word32 sz);
+ uint32_t user_key_id;
+
+#if (WOLFSSL_RENESAS_TSIP_VER >=109)
+ /* out from R_SCE_TLS_ServerKeyExchangeVerify */
+ uint32_t encrypted_ephemeral_ecdh_public_key[ENCRYPTED_ECDHE_PUBKEY_SZ];
-#endif /* WOLFSSL_RENESAS_TSIP_TLS_AES */
+ /* ephemeral ECDH pubkey index
+ * got from R_TSIP_GenerateTlsP256EccKeyIndex.
+ * Input to R_TSIP_TlsGeneratePreMasterSecretWithEccP256Key.
+ */
+ tsip_tls_p256_ecc_key_index_t ecc_p256_wrapped_key;
+
+ /* ephemeral ECDH pub-key Qx(256bit)||Qy(256bit)
+ * got from R_TSIP_GenerateTlsP256EccKeyIndex.
+ * Should be sent to peer(server) in Client Key Exchange msg.
+ */
+ uint8_t ecc_ecdh_public_key[ECCP256_PUBKEY_SZ];
+#endif /* WOLFSSL_RENESAS_TSIP_VER >=109 */
+
+ /* info to generate session key */
+ uint32_t tsip_masterSecret[TSIP_TLS_MASTERSECRET_SIZE/4];
+ uint8_t tsip_clientRandom[TSIP_TLS_CLIENTRANDOM_SZ];
+ uint8_t tsip_serverRandom[TSIP_TLS_SERVERRANDOM_SZ];
+
+ /* TSIP defined cipher suite number */
+ uint32_t tsip_cipher;
+
+ /* flags */
+ uint8_t pk_key_set:1;
+ uint8_t session_key_set:1;
+
+
+} TsipUserCtx;
+
+typedef TsipUserCtx user_PKCbInfo;
+
+typedef struct
+{
+ TsipUserCtx* userCtx;
+} TsipPKCbInfo;
+
+
+#if (WOLFSSL_RENESAS_TSIP_VER >=109)
+
+typedef struct
+{
+ uint8_t * encrypted_provisioning_key;
+ uint8_t * iv;
+ uint8_t * encrypted_user_tls_key;
+ uint32_t encrypted_user_tls_key_type;
+ tsip_tls_ca_certification_public_key_index_t user_rsa2048_tls_pubindex;
+} tsip_key_data;
+
+#else
+typedef struct
+{
+ uint8_t* encrypted_session_key;
+ uint8_t* iv;
+ uint8_t* encrypted_user_tls_key;
+ tsip_tls_ca_certification_public_key_index_t user_rsa2048_tls_pubindex;
+} tsip_key_data;
+
+#endif
+
+struct Aes;
+struct WOLFSSL;
+/*----------------------------------------------------*/
+/* APIs */
+/*----------------------------------------------------*/
+
+WOLFSSL_API void tsip_inform_cert_sign(const byte *sign);
+
+WOLFSSL_API void tsip_set_callbacks(struct WOLFSSL_CTX* ctx);
+
+WOLFSSL_API int tsip_set_callback_ctx(struct WOLFSSL* ssl, void* user_ctx);
+
+
+
+#if (WOLFSSL_RENESAS_TSIP_VER >=109)
+
+#define wc_tsip_inform_user_keys_ex tsip_inform_user_keys_ex
+WOLFSSL_API void tsip_inform_user_keys_ex(
+ byte* provisioning_key, /* key got from DLM server */
+ byte* iv, /* iv used for public key */
+ byte* encrypted_public_key,/*RSA2048 or ECDSAp256 public key*/
+ word32 public_key_type); /* 0: RSA-2048 2:ECDSA P-256 */
+
+#else
+
+WOLFSSL_API void tsip_inform_user_keys(
+ byte* encrypted_session_key,
+ byte* iv,
+ byte* encrypted_user_tls_key);
+
+#endif
+
+
+/*----------------------------------------------------*/
+/* internal use functions */
+/*----------------------------------------------------*/
+
+
+#if (WOLFSSL_RENESAS_TSIP_VER >=109)
+
+WOLFSSL_LOCAL int wc_tsip_generateMasterSecretEx(
+ byte cipherSuiteFirst,
+ byte cipherSuite,
+ const byte* pr, /* pre-master */
+ const byte* cr, /* client random */
+ const byte* sr, /* server random */
+ byte* ms);
+
+#else
+
+WOLFSSL_LOCAL int wc_tsip_generateMasterSecret(
+ const byte *pre,
+ const byte *cr,
+ const byte *sr,
+ byte *ms);
+
+#endif
+
+
+WOLFSSL_LOCAL int wc_tsip_storeKeyCtx(
+ struct WOLFSSL *ssl,
+ TsipUserCtx *userCtx);
+
+WOLFSSL_LOCAL int wc_tsip_generateEncryptPreMasterSecret(
+ struct WOLFSSL* ssl,
+ byte* out,
+ word32* outSz);
+
+WOLFSSL_LOCAL int wc_tsip_EccSharedSecret(
+ struct WOLFSSL* ssl,
+ struct ecc_key* otherKey,
+ unsigned char* pubKeyDer, unsigned int* pubKeySz,
+ unsigned char* out, unsigned int* outlen,
+ int side, void* ctx);
+
+WOLFSSL_LOCAL int wc_tsip_RsaVerify(
+ struct WOLFSSL* ssl,
+ byte* sig,
+ word32 sigSz,
+ byte** out,
+ const byte* key,
+ word32 keySz,
+ void* ctx);
+
+WOLFSSL_LOCAL int wc_tsip_EccVerify(
+ struct WOLFSSL* ssl,
+ const byte* sig, word32 sigSz,
+ const byte* hash, word32 hashSz,
+ const byte* key, word32 keySz,
+ int* result, void* ctx);
+
+WOLFSSL_LOCAL int wc_tsip_generateVerifyData(
+ const uint8_t* masterSecret,
+ const uint8_t* side,
+ const uint8_t* handshake_hash,
+ uint8_t* hashes);
+
+WOLFSSL_LOCAL int wc_tsip_AesCbcEncrypt(
+ struct Aes* aes,
+ byte* out,
+ const byte* in,
+ word32 sz);
+
+WOLFSSL_LOCAL int wc_tsip_AesCbcDecrypt(
+ struct Aes* aes,
+ byte* out,
+ const byte* in,
+ word32 sz);
+
+WOLFSSL_LOCAL int wc_tsip_AesGcmEncrypt(
+ struct Aes* aes, byte* out,
+ const byte* in, word32 sz,
+ byte* iv, word32 ivSz,
+ byte* authTag, word32 authTagSz,
+ const byte* authIn, word32 authInSz,
+ void* ctx);
+
+WOLFSSL_LOCAL int wc_tsip_AesGcmDecrypt(
+ struct Aes* aes, byte* out,
+ const byte* in, word32 sz,
+ const byte* iv, word32 ivSz,
+ const byte* authTag, word32 authTagSz,
+ const byte* authIn, word32 authInSz,
+ void* ctx);
+
+WOLFSSL_LOCAL int wc_tsip_ShaXHmacVerify(
+ const struct WOLFSSL *ssl,
+ const byte* message,
+ word32 messageSz,
+ word32 macSz,
+ word32 content);
+
+WOLFSSL_LOCAL int wc_tsip_Sha1HmacGenerate(
+ const struct WOLFSSL *ssl,
+ const byte* myInner,
+ word32 innerSz,
+ const byte* in,
+ word32 sz,
+ byte* digest);
+
+WOLFSSL_LOCAL int wc_tsip_Sha256HmacGenerate(
+ const struct WOLFSSL *ssl,
+ const byte* myInner,
+ word32 innerSz,
+ const byte* in,
+ word32 sz,
+ byte* digest);
+
+WOLFSSL_LOCAL int tsip_Open();
+
+WOLFSSL_LOCAL void tsip_Close();
+
+WOLFSSL_LOCAL int tsip_hw_lock();
+
+WOLFSSL_LOCAL void tsip_hw_unlock( void );
+
+WOLFSSL_LOCAL int tsip_usable(const struct WOLFSSL *ssl,
+ uint8_t session_key_generated);
+
+WOLFSSL_LOCAL void tsip_inform_sflash_signedcacert(
+ const byte* ps_flash,
+ const byte* psigned_ca_cert,
+ word32 len);
+
+WOLFSSL_LOCAL byte tsip_rootCAverified();
+
+WOLFSSL_LOCAL byte tsip_checkCA(word32 cmIdx);
+
+WOLFSSL_LOCAL int wc_tsip_tls_RootCertVerify(
+ const byte* cert, word32 cert_len,
+ word32 key_n_start, word32 key_n_len,
+ word32 key_e_start, word32 key_e_len,
+ word32 cm_row);
+
+WOLFSSL_LOCAL int wc_tsip_tls_CertVerify(
+ const uint8_t* cert, uint32_t certSz,
+ const uint8_t* signature, uint32_t sigSz,
+ uint32_t key_n_start, uint32_t key_n_len,
+ uint32_t key_e_start, uint32_t key_e_len,
+ uint8_t* tsip_encRsaKeyIdx);
+
+WOLFSSL_LOCAL int wc_tsip_generatePremasterSecret(
+ byte* premaster,
+ word32 preSz);
+
+WOLFSSL_LOCAL int wc_tsip_generateSessionKey(
+ struct WOLFSSL* ssl,
+ TsipUserCtx* ctx,
+ int devId);
+
+
+
#if defined(WOLFSSL_RENESAS_TSIP_CRYPT_DEBUG)
byte *ret2err(word32 ret);
@@ -221,4 +387,5 @@ byte *ret2err(word32 ret);
}
#endif
+#endif /* !WOLFCRYPT_ONLY */
#endif /* __RENESAS_TSIP_CRYPT_H__ */
diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h
index 0724489e0..d40dd92b3 100644
--- a/wolfssl/wolfcrypt/settings.h
+++ b/wolfssl/wolfcrypt/settings.h
@@ -321,6 +321,9 @@
#endif
#endif /* WOLFSSL_ESPIDF */
+#if defined(WOLFCRYPT_ONLY)
+ #undef WOLFSSL_RENESAS_TSIP
+#endif /* WOLFCRYPT_ONLY */
#if defined(WOLFSSL_RENESAS_TSIP)
#define TSIP_TLS_HMAC_KEY_INDEX_WORDSIZE 64
#define TSIP_TLS_MASTERSECRET_SIZE 80 /* 20 words */
@@ -330,7 +333,7 @@
#define WOLFSSL_RENESAS_TSIP_TLS
#define WOLFSSL_RENESAS_TSIP_TLS_AES_CRYPT
#endif
-#endif
+#endif /* WOLFSSL_RENESAS_TSIP */
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
#define SCE_TLS_MASTERSECRET_SIZE 80 /* 20 words */