mirror of
https://github.com/Cateners/tiny_computer.git
synced 2026-05-21 00:45:49 +08:00
Update code to v1.0.14 (10)
This commit is contained in:
15
android/extern/wolfssl/IDE/Renesas/cs+/Projects/README
vendored
Normal file
15
android/extern/wolfssl/IDE/Renesas/cs+/Projects/README
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
This is procedure how to build wolfssl and test project on Renesas cs+.
|
||||
|
||||
wolfssl_lib:
|
||||
Build wolfssl_lib.lib
|
||||
|
||||
test:
|
||||
- For getting BSP files, create "bsp" folder under "Projects".
|
||||
- Create "DUMMY" project under "bsp" with your MPU name property
|
||||
- close "DUMMY" project, and open "test" project
|
||||
- change MPU name property of the project
|
||||
- uncomment "Use SIM I/O" lines in "bsp/resetprg.c"
|
||||
- set heap size in "bsp/sbrk.h"
|
||||
- set stack size in "bsp/stacksct.h"
|
||||
Build "test" wolfCrypt
|
||||
|
||||
22
android/extern/wolfssl/IDE/Renesas/cs+/Projects/common/strings.h
vendored
Normal file
22
android/extern/wolfssl/IDE/Renesas/cs+/Projects/common/strings.h
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/* strings.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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);
|
||||
22
android/extern/wolfssl/IDE/Renesas/cs+/Projects/common/unistd.h
vendored
Normal file
22
android/extern/wolfssl/IDE/Renesas/cs+/Projects/common/unistd.h
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/* unistd.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 */
|
||||
79
android/extern/wolfssl/IDE/Renesas/cs+/Projects/common/user_settings.h
vendored
Normal file
79
android/extern/wolfssl/IDE/Renesas/cs+/Projects/common/user_settings.h
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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
|
||||
*/
|
||||
|
||||
#define NO_MAIN_DRIVER
|
||||
#define BENCH_EMBEDDED
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
#define WOLFSSL_LOG_PRINTF
|
||||
#define NO_WOLFSSL_STUB
|
||||
#define NO_DYNAMIC_ARRAY /* for compilers not allowed dynamic size array */
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
#define WOLFSSL_DH_CONST
|
||||
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
#define WC_RSA_BLINDING
|
||||
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
|
||||
#define WOLFSSL_USER_IO
|
||||
|
||||
//#define WOLFSSL_USER_KEYFILES /* To be defined key and cert files in user_settings.h */
|
||||
//#define WOLFSSL_NO_ABORT /* No abort during the test except exception occurred */
|
||||
//#define DEBUG_WOLFSSL
|
||||
|
||||
#define OPENSSL_EXTRA
|
||||
|
||||
#define USER_TIME
|
||||
#define XTIME time
|
||||
#define USE_WOLF_SUSECONDS_T
|
||||
#define USE_WOLF_TIMEVAL_T
|
||||
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
|
||||
#define WOLFSSL_GENSEED_FORTEST /* Wardning: define your own seed gen */
|
||||
|
||||
#define SINGLE_THREADED /* or define RTOS option */
|
||||
/*#define WOLFSSL_CMSIS_RTOS */
|
||||
|
||||
/* #define NO_DH */
|
||||
#define NO_RC4
|
||||
#define HAVE_AESGCM
|
||||
#define WOLFSSL_SHA512
|
||||
#define WOLFSSL_SHA384
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define CURVE25519_SMALL
|
||||
#define HAVE_ED25519
|
||||
#define NO_OLD_SHA256_NAMES
|
||||
#define HAVE_CRL
|
||||
#define HAVE_OCSP
|
||||
#define HAVE_CERTIFICATE_STATUS_REQUEST
|
||||
|
||||
#define NO_FILESYSTEM
|
||||
|
||||
|
||||
62
android/extern/wolfssl/IDE/Renesas/cs+/Projects/common/wolfssl_dummy.c
vendored
Normal file
62
android/extern/wolfssl/IDE/Renesas/cs+/Projects/common/wolfssl_dummy.c
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/* wolfssl_dummy.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/wolfcrypt/types.h>
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define YEAR 2018
|
||||
#define MON 5
|
||||
|
||||
static int tick = 0;
|
||||
|
||||
time_t time(time_t *t)
|
||||
{
|
||||
return ((YEAR-1970)*365+30*MON)*24*60*60 + tick++;
|
||||
}
|
||||
|
||||
#include <ctype.h>
|
||||
int strncasecmp(const char *s1, const char * s2, unsigned int sz)
|
||||
{
|
||||
for( ; sz>0; sz--, s1++, s2++){
|
||||
if(toupper(*s1) < toupper(*s2)){
|
||||
return -1;
|
||||
}
|
||||
if(toupper(*s1) > toupper(*s2)){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void abort(void)
|
||||
{
|
||||
while(1);
|
||||
}
|
||||
|
||||
|
||||
20
android/extern/wolfssl/IDE/Renesas/cs+/Projects/include.am
vendored
Normal file
20
android/extern/wolfssl/IDE/Renesas/cs+/Projects/include.am
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/README
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/wolfssl_lib/wolfssl_lib.mtpj
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/test/test.mtpj
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/test/test_main.c
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/common/wolfssl_dummy.c
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/common/strings.h
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/common/unistd.h
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/common/user_settings.h
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/README_en.txt
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/README_jp.txt
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/wolf_client.c
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/wolf_server.c
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/wolf_main.c
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/wolf_demo.h
|
||||
EXTRA_DIST+= IDE/Renesas/cs+/Projects/t4_demo/t4_demo.mtpj
|
||||
|
||||
112
android/extern/wolfssl/IDE/Renesas/cs+/Projects/t4_demo/README_en.txt
vendored
Normal file
112
android/extern/wolfssl/IDE/Renesas/cs+/Projects/t4_demo/README_en.txt
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
wolfSSL/AlphaProject Boad demo setup Guide
|
||||
|
||||
This demo is tested with the following condition.
|
||||
|
||||
Renesas : CS+ v6.01, v8.01
|
||||
Board : AP-RX71M-0A
|
||||
wolfSSL : 3.15.3, 4.0.0
|
||||
|
||||
Setup process:
|
||||
1. Download software
|
||||
- Unzip AlphaProject firmware
|
||||
- Unzip wolfssl under the same directory
|
||||
|
||||
2. Set up wolfSSL
|
||||
- open wolfssl\IDE\Renesas\cs+\Projec/wolfssl\lib.mtpj with CS+ and build
|
||||
- open t4_demo.mtpj and build. This create demo program library.
|
||||
|
||||
3. Set up AlphaProject
|
||||
|
||||
!!** When you use version 2.0 of a sample program, **!!
|
||||
!!** please replace _ether_ to _usbfunc_ **!!
|
||||
|
||||
- The demo uses ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\
|
||||
ap_rx71m_0a_ether_sample_cs.mtpj
|
||||
- Open and edit ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\AP_RX71M_0A.c
|
||||
insert wolfSSL_init() in echo_srv_init().
|
||||
|
||||
===
|
||||
sci_init();
|
||||
can_init();
|
||||
echo_srv_init();
|
||||
wolfSSL_init(); <- insert this line
|
||||
===
|
||||
!!** when you use version 2.0 **!!
|
||||
===
|
||||
CanInit();
|
||||
SciInit();
|
||||
EthernetAppInit();
|
||||
UsbfInit();
|
||||
wolfSSL_init(); <- insert this line
|
||||
===
|
||||
!!******************************!!
|
||||
|
||||
- Modify stack and heap size in ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\r_config
|
||||
Line 120#pragma stacksize su=0x2000
|
||||
Line 139 #define BSP_CFG_HEAP_BYTES (0xa000)
|
||||
|
||||
!!** when you use version 2.0 **!!
|
||||
- Modify stack and heap size in ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_usbfunc_sample_cs\src\smc_gen\r_bsp_config.h
|
||||
Line 154#pragma stacksize su=0x2000
|
||||
Line 175#define BSP_CFG_HEAP_BYTES (0xa000)
|
||||
!!******************************!!
|
||||
|
||||
- Modify IP address Sample\ap_rx71m_0a_ether_sample_cs\src\r_t4_rx\src\config_tcpudp.c
|
||||
as needed
|
||||
!!** when you use version 2.0 **!!
|
||||
- Modify IP address Sample\ap_rx71m_0a_usbfunc_sample_cs\src\tcp_sample\src\config_tcpudp.c
|
||||
as needed
|
||||
!!******************************!!
|
||||
|
||||
===
|
||||
#define MY_IP_ADDR0 192,168,1,200 /* Local IP address */
|
||||
#define GATEWAY_ADDR0 192,168,1,254 /* Gateway address (invalid if all 0s) */
|
||||
#define SUBNET_MASK0 255,255,255,0
|
||||
===
|
||||
|
||||
- Add project properties of linking library in ap_rx71m_0a_ether_sample_cs.mtpj
|
||||
|
||||
wolfssl\IDE\Renesas\cs+\Projects\wolfssl_lib\DefaultBuild\wolfssl_lib.lib
|
||||
wolfssl\IDE\Renesas\cs+\Projects\t4_demo\DefaultBuild\t4_demo.lib
|
||||
|
||||
- Set CC-RX(Build Tool)->Library Geberation->Library Configuration to"C99" and enable ctype.h.
|
||||
|
||||
- Build the project and start execute. You see message on the console prompting command.
|
||||
|
||||
===
|
||||
wolfSSL Demo
|
||||
t: test, b: benchmark, s: server, or c <IP addr> <Port>: client
|
||||
$
|
||||
===
|
||||
|
||||
Command can be executed only once. You need to reset and restart MPU for following command.
|
||||
|
||||
Command instruction:
|
||||
t: Crypt algorithm test
|
||||
b: benchmark
|
||||
s: simple server acceptint at port 50000
|
||||
c: simple client. Specify IP address and port as following.
|
||||
c <IP Addr> <Port Num>
|
||||
|
||||
|
||||
4. Testing TLS Connection
|
||||
You can use wolfssl/examples/server and client on your PC for TLS peer test.
|
||||
|
||||
|
||||
PC side
|
||||
$ ./examples/server/server -b -d
|
||||
|
||||
Board side
|
||||
> c <IP Addr> 11111
|
||||
|
||||
Board side
|
||||
> s
|
||||
|
||||
PC side
|
||||
$ ./examples/client/client -h <IP Addr> -p 50000
|
||||
|
||||
---
|
||||
If you have any question, please contact support@wolfssl.com.
|
||||
|
||||
wolfSSL Inc.
|
||||
|
||||
148
android/extern/wolfssl/IDE/Renesas/cs+/Projects/t4_demo/README_jp.txt
vendored
Normal file
148
android/extern/wolfssl/IDE/Renesas/cs+/Projects/t4_demo/README_jp.txt
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
wolfSSL/AlphaProjectボードデモ セットアップガイド
|
||||
|
||||
このデモは以下の環境でテストしています。
|
||||
|
||||
Renesas : CS+ v6.01, v8.01
|
||||
Board : AP-RX71M-0A
|
||||
wolfSSL : 3.15.3, 4.0.0
|
||||
|
||||
セットアップ手順:
|
||||
|
||||
1.ソフトウェアの入手
|
||||
- APボード付属のソフトウェア一式を適当なフォルダー下に解凍します。
|
||||
- 同じフォルダー下にwolfssl一式を解凍します。
|
||||
|
||||
2.wolfSSLのセットアップ
|
||||
- CS+にてwolfssl\IDE\Renesas\cs+\Project下のwolfssl\wolfssl_lib.mtpjを開き
|
||||
wolfSSLライブラリーのビルドをします。
|
||||
- 同じフォルダの下のt4_demo.mtpjを開き、デモプログラムのビルドをします。
|
||||
このプログラムもライブラリー形式でビルドされます。
|
||||
|
||||
3.AlphaProject側のセットアップ
|
||||
|
||||
!!** サンプルプログラム v2.0 を使用する場合は、_ether_ => _usbfunc_ **!!
|
||||
!!** と置き換えてください **!!
|
||||
|
||||
デモはap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_csフォルダ下の
|
||||
ap_rx71m_0a_ether_sample_cs.mtpjプロジェクトを利用します。
|
||||
|
||||
- ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\srcフォルダ下の
|
||||
AP_RX71M_0A.cファイルを開き、
|
||||
97行目のecho_srv_init()の下にwolfSSL_init()を挿入します。
|
||||
|
||||
===
|
||||
sci_init();
|
||||
can_init();
|
||||
echo_srv_init();
|
||||
wolfSSL_init(); <- この行を挿入
|
||||
===
|
||||
|
||||
!!** サンプルプログラム v2.0 を使用する場合は、下記 **!!
|
||||
===
|
||||
CanInit();
|
||||
SciInit();
|
||||
EthernetAppInit();
|
||||
UsbfInit();
|
||||
wolfSSL_init(); <- この行を挿入
|
||||
===
|
||||
!!**********************************************************************!!
|
||||
|
||||
- ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_ether_sample_cs\src\smc_gen\r_bsp_config.h
|
||||
を開き、スタックサイズとヒープサイズを以下のように設定します。
|
||||
|
||||
120行目 #pragma stacksize su=0x2000
|
||||
139行目 #define BSP_CFG_HEAP_BYTES (0xa000)
|
||||
|
||||
!!** サンプルプログラム v2.0 を使用する場合は、下記 **!!
|
||||
- ap_rx71m_0a_sample_cs\Sample\ap_rx71m_0a_usbfunc_sample_cs\src\smc_gen\r_bsp_config.h
|
||||
を開き、スタックサイズとヒープサイズを以下のように設定します。
|
||||
154行目 #pragma stacksize su=0x2000
|
||||
175行目 #define BSP_CFG_HEAP_BYTES (0xa000)
|
||||
!!**********************************************************************!!
|
||||
|
||||
- IPアドレスのデフォルト値は以下のようになっています。
|
||||
必要があれば、Sample\ap_rx71m_0a_ether_sample_cs\src\r_t4_rx\src\config_tcpudp.c
|
||||
内の139行目からの定義を変更します。
|
||||
!!** サンプルプログラム v2.0 を使用する場合は、下記 **!!
|
||||
Sample\ap_rx71m_0a_usbfunc_sample_cs\src\tcp_sample\src\config_tcpudp.c
|
||||
内の166行目からの定義を変更します。
|
||||
!!**********************************************************************!!
|
||||
|
||||
===
|
||||
#define MY_IP_ADDR0 192,168,1,200 /* Local IP address */
|
||||
#define GATEWAY_ADDR0 192,168,1,254 /* Gateway address (invalid if all 0s) */
|
||||
#define SUBNET_MASK0 255,255,255,0 /* Subnet mask */
|
||||
===
|
||||
|
||||
|
||||
- CS+でap_rx71m_0a_ether_sample_cs.mtpjプロジェクトを開き、wolfSSLとデモライブラリを
|
||||
登録します。CC-RX(ビルドツール)->リンク・オプションタブ->使用するライブラリに
|
||||
以下の二つのファイルを登録します。
|
||||
wolfssl\IDE\Renesas\cs+\Projects\wolfssl_lib\DefaultBuild\wolfssl_lib.lib
|
||||
wolfssl\IDE\Renesas\cs+\Projects\t4_demo\DefaultBuild\t4_demo.lib
|
||||
|
||||
- CC-RX(ビルドツール)->ライブラリージェネレーションタブ->ライブラリー構成を「C99」に、
|
||||
ctype.hを有効にするを「はい」に設定します。
|
||||
|
||||
- プロジェクトのビルド、ターゲットへのダウンロードをしたのち、表示->デバッグ・コンソール
|
||||
からコンソールを表示させます。実行を開始するとコンソールに以下の表示が出力されます。
|
||||
|
||||
===
|
||||
wolfSSL Demo
|
||||
t: test, b: benchmark, s: server, or c <IP addr> <Port>: client
|
||||
$
|
||||
===
|
||||
|
||||
tコマンド:各暗号化アルゴリズムの簡単なテストを実行します。所要のアルゴリズムが
|
||||
組み込まれているか確認することができます。組み込むアルゴリズムはビルドオプション
|
||||
で変更することができます。詳しくはユーザマニュアルを参照してください。
|
||||
bコマンド:各暗号アルゴリズムごとの簡単なベンチマークを実行します。
|
||||
sコマンド:簡単なTLSサーバを起動します。起動するとビルド時のIPアドレス、
|
||||
ポート50000にてTLS接続を待ちます。
|
||||
cコマンド:簡単なTLSクライアントを起動します。起動すると第一アーギュメントで指定された
|
||||
IPアドレス、第二アーギュメントで指定されたポートに対してTLS接続します。
|
||||
|
||||
いずれのコマンドも1回のみ実行します。繰り返し実行したい場合は、MPUをリセットして
|
||||
再起動します。
|
||||
|
||||
4.対向テスト
|
||||
デモのs、cコマンドを使って、他の機器と簡単な対向テストをすることができます。
|
||||
UbuntuなどのGCC, make環境、WindowsのVisual Studioなどで
|
||||
対向テスト用のサーバ、クライアントをビルドすることができます。
|
||||
|
||||
GCC,makeコマンド環境では、ダウンロード解凍したwolfsslのディレクトリ下で以下の
|
||||
コマンドを発行すると、ライブラリ、テスト用のクライアント、サーバなど一式がビルド
|
||||
されます。
|
||||
|
||||
$ ./configure
|
||||
$ make check
|
||||
|
||||
その後、以下のような指定でクライアントまたはサーバを起動して、ボード上の
|
||||
デモと対向テストすることができます。
|
||||
|
||||
PC側:
|
||||
$ ./examples/server/server -b -d
|
||||
ボード側:
|
||||
> c <IPアドレス> 11111
|
||||
|
||||
ボード側:
|
||||
> s
|
||||
PC側:
|
||||
$ ./examples/client/client -h <IPアドレス> -p 50000
|
||||
|
||||
|
||||
WindowsのVisual Studioでは、ダウンロード解凍したwolfsslフォルダ下のwolfssl64.sln
|
||||
を開き、ソリューションをビルドします。Debugフォルダ下にビルドされるclient.exeと
|
||||
server.exeを利用します。
|
||||
|
||||
PC側:
|
||||
Debug> .\server -b -d
|
||||
ボード側:
|
||||
> c <IPアドレス> 11111
|
||||
|
||||
ボード側:
|
||||
> s
|
||||
PC側:
|
||||
Debug> .\client -h <IPアドレス> -p 50000
|
||||
|
||||
以上、
|
||||
1240
android/extern/wolfssl/IDE/Renesas/cs+/Projects/t4_demo/t4_demo.mtpj
vendored
Normal file
1240
android/extern/wolfssl/IDE/Renesas/cs+/Projects/t4_demo/t4_demo.mtpj
vendored
Normal file
File diff suppressed because it is too large
Load Diff
192
android/extern/wolfssl/IDE/Renesas/cs+/Projects/t4_demo/wolf_client.c
vendored
Normal file
192
android/extern/wolfssl/IDE/Renesas/cs+/Projects/t4_demo/wolf_client.c
vendored
Normal file
@@ -0,0 +1,192 @@
|
||||
/* wolf_client.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 <string.h>
|
||||
#include "r_t4_itcpip.h"
|
||||
|
||||
#include "wolfssl/wolfcrypt/settings.h"
|
||||
#include "wolfssl/ssl.h"
|
||||
#include "wolfssl/certs_test.h"
|
||||
#include "wolf_demo.h"
|
||||
|
||||
ER t4_tcp_callback(ID cepid, FN fncd , VP p_parblk);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
WOLFSSL_CTX *wolfSSL_TLS_client_init()
|
||||
{
|
||||
|
||||
WOLFSSL_CTX* ctx;
|
||||
#ifndef NO_FILESYSTEM
|
||||
#ifdef USE_ECC_CERT
|
||||
char *cert = "./certs/ca-ecc-cert.pem";
|
||||
#else
|
||||
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
|
||||
#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 ((ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method_ex((void *)NULL))) == NULL) {
|
||||
printf("ERROR: failed to create WOLFSSL_CTX\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
if (wolfSSL_CTX_load_verify_locations(ctx, cert, 0) != SSL_SUCCESS) {
|
||||
printf("ERROR: can't load \"%s\"\n", cert);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
if (wolfSSL_CTX_load_verify_buffer(ctx, cert, SIZEOF_CERT, SSL_FILETYPE_ASN1) != SSL_SUCCESS){
|
||||
printf("ERROR: can't load certificate data\n");
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* Register callbacks */
|
||||
wolfSSL_SetIORecv(ctx, my_IORecv);
|
||||
wolfSSL_SetIOSend(ctx, my_IOSend);
|
||||
return (void *)ctx;
|
||||
|
||||
}
|
||||
|
||||
|
||||
void wolfSSL_TLS_client(void *v_ctx, func_args *args)
|
||||
{
|
||||
ID cepid = 1;
|
||||
ER ercd;
|
||||
int ret;
|
||||
WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)v_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(args->argc >= 2){
|
||||
if((dst_addr.ipaddr = getIPaddr(args->argv[1])) == 0){
|
||||
printf("ERROR: IP address\n");
|
||||
return;
|
||||
}
|
||||
if((dst_addr.portno = getPort(args->argv[2])) == 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;
|
||||
}
|
||||
|
||||
/* 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", 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;
|
||||
}
|
||||
18
android/extern/wolfssl/IDE/Renesas/cs+/Projects/t4_demo/wolf_demo.h
vendored
Normal file
18
android/extern/wolfssl/IDE/Renesas/cs+/Projects/t4_demo/wolf_demo.h
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
|
||||
typedef struct func_args
|
||||
{
|
||||
int argc;
|
||||
char **argv;
|
||||
int return_code;
|
||||
} func_args;
|
||||
|
||||
void wolfSSL_init(void) ;
|
||||
void wolfSSL_main(void) ;
|
||||
WOLFSSL_CTX *wolfSSL_TLS_server_init(void);
|
||||
WOLFSSL_CTX *wolfSSL_TLS_client_init(void);
|
||||
|
||||
void benchmark_test(void *args);
|
||||
void wolfcrypt_test(void *args);
|
||||
void wolfSSL_TLS_client(void *ctx, func_args *args);
|
||||
void wolfSSL_TLS_server(void *ctx, func_args *args);
|
||||
125
android/extern/wolfssl/IDE/Renesas/cs+/Projects/t4_demo/wolf_main.c
vendored
Normal file
125
android/extern/wolfssl/IDE/Renesas/cs+/Projects/t4_demo/wolf_main.c
vendored
Normal file
@@ -0,0 +1,125 @@
|
||||
/* wolf_main.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 "user_settings.h"
|
||||
#include "wolfssl/ssl.h"
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "wolf_demo.h"
|
||||
|
||||
static WOLFSSL_CTX *wolfSSL_sv_ctx;
|
||||
static WOLFSSL_CTX *wolfSSL_cl_ctx;
|
||||
|
||||
static long tick;
|
||||
static void timeTick(void *pdata)
|
||||
{
|
||||
tick++;
|
||||
}
|
||||
|
||||
#define FREQ 10000 /* Hz */
|
||||
|
||||
double current_time(int reset)
|
||||
{
|
||||
if(reset) tick = 0 ;
|
||||
return ((double)tick/FREQ) ;
|
||||
}
|
||||
|
||||
#define ARG_SZ 256
|
||||
static char argBuff[ARG_SZ];
|
||||
static int get_arg(func_args *args)
|
||||
{
|
||||
int i;
|
||||
char *arg = argBuff;
|
||||
args->argc = 0;
|
||||
|
||||
for(i=0; i<ARG_SZ; i++) {
|
||||
*arg = getchar();
|
||||
|
||||
switch(*arg){
|
||||
case '\n':
|
||||
*arg = '\0';
|
||||
return args->argc;
|
||||
case ' ':
|
||||
*arg++ = '\0';
|
||||
while(*arg++ == ' '); /* Skip space */
|
||||
args->argv[++args->argc] = arg;
|
||||
break;
|
||||
default:
|
||||
arg++;
|
||||
}
|
||||
}
|
||||
return args->argc ;
|
||||
}
|
||||
|
||||
void wolfSSL_init()
|
||||
{
|
||||
uint32_t channel;
|
||||
R_CMT_CreatePeriodic(FREQ, &timeTick, &channel);
|
||||
|
||||
wolfSSL_sv_ctx = wolfSSL_TLS_server_init();
|
||||
wolfSSL_cl_ctx = wolfSSL_TLS_client_init();
|
||||
wolfSSL_main();
|
||||
}
|
||||
|
||||
void wolfSSL_main()
|
||||
{
|
||||
int c;
|
||||
func_args args = {0};
|
||||
|
||||
printf("wolfSSL Demo\nt: test, b: benchmark, s: server, or c <IP addr> <Port>: client\n$ ");
|
||||
c = getchar();
|
||||
|
||||
switch(c) {
|
||||
case 't':
|
||||
get_arg(&args);
|
||||
printf("Start wolfCrypt Test\n");
|
||||
wolfcrypt_test(&args);
|
||||
printf("End wolfCrypt Test\n");
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
get_arg(&args);
|
||||
printf("Start wolfCrypt Benchmark\n");
|
||||
benchmark_test(NULL);
|
||||
printf("End wolfCrypt Benchmark\n");
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
if(get_arg(&args) < 0)
|
||||
break;
|
||||
printf("Start TLS Client(%s, %s)\n", args.argv[1], args.argv[2]);
|
||||
wolfSSL_TLS_client(wolfSSL_cl_ctx, &args);
|
||||
printf("End TLS Client\n");
|
||||
break;
|
||||
|
||||
case 's':
|
||||
if(get_arg(&args) < 0)
|
||||
break;
|
||||
printf("Start TLS Server\n");
|
||||
wolfSSL_TLS_server(wolfSSL_sv_ctx, &args);
|
||||
printf("End TLS Server\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("Command Error\n");
|
||||
}
|
||||
}
|
||||
173
android/extern/wolfssl/IDE/Renesas/cs+/Projects/t4_demo/wolf_server.c
vendored
Normal file
173
android/extern/wolfssl/IDE/Renesas/cs+/Projects/t4_demo/wolf_server.c
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
/* wolf_server.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 <string.h>
|
||||
#include "r_t4_itcpip.h"
|
||||
|
||||
#include "wolfssl/wolfcrypt/settings.h"
|
||||
#include "wolfssl/ssl.h"
|
||||
#include "wolfssl/certs_test.h"
|
||||
#include "wolf_demo.h"
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
WOLFSSL_CTX *wolfSSL_TLS_server_init()
|
||||
{
|
||||
|
||||
int ret;
|
||||
WOLFSSL_CTX* ctx;
|
||||
|
||||
#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
|
||||
#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;
|
||||
#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
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
wolfSSL_Init();
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
/* Create and initialize WOLFSSL_CTX */
|
||||
if ((ctx = wolfSSL_CTX_new(wolfSSLv23_server_method_ex((void *)NULL))) == NULL) {
|
||||
printf("ERROR: failed to create WOLFSSL_CTX\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
ret = wolfSSL_CTX_use_certificate_file(ctx, cert, 0);
|
||||
#else
|
||||
ret = wolfSSL_CTX_use_certificate_buffer(ctx, cert, sizeof_cert, SSL_FILETYPE_ASN1);
|
||||
#endif
|
||||
if (ret != SSL_SUCCESS) {
|
||||
printf("Error %d loading server-cert!\n", ret);
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
/* Load server key into WOLFSSL_CTX */
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
ret = wolfSSL_CTX_use_PrivateKey_file(ctx, key, 0);
|
||||
#else
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx, key, sizeof_key, SSL_FILETYPE_ASN1);
|
||||
#endif
|
||||
if (ret != SSL_SUCCESS) {
|
||||
printf("Error %d loading server-key!\n", ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Register callbacks */
|
||||
wolfSSL_SetIORecv(ctx, my_IORecv);
|
||||
wolfSSL_SetIOSend(ctx, my_IOSend);
|
||||
return ctx;
|
||||
|
||||
}
|
||||
|
||||
void wolfSSL_TLS_server(void *v_ctx, func_args *args)
|
||||
{
|
||||
ID cepid = 1;
|
||||
ID repid = 1;
|
||||
ER ercd;
|
||||
WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)v_ctx;
|
||||
(void) args;
|
||||
|
||||
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);
|
||||
tcp_sht_cep(cepid);
|
||||
}
|
||||
1666
android/extern/wolfssl/IDE/Renesas/cs+/Projects/test/test.mtpj
vendored
Normal file
1666
android/extern/wolfssl/IDE/Renesas/cs+/Projects/test/test.mtpj
vendored
Normal file
File diff suppressed because it is too large
Load Diff
60
android/extern/wolfssl/IDE/Renesas/cs+/Projects/test/test_main.c
vendored
Normal file
60
android/extern/wolfssl/IDE/Renesas/cs+/Projects/test/test_main.c
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/* test_main.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 "typedefine.h"
|
||||
#ifdef __cplusplus
|
||||
#include <ios> // Remove the comment when you use ios
|
||||
_SINT ios_base::Init::init_cnt; // Remove the comment when you use ios
|
||||
#endif
|
||||
|
||||
#include "stdio.h"
|
||||
|
||||
void main(void);
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
void abort(void);
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
char** argv;
|
||||
int return_code;
|
||||
} func_args;
|
||||
|
||||
void wolfcrypt_test(func_args args);
|
||||
|
||||
void main(void)
|
||||
{
|
||||
func_args args = { 1 };
|
||||
|
||||
printf("Start wolfCrypt Test\n");
|
||||
wolfcrypt_test(args);
|
||||
printf("End wolfCrypt Test\n");
|
||||
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
void abort(void)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
2296
android/extern/wolfssl/IDE/Renesas/cs+/Projects/wolfssl_lib/wolfssl_lib.mtpj
vendored
Normal file
2296
android/extern/wolfssl/IDE/Renesas/cs+/Projects/wolfssl_lib/wolfssl_lib.mtpj
vendored
Normal file
File diff suppressed because it is too large
Load Diff
59
android/extern/wolfssl/IDE/Renesas/e2studio/DK-S7G2/README.md
vendored
Normal file
59
android/extern/wolfssl/IDE/Renesas/e2studio/DK-S7G2/README.md
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
## Project Summary
|
||||
|Item|Name/Version|
|
||||
|:--|:--|
|
||||
|Board|DK-S7G2|
|
||||
|Toolchain|GCC ARM Embedded|
|
||||
|SSP Version|1.7.0|
|
||||
|
||||
|
||||
## Building wolfSSL For DK-S7G2
|
||||
|
||||
- First physically toggle the ENET1 and JTAG switch to on with the DK-S7G2 board.
|
||||
- Open e2studio and set the workspace to be wolfssl-X.X.X/IDE/Renesas/e2studio/DK-S7G2/
|
||||
- Create a Synergy library project named wolfssl "File->New->Synergy C/C++ Project", "Renesas Synergy C Library Project" then "Next", set wolfssl as the "Project Name" then "Next", set Board to "S7G2 DK" then "Next", finally select the BSP radius and click "Finish"
|
||||
- Copy configuration.xml and .project from wolfssl-X.X.X/IDE/Renesas/e2studio/DK-S7G2/wolfssl-template-project/ into the wolfssl-X.X.X/IDE/Renesas/e2studio/DK-S7G2/wolfssl directory
|
||||
- (optional but necessary for production) Add TRNG support by clicking on Threads tab and highlight HAL/Common click "New Stack > Driver > Crypto > TRNG Driver on r_sce_trng". Then comment out WOLFSSL_SCE_NO_TRNG define in wolfssl project src/user_settings.h
|
||||
- (optional SHA acceleration) Add HASH support by clicking on Threads tab and highlight HAL/Common click "New Stack > Driver > Crypto > HASH Driver on r_sce_hash". Then uncomment WOLFSSL_SCE_NO_HASH define in wolfssl project src/user_settings.h
|
||||
- (optional AES acceleration) Add the stacks for AES128, AES192, and AES256. Click on Threads tab and highlight HAL/Common click "New Stack > Driver > Crypto > AES Driver on r_sce_aes". Add three one for each key size and rename them to g_sce_aes_256, g_sce_aes_192, and g_sce_aes_128. Changing each to ECB chaining mode and the key length that matches the name.
|
||||
- Generate the changes by clicking on "Generate Project Content"
|
||||
- Exclude src/wolfcrypt/port and all src/wolfcrypt/*.S and src/wolfcrypt/*.asm files from the build
|
||||
- Exclude src/wolfcrypt/evp.c, src/wolfcrypt/misc.c and src/wolfssl/bio.c
|
||||
- Set the Preprocessor define in wolfssl proejct to have WOLFSSL_USER_SETTINGS. Right click on wolfssl project "Properties -> C/C++ Build -> GNU ARM Cross C Compiler -> Preprocessor" add WOLFSSL_USER_SETTINGS under "Defined symbols"
|
||||
- Set include to wolfssl directory. Right click on project "Properties -> C/C++Build -> GNU ARM Cross Compiler -> Includes". Add "${ProjDirPath}/../../../../.." and "${ProjDirPath}/../"
|
||||
- Build wolfssl by right clicking on wolfssl project and selecting "Build Project"
|
||||
|
||||
## Example Projects and Building
|
||||
|
||||
- Create a new Synergy project "Renesas Synergy C Project Using Synergy Library"
|
||||
- Set it to use the wolfssl library
|
||||
- Copy in the .cproject, .project and source file from the template desired i.e. wolfssl-X.X.X/IDE/Renesas/e2studio/DK-S7G2/wolfcrypttest-template/
|
||||
- Right click on the created project and select "Build Project"
|
||||
|
||||
The example_server loops looking to accept connections and closes immediatly after a successful connection was made.
|
||||
|
||||
The benchmark example tries to do a TCP connection to SERVER_IP on port 11112 and a TLS connection to SERVER_IP on port 11111 then does wolfCrypt benchmark collection.
|
||||
|
||||
The wolfcryptest runs through all of the unit tests from wolfcrypt/test/test.c
|
||||
|
||||
## Advanced Overriding Driver Name
|
||||
Defaults are set for when accessing the driver but the default names may not always work for an existing project. These are the macros and their defaults that could be mapped to other driver names:
|
||||
|
||||
```
|
||||
/* For main SCE open and close */
|
||||
WOLFSSL_SCE_GSCE_HANDLE g_sce
|
||||
|
||||
/* For AES operations */
|
||||
WOLFSSL_SCE_AES256_HANDLE g_sce_aes_256
|
||||
WOLFSSL_SCE_AES192_HANDLE g_sce_aes_192
|
||||
WOLFSSL_SCE_AES128_HANDLE g_sce_aes_128
|
||||
|
||||
/* HASH operations */
|
||||
WOLFSSL_SCE_SHA256_HANDLE g_sce_hash_0
|
||||
|
||||
/* TRNG access */
|
||||
WOLFSSL_SCE_TRNG_HANDLE g_sce_trng
|
||||
```
|
||||
|
||||
|
||||
An example of remapping a driver name would be the following added to a wolfSSL user_settings.h file:
|
||||
#define WOFSSL_SCE_SHA256_HANDLE my_sce_hash_driver
|
||||
307
android/extern/wolfssl/IDE/Renesas/e2studio/DK-S7G2/benchmark-template/src/app_entry.c
vendored
Normal file
307
android/extern/wolfssl/IDE/Renesas/e2studio/DK-S7G2/benchmark-template/src/app_entry.c
vendored
Normal file
@@ -0,0 +1,307 @@
|
||||
/* app_entry.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 "app.h"
|
||||
#include "stdio.h"
|
||||
extern void initialise_monitor_handles(void);
|
||||
|
||||
#include <wolfcrypt/benchmark/benchmark.h>
|
||||
|
||||
#ifndef WOLFCRYPT_ONLY
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
#include "nx_api.h"
|
||||
#define CONNECTION_TIMES 100
|
||||
#define SERVER_IP IP_ADDRESS(10,22,73,128)
|
||||
#define TLS_PORT 11111
|
||||
#define TCP_PORT 11112
|
||||
|
||||
static double miliseconds = 0;
|
||||
void timer_callback(timer_callback_args_t * args)
|
||||
{
|
||||
miliseconds++;
|
||||
(void)args;
|
||||
}
|
||||
|
||||
/* version is the type of TLS version to use. For example TLS1.2 = version 2
|
||||
* and TLS1.3 = version 3
|
||||
*
|
||||
* suites is a null terminated string containing the cipher suites to us, or
|
||||
* can be NULL for default*/
|
||||
static void benchmark_TLS(int version, char* suites, int group)
|
||||
{
|
||||
UINT TEST_PORT = TLS_PORT;
|
||||
ULONG TEST_IP = SERVER_IP;
|
||||
int i;
|
||||
NX_TCP_SOCKET sockfd;
|
||||
int ret;
|
||||
#ifdef WOLFSSL_TLS13
|
||||
int groups[1];
|
||||
#endif
|
||||
double start;
|
||||
WOLFSSL_METHOD* method = NULL;
|
||||
|
||||
WOLFSSL_CTX* ctx;
|
||||
WOLFSSL* ssl;
|
||||
|
||||
switch (version) {
|
||||
case 2: method = wolfTLSv1_2_client_method(); break;
|
||||
#ifdef WOLFSSL_TLS13
|
||||
case 3: method = wolfTLSv1_3_client_method(); break;
|
||||
#endif
|
||||
default:
|
||||
printf("Unknown TLS version (Check if built with it supported)\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ctx = wolfSSL_CTX_new(method);
|
||||
if (ctx == NULL) {
|
||||
printf("unable to create ctx\n");
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef NO_RSA
|
||||
/* add default RSA CA */
|
||||
ret = wolfSSL_CTX_load_verify_buffer(ctx, ca_cert_der_2048,
|
||||
sizeof_ca_cert_der_2048, SSL_FILETYPE_ASN1);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("error %d loading CA\n", ret);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ECC
|
||||
/* add default ECDSA CA */
|
||||
ret = wolfSSL_CTX_load_verify_buffer(ctx, ca_ecc_cert_der_256,
|
||||
sizeof_ca_ecc_cert_der_256, SSL_FILETYPE_ASN1);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("error %d loading CA\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (suites != NULL) {
|
||||
ret = wolfSSL_CTX_set_cipher_list(ctx, suites);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("error %d setting cipher suites %s\n", ret, suites);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_TLS13
|
||||
if (version == 3) {
|
||||
groups[0] = group;
|
||||
ret = wolfSSL_CTX_set_groups(ctx, groups, 1);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("error setting group\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
printf("Trying to connect to 0x%lX on port %d\n", TEST_IP, TEST_PORT);
|
||||
|
||||
miliseconds = 0;
|
||||
g_timer0.p_api->open(g_timer0.p_ctrl, g_timer0.p_cfg);
|
||||
g_timer0.p_api->start(g_timer0.p_ctrl);
|
||||
|
||||
start = (double)tx_time_get(); // TX_TIMER_TICKS_PER_SECOND = 100
|
||||
ret = (int)nx_tcp_socket_create(&g_ip0, &sockfd, "TLS_CLIENT", NX_IP_NORMAL,
|
||||
NX_FRAGMENT_OKAY, NX_IP_TIME_TO_LIVE, 1500, NX_NULL, NX_NULL);
|
||||
if (ret != NX_SUCCESS) {
|
||||
printf("failed to create socket err = 0x%X\n", ret);
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < CONNECTION_TIMES; i++) {
|
||||
|
||||
ret = (int)nx_tcp_client_socket_bind(&sockfd, NX_ANY_PORT,
|
||||
NX_WAIT_FOREVER);
|
||||
if (ret != NX_SUCCESS) {
|
||||
printf("failed to bind socket\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ret = (int)nx_tcp_client_socket_connect(&sockfd, TEST_IP, TEST_PORT,
|
||||
NX_WAIT_FOREVER);
|
||||
if (ret != NX_SUCCESS) {
|
||||
printf("failed to connect with error 0x%X\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
ssl = wolfSSL_new(ctx);
|
||||
if (ssl == NULL) {
|
||||
printf("Error creating ssl\n");
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_TLS13
|
||||
if (version == 3) {
|
||||
ret = wolfSSL_UseKeyShare(ssl, group);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("Error %d with set key share\n", ret);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
wolfSSL_SetIO_NetX(ssl, &sockfd, NX_WAIT_FOREVER);
|
||||
|
||||
ret = wolfSSL_connect(ssl);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("Error %d with wolfssl connect\n", ret);
|
||||
return;
|
||||
}
|
||||
wolfSSL_free(ssl);
|
||||
|
||||
nx_tcp_socket_disconnect(&sockfd, NX_WAIT_FOREVER);
|
||||
|
||||
ret = nx_tcp_client_socket_unbind(&sockfd);
|
||||
if (ret != NX_SUCCESS) {
|
||||
printf("failed to unbind with error 0x%X\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
nx_tcp_socket_delete(&sockfd);
|
||||
|
||||
g_timer0.p_api->stop(g_timer0.p_ctrl);
|
||||
start = (double)tx_time_get() - start;
|
||||
g_timer0.p_api->close(g_timer0.p_ctrl);
|
||||
|
||||
printf("%d TLS connections took %f seconds and %f tx_time ticks\n",
|
||||
CONNECTION_TIMES, (miliseconds / 10), start);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
}
|
||||
|
||||
|
||||
static void benchmark_TCP()
|
||||
{
|
||||
UINT TEST_PORT = TCP_PORT;
|
||||
ULONG TEST_IP = SERVER_IP;
|
||||
int i;
|
||||
NX_TCP_SOCKET sockfd;
|
||||
int ret;
|
||||
double start;
|
||||
|
||||
|
||||
{
|
||||
NX_PACKET* response;
|
||||
printf("Pinging server to see if up .. ");
|
||||
fflush(stdout);
|
||||
ret = (int)nx_icmp_ping(&g_ip0, TEST_IP, "Hello", strlen("Hello"),
|
||||
&response, 2000);
|
||||
if (ret != NX_SUCCESS) {
|
||||
printf("Unable to ping server, error = 0x%X\n", ret);
|
||||
return;
|
||||
}
|
||||
printf("got response from server\n");
|
||||
nx_packet_release(response);
|
||||
}
|
||||
|
||||
printf("Benchmarking client TCP connection\n");
|
||||
printf("Trying to connect to 0x%lX on port %d\n", TEST_IP, TEST_PORT);
|
||||
start = (double)tx_time_get() / TX_TIMER_TICKS_PER_SECOND;
|
||||
ret = (int)nx_tcp_socket_create(&g_ip0, &sockfd, "TCP_CLIENT", NX_IP_NORMAL,
|
||||
NX_FRAGMENT_OKAY, NX_IP_TIME_TO_LIVE, 256, NX_NULL, NX_NULL);
|
||||
if (ret != NX_SUCCESS) {
|
||||
printf("failed to create socket err = 0x%X\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < CONNECTION_TIMES; i++) {
|
||||
ret = (int)nx_tcp_client_socket_bind(&sockfd, NX_ANY_PORT,
|
||||
NX_WAIT_FOREVER);
|
||||
if (ret != NX_SUCCESS) {
|
||||
printf("failed to bind socket\n");
|
||||
return;
|
||||
}
|
||||
|
||||
ret = (int)nx_tcp_client_socket_connect(&sockfd, TEST_IP, TEST_PORT,
|
||||
NX_WAIT_FOREVER);
|
||||
if (ret != NX_SUCCESS) {
|
||||
printf("failed to connect with error 0x%X\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
nx_tcp_socket_disconnect(&sockfd, NX_WAIT_FOREVER);
|
||||
|
||||
ret = (int)nx_tcp_client_socket_unbind(&sockfd);
|
||||
if (ret != NX_SUCCESS) {
|
||||
printf("failed to unbind with error 0x%X\n", ret);
|
||||
return;
|
||||
}
|
||||
}
|
||||
nx_tcp_socket_delete(&sockfd);
|
||||
|
||||
start = ((double)tx_time_get() / TX_TIMER_TICKS_PER_SECOND) - start;
|
||||
printf("%d TCP connections took %f seconds\n", CONNECTION_TIMES, start);
|
||||
}
|
||||
#endif /* WOLFCRYPT_ONLY */
|
||||
|
||||
/* Benchmark entry function */
|
||||
void app_entry(void)
|
||||
{
|
||||
initialise_monitor_handles();
|
||||
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
wolfSSL_Init();
|
||||
|
||||
#ifndef WOLFCRYPT_ONLY
|
||||
benchmark_TCP();
|
||||
|
||||
printf("\nBenchmarking client TLSv1.2 connection using ECDHE-RSA-AES128-GCM-SHA256\n");
|
||||
benchmark_TLS(2, "ECDHE-RSA-AES128-GCM-SHA256", 0);
|
||||
#ifdef WOLFSSL_TLS13
|
||||
#ifdef HAVE_CURVE25519
|
||||
printf("\nBenchmarking client TLSv1.3 WOLFSSL_ECC_X25519 connection using TLS13_AES128_GCM_SHA256\n");
|
||||
benchmark_TLS(3, "TLS13-AES128-GCM-SHA256", (int)WOLFSSL_ECC_X25519);
|
||||
#endif
|
||||
#ifdef HAVE_ECC
|
||||
printf("\nBenchmarking client TLSv1.3 WOLFSSL_ECC_SECP256R1 connection using TLS13_AES128_GCM_SHA256\n");
|
||||
benchmark_TLS(3, "TLS13-AES128-GCM-SHA256", (int)WOLFSSL_ECC_SECP256R1);
|
||||
#endif
|
||||
printf("\nBenchmarking client TLSv1.3 WOLFSSL_FFDHE_2048 connection using TLS13_AES128_GCM_SHA256\n");
|
||||
benchmark_TLS(3, "TLS13-AES128-GCM-SHA256", (int)WOLFSSL_FFDHE_2048);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
/* run wolfcrypt benchmarks */
|
||||
benchmark_test(NULL);
|
||||
#endif
|
||||
|
||||
wolfSSL_Cleanup();
|
||||
while (1)
|
||||
{
|
||||
tx_thread_sleep (100);
|
||||
}
|
||||
}
|
||||
184
android/extern/wolfssl/IDE/Renesas/e2studio/DK-S7G2/example_server-template/src/app_entry.c
vendored
Normal file
184
android/extern/wolfssl/IDE/Renesas/e2studio/DK-S7G2/example_server-template/src/app_entry.c
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
/* app_entry.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 "app.h"
|
||||
#include "nx_api.h"
|
||||
#include "stdio.h"
|
||||
extern void initialise_monitor_handles(void);
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
#define USE_CERT_BUFFERS_256
|
||||
#include <wolfssl/certs_test.h>
|
||||
#define TLS_PORT 11111
|
||||
|
||||
static void server()
|
||||
{
|
||||
UINT TEST_PORT = TLS_PORT;
|
||||
NX_TCP_SOCKET sockfd;
|
||||
int ret;
|
||||
unsigned char* cert;
|
||||
int certSz;
|
||||
|
||||
unsigned char* key;
|
||||
int keySz;
|
||||
|
||||
WOLFSSL_CTX* ctx;
|
||||
WOLFSSL* ssl;
|
||||
|
||||
ctx = wolfSSL_CTX_new(wolfSSLv23_server_method());
|
||||
if (ctx == NULL) {
|
||||
printf("Unable to create ctx\n");
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef NO_RSA
|
||||
cert = server_cert_der_2048;
|
||||
certSz = sizeof_server_cert_der_2048;
|
||||
key = server_key_der_2048;
|
||||
keySz = sizeof_server_key_der_2048;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* Use ECDSA */
|
||||
cert = serv_ecc_der_256;
|
||||
certSz = sizeof_serv_ecc_der_256;
|
||||
key = ecc_key_der_256;
|
||||
keySz = sizeof_ecc_key_der_256;
|
||||
#endif
|
||||
|
||||
ret = wolfSSL_CTX_use_certificate_buffer(ctx, cert,
|
||||
certSz, SSL_FILETYPE_ASN1);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("Unable to load certificate ret = %d\n", ret);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx, key,
|
||||
keySz, SSL_FILETYPE_ASN1);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("Unable to load key ret = %d\n", ret);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_TLS13
|
||||
{
|
||||
int groups[3];
|
||||
int idx = 0;
|
||||
|
||||
#ifdef HAVE_CURVE25519
|
||||
groups[idx++] = WOLFSSL_ECC_X25519;
|
||||
#endif
|
||||
#ifdef HAVE_ECC
|
||||
groups[idx++] = WOLFSSL_ECC_SECP256R1;
|
||||
#endif
|
||||
groups[idx++] = WOLFSSL_FFDHE_2048;
|
||||
|
||||
ret = wolfSSL_CTX_set_groups(ctx, groups, idx);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("Unable to set groups\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
printf("Waiting for connections on port %d\n", TEST_PORT);
|
||||
|
||||
ret = (int)nx_tcp_socket_create(&g_ip0, &sockfd, "TLS_SERVER", NX_IP_NORMAL,
|
||||
NX_FRAGMENT_OKAY, NX_IP_TIME_TO_LIVE, 1500, NX_NULL, NX_NULL);
|
||||
if (ret != NX_SUCCESS) {
|
||||
printf("failed to create socket err = 0x%X\n", ret);
|
||||
}
|
||||
|
||||
ret = (int)nx_tcp_server_socket_listen(&g_ip0, TEST_PORT, &sockfd,
|
||||
NX_MAX_LISTEN_REQUESTS, NULL);
|
||||
if (ret != NX_SUCCESS) {
|
||||
printf("failed to listen\n");
|
||||
}
|
||||
|
||||
while (1) {
|
||||
ret = (int)nx_tcp_server_socket_accept(&sockfd, NX_WAIT_FOREVER);
|
||||
if (ret != NX_SUCCESS) {
|
||||
printf("failed to accept with error 0x%X\n", ret);
|
||||
break;
|
||||
}
|
||||
|
||||
ssl = wolfSSL_new(ctx);
|
||||
if (ssl == NULL) {
|
||||
printf("Error creating ssl\n");
|
||||
break;
|
||||
}
|
||||
|
||||
wolfSSL_SetIO_NetX(ssl, &sockfd, NX_WAIT_FOREVER);
|
||||
|
||||
ret = wolfSSL_accept(ssl);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("Error %d with wolfssl accept\n", wolfSSL_get_error(ssl, ret));
|
||||
wolfSSL_free(ssl);
|
||||
break;
|
||||
}
|
||||
wolfSSL_free(ssl);
|
||||
|
||||
nx_tcp_socket_disconnect(&sockfd, NX_WAIT_FOREVER);
|
||||
|
||||
ret = (int)nx_tcp_server_socket_unaccept(&sockfd);
|
||||
if (ret != NX_SUCCESS) {
|
||||
printf("failed to unaccept with error 0x%X\n", ret);
|
||||
break;
|
||||
}
|
||||
|
||||
ret = (int)nx_tcp_server_socket_relisten(&g_ip0, TEST_PORT, &sockfd);
|
||||
if (ret != NX_SUCCESS && ret != NX_CONNECTION_PENDING) {
|
||||
printf("failed to relisten 0x%X\n", ret);
|
||||
break;
|
||||
}
|
||||
}
|
||||
ret = (int)nx_tcp_server_socket_unlisten(&g_ip0, TEST_PORT);
|
||||
if (ret != NX_SUCCESS) {
|
||||
printf("failed to unlisten\n");
|
||||
return;
|
||||
}
|
||||
|
||||
nx_tcp_socket_delete(&sockfd);
|
||||
|
||||
wolfSSL_CTX_free(ctx);
|
||||
}
|
||||
|
||||
/* app entry function */
|
||||
void app_entry(void)
|
||||
{
|
||||
initialise_monitor_handles();
|
||||
wolfSSL_Init();
|
||||
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
server();
|
||||
wolfSSL_Cleanup();
|
||||
printf("Server closed down\n");
|
||||
while (1)
|
||||
{
|
||||
tx_thread_sleep (1);
|
||||
}
|
||||
}
|
||||
22
android/extern/wolfssl/IDE/Renesas/e2studio/DK-S7G2/include.am
vendored
Normal file
22
android/extern/wolfssl/IDE/Renesas/e2studio/DK-S7G2/include.am
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/DK-S7G2/README.md
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/DK-S7G2/user_settings.h
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/DK-S7G2/wolfssl-template-project/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/DK-S7G2/wolfssl-template-project/configuration.xml
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/DK-S7G2/wolfcrypttest-template/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/DK-S7G2/wolfcrypttest-template/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/DK-S7G2/wolfcrypttest-template/src/app_entry.c
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/DK-S7G2/example_server-template/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/DK-S7G2/example_server-template/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/DK-S7G2/example_server-template/src/app_entry.c
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/DK-S7G2/benchmark-template/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/DK-S7G2/benchmark-template/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/DK-S7G2/benchmark-template/src/app_entry.c
|
||||
|
||||
77
android/extern/wolfssl/IDE/Renesas/e2studio/DK-S7G2/user_settings.h
vendored
Normal file
77
android/extern/wolfssl/IDE/Renesas/e2studio/DK-S7G2/user_settings.h
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
|
||||
#ifndef USER_SETTINGS_H
|
||||
#define USER_SETTINGS_H
|
||||
|
||||
//#define DEBUG_WOLFSSL
|
||||
|
||||
#define NO_MAIN_DRIVER
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
#define USE_CERT_BUFFERS_256
|
||||
|
||||
/* print out cycles per byte with benchmark when component r_wdt WDT is enabled */
|
||||
#define SYNERGY_CYCLE_COUNT
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
/* Use turn on all SCE acceleration */
|
||||
#define WOLFSSL_SCE
|
||||
|
||||
/* Used to turn off TRNG */
|
||||
/* #define WOLFSSL_SCE_NO_TRNG */
|
||||
|
||||
/* Used to turn off AES hardware acc. */
|
||||
/* #define WOLFSSL_SCE_NO_AES */
|
||||
|
||||
/* Used to turn off HASH hardware acc. */
|
||||
/* #define WOLFSSL_SCE_NO_HASH */
|
||||
|
||||
#if defined(WOLFSSL_SCE_NO_TRNG)
|
||||
/* use unsafe test seed if TRNG not used (not for production) */
|
||||
#define WOLFSSL_GENSEED_FORTEST
|
||||
#endif
|
||||
|
||||
#define HAVE_ECC
|
||||
#define ALT_ECC_SIZE
|
||||
|
||||
#define HAVE_CHACHA
|
||||
#define HAVE_POLY1305
|
||||
#define HAVE_ONE_TIME_AUTH
|
||||
#define HAVE_AESGCM
|
||||
|
||||
#define HAVE_AES_ECB
|
||||
#define WOLFSSL_AES_DIRECT
|
||||
|
||||
#define USE_FAST_MATH
|
||||
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define WC_RSA_BLINDING
|
||||
#define ECC_TIMING_RESISTANT
|
||||
|
||||
#define NO_WOLFSSL_DIR
|
||||
|
||||
#define HAVE_NETX
|
||||
#define THREADX
|
||||
#define THREADX_NO_DC_PRINTF
|
||||
#define NO_WRITEV
|
||||
#define SIZEOF_LONG 4
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
#if 1
|
||||
/* Optimizations */
|
||||
#define WOLFSSL_HAVE_SP_RSA
|
||||
#define WOLFSSL_HAVE_SP_ECC
|
||||
#define WOLFSSL_SP_ARM_CORTEX_M_ASM
|
||||
#endif
|
||||
|
||||
/* TLS 1.3 */
|
||||
#define WOLFSSL_TLS13
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#define HAVE_FFDHE_2048
|
||||
#define HAVE_HKDF
|
||||
#define WC_RSA_PSS
|
||||
|
||||
#define HAVE_CURVE25519
|
||||
#define HAVE_ED25519
|
||||
#define WOLFSSL_SHA512
|
||||
|
||||
#endif
|
||||
78
android/extern/wolfssl/IDE/Renesas/e2studio/DK-S7G2/wolfcrypttest-template/src/app_entry.c
vendored
Normal file
78
android/extern/wolfssl/IDE/Renesas/e2studio/DK-S7G2/wolfcrypttest-template/src/app_entry.c
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
/* app_entry.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 <app.h>
|
||||
#include "stdio.h"
|
||||
extern void initialise_monitor_handles(void);
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/random.h>
|
||||
#include "wolfcrypt/test/test.h"
|
||||
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
char** argv;
|
||||
int return_code;
|
||||
} func_args;
|
||||
|
||||
void app_entry(void)
|
||||
{
|
||||
func_args args;
|
||||
|
||||
args.argc = 0;
|
||||
args.argv = NULL;
|
||||
args.return_code = 0;
|
||||
|
||||
initialise_monitor_handles();
|
||||
wolfCrypt_Init();
|
||||
|
||||
#if 1
|
||||
/* sanity check on RNG */
|
||||
printf("Doing quick sanity check on RNG\n");
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 10; i++) {
|
||||
int j, ret;
|
||||
WC_RNG rng;
|
||||
unsigned char buffer[20] = {0};
|
||||
|
||||
wc_InitRng(&rng);
|
||||
ret = wc_RNG_GenerateBlock(&rng, buffer, 20);
|
||||
if (ret != 0) {
|
||||
printf("Error generating random block\n");
|
||||
}
|
||||
for (j = 0; j < 20; j++) {
|
||||
printf("%02X", buffer[j]);
|
||||
}
|
||||
printf("\n");
|
||||
wc_FreeRng(&rng);
|
||||
}
|
||||
}
|
||||
printf("\n");
|
||||
#endif
|
||||
|
||||
wolfcrypt_test(&args);
|
||||
wolfCrypt_Cleanup();
|
||||
printf("done with wolfcrypt test, ret = %d\n", args.return_code);
|
||||
}
|
||||
352
android/extern/wolfssl/IDE/Renesas/e2studio/DK-S7G2/wolfssl-template-project/configuration.xml
vendored
Normal file
352
android/extern/wolfssl/IDE/Renesas/e2studio/DK-S7G2/wolfssl-template-project/configuration.xml
vendored
Normal file
@@ -0,0 +1,352 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<synergyConfiguration version="4">
|
||||
<generalSettings>
|
||||
<option key="#Board#" value="board.s7g2dk"/>
|
||||
<option key="CPU" value="S7G2"/>
|
||||
<option key="#TargetName#" value="R7FS7G27H2A01CBD"/>
|
||||
<option key="#TargetARCHITECTURE#" value="cortex-m4"/>
|
||||
<option key="#RTOS#" value="Express Logic ThreadX"/>
|
||||
<option key="#pinconfiguration#" value="S7G2-DK.pincfg"/>
|
||||
<option key="#SSPVersion#" value="1.7.0"/>
|
||||
<option key="#DefaultLinkerScript#" value="s7g2.ld"/>
|
||||
<option key="#ConfigurationFragments#" value="Renesas##BSP##Board##s7g2_dk##"/>
|
||||
<option key="#SELECTED_TOOLCHAIN#" value="gcc-arm-embedded"/>
|
||||
</generalSettings>
|
||||
<synergyBspConfiguration>
|
||||
<config id="config.bsp.s7g2.R7FS7G27H2A01CBD">
|
||||
<property id="config.bsp.part_number" value="config.bsp.part_number.value"/>
|
||||
<property id="config.bsp.rom_size_bytes" value="config.bsp.rom_size_bytes.value"/>
|
||||
<property id="config.bsp.ram_size_bytes" value="config.bsp.ram_size_bytes.value"/>
|
||||
<property id="config.bsp.data_flash_size_bytes" value="config.bsp.data_flash_size_bytes.value"/>
|
||||
<property id="config.bsp.package_style" value="config.bsp.package_style.value"/>
|
||||
<property id="config.bsp.package_pins" value="config.bsp.package_pins.value"/>
|
||||
</config>
|
||||
<config id="config.bsp.s7g2">
|
||||
<property id="config.bsp.series" value="config.bsp.series.value"/>
|
||||
</config>
|
||||
<config id="config.bsp.s7g2.ssp">
|
||||
<property id="config.bsp.s7g2.ssp.OFS0" value="config.bsp.s7g2.ssp.OFS0_Register.default"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS0.iwdt_start_mode" value="config.bsp.s7g2.ssp.OFS0.iwdt_start_mode.disabled"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS0.iwdt_timeout" value="config.bsp.s7g2.ssp.OFS0.iwdt_timeout.2048"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS0.iwdt_divisor" value="config.bsp.s7g2.ssp.OFS0.iwdt_divisor.128"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS0.iwdt_window_end" value="config.bsp.s7g2.ssp.OFS0.iwdt_window_end.0"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS0.iwdt_window_start" value="config.bsp.s7g2.ssp.OFS0.iwdt_window_start.100"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS0.iwdt_reset_interrupt" value="config.bsp.s7g2.ssp.OFS0.iwdt_reset_interrupt.Reset"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS0.iwdt_stop_control" value="config.bsp.s7g2.ssp.OFS0.iwdt_stop_control.stops"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS0.wdt_start_mode" value="config.bsp.s7g2.ssp.OFS0.wdt_start_mode.register"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS0.wdt_timeout" value="config.bsp.s7g2.ssp.OFS0.wdt_timeout.16384"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS0.wdt_divisor" value="config.bsp.s7g2.ssp.OFS0.wdt_divisor.128"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS0.wdt_window_end" value="config.bsp.s7g2.ssp.OFS0.wdt_window_end.0"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS0.wdt_window_start" value="config.bsp.s7g2.ssp.OFS0.wdt_window_start.100"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS0.wdt_reset_interrupt" value="config.bsp.s7g2.ssp.OFS0.wdt_reset_interrupt.Reset"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS0.wdt_stop_control" value="config.bsp.s7g2.ssp.OFS0.wdt_stop_control.stops"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS1" value="config.bsp.s7g2.ssp.OFS1_Register.default"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS1.voltage_detection0.start" value="config.bsp.s7g2.ssp.OFS1.voltage_detection0.start.disabled"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS1.voltage_detection0_level" value="config.bsp.s7g2.ssp.OFS1.voltage_detection0_level.280"/>
|
||||
<property id="config.bsp.s7g2.ssp.OFS1.hoco_osc" value="config.bsp.s7g2.ssp.OFS1.hoco_osc.disabled"/>
|
||||
</config>
|
||||
<config id="config.bsp.synergy">
|
||||
<property id="config.bsp.common.main" value="0x800"/>
|
||||
<property id="config.bsp.common.process" value="0"/>
|
||||
<property id="config.bsp.common.heap" value="0x13880"/>
|
||||
<property id="config.bsp.common.vcc" value="3300"/>
|
||||
<property id="config.bsp.common.avcc0" value="3300"/>
|
||||
<property id="config.bsp.common.checking" value="config.bsp.common.checking.enabled"/>
|
||||
<property id="config.bsp.common.assert" value="config.bsp.common.assert.none"/>
|
||||
<property id="config.bsp.common.error_log" value="config.bsp.common.error_log.none"/>
|
||||
<property id="config.bsp.common.id_mode" value="config.bsp.common.id_mode.unlocked"/>
|
||||
<property id="config.bsp.common.id_code" value="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"/>
|
||||
<property id="config.bsp.common.id1" value=""/>
|
||||
<property id="config.bsp.common.id2" value=""/>
|
||||
<property id="config.bsp.common.id3" value=""/>
|
||||
<property id="config.bsp.common.id4" value=""/>
|
||||
<property id="config.bsp.common.id_fixed" value=""/>
|
||||
</config>
|
||||
</synergyBspConfiguration>
|
||||
<synergyClockConfiguration>
|
||||
<node id="board.clock.xtal.freq" mul="24000000" option="_edit"/>
|
||||
<node id="board.clock.usbmclk.freq" option="board.clock.usbmclk.freq"/>
|
||||
<node id="board.clock.pll.source" option="board.clock.pll.source.xtal"/>
|
||||
<node id="board.clock.hoco.freq" option="board.clock.hoco.freq.20m"/>
|
||||
<node id="board.clock.loco.freq" option="board.clock.loco.freq.32768"/>
|
||||
<node id="board.clock.moco.freq" option="board.clock.moco.freq.8m"/>
|
||||
<node id="board.clock.subclk.freq" option="board.clock.subclk.freq.32768"/>
|
||||
<node id="board.clock.pll.div" option="board.clock.pll.div.2"/>
|
||||
<node id="board.clock.pll.mul" option="board.clock.pll.mul.200"/>
|
||||
<node id="board.clock.pll.display" option="board.clock.pll.display.value"/>
|
||||
<node id="board.clock.clock.source" option="board.clock.clock.source.pll"/>
|
||||
<node id="board.clock.iclk.div" option="board.clock.iclk.div.1"/>
|
||||
<node id="board.clock.iclk.display" option="board.clock.iclk.display.value"/>
|
||||
<node id="board.clock.pclka.div" option="board.clock.pclka.div.2"/>
|
||||
<node id="board.clock.pclka.display" option="board.clock.pclka.display.value"/>
|
||||
<node id="board.clock.pclkb.div" option="board.clock.pclkb.div.4"/>
|
||||
<node id="board.clock.pclkb.display" option="board.clock.pclkb.display.value"/>
|
||||
<node id="board.clock.pclkc.div" option="board.clock.pclkc.div.4"/>
|
||||
<node id="board.clock.pclkc.display" option="board.clock.pclkc.display.value"/>
|
||||
<node id="board.clock.pclkd.div" option="board.clock.pclkd.div.2"/>
|
||||
<node id="board.clock.pclkd.display" option="board.clock.pclkd.display.value"/>
|
||||
<node id="board.clock.sdclkout.div" option="board.clock.sdclkout.div.1"/>
|
||||
<node id="board.clock.sdclkout.display" option="board.clock.sdclkout.display.value"/>
|
||||
<node id="board.clock.bclk.div" option="board.clock.bclk.div.2"/>
|
||||
<node id="board.clock.bclk.display" option="board.clock.bclk.display.value"/>
|
||||
<node id="board.clock.bclkout.div" option="board.clock.bclkout.div.2"/>
|
||||
<node id="board.clock.bclkout.display" option="board.clock.bclkout.display.value"/>
|
||||
<node id="board.clock.uclk.div" option="board.clock.uclk.div.5"/>
|
||||
<node id="board.clock.uclk.display" option="board.clock.uclk.display.value"/>
|
||||
<node id="board.clock.fclk.div" option="board.clock.fclk.div.4"/>
|
||||
<node id="board.clock.fclk.display" option="board.clock.fclk.display.value"/>
|
||||
</synergyClockConfiguration>
|
||||
<synergyComponentSelection>
|
||||
<component apiversion="" class="Common" condition="" group="all" subgroup="ssp_common" variant="" vendor="Renesas" version="1.7.0">
|
||||
<description>SSP Common Code</description>
|
||||
<originalPack>Renesas.Synergy.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="HAL Drivers" condition="" group="all" subgroup="r_cgc" variant="" vendor="Renesas" version="1.7.0">
|
||||
<description>Clock Generation Circuit: Provides=[CGC]</description>
|
||||
<originalPack>Renesas.Synergy.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="HAL Drivers" condition="" group="all" subgroup="r_elc" variant="" vendor="Renesas" version="1.7.0">
|
||||
<description>Event Link Controller: Provides=[ELC]</description>
|
||||
<originalPack>Renesas.Synergy.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="HAL Drivers" condition="" group="all" subgroup="r_fmi" variant="" vendor="Renesas" version="1.7.0">
|
||||
<description>Factory MCU Information Module: Provides=[FMI]</description>
|
||||
<originalPack>Renesas.Synergy.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="HAL Drivers" condition="" group="all" subgroup="r_ioport" variant="" vendor="Renesas" version="1.7.0">
|
||||
<description>I/O Port: Provides=[IO Port]</description>
|
||||
<originalPack>Renesas.Synergy.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="BSP" condition="" group="s7g2" subgroup="device" variant="R7FS7G27H2A01CBD" vendor="Renesas" version="1.7.0">
|
||||
<description>Board support package for R7FS7G27H2A01CBD</description>
|
||||
<originalPack>Renesas.Synergy_mcu_s7g2.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="BSP" condition="" group="s7g2" subgroup="device" variant="" vendor="Renesas" version="1.7.0">
|
||||
<description>Board support package for S7G2</description>
|
||||
<originalPack>Renesas.Synergy_mcu_s7g2.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="BSP" condition="" group="s7g2" subgroup="ssp" variant="" vendor="Renesas" version="1.7.0">
|
||||
<description>Board support package for S7G2</description>
|
||||
<originalPack>Renesas.Synergy_mcu_s7g2.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="BSP" condition="" group="Board" subgroup="s7g2_dk" variant="" vendor="Renesas" version="1.7.0">
|
||||
<description>S7G2_DK Board Support Files</description>
|
||||
<originalPack>Renesas.Synergy_board_s7g2_dk.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="HAL Drivers" condition="" group="all" subgroup="r_rtc" variant="" vendor="Renesas" version="1.7.0">
|
||||
<description>Real Time Clock: Provides=[RTC]</description>
|
||||
<originalPack>Renesas.Synergy.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="HAL Drivers" condition="" group="all" subgroup="r_gpt" variant="" vendor="Renesas" version="1.7.0">
|
||||
<description>General Purpose Timer: Provides=[Timer ,GPT]</description>
|
||||
<originalPack>Renesas.Synergy.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="HAL Drivers" condition="" group="all" subgroup="r_wdt" variant="" vendor="Renesas" version="1.7.0">
|
||||
<description>Watchdog Timer: Provides=[WDT]</description>
|
||||
<originalPack>Renesas.Synergy.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="Express Logic" condition="" group="all" subgroup="nx" variant="" vendor="Renesas" version="1.7.0">
|
||||
<description>Express Logic NetX: Provides=[NetX] , Requires=[ThreadX ,NetX Driver]</description>
|
||||
<originalPack>Renesas.Synergy.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="Framework Services" condition="" group="all" subgroup="sf_el_nx" variant="" vendor="Renesas" version="1.7.0">
|
||||
<description>Express Logic NetX Synergy Port: Provides=[NetX Driver] , Requires=[NetX]</description>
|
||||
<originalPack>Renesas.Synergy.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="Express Logic" condition="" group="all" subgroup="tx" variant="" vendor="Renesas" version="1.7.0">
|
||||
<description>Express Logic ThreadX: Provides=[ThreadX]</description>
|
||||
<originalPack>Renesas.Synergy.1.7.0.pack</originalPack>
|
||||
</component>
|
||||
</synergyComponentSelection>
|
||||
<synergyIcuConfiguration/>
|
||||
<synergyMessagingConfiguration/>
|
||||
<synergyModuleConfiguration>
|
||||
<module id="module.driver.cgc_on_cgc.0">
|
||||
<property id="module.driver.cgc.name" value="g_cgc"/>
|
||||
</module>
|
||||
<module id="module.driver.elc_on_elc.0">
|
||||
<property id="module.driver.elc.name" value="g_elc"/>
|
||||
</module>
|
||||
<module id="module.driver.ioport_on_ioport.0">
|
||||
<property id="module.driver.ioport.name" value="g_ioport"/>
|
||||
</module>
|
||||
<module id="module.driver.fmi_on_fmi.0">
|
||||
<property id="module.driver.fmi.name" value="g_fmi"/>
|
||||
</module>
|
||||
<module id="module.el.nx_dhcp_client.2074847952">
|
||||
<property id="module.el.nx_dhcp_client.name" value="g_dhcp_client0"/>
|
||||
<property id="module.el.nx_dhcp_client.init_function" value="dhcp_client_init0"/>
|
||||
<property id="module.el.nx_dhcp_client.init" value="module.el.nx_dhcp_client.init.enable"/>
|
||||
<property id="module.el.nx_dhcp_client.option" value="module.el.nx_dhcp_client.option.disable"/>
|
||||
<property id="module.el.nx_dhcp_client.option_func" value="module.el.nx_dhcp_client.option_func.enable"/>
|
||||
<property id="module.el.nx_dhcp_client.option_function" value="dhcp_user_option_add_client0"/>
|
||||
</module>
|
||||
<module id="module.el.nx.ip.1717699054">
|
||||
<property id="module.el.nx.ip.name" value="g_ip0"/>
|
||||
<property id="module.el.nx.ip.address" value="10.22.73.148"/>
|
||||
<property id="module.el.nx.ip.subnet_mask" value="255.255.255.0"/>
|
||||
<property id="module.el.nx.ip.gateway_address" value="10.22.73.81"/>
|
||||
<property id="module.el.nx.ip.stack_size" value="2048"/>
|
||||
<property id="module.el.nx.ip.priority" value="3"/>
|
||||
<property id="module.el.nx.ip.arp" value="module.el.nx.ip.arp.enable"/>
|
||||
<property id="module.el.nx.ip.arp_cache_size_units" value="module.el.nx.ip.arp_cache_size_units.bytes"/>
|
||||
<property id="module.el.nx.ip.arp_cache_size" value="520"/>
|
||||
<property id="module.el.nx.ip.rarp" value="module.el.nx.ip.rarp.disable"/>
|
||||
<property id="module.el.nx.ip.tcp" value="module.el.nx.ip.tcp.enable"/>
|
||||
<property id="module.el.nx.ip.udp" value="module.el.nx.ip.udp.enable"/>
|
||||
<property id="module.el.nx.ip.icmp" value="module.el.nx.ip.icmp.enable"/>
|
||||
<property id="module.el.nx.ip.igmp" value="module.el.nx.ip.igmp.enable"/>
|
||||
<property id="module.el.nx.ip.fragmentation" value="module.el.nx.ip.fragmentation.disable"/>
|
||||
<property id="module.el.nx.ip.init_function" value="ip_init0"/>
|
||||
<property id="module.el.nx.ip.init" value="module.el.nx.ip.init.enable"/>
|
||||
<property id="module.el.nx.ip.link_change_callback" value="NULL"/>
|
||||
</module>
|
||||
<module id="module.el.nx_common.1657773571">
|
||||
<property id="module.el.nx_common.init_function" value="nx_common_init0"/>
|
||||
<property id="module.el.nx_common.init" value="module.el.nx_common.init.enable"/>
|
||||
</module>
|
||||
<module id="module.framework.sf_el_nx.288401173">
|
||||
<property id="module.framework.sf_el_nx.name" value="g_sf_el_nx"/>
|
||||
<property id="module.framework.sf_el_nx.channel" value="1"/>
|
||||
<property id="module.framework.sf_el_nx.mac_update_callback" value="NULL"/>
|
||||
<property id="module.framework.sf_el_nx.receive_callback" value="NULL"/>
|
||||
</module>
|
||||
<module id="module.el.nx.packet_pool.1674567974">
|
||||
<property id="module.el.nx.packet_pool.name" value="g_packet_pool0"/>
|
||||
<property id="module.el.nx.packet_pool.packet_size" value="1568"/>
|
||||
<property id="module.el.nx.packet_pool.number_of_packets" value="16"/>
|
||||
<property id="module.el.nx.packet_pool.init_function" value="packet_pool_init0"/>
|
||||
<property id="module.el.nx.packet_pool.init" value="module.el.nx.packet_pool.init.enable"/>
|
||||
</module>
|
||||
<module id="module.driver.rtc_on_rtc.686778801">
|
||||
<property id="module.driver.rtc.name" value="g_rtc0"/>
|
||||
<property id="module.driver.rtc.clock_source" value="module.driver.rtc.clock_source.clock_source_loco"/>
|
||||
<property id="module.driver.rtc.auto_configure" value="module.driver.rtc.auto_configure.enabled"/>
|
||||
<property id="module.driver.rtc.error_adjustment_value" value="0"/>
|
||||
<property id="module.driver.rtc.error_adjustment_type" value="module.driver.rtc.error_adjustment_type.error_adjustment_none"/>
|
||||
<property id="module.driver.rtc.p_callback" value="NULL"/>
|
||||
<property id="module.driver.rtc.alarm_ipl" value="board.icu.common.irq.disabled"/>
|
||||
<property id="module.driver.rtc.periodic_ipl" value="board.icu.common.irq.disabled"/>
|
||||
<property id="module.driver.rtc.carry_ipl" value="board.icu.common.irq.priority12"/>
|
||||
</module>
|
||||
<module id="module.driver.timer_on_gpt.42335020">
|
||||
<property id="module.driver.timer.name" value="g_timer0"/>
|
||||
<property id="module.driver.timer.channel" value="1"/>
|
||||
<property id="module.driver.timer.mode" value="module.driver.timer.mode.mode_periodic"/>
|
||||
<property id="module.driver.timer.shortest_pwm_signal" value="module.driver.timer.mode.shortest_pwm_signal_disabled"/>
|
||||
<property id="module.driver.timer.period" value="100"/>
|
||||
<property id="module.driver.timer.unit" value="module.driver.timer.unit.unit_period_msec"/>
|
||||
<property id="module.driver.timer.duty_cycle" value="50"/>
|
||||
<property id="module.driver.timer.duty_cycle_unit" value="module.driver.timer.duty_cycle_unit.unit_percent"/>
|
||||
<property id="module.driver.timer.autostart" value="module.driver.timer.autostart.false"/>
|
||||
<property id="module.driver.timer.gtioca_output_enabled" value="module.driver.timer.gtioca_output_enabled.false"/>
|
||||
<property id="module.driver.timer.gtioca_stop_level" value="module.driver.timer.gtioca_stop_level.pin_level_low"/>
|
||||
<property id="module.driver.timer.gtiocb_output_enabled" value="module.driver.timer.gtiocb_output_enabled.false"/>
|
||||
<property id="module.driver.timer.gtiocb_stop_level" value="module.driver.timer.gtiocb_stop_level.pin_level_low"/>
|
||||
<property id="module.driver.timer.p_callback" value="timer_callback"/>
|
||||
<property id="module.driver.timer.irq_ipl" value="board.icu.common.irq.priority0"/>
|
||||
</module>
|
||||
<context id="_hal.0">
|
||||
<stack module="module.driver.fmi_on_fmi.0"/>
|
||||
<stack module="module.driver.cgc_on_cgc.0"/>
|
||||
<stack module="module.driver.elc_on_elc.0"/>
|
||||
<stack module="module.driver.ioport_on_ioport.0"/>
|
||||
<stack module="module.driver.rtc_on_rtc.686778801"/>
|
||||
<stack module="module.driver.timer_on_gpt.42335020"/>
|
||||
</context>
|
||||
<context id="rtos.threadx.thread.1032505630">
|
||||
<property id="_symbol" value="app"/>
|
||||
<property id="rtos.threadx.thread.name" value="app"/>
|
||||
<property id="rtos.threadx.thread.stack" value="32000"/>
|
||||
<property id="rtos.threadx.thread.priority" value="4"/>
|
||||
<property id="rtos.threadx.thread.autostart" value="rtos.threadx.thread.autostart.enabled"/>
|
||||
<property id="rtos.threadx.thread.timeslice" value="1"/>
|
||||
<stack module="module.el.nx.ip.1717699054">
|
||||
<stack module="module.el.nx_common.1657773571" requires="module.el.nx.ip.requires.nx_common"/>
|
||||
<stack module="module.el.nx.packet_pool.1674567974" requires="module.el.nx.ip.requires.nx.packet_pool">
|
||||
<stack module="module.el.nx_common.1657773571" requires="module.el.nx.packet_pool.requires.nx_common"/>
|
||||
</stack>
|
||||
<stack module="module.framework.sf_el_nx.288401173" requires="module.el.nx.ip.requires.sf_el_nx"/>
|
||||
</stack>
|
||||
</context>
|
||||
<config id="config.driver.wdt">
|
||||
<property id="config.driver.wdt.param_checking_enable" value="config.driver.wdt.param_checking_enable.bsp"/>
|
||||
</config>
|
||||
<config id="config.framework.sf_el_nx">
|
||||
<property id="config.framework.sf_el_nx.param_checking_enable" value="config.framework.sf_el_nx.param_checking_enable.bsp"/>
|
||||
<property id="config.framework.sf_el_nx.pin0" value="IOPORT_PORT_09_PIN_03"/>
|
||||
<property id="config.framework.sf_el_nx.mach0" value="0x00002E09"/>
|
||||
<property id="config.framework.sf_el_nx.macl0" value="0x0A0076C7"/>
|
||||
<property id="config.framework.sf_el_nx.pin1" value="IOPORT_PORT_07_PIN_06"/>
|
||||
<property id="config.framework.sf_el_nx.mach1" value="0x00002E09"/>
|
||||
<property id="config.framework.sf_el_nx.macl1" value="0x0A0076C8"/>
|
||||
<property id="config.framework.sf_el_nx.num_rx_desc" value="8"/>
|
||||
<property id="config.framework.sf_el_nx.num_tx_desc" value="32"/>
|
||||
<property id="config.framework.sf_el_nx.irq_ipl" value="board.icu.common.irq.priority12"/>
|
||||
<property id="config.framework.sf_el_nx.monitor_method" value="config.framework.sf_el_nx.monitor_method.polling"/>
|
||||
</config>
|
||||
<config id="config.driver.cgc">
|
||||
<property id="config.driver.cgc.param_checking_enable" value="config.driver.cgc.param_checking_enable.bsp"/>
|
||||
<property id="config.driver.cgc.main_osc_wait" value="config.driver.cgc.main_osc_wait.wait_547"/>
|
||||
<property id="config.driver.cgc.main_osc_clock_source" value="config.driver.cgc.main_osc_clock_source.crystal"/>
|
||||
<property id="config.driver.cgc.subclock_drive" value="config.driver.cgc.subclock_drive.standard"/>
|
||||
<property id="config.driver.cgc.subclock_at_reset_enable" value="config.driver.cgc.subclock_at_reset_enable.enabled"/>
|
||||
<property id="config.driver.cgc.low_voltage_mode" value="config.driver.cgc.low_voltage_mode.disabled"/>
|
||||
</config>
|
||||
<config id="config.driver.ioport">
|
||||
<property id="config.driver.ioport.checking" value="config.driver.ioport.checking.system"/>
|
||||
</config>
|
||||
<config id="config.threadx.thread"/>
|
||||
<config id="config.el.nx"/>
|
||||
<config id="config.el.nx_dhcp_common">
|
||||
<property id="config.el.nx_dhcp_common.tos" value="config.el.nx_dhcp_common.tos.normal"/>
|
||||
<property id="config.el.nx_dhcp_common.fragment_option" value="config.el.nx_dhcp_common.fragment_option.dont_fragment"/>
|
||||
<property id="config.el.nx_dhcp_common.time_to_live" value="128"/>
|
||||
<property id="config.el.nx_dhcp_common.queue_depth" value="5"/>
|
||||
</config>
|
||||
<config id="config.el.nx_http_common">
|
||||
<property id="config.el.nx_http_common.tos" value="config.el.nx_http_common.tos.normal"/>
|
||||
<property id="config.el.nx_http_common.fragment_option" value="config.el.nx_http_common.fragment_option.dont_fragment"/>
|
||||
<property id="config.el.nx_http_common.time_to_live" value="128"/>
|
||||
<property id="config.el.nx_http_common.digest" value="config.el.nx_http_common.digest.disable"/>
|
||||
<property id="config.el.nx_http_common.max_resource" value="40"/>
|
||||
</config>
|
||||
<config id="config.el.nx_ftp_common">
|
||||
<property id="config.el.nx_ftp_common.filex" value="config.el.nx_ftp_common.filex.enable"/>
|
||||
<property id="config.el.nx_ftp_common.control_tos" value="config.el.nx_ftp_common.control_tos.normal"/>
|
||||
<property id="config.el.nx_ftp_common.data_tos" value="config.el.nx_ftp_common.data_tos.normal"/>
|
||||
<property id="config.el.nx_ftp_common.fragment_option" value="config.el.nx_ftp_common.fragment_option.dont_fragment"/>
|
||||
<property id="config.el.nx_ftp_common.time_to_live" value="128"/>
|
||||
<property id="config.el.nx_ftp_common.timeout_period" value="60"/>
|
||||
</config>
|
||||
<config id="config.el.nx_tftp_common">
|
||||
<property id="config.el.nx_tftp_common.error_string_max" value="64"/>
|
||||
<property id="config.el.nx_tftp_common.time_to_live" value="128"/>
|
||||
<property id="config.el.nx_tftp_common.tos" value="config.el.nx_tftp_common.tos.normal"/>
|
||||
<property id="config.el.nx_tftp_common.fragment_option" value="config.el.nx_tftp_common.fragment_option.dont_fragment"/>
|
||||
</config>
|
||||
<config id="config.el.nx_telnet_common">
|
||||
<property id="config.el.nx_telnet_common.control_tos" value="config.el.nx_telnet_common.control_tos.normal"/>
|
||||
<property id="config.el.nx_telnet_common.fragment_option" value="config.el.nx_telnet_common.fragment_option.dont_fragment"/>
|
||||
<property id="config.el.nx_telnet_common.telnet_server_port" value="23"/>
|
||||
<property id="config.el.nx_telnet_common.time_to_live" value="128"/>
|
||||
</config>
|
||||
<config id="config.driver.gpt">
|
||||
<property id="config.driver.gpt.param_checking_enable" value="config.driver.gpt.param_checking_enable.bsp"/>
|
||||
</config>
|
||||
<config id="config.driver.fmi">
|
||||
<property id="config.driver.fmi.param_checking_enable" value="config.driver.fmi.param_checking_enable.bsp"/>
|
||||
<property id="config.driver.fmi.custom_base_address_symbol" value="g_fmi_data"/>
|
||||
<property id="config.driver.fmi.part_number_mask" value="0xFE00"/>
|
||||
</config>
|
||||
<config id="config.driver.rtc">
|
||||
<property id="config.driver.rtc.param_checking_enable" value="config.driver.rtc.param_checking_enable.bsp"/>
|
||||
</config>
|
||||
<config id="config.driver.elc">
|
||||
<property id="config.driver.elc.checking" value="config.driver.elc.checking.system"/>
|
||||
</config>
|
||||
</synergyModuleConfiguration>
|
||||
<synergyPinConfiguration>
|
||||
<pincfg active="true" name="S7G2-DK.pincfg" symbol="g_bsp_pin_cfg"/>
|
||||
</synergyPinConfiguration>
|
||||
</synergyConfiguration>
|
||||
18
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/README
vendored
Normal file
18
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/README
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
This is procedure how to build wolfssl and test project on Renesas e2studio.
|
||||
|
||||
wolfssl:
|
||||
Build wolfssl.lib
|
||||
|
||||
test:
|
||||
Get missing files
|
||||
- create DUMMY project
|
||||
- copy generate directory of DUMMY project under src directory of test project
|
||||
- uncomment "Use SIM I/O" lines in resetprg.c
|
||||
- set heap size in sbrk.h
|
||||
- set stack size in stacksct.h
|
||||
- replace lowlvl.src with sample project's lowlvl.src which you can download below.
|
||||
https://www.renesas.com/jp/ja/software/D3012028.html
|
||||
* copy lowlvl.c and lowlvl.h in sample project's above into src directory of test project too.
|
||||
Build test wolfCrypt
|
||||
|
||||
Setting MPU: R5F565MLCxFC or R5F571MLDxFC
|
||||
22
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/common/strings.h
vendored
Normal file
22
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/common/strings.h
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/* strings.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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);
|
||||
22
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/common/unistd.h
vendored
Normal file
22
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/common/unistd.h
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/* unistd.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 */
|
||||
86
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/common/user_settings.h
vendored
Normal file
86
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/common/user_settings.h
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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
|
||||
*/
|
||||
|
||||
#define NO_MAIN_DRIVER
|
||||
#define BENCH_EMBEDDED
|
||||
#define NO_WRITEV
|
||||
#define WOLFSSL_USER_IO
|
||||
#define NO_DEV_RANDOM
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
#define WOLFSSL_USER_CURRTIME
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
#define NO_FILESYSTEM
|
||||
#define WOLFSSL_LOG_PRINTF
|
||||
#define WOLFSSL_HAVE_MIN
|
||||
#define WOLFSSL_HAVE_MAX
|
||||
#if !defined(min)
|
||||
#define min(data1, data2) _builtin_min(data1, data2)
|
||||
#endif
|
||||
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
#define WOLFSSL_DH_CONST
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
|
||||
#define USER_TIME
|
||||
#define XTIME time
|
||||
#define USE_WOLF_SUSECONDS_T
|
||||
#define USE_WOLF_TIMEVAL_T
|
||||
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
#define WC_RSA_BLINDING
|
||||
|
||||
#define SINGLE_THREADED /* or define RTOS option */
|
||||
#ifndef SINGLE_THREADED
|
||||
/* expects use FRERRTOS */
|
||||
#define FREERTOS
|
||||
#endif
|
||||
|
||||
/* #define NO_DH */
|
||||
#define HAVE_AESGCM
|
||||
#define WOLFSSL_SHA512
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define CURVE25519_SMALL
|
||||
#define HAVE_ED25519
|
||||
|
||||
/* #define NO_WOLFSSL_STUB */
|
||||
/* #define DEBUG_WOLFSSL */
|
||||
/* TSIP TLS specific definitions */
|
||||
#if !defined(WOLFSSL_RENESAS_TSIP)
|
||||
#define OPENSSL_EXTRA
|
||||
#define WOLFSSL_GENSEED_FORTEST /* Warning: define your own seed gen */
|
||||
#else
|
||||
#if defined(WOLFSSL_RENESAS_RX65N)
|
||||
/* In the case of Static RSA and AES-CBC use */
|
||||
#define HAVE_AES_CBC
|
||||
/* TSIP ver 1.0.6 or lower supports only static RSA as Public-key cryptography. */
|
||||
#define WOLFSSL_STATIC_RSA
|
||||
/* for disabling TSIP CRYPT and TSIP TLS */
|
||||
/* #define NO_RENESAS_TSIP_CRYPT */
|
||||
/* for disabling only TSIP TLS-linked Common key encryption method */
|
||||
/* #define NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION */
|
||||
#endif
|
||||
#endif
|
||||
41
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/common/wolfssl_dummy.c
vendored
Normal file
41
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/common/wolfssl_dummy.c
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
/* wolfssl_dummy.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 2019
|
||||
#define MON 5
|
||||
|
||||
static int tick = 0;
|
||||
|
||||
time_t time(time_t *t)
|
||||
{
|
||||
return ((YEAR-1970)*365+30*MON)*24*60*60 + tick++;
|
||||
}
|
||||
|
||||
#include <ctype.h>
|
||||
int strncasecmp(const char *s1, const char * s2, unsigned int sz)
|
||||
{
|
||||
for( ; sz>0; sz--)
|
||||
if(toupper(s1++) != toupper(s2++))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
19
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/include.am
vendored
Normal file
19
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/include.am
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/README
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/wolfssl/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/wolfssl/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/src/test_main.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/src/key_data.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/src/key_data.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/src/wolf_client.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/src/wolf_server.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/test/src/wolfssl_demo.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/common/wolfssl_dummy.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/common/strings.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/common/unistd.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/Projects/common/user_settings.h
|
||||
166
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/test/src/key_data.c
vendored
Normal file
166
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/test/src/key_data.c
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
/* key_data.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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"
|
||||
#ifdef WOLFSSL_RENESAS_TSIP
|
||||
|
||||
/* The following key data is an dummy data. */
|
||||
/* Please replace them by your own data */
|
||||
const st_key_block_data_t g_key_block_data =
|
||||
{
|
||||
|
||||
/* uint8_t encrypted_session_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2]; */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
},
|
||||
/* uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE]; */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
},
|
||||
/* uint8_t encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16]; */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
},
|
||||
};
|
||||
|
||||
const uint32_t s_flash[] =
|
||||
{
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
};
|
||||
|
||||
/* ./ca-cert.der.sign, */
|
||||
const unsigned char ca_cert_sig[] =
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
const int sizeof_ca_cert_sig = sizeof(ca_cert_sig);
|
||||
|
||||
/* ./client-cert.der.sign, */
|
||||
const unsigned char client_cert_der_sign[] =
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
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
|
||||
47
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/test/src/key_data.h
vendored
Normal file
47
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/test/src/key_data.h
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/* key_data.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
#ifdef WOLFSSL_RENESAS_TSIP
|
||||
#include "r_tsip_rx_if.h"
|
||||
|
||||
/** user key data */
|
||||
typedef struct key_block_data
|
||||
{
|
||||
uint8_t encrypted_session_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];
|
||||
} st_key_block_data_t;
|
||||
|
||||
extern const st_key_block_data_t g_key_block_data;
|
||||
extern const uint32_t s_flash[];
|
||||
extern const unsigned char ca_cert_der[];
|
||||
extern const int sizeof_ca_cert_der;
|
||||
extern const unsigned char ca_cert_sig[];
|
||||
extern const unsigned char client_cert_der_sign[];
|
||||
|
||||
#endif /* WOLFSSL_RENESAS_TSIP */
|
||||
#endif /* KEY_DATA_H_ */
|
||||
|
||||
221
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/test/src/test_main.c
vendored
Normal file
221
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/test/src/test_main.c
vendored
Normal file
@@ -0,0 +1,221 @@
|
||||
/* test_main.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 "typedefine.h"
|
||||
#ifdef __cplusplus
|
||||
//#include <ios> // Remove the comment when you use ios
|
||||
//_SINT ios_base::Init::init_cnt; // Remove the comment when you use ios
|
||||
#endif
|
||||
|
||||
#include "stdio.h"
|
||||
#include "stdint.h"
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include "wolfssl/wolfcrypt/types.h"
|
||||
#include "wolfssl_demo.h"
|
||||
|
||||
void main(void);
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
void abort(void);
|
||||
}
|
||||
#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];
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
#include "key_data.h"
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h>
|
||||
|
||||
extern const st_key_block_data_t g_key_block_data;
|
||||
#endif
|
||||
#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) && 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(WOLFSSL_RENESAS_TSIP) && 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
|
||||
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)
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
const char* cipherlist[] = {
|
||||
/* NULL */
|
||||
"AES128-SHA",
|
||||
"AES128-SHA256",
|
||||
"AES256-SHA",
|
||||
"AES256-SHA256"
|
||||
};
|
||||
const int cipherlist_sz = 4;
|
||||
#else
|
||||
const char* cipherlist[] = { NULL };
|
||||
const int cipherlist_sz = 0;
|
||||
|
||||
#endif
|
||||
int i = 0;
|
||||
|
||||
Open_tcp();
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
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
|
||||
205
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/test/src/wolf_client.c
vendored
Normal file
205
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/test/src/wolf_client.c
vendored
Normal file
@@ -0,0 +1,205 @@
|
||||
/* wolf_client.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 <string.h>
|
||||
#include "r_t4_itcpip.h"
|
||||
|
||||
#include "wolfssl/wolfcrypt/settings.h"
|
||||
#include "wolfssl/ssl.h"
|
||||
#include "wolfssl/certs_test.h"
|
||||
#include "key_data.h"
|
||||
|
||||
#define SIMPLE_TLSSEVER_IP "192.168.1.45"
|
||||
#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;
|
||||
|
||||
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
|
||||
#ifdef USE_ECC_CERT
|
||||
const unsigned char *cert = ca_ecc_der_256;
|
||||
#define SIZEOF_CERT sizeof_ca_ecc_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;
|
||||
}
|
||||
|
||||
#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 1");
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/* 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", 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;
|
||||
}
|
||||
203
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/test/src/wolf_server.c
vendored
Normal file
203
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/test/src/wolf_server.c
vendored
Normal file
@@ -0,0 +1,203 @@
|
||||
/* wolf_server.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 <string.h>
|
||||
#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
|
||||
#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;
|
||||
#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);
|
||||
tcp_sht_cep(cepid);
|
||||
}
|
||||
48
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/test/src/wolfssl_demo.h
vendored
Normal file
48
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/test/src/wolfssl_demo.h
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/* wolfssl_demo.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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();
|
||||
void wolfSSL_TLS_server();
|
||||
|
||||
#endif /* WOLFSSL_DEMO_H_ */
|
||||
52
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/tools/generate_rsa_keypair.sh
vendored
Normal file
52
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/tools/generate_rsa_keypair.sh
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
|
||||
function usage(){
|
||||
cat << _EOT_
|
||||
Usage :
|
||||
$0 [-g] [-]
|
||||
|
||||
Description:
|
||||
Generate 2048 bit Rsa key pair and Display modulus and public exponent
|
||||
|
||||
Options:
|
||||
-g generate rsa key pair, default on
|
||||
-s only show modulus and public exponent
|
||||
_EOT_
|
||||
exit 1
|
||||
}
|
||||
|
||||
FLAG_G="on"
|
||||
FLAG_S="off"
|
||||
|
||||
while getopts gsh OPT
|
||||
do
|
||||
case $OPT in
|
||||
g)
|
||||
FLAG_G="on"
|
||||
;;
|
||||
s)
|
||||
FLAG_S="on"
|
||||
FLAG_G="off"
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
;;
|
||||
\?)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $FLAG_G = "on" ]; then
|
||||
# generate 2048bit Rsa private key
|
||||
openssl genrsa 2048 2> /dev/null > private-key.pem
|
||||
# expose public key
|
||||
openssl rsa -in private-key.pem -pubout -out public-key.pem 2> /dev/null
|
||||
fi
|
||||
|
||||
if [ $FLAG_S = "on" ]; then
|
||||
# display modulus and exponent
|
||||
openssl rsa -modulus < private-key.pem 2>/dev/null | grep Modulus=
|
||||
openssl rsa -text < private-key.pem 2> /dev/null | grep publicExponent
|
||||
fi
|
||||
|
||||
89
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/tools/genhexbuf.pl
vendored
Normal file
89
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/tools/genhexbuf.pl
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# genhexbuf.pl
|
||||
# Copyright (C) 2020 wolfSSL Inc.
|
||||
#
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
# ---- SCRIPT SETTINGS -------------------------------------------------------
|
||||
|
||||
# output C header file to write cert/key buffers to
|
||||
my $outputFile = "certs_sig_data.h";
|
||||
|
||||
# rsa keys and certs to be converted
|
||||
|
||||
my @fileList = (
|
||||
# please add your der file and name of the data for C language
|
||||
# der file name name of the data
|
||||
#[ "./yourder.der", "your_der_name_in_C" ],
|
||||
[ "./ca-cert.der", "ca_cert_der" ],
|
||||
[ "./ca-cert.der.sign", "ca_cert_der_sign" ],
|
||||
);
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
my $num = @fileList;
|
||||
|
||||
# open our output file, "+>" creates and/or truncates
|
||||
open OUT_FILE, "+>", $outputFile or die $!;
|
||||
|
||||
print OUT_FILE "/* certs_sig_data.h */\n\n";
|
||||
print OUT_FILE "#ifndef WOLFSSL_CERTS_SIG_DATA_H\n";
|
||||
print OUT_FILE "#define WOLFSSL_CERTS_SIG_DATA_H\n\n";
|
||||
|
||||
|
||||
# convert and print 1024-bit cert/keys
|
||||
for (my $i = 0; $i < $num; $i++) {
|
||||
|
||||
my $fname = $fileList[$i][0];
|
||||
my $sname = $fileList[$i][1];
|
||||
|
||||
print OUT_FILE "/* $fname, */\n";
|
||||
print OUT_FILE "static const unsigned char $sname\[] =\n";
|
||||
print OUT_FILE "{\n";
|
||||
file_to_hex($fname);
|
||||
print OUT_FILE "};\n";
|
||||
print OUT_FILE "static const int sizeof_$sname = sizeof($sname);\n\n";
|
||||
}
|
||||
print OUT_FILE "#endif /* WOLFSSL_CERTS_SIG_DATA_H */\n\n";
|
||||
|
||||
|
||||
# print file as hex, comma-separated, as needed by C buffer
|
||||
sub file_to_hex {
|
||||
my $fileName = $_[0];
|
||||
|
||||
open my $fp, "<", $fileName or die $!;
|
||||
binmode($fp);
|
||||
|
||||
my $fileLen = -s $fileName;
|
||||
my $byte;
|
||||
|
||||
for (my $i = 0, my $j = 1; $i < $fileLen; $i++, $j++)
|
||||
{
|
||||
if ($j == 1) {
|
||||
print OUT_FILE " ";
|
||||
}
|
||||
if ($j != 1) {
|
||||
print OUT_FILE " ";
|
||||
}
|
||||
read($fp, $byte, 1) or die "Error reading $fileName";
|
||||
my $output = sprintf("0x%02X", ord($byte));
|
||||
print OUT_FILE $output;
|
||||
|
||||
if ($i != ($fileLen - 1)) {
|
||||
print OUT_FILE ",";
|
||||
}
|
||||
|
||||
if ($j == 10) {
|
||||
$j = 0;
|
||||
print OUT_FILE "\n";
|
||||
}
|
||||
}
|
||||
|
||||
print OUT_FILE "\n";
|
||||
|
||||
close($fp);
|
||||
}
|
||||
34
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/tools/rsa_pss_sign.sh
vendored
Normal file
34
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/tools/rsa_pss_sign.sh
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
SIGOPT=rsa_padding_mode:pss
|
||||
SIGOPT2=rsa_pss_saltlen:-1
|
||||
|
||||
function usage() {
|
||||
cat <<_EOT_
|
||||
Usage:
|
||||
$0 <pri key> <pub key> <file name>
|
||||
|
||||
pri key : private key for sign/verify
|
||||
pub key : public key for sign/verify
|
||||
file name : file name to be signed
|
||||
|
||||
_EOT_
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ $# -ne 3 ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# $1 private key for sign/verify
|
||||
# $2 public key for verify
|
||||
# $3 file for sign/verify
|
||||
|
||||
openssl dgst -sha256 -sign $1 -sigopt $SIGOPT -sigopt $SIGOPT2 -out $3.sign $3
|
||||
|
||||
echo verify by private key
|
||||
openssl dgst -sha256 -prverify $1 -sigopt $SIGOPT -sigopt $SIGOPT2 -signature $3.sign $3
|
||||
|
||||
echo verifiy by public key
|
||||
openssl dgst -sha256 -verify $2 -sigopt $SIGOPT -sigopt $SIGOPT2 -signature $3.sign $3
|
||||
|
||||
0
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/wolfssl/src/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/wolfssl/src/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/wolfssl/wolfcrypt/src/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/Projects/wolfssl/wolfcrypt/src/.gitkeep
vendored
Normal file
211
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/README.md
vendored
Normal file
211
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/README.md
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
wolfSSL for Renesas RA Evaluation Kit (EK-RA6M3)
|
||||
=================================================
|
||||
|
||||
## Description
|
||||
|
||||
This directory contains e2studio projects targeted at the Renesas RA 32-bit MCUs.\
|
||||
The example projects include a wolfSSL TLS client and server.\
|
||||
They also include benchmark and cryptography tests for the wolfCrypt library.
|
||||
|
||||
The wolfssl project contains both the wolfSSL and wolfCrypt libraries.\
|
||||
It is built as a `Renesas RA C Library Project` and contains the Renesas RA\
|
||||
configuration.
|
||||
|
||||
The other projects (benchmark, client, server and test) are built as a\
|
||||
`Renesas RA C Project Using RA Library`, where the RA library is the wolfssl project.\
|
||||
The wolfssl Project Summary is listed below and is relevant for every project.
|
||||
|
||||
### Project Summary
|
||||
|Item|Name/Version|
|
||||
|:--|:--|
|
||||
|Board|EK-RA6M3|
|
||||
|Device|R7FA6M3AH3CFC|
|
||||
|Toolchain|GCC ARM Embedded|
|
||||
|FSP Version|3.5.0|
|
||||
|
||||
#### Selected software components
|
||||
|
||||
|Components|Version|
|
||||
|:--|:--|
|
||||
|Board Support Package Common Files|v3.5.0|
|
||||
|Arm CMSIS Version 5 - Core (M)|v5.8.0+renesas.0.fsp.3.5.0|
|
||||
|FreeRTOS|v10.4.3-LTS.Patch.2+fsp.3.5.0|
|
||||
|RA6M3-EK Board Support Files|v3.5.0|
|
||||
|Board support package for R7FA6M3AH3CFC|v3.5.0|
|
||||
|Board support package for RA6M3|v3.5.0|
|
||||
|Board support package for RA6M3 - FSP Data|v3.5.0|
|
||||
|FreeRTOS - Memory Management - Heap 4|v10.4.3-LTS.Patch.2+fsp.3.5.0|
|
||||
|r_ether to FreeRTOS+TCP Wrapper|v3.5.0|
|
||||
|Ethernet|v3.5.0|
|
||||
|Ethernet PHY|v3.5.0|
|
||||
|FreeRTOS+TCP|v2.3.2-LTS.Patch.1+fsp.3.5.0|
|
||||
|FreeRTOS - Buffer Allocation 2|v2.3.2-LTS.Patch.1+fsp.3.5.0|
|
||||
|
||||
|
||||
## Setup Steps
|
||||
|
||||
The project directories are missing files necessary to build the project.\
|
||||
These files can be generated when creating a new Renesas RA Project.\
|
||||
The following steps explain how to generate the missing files and where to place them.
|
||||
|
||||
1.) Create a 'dummy' Renesas RA C Library Project.
|
||||
|
||||
+ Click File->New->`RA C/C++ Project`
|
||||
+ Click `Renesas RA C Library Project`. Click Next
|
||||
+ Enter `dummy_library` as the project name. Click Next.
|
||||
+ Under `Board: Custom User Board`, select `EK-RA6M3`.
|
||||
+ Under `RTOS: No RTOS`, select `FreeRTOS`.
|
||||
+ Click Next. Select `FreeRTOS - Minimal - Static Allocation`
|
||||
+ Click Finish.
|
||||
+ Open Smart Configurator by clicking configuration.xml in the project
|
||||
+ Go to `BSP` tab and increase Heap Size under `RA Common` on Properties page, e.g. 0x1000
|
||||
+ Go to `Stacks` tab
|
||||
+ Add New thead and set properties
|
||||
|
||||
|Property|Value|
|
||||
|:--|:--|
|
||||
|Thread Symbol|wolfssl_tst_thread|
|
||||
|Thread Name|wolf_tst_thread|
|
||||
|Thread Stack size|increase depending on your environment<br> e.g. 0xA000|
|
||||
|Thread MemoryAllocation|Dyamic|
|
||||
|Common General Use Mutexes|Enabled|
|
||||
|Common General Enable Backward Compatibility|Enabled|
|
||||
|Common Memory Allocation Support Dynamic Allocation|Enabled|
|
||||
|Common Memory Allocation Total Heap Size|increase depending on your environment<br> e.g. 0x20000|
|
||||
|
||||
+ Add `Heap 4` stack to sce_tst_thread from `New Stack` -> `RTOS` -> `FreeRTOS Heap 4`
|
||||
+ Add `FreeRTOS + TCP` stack to sce_tst_thread from `New Stack` -> `Networking` -> `FreeRTOS+TCP` and set properties
|
||||
|
||||
|Property|Value|
|
||||
|:--|:--|
|
||||
|Network Events call vApplicationIPNetworkEventHook|Disable|
|
||||
|Use DHCP|Disable|
|
||||
|
||||
2.) Create a 'dummy' Renesas RA C Project Using RA Library.
|
||||
|
||||
+ Click File->New->`RA C/C++ Project`
|
||||
+ Click `Renesas RA C Project Using RA Library`. Click Next
|
||||
+ Enter `dummy_app` as the project name. Click Next.
|
||||
+ Under `Executable Using an RA Static library`
|
||||
+ Enter `dummy_app` as the project name. Click Next
|
||||
+ Select `dummy_library` from Select Renesas RA library project.
|
||||
+ Click Finish.
|
||||
|
||||
3.) Import all the wolfSSL Projects into e2studio workspace.
|
||||
|
||||
+ Click File->`Open Projects from File System`
|
||||
+ Click `Directory...` to the right of Import source
|
||||
+ Select the RA6M3 folder location that contains the projects\
|
||||
example path: wolfssl/IDE/Renesas/e2studio/RA6M3
|
||||
+ Deselect the Non-Eclipse project, RA6M3, by clicking the checkbox\
|
||||
Only the folders with 'Eclipse project' under 'Import as' need to be selected.
|
||||
+ Click Finish.
|
||||
|
||||
4.) Copy files from `dummy_library` into `wolfSSL_RA6M3`
|
||||
|
||||
+ Expand the dummy_library and wolfSSL_RA6M3 projects\
|
||||
(Click the drop-down arrow to the left of the project name.)
|
||||
+ Select and Copy the following folders/files inside dummy_library\
|
||||
|
||||
`ra/`\
|
||||
`ra_gen/`\
|
||||
`ra_cfg/`\
|
||||
`script/`\
|
||||
`R7FA6M3AH3CFC.pincfg`\
|
||||
`configuration.xml`
|
||||
|
||||
+ Paste the copied folders/files into wolfSSL_RA6M3
|
||||
+ The `dummy_library` project can now be deleted.
|
||||
+ Generate Project Content.
|
||||
+ Click `Open RA Configuration` in the top bar (Grey Settings Cog)
|
||||
+ Click `Generate Project Content` at top right (Green Icon)
|
||||
+ Build wolfSSL_RA6M3.
|
||||
|
||||
5.) Copy files from `dummy_app` into each executable projects\
|
||||
+ Select and Copy the followng folder inside dummy_app\
|
||||
|
||||
`script/`
|
||||
|
||||
+ Paste the copied folders into each executable projects which are Crypt test, benchmark, client and server projects\
|
||||
+ The `dummy_app` project can now be deleted.
|
||||
|
||||
6.) Setup Network Environment
|
||||
|
||||
The client and server projects have defines inside their wolfssl_thread_entry.h.
|
||||
These defines (ucIPAddress ... ucDNSServerAddress) may need to be changed
|
||||
based on your internal network environment. The g_ether0_mac_address is the default
|
||||
mac address found inside the RA configuration inside the wolfssl project.
|
||||
The client wolfssl_thread_entry.h has defines (SERVER_IP and DEFAULT_PORT) that
|
||||
will need to be changed based on the server you're trying to connect to over
|
||||
the ethernet connection.
|
||||
|
||||
## Build and Run
|
||||
|
||||
### Build Each Project
|
||||
Right-Click each Project and select Build.
|
||||
|
||||
### Run wolfCrypt Test and Benchmark
|
||||
|
||||
1.) Right-Click the Project name.\
|
||||
2.) Select `Debug As` -> `Renesas GDB Hardware Debugging`\
|
||||
3.) Select J-Link ARM. Click OK.\
|
||||
4.) Select R7FA6M3AH. Click OK.
|
||||
|
||||
### Run the wolfSSL TLS Server Example.
|
||||
|
||||
1.) Right-Click the Project name.\
|
||||
2.) Select `Debug As` -> `Renesas GDB Hardware Debugging`\
|
||||
3.) Select J-Link ARM. Click OK.\
|
||||
4.) Select R7FA6M3AH. Click OK.\
|
||||
5.) Run the following wolfSSL example client command inside the base of the wolfssl directory.
|
||||
|
||||
```
|
||||
./examples/client/client -v 4 -h "ucIPAddress" -p 11111 -A ./certs/1024/ca-cert.pem
|
||||
```
|
||||
|
||||
**NOTE:** "ucIPAddress" is "192.168.1.241" by default. (See wolfssl_thread_entry.h)
|
||||
|
||||
### Run the wolfSSL TLS Client Example.
|
||||
|
||||
1.) Run the following wolfSSL example server command inside the base of the wolfssl directory.
|
||||
|
||||
```
|
||||
./examples/server/server -v 4 -b -d -p 11111 -c ./certs/1024/server-cert.pem -k ./certs/1024/server-key.pem
|
||||
```
|
||||
|
||||
**NOTE:** The port 11111 is the DEFAULT_PORT inside wolfssl_thread_entry.h.\
|
||||
|
||||
2.) Right-Click the Project name.\
|
||||
3.) Select `Debug As` -> `Renesas GDB Hardware Debugging`\
|
||||
4.) Select J-Link ARM. Click OK.\
|
||||
5.) Select R7FA6M3AH. Click OK.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
+ The commands for the example client/server assumes it is being run from the
|
||||
base directory of wolfssl.
|
||||
|
||||
+ Enter "#define DEBUG_WOLFSSL" inside user_settings.h or wolfssl_thread_entry.c\
|
||||
to enable wolfssl debug messages to the Renesas Virtual Debug Console.
|
||||
|
||||
+ Some linking errors can be caused by the e2studio project files needing to be rebuilt and freshened.
|
||||
Right-Click a project, select Index, click Rebuild and then click Freshen Files. Repeat for each project.
|
||||
|
||||
[Support Forum](https://www.wolfssl.com/forums/)
|
||||
|
||||
Support Email: support@wolfssl.com
|
||||
|
||||
|
||||
## Resources
|
||||
|
||||
[wolfSSL Website](https://www.wolfssl.com/)
|
||||
|
||||
[wolfSSL Wiki](https://github.com/wolfSSL/wolfssl/wiki)
|
||||
|
||||
[wolfSSL Manual](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-toc.html)
|
||||
|
||||
[wolfSSL API Reference](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-wolfssl-api-reference.html)
|
||||
|
||||
[wolfCrypt API Reference](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-wolfcrypt-api-reference.html)
|
||||
|
||||
[TLS 1.3](https://www.wolfssl.com/docs/tls13/)
|
||||
198
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/README_APRA6M_en.md
vendored
Normal file
198
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/README_APRA6M_en.md
vendored
Normal file
@@ -0,0 +1,198 @@
|
||||
wolfSSL for Alpha Project AP-RA6M-0A Setup Guide
|
||||
=================================================
|
||||
|
||||
## Description
|
||||
|
||||
This directory contains e2studio projects targeted at the Alpha Project AP-RA6M-0A board including the Renesas RA 32-bit MCUs.
|
||||
The example projects include a wolfSSL TLS client and server. They also include benchmark and cryptography tests for the wolfCrypt library.
|
||||
|
||||
The wolfssl project contains both the wolfSSL and wolfCrypt libraries. It is built as a `Renesas RA C Library Project` and contains the Renesas RA configuration.
|
||||
|
||||
The other projects (benchmark, client, server and test) are built as a `Renesas RA C Project Using RA Library`, where the RA library is the wolfssl project.
|
||||
The wolfssl Project Summary is listed below and is relevant for every project.
|
||||
|
||||
### Project Summary
|
||||
|Item|Name/Version|
|
||||
|:--|:----|
|
||||
|e2studio|2020-07|
|
||||
|Board |AP-RA6M-0A |
|
||||
|Device |R7FA6M3AH3CFC|
|
||||
|Toolchain|GCC ARM Embedded
|
||||
|FSP Version|1.3.0|
|
||||
|
||||
### Selected software components
|
||||
|Component|Version|
|
||||
|:--|:---|
|
||||
|Board Support Package Common Files|v1.3.0|
|
||||
|Arm CMSIS Version 5 - Core (M) |v5.7.0|
|
||||
|Board support package for R7FA6M3AH3CFC |v1.3.0|
|
||||
|Board support package for RA6M3|v1.3.0 |
|
||||
|Board support package for RA6M3 - FSP Data|v1.3.0|
|
||||
|FreeRTOS|v1.3.0|
|
||||
|FreeRTOS - Buffer Allocation 2 |v1.3.0|
|
||||
|FreeRTOS+TCP|v1.3.0|
|
||||
|r_ether to FreeRTOS+TCP Wrapper|v1.3.0|
|
||||
|Ethernet |v1.3.0 |
|
||||
|Ethernet PHY|v1.3.0|
|
||||
|I/O Port|v1.3.0 |
|
||||
|BSP-Board|v1.2.0 |
|
||||
|
||||
## Setup Steps
|
||||
|
||||
The project directories are missing files necessary to build the project.\
|
||||
These files can be generated when creating a new Renesas RA Project.\
|
||||
The following steps explain how to generate the missing files and where to place them.
|
||||
|
||||
1.) Download Alpha project example program from [Alpha Project Home Page](https://www.apnet.co.jp/product/ra/ap-ra6m-0a.html)
|
||||
|
||||
+ Unzip the downloaded example project
|
||||
|
||||
2.) Create a 'dummy' Renesas RA C Library Project on e2studio
|
||||
|
||||
+ Click File->New->`RA C/C++ Project`
|
||||
+ Enter `dummy_library` as the project name. Click Next.
|
||||
+ Select `Board: Custom User Board`.
|
||||
+ Select `R7FA6M3AH3CFC
|
||||
+ Under `RTOS: No RTOS`, select `FreeRTOS`.
|
||||
+ Click Next. Select `FreeRTOS - Minimal - Static Allocation`
|
||||
+ Click `Renesas RA C Library Project`. Click Next
|
||||
+ Click Finish.
|
||||
|
||||
3.) Create a 'dummy' Renesas RA C Project Using RA Library on e2studio
|
||||
|
||||
+ Click File->New->`RA C/C++ Project`
|
||||
+ Enter `dummy_app` as the project name. Click Next.
|
||||
+ Under `RA library project`, select `dummy_library`.
|
||||
+ Click `Executable Using an RA Static Library`. Click Next
|
||||
+ Click Finish.
|
||||
+ Enter `dummy_app` as Project name
|
||||
+ Select RA library project `dummy_library`
|
||||
|
||||
4.) Import all the wolfSSL Projects into e2studio workspace.
|
||||
|
||||
+ Click File->`Open Projects from File System`
|
||||
+ Click `Directory...` to the right of Import source
|
||||
+ Select the RA6M3G folder location that contains the projects
|
||||
example path: wolfssl/IDE/Renesas/e2studio/RA6M3
|
||||
+ Deselect the Non-Eclipse project, RA6M3G, by clicking the checkbox
|
||||
Only the folders with 'Eclipse project' under 'Import as' need to be selected.
|
||||
+ Click Finish.
|
||||
|
||||
5.) Copy files from `dummy_library` into `wolfSSL_RA6M3G`
|
||||
|
||||
+ Expand the dummy_library and wolfSSL_RA6M3G projects
|
||||
(Click the drop-down arrow to the left of the project name.)
|
||||
+ Select and Copy the following folders/files inside dummy_library
|
||||
|
||||
`ra/`
|
||||
`ra_gen/`
|
||||
`ra_cfg/`
|
||||
`script/`
|
||||
|
||||
+ Paste the copied folders/files into wolfSSL_RA6M3G
|
||||
+ The `dummy_library` project can now be deleted.
|
||||
+ Copy `APRA6M0A.pincfg` from ap_ra6m_0a_sample\sample\ap_ra6m_0a_ether_sample to wolfSSL_RA6M3G
|
||||
+ Delete `R7FA6M3AH3CFC.pincfg` from wolfSSL_RA6M3G
|
||||
+ Generate Project Content.
|
||||
|
||||
+ Click `Open RA Configuration` in the top bar (Grey Settings Cog)
|
||||
+ Go to `BSP` tab and import CMSIS pack file, AP.APRA6M0A.x.x.x.pack, from ap_ra6m_0a_sample\sample folder
|
||||
+ Select APRA6M0A as Board
|
||||
+ Go to `Pins` tab and select APRA6M0A.pincfg
|
||||
+ Go to `Stacks` tab and add Heap 4 stack from New Stack(+ Icon)
|
||||
+ Click `Generate Project Content` at top right (Green Icon)
|
||||
+ Build wolfSSL_RA6M3G.
|
||||
|
||||
6.) Copy files from `dummy_app` into `./IDE/Renesas/e2studio/RA6M3/common/ra6m3g/`
|
||||
**NOTE:** This may need to be done outside of the e2studio environment (e.g. File Explorer).
|
||||
|
||||
+ Select and Copy the followng folder inside dummy_app
|
||||
|
||||
`src/`
|
||||
`script/`
|
||||
|
||||
+ Paste the copied folders into `./IDE/Renesas/e2studio/RA6M3/common/ra6m3g/`
|
||||
`(The test, benchmark, client and server projects link to this folder.)`
|
||||
+ The `dummy_app` project can now be deleted.
|
||||
|
||||
7.) Setup Network Environment
|
||||
|
||||
The client and server projects have defines inside their wolfssl_thread_entry.h.
|
||||
These defines (ucIPAddress ... ucDNSServerAddress) may need to be changed
|
||||
based on your internal network environment. The g_ether0_mac_address is the default
|
||||
mac address found inside the RA configuration inside the wolfssl project.
|
||||
The client wolfssl_thread_entry.h has defines (SERVER_IP and DEFAULT_PORT) that
|
||||
will need to be changed based on the server you're trying to connect to over
|
||||
the ethernet connection.
|
||||
|
||||
## Build and Run
|
||||
|
||||
### Build Each Project
|
||||
Right-Click each Project and select Build.
|
||||
|
||||
### Run wolfCrypt Test and Benchmark
|
||||
|
||||
1.) Right-Click the Project name.
|
||||
2.) Select `Debug As` -> `Renesas GDB Hardware Debugging`
|
||||
3.) Select J-Link ARM. Click OK.
|
||||
4.) Select R7Fa6M3AH. Click OK.
|
||||
|
||||
### Run the wolfSSL TLS Server Example.
|
||||
|
||||
1.) Right-Click the Project name.
|
||||
2.) Select `Debug As` -> `Renesas GDB Hardware Debugging`
|
||||
3.) Select J-Link ARM. Click OK.
|
||||
4.) Select R7Fa6M3AH. Click OK.
|
||||
5.) Run the following wolfSSL example client command inside the base of the wolfssl directory.
|
||||
|
||||
```
|
||||
./examples/client/client -v 4 -h "ucIPAddress" -p 11111 -A ./certs/1024/ca-cert.pem
|
||||
```
|
||||
|
||||
**NOTE:** "ucIPAddress" is "192.168.1.241" by default. (See wolfssl_thread_entry.h)
|
||||
|
||||
### Run the wolfSSL TLS Client Example.
|
||||
|
||||
1.) Run the following wolfSSL example server command inside the base of the wolfssl directory.
|
||||
|
||||
```
|
||||
./examples/server/server -v 4 -b -d -p 11111 -c ./certs/1024/server-cert.pem -k ./certs/1024/server-key.pem
|
||||
```
|
||||
|
||||
**NOTE:** The port 11111 is the DEFAULT_PORT inside wolfssl_thread_entry.h.
|
||||
If DEFAULT_PORT was changed then the above command will need to match it.
|
||||
|
||||
2.) Right-Click the Project name.\
|
||||
3.) Select `Debug As` -> `Renesas GDB Hardware Debugging`\
|
||||
4.) Select J-Link ARM. Click OK.\
|
||||
5.) Select R7Fa6M3AH. Click OK.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
+ The commands for the example client/server assumes it is being run from the
|
||||
base directory of wolfssl.
|
||||
|
||||
+ Enter "#define DEBUG_WOLFSSL" inside user_settings.h or wolfssl_thread_entry.c
|
||||
to enable wolfssl debug messages to the Renesas Virtual Debug Console.
|
||||
|
||||
+ Some linking errors can be caused by the e2studio project files needing to be rebuilt and freshened.
|
||||
Right-Click a project, select Index, click Rebuild and then click Freshen Files. Repeat for each project.
|
||||
|
||||
[Support Forum](https://www.wolfssl.com/forums/)
|
||||
|
||||
Support Email: support@wolfssl.com
|
||||
|
||||
|
||||
## Resources
|
||||
|
||||
[wolfSSL Website](https://www.wolfssl.com/)
|
||||
|
||||
[wolfSSL Wiki](https://github.com/wolfSSL/wolfssl/wiki)
|
||||
|
||||
[wolfSSL Manual](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-toc.html)
|
||||
|
||||
[wolfSSL API Reference](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-wolfssl-api-reference.html)
|
||||
|
||||
[wolfCrypt API Reference](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-wolfcrypt-api-reference.html)
|
||||
|
||||
[TLS 1.3](https://www.wolfssl.com/docs/tls13/)
|
||||
197
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/README_APRA6M_jp.md
vendored
Normal file
197
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/README_APRA6M_jp.md
vendored
Normal file
@@ -0,0 +1,197 @@
|
||||
wolfSSL/AlphaProject AP-RA6M-0A ボードデモ セットアップガイド
|
||||
=================================================
|
||||
|
||||
## はじめに
|
||||
|
||||
このフォルダにはルネサス社製 RA 32-bit MCU を搭載するアルファプロジェクト製 AP-RA6M-0A で wolfSSL を動作させるための手順です。
|
||||
サンプルプログラムには、暗号テスト、ベンチマーク、及びクライアント・サーバーを含んでいます。
|
||||
|
||||
wolfSSL のプロジェクトファイルは、wolfSSL と wolfCrypt の両方で構成され、Renesas RA のコンフィグレーションを含む`Renesas RA C/C++ Library Project`としてビルドされます。
|
||||
その他、ベンチマーク、暗号テスト、及びクライアント・サーバーのサンプルプログラムは、`Renesas RA C Project Using RA Library`としてビルドされます。
|
||||
|
||||
プロジェクトの概要と全ての関連するソフトウェアコンポーネントに関する情報を下記になります。
|
||||
|
||||
### プロジェクトの概要
|
||||
|要素|名前/バージョン|
|
||||
|:--|:--|
|
||||
|e2studio|2020-07|
|
||||
|Board|AP-RA6M-0A|
|
||||
|Device|R7FA6M3AH3CFC|
|
||||
|Toolchain|GCC ARM Embedded|
|
||||
|FSP Version|1.3.0|
|
||||
|
||||
#### 必要なソフトウェアコンポーネント
|
||||
|コンポーネント|バージョン|
|
||||
|:--|:--|
|
||||
|Board Support Package Common Files|v1.3.0|
|
||||
|Arm CMSIS Version 5 - Core (M) |v5.7.0|
|
||||
|Board support package for R7FA6M3AH3CFC |v1.3.0|
|
||||
|Board support package for RA6M3|v1.3.0 |
|
||||
|Board support package for RA6M3 - FSP Data|v1.3.0|
|
||||
|FreeRTOS|v1.3.0|
|
||||
|FreeRTOS - Buffer Allocation 2 |v1.3.0|
|
||||
|FreeRTOS+TCP|v1.3.0|
|
||||
|r_ether to FreeRTOS+TCP Wrapper|v1.3.0|
|
||||
|Ethernet |v1.3.0 |
|
||||
|Ethernet PHY|v1.3.0|
|
||||
|I/O Port|v1.3.0 |
|
||||
|BSP-Board|v1.2.0 |
|
||||
|
||||
## セットアップ手順
|
||||
|
||||
プロジェクトのフォルダーには、ビルドに必要なファイルが不足しています。そららのファイルをダミーのプロジェクトを作成し補います。
|
||||
|
||||
次に続くステップは、不足しているファイルを作成し、それらを必要としているプロジェクトにコピーする手順です。
|
||||
|
||||
1.) [アルファプロジェクト社のホームページ](https://www.apnet.co.jp/product/ra/ap-ra6m-0a.html)からサンプルプログラムをダウンロード
|
||||
|
||||
+ ダウンロードしたサンプルプログラムを適当なフォルダーへ解凍
|
||||
|
||||
2.) e2Studio で'ダミー' Renesas RA C Library プロジェクトを作成
|
||||
|
||||
+ ファイル→新規→`RA C/C++ Project`をクリック
|
||||
+ `Renesas RA C/C++ Library Project`を選択し、次へをクリック
|
||||
+ 'dummy_library` とプロジェクト名を入力します。
|
||||
+ `Board:` ドロップダウンから `EK-RA6M3T`を選択します
|
||||
+ `RTOS: No TROS` を `FreeRTOS` を選択します。
|
||||
+ `Build Artifact Selection` の `Static Library`を選択し、次へをクリック
|
||||
+ `FreeRTOS - Minimal - Static Allocation` を選択し、終了をクリック
|
||||
|
||||
3.) e2Studio で 'ダミー'の Renesas RA C/C++ Project Using RA Library を作成
|
||||
|
||||
+ ファイル→新規→`RA C/C++ Project`をクリック
|
||||
+ `Renesas RA C/C++ Library Project`を選択し、次へをクリック
|
||||
+ 'dummy_app` とプロジェクト名を入力します。
|
||||
+ `Board:` ドロップダウンから `EK-RA6M3T`を選択します
|
||||
+ `RTOS: No TROS` を `FreeRTOS` を選択しまし、次へをクリック
|
||||
+ `Build Artifact Selection` の `Executable Using an RA Static Library`を選択し、終了をクリック
|
||||
+ 'dummy_app` とプロジェクト名を入力し、次へクリック
|
||||
+ `RA library project`の `Select RA Library`から, `dummy_library`を選択し、終了をクリック
|
||||
|
||||
4.) 全ての wolfSSL e2studio プロジェクトをインポート
|
||||
|
||||
+ メニューの「ファイル」→「ファイル・システムからプロジェクトを開く」をクリック
|
||||
+ インポート元の `ディレクトリー...` をクリック
|
||||
+ RA6M3 フォルダーを選択。wolfssl/IDE/Renesas/e2studio/RA6M3
|
||||
+ Eclipseのプロジェクトではない、RA6M3を除外します。
|
||||
その他、ベンチマーク、暗号テスト、クライアント・サーバーの各プロジェクトは選択しておく。
|
||||
+ 終了をクリック
|
||||
|
||||
5.) `dummy_library`からwolfSSL_RA6M3Gへ必要なファイルをコピー
|
||||
|
||||
+ `dummy_library` と `wolfSSL_RA6M3G` プロジェクトを開く
|
||||
プロジェクト名横にある矢印マークをクリック
|
||||
+ `dummy_library` の以下のフォルダーとファイルを選択
|
||||
|
||||
`ra/`
|
||||
`ra_gen/`
|
||||
`ra_cfg/`
|
||||
`script/`
|
||||
|
||||
+ 選択したフォルダーとファイルを `wolfSSL_RA6M3G`プロジェクトに貼り付け
|
||||
+ `dummy_library`プロジェクトは削除しても構いません
|
||||
+ `APRA6M0A.pincfg` を解凍した ap_ra6m_0a_sample\sample\ap_ra6m_0a_ether_sample から `wolfSSL_RA6M3G`プロジェクトへコピー
|
||||
+ `wolfSSL_RA6M3G`フォルダー内の `R7FA6M3AH3CFC.pincfg` は削除します。
|
||||
+ プロジェクトに必要なファイルを生成します。
|
||||
+ `Open RA Configuration`(上部のアイコンバーにある灰色歯車ボタン)をクリック
|
||||
|
||||
+ `BSP` タブに移動し、CMSIS Pack のインポートボタンをクリック
|
||||
+ インポート画面で、CMSIS pack ファイルを指定
|
||||
ステップ 1で解凍したap_ra6m_0a_sample\sampleフォルダー中の AP.APRA6M0A.x.x.x.pack を指定します。
|
||||
+ `APRA6M0A` を Board として指定
|
||||
+ `Pins`タブに移動し、`APRA6M0A.pincfg`を選択
|
||||
+ `Stacks`タブに移動し、Heap 4 stack を New Stack から追加
|
||||
+ `Generate Project Content`(右上部にある緑色アイコン)をクリックし、ファイルを生成
|
||||
+ `wolfSSL_RA6M3G`をビルド
|
||||
|
||||
6.) `dummy_app` から必要なファイルを`./IDE/Renesas/e2studio/RA6M3/common/ra6m3g/`へコピー
|
||||
|
||||
**NOTE:** この作業は、e2studio ではなく、Explorer などを使用します。
|
||||
|
||||
+ `dummy_app`の以下のフォルダーをコピー
|
||||
|
||||
`src/`
|
||||
`script/`
|
||||
|
||||
+ 選択したフォルダーを`./IDE/Renesas/e2studio/RA6M3/common/ra6m3g/`へコピー
|
||||
`(暗号テスト、ベンチマーク、クライアント・サーバーの各プロジェクトはこのフォルダーを参照)`
|
||||
+ `dummy_app`プロジェクトは削除しても構いません
|
||||
|
||||
7.) ネットワーク環境について
|
||||
|
||||
クライアント・サーバーのプロジェクト内のwolfssl_thread_entry.hにネットワーク設定があります。
|
||||
それらの設定(ucIPAddress ... ucDNSServerAddress)は、ご使用のネットワーク環境に合わせて変更して
|
||||
してください。g_ether0_mac_address は、`wolfSSL_RA6M3G`プロジェクト内の RA configuration
|
||||
で定義されているデフォルトのMACアドレスです。クライアントのwolfssl_thread_entry.h は
|
||||
ターゲットのサーバーのSERVER_IP と DEFAULT_PORTの定義を持ちます。それらはご使用のサーバーの
|
||||
の設定に応じて変更してください。
|
||||
|
||||
## ビルドと実行
|
||||
|
||||
### 各プロジェクトをビルド
|
||||
各プロジェクトで右クリックし、ビルドを選択
|
||||
|
||||
### 暗号テストとベンチマークを実行
|
||||
|
||||
1.) プロジェクト名を選択し、右クリック\
|
||||
2.) `デバック` → `Renesas GDB Hardware Debugging`\
|
||||
3.) `J-Link ARM`を選択し、OK をクリック\
|
||||
4.) `R7FA6M3AH`を選択し、OK をクリック
|
||||
|
||||
### wolfSSL TLS サンプルサーバーを実行
|
||||
|
||||
1.) プロジェクト名を選択し、右クリック\
|
||||
2.) `デバック` → `Renesas GDB Hardware Debugging`\
|
||||
3.) `J-Link ARM`を選択し、OK をクリック\
|
||||
4.) `R7FA6M3AH`を選択し、OK をクリック\
|
||||
5.)以下のサンプルのクライアントプログラムを実行
|
||||
|
||||
```
|
||||
./examples/client/client -v 4 -h "ucIPAddress" -p 11111 -A ./certs/1024/ca-cert.pem
|
||||
```
|
||||
|
||||
**NOTE:** "ucIPAddress" はデフォルトでは "192.168.1.241" (参照: wolfssl_thread_entry.h)
|
||||
|
||||
### wolfSSL TLS サンプルクライアントを実行
|
||||
1.)以下のサンプルのサーバープログラムを実行
|
||||
|
||||
```
|
||||
./examples/server/server -b -d -p 11111 -c ./certs/1024/server-cert.pem -k ./certs/1024/server-key.pem
|
||||
```
|
||||
|
||||
TLS 1.3 で接続する際には、引数に "-v 4" を追加します。
|
||||
```
|
||||
./examples/server/server -v 4 -b -d -p 11111 -c ./certs/1024/server-cert.pem -k ./certs/1024/server-key.pem
|
||||
```
|
||||
**NOTE:** wolfssl_thread_entry.h中にデフォルトのポート番号 11111 定義(DEFAULT_PORT)
|
||||
もし、DEFAULT_PORTを変更している場合、、上記のコマンドの "-p" の値は対応するポート番号に要変更
|
||||
|
||||
2.) プロジェクト名を選択し、右クリック\
|
||||
3.) `デバック` → `Renesas GDB Hardware Debugging`\
|
||||
4.) `J-Link ARM`を選択し、OK をクリック\
|
||||
5.) `R7FA6M3AH`を選択し、OK をクリック
|
||||
|
||||
## トラブルシューティング
|
||||
|
||||
+ サンプルのクライアント・サーバープログラムは、wolfSSL のルートディレクトリから実行する必要があります。
|
||||
+ user_settings.h の #define DEBUG_WOLFSSL を有効にすることで、デバックメッセージを\
|
||||
`Renesas Virtual Debug Console`へ出力します。
|
||||
+ プロジェクトのビルドでリンクエラーが出た場合、リビルドしリフレッシュすることで解決することがあります。
|
||||
|
||||
[Support Forum](https://www.wolfssl.com/forums/)
|
||||
|
||||
Support Email: support@wolfssl.com
|
||||
|
||||
## 参考リンク
|
||||
|
||||
[wolfSSL Website](https://www.wolfssl.com/)
|
||||
|
||||
[wolfSSL Wiki](https://github.com/wolfSSL/wolfssl/wiki)
|
||||
|
||||
[wolfSSL Manual](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-toc.html)
|
||||
|
||||
[wolfSSL API Reference](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-17-wolfssl-api-reference.html)
|
||||
|
||||
[wolfCrypt API Reference](https://wolfssl.com/wolfSSL/Docs-wolfssl-manual-18-wolfcrypt-api-reference.html)
|
||||
|
||||
[TLS 1.3](https://www.wolfssl.com/docs/tls13/)
|
||||
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/common/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/common/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/script/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/script/.gitkeep
vendored
Normal file
31
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/src/wolfssl_thread_entry.c
vendored
Normal file
31
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/src/wolfssl_thread_entry.c
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/* wolfssl_thread_entry.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 <wolfssl/wolfcrypt/settings.h>
|
||||
#include "common/util.h"
|
||||
|
||||
int benchmark_test(void *args);
|
||||
|
||||
void wolfssl_thread_entry(void *pvParameters) {
|
||||
FSP_PARAMETER_NOT_USED(pvParameters);
|
||||
initialise_monitor_handles();
|
||||
benchmark_test(0);
|
||||
while (1);
|
||||
}
|
||||
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/client-wolfssl/common/src/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/client-wolfssl/common/src/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/client-wolfssl/script/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/client-wolfssl/script/.gitkeep
vendored
Normal file
164
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/client-wolfssl/src/wolfssl_thread_entry.c
vendored
Normal file
164
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/client-wolfssl/src/wolfssl_thread_entry.c
vendored
Normal file
@@ -0,0 +1,164 @@
|
||||
/* wolfssl_thread_entry.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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
|
||||
*/
|
||||
|
||||
/* wolfSSL */
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/wolfio.h>
|
||||
#include "wolfssl_thread_entry.h"
|
||||
|
||||
/* FreeRTOS */
|
||||
#include "FreeRTOS_IP.h"
|
||||
#include "FreeRTOS_Sockets.h"
|
||||
|
||||
/* Project Specific */
|
||||
#include "common/util.h"
|
||||
#include <stdio.h>
|
||||
#include "hal_data.h"
|
||||
|
||||
/* the function is called just before main() to set up pins */
|
||||
/* this needs to be called to setup IO Port */
|
||||
void R_BSP_WarmStart (bsp_warm_start_event_t event)
|
||||
{
|
||||
|
||||
if (BSP_WARM_START_POST_C == event) {
|
||||
/* C runtime environment and system clocks are setup. */
|
||||
/* Configure pins. */
|
||||
R_IOPORT_Open(&g_ioport_ctrl, g_ioport.p_cfg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wolfssl_thread_entry(void *pvParameters) {
|
||||
FSP_PARAMETER_NOT_USED(pvParameters);
|
||||
|
||||
/* FreeRTOS+TCP Objects */
|
||||
BaseType_t fr_status;
|
||||
socklen_t xSize = sizeof(struct freertos_sockaddr);
|
||||
xSocket_t xClientSocket = NULL;
|
||||
struct freertos_sockaddr xRemoteAddress;
|
||||
|
||||
/* Return status */
|
||||
int ret = WOLFSSL_FAILURE;
|
||||
|
||||
/* Message to send and buffer for receive. */
|
||||
const char msg[] = "Hello from wolfSSL client.";
|
||||
char buff[256];
|
||||
|
||||
/* wolfSSL objects */
|
||||
WOLFSSL_CTX *ctx = NULL;
|
||||
WOLFSSL *ssl = NULL;
|
||||
|
||||
/* Output to Renesas Debug Virtual Console */
|
||||
initialise_monitor_handles();
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
/* FreeRTOS+TCP Ethernet and IP Setup */
|
||||
fr_status = FreeRTOS_IPInit(ucIPAddress,
|
||||
ucNetMask,
|
||||
ucGatewayAddress,
|
||||
ucDNSServerAddress,
|
||||
g_ether0_mac_address);
|
||||
if (pdPASS != fr_status) {
|
||||
printf("Error [%ld]: FreeRTOS_IPInit.\n",fr_status);
|
||||
util_inf_loop(xClientSocket, ctx, ssl);
|
||||
}
|
||||
|
||||
/* Client Socket Setup */
|
||||
xRemoteAddress.sin_port = FreeRTOS_htons(DEFAULT_PORT);
|
||||
xRemoteAddress.sin_addr = FreeRTOS_inet_addr(SERVER_IP);
|
||||
|
||||
/* Create a FreeRTOS TCP Socket and connect */
|
||||
xClientSocket = FreeRTOS_socket(FREERTOS_AF_INET,
|
||||
FREERTOS_SOCK_STREAM,
|
||||
FREERTOS_IPPROTO_TCP);
|
||||
configASSERT(xClientSocket != FREERTOS_INVALID_SOCKET);
|
||||
FreeRTOS_bind(xClientSocket, &xRemoteAddress, sizeof(xSize));
|
||||
|
||||
/* Client Socket Connect */
|
||||
ret = FreeRTOS_connect(xClientSocket,
|
||||
&xRemoteAddress,
|
||||
sizeof(xRemoteAddress));
|
||||
if (ret != FR_SOCKET_SUCCESS) {
|
||||
printf("Error [%d]: FreeRTOS_connect.\n",ret);
|
||||
util_inf_loop(xClientSocket, ctx, ssl);
|
||||
}
|
||||
|
||||
/* TLS Connection Setup */
|
||||
/* Initialize wolfSSL */
|
||||
wolfSSL_Init();
|
||||
|
||||
/* Create and initialize WOLFSSL_CTX */
|
||||
ctx = wolfSSL_CTX_new(wolfSSLv23_client_method_ex((void *)NULL));
|
||||
if (ctx == NULL) {
|
||||
printf("Error: wolfSSL_CTX_new.\n");
|
||||
util_inf_loop(xClientSocket, ctx, ssl);
|
||||
}
|
||||
|
||||
/* Load client certificates into WOLFSSL_CTX */
|
||||
ret = wolfSSL_CTX_load_verify_buffer(ctx, CERT, SIZEOF_CERT,
|
||||
WOLFSSL_FILETYPE_ASN1);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("Error [%d]: wolfSSL_CTX_load_verify_buffer.\n",ret);
|
||||
util_inf_loop(xClientSocket, ctx, ssl);
|
||||
}
|
||||
|
||||
/* Create a WOLFSSL object */
|
||||
ssl = wolfSSL_new(ctx);
|
||||
if (ssl == NULL) {
|
||||
printf("Error: wolfSSL_new.\n");
|
||||
util_inf_loop(xClientSocket, ctx, ssl);
|
||||
}
|
||||
|
||||
/* Attach wolfSSL to the socket */
|
||||
ret = wolfSSL_set_fd(ssl, (int) xClientSocket);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("Error [%d]: wolfSSL_set_fd.\n",ret);
|
||||
util_inf_loop(xClientSocket, ctx, ssl);
|
||||
}
|
||||
|
||||
/* Connect to wolfSSL on the server side */
|
||||
ret = wolfSSL_connect(ssl);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
ret = wolfSSL_get_error(ssl, ret);
|
||||
printf("Error [%d]: wolfSSL_connect.\n",ret);
|
||||
util_inf_loop(xClientSocket, ctx, ssl);
|
||||
}
|
||||
|
||||
/* Send the message to the server */
|
||||
ret = wolfSSL_write(ssl, msg, (int) XSTRLEN(msg));
|
||||
if (ret < 0) {
|
||||
printf("Error: wolfSSL_write.\n");
|
||||
util_inf_loop(xClientSocket, ctx, ssl);
|
||||
}
|
||||
|
||||
/* Read the server data into buff array */
|
||||
XMEMSET(buff, 0, sizeof(buff));
|
||||
ret = wolfSSL_read(ssl, buff, sizeof(buff) - 1);
|
||||
|
||||
/* Shutdown TLS connection */
|
||||
wolfSSL_shutdown(ssl);
|
||||
|
||||
/* Cleanup */
|
||||
util_inf_loop(xClientSocket, ctx, ssl);
|
||||
}
|
||||
42
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/client-wolfssl/wolfssl_thread_entry.h
vendored
Normal file
42
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/client-wolfssl/wolfssl_thread_entry.h
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
/* wolfssl_thread_entry.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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_THREAD_ENTRY_H_
|
||||
#define WOLFSSL_THREAD_ENTRY_H_
|
||||
|
||||
#include <errno.h>
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
extern uint8_t g_ether0_mac_address[6];
|
||||
|
||||
static const byte ucIPAddress[4] = { 192, 168, 11, 241 };
|
||||
static const byte ucNetMask[4] = { 255, 255, 255, 0 };
|
||||
static const byte ucGatewayAddress[4] = { 192, 168, 11, 1 };
|
||||
static const byte ucDNSServerAddress[4] = { 192, 168, 11, 1 };
|
||||
|
||||
/* Client connects to the server with these details. */
|
||||
#define SERVER_IP "192.168.11.40"
|
||||
#define DEFAULT_PORT 11111
|
||||
#define CERT ca_cert_der_1024
|
||||
#define SIZEOF_CERT sizeof_ca_cert_der_1024
|
||||
|
||||
#define FR_SOCKET_SUCCESS 0
|
||||
|
||||
#endif /* WOLFSSL_THREAD_ENTRY_H_ */
|
||||
4
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/common/ra6m3g/README.md
vendored
Normal file
4
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/common/ra6m3g/README.md
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
Create a 'dummy' Renesas RA C Project Using RA Library.
|
||||
Copy and Paste the generated 'script' and 'src' folder into this folder.
|
||||
|
||||
These are linked to in other projects.
|
||||
65
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/common/src/freertos_tcp_port.c
vendored
Normal file
65
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/common/src/freertos_tcp_port.c
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
/* freertos_tcp_port.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 "bsp_api.h"
|
||||
#include "FreeRTOS.h"
|
||||
#include "FreeRTOS_sockets.h"
|
||||
#include "FreeRTOS_IP.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#define HOSTNAME "wolfssl_ra6m3g"
|
||||
|
||||
/*
|
||||
* Contains callback functions for FreeRTOS+TCP
|
||||
* The following implementations are NOT SUITABLE FOR PRODUCTION.
|
||||
* They currently serve to build the projects and are not secure.
|
||||
*/
|
||||
|
||||
uint32_t ulApplicationGetNextSequenceNumber(uint32_t ulSourceAddress,
|
||||
uint16_t usSourcePort,
|
||||
uint32_t ulDestinationAddress,
|
||||
uint16_t usDestinationPort);
|
||||
|
||||
const char *pcApplicationHostnameHook(void) {
|
||||
return HOSTNAME;
|
||||
}
|
||||
|
||||
uint32_t ulRand(void) {
|
||||
return (uint32_t) rand();
|
||||
}
|
||||
|
||||
/* Disabled in RA Configuration. Re-Enable within FreeRTOS+TCP Stack Properties */
|
||||
void vApplicationIPNetworkEventHook(eIPCallbackEvent_t eNetworkEvent) {
|
||||
(void) eNetworkEvent;
|
||||
}
|
||||
|
||||
uint32_t ulApplicationGetNextSequenceNumber(uint32_t ulSourceAddress,
|
||||
uint16_t usSourcePort,
|
||||
uint32_t ulDestinationAddress,
|
||||
uint16_t usDestinationPort)
|
||||
{
|
||||
(void) ulSourceAddress;
|
||||
(void) usSourcePort;
|
||||
(void) ulDestinationAddress;
|
||||
(void) usDestinationPort;
|
||||
|
||||
return ulRand();
|
||||
}
|
||||
85
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/common/user_settings.h
vendored
Normal file
85
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/common/user_settings.h
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 USER_SETTINGS_H_
|
||||
#define USER_SETTINGS_H_
|
||||
|
||||
|
||||
/* Temporary defines. Not suitable for production. */
|
||||
#define WOLFSSL_GENSEED_FORTEST /* Warning: define your own seed gen */
|
||||
/* End temporary defines */
|
||||
|
||||
/* TLS 1.3 */
|
||||
#define WOLFSSL_TLS13
|
||||
#define HAVE_HKDF
|
||||
#define WC_RSA_PSS
|
||||
#if defined(WOLFSSL_TLS13)
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
/* Operating Environment and Threading */
|
||||
#define FREERTOS
|
||||
#define FREERTOS_TCP
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_WRITEV
|
||||
#define NO_MAIN_DRIVER
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
/* Filesystem and IO */
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
#define NO_FILESYSTEM
|
||||
|
||||
/* Cryptography Enable Options */
|
||||
#define HAVE_CHACHA
|
||||
#define HAVE_POLY1305
|
||||
#define HAVE_ECC
|
||||
#define HAVE_RSA
|
||||
#define HAVE_SHA256
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_TRUNCATED_HMAC
|
||||
#define HAVE_EXTENDED_MASTER
|
||||
#define HAVE_ALPN
|
||||
#define HAVE_SNI
|
||||
#define HAVE_OCSP
|
||||
#define HAVE_AESGCM
|
||||
#define HAVE_ONE_TIME_AUTH
|
||||
|
||||
/* Non-Fast Math may call realloc. This project has no realloc support */
|
||||
#define USE_FAST_MATH
|
||||
#define ALT_ECC_SIZE
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
#define WC_RSA_BLINDING
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
#define WOLFSSL_DH_CONST
|
||||
|
||||
/* Cryptography Disable options */
|
||||
#define NO_PWDBASED
|
||||
#define NO_DSA
|
||||
#define NO_DES3
|
||||
#define NO_RC4
|
||||
#define NO_MD4
|
||||
|
||||
void wolfssl_thread_entry(void *pvParameters);
|
||||
extern void initialise_monitor_handles(void);
|
||||
int strncasecmp(const char *s1, const char * s2, unsigned int sz);
|
||||
|
||||
#endif /* USER_SETTINGS_H_ */
|
||||
48
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/common/util.h
vendored
Normal file
48
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/common/util.h
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/* util.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 _UTIL_H_
|
||||
#define _UTIL_H_
|
||||
#include "common/user_settings.h"
|
||||
#include <wolfssl/ssl.h>
|
||||
#include "FreeRTOS_IP.h"
|
||||
#include <stdio.h>
|
||||
|
||||
static void util_Cleanup(xSocket_t xSock, WOLFSSL_CTX *ctx, WOLFSSL *ssl) {
|
||||
printf("Cleaning up socket and wolfSSL objects.\n");
|
||||
if (xSock != NULL)
|
||||
FreeRTOS_closesocket(xSock);
|
||||
if (ssl != NULL)
|
||||
wolfSSL_free(ssl);
|
||||
if (ctx != NULL)
|
||||
wolfSSL_CTX_free(ctx);
|
||||
wolfSSL_Cleanup();
|
||||
}
|
||||
|
||||
static inline void util_inf_loop(xSocket_t xClientSocket, WOLFSSL_CTX *ctx,
|
||||
WOLFSSL *ssl) {
|
||||
util_Cleanup(xClientSocket, ctx, ssl);
|
||||
printf("Reached infinite loop.\n");
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
|
||||
#endif /* _UTIL_H */
|
||||
35
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/include.am
vendored
Normal file
35
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/include.am
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/src/wolfssl_thread_entry.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/benchmark-wolfcrypt/.project
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/client-wolfssl/src/wolfssl_thread_entry.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/client-wolfssl/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/client-wolfssl/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/client-wolfssl/wolfssl_thread_entry.h
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/common/ra6m3g/README.md
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/common/src/freertos_tcp_port.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/common/user_settings.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/common/util.h
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/server-wolfssl/src/wolfssl_thread_entry.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/server-wolfssl/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/server-wolfssl/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/server-wolfssl/wolfssl_thread_entry.h
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/test-wolfcrypt/src/wolfssl_thread_entry.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/test-wolfcrypt/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/test-wolfcrypt/.project
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/wolfssl/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/wolfssl/.project
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/README.md
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3G/README.md
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/README_APRA6M_en.md
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M3/README_APRA6M_jp.md
|
||||
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/server-wolfssl/common/src/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/server-wolfssl/common/src/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/server-wolfssl/script/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/server-wolfssl/script/.gitkeep
vendored
Normal file
187
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/server-wolfssl/src/wolfssl_thread_entry.c
vendored
Normal file
187
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/server-wolfssl/src/wolfssl_thread_entry.c
vendored
Normal file
@@ -0,0 +1,187 @@
|
||||
/* wolfssl_thread_entry.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/wolfio.h>
|
||||
#include "wolfssl_thread_entry.h"
|
||||
|
||||
/* FreeRTOS+TCP */
|
||||
#include "FreeRTOS_IP.h"
|
||||
#include "FreeRTOS_Sockets.h"
|
||||
|
||||
/* Project Tools */
|
||||
#include "common/util.h"
|
||||
#include <stdio.h>
|
||||
#include "hal_data.h"
|
||||
|
||||
/* the function is called just before main() to set up pins */
|
||||
/* this needs to be called to setup IO Port */
|
||||
void R_BSP_WarmStart (bsp_warm_start_event_t event)
|
||||
{
|
||||
|
||||
if (BSP_WARM_START_POST_C == event) {
|
||||
/* C runtime environment and system clocks are setup. */
|
||||
/* Configure pins. */
|
||||
R_IOPORT_Open(&g_ioport_ctrl, g_ioport.p_cfg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wolfssl_thread_entry(void *pvParameters) {
|
||||
FSP_PARAMETER_NOT_USED(pvParameters);
|
||||
|
||||
/* FreeRTOS+TCP parameters and objects */
|
||||
BaseType_t fr_status;
|
||||
struct freertos_sockaddr xClient, xBindAddress;
|
||||
Socket_t xListeningSocket, xConnectedSocket;
|
||||
socklen_t xSize = sizeof(xClient);
|
||||
const BaseType_t xBacklog = 1; /* Max number of connections */
|
||||
static const TickType_t xReceiveTimeOut = portMAX_DELAY;
|
||||
|
||||
/* Return Code */
|
||||
int ret = WOLFSSL_FAILURE;
|
||||
|
||||
/* Send/Receive Message */
|
||||
const char *reply = "I hear ya fa shizzle!\n";
|
||||
char buff[256];
|
||||
|
||||
/* wolfSSL objects */
|
||||
WOLFSSL_CTX *ctx = NULL;
|
||||
WOLFSSL *ssl = NULL;
|
||||
|
||||
/* Output to Renesas Debug Virtual Console */
|
||||
initialise_monitor_handles();
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
fr_status = FreeRTOS_IPInit(ucIPAddress,ucNetMask, ucGatewayAddress,
|
||||
ucDNSServerAddress, g_ether0_mac_address);
|
||||
|
||||
if (pdPASS != fr_status) {
|
||||
printf("Error [%ld]: FreeRTOS_IPInit.\n",fr_status);
|
||||
while (1);
|
||||
}
|
||||
/* Attempt to open the socket. */
|
||||
xListeningSocket = FreeRTOS_socket(FREERTOS_AF_INET,
|
||||
FREERTOS_SOCK_STREAM,
|
||||
FREERTOS_IPPROTO_TCP);
|
||||
configASSERT(xListeningSocket != FREERTOS_INVALID_SOCKET);
|
||||
|
||||
/* Set a time out so accept() will just wait for a connection. */
|
||||
FreeRTOS_setsockopt(xListeningSocket, 0,
|
||||
FREERTOS_SO_RCVTIMEO, &xReceiveTimeOut, sizeof(xReceiveTimeOut));
|
||||
|
||||
xBindAddress.sin_port = (uint16_t) DEFAULT_PORT;
|
||||
xBindAddress.sin_port = FreeRTOS_htons(xBindAddress.sin_port);
|
||||
|
||||
configASSERT(xListeningSocket != FREERTOS_INVALID_SOCKET);
|
||||
|
||||
ret = FreeRTOS_bind(xListeningSocket, &xBindAddress, sizeof(xBindAddress));
|
||||
if (ret == FR_SOCKET_SUCCESS)
|
||||
ret = FreeRTOS_listen(xListeningSocket, xBacklog);
|
||||
|
||||
if (ret != FR_SOCKET_SUCCESS) {
|
||||
printf("Error [%d]: FreeRTOS_bind.\n",ret);
|
||||
while (1);
|
||||
}
|
||||
|
||||
while (1) {
|
||||
ret = WOLFSSL_FAILURE;
|
||||
xConnectedSocket = FreeRTOS_accept(xListeningSocket, &xClient, &xSize);
|
||||
configASSERT(xConnectedSocket != FREERTOS_INVALID_SOCKET);
|
||||
|
||||
/* Create WOLFSSL_CTX object */
|
||||
ctx = wolfSSL_CTX_new(wolfSSLv23_server_method_ex((void *)NULL));
|
||||
|
||||
/* Load server certificates into WOLFSSL_CTX */
|
||||
if (ctx == NULL) {
|
||||
printf("Error: wolfSSL_CTX_new.\n");
|
||||
break;
|
||||
}
|
||||
ret = wolfSSL_CTX_use_certificate_buffer(ctx, CERT_BUF, SIZEOF_CERT_BUF,
|
||||
SSL_FILETYPE_ASN1);
|
||||
|
||||
/* Load server key into WOLFSSL_CTX */
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("Error [%d]: wolfSSL_CTX_use_certificate_buffer.\n",ret);
|
||||
break;
|
||||
}
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(ctx, KEY_BUF, SIZEOF_KEY_BUF,
|
||||
SSL_FILETYPE_ASN1);
|
||||
|
||||
/* Create a WOLFSSL object */
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("Error [%d]: wolfSSL_CTX_use_PrivateKey_buffer.\n",ret);
|
||||
break;
|
||||
}
|
||||
ssl = wolfSSL_new(ctx);
|
||||
|
||||
/* Attach wolfSSL to the socket */
|
||||
if (ssl == NULL) {
|
||||
printf("Error: wolfSSL_new.\n");
|
||||
break;
|
||||
}
|
||||
ret = wolfSSL_set_fd(ssl, (int) xConnectedSocket);
|
||||
|
||||
/* Establish TLS connection */
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("Error [%d]: wolfSSL_set_fd.\n",ret);
|
||||
break;
|
||||
}
|
||||
ret = wolfSSL_accept(ssl);
|
||||
|
||||
/* Read the client data into our buff array */
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
printf("Error [%d]: wolfSSL_set_fd.\n",ret);
|
||||
break;
|
||||
}
|
||||
memset(buff, 0, sizeof(buff));
|
||||
ret = wolfSSL_read(ssl, buff, sizeof(buff) - 1);
|
||||
if (ret < 0)
|
||||
break;
|
||||
|
||||
/* Check for server shutdown command */
|
||||
if (strncmp(buff, "shutdown", 8) == 0)
|
||||
break;
|
||||
|
||||
/* Write our reply into buff */
|
||||
memset(buff, 0, sizeof(buff));
|
||||
memcpy(buff, reply, strlen(reply));
|
||||
|
||||
/* Reply back to the client */
|
||||
ret = wolfSSL_write(ssl, buff, (int) strlen(buff));
|
||||
if (ret < 0)
|
||||
break;
|
||||
|
||||
/* Cleanup after this connection */
|
||||
util_Cleanup(xConnectedSocket, ctx, ssl);
|
||||
}
|
||||
|
||||
/* Shutdown TLS Server */
|
||||
ret = wolfSSL_shutdown(ssl);
|
||||
if (ret == WOLFSSL_SHUTDOWN_NOT_DONE) {
|
||||
wolfSSL_shutdown(ssl);
|
||||
}
|
||||
|
||||
/* Cleanup connection */
|
||||
util_inf_loop(xConnectedSocket, ctx, ssl);
|
||||
}
|
||||
44
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/server-wolfssl/wolfssl_thread_entry.h
vendored
Normal file
44
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/server-wolfssl/wolfssl_thread_entry.h
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/* wolfssl_thread_entry.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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_THREAD_ENTRY_H_
|
||||
#define WOLFSSL_THREAD_ENTRY_H_
|
||||
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
extern uint8_t g_ether0_mac_address[6];
|
||||
|
||||
static const byte ucIPAddress[4] = { 192, 168, 11, 241 };
|
||||
static const byte ucNetMask[4] = { 255, 255, 255, 0 };
|
||||
static const byte ucGatewayAddress[4] = { 192, 168, 11, 1 };
|
||||
static const byte ucDNSServerAddress[4] = { 192, 168, 11, 1 };
|
||||
|
||||
/* Server Cert and Key */
|
||||
#define CERT_BUF server_cert_der_1024
|
||||
#define SIZEOF_CERT_BUF sizeof_server_cert_der_1024
|
||||
#define KEY_BUF server_key_der_1024
|
||||
#define SIZEOF_KEY_BUF sizeof_server_key_der_1024
|
||||
|
||||
/* Port That the wolfSSL Server connects to. */
|
||||
#define DEFAULT_PORT 11111
|
||||
|
||||
#define FR_SOCKET_SUCCESS 0
|
||||
|
||||
#endif /* WOLFSSL_THREAD_ENTRY_H_ */
|
||||
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/test-wolfcrypt/common/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/test-wolfcrypt/common/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/test-wolfcrypt/script/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/test-wolfcrypt/script/.gitkeep
vendored
Normal file
32
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/test-wolfcrypt/src/wolfssl_thread_entry.c
vendored
Normal file
32
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/test-wolfcrypt/src/wolfssl_thread_entry.c
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/* wolfssl_thread_entry.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 <wolfssl/wolfcrypt/settings.h>
|
||||
#include "wolfcrypt/test/test.h"
|
||||
|
||||
void wolfssl_thread_entry(void* pvParameters)
|
||||
{
|
||||
FSP_PARAMETER_NOT_USED (pvParameters);
|
||||
/* Benchmark output is displayed to Renesas Debug Virtual Console */
|
||||
initialise_monitor_handles();
|
||||
wolfcrypt_test(0);
|
||||
while(1);
|
||||
}
|
||||
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/wolfssl/src/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/wolfssl/src/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/wolfssl/wolfcrypt/.gitkeep
vendored
Normal file
0
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3/wolfssl/wolfcrypt/.gitkeep
vendored
Normal file
1
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3G/README.md
vendored
Normal file
1
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M3G/README.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
[Moved to ../RA6M3/README.md](../RA6M3/README.md)
|
||||
345
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/README.md
vendored
Normal file
345
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/README.md
vendored
Normal file
@@ -0,0 +1,345 @@
|
||||
wolfSSL for Renesas RA Evaluation Kit (EK-RA6M4)
|
||||
=================================================
|
||||
|
||||
## Description
|
||||
|
||||
This directory contains e2studio projects targeted at the Renesas RA 32-bit MCUs.
|
||||
The example projects include a wolfSSL TLS client.
|
||||
They also include benchmark and cryptography tests for the wolfCrypt library.
|
||||
|
||||
|
||||
The wolfssl project contains both the wolfSSL and wolfCrypt libraries.
|
||||
It is built as a `Renesas RA C Library Project` and contains the Renesas RA
|
||||
configuration. The wolfssl project uses `Secure Cryptography Engine on RA6 Protected Mode`
|
||||
as hardware acceleration for cypto and TLS operation.
|
||||
|
||||
|
||||
The other projects (benchmark, client, and test) are built as a
|
||||
`Renesas RA C Project Using RA Library`, where the RA library is the wolfssl project.
|
||||
The wolfssl Project Summary is listed below and is relevant for every project.
|
||||
|
||||
### Project Summary
|
||||
|Item|Name/Version|
|
||||
|:--|:--|
|
||||
|Board|EK-RA6M4|
|
||||
|Device|R7FA6M4AF3CFB|
|
||||
|Toolchain|GCC ARM Embedded|
|
||||
|FSP Version|3.5.0|
|
||||
|
||||
#### Selected software components
|
||||
|
||||
|Components|Version|
|
||||
|:--|:--|
|
||||
|Board Support Package Common Files|v3.5.0|
|
||||
|Secure Cryptography Engine on RA6 Protected Mode|v3.5.0|
|
||||
|I/O Port|v3.5.0|
|
||||
|Arm CMSIS Version 5 - Core (M)|v5.8.0+fsp.3.5.0|
|
||||
|RA6M4-EK Board Support Files|v3.5.0|
|
||||
|Board support package for R7FA6M4AF3CFB|v3.5.0|
|
||||
|Board support package for RA6M4|v3.5.0|
|
||||
|Board support package for RA6M4 - FSP Data|v3.5.0|
|
||||
|FreeRTOS|v10.4.3-LTS.Patch.2+fsp.3.5.0|
|
||||
|FreeRTOS - Memory Management - Heap 4|v10.4.3-LTS.Patch.2+fsp.3.5.0|
|
||||
|r_ether to FreeRTOS+TCP Wrapper|v3.5.0|
|
||||
|Ethernet|v3.5.0|
|
||||
|Ethernet PHY|v3.5.0|
|
||||
|FreeRTOS+TCP|v2.3.2-LTS.Patch.1+fsp.3.5.0|
|
||||
|FreeRTOS - Buffer Allocation 2|v2.3.2-LTS.Patch.1+fsp.3.5.0|
|
||||
|
||||
## Setup Steps and Build wolfSSL Library
|
||||
|
||||
1.) Import projects from [File]->[Open projects from File System]
|
||||
|
||||
+ Select folder at /path/to/wolfssl/IDE/Renesas/e2studio/RA6M4
|
||||
+ Deselect the Non-Eclipse project, RA6M4, by clicking the checkbox\
|
||||
Only the folders with 'Eclipse project' under 'Import as' need to be selected.
|
||||
|
||||
2.) Create a `dummy_library` Static Library.
|
||||
|
||||
+ Click File->New->`RA C/C++ Project`.
|
||||
+ Select `EK-RA6M4` from Drop-down list.
|
||||
+ Check `Static Library`.
|
||||
+ Select FreeRTOS from RTOS selection. Click Next.
|
||||
+ Check `FreeRTOS minimal - Static Allocation`. Click Finish.
|
||||
+ Open Smart Configurator by clicking configuration.xml in the project
|
||||
+ Go to `BSP` tab and increase Heap Size under `RA Common` on Properties page, e.g. 0x1000
|
||||
+ Go to `Stacks` tab
|
||||
+ Add `SCE Protected Mode` stack from `New Stack` -> `Security`
|
||||
+ Add New thead and set properties
|
||||
|
||||
|Property|Value|
|
||||
|:--|:--|
|
||||
|Thread Symbol|sce_tst_thread|
|
||||
|Thread Name|sce_tst_thread|
|
||||
|Thread Stack size|increase depending on your environment<br> e.g. 0xA000|
|
||||
|Thread MemoryAllocation|Dyamic|
|
||||
|Common General Use Mutexes|Enabled|
|
||||
|Common General Enable Backward Compatibility|Enabled|
|
||||
|Common Memory Allocation Support Dynamic Allocation|Enabled|
|
||||
|Common Memory Allocation Total Heap Size|increase depending on your environment<br> e.g. 0x20000, <br> e.g. 0x30000 when using multi thread example|
|
||||
|
||||
+ Add `Heap 4` stack to sce_tst_thread from `New Stack` -> `RTOS` -> `FreeRTOS Heap 4`
|
||||
+ Add `FreeRTOS + TCP` stack to sce_tst_thread from `New Stack` -> `Networking` -> `FreeRTOS+TCP` and set properties
|
||||
|
||||
|Property|Value|
|
||||
|:--|:--|
|
||||
|Network Events call vApplicationIPNetworkEventHook|Disable|
|
||||
|Use DHCP|Disable|
|
||||
|
||||
+ Save `dummy_library` FSP configuration
|
||||
+ Copy <u>configuration.xml</u> and pincfg under `dummy_library` to `wolfSSL_RA6M4`
|
||||
+ Open Smart Configurator by clicking copied configuration.xml
|
||||
+ Click `Generate Project Content` on Smart Configurator
|
||||
|
||||
3.) Build the wolfSSL project
|
||||
|
||||
4.) Create a 'dummy_application' Renesas RA C Project Using RA Library.
|
||||
|
||||
+ Click File->New->`RA C/C++ Project`.
|
||||
+ Select `EK-RA6M4` from Drop-down list.
|
||||
+ Check `Executable Using an RA Static Library`.
|
||||
+ Select FreeRTOS from RTOS selection. Click Finish.
|
||||
+ Enter `dummy_application` as the project name. Click Next.
|
||||
+ Under `RA library project`, select `wolfSSL_RA6M4`.
|
||||
+ Click Finish.
|
||||
+ Copy the followng folder and file at `dummy_application` to `test_RA6M4`\
|
||||
script/\
|
||||
src/sce_tst_thread_entry.c
|
||||
|
||||
+ Add `sce_test()` call under /* TODO: add your own code here */ line at sce_tst_thread_entry.c
|
||||
```
|
||||
...
|
||||
/* TODO: add your own code here */
|
||||
sce_test();
|
||||
...
|
||||
```
|
||||
|
||||
5.) Prepare SEGGER_RTT to logging
|
||||
|
||||
+ Download J-Link software from [Segger](https://www.segger.com/downloads/jlink)
|
||||
+ Choose `J-Link Software and Documentation Pack`
|
||||
+ Copy sample program files below from `Installed SEGGER` folder, `e.g C:\Program Files\SEGGER\JLink\Samples\RTT`, to /path/to/wolfssl/IDE/Reenesas/e2studio/RA6M4/test/src/SEGGER_RTT\
|
||||
|
||||
SEGGER_RTT.c\
|
||||
SEGGER_RTT.h\
|
||||
SEGGER_RTT_Conf.h\
|
||||
SEGGER_RTT_printf.c
|
||||
|
||||
+ To connect RTT block, you can configure RTT viewer configuration based on where RTT block is in map file\
|
||||
e.g.\
|
||||
[test_RA6M4.map]
|
||||
```
|
||||
COMMON 0x200232a8 0xa8 ./src/SEGGER_RTT/SEGGER_RTT.o\
|
||||
````
|
||||
you can specify "RTT control block" to 0x200232a8 by Address\
|
||||
OR\
|
||||
you can specify "RTT control block" to 0x20020000 0x10000 by Search Range
|
||||
|
||||
## Run Client
|
||||
1.) Enable TLS_CLIENT definition in wolfssl_demo.h of test_RA6M4 projet
|
||||
|
||||
2.) Client IP address and Server IP address
|
||||
|
||||
+ Client IP address can be changed by the following line in wolf_client.c.
|
||||
```
|
||||
static const byte ucIPAddress[4] = { 192, 168, 11, 241 };
|
||||
```
|
||||
+ Client IP address can be changed by the following line in wolf_client.c.
|
||||
```
|
||||
#define SERVER_IP "192.168.11.40"
|
||||
```
|
||||
|
||||
3.) Build test_RA6M4 project
|
||||
|
||||
4.) Prepare peer wolfssl server
|
||||
|
||||
+ On Linux
|
||||
```
|
||||
$ autogen.sh
|
||||
$ ./configure --enable-extended-master=no CFLAGS="-DWOLFSSL_STATIC_RSA -DHAVE_AES_CBC"
|
||||
```
|
||||
|
||||
Run peer wolfSSL server
|
||||
|
||||
RSA sign and verify use, launch server with the following option
|
||||
```
|
||||
$./examples/server/server -b -d -i
|
||||
```
|
||||
|
||||
ECDSA sign and verify use, launch server with the following option
|
||||
```
|
||||
$./examples/server/server -b -d -c -i ./certs/server-ecc.pem -k ./certs/ecc-key.pem
|
||||
```
|
||||
|
||||
5.) Run the example Client
|
||||
|
||||
You will see the following message on J-LinK RTT Viewer when using RSA sign and verify.
|
||||
```
|
||||
Start Client Example,
|
||||
Connecting to 192.168.11.xx
|
||||
|
||||
[wolfSSL_TLS_client_do(00)][00] Start to connect to the server.
|
||||
[wolfSSL_TLS_client_do(00)][00] Cipher : NULL
|
||||
[wolfSSL_TLS_client_do(00)][00] Received: I hear you fa shizzle!
|
||||
|
||||
[wolfSSL_TLS_client_do(01)][01] Start to connect to the server.
|
||||
[wolfSSL_TLS_client_do(01)][01] Cipher : ECDHE-RSA-AES128-GCM-SHA256
|
||||
[wolfSSL_TLS_client_do(01)][01] Received: I hear you fa shizzle!
|
||||
|
||||
[wolfSSL_TLS_client_do(02)][02] Start to connect to the server.
|
||||
[wolfSSL_TLS_client_do(02)][02] Cipher : ECDHE-RSA-AES256-SHA
|
||||
[wolfSSL_TLS_client_do(02)][02] Received: I hear you fa shizzle!
|
||||
|
||||
[wolfSSL_TLS_client_do(03)][03] Start to connect to the server.
|
||||
[wolfSSL_TLS_client_do(03)][03] Cipher : ECDHE-RSA-AES128-SHA256
|
||||
[wolfSSL_TLS_client_do(03)][03] Received: I hear you fa shizzle!
|
||||
|
||||
[wolfSSL_TLS_client_do(04)][04] Start to connect to the server.
|
||||
[wolfSSL_TLS_client_do(04)][04] Cipher : AES128-SHA256
|
||||
[wolfSSL_TLS_client_do(04)][04] Received: I hear you fa shizzle!
|
||||
|
||||
|
||||
End of Client Example
|
||||
```
|
||||
|
||||
You will see the following message on J-LinK RTT Viewer when using ECDSA sign and verify.
|
||||
```
|
||||
Start Client Example,
|
||||
Connecting to 192.168.11.xx
|
||||
|
||||
[wolfSSL_TLS_client_do(00)][00] Start to connect to the server.
|
||||
[wolfSSL_TLS_client_do(00)][00] Cipher : NULL
|
||||
[wolfSSL_TLS_client_do(00)][00] Received: I hear you fa shizzle!
|
||||
|
||||
[wolfSSL_TLS_client_do(01)][01] Start to connect to the server.
|
||||
[wolfSSL_TLS_client_do(01)][01] Cipher : ECDHE-ECDSA-AES128-GCM-SHA256
|
||||
[wolfSSL_TLS_client_do(01)][01] Received: I hear you fa shizzle!
|
||||
|
||||
[wolfSSL_TLS_client_do(02)][02] Start to connect to the server.
|
||||
[wolfSSL_TLS_client_do(02)][02] Cipher : ECDHE-ECDSA-AES256-SHA
|
||||
[wolfSSL_TLS_client_do(02)][02] Received: I hear you fa shizzle!
|
||||
|
||||
[wolfSSL_TLS_client_do(03)][03] Start to connect to the server.
|
||||
[wolfSSL_TLS_client_do(03)][03] Cipher : ECDHE-ECDSA-AES128-SHA256
|
||||
[wolfSSL_TLS_client_do(03)][03] Received: I hear you fa shizzle!
|
||||
|
||||
|
||||
End of Client Exampl
|
||||
```
|
||||
|
||||
**Note**\
|
||||
To run "RSA verify" client, enable "#define USE_CERT_BUFFERS_2048" in wolfssl_demo.h\
|
||||
To run "ECDSA verify" client, enable "#define USE_CERT_BUFFERS_256" in wolfssl_demo.h
|
||||
|
||||
|
||||
### Run Multi Client Session example
|
||||
1.) Enable TLS_CLIENT and TLS_MULTITHREAD_TEST definition in wolfssl_demo.h of test_RA6M4 projet
|
||||
|
||||
2.) Follow [Run Client](#run-client) instruction
|
||||
|
||||
3.) Prepare peer wolfssl server
|
||||
|
||||
RSA sign and verify use, launch server with the following option
|
||||
```
|
||||
$./examples/server/server -b -d -i -p 11111
|
||||
|
||||
Open another terminal and launch another server example
|
||||
$./examples/server/server -b -d -i -p 11112
|
||||
```
|
||||
|
||||
ECDSA sign and verify use, launch server with the following option
|
||||
```
|
||||
$./examples/server/server -b -d -c -i ./certs/server-ecc.pem -k ./certs/ecc-key.pem -p 11111
|
||||
|
||||
Open another terminal and launch another server example
|
||||
$./examples/server/server -b -d -c -i ./certs/server-ecc.pem -k ./certs/ecc-key.pem -p 11112
|
||||
```
|
||||
|
||||
4.) Run Multi Client Session Example
|
||||
You will see similar following message on J-LinK RTT Viewer when using ECDSA sign and verify.
|
||||
```
|
||||
Start Client Example,
|
||||
Connecting to 192.168.11.xx
|
||||
|
||||
clt_thd_taskA connecting to 11111 port
|
||||
clt_thd_taskB connecting to 11112 port
|
||||
[clt_thd_taskA][00] Ready to connect.
|
||||
[clt_thd_taskA][00] Start to connect to the server.
|
||||
[clt_thd_taskA][00] Cipher : ECDHE-RSA-AES128-GCM-SHA256
|
||||
[clt_thd_taskB][00] Ready to connect.
|
||||
[clt_thd_taskB][00] Start to connect to the server.
|
||||
[clt_thd_taskB][00] Cipher : ECDHE-RSA-AES128-SHA256
|
||||
[clt_thd_taskB][00] Received: I hear you fa shizzle!
|
||||
|
||||
[clt_thd_taskA][00] Received: I hear you fa shizzle!
|
||||
|
||||
clt_thd_taskA connecting to 11111 port
|
||||
clt_thd_taskB connecting to 11112 port
|
||||
[clt_thd_taskA][00] Ready to connect.
|
||||
[clt_thd_taskA][00] Start to connect to the server.
|
||||
[clt_thd_taskA][00] Cipher : AES128-SHA256
|
||||
[clt_thd_taskB][00] Ready to connect.
|
||||
[clt_thd_taskB][00] Start to connect to the server.
|
||||
[clt_thd_taskB][00] Cipher : AES256-SHA256
|
||||
[clt_thd_taskA][00] Received: I hear you fa shizzle!
|
||||
|
||||
[clt_thd_taskB][00] Received: I hear you fa shizzle!
|
||||
|
||||
|
||||
End of Client Example
|
||||
```
|
||||
|
||||
You will see similar following message on J-LinK RTT Viewer when using ECDSA sign and verify.
|
||||
```
|
||||
Start Client Example,
|
||||
Connecting to 192.168.11.xx
|
||||
|
||||
clt_thd_taskA connecting to 11111 port
|
||||
clt_thd_taskB connecting to 11112 port
|
||||
[clt_thd_taskA][00] Ready to connect.
|
||||
[clt_thd_taskA][00] Start to connect to the server.
|
||||
[clt_thd_taskA][00] Cipher : ECDHE-ECDSA-AES128-GCM-SHA256
|
||||
[clt_thd_taskB][00] Ready to connect.
|
||||
[clt_thd_taskB][00] Start to connect to the server.
|
||||
[clt_thd_taskB][00] Cipher : ECDHE-ECDSA-AES128-SHA256
|
||||
[clt_thd_taskB][00] Received: I hear you fa shizzle!
|
||||
|
||||
[clt_thd_taskA][00] Received: I hear you fa shizzle!
|
||||
|
||||
|
||||
End of Client Example
|
||||
```
|
||||
|
||||
**Note**\
|
||||
Multi Client session use case is only able to run threads that all use either SCE cipher suite or SW cipher suite.
|
||||
The example program runs two threads that use SCE cipher suite.
|
||||
|
||||
## Run Crypt test and Benchmark
|
||||
|
||||
1.) Enable CRYPT_TEST and/or BENCHMARK definition in wolfssl_demo.h
|
||||
|
||||
2.) Enable SCEKEY_INSTALLED definition in user_settings.h if you have installed key for AES
|
||||
|
||||
In the example code for benchmark, it assumes that AES key is installed at DIRECT_KEY_ADDRESS which is 0x08000000U as follows:
|
||||
```
|
||||
#if defined(SCEKEY_INSTALLED)
|
||||
/* aes 256 */
|
||||
memcpy(guser_PKCbInfo.sce_wrapped_key_aes256.value,
|
||||
(uint32_t *)DIRECT_KEY_ADDRESS, HW_SCE_AES256_KEY_INDEX_WORD_SIZE*4);
|
||||
guser_PKCbInfo.sce_wrapped_key_aes256.type = SCE_KEY_INDEX_TYPE_AES256;
|
||||
guser_PKCbInfo.aes256_installedkey_set = 1;
|
||||
/* aes 128 */
|
||||
guser_PKCbInfo.aes128_installedkey_set = 0;
|
||||
#endif
|
||||
```
|
||||
|
||||
To install key, please refer [Installing and Updating Secure Keys](https://www.renesas.com/us/en/document/apn/installing-and-updating-secure-keys-ra-family).
|
||||
|
||||
You can update code above to handle AES128 key when you install its key.
|
||||
|
||||
3.) Run Benchmark and Crypto Test
|
||||
|
||||
|
||||
## Support
|
||||
|
||||
For support inquiries and questions, please email support@wolfssl.com. Feel free to reach out to info@wolfssl.jp as well.
|
||||
80
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/common/user_settings.h
vendored
Normal file
80
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/common/user_settings.h
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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
|
||||
*/
|
||||
/* Operating Environment and Threading */
|
||||
#define FREERTOS
|
||||
#define FREERTOS_TCP
|
||||
|
||||
#define NO_MAIN_DRIVER
|
||||
#define BENCH_EMBEDDED
|
||||
#define NO_WRITEV
|
||||
|
||||
#define NO_DEV_RANDOM
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
#define NO_WOLF_C99
|
||||
#define NO_MULTIBYTE_PRINT
|
||||
#define NO_FILESYSTEM
|
||||
|
||||
#define XVALIDATEDATE(d, f,t) (0)
|
||||
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
#define WC_RSA_BLINDING
|
||||
|
||||
#define HAVE_AESGCM
|
||||
#define WOLFSSL_SHA512
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define CURVE25519_SMALL
|
||||
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
#define USE_FAST_MATH
|
||||
|
||||
/* static RSA */
|
||||
#define WOLFSSL_STATIC_RSA
|
||||
|
||||
/* SEGGER printf */
|
||||
#define USE_SEGGER_RTT_PRINTF
|
||||
|
||||
#ifdef USE_SEGGER_RTT_PRINTF
|
||||
int myprintf(const char * sFormat, ...);
|
||||
#undef printf
|
||||
#define printf myprintf
|
||||
#endif
|
||||
|
||||
/* #define WOLFSSL_TLS13 */
|
||||
|
||||
#if defined(WOLFSSL_TLS13)
|
||||
#include <sys/time.h>
|
||||
#define HAVE_FFDHE_2048
|
||||
#define HAVE_HKDF
|
||||
#define WC_RSA_PSS
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#endif
|
||||
|
||||
#define WOLF_CRYPTO_CB
|
||||
/* Enable SCEKEY_INSTALLED if keys are installed */
|
||||
#define SCEKEY_INSTALLED
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT) && defined(SCEKEY_INSTALLED)
|
||||
#define HAVE_RENESAS_SYNC
|
||||
#endif
|
||||
111
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/common/wolfssl_demo.h
vendored
Normal file
111
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/common/wolfssl_demo.h
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
/* wolfssl_demo.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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_
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
#include "FreeRTOS_IP.h"
|
||||
#include "FreeRTOS_Sockets.h"
|
||||
|
||||
#define FREQ 10000 /* Hz */
|
||||
|
||||
#define FLASH_HP_DF_BLOCK_0 0x08000000U /* 64 B: 0x40100000 - 0x4010003F */
|
||||
#define FLASH_HP_DF_BLOCK_1 0x08000040U /* 64 B: 0x40100040 - 0x4010007F */
|
||||
#define FLASH_HP_DF_BLOCK_2 0x08000080U /* 64 B: 0x40100080 - 0x401000BF */
|
||||
#define FLASH_HP_DF_BLOCK_3 0x080000C0U /* 64 B: 0x401000C0 - 0x401000FF */
|
||||
#define DIRECT_KEY_ADDRESS_256 FLASH_HP_DF_BLOCK_1
|
||||
#define DIRECT_KEY_ADDRESS_128 FLASH_HP_DF_BLOCK_2
|
||||
|
||||
/* Client connects to the server with these details. */
|
||||
#define SERVER_IP "192.168.11.49"
|
||||
#define DEFAULT_PORT 11111
|
||||
|
||||
/* 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 CRYPT_TEST or BENCHMARK */
|
||||
#define TLS_CLIENT
|
||||
|
||||
/* use multi-thread example */
|
||||
/*#define TLS_MULTITHREAD_TEST*/
|
||||
#if defined(TLS_MULTITHREAD_TEST)
|
||||
#define THREAD_STACK_SIZE (5 * 1024)
|
||||
#endif
|
||||
|
||||
/* Use RSA certificates */
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
/* Use ECC certificates */
|
||||
/*#define USE_CERT_BUFFERS_256*/
|
||||
|
||||
#if defined(USE_CERT_BUFFERS_2048) && defined(USE_CERT_BUFFERS_256)
|
||||
#error please set either macro USE_CERT_BUFFERS_2048 or USE_CERT_BUFFERS_256
|
||||
#endif
|
||||
|
||||
typedef struct tagTestInfo
|
||||
{
|
||||
int id;
|
||||
int port;
|
||||
char name[32];
|
||||
const char* cipher;
|
||||
WOLFSSL_CTX* ctx;
|
||||
wolfSSL_Logging_cb log_f;
|
||||
#if defined(TLS_MULTITHREAD_TEST)
|
||||
SemaphoreHandle_t xBinarySemaphore;
|
||||
#endif
|
||||
} TestInfo;
|
||||
|
||||
void sce_test();
|
||||
void TCPInit();
|
||||
void wolfSSL_TLS_client_init();
|
||||
void wolfSSL_TLS_client_do(void *pvParam);
|
||||
void wolfSSL_TLS_cleanup();
|
||||
extern WOLFSSL_CTX *client_ctx;
|
||||
|
||||
#ifdef TLS_MULTITHREAD_TEST
|
||||
extern xSemaphoreHandle exit_semaph;
|
||||
#endif
|
||||
|
||||
static void util_Cleanup(xSocket_t xSock, WOLFSSL_CTX *ctx, WOLFSSL *ssl) {
|
||||
printf("Cleaning up socket and wolfSSL objects.\n");
|
||||
if (xSock != NULL)
|
||||
FreeRTOS_closesocket(xSock);
|
||||
if (ssl != NULL)
|
||||
wolfSSL_free(ssl);
|
||||
if (ctx != NULL)
|
||||
wolfSSL_CTX_free(ctx);
|
||||
wolfSSL_Cleanup();
|
||||
}
|
||||
|
||||
static inline void util_inf_loop(xSocket_t xClientSocket, WOLFSSL_CTX *ctx,
|
||||
WOLFSSL *ssl) {
|
||||
util_Cleanup(xClientSocket, ctx, ssl);
|
||||
printf("Reached infinite loop.\n");
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
#endif /* WOLFSSL_DEMO_H_ */
|
||||
19
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/include.am
vendored
Normal file
19
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/include.am
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/README.md
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/wolfssl/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/wolfssl/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/test/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/test/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/test/test_RA6M4Debug.launch
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/test/src/test_main.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/test/src/wolf_client.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/test/src/wolfssl_sce_unit_test.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/test/src/SEGGER_RTT/myprint.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/test/src/common/.gitignore
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/test/key_data/key_data_sce.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/test/key_data/key_data.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/common/wolfssl_demo.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/common/user_settings.h
|
||||
20
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/key_data/key_data.h
vendored
Normal file
20
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/key_data/key_data.h
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
#ifndef __KEY_DATA_H__
|
||||
|
||||
#include "r_sce.h"
|
||||
|
||||
/** Firmware update data and user key datas */
|
||||
typedef struct user_key_block_data
|
||||
{
|
||||
/* Provisioning key wapped by Renesas DLM */
|
||||
uint8_t encrypted_provisioning_key[HW_SCE_AES_CBC_IV_BYTE_SIZE * 2];
|
||||
/* Initial vector to be used when creating encrypted key */
|
||||
uint8_t iv[HW_SCE_AES_CBC_IV_BYTE_SIZE];
|
||||
/* RSA 2048 bit key, encrypted by AES128-ECB */
|
||||
uint8_t encrypted_user_rsa2048_ne_key[HW_SCE_RSA2048_NE_KEY_BYTE_SIZE + 16];
|
||||
} st_user_key_block_data_t;
|
||||
|
||||
extern const unsigned char ca_cert_der_sign[];
|
||||
extern const unsigned char ca_ecc_cert_der_sign[];
|
||||
|
||||
#endif /* __KEY_DATA_H__ */
|
||||
139
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/key_data/key_data_sce.c
vendored
Normal file
139
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/key_data/key_data_sce.c
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
/* key_data.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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"
|
||||
#include "wolfssl_demo.h"
|
||||
|
||||
/*******************************************************************************
|
||||
* SCE Key Information
|
||||
*******************************************************************************/
|
||||
const st_user_key_block_data_t g_key_block_data =
|
||||
{
|
||||
/* uint8_t encrypted_provisioning_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2]; */
|
||||
{
|
||||
0xE7, 0x1C, 0xEB, 0xCA, 0x3A, 0x64, 0x0B, 0xD2, 0xC5, 0xB8, 0xF2, 0xD0,
|
||||
0xF7, 0x1B, 0xA9, 0x4A, 0x98, 0xFF, 0xF3, 0x48, 0x81, 0xAD, 0xAF, 0x63,
|
||||
0x19, 0x24, 0x4B, 0x2B, 0xC0, 0x8B, 0x9C, 0x6B
|
||||
},
|
||||
/* uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE]; */
|
||||
{
|
||||
0xD7, 0x97, 0x56, 0x82, 0x5B, 0x4B, 0x7F, 0xB2, 0x1C, 0x1F, 0xEE, 0x85,
|
||||
0x02, 0xC5, 0xD0, 0xBA
|
||||
},
|
||||
/* uint8_t encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16]; */
|
||||
{
|
||||
0x3F, 0xA5, 0xBE, 0xBF, 0x86, 0xEC, 0x23, 0x37, 0x82, 0x37, 0x71, 0x0C,
|
||||
0x83, 0xA7, 0x8E, 0x86, 0xF0, 0x16, 0xD3, 0x7B, 0xF1, 0x25, 0xA4, 0x37,
|
||||
0x7A, 0x2D, 0x16, 0xF2, 0xFF, 0x3D, 0xEE, 0x46, 0xE0, 0x05, 0x58, 0x56,
|
||||
0xC2, 0xE7, 0x9D, 0x2C, 0x01, 0x84, 0x59, 0x8E, 0xA8, 0x9E, 0xEE, 0x3F,
|
||||
0x22, 0x83, 0x68, 0xDA, 0x9E, 0xCE, 0xEA, 0x99, 0xFD, 0xAF, 0xDF, 0x67,
|
||||
0x1E, 0x73, 0x25, 0x68, 0xBF, 0x0A, 0xDF, 0xAF, 0xC4, 0x3D, 0xF1, 0xBD,
|
||||
0x41, 0xF5, 0xAC, 0xAC, 0xA4, 0x36, 0xF8, 0x96, 0xC0, 0x8C, 0x2F, 0x1A,
|
||||
0x79, 0x75, 0x28, 0xAE, 0x67, 0xC9, 0x5A, 0xDE, 0x2A, 0xB4, 0x99, 0xDB,
|
||||
0x8C, 0x25, 0x53, 0x58, 0x8C, 0xDC, 0xA8, 0x0D, 0xFE, 0xEE, 0x0F, 0x6C,
|
||||
0x61, 0xE6, 0x43, 0x66, 0xE8, 0x4A, 0xE3, 0xEB, 0xAB, 0xA2, 0x52, 0xE4,
|
||||
0x67, 0xC2, 0x9A, 0x57, 0xA4, 0x1F, 0xE0, 0xFC, 0x2B, 0xBE, 0x25, 0xBF,
|
||||
0xF0, 0x70, 0x18, 0x88, 0x93, 0xB7, 0x2F, 0x74, 0xF8, 0xF3, 0x88, 0xB8,
|
||||
0xFA, 0x18, 0xBE, 0xC1, 0xB2, 0x24, 0x4B, 0xBC, 0x89, 0x2D, 0xC4, 0x02,
|
||||
0xB3, 0x82, 0xEC, 0xDB, 0xC9, 0xF0, 0xA9, 0xC3, 0x30, 0x7C, 0xF5, 0x15,
|
||||
0xEB, 0x9B, 0x16, 0x8C, 0x9D, 0xEF, 0x42, 0x8A, 0xCA, 0x5D, 0x28, 0xDF,
|
||||
0x68, 0xEA, 0xE0, 0xB8, 0x76, 0x7C, 0xBB, 0x4A, 0x51, 0xDD, 0x55, 0x14,
|
||||
0xB7, 0xAB, 0xD2, 0xF1, 0xB9, 0x51, 0x19, 0x05, 0x26, 0x87, 0xF7, 0x5C,
|
||||
0x69, 0x45, 0x3C, 0x82, 0xE8, 0x82, 0x05, 0x5D, 0x33, 0x8E, 0xD1, 0x42,
|
||||
0x71, 0xD6, 0x96, 0xDA, 0xAB, 0xB8, 0xC0, 0x0F, 0xF7, 0x85, 0x8A, 0x12,
|
||||
0xEF, 0xB9, 0x53, 0xFF, 0xD2, 0x95, 0x18, 0x2F, 0x0C, 0xA6, 0x72, 0x98,
|
||||
0xC3, 0xC6, 0x9B, 0x95, 0x70, 0x69, 0xC5, 0xB7, 0xD5, 0x24, 0x77, 0x05,
|
||||
0xD0, 0x68, 0x85, 0x36, 0xB8, 0x57, 0xE3, 0xED, 0x2E, 0x4D, 0x95, 0xD3,
|
||||
0xFC, 0x24, 0x1B, 0x22, 0xFA, 0x43, 0xD8, 0x62, 0x28, 0x57, 0x6B, 0x34,
|
||||
0xBF, 0xD1, 0x63, 0x4B, 0xB5, 0xF5, 0x88, 0xBC, 0xB8, 0x69, 0xF3, 0xB5
|
||||
},
|
||||
};
|
||||
|
||||
#ifndef USE_CERT_BUFFERS_256
|
||||
/* ca-cert.der.sign,
|
||||
* ca-cert.der signed by RSA2048 PSS with SHA256
|
||||
* This is used for Root Certificate verify by SCE */
|
||||
const unsigned char ca_cert_der_sign[] =
|
||||
{
|
||||
0x0E, 0x7F, 0xB2, 0x0B, 0x4E, 0x8C, 0x11, 0x5E, 0xAC, 0xD7,
|
||||
0x77, 0x3D, 0x9E, 0xA0, 0x4B, 0xA5, 0xE2, 0x9F, 0x97, 0xEB,
|
||||
0xD0, 0x1B, 0x65, 0x08, 0x7D, 0x39, 0x2E, 0xD0, 0x97, 0x19,
|
||||
0xB6, 0x47, 0xF4, 0xCC, 0xA0, 0x24, 0xFA, 0xA6, 0x08, 0x11,
|
||||
0xF4, 0xDC, 0x82, 0xCC, 0xB6, 0x14, 0xF1, 0x4A, 0x63, 0x67,
|
||||
0xF2, 0x87, 0x0C, 0xA9, 0x31, 0x03, 0xAF, 0xD5, 0x4B, 0x1B,
|
||||
0xD9, 0x99, 0x6E, 0xB4, 0xBD, 0xAB, 0x7F, 0x64, 0xB8, 0x8B,
|
||||
0xFF, 0x45, 0xFC, 0xE5, 0x86, 0xE8, 0x95, 0x4E, 0xBD, 0x7F,
|
||||
0x21, 0xB5, 0xCD, 0x25, 0x85, 0x16, 0x32, 0x6C, 0x8A, 0xC5,
|
||||
0xE7, 0xEB, 0x58, 0xA8, 0xCC, 0xD2, 0x33, 0xFC, 0xBB, 0x88,
|
||||
0xBC, 0x15, 0xDB, 0xDD, 0x6B, 0x15, 0xE3, 0x43, 0x31, 0xA9,
|
||||
0xA2, 0x2E, 0x9C, 0x8C, 0x44, 0x69, 0x1A, 0x72, 0x49, 0xAD,
|
||||
0x94, 0x8B, 0xD9, 0xA7, 0x47, 0x91, 0xA1, 0xF0, 0xAA, 0xA4,
|
||||
0xAB, 0x5B, 0xC9, 0x8F, 0x48, 0xFE, 0x6B, 0x06, 0x7A, 0xF0,
|
||||
0xC0, 0x39, 0xEF, 0xF1, 0x38, 0x96, 0x03, 0xC8, 0xDC, 0xBE,
|
||||
0xF7, 0xDB, 0xBA, 0x09, 0xA4, 0x62, 0xD1, 0x39, 0xAD, 0x1D,
|
||||
0xEB, 0x28, 0x85, 0x53, 0x76, 0xF2, 0x52, 0x3B, 0x26, 0xF2,
|
||||
0x16, 0x01, 0xB0, 0xEF, 0x2B, 0x09, 0x2F, 0x30, 0x17, 0x6F,
|
||||
0x04, 0x5C, 0x75, 0xE5, 0x7D, 0xD0, 0xCB, 0x84, 0xDE, 0xEB,
|
||||
0x24, 0x45, 0x3D, 0x3A, 0x56, 0xC4, 0x64, 0x63, 0xD9, 0x00,
|
||||
0x23, 0x5F, 0xEE, 0xD9, 0x2E, 0xA9, 0xDC, 0x94, 0xA7, 0x8D,
|
||||
0xB6, 0xD9, 0xDF, 0x96, 0x8F, 0x8B, 0x81, 0x83, 0x8A, 0x8E,
|
||||
0x36, 0x45, 0xC7, 0xB7, 0x59, 0xA0, 0x9D, 0xE8, 0xFE, 0x62,
|
||||
0x5C, 0x7A, 0xF2, 0x9E, 0xF9, 0xB6, 0x75, 0x46, 0x44, 0x6D,
|
||||
0x96, 0xFC, 0x3E, 0xE2, 0x17, 0x52, 0x0D, 0x70, 0x37, 0xD9,
|
||||
0xAE, 0x1D, 0x25, 0x30, 0xF7, 0xD9
|
||||
};
|
||||
|
||||
const int sizeof_ca_cert_der_sign = sizeof(ca_cert_der_sign);
|
||||
#else
|
||||
/* ca-ecc-cert.der.sign,
|
||||
* ca-ecc-cert.der signed by RSA2048 PSS with SHA256
|
||||
* This is used for Root Certificate verify by SCE
|
||||
*/
|
||||
const unsigned char ca_ecc_cert_der_sign[] =
|
||||
{
|
||||
0x41, 0xFC, 0x2C, 0xFD, 0x21, 0xFB, 0xF2, 0x98, 0xF3, 0x25,
|
||||
0x06, 0x8C, 0x2C, 0x4A, 0x12, 0xDB, 0xDD, 0x38, 0x39, 0x83,
|
||||
0xD5, 0x80, 0xB4, 0x52, 0xA5, 0x35, 0xA6, 0x5C, 0x38, 0x41,
|
||||
0xDA, 0xBE, 0x64, 0x84, 0x7C, 0x63, 0x7D, 0x2A, 0xBB, 0xB9,
|
||||
0x93, 0xED, 0x27, 0xE3, 0x2B, 0xAB, 0xC4, 0xBC, 0x08, 0xBE,
|
||||
0xA6, 0xF7, 0x40, 0xA3, 0x1E, 0xB1, 0x8C, 0xF8, 0x4B, 0x78,
|
||||
0x9F, 0xFE, 0xAA, 0x86, 0x15, 0xF5, 0xDD, 0xB3, 0xCD, 0xF5,
|
||||
0x3A, 0x81, 0x26, 0x3E, 0x04, 0x05, 0x65, 0xF9, 0x53, 0x8E,
|
||||
0x10, 0x1F, 0xE8, 0xD9, 0x3F, 0xA1, 0x6E, 0x8C, 0xAD, 0xFA,
|
||||
0x50, 0x36, 0xFE, 0x89, 0x4E, 0xAC, 0x27, 0xDB, 0x59, 0x80,
|
||||
0xE3, 0x77, 0x20, 0x4F, 0xC1, 0x03, 0xA4, 0x1D, 0xE5, 0x34,
|
||||
0xCB, 0x8F, 0x88, 0xD6, 0x38, 0x2A, 0x31, 0xE0, 0xC2, 0xAA,
|
||||
0x78, 0x34, 0x9C, 0xFE, 0x8F, 0x8D, 0x76, 0xDB, 0x24, 0x38,
|
||||
0xE1, 0xAB, 0xAE, 0xBA, 0xD0, 0xA9, 0x1C, 0x59, 0x01, 0xE3,
|
||||
0x49, 0x9B, 0x13, 0x7D, 0x25, 0x7C, 0x8D, 0x12, 0x36, 0xA1,
|
||||
0xEF, 0x7B, 0xD4, 0x16, 0x58, 0x3A, 0x0E, 0xE7, 0x5A, 0x36,
|
||||
0xDD, 0xD4, 0x31, 0x23, 0xBF, 0xC9, 0x49, 0x62, 0xA4, 0x01,
|
||||
0xA3, 0xAC, 0x62, 0xAB, 0xA0, 0x48, 0xE3, 0xDA, 0x72, 0xD3,
|
||||
0x6D, 0xF3, 0x57, 0x61, 0x9E, 0xEA, 0x31, 0xA7, 0x82, 0xDD,
|
||||
0x79, 0x3C, 0x8E, 0x01, 0xE9, 0xE5, 0xB2, 0x49, 0x2F, 0x3F,
|
||||
0x3F, 0x16, 0x2C, 0xCC, 0x3D, 0x78, 0x6E, 0xB6, 0x6D, 0x34,
|
||||
0x38, 0x46, 0xCC, 0xFF, 0xEF, 0x26, 0x74, 0xD8, 0x68, 0x90,
|
||||
0xF1, 0x2A, 0xAA, 0xF3, 0xF3, 0x5A, 0xFC, 0x75, 0x00, 0xE6,
|
||||
0x11, 0xE7, 0x21, 0x05, 0x6B, 0xAA, 0x53, 0x25, 0x59, 0x33,
|
||||
0xB0, 0xC0, 0x66, 0x14, 0x2F, 0x00, 0x59, 0xF3, 0xFF, 0x5E,
|
||||
0xCC, 0x10, 0x84, 0x0E, 0xE6, 0x17
|
||||
};
|
||||
static const int sizeof_ca_ecc_cert_der_sign = sizeof(ca_ecc_cert_der_sign);
|
||||
#endif /* USE_CERT_BUFFERS_256 */
|
||||
36
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/src/SEGGER_RTT/myprint.c
vendored
Normal file
36
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/src/SEGGER_RTT/myprint.c
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/* myprintf.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 "SEGGER_RTT.h"
|
||||
|
||||
#define SEGGER_INDEX (0)
|
||||
|
||||
int myprintf(const char * sFormat, ...);
|
||||
|
||||
int myprintf(const char * sFormat, ...)
|
||||
{
|
||||
int r;
|
||||
va_list ParamList;
|
||||
|
||||
va_start(ParamList, sFormat);
|
||||
r = SEGGER_RTT_vprintf(0, sFormat, &ParamList);
|
||||
va_end(ParamList);
|
||||
return r;
|
||||
}
|
||||
2
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/src/common/.gitignore
vendored
Normal file
2
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/src/common/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
||||
356
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/src/test_main.c
vendored
Normal file
356
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/src/test_main.c
vendored
Normal file
@@ -0,0 +1,356 @@
|
||||
/* test_main.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 "wolfssl_demo.h"
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/types.h>
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h>
|
||||
#if defined(TLS_MULTITHREAD_TEST)
|
||||
User_SCEPKCbInfo guser_PKCbInfo_taskA;
|
||||
User_SCEPKCbInfo guser_PKCbInfo_taskB;
|
||||
#else
|
||||
User_SCEPKCbInfo guser_PKCbInfo;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <wolfssl_demo.h>
|
||||
#include "key_data.h"
|
||||
#include "hal_data.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
void abort(void);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(SCE_CRYPT_UNIT_TEST)
|
||||
int sce_crypt_test();
|
||||
int sce_crypt_sha256_multitest();
|
||||
int sce_crypt_AesCbc_multitest();
|
||||
int sce_crypt_AesGcm_multitest();
|
||||
int sce_crypt_Sha_AesCbcGcm_multitest();
|
||||
void tskSha256_Test1(void *pvParam);
|
||||
#endif
|
||||
|
||||
void R_BSP_WarmStart(bsp_warm_start_event_t event);
|
||||
|
||||
/* the function is called just before main() to set up pins */
|
||||
/* this needs to be called to setup IO Port */
|
||||
void R_BSP_WarmStart (bsp_warm_start_event_t event)
|
||||
{
|
||||
|
||||
if (BSP_WARM_START_POST_C == event) {
|
||||
/* C runtime environment and system clocks are setup. */
|
||||
/* Configure pins. */
|
||||
R_IOPORT_Open(&g_ioport_ctrl, g_ioport.p_cfg);
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(TLS_CLIENT)
|
||||
|
||||
extern const st_user_key_block_data_t g_key_block_data;
|
||||
|
||||
/* Key type of the encrypted user_public_key 0: RSA-2048 2: ECDSA-P256*/
|
||||
uint32_t encrypted_user_key_type = 0;
|
||||
|
||||
static int SetScetlsKey()
|
||||
{
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
|
||||
#if defined(TLS_CLIENT)
|
||||
|
||||
#if defined(USE_CERT_BUFFERS_256)
|
||||
wc_sce_inform_cert_sign((const byte *)ca_ecc_cert_der_sign);
|
||||
encrypted_user_key_type = 2;
|
||||
#else
|
||||
wc_sce_inform_cert_sign((const byte *)ca_cert_der_sign);
|
||||
#endif
|
||||
wc_sce_inform_user_keys(
|
||||
(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)
|
||||
|
||||
wc_sce_inform_cert_sign((const byte *)client_cert_der_sign);
|
||||
wc_sce_inform_user_keys(
|
||||
(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
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
char** argv;
|
||||
int return_code;
|
||||
} func_args;
|
||||
|
||||
|
||||
void wolfcrypt_test(func_args args);
|
||||
int benchmark_test(void *args);
|
||||
|
||||
#ifdef TLS_MULTITHREAD_TEST
|
||||
static void my_Logging_cb(const int logLevel, const char *const logMessage)
|
||||
{
|
||||
(void)logLevel;
|
||||
printf("custom-log: %s\n", logMessage);
|
||||
}
|
||||
#endif
|
||||
|
||||
void sce_test(void)
|
||||
{
|
||||
|
||||
#if defined(SCE_CRYPT_UNIT_TEST) && defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
int ret = 0;
|
||||
BaseType_t xRet;
|
||||
|
||||
if ((ret = wolfCrypt_Init()) != 0) {
|
||||
printf("wolfCrypt_Init failed %d\n", ret);
|
||||
}
|
||||
printf("Start wolf sce crypt Test\n");
|
||||
|
||||
printf(" \n");
|
||||
printf(" simple crypt test by using SCE\n");
|
||||
sce_crypt_test();
|
||||
|
||||
printf(" \n");
|
||||
printf(" multi sha thread test\n");
|
||||
|
||||
sce_crypt_sha256_multitest();
|
||||
|
||||
printf(" \n");
|
||||
printf(" multi aes cbc thread test\n");
|
||||
|
||||
sce_crypt_AesCbc_multitest();
|
||||
|
||||
printf(" \n");
|
||||
printf(" multi aes gcm thread test\n");
|
||||
|
||||
sce_crypt_AesGcm_multitest();
|
||||
|
||||
printf(" \n");
|
||||
printf(" multi sha aescbc aesgcm thread test\n");
|
||||
sce_crypt_Sha_AesCbcGcm_multitest();
|
||||
|
||||
printf(" \n");
|
||||
printf("End wolf sce crypt Test\n");
|
||||
|
||||
if ((ret = wolfCrypt_Cleanup()) != 0) {
|
||||
printf("wolfCrypt_Cleanup failed %d\n", ret);
|
||||
}
|
||||
|
||||
#elif 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);
|
||||
}
|
||||
|
||||
#elif defined(BENCHMARK)
|
||||
#include "hal_data.h"
|
||||
#include "r_sce.h"
|
||||
|
||||
printf("Prepare Installed key\n");
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT) && defined(SCEKEY_INSTALLED)
|
||||
|
||||
/* aes 256 */
|
||||
memcpy(guser_PKCbInfo.sce_wrapped_key_aes256.value,
|
||||
(uint32_t *)DIRECT_KEY_ADDRESS_256,
|
||||
HW_SCE_AES256_KEY_INDEX_WORD_SIZE*4);
|
||||
guser_PKCbInfo.sce_wrapped_key_aes256.type = SCE_KEY_INDEX_TYPE_AES256;
|
||||
guser_PKCbInfo.aes256_installedkey_set = 1;
|
||||
|
||||
/* aes 128 */
|
||||
memcpy(guser_PKCbInfo.sce_wrapped_key_aes128.value,
|
||||
(uint32_t *)DIRECT_KEY_ADDRESS_128,
|
||||
HW_SCE_AES128_KEY_INDEX_WORD_SIZE*4);
|
||||
|
||||
guser_PKCbInfo.sce_wrapped_key_aes128.type = SCE_KEY_INDEX_TYPE_AES128;
|
||||
guser_PKCbInfo.aes128_installedkey_set = 1;
|
||||
|
||||
#endif
|
||||
printf("Start wolfCrypt Benchmark\n");
|
||||
benchmark_test(NULL);
|
||||
printf("End wolfCrypt Benchmark\n");
|
||||
|
||||
#elif defined(TLS_CLIENT)
|
||||
#include "hal_data.h"
|
||||
#include "r_sce.h"
|
||||
|
||||
#if defined(USE_CERT_BUFFERS_256)
|
||||
#if !defined(TLS_MULTITHREAD_TEST)
|
||||
const char* cipherlist[] = {
|
||||
NULL,
|
||||
"ECDHE-ECDSA-AES128-GCM-SHA256",
|
||||
"ECDHE-ECDSA-AES256-SHA", /* sw only */
|
||||
"ECDHE-ECDSA-AES128-SHA256"
|
||||
};
|
||||
const int cipherlist_sz = 3;
|
||||
TestInfo info[cipherlist_sz];
|
||||
#else
|
||||
const char* cipherlist[] = {
|
||||
"ECDHE-ECDSA-AES128-GCM-SHA256",
|
||||
"ECDHE-ECDSA-AES128-SHA256"
|
||||
};
|
||||
const int cipherlist_sz = 2;
|
||||
TestInfo info[cipherlist_sz];
|
||||
#endif
|
||||
#else
|
||||
#if !defined(TLS_MULTITHREAD_TEST)
|
||||
const char* cipherlist[] = {
|
||||
NULL,
|
||||
"ECDHE-RSA-AES128-GCM-SHA256",
|
||||
"ECDHE-RSA-AES256-SHA", /* sw only */
|
||||
"ECDHE-RSA-AES128-SHA256",
|
||||
"AES128-SHA256",
|
||||
"AES256-SHA256",
|
||||
};
|
||||
const int cipherlist_sz = 6;
|
||||
TestInfo info[cipherlist_sz];
|
||||
#else
|
||||
const char* cipherlist[] = {
|
||||
"ECDHE-RSA-AES128-GCM-SHA256",
|
||||
"ECDHE-RSA-AES128-SHA256",
|
||||
"AES128-SHA256",
|
||||
"AES256-SHA256",
|
||||
};
|
||||
const int cipherlist_sz = 4;
|
||||
TestInfo info[cipherlist_sz];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef TLS_MULTITHREAD_TEST
|
||||
BaseType_t xReturned;
|
||||
BaseType_t xHigherPriorityTaskWoken;
|
||||
xHigherPriorityTaskWoken = pdFALSE;
|
||||
int j = 0;
|
||||
#endif
|
||||
int i = 0;
|
||||
|
||||
printf("\n Start Client Example, ");
|
||||
printf("\n Connecting to %s\n\n", SERVER_IP);
|
||||
|
||||
SetScetlsKey();
|
||||
|
||||
TCPInit();
|
||||
|
||||
#ifdef TLS_MULTITHREAD_TEST
|
||||
|
||||
wolfSSL_TLS_client_init();
|
||||
|
||||
exit_semaph = xSemaphoreCreateCounting(cipherlist_sz, 0);
|
||||
|
||||
do {
|
||||
|
||||
for(j = i; j < (i+2); j++) {
|
||||
info[j].port = DEFAULT_PORT + (j%2);
|
||||
info[j].cipher = cipherlist[j];
|
||||
info[j].ctx = client_ctx;
|
||||
info[j].xBinarySemaphore = xSemaphoreCreateBinary();
|
||||
info[j].log_f = my_Logging_cb;
|
||||
|
||||
memset(info[j].name, 0, sizeof(info[j].name));
|
||||
sprintf(info[j].name, "clt_thd_%s", ((j%2) == 0) ?
|
||||
"taskA" : "taskB");
|
||||
|
||||
printf(" %s connecting to %d port\n", info[j].name, info[j].port);
|
||||
|
||||
xReturned = xTaskCreate(wolfSSL_TLS_client_do, info[j].name,
|
||||
THREAD_STACK_SIZE, &info[j], 2, NULL);
|
||||
if (xReturned != pdPASS) {
|
||||
printf("Failed to create task\n");
|
||||
}
|
||||
}
|
||||
|
||||
for(j = i; j < (i+2); j++) {
|
||||
xSemaphoreGiveFromISR(info[j].xBinarySemaphore,
|
||||
&xHigherPriorityTaskWoken);
|
||||
}
|
||||
|
||||
/* check if all tasks are completed */
|
||||
for(j = i; j < (i+2); j++) {
|
||||
if(!xSemaphoreTake(exit_semaph, portMAX_DELAY)) {
|
||||
printf("exit semaphore not released by test task");
|
||||
}
|
||||
}
|
||||
|
||||
i+=2;
|
||||
|
||||
} while (i < cipherlist_sz);
|
||||
|
||||
vSemaphoreDelete(exit_semaph);
|
||||
|
||||
#else
|
||||
|
||||
wolfSSL_TLS_client_init();
|
||||
|
||||
do {
|
||||
|
||||
info[i].port = DEFAULT_PORT;
|
||||
info[i].cipher = cipherlist[i];
|
||||
info[i].ctx = client_ctx;
|
||||
info[i].id = i;
|
||||
|
||||
memset(info[i].name, 0, sizeof(info[i].name));
|
||||
sprintf(info[i].name, "wolfSSL_TLS_client_do(%02d)", i);
|
||||
|
||||
wolfSSL_TLS_client_do(&info[i]);
|
||||
|
||||
i++;
|
||||
} while (i < cipherlist_sz);
|
||||
|
||||
#endif /* SCE_MULTITHREAD_TEST */
|
||||
|
||||
printf("\n End of Client Example");
|
||||
|
||||
wolfSSL_TLS_cleanup();
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
void abort(void)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
284
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/src/wolf_client.c
vendored
Normal file
284
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/src/wolf_client.c
vendored
Normal file
@@ -0,0 +1,284 @@
|
||||
/* wolf_client.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 "wolfssl_demo.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include "wolfssl/wolfcrypt/settings.h"
|
||||
#include "wolfssl/ssl.h"
|
||||
#include "wolfssl/certs_test.h"
|
||||
|
||||
uint32_t g_encrypted_root_public_key[140];
|
||||
WOLFSSL_CTX *client_ctx = NULL;
|
||||
|
||||
extern uint8_t g_ether0_mac_address[6];
|
||||
static const byte ucIPAddress[4] = { 192, 168, 11, 241 };
|
||||
static const byte ucNetMask[4] = { 255, 255, 255, 0 };
|
||||
static const byte ucGatewayAddress[4] = { 192, 168, 11, 1 };
|
||||
static const byte ucDNSServerAddress[4] = { 192, 168, 11, 1 };
|
||||
|
||||
#define FR_SOCKET_SUCCESS 0
|
||||
|
||||
#ifdef TLS_MULTITHREAD_TEST
|
||||
xSemaphoreHandle exit_semaph;
|
||||
extern User_SCEPKCbInfo guser_PKCbInfo_taskA;
|
||||
extern User_SCEPKCbInfo guser_PKCbInfo_taskB;
|
||||
#else
|
||||
extern User_SCEPKCbInfo guser_PKCbInfo;
|
||||
#endif
|
||||
|
||||
int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pParamList);
|
||||
|
||||
static int msg(const char* pname, int l,
|
||||
const char * sFormat, ...)
|
||||
{
|
||||
int r = 0;
|
||||
va_list ParamList;
|
||||
|
||||
va_start(ParamList, sFormat);
|
||||
|
||||
printf("[%s][%02d] ", pname, l);
|
||||
r = SEGGER_RTT_vprintf(0, sFormat, &ParamList);
|
||||
|
||||
va_end(ParamList);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
void TCPInit( )
|
||||
{
|
||||
BaseType_t fr_status;
|
||||
|
||||
/* FreeRTOS+TCP Ethernet and IP Setup */
|
||||
fr_status = FreeRTOS_IPInit(ucIPAddress,
|
||||
ucNetMask,
|
||||
ucGatewayAddress,
|
||||
ucDNSServerAddress,
|
||||
g_ether0_mac_address);
|
||||
if (pdPASS != fr_status) {
|
||||
printf("Error [%ld]: FreeRTOS_IPInit.\n",fr_status);
|
||||
}
|
||||
}
|
||||
|
||||
void wolfSSL_TLS_client_init()
|
||||
{
|
||||
#ifndef NO_FILESYSTEM
|
||||
#ifdef USE_ECC_CERT
|
||||
char *cert = "./certs/ca-ecc-cert.pem";
|
||||
#else
|
||||
char *cert = "./certs/ca-cert.pem";
|
||||
#endif
|
||||
#else
|
||||
#ifdef 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();
|
||||
|
||||
/* Create and initialize WOLFSSL_CTX */
|
||||
if ((client_ctx = wolfSSL_CTX_new(
|
||||
wolfSSLv23_client_method_ex((void *)NULL))) == NULL) {
|
||||
printf("ERROR: failed to create WOLFSSL_CTX\n");
|
||||
return;
|
||||
}
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
/* set callback functions for ECC */
|
||||
wc_sce_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
|
||||
}
|
||||
|
||||
void wolfSSL_TLS_client_do(void *pvParam)
|
||||
{
|
||||
|
||||
int ret;
|
||||
int i = 0;
|
||||
#if defined(TLS_MULTITHREAD_TEST)
|
||||
BaseType_t xStatus;
|
||||
#endif
|
||||
TestInfo* p = (TestInfo*)pvParam;
|
||||
/* FreeRTOS+TCP Objects */
|
||||
socklen_t xSize = sizeof(struct freertos_sockaddr);
|
||||
xSocket_t xClientSocket = NULL;
|
||||
struct freertos_sockaddr xRemoteAddress;
|
||||
|
||||
WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)p->ctx;
|
||||
WOLFSSL *ssl = NULL;
|
||||
const char* pcName = p->name;
|
||||
|
||||
#define BUFF_SIZE 256
|
||||
static const char sendBuff[]= "Hello Server\n" ;
|
||||
|
||||
char rcvBuff[BUFF_SIZE] = {0};
|
||||
|
||||
i = p->id;
|
||||
/* Client Socket Setup */
|
||||
xRemoteAddress.sin_port = FreeRTOS_htons(p->port);
|
||||
xRemoteAddress.sin_addr = FreeRTOS_inet_addr(SERVER_IP);
|
||||
|
||||
/* Create a FreeRTOS TCP Socket and connect */
|
||||
xClientSocket = FreeRTOS_socket(FREERTOS_AF_INET,
|
||||
FREERTOS_SOCK_STREAM,
|
||||
FREERTOS_IPPROTO_TCP);
|
||||
|
||||
configASSERT(xClientSocket != FREERTOS_INVALID_SOCKET);
|
||||
|
||||
FreeRTOS_bind(xClientSocket, NULL, sizeof(xSize));
|
||||
|
||||
/* Client Socket Connect */
|
||||
ret = FreeRTOS_connect(xClientSocket,
|
||||
&xRemoteAddress,
|
||||
sizeof(xRemoteAddress));
|
||||
|
||||
if (ret != FR_SOCKET_SUCCESS) {
|
||||
msg(pcName, i, " Error [%d]: FreeRTOS_connect.\n", ret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
#if defined(TLS_MULTITHREAD_TEST)
|
||||
msg(pcName, i, " Ready to connect.\n");
|
||||
xStatus = xSemaphoreTake(p->xBinarySemaphore, portMAX_DELAY);
|
||||
if (xStatus != pdTRUE) {
|
||||
msg(pcName, i, " Error : Failed to xSemaphoreTake\n");
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
|
||||
msg(pcName, i, " Start to connect to the server.\n");
|
||||
|
||||
if((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
msg(pcName, i, " ERROR wolfSSL_new: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
goto out;
|
||||
}
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
|
||||
/* Set callback CTX */
|
||||
#if !defined(TLS_MULTITHREAD_TEST)
|
||||
|
||||
memset(&guser_PKCbInfo, 0, sizeof(User_SCEPKCbInfo));
|
||||
guser_PKCbInfo.devId = 0;
|
||||
wc_sce_set_callback_ctx(ssl, (void*)&guser_PKCbInfo);
|
||||
|
||||
#else
|
||||
if (p->port - DEFAULT_PORT == 0) {
|
||||
memset(&guser_PKCbInfo_taskA, 0, sizeof(User_SCEPKCbInfo));
|
||||
wc_sce_set_callback_ctx(ssl, (void*)&guser_PKCbInfo_taskA);
|
||||
}
|
||||
else {
|
||||
memset(&guser_PKCbInfo_taskB, 0, sizeof(User_SCEPKCbInfo));
|
||||
wc_sce_set_callback_ctx(ssl, (void*)&guser_PKCbInfo_taskB);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Attach wolfSSL to the socket */
|
||||
ret = wolfSSL_set_fd(ssl, (int) xClientSocket);
|
||||
if (ret != WOLFSSL_SUCCESS) {
|
||||
msg(pcName, i, " Error [%d]: wolfSSL_set_fd.\n",ret);
|
||||
}
|
||||
|
||||
msg(pcName, i, " Cipher : %s\n",
|
||||
(p->cipher == NULL) ? "NULL" : p->cipher);
|
||||
/* use specific cipher */
|
||||
if (p->cipher != NULL && wolfSSL_set_cipher_list(ssl, p->cipher)
|
||||
!= WOLFSSL_SUCCESS) {
|
||||
msg(pcName, i, " client can't set cipher list 1");
|
||||
goto out;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
if(wolfSSL_connect(ssl) != SSL_SUCCESS) {
|
||||
msg(pcName, i, " ERROR SSL connect: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
goto out;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_OFF();
|
||||
#endif
|
||||
|
||||
if (wolfSSL_write(ssl, sendBuff, (int)strlen(sendBuff))
|
||||
!= (int)strlen(sendBuff)) {
|
||||
msg(pcName, i, " ERROR SSL write: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
goto out;
|
||||
}
|
||||
|
||||
if ((ret=wolfSSL_read(ssl, rcvBuff, BUFF_SIZE)) < 0) {
|
||||
msg(pcName, i, " ERROR SSL read: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
goto out;
|
||||
}
|
||||
|
||||
rcvBuff[ret] = '\0' ;
|
||||
msg(pcName, i, " Received: %s\n\n", rcvBuff);
|
||||
|
||||
out:
|
||||
if (ssl) {
|
||||
wolfSSL_shutdown(ssl);
|
||||
wolfSSL_free(ssl);
|
||||
ssl = NULL;
|
||||
/* need to reset callback */
|
||||
wc_sce_set_callbacks(client_ctx);
|
||||
}
|
||||
/* clean up socket */
|
||||
if (xClientSocket) {
|
||||
FreeRTOS_shutdown(xClientSocket, FREERTOS_SHUT_RDWR);
|
||||
FreeRTOS_closesocket(xClientSocket);
|
||||
xClientSocket = NULL;
|
||||
}
|
||||
|
||||
#ifdef TLS_MULTITHREAD_TEST
|
||||
xSemaphoreGive(exit_semaph);
|
||||
vTaskDelete(NULL);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void wolfSSL_TLS_cleanup()
|
||||
{
|
||||
if (client_ctx) {
|
||||
wolfSSL_CTX_free(client_ctx);
|
||||
}
|
||||
|
||||
wolfSSL_Cleanup();
|
||||
|
||||
}
|
||||
1052
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/src/wolfssl_sce_unit_test.c
vendored
Normal file
1052
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/src/wolfssl_sce_unit_test.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
78
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/test_RA6M4Debug.launch
vendored
Normal file
78
android/extern/wolfssl/IDE/Renesas/e2studio/RA6M4/test/test_RA6M4Debug.launch
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.renesas.cdt.launch.dsf.gdbremote.launchConfigurationType">
|
||||
<booleanAttribute key=".setStepMode" value="false"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.initCommands" value=""/>
|
||||
<stringAttribute key="com.renesas.cdt.core.ipAddress" value="localhost"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.jtagDeviceId" value="com.renesas.hardwaredebug.rz.jlink"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.optionInitCommands" value="monitor force_rtos_off "/>
|
||||
<intAttribute key="com.renesas.cdt.core.portNumber" value="61234"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.runCommands" value=""/>
|
||||
<stringAttribute key="com.renesas.cdt.core.secondGDBExe" value="green_dsp-elf-gdb"/>
|
||||
<intAttribute key="com.renesas.cdt.core.secondGdbPortNumber" value="61237"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.serverParam" value="-g SEGGERJLINKARM -t R7FA6M4AF -uSelect= USB -uJLinkSetting= ${workspace_loc:/${ProjName}}/${LaunchConfigName}.jlink -uLowPower= 0 -uInteface= SWD -uIfSpeed= 4000 -uNoReset= 1 -uResetPreRun= 1 -uResetCon= 1 -uResetBefDownload= 1 -uReleaseCM3= 0 -uSWOcoreClock= 0 -uresetOnReload= 1 -n 0 -uFlashBp= 1 -uSimulation= 0 -ueraseRomOnDownload= 0 -ueraseDataRomOnDownload= 0 -uOSRestriction= 0 -uProgReWriteIRom= 0 -uCPUFrequency= 0 -uCECycle= 1"/>
|
||||
<booleanAttribute key="com.renesas.cdt.core.setResume" value="true"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.targetDevice" value="R7FA6M4AF"/>
|
||||
<booleanAttribute key="com.renesas.cdt.core.useRemoteTarget" value="true"/>
|
||||
<stringAttribute key="com.renesas.cdt.launch.dsf.IO_MAP" value="${support_area_loc}"/>
|
||||
<booleanAttribute key="com.renesas.cdt.launch.dsf.USE_DEFAULT_IO_MAP" value="true"/>
|
||||
<stringAttribute key="com.renesas.cdt.launch.dsf.launchSeqType" value="com.renesas.cdt.launch.dsf.launchSequence.e2GdbServer"/>
|
||||
<stringAttribute key="com.renesas.cdt.launch.dsf.serverPath" value="${renesas.support.targetLoc:com.renesas.ide.supportfiles.ra.debug.debugSupportFileTarget}\e2-server-gdb"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.break.allowSimulation" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.break.useFlashBreakpoints.resetorrepurposed" value="true"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.arm.jlink.connection.id_code2" value="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.arm.jlink.connection.jlinkScript" value=""/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.connection.registerInit" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.connection.reset" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.connection.resetAfterDownload" value="true"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.connection.resetCon" value="true"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.connection.resetPreRun" value="true"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.arm.jlink.connection.swv.coreClockSpeed" value="0"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.arm.jlink.interface.speed" value="4000"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.arm.jlink.interface.type" value="SWD"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.arm.jlink.jlink.lowPowerHandling" value="No"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.arm.jlink.jlink.scriptFile" value=""/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.arm.jlink.jlink.settingsFile" value="${workspace_loc:/${ProjName}}/${LaunchConfigName}.jlink"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.memory.isLittleEndian" value="true"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.options.ArmJLinkDebugToolSettingsTree.prog_rewrite_irom" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.options.ArmJLinkDebugToolSettingsTree.resetAfterReload" value="true"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.options.ArmJLinkDebugToolSettingsTree.rtosIntegrationInDebugView" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.options.ArmJLinkDebugToolSettingsTree.rtosintegrationthreadsrunning" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.release.reset" value="true"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.scanChain.multiDevices" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.arm.jlink.semihosting.breakpointAddress" value=""/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.arm.jlink.setTZBoundaries" value="true"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.timemeasurement" value="true"/>
|
||||
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.delay" value="3"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="arm-none-eabi-gdb"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="Debug/test_RA6M4.elf"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="test_RA6M4"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/test_RA6M4"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
|
||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><memoryBlockExpressionList context="reserved-for-future-use"/>"/>
|
||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||
</launchConfiguration>
|
||||
321
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/README_EN.md
vendored
Normal file
321
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/README_EN.md
vendored
Normal file
@@ -0,0 +1,321 @@
|
||||
wolfSSL sample application project for GR-ROSE evaluation board
|
||||
======
|
||||
|
||||
<br>
|
||||
|
||||
## 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
|
||||
<br><br>
|
||||
|
||||
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.
|
||||
<br><br>
|
||||
|
||||
## 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:2022-01 |
|
||||
|Emulator| E1, E2 Emulator Lite |
|
||||
|Toolchain|CCRX v3.04.00|
|
||||
|TSIP| TSIP v1.15|
|
||||
<br>
|
||||
|
||||
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.
|
||||
<br>
|
||||
|
||||
|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.15.l|r_tsip_rx|
|
||||
<br>
|
||||
|
||||
Note) As of April 2022, TIPS v1.15 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.
|
||||
<br><br>
|
||||
|
||||
## 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/{MCU}/{board-name-folder}) 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.
|
||||
<br><br>
|
||||
|
||||
## 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 download 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.
|
||||
|
||||
<br><br>
|
||||
|
||||
## 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:
|
||||
|
||||
```
|
||||
<board-name-folder>/test/src/smc_gen
|
||||
```
|
||||
<br>
|
||||
|
||||
## 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 <board-name-folder\>/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.
|
||||
<br><br>
|
||||
|
||||
|
||||
## 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.
|
||||
<br><br>
|
||||
|
||||
## 8. Running test application as TLS_Client
|
||||
-----
|
||||
<br>
|
||||
|
||||
### 8.1 TLS version supported by the test application
|
||||
|
||||
<br>
|
||||
If you use TSIP v1.15 or later, you can use the TLS1.3 protocol in addition to the existing TLS1.2. The following macro is defined to {board-name-folder}/common/user_settings.h.
|
||||
<br><br>
|
||||
|
||||
```
|
||||
#define WOLFSSL_TLS13
|
||||
```
|
||||
|
||||
This definition sets it to use the TLS 1.3 protocol. If you use TLS1.2, comment out this macro definition and rebuild your test application.
|
||||
|
||||
<br>
|
||||
|
||||
### 8.2 Type of certificates to use
|
||||
|
||||
<br>
|
||||
|
||||
The test and server applications allow you to select the type of certificate (RootCA certificate, server certificate, client certificate) to use for TLS communication. You can select either an RSA certificate whose public key included in the certificate is an RSA public key or an ECDSA certificate containing an ECC public key. By default, the ECDSA certificate is used.
|
||||
<br>
|
||||
|
||||
The following macro is defined to {board-name-folder}/common/user_settings.h by default. If you want to use the RSA certificates, comment out the above definition and rebuild the test application.
|
||||
|
||||
<br>
|
||||
|
||||
```
|
||||
#define USE_ECC_CERT
|
||||
```
|
||||
<br>
|
||||
|
||||
### 8.3 Cipher suites
|
||||
|
||||
<br>
|
||||
|
||||
In the test application, the TLS version and certificate type determine the cipher suites used by the test application. The table below shows the cipher suites that can be used.
|
||||
<br>
|
||||
|
||||
|Tls version |Certificate type|Cipher suites|
|
||||
|:--|:--|:--|
|
||||
|TLS1.3|RSA/ECDSA certificate| |
|
||||
|||TLS_AES_128_GCM_SHA256|
|
||||
|||TLS_AES_128_CCM_SHA256|
|
||||
|TLS1.2|RSA certificate|
|
||||
|||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_128_GCM_SHA256|
|
||||
||ECDSA certificate||
|
||||
|||TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256|
|
||||
|||TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256|
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
### 8.4 Build and run a server application
|
||||
|
||||
<br>
|
||||
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.
|
||||
<br><br>
|
||||
|
||||
Configuration options need to be changed depending on the certificate type used.
|
||||
|
||||
#### 8.4.1 Configuration when using ECDSA certificates
|
||||
|
||||
<br>
|
||||
|
||||
```
|
||||
$ cd <wolfssl-folder>
|
||||
$ ./autogen.sh
|
||||
$ ./configure --enable-ecc --enable-dsa --enable-aesccm CFLAGS="-DWOLFSSL_STATIC_RSA -DHAVE_AES_CBC -DHAVE_DSA -DHAVE_ALL_CURVES -DHAVE_ECC -DNO_RSA"
|
||||
$ make
|
||||
```
|
||||
Note: Do not forget to specify "-DNO_RSA"
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
With the above build, <wolfssl-folder\>/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.
|
||||
<br><br>
|
||||
|
||||
```
|
||||
$ examples/server/server -b -d -i
|
||||
```
|
||||
<br>
|
||||
|
||||
#### 8.4.2 Configuration when using RSA certificates
|
||||
|
||||
<br>
|
||||
|
||||
```
|
||||
$ cd <wolfssl-folder>
|
||||
$ ./autogen.sh
|
||||
$ ./configure --enable-ecc --enable-dsa --enable-aesccm CFLAGS="-DWOLFSSL_STATIC_RSA -DHAVE_AES_CBC -DHAVE_DSA -DHAVE_ALL_CURVES -DHAVE_ECC"
|
||||
$ make
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
#### 8.4.3 Run the server application
|
||||
|
||||
<br>
|
||||
|
||||
With the above build, {wolfssl-folder}/examples/server/server
|
||||
is generated. This executable program acts as a server application. If you execute it with the following options, it will be in the standby state for connection from the test application. Specify "-v4" when using TLS1.3 as the TLS version to be used, and specify "-v3" when using TLS1.2.
|
||||
<br> <br>
|
||||
|
||||
```
|
||||
$ examples / server / server -b -v4 -i
|
||||
```
|
||||
|
||||
<br>
|
||||
For the test application, specify the IP address assigned to the server application.
|
||||
|
||||
Open {board-name-folder}/test/src/wolf_client.c to specify ip address of the server.
|
||||
|
||||
<br>
|
||||
|
||||
```
|
||||
...
|
||||
#define SIMPLE_TLSSEVER_IP 192.168.53.9
|
||||
...
|
||||
```
|
||||
<br>
|
||||
Save the file and rebuild the test application. When you run the test application, it makes a TLS connection with the server application, then exchanges a simple string and displays the following on the standard output. The cipher suites displayed depends on the combination of TLS version and certificate type.
|
||||
<br><br>
|
||||
|
||||
```
|
||||
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!
|
||||
```
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
## 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.
|
||||
<br>
|
||||
|
||||
## 10. Limitations
|
||||
----
|
||||
<br>
|
||||
wolfSSL, which supports TSIPv1.15, has the following functional restrictions.
|
||||
<br><br>
|
||||
|
||||
1. Handshake message packets exchanged with the server during the TLS handshake are stored in plaintext in memory. This is used to calculate the hash of handshake messages. The content will be deleted at the end of the session.
|
||||
|
||||
1. TLS1.2 does not support the client authentication function using TSIP.
|
||||
Use wolfSSL_CTX_use_certificate_buffer or wolfSSL_CTX_use_certificate_chain_buffer_format to load the client certificate and wolfSSL_CTX_use_PrivateKey_buffer to load the private key. It is processed by software.
|
||||
|
||||
1. In TLS 1.3, the client authentication function using TSIP is supported only for ECDSA client certificates. In the case of RSA certificates, it will be processed by software.
|
||||
|
||||
1. In TLS1.3, among the server authentication functions using TSIP, "Certificate Verify" message is processed by software.
|
||||
|
||||
1. Session resumption and early data using TSIP are not supported.
|
||||
|
||||
The above limitations 1 through 4 are expected to be improved by TSIP from the next version onwards.
|
||||
318
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/README_JP.md
vendored
Normal file
318
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/README_JP.md
vendored
Normal file
@@ -0,0 +1,318 @@
|
||||
評価ボードGR-ROSE 用 wolfSSLサンプルプロジェクト
|
||||
======
|
||||
|
||||
<br>
|
||||
|
||||
## 1. 概要
|
||||
-----
|
||||
|
||||
Renesas社製MCU RX65Nを搭載した評価ボードGR-ROSEをターゲットとしてwolfSSLを評価するためのサンプルプログラムを提供します。サンプルプログラムはリアルタイムOSを使わないベアメタル環境で動作し、IDEとしてe2 studioを使用するものです。本ドキュメントではサンプルプログラムのビルドから実行までの手順を説明します。
|
||||
|
||||
提供するサンプルプログラムは次の3機能を評価できる単一のアプリケーションです:
|
||||
|
||||
- CryptoTest: 各種暗号化オペレーション機能を自動テストするプログラム
|
||||
- Benchmark: 各種暗号化オペレーションの実行速度を測定するプログラム
|
||||
- TlsClient: 対向するTLSサーバーアプリケーションとTLS通信を行うプログラム
|
||||
|
||||
評価ボードを動作させる為のH/W設定、S/W設定は既に用意していますから、サンプルプロジェクトの動作までは最少の設定で済むようになっています。また、TLS通信において必要となる、RootCA証明書、サーバー側証明書もサンプル使用に限定したものが既に設定済みです。
|
||||
|
||||
以降のセクションはサンプルアプリケーションの実行までのステップを順に説明していきます。
|
||||
<br><br>
|
||||
|
||||
|
||||
## 2. ターゲットとしているH/W、コンポーネント、ライブラリ
|
||||
-----
|
||||
|
||||
このサンプルプログラムでは以下のハードウエアやソソフトウエアライブラリを使用しています。皆さんがご利用時にバージョンの新しいソフトウエアコンポーネントが利用可能であれば適宜更新の上ご利用ください。
|
||||
<br><br>
|
||||
|
||||
|要素|名称/バージョン|
|
||||
|:--|:--|
|
||||
|評価ボード|GR-ROSE|
|
||||
|Device|R5F565NEHxFP|
|
||||
|IDE| Renesas e2Studio Version:2022-01 |
|
||||
|エミュレーター| E1, E2エミュレーターLite |
|
||||
|Toolchain|CCRX v3.04.00|
|
||||
|TSIP| TSIP v1.15|
|
||||
<br>
|
||||
|
||||
本サンプルプログラムのプロジェクトには以下のFITコンポーネントを使用する設定ファイルが用意されています。
|
||||
しかし、FITコンポーネント群そのものは本サンプルアプリケーションの配布物としては含まれていません。皆さん自身でIDE内の操作によってダウンロードしていただく必要があります。一部のFITコンポーネント(TSIP)はIDE内から直接ダウンロードできず、Renesas社のダウンロードサイトから別途ダウンロードが必要なものがあります。
|
||||
<br><br>
|
||||
|
||||
|
||||
|
||||
|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.15.l|r_tsip_rx|
|
||||
|
||||
(注意)2022年4月現在、TIPSv1.15はFITコンポーネントとしてスマートコンフィギュレータパースペクティブのコンポーネントの追加操作では追加できないようです。後ほど説明する手動での追加方法を使って追加してください。<br>
|
||||
|
||||
|
||||
<br><br>
|
||||
|
||||
## 3. サンプルプログラムプロジェクトのe2Studioへのインポート
|
||||
----
|
||||
|
||||
サンプルプログラムは新規作成する必要はありません。すでにプロジェクトファイルが用意されていますからIDEから以下の手順でプロジェクトをインポートしてください。
|
||||
|
||||
|
||||
+ 1.e2studioの"ファイル"メニュー > "ファイル・システムからプロジェクトを開く..." > "ディレクトリ(R)..."インポート元ボタンを押して、プロジェクトのインポート元となるフォルダーを選択します。本READMEファイルが存在するフォルダ(Renesas/e2studio/{MCU}/{board-name-folder})を選択してください。
|
||||
|
||||
+ インポートできるプロジェクトが4つリストアップされますが、"smc", "test" と"wolfssl"の3プロジェクトにのみチェックを入れて”終了”ボタンを押してください。
|
||||
|
||||
プロジェクト・エクスプローラーにインポートしたsmc,test,wolfsslの3プロジェクトが表示されるはずです。
|
||||
<br><br>
|
||||
|
||||
## 4. FITモジュールの取得とスマートコンフィギュレータによるファイル生成
|
||||
----
|
||||
|
||||
FITモジュールは皆さん自身で取得していただく必要があります。以下の手順で取得してください。
|
||||
<br><br>
|
||||
|
||||
|
||||
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フォルダが生成され、ソースファイル、ライブラリ等が格納されされます。
|
||||
<br><br>
|
||||
|
||||
## 5. testプロジェクトへのsmc_genファイル群の追加
|
||||
----
|
||||
|
||||
testプロジェクトはサンプルアプリケーションのプロジェクトです。プロジェクト・エクスプローラー上でtestプロジェクトを開くとsrcフォルダが存在し、そこにサンプルアプリケーションのソースファイルが格納されています。このsrcフォルダ直下に4-5で生成したsmc_genフォルダごとコピー&ペーストしてソースファイルを追加します。
|
||||
|
||||
test/src/smc_gen
|
||||
|
||||
のようなフォルダ階層になることを確認してください。
|
||||
<br><br>
|
||||
|
||||
## 6. testアプリケーションの動作を選択する
|
||||
----
|
||||
testプロジェクトが唯一のサンプルアプリケーションですが、その動作を設定で切り替えることによって、
|
||||
|
||||
- CryptoTest: 各種暗号化オペレーション機能を自動テストするプログラム
|
||||
- Benchmark: 各種暗号化オペレーションの実行速度を測定するプログラム
|
||||
- TlsClient: 対向するTLSサーバーアプリケーションとTLS通信を行うプログラム
|
||||
|
||||
のいずれかの動作を行うよう指定できます。
|
||||
|
||||
設定はtest/src/wolfssl_demo.h ファイル内の、
|
||||
|
||||
- #define CRYPT_TEST
|
||||
- #define BENCHMARK
|
||||
- #define TLS_CLIENT
|
||||
|
||||
のいずれか一つを有効にしてアプリケーションをビルドすることで行います。
|
||||
<br><br>
|
||||
|
||||
|
||||
## 7. testアプリケーションのビルドと実行
|
||||
-----
|
||||
|
||||
testアプリケーションのビルドの準備が整ったので、ビルドを行います。
|
||||
|
||||
1.プロジェクト・エクスプローラー上のwolfsslプロジェクトをビルドし、次にtestプロジェクトをビルドします。
|
||||
|
||||
2.ビルドが成功したら、ターゲットボードとエミュレーターを接続し、外部電源を入力します。
|
||||
|
||||
3."実行"メニュー > "デバッグ"を選択し、デバッグパースペクティブを開きます。
|
||||
|
||||
4. testアプリケーションは標準出力に動作状況を出力します。この標準出力の表示用に、"Renesas Debug Virtual Console"を開いておきます。
|
||||
|
||||
5.実行ボタンを押してtestアプリケーションを動作させます。
|
||||
|
||||
6.CryptoTest、BenchmarkあるいはTLS_Client選択していた動作に応じた実行結果を表示したあと無限ループに入るので出力が停止したと思われたらデバッグを停止させます。
|
||||
<br><br>
|
||||
|
||||
## 8. TLS_Clientとしてのtestアプリケーションの実行
|
||||
-----
|
||||
<br>
|
||||
|
||||
### 8.1 testアプリケーションのサポートするTLSバージョン
|
||||
<br>
|
||||
TSIPv1.15以降を使用する場合には、これまでのTLS1.2に加えてTLS1.3プロトコルが使用できます。{board-name-folder}/common/user_settings.hに既定で以下のマクロ定義が設定されています。
|
||||
<br><br>
|
||||
|
||||
```
|
||||
#define WOLFSSL_TLS13
|
||||
```
|
||||
この定義によりTLS1.3プロトコルを使用する設定となります。TLS1.2を使用する場合には、このマクロ定義をコメントアウトしてして、testアプリケーションを再ビルドしてください。
|
||||
|
||||
<br>
|
||||
|
||||
### 8.2 使用する証明書のタイプ
|
||||
|
||||
<br>
|
||||
|
||||
testアプリケーションとサーバーアプリケーションではTLS通信時に使用する証明書(RootCA証明書、サーバー証明書、クライアント証明書)のタイプが選択できます。証明書に含まれている公開鍵がRSA公開鍵であるRSA証明書とECC公開鍵を含むECDSA証明書が選択できます。既定ではECDSA証明書を使用するようになっています。
|
||||
|
||||
<br>
|
||||
{board-name-folder}/common/user_settings.h に既定で以下のマクロ定義が設定されています。RSA証明書を使用する場合には上記定義をコメントアウトして、testアプリケーションを再ビルドしてください。
|
||||
<br><br>
|
||||
|
||||
```
|
||||
#define USE_ECC_CERT
|
||||
```
|
||||
|
||||
<br>
|
||||
この定義により、testアプリケーションはサーバーの提示するECC公開鍵を含んだサーバー証明書を検証できるRootCA証明書を使うようになります。また、クライアント認証に用いるクライアント証明書もECDSA証明書が使われます。
|
||||
<br><br>
|
||||
|
||||
|
||||
### 8.3 暗号化スイートの選択
|
||||
|
||||
<br>
|
||||
testアプリケーションでは、TLSバージョンと証明書のタイプにより、testアプリケーションで使用する暗号化スイートを決定します。下表に使用できる暗号化スイートを示します。
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
|バージョン|証明書|暗号化スイート|
|
||||
|:--|:--|:--|
|
||||
|TLS1.3|RSA/ECDSA証明書| |
|
||||
|||TLS_AES_128_GCM_SHA256|
|
||||
|||TLS_AES_128_CCM_SHA256|
|
||||
|TLS1.2|RSA証明書|
|
||||
|||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_128_GCM_SHA256|
|
||||
||ECDSA証明書||
|
||||
|||TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256|
|
||||
|||TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256|
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
### 8.4 TLS対向アプリケーションのビルドと実行
|
||||
|
||||
<br>
|
||||
|
||||
testアプリケーションをTLS_Clientとしての動作を行わせる場合には、TLS通信の相手方となる対向アプリケーションが必要となります。wolfSSLパッケージにはこの用途に使用できるTLSserverサンプルアプリケーションが用意されています。このプログラムはwolfsslをビルドすることで生成されます。wolfSSLのビルドにはgccがインストールされているLinux(MacOS, WSLも含む)でのビルドとVisualStudioを使ってのビルドが可能です。以下ではWSL上でのビルドを紹介します。
|
||||
<br><br>
|
||||
|
||||
コンフィギュレーションオプションは使用する証明書タイプによって変更する必要があります。
|
||||
|
||||
<br>
|
||||
|
||||
#### 8.4.1 ECDSA証明書を使用する場合のコンフィギュレーション
|
||||
|
||||
<br>
|
||||
|
||||
```
|
||||
$ cd {wolfssl-folder}
|
||||
$ ./autogen.sh
|
||||
$ ./configure --enable-ecc --enable-dsa --enable-aesccm CFLAGS="-DWOLFSSL_STATIC_RSA -DHAVE_AES_CBC -DHAVE_DSA -DHAVE_ALL_CURVES -DHAVE_ECC -DNO_RSA"
|
||||
$ make
|
||||
```
|
||||
(注意)"-DNO_RSA"の指定をわすれないこと
|
||||
|
||||
<br>
|
||||
|
||||
#### 8.4.2 RSA証明書を使用する場合のコンフィギュレーション
|
||||
|
||||
<br>
|
||||
|
||||
```
|
||||
$ cd {wolfssl-folder}
|
||||
$ ./autogen.sh
|
||||
$ ./configure --enable-ecc --enable-dsa --enable-aesccm CFLAGS="-DWOLFSSL_STATIC_RSA -DHAVE_AES_CBC -DHAVE_DSA -DHAVE_ALL_CURVES -DHAVE_ECC"
|
||||
$ make
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
#### 8.4.3 サーバーアプリケーションの実行
|
||||
<br>
|
||||
上記のビルドによって、{wolfssl-folder}/examples/server/server
|
||||
が生成されます。この実行プログラムがサーバーアプリケーションとして機能します。以下のオプションを与えて実行させるとtestアプリケーションからの接続を待ち受け状態になります。 使用するTLSバージョンとして TLS1.3を使用する場合には "-v4"を指定し、TLS1.2を使用する場合には"-v3"を指定してください。
|
||||
<br><br>
|
||||
|
||||
```
|
||||
$ examples/server/server -b -v4 -i
|
||||
```
|
||||
<br>
|
||||
testアプリケーションには、サーバーアプリケーションに割り当てられたIPアドレスを指定します。
|
||||
|
||||
wolf_client.cを開き、#define SIMPLE_TLSSEVER_IPにアドレスを指定します。
|
||||
|
||||
```
|
||||
-- wolf_client.c --
|
||||
|
||||
...
|
||||
#define SIMPLE_TLSSEVER_IP 192.168.53.9
|
||||
...
|
||||
```
|
||||
<br>
|
||||
ファイルをセーブしてtestアプリケーションを再ビルドしてください。testアプリケーションを実行すると、対向アプリケーションとの間でTLS接続が行われ、その後簡単な文字列を交換して標準出力に以下のような表示を行います。表示される暗号化スイートはTLSバージョンと証明書タイプの組み合わせによって異なります。
|
||||
|
||||
<br><br>
|
||||
|
||||
```
|
||||
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!
|
||||
```
|
||||
<br>
|
||||
|
||||
|
||||
## 9. ユーザーが用意したRootCA証明書を利用する際に必要なこと
|
||||
-----
|
||||
|
||||
本サンプルプログラムでは、TLS_Clientとして動作する際に必要なRootCA証明書とサンプルTLSサーバーアプリケーションが使用するサーバー証明書などは評価用でのみ利用可能な証明書です。
|
||||
機能評価を超えた目的で利用する場合にはRootCA証明書をユーザー自身で用意する必要があります。それに伴い、
|
||||
1. Provisioning key
|
||||
2. RootCA証明書の検証の為に必要なRSA鍵ペア
|
||||
3. RootCA証明書を上記2の秘密鍵で生成した署名
|
||||
|
||||
が必要になります。それらの生成方法はRenesas社提供のマニュアルを参照してください。
|
||||
|
||||
<br>
|
||||
|
||||
## 10. 制限事項
|
||||
|
||||
TSIPv1.15をサポートしたwolfSSLでは以下の機能制限があります。
|
||||
|
||||
1. TLSハンドシェーク中にサーバーと交換したメッセージパケットが平文でメモリ上に蓄積されています。これはハンドシェークメッセージのハッシュ計算に使用されます。内容はセッション終了時に削除されます。
|
||||
|
||||
1. TLS1.2ではTSIPを使ったクライアント認証機能をサポートしていません。
|
||||
wolfSSL_CTX_use_certificate_buffer あるいはwolfSSL_CTX_use_certificate_chain_buffer_format を使ってクライアント証明書をロードし、wolfSSL_CTX_use_PrivateKey_bufferを使って秘密鍵をロードしてください。ソフトウエアで処理を行います。
|
||||
|
||||
1. TLS1.3ではTSIPを使ったクライアント認証機能はECDSAクライアント証明書の場合にのみサポートされます。RSA証明書の場合はソフトウエアでの処理となります。
|
||||
|
||||
1. TLS1.3ではTSIPを使ったサーバー認証機能のうち、CertificateVerifyメッセージの検証はソフトウエアでの処理となります。
|
||||
|
||||
1. TSIPを使ってのセッション再開およびearly dataはサポートされません。
|
||||
|
||||
上記制限1 ~ 4は次版以降のTSIPによって改善が見込まれています。
|
||||
22
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/common/strings.h
vendored
Normal file
22
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/common/strings.h
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/* strings.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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);
|
||||
22
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/common/unistd.h
vendored
Normal file
22
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/common/unistd.h
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/* unistd.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 */
|
||||
234
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/common/user_settings.h
vendored
Normal file
234
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/common/user_settings.h
vendored
Normal file
@@ -0,0 +1,234 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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
|
||||
* 115: TSIPv1.15
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define WOLFSSL_RENESAS_TSIP
|
||||
#define WOLFSSL_RENESAS_TSIP_VER 115
|
||||
|
||||
|
||||
/*-- 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 NO_MD4
|
||||
#define WOLFSSL_DH_CONST
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
|
||||
#define HAVE_AESGCM
|
||||
#define HAVE_AESCCM
|
||||
#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
|
||||
|
||||
/*#define WOLFSSL_STATIC_MEMORY*/
|
||||
|
||||
#if defined(WOLFSSL_STATIC_MEMORY)
|
||||
#define USE_FAST_MATH
|
||||
#else
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
#endif /* WOLFSSL_STATIC_MEMORY */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* -- "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 NO_WRITEV
|
||||
#define WOLFSSL_USER_IO
|
||||
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
#define TIME_OVERRIDES
|
||||
#define XTIME time
|
||||
#define WOLFSSL_GMTIME
|
||||
#define XGMTIME(c,t) gmtime(c)
|
||||
#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
|
||||
|
||||
|
||||
#define XSTRCASECMP(s1,s2) strcmp((s1),(s2))
|
||||
42
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/common/wolfssl_dummy.c
vendored
Normal file
42
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/common/wolfssl_dummy.c
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
/* wolfssl_dummy.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 <wolfssl/wolfcrypt/wc_port.h>
|
||||
|
||||
#define YEAR 2022
|
||||
#define MON 6
|
||||
|
||||
static int tick = 0;
|
||||
|
||||
time_t time(time_t *t)
|
||||
{
|
||||
(void)t;
|
||||
return ((YEAR-1970)*365+30*MON)*24*60*60 + tick++;
|
||||
}
|
||||
|
||||
#include <ctype.h>
|
||||
int strncasecmp(const char *s1, const char * s2, unsigned int sz)
|
||||
{
|
||||
for( ; sz>0; sz--)
|
||||
if(toupper(s1++) != toupper(s2++))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
26
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/include.am
vendored
Normal file
26
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/include.am
vendored
Normal file
@@ -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
|
||||
976
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/smc.scfg
vendored
Normal file
976
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/smc.scfg
vendored
Normal file
@@ -0,0 +1,976 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<smc>
|
||||
<general version="2.0.0.0">
|
||||
<configuration active="true" id="com.renesas.smc.toolchain.rxc.configuration.release">
|
||||
<property id="com.renesas.smc.service.project.buildArtefactType" values="com.renesas.smc.service.project.buildArtefactType.exe"/>
|
||||
<toolchain id="com.renesas.smc.toolchain.rxc.toolchain.rxc">
|
||||
<option id="com.renesas.smc.toolchain.option.buildArtefactType" key="com.renesas.smc.toolchain.option.buildArtefactType.exe"/>
|
||||
<option id="com.renesas.smc.toolchain.option.rtos" key="com.renesas.smc.toolchain.option.rtos.none"/>
|
||||
</toolchain>
|
||||
</configuration>
|
||||
<platform id="R5F565NEHxFP"/>
|
||||
<option id="board" value="gr-rose (v1.01)"/>
|
||||
</general>
|
||||
<tool id="Clock">
|
||||
<option enabled="true" id="vccinput" selection="textinputitem">
|
||||
<item enabled="true" id="textinputitem" input="3.3" value="3.300"/>
|
||||
</option>
|
||||
<option enabled="true" id="mainclockenable" selection="check">
|
||||
<item enabled="true" id="check"/>
|
||||
<item enabled="true" id="uncheck"/>
|
||||
</option>
|
||||
<option enabled="true" id="mainsourcebox" selection="srcEOI">
|
||||
<item enabled="true" id="srcR"/>
|
||||
<item enabled="true" id="srcEOI"/>
|
||||
</option>
|
||||
<option enabled="true" id="mainfrequency" selection="textinputitem">
|
||||
<item enabled="true" id="textinputitem" input="12" value="12.000000"/>
|
||||
</option>
|
||||
<option enabled="false" id="mainwaittime" selection="textinputitem">
|
||||
<item enabled="true" id="textinputitem" input="9980" value="9980.000000"/>
|
||||
</option>
|
||||
<option enabled="true" id="subclockenable" selection="uncheck">
|
||||
<item enabled="true" id="check"/>
|
||||
<item enabled="true" id="uncheck"/>
|
||||
</option>
|
||||
<option enabled="false" id="subfrequency" selection="textinputitem">
|
||||
<item enabled="true" id="textinputitem" input="" value="32.768"/>
|
||||
</option>
|
||||
<option enabled="false" id="subdrivecap" selection="standardCL">
|
||||
<item enabled="true" id="standardCL"/>
|
||||
<item enabled="true" id="lowCL"/>
|
||||
</option>
|
||||
<option enabled="false" id="subwaittime" selection="textinputitem">
|
||||
<item enabled="true" id="textinputitem" input="2000" value="2000.000000"/>
|
||||
</option>
|
||||
<option enabled="true" id="hococlockenable" selection="uncheck">
|
||||
<item enabled="true" id="check"/>
|
||||
<item enabled="true" id="uncheck"/>
|
||||
</option>
|
||||
<option enabled="false" id="hocooscenable" selection="uncheck">
|
||||
<item enabled="true" id="check"/>
|
||||
<item enabled="true" id="uncheck"/>
|
||||
</option>
|
||||
<option enabled="false" id="hocofrequency" selection="frq16">
|
||||
<item enabled="true" id="frq16"/>
|
||||
<item enabled="true" id="frq18"/>
|
||||
<item enabled="true" id="frq20"/>
|
||||
</option>
|
||||
<option enabled="true" id="lococlockenable" selection="uncheck">
|
||||
<item enabled="true" id="check"/>
|
||||
<item enabled="true" id="uncheck"/>
|
||||
</option>
|
||||
<option enabled="false" id="locofrequency" selection="textinputitem">
|
||||
<item enabled="true" id="textinputitem" input="" value="240"/>
|
||||
</option>
|
||||
<option enabled="true" id="iwdtclockenable" selection="uncheck">
|
||||
<item enabled="true" id="check"/>
|
||||
<item enabled="true" id="uncheck"/>
|
||||
</option>
|
||||
<option enabled="false" id="iwdtfrequency" selection="textinputitem">
|
||||
<item enabled="true" id="textinputitem" input="" value="120"/>
|
||||
</option>
|
||||
<option enabled="true" id="pllswitcher" selection="pllmain">
|
||||
<item enabled="true" id="pllmain" input="" value="12.0"/>
|
||||
<item enabled="false" id="pllhoco" input="" value="16"/>
|
||||
</option>
|
||||
<option enabled="true" id="plldivider" selection="div1-1">
|
||||
<item enabled="true" id="div1-1"/>
|
||||
<item enabled="false" id="div1-2"/>
|
||||
<item enabled="false" id="div1-3"/>
|
||||
</option>
|
||||
<option enabled="true" id="pllmul" selection="mul10-1">
|
||||
<item enabled="true" id="mul10-1"/>
|
||||
<item enabled="true" id="mul10_5-1"/>
|
||||
<item enabled="true" id="mul11-1"/>
|
||||
<item enabled="true" id="mul11_5-1"/>
|
||||
<item enabled="true" id="mul12-1"/>
|
||||
<item enabled="true" id="mul12_5-1"/>
|
||||
<item enabled="true" id="mul13-1"/>
|
||||
<item enabled="true" id="mul13_5-1"/>
|
||||
<item enabled="true" id="mul14-1"/>
|
||||
<item enabled="true" id="mul14_5-1"/>
|
||||
<item enabled="true" id="mul15-1"/>
|
||||
<item enabled="true" id="mul15_5-1"/>
|
||||
<item enabled="true" id="mul16-1"/>
|
||||
<item enabled="true" id="mul16_5-1"/>
|
||||
<item enabled="true" id="mul17-1"/>
|
||||
<item enabled="true" id="mul17_5-1"/>
|
||||
<item enabled="true" id="mul18-1"/>
|
||||
<item enabled="true" id="mul18_5-1"/>
|
||||
<item enabled="true" id="mul19-1"/>
|
||||
<item enabled="true" id="mul19_5-1"/>
|
||||
<item enabled="true" id="mul20-1"/>
|
||||
<item enabled="false" id="mul20_5-1"/>
|
||||
<item enabled="false" id="mul21-1"/>
|
||||
<item enabled="false" id="mul21_5-1"/>
|
||||
<item enabled="false" id="mul22-1"/>
|
||||
<item enabled="false" id="mul22_5-1"/>
|
||||
<item enabled="false" id="mul23-1"/>
|
||||
<item enabled="false" id="mul23_5-1"/>
|
||||
<item enabled="false" id="mul24-1"/>
|
||||
<item enabled="false" id="mul24_5-1"/>
|
||||
<item enabled="false" id="mul25-1"/>
|
||||
<item enabled="false" id="mul25_5-1"/>
|
||||
<item enabled="false" id="mul26-1"/>
|
||||
<item enabled="false" id="mul26_5-1"/>
|
||||
<item enabled="false" id="mul27-1"/>
|
||||
<item enabled="false" id="mul27_5-1"/>
|
||||
<item enabled="false" id="mul28-1"/>
|
||||
<item enabled="false" id="mul28_5-1"/>
|
||||
<item enabled="false" id="mul29-1"/>
|
||||
<item enabled="false" id="mul29_5-1"/>
|
||||
<item enabled="false" id="mul30-1"/>
|
||||
</option>
|
||||
<option enabled="true" id="sckswitcher" selection="pll">
|
||||
<item enabled="true" id="pll" input="" value="1.2E8"/>
|
||||
<item enabled="true" id="main" input="" value="1.2E7"/>
|
||||
<item enabled="false" id="sub" input="" value="32768.0"/>
|
||||
<item enabled="false" id="hoco" input="" value="16000000"/>
|
||||
<item enabled="false" id="loco" input="" value="240000"/>
|
||||
</option>
|
||||
<option enabled="true" id="fclkdivider" selection="comboBox1-4">
|
||||
<item enabled="false" id="comboBox1-1"/>
|
||||
<item enabled="true" id="comboBox1-2"/>
|
||||
<item enabled="true" id="comboBox1-4"/>
|
||||
<item enabled="true" id="comboBox1-8"/>
|
||||
<item enabled="true" id="comboBox1-16"/>
|
||||
<item enabled="true" id="comboBox1-32"/>
|
||||
<item enabled="true" id="comboBox1-64"/>
|
||||
</option>
|
||||
<option enabled="true" id="iclkdivider" selection="comboBox1-1">
|
||||
<item enabled="true" id="comboBox1-1"/>
|
||||
<item enabled="true" id="comboBox1-2"/>
|
||||
<item enabled="true" id="comboBox1-4"/>
|
||||
<item enabled="true" id="comboBox1-8"/>
|
||||
<item enabled="true" id="comboBox1-16"/>
|
||||
<item enabled="true" id="comboBox1-32"/>
|
||||
<item enabled="true" id="comboBox1-64"/>
|
||||
</option>
|
||||
<option enabled="true" id="pclkadivider" selection="comboBox1-2">
|
||||
<item enabled="true" id="comboBox1-1"/>
|
||||
<item enabled="true" id="comboBox1-2"/>
|
||||
<item enabled="true" id="comboBox1-4"/>
|
||||
<item enabled="true" id="comboBox1-8"/>
|
||||
<item enabled="true" id="comboBox1-16"/>
|
||||
<item enabled="true" id="comboBox1-32"/>
|
||||
<item enabled="true" id="comboBox1-64"/>
|
||||
</option>
|
||||
<option enabled="true" id="pclkbdivider" selection="comboBox1-4">
|
||||
<item enabled="false" id="comboBox1-1"/>
|
||||
<item enabled="true" id="comboBox1-2"/>
|
||||
<item enabled="true" id="comboBox1-4"/>
|
||||
<item enabled="true" id="comboBox1-8"/>
|
||||
<item enabled="true" id="comboBox1-16"/>
|
||||
<item enabled="true" id="comboBox1-32"/>
|
||||
<item enabled="true" id="comboBox1-64"/>
|
||||
</option>
|
||||
<option enabled="true" id="pclkcdivider" selection="comboBox1-4">
|
||||
<item enabled="false" id="comboBox1-1"/>
|
||||
<item enabled="false" id="comboBox1-2"/>
|
||||
<item enabled="true" id="comboBox1-4"/>
|
||||
<item enabled="true" id="comboBox1-8"/>
|
||||
<item enabled="true" id="comboBox1-16"/>
|
||||
<item enabled="true" id="comboBox1-32"/>
|
||||
<item enabled="false" id="comboBox1-64"/>
|
||||
</option>
|
||||
<option enabled="true" id="pclkddivider" selection="comboBox1-4">
|
||||
<item enabled="false" id="comboBox1-1"/>
|
||||
<item enabled="false" id="comboBox1-2"/>
|
||||
<item enabled="true" id="comboBox1-4"/>
|
||||
<item enabled="true" id="comboBox1-8"/>
|
||||
<item enabled="true" id="comboBox1-16"/>
|
||||
<item enabled="true" id="comboBox1-32"/>
|
||||
<item enabled="false" id="comboBox1-64"/>
|
||||
</option>
|
||||
<option enabled="true" id="bckdivider" selection="comboBox1-2">
|
||||
<item enabled="true" id="comboBox1-1"/>
|
||||
<item enabled="true" id="comboBox1-2"/>
|
||||
<item enabled="true" id="comboBox1-4"/>
|
||||
<item enabled="true" id="comboBox1-8"/>
|
||||
<item enabled="true" id="comboBox1-16"/>
|
||||
<item enabled="true" id="comboBox1-32"/>
|
||||
<item enabled="true" id="comboBox1-64"/>
|
||||
</option>
|
||||
<option enabled="true" id="bckselectorenable" selection="uncheck">
|
||||
<item enabled="true" id="check"/>
|
||||
<item enabled="true" id="uncheck"/>
|
||||
</option>
|
||||
<option enabled="false" id="bckselector" selection="comboBox1-2">
|
||||
<item enabled="true" id="comboBox1-1"/>
|
||||
<item enabled="true" id="comboBox1-2"/>
|
||||
</option>
|
||||
<option enabled="true" id="uckenable" selection="uncheck">
|
||||
<item enabled="true" id="check"/>
|
||||
<item enabled="true" id="uncheck"/>
|
||||
</option>
|
||||
<option enabled="false" id="uckdivider" selection="comboBox1-5">
|
||||
<item enabled="false" id="comboBox1-2"/>
|
||||
<item enabled="true" id="comboBox1-3"/>
|
||||
<item enabled="true" id="comboBox1-4"/>
|
||||
<item enabled="true" id="comboBox1-5"/>
|
||||
</option>
|
||||
<option enabled="true" id="fclk" selection="textoutputitem">
|
||||
<item enabled="true" id="textoutputitem" input="" value="30.0"/>
|
||||
</option>
|
||||
<option enabled="true" id="iclk" selection="textoutputitem">
|
||||
<item enabled="true" id="textoutputitem" input="" value="120.0"/>
|
||||
</option>
|
||||
<option enabled="true" id="pclka" selection="textoutputitem">
|
||||
<item enabled="true" id="textoutputitem" input="" value="60.0"/>
|
||||
</option>
|
||||
<option enabled="true" id="pclkb" selection="textoutputitem">
|
||||
<item enabled="true" id="textoutputitem" input="" value="30.0"/>
|
||||
</option>
|
||||
<option enabled="true" id="pclkc" selection="textoutputitem">
|
||||
<item enabled="true" id="textoutputitem" input="" value="30.0"/>
|
||||
</option>
|
||||
<option enabled="true" id="pclkd" selection="textoutputitem">
|
||||
<item enabled="true" id="textoutputitem" input="" value="30.0"/>
|
||||
</option>
|
||||
<option enabled="true" id="bck" selection="textoutputitem">
|
||||
<item enabled="true" id="textoutputitem" input="" value="60.0"/>
|
||||
</option>
|
||||
<option enabled="false" id="bckpin" selection="textoutputitem">
|
||||
<item enabled="true" id="textoutputitem" input="" value="30.0"/>
|
||||
</option>
|
||||
<option enabled="false" id="uclk" selection="textoutputitem">
|
||||
<item enabled="false" id="textoutputitem" input="" value="24.0"/>
|
||||
</option>
|
||||
<option enabled="false" id="caclclk" selection="textoutputitem">
|
||||
<item enabled="true" id="textoutputitem" input="" value="240"/>
|
||||
</option>
|
||||
<option enabled="false" id="cachclk" selection="textoutputitem">
|
||||
<item enabled="true" id="textoutputitem" input="" value="16"/>
|
||||
</option>
|
||||
<option enabled="false" id="cacsclk" selection="textoutputitem">
|
||||
<item enabled="true" id="textoutputitem" input="" value="32.768"/>
|
||||
</option>
|
||||
<option enabled="false" id="rtcsclkenable" selection="uncheck">
|
||||
<item enabled="true" id="check"/>
|
||||
<item enabled="true" id="uncheck"/>
|
||||
</option>
|
||||
<option enabled="false" id="rtcsclk" selection="textoutputitem">
|
||||
<item enabled="true" id="textoutputitem" input="" value="32.768"/>
|
||||
</option>
|
||||
<option enabled="false" id="cacilclk" selection="textoutputitem">
|
||||
<item enabled="true" id="textoutputitem" input="" value="120"/>
|
||||
</option>
|
||||
<option enabled="true" id="cacmclk" selection="textoutputitem">
|
||||
<item enabled="true" id="textoutputitem" input="" value="12.0"/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="Interrupt">
|
||||
<Item currentVect="16" id="BSC_BUSERR" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="18" id="RAM_RAMERR" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="21" id="FCU_FIFERR" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="23" id="FCU_FRDYI" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="26" id="ICU_SWINT2" priority="1" usedState="Used"/>
|
||||
<Item currentVect="27" id="ICU_SWINT" priority="1" usedState="Used"/>
|
||||
<Item currentVect="28" id="CMT0_CMI0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="29" id="CMT1_CMI1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="30" id="CMTW0_CMWI0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="31" id="CMTW1_CMWI1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="34" id="USB0_D0FIFO0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="35" id="USB0_D1FIFO0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="38" id="RSPI0_SPRI0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="39" id="RSPI0_SPTI0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="40" id="RSPI1_SPRI1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="41" id="RSPI1_SPTI1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="42" id="QSPI_SPRI" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="43" id="QSPI_SPTI" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="44" id="SDHI_SBFAI" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="45" id="MMCIF_MBFAI" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="50" id="RIIC1_RXI1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="51" id="RIIC1_TXI1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="52" id="RIIC0_RXI0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="53" id="RIIC0_TXI0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="54" id="RIIC2_RXI2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="55" id="RIIC2_TXI2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="58" id="SCI0_RXI0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="59" id="SCI0_TXI0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="60" id="SCI1_RXI1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="61" id="SCI1_TXI1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="62" id="SCI2_RXI2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="63" id="SCI2_TXI2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="64" id="ICU_IRQ0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="65" id="ICU_IRQ1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="66" id="ICU_IRQ2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="67" id="ICU_IRQ3" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="68" id="ICU_IRQ4" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="69" id="ICU_IRQ5" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="70" id="ICU_IRQ6" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="71" id="ICU_IRQ7" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="72" id="ICU_IRQ8" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="73" id="ICU_IRQ9" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="74" id="ICU_IRQ10" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="75" id="ICU_IRQ11" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="76" id="ICU_IRQ12" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="77" id="ICU_IRQ13" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="78" id="ICU_IRQ14" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="79" id="ICU_IRQ15" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="80" id="SCI3_RXI3" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="81" id="SCI3_TXI3" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="82" id="SCI4_RXI4" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="83" id="SCI4_TXI4" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="84" id="SCI5_RXI5" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="85" id="SCI5_TXI5" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="86" id="SCI6_RXI6" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="87" id="SCI6_TXI6" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="88" id="LVD1_LVD1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="89" id="LVD2_LVD2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="90" id="USB0_USBR0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="92" id="RTC_ALM" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="93" id="RTC_PRD" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="95" id="IWDT_IWUNI" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="96" id="WDT_WUNI" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="97" id="PDC_PCDFI" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="98" id="SCI7_RXI7" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="99" id="SCI7_TXI7" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="100" id="SCI8_RXI8" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="101" id="SCI8_TXI8" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="102" id="SCI9_RXI9" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="103" id="SCI9_TXI9" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="104" id="SCI10_RXI10" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="105" id="SCI10_TXI10" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="106" groupchild="<br>1-ERS0<br>2-ERS1" id="BE0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="107" groupchild="<br>1-SDIOI" id="BL2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="108" id="RSPI2_SPRI2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="109" id="RSPI2_SPTI2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="110" groupchild="<br>1-TEI0<br>2-ERI0<br>3-TEI1<br>4-ERI1<br>5-TEI2<br>6-ERI2<br>7-TEI3<br>8-ERI3<br>9-TEI4<br>10-ERI4<br>11-TEI5<br>12-ERI5<br>13-TEI6<br>14-ERI6<br>15-TEI7<br>16-ERI7<br>17-TEI12<br>18-ERI12<br>19-SCIX0<br>20-SCIX1<br>21-SCIX2<br>22-SCIX3<br>23-QSPSSLI<br>24-FERRI<br>25-MENDI<br>26-OVFI<br>27-DOPCI<br>28-PCFEI<br>29-PCERI" id="BL0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="111" groupchild="<br>1-CDETI<br>2-CACI<br>3-SDACI<br>4-CDETIO<br>5-ERRIO<br>6-ACCIO<br>7-OEI1<br>8-OEI2<br>9-OEI3<br>10-OEI4<br>11-TEI0<br>12-EEI0<br>13-TEI2<br>14-EEI2<br>15-S12CMPAI<br>16-S12CMPBI<br>17-S12CMPAI1<br>18-S12CMPBI1<br>19-TEI8<br>20-ERI8<br>21-TEI9<br>22-ERI9<br>23-TEI1<br>24-EEI1" id="BL1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="112" groupchild="<br>1-TEI10<br>2-ERI10<br>3-TEI11<br>4-ERI11<br>5-SPII0<br>6-SPEI0<br>7-SPII1<br>8-SPEI1<br>9-SPII2<br>10-SPEI2" id="AL0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="113" groupchild="<br>1-EINT0<br>2-VPOS<br>3-GR1UF<br>4-GR2UF<br>5-DRW_IRQ" id="AL1" priority="2" usedState="Used"/>
|
||||
<Item currentVect="114" id="SCI11_RXI11" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="115" id="SCI11_TXI11" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="116" id="SCI12_RXI12" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="117" id="SCI12_TXI12" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="120" id="DMAC_DMAC0I" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="121" id="DMAC_DMAC1I" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="122" id="DMAC_DMAC2I" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="123" id="DMAC_DMAC3I" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="124" id="DMAC_DMAC74I" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="125" id="OST_OSTDI" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="126" id="EXDMAC_EXDMAC0I" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="127" id="EXDMAC_EXDMAC1I" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="128" defaultVect="128" id="CMT2_CMI2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="129" defaultVect="129" id="CMT3_CMI3" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="130" defaultVect="130" id="TPU0_TGI0A" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="131" defaultVect="131" id="TPU0_TGI0B" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="132" defaultVect="132" id="TPU0_TGI0C" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="133" defaultVect="133" id="TPU0_TGI0D" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="134" defaultVect="134" id="TPU0_TCI0V" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="135" defaultVect="135" id="TPU1_TGI1B" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="136" defaultVect="136" id="TPU1_TCI1V" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="137" defaultVect="137" id="TPU1_TCI1U" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="138" defaultVect="138" id="TPU2_TGI2A" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="139" defaultVect="139" id="TPU2_TGI2B" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="140" defaultVect="140" id="TPU2_TCI2V" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="141" defaultVect="141" id="TPU2_TCI2U" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="142" defaultVect="142" id="TPU3_TGI3A" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="143" defaultVect="143" id="TPU3_TGI3B" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="144" defaultVect="144" id="TPU1_TGI1A" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="145" defaultVect="145" id="TPU3_TGI3C" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="146" defaultVect="146" id="TMR0_CMIA0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="147" defaultVect="147" id="TMR0_CMIB0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="148" defaultVect="148" id="TMR0_OVI0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="149" defaultVect="149" id="TMR1_CMIA1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="150" defaultVect="150" id="TMR1_CMIB1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="151" defaultVect="151" id="TMR1_OVI1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="152" defaultVect="152" id="TMR2_CMIA2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="153" defaultVect="153" id="TMR2_CMIB2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="154" defaultVect="154" id="TMR2_OVI2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="155" defaultVect="155" id="TMR3_CMIA3" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="156" defaultVect="156" id="TMR3_CMIB3" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="157" defaultVect="157" id="TMR3_OVI3" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="158" defaultVect="158" id="TPU3_TGI3D" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="159" defaultVect="159" id="TPU3_TCI3V" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="160" defaultVect="160" id="TPU4_TGI4A" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="161" defaultVect="161" id="TPU4_TGI4B" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="162" defaultVect="162" id="TPU4_TCI4V" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="163" defaultVect="163" id="TPU4_TCI4U" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="164" defaultVect="164" id="TPU5_TGI5A" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="165" defaultVect="165" id="TPU5_TGI5B" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="166" defaultVect="166" id="TPU5_TCI5V" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="167" defaultVect="167" id="TPU5_TCI5U" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="168" defaultVect="168" id="CMTW0_IC0I0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="169" defaultVect="169" id="CMTW0_IC1I0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="170" defaultVect="170" id="CMTW0_OC0I0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="171" defaultVect="171" id="CMTW0_OC1I0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="172" defaultVect="172" id="CMTW1_IC0I1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="173" defaultVect="173" id="CMTW1_IC1I1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="174" defaultVect="174" id="CMTW1_OC0I1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="175" defaultVect="175" id="CMTW1_OC1I1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="176" defaultVect="176" id="RTC_CUP" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="177" defaultVect="177" id="CAN0_RXF0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="178" defaultVect="178" id="CAN0_TXF0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="179" defaultVect="179" id="CAN0_RXM0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="180" defaultVect="180" id="CAN0_TXM0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="181" defaultVect="181" id="CAN1_RXF1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="182" defaultVect="182" id="CAN1_TXF1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="183" defaultVect="183" id="CAN1_RXM1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="184" defaultVect="184" id="CAN1_TXM1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="185" defaultVect="185" id="USB0_USBI0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="186" defaultVect="186" id="S12AD_S12ADI" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="187" defaultVect="187" id="S12AD_S12GBADI" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="188" defaultVect="188" id="S12AD_S12GCADI" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="189" defaultVect="189" id="S12AD1_S12ADI1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="190" defaultVect="190" id="S12AD1_S12GBADI1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="191" defaultVect="191" id="S12AD1_S12GCADI1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="192" defaultVect="192" id="RNG_RNGEND" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="193" defaultVect="193" id="ELC_ELSR18I" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="194" defaultVect="194" id="ELC_ELSR19I" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="195" defaultVect="195" id="TSIP_PROC_BUSY" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="196" defaultVect="196" id="TSIP_ROMOK" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="197" defaultVect="197" id="TSIP_LONG_PLG" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="198" defaultVect="198" id="TSIP_TEST_BUSY" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="199" defaultVect="199" id="TSIP_WRRDY0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="200" defaultVect="200" id="TSIP_WRRDY1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="201" defaultVect="201" id="TSIP_WRRDY4" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="202" defaultVect="202" id="TSIP_RDRDY0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="203" defaultVect="203" id="TSIP_RDRDY1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="204" defaultVect="204" id="TSIP_INTEGRATE_WRRDY" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="205" defaultVect="205" id="TSIP_INTEGRATE_RDRDY" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="206" id="PERIB_INTB206" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="207" id="PERIB_INTB207" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="208" defaultVect="208" id="MTU1_TGIA1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="209" defaultVect="209" id="MTU0_TGIA0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="210" defaultVect="210" id="MTU0_TGIB0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="211" defaultVect="211" id="MTU0_TGIC0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="212" defaultVect="212" id="MTU0_TGID0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="213" defaultVect="213" id="MTU0_TCIV0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="214" defaultVect="214" id="MTU0_TGIE0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="215" defaultVect="215" id="MTU0_TGIF0" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="216" defaultVect="216" id="MTU1_TGIB1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="217" defaultVect="217" id="MTU1_TCIV1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="218" defaultVect="218" id="MTU1_TCIU1" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="219" defaultVect="219" id="MTU2_TGIA2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="220" defaultVect="220" id="MTU2_TGIB2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="221" defaultVect="221" id="MTU2_TCIV2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="222" defaultVect="222" id="MTU2_TCIU2" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="223" defaultVect="223" id="MTU3_TGIA3" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="224" defaultVect="224" id="MTU3_TGIB3" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="225" defaultVect="225" id="MTU3_TGIC3" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="226" defaultVect="226" id="MTU3_TGID3" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="227" defaultVect="227" id="MTU3_TCIV3" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="228" defaultVect="228" id="MTU4_TGIA4" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="229" defaultVect="229" id="MTU4_TGIB4" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="230" defaultVect="230" id="MTU4_TGIC4" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="231" defaultVect="231" id="MTU4_TGID4" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="232" defaultVect="232" id="MTU4_TCIV4" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="233" defaultVect="233" id="MTU5_TGIU5" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="234" defaultVect="234" id="MTU5_TGIV5" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="235" defaultVect="235" id="MTU5_TGIW5" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="236" defaultVect="236" id="MTU6_TGIA6" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="237" defaultVect="237" id="MTU6_TGIB6" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="238" defaultVect="238" id="MTU6_TGIC6" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="239" defaultVect="239" id="MTU6_TGID6" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="240" defaultVect="240" id="MTU6_TCIV6" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="241" defaultVect="241" id="MTU7_TGIA7" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="242" defaultVect="242" id="MTU7_TGIB7" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="243" defaultVect="243" id="MTU7_TGIC7" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="244" defaultVect="244" id="MTU7_TGID7" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="245" defaultVect="245" id="MTU7_TCIV7" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="246" defaultVect="246" id="MTU8_TGIA8" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="247" defaultVect="247" id="MTU8_TGIB8" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="248" defaultVect="248" id="MTU8_TGIC8" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="249" defaultVect="249" id="MTU8_TGID8" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="250" defaultVect="250" id="MTU8_TCIV8" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="251" defaultVect="251" id="AES_AESRDY" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="252" defaultVect="252" id="AES_AESEND" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="253" id="PERIA_INTA253" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="254" id="PERIA_INTA254" priority="15" usedState="Not Use"/>
|
||||
<Item currentVect="255" id="PERIA_INTA255" priority="15" usedState="Not Use"/>
|
||||
</tool>
|
||||
<tool id="Pins" version="1.0.1.0">
|
||||
<pinItem allocation="11" comments="" direction="None" id="XTAL" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="59" comments="" direction="None" id="RMII0_RXD0" isUsedBySoftware="true" locked="false" status="65280"/>
|
||||
<pinItem allocation="61" comments="" direction="None" id="RMII0_RXD1" isUsedBySoftware="true" locked="false" status="65280"/>
|
||||
<pinItem allocation="54" comments="" direction="None" id="RMII0_TXD1" isUsedBySoftware="true" locked="false" status="65280"/>
|
||||
<pinItem allocation="55" comments="" direction="None" id="RMII0_TXD0" isUsedBySoftware="true" locked="false" status="65280"/>
|
||||
<pinItem allocation="58" comments="" direction="None" id="REF50CK0" isUsedBySoftware="true" locked="false" status="65280"/>
|
||||
<pinItem allocation="66" comments="" direction="None" id="ET0_MDC" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="13" comments="" direction="None" id="EXTAL" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="65" comments="" direction="None" id="ET0_LINKSTA" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="57" comments="" direction="None" id="RMII0_RX_ER" isUsedBySoftware="true" locked="false" status="65280"/>
|
||||
<pinItem allocation="56" comments="" direction="None" id="RMII0_TXD_EN" isUsedBySoftware="true" locked="false" status="65280"/>
|
||||
<pinItem allocation="67" comments="" direction="None" id="ET0_MDIO" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="53" comments="" direction="None" id="RMII0_CRS_DV" isUsedBySoftware="true" locked="false" status="65280"/>
|
||||
<pinnumItem comment="SW2 Reset Switch" id="10"/>
|
||||
<pinnumItem comment="CN10 Serial Servo" id="16"/>
|
||||
<pinnumItem comment="CN10 Serial Servo" id="17"/>
|
||||
<pinnumItem comment="CN10 Serial Servo" id="18"/>
|
||||
<pinnumItem comment="U5 WiFi Module" id="19"/>
|
||||
<pinnumItem comment="N.C." id="4"/>
|
||||
<pinnumItem comment="SW1 Operation Mode Switch" id="7"/>
|
||||
<pinnumItem comment="CN4 PMOD" id="20"/>
|
||||
<pinnumItem comment="U5 WiFi Module" id="21"/>
|
||||
<pinnumItem comment="CN4 PMOD" id="22"/>
|
||||
<pinnumItem comment="U5 WiFi Module" id="23"/>
|
||||
<pinnumItem comment="U5 WiFi Module" id="24"/>
|
||||
<pinnumItem comment="U5 WiFi Module" id="25"/>
|
||||
<pinnumItem comment="CN7 Serial Servo" id="26"/>
|
||||
<pinnumItem comment="CN7 Serial Servo" id="27"/>
|
||||
<pinnumItem comment="CN7 Serial Servo" id="28"/>
|
||||
<pinnumItem comment="U5 WiFi Module" id="29"/>
|
||||
<pinnumItem comment="CN5 USB" id="30"/>
|
||||
<pinnumItem comment="CN8 Serial Servo" id="32"/>
|
||||
<pinnumItem comment="CN8 Serial Servo" id="33"/>
|
||||
<pinnumItem comment="CN8 Serial Servo" id="34"/>
|
||||
<pinnumItem comment="CN5 USB" id="36"/>
|
||||
<pinnumItem comment="CN5 USB" id="37"/>
|
||||
<pinnumItem comment="CN4 PMOD" id="42"/>
|
||||
<pinnumItem comment="CN4 PMOD" id="44"/>
|
||||
<pinnumItem comment="CN11 Serial Servo I/F" id="45"/>
|
||||
<pinnumItem comment="CN11 Serial Servo I/F" id="46"/>
|
||||
<pinnumItem comment="CN11 Serial Servo I/F" id="47"/>
|
||||
<pinnumItem comment="CN9 Serial Servo" id="48"/>
|
||||
<pinnumItem comment="CN9 Serial Servo" id="49"/>
|
||||
<pinnumItem comment="CN9 Serial Servo" id="50"/>
|
||||
<pinnumItem comment="CN6 Ether" id="53"/>
|
||||
<pinnumItem comment="CN6 Ether" id="54"/>
|
||||
<pinnumItem comment="CN6 Ether" id="55"/>
|
||||
<pinnumItem comment="CN6 Ether" id="56"/>
|
||||
<pinnumItem comment="CN6 Ether" id="57"/>
|
||||
<pinnumItem comment="CN6 Ether" id="58"/>
|
||||
<pinnumItem comment="CN6 Ether" id="59"/>
|
||||
<pinnumItem comment="CN6 Ether" id="61"/>
|
||||
<pinnumItem comment="CN6 Ether" id="64"/>
|
||||
<pinnumItem comment="CN6 Ether" id="65"/>
|
||||
<pinnumItem comment="CN6 Ether" id="66"/>
|
||||
<pinnumItem comment="CN6 Ether" id="67"/>
|
||||
<pinnumItem comment="LED2" id="69"/>
|
||||
<pinnumItem comment="LED1" id="70"/>
|
||||
<pinnumItem comment="CN4 PMOD" id="71"/>
|
||||
<pinnumItem comment="CN4 PMOD" id="72"/>
|
||||
<pinnumItem comment="CN4 PMOD" id="73"/>
|
||||
<pinnumItem comment="CN4 PMOD" id="74"/>
|
||||
<pinnumItem comment="CN12C ADC" id="79"/>
|
||||
<pinnumItem comment="CN13 DAC" id="100"/>
|
||||
<pinnumItem comment="CN12C ADC" id="80"/>
|
||||
<pinnumItem comment="CN12C ADC" id="81"/>
|
||||
<pinnumItem comment="CN12C ADC" id="82"/>
|
||||
<pinnumItem comment="CN12C ADC" id="83"/>
|
||||
<pinnumItem comment="CN12C ADC" id="84"/>
|
||||
</tool>
|
||||
<tool id="Summary" version="1.0.0.0">
|
||||
<option id="com.renesas.smc.code.path" value="src\smc_gen"/>
|
||||
<option id="com.renesas.smc.code.type" value="Normal Folder"/>
|
||||
</tool>
|
||||
<tool id="SWComponent" version="1.0.0.0">
|
||||
<configuration id="60957c51-a5e9-46fc-b2c8-a6141e24332c" inuse="true" name="Config_TMR0">
|
||||
<allocatable id="TMR0">
|
||||
<isocket id="CountingClock" selection="Clock.tool_clock_pclkb" value="3.0E7"/>
|
||||
<option enabled="true" id="CountMode" selection="8bitMode">
|
||||
<item id="8bitMode" input="" vlaue="0"/>
|
||||
<item id="16bitMode" input="" vlaue="0"/>
|
||||
</option>
|
||||
<option enabled="true" id="ClockSourceOption" selection="PCLK">
|
||||
<item id="PCLK" input="" vlaue="0"/>
|
||||
<item id="PCLK2" input="" vlaue="0"/>
|
||||
<item id="PCLK8" input="" vlaue="0"/>
|
||||
<item id="PCLK32" input="" vlaue="0"/>
|
||||
<item id="PCLK64" input="" vlaue="0"/>
|
||||
<item id="PCLK1024" input="" vlaue="0"/>
|
||||
<item id="PCLK8192" input="" vlaue="0"/>
|
||||
<item id="ExternalClockRising" input="" vlaue="0"/>
|
||||
<item id="ExternalClockFalling" input="" vlaue="0"/>
|
||||
<item id="ExternalClockBoth" input="" vlaue="0"/>
|
||||
</option>
|
||||
<option enabled="true" id="CounterClearOption" selection="Disabled">
|
||||
<item id="Disabled" input="" vlaue="0"/>
|
||||
<item id="ClearedMatchA" input="" vlaue="0"/>
|
||||
<item id="ClearedMatchB" input="" vlaue="0"/>
|
||||
<item id="ClearedRisingReset" input="" vlaue="0"/>
|
||||
<item id="ClearedResetHigh" input="" vlaue="0"/>
|
||||
</option>
|
||||
<option enabled="true" id="CompareMatchAValue" selection="CompareMatchAValue">
|
||||
<item id="CompareMatchAValue" input="2" vlaue="59"/>
|
||||
</option>
|
||||
<option enabled="true" id="MatchValueOptionA" selection="us">
|
||||
<item id="ms" input="" vlaue="0"/>
|
||||
<item id="us" input="" vlaue="0"/>
|
||||
<item id="ns" input="" vlaue="0"/>
|
||||
<item id="count" input="" vlaue="0"/>
|
||||
</option>
|
||||
<option enabled="true" id="S12ADEnable" selection="Disable">
|
||||
<item id="Disable" input="" vlaue="0"/>
|
||||
<item id="Enable" input="" vlaue="0"/>
|
||||
</option>
|
||||
<option enabled="true" id="CompareMatchBValue" selection="CompareMatchBValue">
|
||||
<item id="CompareMatchBValue" input="2" vlaue="59"/>
|
||||
</option>
|
||||
<option enabled="true" id="TMO0OutputEnable" selection="Disable">
|
||||
<item id="Disable" input="" vlaue="0"/>
|
||||
<item id="Enable" input="" vlaue="0"/>
|
||||
</option>
|
||||
<option enabled="true" id="OutputMatchA" selection="Nochange">
|
||||
<item id="Nochange" input="" vlaue="0"/>
|
||||
<item id="Output0" input="" vlaue="0"/>
|
||||
<item id="Output1" input="" vlaue="0"/>
|
||||
<item id="ToggleOutput" input="" vlaue="0"/>
|
||||
</option>
|
||||
<option enabled="true" id="OutputMatchB" selection="Nochange">
|
||||
<item id="Nochange" input="" vlaue="0"/>
|
||||
<item id="Output0" input="" vlaue="0"/>
|
||||
<item id="Output1" input="" vlaue="0"/>
|
||||
<item id="ToggleOutput" input="" vlaue="0"/>
|
||||
</option>
|
||||
<option enabled="true" id="TCORAEnable" selection="Disable">
|
||||
<item id="Disable" input="" vlaue="0"/>
|
||||
<item id="Enable" input="" vlaue="0"/>
|
||||
</option>
|
||||
<option enabled="true" id="TCORAOption" selection="Level15">
|
||||
<item id="Level0" input="" vlaue="0"/>
|
||||
<item id="Level1" input="" vlaue="0"/>
|
||||
<item id="Level2" input="" vlaue="0"/>
|
||||
<item id="Level3" input="" vlaue="0"/>
|
||||
<item id="Level4" input="" vlaue="0"/>
|
||||
<item id="Level5" input="" vlaue="0"/>
|
||||
<item id="Level6" input="" vlaue="0"/>
|
||||
<item id="Level7" input="" vlaue="0"/>
|
||||
<item id="Level8" input="" vlaue="0"/>
|
||||
<item id="Level9" input="" vlaue="0"/>
|
||||
<item id="Level10" input="" vlaue="0"/>
|
||||
<item id="Level11" input="" vlaue="0"/>
|
||||
<item id="Level12" input="" vlaue="0"/>
|
||||
<item id="Level13" input="" vlaue="0"/>
|
||||
<item id="Level14" input="" vlaue="0"/>
|
||||
<item id="Level15" input="" vlaue="0"/>
|
||||
</option>
|
||||
<option enabled="true" id="TCORBEnable" selection="Disable">
|
||||
<item id="Disable" input="" vlaue="0"/>
|
||||
<item id="Enable" input="" vlaue="0"/>
|
||||
</option>
|
||||
<option enabled="true" id="TCORBOption" selection="Level15">
|
||||
<item id="Level0" input="" vlaue="0"/>
|
||||
<item id="Level1" input="" vlaue="0"/>
|
||||
<item id="Level2" input="" vlaue="0"/>
|
||||
<item id="Level3" input="" vlaue="0"/>
|
||||
<item id="Level4" input="" vlaue="0"/>
|
||||
<item id="Level5" input="" vlaue="0"/>
|
||||
<item id="Level6" input="" vlaue="0"/>
|
||||
<item id="Level7" input="" vlaue="0"/>
|
||||
<item id="Level8" input="" vlaue="0"/>
|
||||
<item id="Level9" input="" vlaue="0"/>
|
||||
<item id="Level10" input="" vlaue="0"/>
|
||||
<item id="Level11" input="" vlaue="0"/>
|
||||
<item id="Level12" input="" vlaue="0"/>
|
||||
<item id="Level13" input="" vlaue="0"/>
|
||||
<item id="Level14" input="" vlaue="0"/>
|
||||
<item id="Level15" input="" vlaue="0"/>
|
||||
</option>
|
||||
<option enabled="true" id="TCNTEnable" selection="Disable">
|
||||
<item id="Disable" input="" vlaue="0"/>
|
||||
<item id="Enable" input="" vlaue="0"/>
|
||||
</option>
|
||||
<option enabled="true" id="TCNTOption" selection="Level15">
|
||||
<item id="Level0" input="" vlaue="0"/>
|
||||
<item id="Level1" input="" vlaue="0"/>
|
||||
<item id="Level2" input="" vlaue="0"/>
|
||||
<item id="Level3" input="" vlaue="0"/>
|
||||
<item id="Level4" input="" vlaue="0"/>
|
||||
<item id="Level5" input="" vlaue="0"/>
|
||||
<item id="Level6" input="" vlaue="0"/>
|
||||
<item id="Level7" input="" vlaue="0"/>
|
||||
<item id="Level8" input="" vlaue="0"/>
|
||||
<item id="Level9" input="" vlaue="0"/>
|
||||
<item id="Level10" input="" vlaue="0"/>
|
||||
<item id="Level11" input="" vlaue="0"/>
|
||||
<item id="Level12" input="" vlaue="0"/>
|
||||
<item id="Level13" input="" vlaue="0"/>
|
||||
<item id="Level14" input="" vlaue="0"/>
|
||||
<item id="Level15" input="" vlaue="0"/>
|
||||
</option>
|
||||
</allocatable>
|
||||
<component description="This software component generates two units (unit 0, unit 1) of an on-chip 8-bit timer (TMR) module that comprise two 8-bit counter channels, totaling four channels." detailDescription="" display="8-Bit Timer" id="com.renesas.smc.tools.swcomponent.codegenerator.tmr" version="1.9.0"/>
|
||||
<allocator channelLevel0="0" channelLevel1="" channelLevel2="" channelLevel3="" channelLevel4="" channelLevel5="" description="8-Bit Timer 0" display="TMR0" id="com.renesas.smc.tools.swcomponent.codegenerator.tmr.rx651.tmr0" type="">
|
||||
<context>
|
||||
<option enabled="true" id="CountMode" selection="8bitMode">
|
||||
<item enabled="true" id="8bitMode"/>
|
||||
<item enabled="true" id="16bitMode"/>
|
||||
</option>
|
||||
</context>
|
||||
</allocator>
|
||||
<source description="Code generator components provide peripheral drivers with customized generated source geared towards small code size" display="Code Generator" id="com.renesas.smc.tools.swcomponent.codegenerator.source"/>
|
||||
</configuration>
|
||||
<configuration inuse="true" name="r_bsp">
|
||||
<component description="Dependencies : None The r_bsp package provides a foundation for code to be built on top of. It provides startup code, iodefines, and MCU information for different boards. There are 2 folders that make up the r_bsp package. The 'mcu' folder contains files that are common to a MCU group. These files provide functionality such as easy register access, CPU functions, and a file named 'mcu_info.h' for each MCU group. The 'mcu_info.h' file has information about the MCU on the board and is configured based on the information given in r_bsp_config.h. The information in 'mcu_info.h' is used to help configure Renesas middleware that uses the r_bsp package. The 'board' folder has a folder with startup code for each supported board. Which MCU and board is chosen is decided by the settings in 'platform.h'. The user can choose which board they are using by uncommenting the include path that applies to their board. For example, if you are using the RSK+RX64M then you would uncomment the #include "./board/generic_rx64m/r_bsp.h" include path. Users are encouraged to add their own boards to the 'board' directory. BSPs are configured by using the r_bsp_config.h file. Each board will have a reference configuration file named r_bsp_config_reference.h. The user should copy this file to their project, rename it to r_bsp_config.h, and use the options inside the file to configure the BSP for their project." detailDescription="Board Support Packages." display="r_bsp" id="r_bsp6.21" version="6.21">
|
||||
<gridItem id="BSP_CFG_USER_STACK_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_USTACK_BYTES" selectedIndex="0x2000"/>
|
||||
<gridItem id="BSP_CFG_ISTACK_BYTES" selectedIndex="0x400"/>
|
||||
<gridItem id="BSP_CFG_HEAP_BYTES" selectedIndex="0xc000"/>
|
||||
<gridItem id="BSP_CFG_IO_LIB_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_USER_CHARGET_ENABLED" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_USER_CHARGET_FUNCTION" selectedIndex="my_sw_charget_function"/>
|
||||
<gridItem id="BSP_CFG_USER_CHARPUT_ENABLED" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_USER_CHARPUT_FUNCTION" selectedIndex="my_sw_charput_function"/>
|
||||
<gridItem id="BSP_CFG_RUN_IN_USER_MODE" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_ID_CODE_LONG_1" selectedIndex="0xFFFFFFFF"/>
|
||||
<gridItem id="BSP_CFG_ID_CODE_LONG_2" selectedIndex="0xFFFFFFFF"/>
|
||||
<gridItem id="BSP_CFG_ID_CODE_LONG_3" selectedIndex="0xFFFFFFFF"/>
|
||||
<gridItem id="BSP_CFG_ID_CODE_LONG_4" selectedIndex="0xFFFFFFFF"/>
|
||||
<gridItem id="BSP_CFG_ROM_CACHE_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_TRUSTED_MODE_FUNCTION" selectedIndex="0xFFFFFFFF"/>
|
||||
<gridItem id="BSP_CFG_FAW_REG_VALUE" selectedIndex="0xFFFFFFFF"/>
|
||||
<gridItem id="BSP_CFG_ROMCODE_REG_VALUE" selectedIndex="0xFFFFFFFF"/>
|
||||
<gridItem id="BSP_CFG_CODE_FLASH_BANK_MODE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_CODE_FLASH_START_BANK" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_USER_LOCKING_ENABLED" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_USER_LOCKING_TYPE" selectedIndex="bsp_lock_t"/>
|
||||
<gridItem id="BSP_CFG_USER_LOCKING_HW_LOCK_FUNCTION" selectedIndex="my_hw_locking_function"/>
|
||||
<gridItem id="BSP_CFG_USER_LOCKING_HW_UNLOCK_FUNCTION" selectedIndex="my_hw_unlocking_function"/>
|
||||
<gridItem id="BSP_CFG_USER_LOCKING_SW_LOCK_FUNCTION" selectedIndex="my_sw_locking_function"/>
|
||||
<gridItem id="BSP_CFG_USER_LOCKING_SW_UNLOCK_FUNCTION" selectedIndex="my_sw_unlocking_function"/>
|
||||
<gridItem id="BSP_CFG_USER_WARM_START_CALLBACK_PRE_INITC_ENABLED" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_USER_WARM_START_PRE_C_FUNCTION" selectedIndex="my_sw_warmstart_prec_function"/>
|
||||
<gridItem id="BSP_CFG_USER_WARM_START_CALLBACK_POST_INITC_ENABLED" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_USER_WARM_START_POST_C_FUNCTION" selectedIndex="my_sw_warmstart_postc_function"/>
|
||||
<gridItem id="BSP_CFG_PARAM_CHECKING_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_EBMAPCR_1ST_PRIORITY" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_EBMAPCR_2ND_PRIORITY" selectedIndex="3"/>
|
||||
<gridItem id="BSP_CFG_EBMAPCR_3RD_PRIORITY" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_EBMAPCR_4TH_PRIORITY" selectedIndex="2"/>
|
||||
<gridItem id="BSP_CFG_EBMAPCR_5TH_PRIORITY" selectedIndex="4"/>
|
||||
<gridItem id="BSP_CFG_FIT_IPL_MAX" selectedIndex="15"/>
|
||||
<gridItem id="BSP_CFG_SWINT_UNIT1_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_SWINT_UNIT2_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_SWINT_TASK_BUFFER_NUMBER" selectedIndex="8"/>
|
||||
<gridItem id="BSP_CFG_SWINT_IPR_INITIAL_VALUE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_SCI_UART_TERMINAL_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_SCI_UART_TERMINAL_CHANNEL" selectedIndex="8"/>
|
||||
<gridItem id="BSP_CFG_SCI_UART_TERMINAL_BITRATE" selectedIndex="115200"/>
|
||||
<gridItem id="BSP_CFG_SCI_UART_TERMINAL_INTERRUPT_PRIORITY" selectedIndex="15"/>
|
||||
</component>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
</configuration>
|
||||
<configuration inuse="true" name="r_cmt_rx">
|
||||
<component description="Dependency : r_bsp version(s) 6.20 This module creates a timer tick using a CMT channel based on a frequency input by the user." detailDescription="CMT driver" display="r_cmt_rx" id="r_cmt_rx4.90" version="4.90">
|
||||
<gridItem id="CMT_RX_CFG_IPR" selectedIndex="5"/>
|
||||
</component>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
</configuration>
|
||||
<configuration inuse="true" name="r_ether_rx">
|
||||
<component description="Dependency : r_bsp version(s) 5.52 The Ethernet fit module provides a method to send and receive Ethernet / IEEE802.3 frame using Ethernet controller (ETHERC), Ethernet DMA controller (EDMAC)." detailDescription="Ethernet Driver." display="r_ether_rx" id="r_ether_rx1.21" version="1.21">
|
||||
<gridItem id="CLKOUT25M" selectedIndex="0"/>
|
||||
<gridItem id="ET0_TX_CLK" selectedIndex="0"/>
|
||||
<gridItem id="ET0_RX_CLK" selectedIndex="1"/>
|
||||
<gridItem id="ET0_TX_EN" selectedIndex="1"/>
|
||||
<gridItem id="ET0_ETXD3" selectedIndex="0"/>
|
||||
<gridItem id="ET0_ETXD2" selectedIndex="0"/>
|
||||
<gridItem id="ET0_ETXD1" selectedIndex="1"/>
|
||||
<gridItem id="ET0_ETXD0" selectedIndex="1"/>
|
||||
<gridItem id="ET0_TX_ER" selectedIndex="0"/>
|
||||
<gridItem id="ET0_RX_DV" selectedIndex="0"/>
|
||||
<gridItem id="ET0_ERXD3" selectedIndex="0"/>
|
||||
<gridItem id="ET0_ERXD2" selectedIndex="0"/>
|
||||
<gridItem id="ET0_ERXD1" selectedIndex="1"/>
|
||||
<gridItem id="ET0_ERXD0" selectedIndex="1"/>
|
||||
<gridItem id="ET0_RX_ER" selectedIndex="1"/>
|
||||
<gridItem id="ET0_CRS" selectedIndex="1"/>
|
||||
<gridItem id="ET0_COL" selectedIndex="0"/>
|
||||
<gridItem id="ET0_MDC" selectedIndex="1"/>
|
||||
<gridItem id="ET0_MDIO" selectedIndex="1"/>
|
||||
<gridItem id="PMGI0_MDC" selectedIndex="0"/>
|
||||
<gridItem id="PMGI0_MDIO" selectedIndex="0"/>
|
||||
<gridItem id="ET0_LINKSTA" selectedIndex="1"/>
|
||||
<gridItem id="ET0_EXOUT" selectedIndex="0"/>
|
||||
<gridItem id="ET0_WOL" selectedIndex="0"/>
|
||||
<gridItem id="ETHERC0_MII" selectedIndex="1"/>
|
||||
<gridItem id="CLKOUT25M" selectedIndex="0"/>
|
||||
<gridItem id="REF50CK0" selectedIndex="1"/>
|
||||
<gridItem id="RMII0_TXD_EN" selectedIndex="1"/>
|
||||
<gridItem id="RMII0_TXD1" selectedIndex="1"/>
|
||||
<gridItem id="RMII0_TXD0" selectedIndex="1"/>
|
||||
<gridItem id="RMII0_RXD1" selectedIndex="1"/>
|
||||
<gridItem id="RMII0_RXD0" selectedIndex="1"/>
|
||||
<gridItem id="RMII0_RX_ER" selectedIndex="1"/>
|
||||
<gridItem id="RMII0_CRS_DV" selectedIndex="1"/>
|
||||
<gridItem id="ET0_MDC" selectedIndex="1"/>
|
||||
<gridItem id="ET0_MDIO" selectedIndex="1"/>
|
||||
<gridItem id="PMGI0_MDC" selectedIndex="0"/>
|
||||
<gridItem id="PMGI0_MDIO" selectedIndex="0"/>
|
||||
<gridItem id="ET0_LINKSTA" selectedIndex="1"/>
|
||||
<gridItem id="ET0_EXOUT" selectedIndex="0"/>
|
||||
<gridItem id="ET0_WOL" selectedIndex="0"/>
|
||||
<gridItem id="ETHERC0_RMII" selectedIndex="1"/>
|
||||
<gridItem id="CLKOUT25M" selectedIndex="0"/>
|
||||
<gridItem id="ET1_TX_CLK" selectedIndex="0"/>
|
||||
<gridItem id="ET1_RX_CLK" selectedIndex="0"/>
|
||||
<gridItem id="ET1_TX_EN" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ETXD3" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ETXD2" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ETXD1" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ETXD0" selectedIndex="0"/>
|
||||
<gridItem id="ET1_TX_ER" selectedIndex="0"/>
|
||||
<gridItem id="ET1_RX_DV" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ERXD3" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ERXD2" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ERXD1" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ERXD0" selectedIndex="0"/>
|
||||
<gridItem id="ET1_RX_ER" selectedIndex="0"/>
|
||||
<gridItem id="ET1_CRS" selectedIndex="0"/>
|
||||
<gridItem id="ET1_COL" selectedIndex="0"/>
|
||||
<gridItem id="ET1_MDC" selectedIndex="0"/>
|
||||
<gridItem id="ET1_MDIO" selectedIndex="0"/>
|
||||
<gridItem id="PMGI1_MDC" selectedIndex="0"/>
|
||||
<gridItem id="PMGI1_MDIO" selectedIndex="0"/>
|
||||
<gridItem id="ET1_LINKSTA" selectedIndex="0"/>
|
||||
<gridItem id="ET1_EXOUT" selectedIndex="0"/>
|
||||
<gridItem id="ET1_WOL" selectedIndex="0"/>
|
||||
<gridItem id="ETHERC1_MII" selectedIndex="0"/>
|
||||
<gridItem id="CLKOUT25M" selectedIndex="0"/>
|
||||
<gridItem id="REF50CK1" selectedIndex="0"/>
|
||||
<gridItem id="RMII1_TXD_EN" selectedIndex="0"/>
|
||||
<gridItem id="RMII1_TXD1" selectedIndex="0"/>
|
||||
<gridItem id="RMII1_TXD0" selectedIndex="0"/>
|
||||
<gridItem id="RMII1_RXD1" selectedIndex="0"/>
|
||||
<gridItem id="RMII1_RXD0" selectedIndex="0"/>
|
||||
<gridItem id="RMII1_RX_ER" selectedIndex="0"/>
|
||||
<gridItem id="RMII1_CRS_DV" selectedIndex="0"/>
|
||||
<gridItem id="ET1_MDC" selectedIndex="0"/>
|
||||
<gridItem id="ET1_MDIO" selectedIndex="0"/>
|
||||
<gridItem id="PMGI1_MDC" selectedIndex="0"/>
|
||||
<gridItem id="PMGI1_MDIO" selectedIndex="0"/>
|
||||
<gridItem id="ET1_LINKSTA" selectedIndex="0"/>
|
||||
<gridItem id="ET1_EXOUT" selectedIndex="0"/>
|
||||
<gridItem id="ET1_WOL" selectedIndex="0"/>
|
||||
<gridItem id="ETHERC1_RMII" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_MODE_SEL" selectedIndex="1"/>
|
||||
<gridItem id="ETHER_CFG_CH0_PHY_ADDRESS" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_CH1_PHY_ADDRESS" selectedIndex="1"/>
|
||||
<gridItem id="ETHER_CFG_EMAC_RX_DESCRIPTORS" selectedIndex="1"/>
|
||||
<gridItem id="ETHER_CFG_EMAC_TX_DESCRIPTORS" selectedIndex="1"/>
|
||||
<gridItem id="ETHER_CFG_BUFSIZE" selectedIndex="1536"/>
|
||||
<gridItem id="ETHER_CFG_AL1_INT_PRIORTY" selectedIndex="1"/>
|
||||
<gridItem id="ETHER_CFG_CH0_PHY_ACCESS" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_CH1_PHY_ACCESS" selectedIndex="1"/>
|
||||
<gridItem id="ETHER_CFG_PHY_MII_WAIT" selectedIndex="8"/>
|
||||
<gridItem id="ETHER_CFG_PHY_DELAY_RESET" selectedIndex="0x00020000L"/>
|
||||
<gridItem id="ETHER_CFG_LINK_PRESENT" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_USE_LINKSTA" selectedIndex="1"/>
|
||||
<gridItem id="ETHER_CFG_USE_PHY_KSZ8041NL" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_NON_BLOCKING" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_PMGI_CLOCK" selectedIndex="2500000"/>
|
||||
<gridItem id="ETHER_CFG_PMGI_ENABLE_PREAMBLE" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_PMGI_HOLD_TIME" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_PMGI_CAPTURE_TIME" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_PMGI_INT_PRIORTY" selectedIndex="1"/>
|
||||
</component>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
</configuration>
|
||||
<configuration inuse="true" name="r_sys_time_rx">
|
||||
<component description="Dependency : r_bsp version(s) 5.20 Dependency : r_cmt_rx version(s) 4.00 Generic system timer for RX MCUs using CMT module." detailDescription="Generic system timer for RX MCUs using CMT module." display="r_sys_time_rx" id="r_sys_time_rx1.01" version="1.01"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
</configuration>
|
||||
<configuration inuse="true" name="r_t4_driver_rx">
|
||||
<component description="Dependency : r_bsp version(s) 5.61 Dependency : r_ether_rx version(s) 1.21 Dependency : r_sys_time_rx version(s) 1.01 Dependency : r_t4_rx version(s) 2.10 Convert the TCP/IP(T4) - RX Ethernet Driver Interface." detailDescription="TCP/IP protocol stack [M3S-T4-Tiny] - RX Ethernet Driver Interface" display="r_t4_driver_rx" id="r_t4_driver_rx1.09" version="1.09"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
</configuration>
|
||||
<configuration inuse="true" name="r_t4_rx">
|
||||
<component description="Dependency : r_t4_driver_rx version(s) 1.09 T4 is TCP/IP protocol stack that has small footprint for Renesas MCUs." detailDescription="TCP/IP protocol stack [M3S-T4-Tiny] for Renesas MCUs" display="r_t4_rx" id="r_t4_rx2.10" version="2.10">
|
||||
<gridItem id="T4_CFG_SYSTEM_CHANNEL_NUMBER" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_SYSTEM_DHCP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_FIXED_IP_ADDRESS_CH0" selectedIndex="192,168,1,33"/>
|
||||
<gridItem id="T4_CFG_FIXED_SABNET_MASK_CH0" selectedIndex="255,255,255,0"/>
|
||||
<gridItem id="T4_CFG_FIXED_GATEWAY_ADDRESS_CH0" selectedIndex="192,168,1,1"/>
|
||||
<gridItem id="T4_CFG_FIXED_IP_ADDRESS_CH1" selectedIndex="192,168,0,10"/>
|
||||
<gridItem id="T4_CFG_FIXED_SABNET_MASK_CH1" selectedIndex="255,255,255,0"/>
|
||||
<gridItem id="T4_CFG_FIXED_GATEWAY_ADDRESS_CH1" selectedIndex="0,0,0,0"/>
|
||||
<gridItem id="T4_CFG_ETHER_CH0_MAC_ADDRESS" selectedIndex="0x74,0x90,0x50,0x00,0x79,0x03"/>
|
||||
<gridItem id="T4_CFG_ETHER_CH1_MAC_ADDRESS" selectedIndex="0x74,0x90,0x50,0x00,0x79,0x10"/>
|
||||
<gridItem id="T4_CFG_SYSTEM_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_SYSTEM_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="system_callback"/>
|
||||
<gridItem id="T4_CFG_TCP_REPID1_PORT_NUMBER" selectedIndex="1024"/>
|
||||
<gridItem id="T4_CFG_TCP_REPID2_PORT_NUMBER" selectedIndex="1025"/>
|
||||
<gridItem id="T4_CFG_TCP_REPID3_PORT_NUMBER" selectedIndex="1026"/>
|
||||
<gridItem id="T4_CFG_TCP_REPID4_PORT_NUMBER" selectedIndex="1027"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID1_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID1_RECEIVE_WINDOW_SIZE" selectedIndex="1460"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID1_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID1_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID1_KEEPALIVE_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID2_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID2_RECEIVE_WINDOW_SIZE" selectedIndex="1460"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID2_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID2_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID2_KEEPALIVE_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID3_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID3_RECEIVE_WINDOW_SIZE" selectedIndex="1460"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID3_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID3_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID3_KEEPALIVE_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID4_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID4_RECEIVE_WINDOW_SIZE" selectedIndex="1460"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID4_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID4_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID4_KEEPALIVE_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID5_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID5_RECEIVE_WINDOW_SIZE" selectedIndex="1460"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID5_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID5_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID5_KEEPALIVE_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID6_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID6_RECEIVE_WINDOW_SIZE" selectedIndex="1460"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID6_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID6_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID6_KEEPALIVE_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_MSS" selectedIndex="1460"/>
|
||||
<gridItem id="T4_CFG_TCP_2MSL_TIME" selectedIndex="60"/>
|
||||
<gridItem id="T4_CFG_TCP_MAX_TIMEOUT_PERIOD" selectedIndex="600"/>
|
||||
<gridItem id="T4_CFG_TCP_DIVIDE_SENDING_PACKET" selectedIndex="1"/>
|
||||
<gridItem id="T4_CFG_TCP_KEEPALIVE_START" selectedIndex="7200"/>
|
||||
<gridItem id="T4_CFG_TCP_KEEPALIVE_INTERVAL" selectedIndex="10"/>
|
||||
<gridItem id="T4_CFG_TCP_KEEPALIVE_COUNT" selectedIndex="10"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID1_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID1_PORT_NUMBER" selectedIndex="1365"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID1_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID1_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID2_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID2_PORT_NUMBER" selectedIndex="1366"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID2_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID2_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID3_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID3_PORT_NUMBER" selectedIndex="1367"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID3_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID3_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID4_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID4_PORT_NUMBER" selectedIndex="1368"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID4_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID4_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID5_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID5_PORT_NUMBER" selectedIndex="1369"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID5_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID5_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID6_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID6_PORT_NUMBER" selectedIndex="1370"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID6_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID6_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_MULTICAST_TTL" selectedIndex="1"/>
|
||||
<gridItem id="T4_CFG_UDP_BEHAVIOR_OF_RECEIVED_ZERO_CHECKSUM" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_IP_ARP_CACHE_TABLE_COUNT" selectedIndex="3"/>
|
||||
</component>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
</configuration>
|
||||
<configuration inuse="true" name="r_tsip_rx">
|
||||
<component description="Dependency : r_bsp version(s) 7.00 Support functions: AES, GCM, CCM, CMAC, SHA, MD5, Triple-DES, ARC4, RSA, ECC, Random number generate, Key management, secure boot/secure firmware update. The ".l" in version number means library version." detailDescription="TSIP(Trusted Secure IP) driver." display="r_tsip_rx" id="r_tsip_rx1.15.l" version="1.15.l"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
</configuration>
|
||||
</tool>
|
||||
<tool id="System">
|
||||
<section id="ocd">
|
||||
<option enabled="true" id="debugIF" selection="unused">
|
||||
<item enabled="true" id="unused"/>
|
||||
<item enabled="true" id="fine"/>
|
||||
<item enabled="true" id="jtag"/>
|
||||
</option>
|
||||
</section>
|
||||
</tool>
|
||||
</smc>
|
||||
230
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/key_data.c
vendored
Normal file
230
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/key_data.c
vendored
Normal file
@@ -0,0 +1,230 @@
|
||||
/* key_data.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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]; */
|
||||
{
|
||||
0x94, 0x4D, 0x99, 0x53, 0xE9, 0x15, 0xD1, 0xD9, 0x0A, 0x2C, 0x17, 0x48,
|
||||
0x87, 0x2F, 0x22, 0xA8, 0x90, 0xB3, 0xDE, 0x25, 0x17, 0xEA, 0xE6, 0x31,
|
||||
0x28, 0x3F, 0xB9, 0x8F, 0xC6, 0xE3, 0xE4, 0x85
|
||||
},
|
||||
/* 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];
|
||||
*/
|
||||
{
|
||||
0xD9, 0x9A, 0x75, 0x0E, 0x9D, 0x4F, 0x63, 0xA4, 0x02, 0x96, 0xE1, 0xF1,
|
||||
0x49, 0x44, 0xB5, 0x90, 0x59, 0x24, 0xC4, 0x23, 0xF7, 0xA0, 0x32, 0x65,
|
||||
0x68, 0x7B, 0x70, 0xE7, 0xA5, 0xC8, 0x12, 0xD1, 0xCD, 0x55, 0x36, 0x5F,
|
||||
0xE6, 0xEB, 0xD0, 0xAD, 0x5A, 0x7F, 0x9F, 0x41, 0x79, 0x8B, 0x2F, 0x3B,
|
||||
0x17, 0xC9, 0xEE, 0xA7, 0xCB, 0xB5, 0x40, 0xFA, 0x3B, 0x43, 0x1D, 0xF8,
|
||||
0x34, 0xCC, 0xB1, 0xB4, 0x8E, 0x67, 0xF6, 0xA0, 0x49, 0xAA, 0x76, 0x33,
|
||||
0xA4, 0x56, 0xCD, 0x16, 0xE9, 0x76, 0x16, 0x92, 0xBE, 0x3F, 0x3A, 0x3A,
|
||||
0xD7, 0x7A, 0xCD, 0xC9, 0xE2, 0xA0, 0xC8, 0x16, 0x2A, 0x0D, 0xBD, 0x3C,
|
||||
0xEA, 0xC8, 0x26, 0x82, 0xDA, 0x5D, 0x19, 0x71, 0x7B, 0x90, 0x03, 0xEF,
|
||||
0x1E, 0x24, 0x01, 0x62, 0x15, 0x3D, 0x2B, 0x4C, 0xA7, 0x8F, 0xBC, 0xD3,
|
||||
0xD9, 0xC8, 0x9F, 0xBB, 0x4A, 0x62, 0x57, 0xE8, 0xE2, 0x86, 0x8C, 0x56,
|
||||
0x36, 0x64, 0xE7, 0xB9, 0x47, 0x5C, 0x02, 0xF4, 0x87, 0x50, 0x16, 0x9C,
|
||||
0xFB, 0xF6, 0xE9, 0x73, 0x96, 0x78, 0x94, 0x59, 0x12, 0x28, 0x03, 0x37,
|
||||
0x75, 0x56, 0x00, 0x2F, 0xCE, 0x54, 0x7C, 0x34, 0xFD, 0x0B, 0x10, 0x5B,
|
||||
0x4A, 0xEE, 0x11, 0x1B, 0x39, 0xE9, 0x80, 0x8B, 0x27, 0x2D, 0x29, 0x12,
|
||||
0x68, 0x87, 0xD2, 0xC9, 0x78, 0xED, 0xED, 0xF2, 0xA6, 0x4D, 0x6B, 0x10,
|
||||
0x98, 0x9D, 0x52, 0x1C, 0xCE, 0x69, 0x0D, 0x5C, 0x46, 0xEB, 0x5D, 0x9B,
|
||||
0xC8, 0x6A, 0x8E, 0x1F, 0x56, 0x05, 0xBA, 0xD2, 0x50, 0x9F, 0x92, 0xB7,
|
||||
0xD4, 0x4D, 0xCD, 0x58, 0x5B, 0xA7, 0x87, 0x10, 0x6D, 0xF3, 0xDB, 0xA8,
|
||||
0x1D, 0x23, 0x00, 0xE4, 0x81, 0x69, 0x3E, 0x7D, 0xEA, 0x5B, 0x33, 0xF4,
|
||||
0x73, 0xD8, 0x7C, 0xDD, 0x64, 0x74, 0x40, 0x30, 0x93, 0x8D, 0x2C, 0xA5,
|
||||
0x2C, 0x24, 0x11, 0xB2, 0x26, 0x56, 0xE3, 0x41, 0x72, 0xAE, 0x41, 0x56,
|
||||
0x9C, 0x75, 0x11, 0x8E, 0x53, 0x59, 0x77, 0xBF, 0x48, 0x71, 0x86, 0x7C,
|
||||
0x7C, 0xCE, 0x04, 0xB9, 0x73, 0x62, 0xE6, 0x1D, 0xF8, 0xED, 0x93, 0x87
|
||||
},
|
||||
/* uint8_t encrypted_user_update_key[R_TSIP_AES256_KEY_BYTE_SIZE + 16]; */
|
||||
{
|
||||
0
|
||||
},
|
||||
/* uint8_t
|
||||
* encrypted_user_rsa2048_private_key[R_TSIP_RSA2048_ND_KEY_BYTE_SIZE + 16]
|
||||
*/
|
||||
{
|
||||
0x22, 0xEC, 0xE3, 0x79, 0xD1, 0x0C, 0xB4, 0xED, 0xE0, 0xA9, 0x0F, 0xBD,
|
||||
0xC7, 0x0B, 0xB4, 0x1E, 0x82, 0x27, 0x79, 0x20, 0x6A, 0x15, 0x56, 0xD6,
|
||||
0x0F, 0xFA, 0xE4, 0x61, 0x04, 0xDA, 0x81, 0x33, 0x42, 0xBA, 0x6D, 0xB9,
|
||||
0x34, 0x81, 0xFD, 0x67, 0xDF, 0x1D, 0xCB, 0x52, 0x64, 0x9A, 0x2E, 0x30,
|
||||
0x12, 0x60, 0xCB, 0x48, 0x27, 0xB6, 0x38, 0x0B, 0x54, 0x5A, 0x70, 0xCB,
|
||||
0x6F, 0x05, 0x53, 0x46, 0x8B, 0x08, 0x86, 0x24, 0xCB, 0xA2, 0x36, 0x54,
|
||||
0xCD, 0xC9, 0x61, 0x37, 0x43, 0xCB, 0xCC, 0x7C, 0x6B, 0x20, 0x07, 0xB6,
|
||||
0x01, 0x96, 0x32, 0xF5, 0x30, 0x0E, 0x96, 0x05, 0xC4, 0xF5, 0xF0, 0xB0,
|
||||
0xD3, 0x26, 0xAF, 0x6E, 0x39, 0x01, 0x2D, 0xAC, 0x7E, 0x39, 0xCF, 0x48,
|
||||
0x74, 0x7D, 0x98, 0x00, 0xA6, 0x95, 0xDA, 0x4C, 0xAC, 0x81, 0xC7, 0x9A,
|
||||
0x93, 0x69, 0x23, 0xD4, 0x39, 0xCD, 0xB3, 0x62, 0x4A, 0x4A, 0x26, 0x95,
|
||||
0x51, 0xE1, 0x06, 0x8F, 0xB2, 0x3C, 0x8F, 0xDE, 0xF1, 0xC3, 0x69, 0xFC,
|
||||
0xF5, 0xC3, 0xCE, 0x39, 0x3F, 0x7F, 0x2D, 0xA8, 0x8B, 0xB3, 0x2D, 0xE4,
|
||||
0xB8, 0xA4, 0x19, 0x55, 0x29, 0xEC, 0x9C, 0x6A, 0xD7, 0xD7, 0x45, 0x3E,
|
||||
0x1D, 0x18, 0x52, 0xB5, 0x8A, 0xB1, 0x26, 0x43, 0x8C, 0x7A, 0x65, 0xF1,
|
||||
0x17, 0x5E, 0x75, 0x4A, 0x1A, 0x30, 0xD8, 0xEA, 0xC2, 0x19, 0x3C, 0x1E,
|
||||
0x2E, 0xFB, 0xDB, 0xC9, 0x1F, 0x73, 0xC9, 0x95, 0x53, 0x8C, 0x99, 0x5D,
|
||||
0x3B, 0x59, 0xFE, 0x8B, 0xA1, 0xD2, 0xBB, 0xBC, 0xBC, 0x4B, 0x78, 0x0A,
|
||||
0x6B, 0xD8, 0xBE, 0x85, 0x60, 0x08, 0x1E, 0x2F, 0x38, 0x77, 0xA3, 0xC4,
|
||||
0x46, 0xC1, 0x42, 0x39, 0xA6, 0x59, 0x98, 0x59, 0x21, 0x94, 0x1F, 0xDC,
|
||||
0xB3, 0xAE, 0xA3, 0xB6, 0xCC, 0x35, 0x82, 0x6F, 0x87, 0x58, 0x91, 0x70,
|
||||
0xEC, 0x3F, 0x05, 0x86, 0x3C, 0xD1, 0x83, 0xB0, 0xBA, 0xE8, 0xD7, 0xF6,
|
||||
0xE5, 0x9E, 0x50, 0xA4, 0x04, 0xF3, 0x95, 0x9C, 0x41, 0xAF, 0xEB, 0x9D,
|
||||
0xB6, 0xA2, 0xF7, 0x80, 0x5A, 0xC4, 0x67, 0xD4, 0xFD, 0x0C, 0x2A, 0x7C,
|
||||
0x24, 0x03, 0xE5, 0x7F, 0x08, 0x69, 0x18, 0x4E, 0x33, 0x22, 0x7E, 0x03,
|
||||
0x8E, 0x13, 0xFB, 0xC6, 0x9B, 0xA3, 0x44, 0x5B, 0xEC, 0xF9, 0x5C, 0x93,
|
||||
0x3E, 0x9F, 0xBD, 0x72, 0x50, 0x52, 0xF3, 0xEA, 0x34, 0x2B, 0x8E, 0xEC,
|
||||
0x17, 0x42, 0x1A, 0xDF, 0x57, 0xA2, 0x66, 0xA7, 0x0B, 0x3B, 0xE5, 0xF7,
|
||||
0x64, 0x44, 0xA2, 0xA3, 0x5F, 0xB7, 0x5B, 0xF5, 0x99, 0x8C, 0xA0, 0x64,
|
||||
0x04, 0x46, 0x7C, 0x60, 0x75, 0xE4, 0xD9, 0xD5, 0xED, 0x21, 0x1D, 0x65,
|
||||
0x5D, 0x25, 0x21, 0x90, 0x7D, 0xA4, 0x95, 0x15, 0x54, 0x91, 0xD6, 0xB8,
|
||||
0xF9, 0xB7, 0x30, 0xD9, 0x7D, 0x2C, 0x7E, 0x85, 0x6A, 0xCF, 0x31, 0x1C,
|
||||
0xDC, 0x90, 0xA3, 0x75, 0xA4, 0xE4, 0x89, 0x5F, 0x2B, 0xED, 0x93, 0x4E,
|
||||
0xA8, 0x35, 0xD3, 0x20, 0x36, 0x7A, 0x02, 0x23, 0x70, 0xB7, 0xC2, 0x39,
|
||||
0xA4, 0x69, 0xB2, 0xBF, 0xA4, 0x3A, 0x6D, 0xB7, 0xB1, 0x32, 0x32, 0x9A,
|
||||
0x95, 0xEA, 0x02, 0xD2, 0x35, 0xE7, 0x8C, 0xD8, 0x22, 0xA9, 0xC3, 0x4C,
|
||||
0x68, 0x09, 0xA1, 0x2B, 0xB0, 0xE4, 0x55, 0x72, 0x7E, 0xE6, 0x00, 0xDD,
|
||||
0xC6, 0xD1, 0x83, 0x56, 0x08, 0x35, 0xC7, 0x9A, 0x98, 0x0C, 0x79, 0xBD,
|
||||
0x49, 0xBC, 0x3F, 0x45, 0x4A, 0x38, 0x1B, 0x55, 0x2D, 0x52, 0x57, 0x00,
|
||||
0xFC, 0xDB, 0xE7, 0xA0, 0x53, 0xB4, 0x63, 0xE4, 0x37, 0xEC, 0x9F, 0xF0,
|
||||
0xA4, 0x0F, 0xEF, 0x06, 0xF0, 0xC6, 0x5F, 0x0C, 0x4A, 0xB8, 0xC1, 0x96,
|
||||
0x1D, 0x0D, 0x9A, 0x43, 0x89, 0xA4, 0xF6, 0x55, 0x4A, 0x83, 0x54, 0x3F,
|
||||
0xCC, 0x09, 0x65, 0x34, 0xC0, 0x0F, 0x42, 0xF2, 0xE6, 0xDD, 0x2D, 0x8C,
|
||||
0x93, 0x42, 0x09, 0xF6, 0xE4, 0xDF, 0xB2, 0x64, 0x2A, 0x12, 0x7A, 0x59
|
||||
},
|
||||
/* uint8_t
|
||||
* encrypted_user_ecc256_private_key[R_TSIP_ECC_PRIVATE_KEY_BYTE_SIZE + 16];
|
||||
*/
|
||||
{
|
||||
0x25, 0x7A, 0x0C, 0x8C, 0x9B, 0xF9, 0x3C, 0xF5, 0x49, 0x08, 0x86, 0x92,
|
||||
0x00, 0x7D, 0xAB, 0x21, 0x23, 0x38, 0xF8, 0xEA, 0xB0, 0x95, 0x59, 0x9B,
|
||||
0x04, 0xC8, 0xAA, 0xEA, 0x8C, 0x2D, 0x68, 0xF4, 0xD5, 0xD7, 0xA9, 0x6F,
|
||||
0x2C, 0x8C, 0x13, 0x93, 0xA3, 0x80, 0x11, 0xF9, 0x0F, 0x36, 0x14, 0xA8
|
||||
},
|
||||
};
|
||||
|
||||
/* 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[] =
|
||||
{
|
||||
0x6e, 0x7d, 0x2b, 0xd3, 0x6d, 0x6a, 0x70, 0x31, 0xbf, 0xcd, 0x6f, 0x32,
|
||||
0x74, 0x8b, 0x4d, 0xdf, 0x7c, 0x72, 0xc6, 0x78, 0x61, 0x2b, 0x0f, 0xcc,
|
||||
0xbc, 0xa3, 0x25, 0x54, 0x04, 0xfa, 0x9e, 0xf7, 0x1c, 0xa2, 0xe1, 0x33,
|
||||
0x90, 0x08, 0xcd, 0x3c, 0xc1, 0x03, 0x66, 0xb6, 0x3f, 0xf1, 0xbf, 0xaf,
|
||||
0x0d, 0xb0, 0xeb, 0xe4, 0xc7, 0x54, 0x60, 0x34, 0x3b, 0x62, 0xcf, 0x28,
|
||||
0x95, 0xa2, 0x08, 0x79, 0xc5, 0x51, 0xf3, 0xe1, 0x88, 0x3b, 0xa0, 0x1d,
|
||||
0x1d, 0x42, 0x5a, 0xba, 0x09, 0xe4, 0x64, 0xa1, 0x83, 0xf4, 0x60, 0x44,
|
||||
0x89, 0xd3, 0xdd, 0x6c, 0x71, 0x7b, 0xd1, 0xb0, 0x28, 0x7b, 0x98, 0xe2,
|
||||
0x4b, 0x99, 0x9a, 0x22, 0xd0, 0xeb, 0x1c, 0x5c, 0xbe, 0x49, 0x1a, 0xcf,
|
||||
0xd7, 0x4b, 0x19, 0xe9, 0xdf, 0x82, 0x21, 0xe3, 0x87, 0x7a, 0x25, 0x58,
|
||||
0x8f, 0x29, 0x0e, 0xce, 0xf4, 0x09, 0x0f, 0x2f, 0x04, 0xe9, 0xd2, 0xf9,
|
||||
0xcc, 0xb7, 0x7a, 0x46, 0x5d, 0x98, 0x05, 0x54, 0x89, 0x8e, 0x09, 0x79,
|
||||
0xa8, 0x6f, 0xf6, 0x12, 0xdd, 0x93, 0x38, 0x83, 0x14, 0x3f, 0x42, 0xcf,
|
||||
0x03, 0x9d, 0x84, 0x9d, 0xe9, 0x6e, 0x9f, 0x87, 0x0f, 0xb8, 0x15, 0x9b,
|
||||
0x9b, 0x4c, 0x32, 0x3b, 0x82, 0x7b, 0x3d, 0xd4, 0x85, 0x1e, 0x71, 0x99,
|
||||
0x67, 0x40, 0x59, 0xad, 0x8c, 0x31, 0xd7, 0xa2, 0x81, 0xfd, 0x46, 0x21,
|
||||
0xd7, 0xc8, 0x89, 0x3d, 0x17, 0x3f, 0x5e, 0x82, 0x5e, 0xfa, 0x7b, 0x34,
|
||||
0x7a, 0x1b, 0x85, 0x86, 0xf8, 0x02, 0xf2, 0xf3, 0x01, 0x2c, 0xbd, 0x4a,
|
||||
0x98, 0x0f, 0xe9, 0x4b, 0x1a, 0xa3, 0xee, 0xfc, 0x77, 0xda, 0xcf, 0xee,
|
||||
0x9c, 0xca, 0xf9, 0xbf, 0xaa, 0x5b, 0xbc, 0x01, 0x4b, 0xd4, 0x74, 0x7c,
|
||||
0xee, 0xfb, 0x7c, 0xc4, 0x31, 0xb7, 0x46, 0x9e, 0x94, 0x84, 0xa3, 0x82,
|
||||
0x0c, 0x7b, 0x61, 0x4e
|
||||
};
|
||||
const int sizeof_ca_ecc_cert_sig = sizeof(ca_ecc_cert_der_sig);
|
||||
|
||||
/* ./ca-cert.der.sign, */
|
||||
const unsigned char ca_cert_der_sig[] =
|
||||
{
|
||||
0x0a, 0xc8, 0xbb, 0x7e, 0x5a, 0x72, 0x6a, 0x5b, 0xf0, 0xc6, 0xbf, 0x36,
|
||||
0x8e, 0xe1, 0xcd, 0xbc, 0x08, 0xfd, 0x22, 0x5a, 0x3b, 0x48, 0x33, 0xb9,
|
||||
0x12, 0x55, 0x80, 0x6c, 0x36, 0x14, 0x05, 0x24, 0x63, 0x20, 0x8b, 0x26,
|
||||
0x69, 0xa9, 0xe3, 0x15, 0xb9, 0x00, 0x8d, 0xea, 0x3a, 0xee, 0x2d, 0x41,
|
||||
0xec, 0x43, 0x4a, 0x17, 0x48, 0x26, 0x4a, 0xd6, 0xe4, 0x1b, 0xa5, 0x97,
|
||||
0x2e, 0xf6, 0x41, 0xa7, 0xa2, 0x2b, 0x83, 0x2c, 0xad, 0x6e, 0x4e, 0xfc,
|
||||
0x57, 0xf1, 0x28, 0xf0, 0xa7, 0xf9, 0x5b, 0x48, 0xab, 0xed, 0x63, 0x22,
|
||||
0xed, 0x1e, 0xf1, 0x9d, 0xab, 0xbf, 0x9c, 0x78, 0x04, 0x49, 0xad, 0xf1,
|
||||
0x43, 0x2f, 0x21, 0x9c, 0x90, 0xb8, 0x35, 0x14, 0x68, 0x12, 0x89, 0x00,
|
||||
0x20, 0x5b, 0x83, 0x52, 0xb7, 0xec, 0x26, 0x01, 0x26, 0xe1, 0x0f, 0xf6,
|
||||
0x98, 0xd1, 0xb6, 0x28, 0x84, 0xc8, 0xa5, 0x3e, 0xe9, 0xfb, 0x19, 0x2e,
|
||||
0x8f, 0xd7, 0x66, 0x98, 0xc0, 0x5e, 0x7b, 0xbc, 0x1a, 0xd9, 0x27, 0xb9,
|
||||
0x76, 0xcc, 0x58, 0x48, 0x0c, 0x0c, 0x22, 0x23, 0x19, 0xfd, 0x22, 0xfa,
|
||||
0x47, 0x90, 0x38, 0x62, 0xe0, 0x91, 0x79, 0x35, 0x3d, 0xa2, 0x83, 0x99,
|
||||
0x2b, 0x86, 0x7a, 0x88, 0x9b, 0x07, 0xe7, 0xc5, 0x95, 0x69, 0x9a, 0x2b,
|
||||
0x2e, 0x47, 0xcf, 0xfd, 0x9e, 0x64, 0xb5, 0xca, 0x44, 0x94, 0x95, 0xf3,
|
||||
0x2a, 0x8f, 0x4a, 0xcf, 0x0f, 0xd4, 0x7e, 0x0d, 0x0f, 0x2a, 0x0b, 0xb6,
|
||||
0x89, 0x64, 0xe3, 0x8c, 0x02, 0x3e, 0x76, 0x66, 0x68, 0x19, 0xa9, 0x07,
|
||||
0x5a, 0xc6, 0x33, 0xcd, 0x27, 0xff, 0x07, 0xd4, 0x91, 0x5b, 0x11, 0x3a,
|
||||
0xe3, 0xf5, 0x69, 0x70, 0xa7, 0xfe, 0xf2, 0xf0, 0xbd, 0x11, 0xaf, 0xa7,
|
||||
0x37, 0xda, 0x24, 0x75, 0x3e, 0x1a, 0x39, 0x49, 0xb4, 0x1e, 0x0e, 0xaf,
|
||||
0x5d, 0x1e, 0x94, 0xdf
|
||||
};
|
||||
const int sizeof_ca_cert_sig = sizeof(ca_cert_der_sig);
|
||||
/* ./client-cert.der.sign, */
|
||||
const unsigned char client_cert_der_sign[] =
|
||||
{
|
||||
0x9a, 0x0e, 0xbc, 0x0f, 0x7a, 0xbe, 0xb6, 0x47, 0x79, 0x71, 0xcc, 0x51,
|
||||
0x87, 0xaa, 0x28, 0xbd, 0x9c, 0x04, 0x08, 0x0b, 0xb9, 0x78, 0x84, 0xeb,
|
||||
0x1d, 0xf9, 0x0e, 0x38, 0x23, 0xfe, 0x8f, 0x6e, 0x75, 0x21, 0xcc, 0x39,
|
||||
0x79, 0xf8, 0x9d, 0x80, 0x6b, 0xa9, 0x63, 0x79, 0x13, 0xd8, 0xc9, 0x5d,
|
||||
0xd5, 0x84, 0x17, 0xdc, 0xe4, 0x56, 0xae, 0x55, 0x64, 0x69, 0x8c, 0x95,
|
||||
0xa4, 0x03, 0xc1, 0x4a, 0xe8, 0xb6, 0xd5, 0x1b, 0xfa, 0x26, 0x3f, 0x2c,
|
||||
0xff, 0xfc, 0xea, 0x83, 0xca, 0xf7, 0x4d, 0x9e, 0xf4, 0xbf, 0xca, 0xb6,
|
||||
0x19, 0x46, 0x55, 0x45, 0xf4, 0x7d, 0xcd, 0x4b, 0xbc, 0x3d, 0xb7, 0xff,
|
||||
0x57, 0xbf, 0xe8, 0x0e, 0xbc, 0x16, 0x45, 0xa1, 0xdb, 0xf0, 0xb4, 0x44,
|
||||
0x64, 0x76, 0x0b, 0xe5, 0x86, 0x32, 0xbe, 0xd7, 0xf0, 0x26, 0x6c, 0x48,
|
||||
0xb6, 0x7f, 0x1a, 0x2a, 0xe6, 0x1b, 0xbd, 0x5b, 0x9e, 0xca, 0xd0, 0xf4,
|
||||
0xbb, 0xe4, 0x7f, 0x29, 0x66, 0xf6, 0x31, 0x6d, 0x70, 0x6f, 0xfd, 0x4d,
|
||||
0x7f, 0xc8, 0x7f, 0x9a, 0x5b, 0x1e, 0x37, 0xf7, 0x0c, 0x66, 0xb2, 0x62,
|
||||
0xd8, 0x3e, 0xca, 0x79, 0x6c, 0xec, 0x05, 0x01, 0xda, 0xd9, 0xe2, 0xc3,
|
||||
0xd5, 0x9b, 0xf9, 0x43, 0xa6, 0x14, 0x9a, 0x1f, 0x32, 0xd3, 0x68, 0x63,
|
||||
0x65, 0xb8, 0xb1, 0x63, 0xd5, 0xe2, 0xaa, 0x06, 0x27, 0x62, 0x4a, 0x95,
|
||||
0x48, 0x3f, 0xee, 0xde, 0x3b, 0x89, 0xd4, 0x61, 0x74, 0x39, 0xef, 0xe6,
|
||||
0x6e, 0x16, 0x2d, 0x8b, 0x54, 0x29, 0xe9, 0x71, 0xbc, 0xd4, 0x30, 0x42,
|
||||
0x35, 0x1e, 0x89, 0xfb, 0xf7, 0x4a, 0x47, 0x87, 0x41, 0x66, 0x49, 0xe5,
|
||||
0x8e, 0x16, 0x7f, 0x17, 0x07, 0xd6, 0xff, 0xe1, 0x2a, 0x4d, 0x7c, 0x70,
|
||||
0x0d, 0x72, 0x5d, 0x3d, 0x1f, 0xd8, 0x41, 0x1a, 0x43, 0x00, 0x31, 0x81,
|
||||
0x60, 0xa8, 0x6c, 0xef
|
||||
};
|
||||
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
|
||||
58
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/key_data.h
vendored
Normal file
58
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/key_data.h
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
/* key_data.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
|
||||
#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];
|
||||
uint8_t encrypted_user_rsa2048_private_key[R_TSIP_RSA2048_ND_KEY_BYTE_SIZE + 16];
|
||||
uint8_t encrypted_user_ecc256_private_key[R_TSIP_ECC_PRIVATE_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_ */
|
||||
|
||||
317
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/test_main.c
vendored
Normal file
317
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/test_main.c
vendored
Normal file
@@ -0,0 +1,317 @@
|
||||
/* test_main.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 <wolfssl/wolfcrypt/settings.h>
|
||||
#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_tsip_rx_if.h"
|
||||
#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 <wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h>
|
||||
|
||||
extern const st_key_block_data_t g_key_block_data;
|
||||
user_PKCbInfo guser_PKCbInfo;
|
||||
#endif
|
||||
|
||||
#if defined(TLS_CLIENT)
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) && defined(WOLFSSL_STATIC_MEMORY)
|
||||
#include <wolfssl/wolfcrypt/memory.h>
|
||||
WOLFSSL_HEAP_HINT* heapHint = NULL;
|
||||
|
||||
#define BUFFSIZE_GEN (110 * 1024)
|
||||
unsigned char heapBufGen[BUFFSIZE_GEN];
|
||||
|
||||
#endif /* WOLFSSL_RENESAS_TSIP_TLS && WOLFSSL_STATIC_MEMORY */
|
||||
#endif /* TLS_CLIENT */
|
||||
|
||||
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);
|
||||
|
||||
|
||||
#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)
|
||||
|
||||
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];
|
||||
|
||||
/* initialize TSIP since t4 seems to call R_TSIP_RandomNumber */
|
||||
R_TSIP_Open(NULL,NULL);
|
||||
|
||||
/* 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();
|
||||
R_TSIP_Close();
|
||||
}
|
||||
#endif
|
||||
|
||||
void main(void)
|
||||
{
|
||||
int i = 0;
|
||||
int ret;
|
||||
int doClientCheck = 0;
|
||||
uint32_t channel;
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
|
||||
defined(TLS_CLIENT)
|
||||
#ifdef USE_ECC_CERT
|
||||
const char* cipherlist[] = {
|
||||
#if defined(WOLFSSL_TLS13)
|
||||
"TLS13-AES128-GCM-SHA256",
|
||||
"TLS13-AES128-CCM-SHA256",
|
||||
#endif
|
||||
"ECDHE-ECDSA-AES128-GCM-SHA256",
|
||||
"ECDHE-ECDSA-AES128-SHA256"
|
||||
};
|
||||
int cipherlist_sz;
|
||||
#if defined(WOLFSSL_TLS13)
|
||||
cipherlist_sz = 2;
|
||||
#else
|
||||
cipherlist_sz = 2;
|
||||
#endif
|
||||
|
||||
#else
|
||||
const char* cipherlist[] = {
|
||||
#if defined(WOLFSSL_TLS13)
|
||||
"TLS13-AES128-GCM-SHA256",
|
||||
"TLS13-AES128-CCM-SHA256",
|
||||
#endif
|
||||
"ECDHE-RSA-AES128-GCM-SHA256",
|
||||
"ECDHE-RSA-AES128-SHA256",
|
||||
"AES128-SHA",
|
||||
"AES128-SHA256",
|
||||
"AES256-SHA",
|
||||
"AES256-SHA256"
|
||||
};
|
||||
int cipherlist_sz;
|
||||
#if defined(WOLFSSL_TLS13)
|
||||
cipherlist_sz = 2;
|
||||
#else
|
||||
cipherlist_sz = 6;
|
||||
#endif /* WOLFSSL_TLS13 */
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
(void)timeTick;
|
||||
(void)i;
|
||||
(void)ret;
|
||||
(void)channel;
|
||||
(void)doClientCheck;
|
||||
|
||||
#if defined(CRYPT_TEST) || defined(BENCHMARK)
|
||||
#if defined(CRYPT_TEST)
|
||||
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"
|
||||
|
||||
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_STATIC_MEMORY)
|
||||
if (wc_LoadStaticMemory(&heapHint, heapBufGen, sizeof(heapBufGen),
|
||||
WOLFMEM_GENERAL, 1) !=0) {
|
||||
printf("unable to load static memory.\n");
|
||||
return;
|
||||
}
|
||||
#endif /* WOLFSSL_STATIC_MEMORY */
|
||||
|
||||
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(doClientCheck);
|
||||
wolfSSL_TLS_server();
|
||||
|
||||
Close_tcp();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
void abort(void)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
324
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolf_client.c
vendored
Normal file
324
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolf_client.c
vendored
Normal file
@@ -0,0 +1,324 @@
|
||||
/* wolf_client.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 <string.h>
|
||||
#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"
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h>
|
||||
#endif
|
||||
|
||||
#define SIMPLE_TLSSEVER_IP "192.168.1.12"
|
||||
#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
|
||||
|
||||
#if defined(TLS_CLIENT)
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) && defined(WOLFSSL_STATIC_MEMORY)
|
||||
|
||||
extern WOLFSSL_HEAP_HINT* heapHint;
|
||||
|
||||
#define BUFFSIZE_IO (16 * 1024)
|
||||
unsigned char heapBufIO[BUFFSIZE_IO];
|
||||
|
||||
#endif /* WOLFSSL_RENESAS_TSIP_TLS && WOLFSSL_STATIC_MEMORY */
|
||||
#endif /* TLS_CLIENT */
|
||||
|
||||
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
|
||||
|
||||
#if defined(WOLFSSL_STATIC_MEMORY)
|
||||
|
||||
if ((client_ctx = wolfSSL_CTX_new_ex(wolfSSLv23_client_method_ex(heapHint),
|
||||
heapHint)) == NULL) {
|
||||
printf("ERROR: faild to create WOLFSSL_CTX\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((wolfSSL_CTX_load_static_memory(&client_ctx, NULL, heapBufIO,
|
||||
sizeof(heapBufIO), WOLFMEM_IO_POOL, 10)) != WOLFSSL_SUCCESS) {
|
||||
printf("ERROR: faild to set static memory for IO\n");
|
||||
return;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/* Create and initialize WOLFSSL_CTX */
|
||||
if ((client_ctx =
|
||||
wolfSSL_CTX_new(wolfSSLv23_client_method_ex((void *)NULL))) == NULL) {
|
||||
printf("ERROR: failed to create WOLFSSL_CTX\n");
|
||||
return;
|
||||
}
|
||||
#endif /* WOLFSSL_STATIC_MEMORY */
|
||||
|
||||
#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;
|
||||
}
|
||||
#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;
|
||||
}
|
||||
|
||||
|
||||
/* load client certificate */
|
||||
#ifdef USE_ECC_CERT
|
||||
if (wolfSSL_CTX_use_certificate_chain_buffer_format(client_ctx,
|
||||
cliecc_cert_der_256,
|
||||
sizeof_cliecc_cert_der_256,
|
||||
WOLFSSL_FILETYPE_ASN1) != SSL_SUCCESS) {
|
||||
printf("ERROR: can't load client-certificate\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* set client private key data */
|
||||
#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_RENESAS_TSIP_TLS) && \
|
||||
(WOLFSSL_RENESAS_TSIP_VER >= 115 )
|
||||
if (tsip_set_clientPrivateKeyEnc(
|
||||
g_key_block_data.encrypted_user_ecc256_private_key,
|
||||
TSIP_ECCP256) != 0) {
|
||||
printf("ERROR: can't load client-private key\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (wolfSSL_CTX_use_PrivateKey_buffer(client_ctx,
|
||||
ecc_clikey_der_256,
|
||||
sizeof_ecc_clikey_der_256,
|
||||
SSL_FILETYPE_ASN1) != WOLFSSL_SUCCESS) {
|
||||
printf("ERROR: can't load private-key data.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
#else
|
||||
if (wolfSSL_CTX_use_certificate_chain_buffer_format(client_ctx,
|
||||
client_cert_der_2048,
|
||||
sizeof_client_cert_der_2048,
|
||||
WOLFSSL_FILETYPE_ASN1) != SSL_SUCCESS) {
|
||||
printf("ERROR: can't load client-certificate\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* set client private key data */
|
||||
|
||||
if (wolfSSL_CTX_use_PrivateKey_buffer(client_ctx, client_key_der_2048,
|
||||
sizeof_client_key_der_2048, SSL_FILETYPE_ASN1)
|
||||
!= WOLFSSL_SUCCESS) {
|
||||
printf("ERROR: can't load private-key data.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
#endif /* USE_ECC_CERT */
|
||||
#endif /* !NO_FILESYSTEM */
|
||||
|
||||
/* 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");
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_TLS13) && (WOLFSSL_RENESAS_TSIP_VER >= 115)
|
||||
if (wolfSSL_CTX_UseSupportedCurve(client_ctx, WOLFSSL_ECC_SECP256R1)
|
||||
!= WOLFSSL_SUCCESS) {
|
||||
wolfSSL_CTX_free(client_ctx); client_ctx = NULL;
|
||||
printf("client can't set use supported curves\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void wolfSSL_TLS_client( )
|
||||
{
|
||||
ID cepid = 1;
|
||||
ER ercd;
|
||||
int ret;
|
||||
WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)client_ctx;
|
||||
WOLFSSL *ssl = NULL;
|
||||
|
||||
#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");
|
||||
goto out;
|
||||
}
|
||||
if((dst_addr.portno = getPort(SIMPLE_TLSSERVER_PORT)) == 0){
|
||||
printf("ERROR: IP address\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if((ercd = tcp_con_cep(cepid, &my_addr, &dst_addr, TMO_FEVR)) != E_OK) {
|
||||
printf("ERROR TCP Connect: %d\n", ercd);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
printf("ERROR wolfSSL_new: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
goto out;
|
||||
}
|
||||
|
||||
#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));
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (wolfSSL_write(ssl, sendBuff, strlen(sendBuff)) != strlen(sendBuff)) {
|
||||
printf("ERROR SSL write: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
goto out;
|
||||
}
|
||||
|
||||
if ((ret=wolfSSL_read(ssl, rcvBuff, BUFF_SIZE)) < 0) {
|
||||
printf("ERROR SSL read: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
goto out;
|
||||
}
|
||||
|
||||
rcvBuff[ret] = '\0' ;
|
||||
printf("Received: %s\n\n", rcvBuff);
|
||||
|
||||
out:
|
||||
|
||||
/* frees all data before client termination */
|
||||
if(ssl) {
|
||||
wolfSSL_shutdown(ssl);
|
||||
wolfSSL_free(ssl);
|
||||
}
|
||||
if(ctx) {
|
||||
wolfSSL_CTX_free(ctx);
|
||||
}
|
||||
|
||||
wolfSSL_Cleanup();
|
||||
|
||||
tcp_sht_cep(cepid);
|
||||
tcp_cls_cep(cepid, TMO_FEVR);
|
||||
|
||||
return;
|
||||
}
|
||||
214
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolf_server.c
vendored
Normal file
214
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolf_server.c
vendored
Normal file
@@ -0,0 +1,214 @@
|
||||
/* wolf_server.c
|
||||
*
|
||||
* Copyright (C) 2006-2022 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 <string.h>
|
||||
#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 = NULL;
|
||||
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);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
printf("ERROR: failed wolfSSL_new\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
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));
|
||||
goto out;
|
||||
}
|
||||
|
||||
if ((len = wolfSSL_read(ssl, buff, sizeof(buff) - 1)) < 0) {
|
||||
printf("ERROR: SSL Read(%d)\n", wolfSSL_get_error(ssl, 0));
|
||||
goto out;
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
out:
|
||||
if (ssl) {
|
||||
wolfSSL_shutdown(ssl);
|
||||
wolfSSL_free(ssl);
|
||||
}
|
||||
if (ctx) {
|
||||
wolfSSL_CTX_free(ctx);
|
||||
};
|
||||
|
||||
wolfSSL_Cleanup();
|
||||
tcp_sht_cep(cepid);
|
||||
tcp_cls_cep(cepid, TMO_FEVR);
|
||||
}
|
||||
48
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolfssl_demo.h
vendored
Normal file
48
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/src/wolfssl_demo.h
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/* wolfssl_demo.h
|
||||
*
|
||||
* Copyright (C) 2006-2022 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_ */
|
||||
536
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/test.rcpc
vendored
Normal file
536
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/test.rcpc
vendored
Normal file
@@ -0,0 +1,536 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<MicomToolCommonProjectFile Version="1.00">
|
||||
<CreatorType Name="e2studio" Version=""/>
|
||||
<Placeholders>
|
||||
<PlaceholderPrefix>${</PlaceholderPrefix>
|
||||
<PlaceholderPostfix>}</PlaceholderPostfix>
|
||||
</Placeholders>
|
||||
<Project Name="test" Type="Application">
|
||||
<Files>
|
||||
<Category Name="src">
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\benchmark\benchmark.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\benchmark\benchmark.h</Path>
|
||||
<Path>src\key_data.c</Path>
|
||||
<Path>src\key_data.h</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\test\test.c</Path>
|
||||
<Path>src\test_main.c</Path>
|
||||
<Path>src\wolf_client.c</Path>
|
||||
<Path>src\wolf_server.c</Path>
|
||||
<Path>src\wolfssl_demo.h</Path>
|
||||
<Path>..\common\wolfssl_dummy.c</Path>
|
||||
<Category Name="smc_gen">
|
||||
<Category Name="Config_TMR0">
|
||||
<Path>src\smc_gen\Config_TMR0\Config_TMR0.c</Path>
|
||||
<Path>src\smc_gen\Config_TMR0\Config_TMR0.h</Path>
|
||||
<Path>src\smc_gen\Config_TMR0\Config_TMR0_user.c</Path>
|
||||
</Category>
|
||||
<Category Name="general">
|
||||
<Path>src\smc_gen\general\r_cg_hardware_setup.c</Path>
|
||||
<Path>src\smc_gen\general\r_cg_macrodriver.h</Path>
|
||||
<Path>src\smc_gen\general\r_cg_tmr.h</Path>
|
||||
<Path>src\smc_gen\general\r_cg_userdefine.h</Path>
|
||||
<Path>src\smc_gen\general\r_smc_cgc.c</Path>
|
||||
<Path>src\smc_gen\general\r_smc_cgc.h</Path>
|
||||
<Path>src\smc_gen\general\r_smc_cgc_user.c</Path>
|
||||
<Path>src\smc_gen\general\r_smc_entry.h</Path>
|
||||
<Path>src\smc_gen\general\r_smc_interrupt.c</Path>
|
||||
<Path>src\smc_gen\general\r_smc_interrupt.h</Path>
|
||||
</Category>
|
||||
<Category Name="r_bsp">
|
||||
<Path>src\smc_gen\r_bsp\platform.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\readme.txt</Path>
|
||||
<Category Name="board">
|
||||
<Category Name="generic_rx65n">
|
||||
<Path>src\smc_gen\r_bsp\board\generic_rx65n\hwsetup.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\board\generic_rx65n\hwsetup.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\board\generic_rx65n\r_bsp.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\board\generic_rx65n\r_bsp_config_reference.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\board\generic_rx65n\r_bsp_interrupt_config_reference.h</Path>
|
||||
</Category>
|
||||
<Category Name="user">
|
||||
<Path>src\smc_gen\r_bsp\board\user\r_bsp.h</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
<Category Name="doc">
|
||||
<Category Name="en">
|
||||
<Path>src\smc_gen\r_bsp\doc\en\r01an1685ej0621-rx-bsp.pdf</Path>
|
||||
</Category>
|
||||
<Category Name="ja">
|
||||
<Path>src\smc_gen\r_bsp\doc\ja\r01an1685jj0621-rx-bsp.pdf</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
<Category Name="mcu">
|
||||
<Category Name="all">
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\dbsct.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\fsp_common_api.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\lowlvl.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\lowlvl.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\lowsrc.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\lowsrc.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\mcu_locks.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_bsp_common.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_bsp_common.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_bsp_cpu.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_bsp_interrupts.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_bsp_interrupts.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_bsp_locking.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_bsp_mcu_startup.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_bsp_mcu_startup.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_bsp_software_interrupt.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_bsp_software_interrupt.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_fsp_error.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_rtos.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_rx_compiler.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_rx_intrinsic_functions.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_rx_intrinsic_functions.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\r_typedefs.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\resetprg.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\sbrk.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\all\sbrk.h</Path>
|
||||
</Category>
|
||||
<Category Name="rx65n">
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\mcu_clocks.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\mcu_clocks.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\mcu_info.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\mcu_init.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\mcu_init.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\mcu_interrupts.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\mcu_interrupts.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\mcu_locks.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\mcu_mapped_interrupts.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\mcu_mapped_interrupts.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\mcu_mapped_interrupts_private.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\r_bsp_cpu.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\r_bsp_locking.h</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\vecttbl.c</Path>
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\vecttbl.h</Path>
|
||||
<Category Name="register_access">
|
||||
<Category Name="ccrx">
|
||||
<Path>src\smc_gen\r_bsp\mcu\rx65n\register_access\ccrx\iodefine.h</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
</Category>
|
||||
</Category>
|
||||
</Category>
|
||||
<Category Name="r_cmt_rx">
|
||||
<Path>src\smc_gen\r_cmt_rx\r_cmt_rx_if.h</Path>
|
||||
<Path>src\smc_gen\r_cmt_rx\readme.txt</Path>
|
||||
<Category Name="doc">
|
||||
<Category Name="en">
|
||||
<Path>src\smc_gen\r_cmt_rx\doc\en\r01an1856ej0490-rx-timer.pdf</Path>
|
||||
</Category>
|
||||
<Category Name="ja">
|
||||
<Path>src\smc_gen\r_cmt_rx\doc\ja\r01an1856jj0490-rx-timer.pdf</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
<Category Name="src">
|
||||
<Path>src\smc_gen\r_cmt_rx\src\r_cmt_rx.c</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
<Category Name="r_config">
|
||||
<Path>src\smc_gen\r_config\r_bsp_config.h</Path>
|
||||
<Path>src\smc_gen\r_config\r_bsp_config_readme.txt</Path>
|
||||
<Path>src\smc_gen\r_config\r_bsp_interrupt_config.h</Path>
|
||||
<Path>src\smc_gen\r_config\r_cmt_rx_config.h</Path>
|
||||
<Path>src\smc_gen\r_config\r_ether_rx_config.h</Path>
|
||||
<Path>src\smc_gen\r_config\r_sys_time_rx_config.h</Path>
|
||||
<Path>src\smc_gen\r_config\r_t4_driver_rx_config.h</Path>
|
||||
<Path>src\smc_gen\r_config\r_t4_rx_config.h</Path>
|
||||
<Path>src\smc_gen\r_config\r_tsip_rx_config.h</Path>
|
||||
</Category>
|
||||
<Category Name="r_ether_rx">
|
||||
<Path>src\smc_gen\r_ether_rx\r_ether_rx_if.h</Path>
|
||||
<Path>src\smc_gen\r_ether_rx\readme.txt</Path>
|
||||
<Category Name="doc">
|
||||
<Category Name="en">
|
||||
<Path>src\smc_gen\r_ether_rx\doc\en\r01an2009ej0121-rx-ether.pdf</Path>
|
||||
</Category>
|
||||
<Category Name="ja">
|
||||
<Path>src\smc_gen\r_ether_rx\doc\ja\r01an2009jj0121-rx-ether.pdf</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
<Category Name="ref">
|
||||
<Path>src\smc_gen\r_ether_rx\ref\r_ether_rx_config_reference.h</Path>
|
||||
</Category>
|
||||
<Category Name="src">
|
||||
<Path>src\smc_gen\r_ether_rx\src\r_ether_rx.c</Path>
|
||||
<Path>src\smc_gen\r_ether_rx\src\r_ether_rx_private.h</Path>
|
||||
<Category Name="phy">
|
||||
<Path>src\smc_gen\r_ether_rx\src\phy\phy.c</Path>
|
||||
<Path>src\smc_gen\r_ether_rx\src\phy\phy.h</Path>
|
||||
</Category>
|
||||
<Category Name="targets">
|
||||
<Category Name="rx65n">
|
||||
<Path>src\smc_gen\r_ether_rx\src\targets\rx65n\r_ether_setting_rx65n.c</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
</Category>
|
||||
</Category>
|
||||
<Category Name="r_pincfg">
|
||||
<Path>src\smc_gen\r_pincfg\Pin.c</Path>
|
||||
<Path>src\smc_gen\r_pincfg\Pin.h</Path>
|
||||
<Path>src\smc_gen\r_pincfg\r_ether_rx_pinset.c</Path>
|
||||
<Path>src\smc_gen\r_pincfg\r_ether_rx_pinset.h</Path>
|
||||
<Path>src\smc_gen\r_pincfg\r_pinset.h</Path>
|
||||
</Category>
|
||||
<Category Name="r_sys_time_rx">
|
||||
<Path>src\smc_gen\r_sys_time_rx\r_sys_time_rx_if.h</Path>
|
||||
<Path>src\smc_gen\r_sys_time_rx\readme.txt</Path>
|
||||
<Category Name="doc">
|
||||
<Category Name="en">
|
||||
<Path>src\smc_gen\r_sys_time_rx\doc\en\r20an0431ej0101-rx-middle.pdf</Path>
|
||||
</Category>
|
||||
<Category Name="ja">
|
||||
<Path>src\smc_gen\r_sys_time_rx\doc\ja\r20an0431jj0101-rx-middle.pdf</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
<Category Name="ref">
|
||||
<Path>src\smc_gen\r_sys_time_rx\ref\r_sys_time_rx_config_reference.h</Path>
|
||||
</Category>
|
||||
<Category Name="src">
|
||||
<Path>src\smc_gen\r_sys_time_rx\src\r_sys_time_rx.c</Path>
|
||||
<Path>src\smc_gen\r_sys_time_rx\src\r_sys_time_rx_private.h</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
<Category Name="r_t4_driver_rx">
|
||||
<Path>src\smc_gen\r_t4_driver_rx\readme.txt</Path>
|
||||
<Category Name="doc">
|
||||
<Category Name="en">
|
||||
<Path>src\smc_gen\r_t4_driver_rx\doc\en\r20an0311ej0109-rx-t4.pdf</Path>
|
||||
</Category>
|
||||
<Category Name="ja">
|
||||
<Path>src\smc_gen\r_t4_driver_rx\doc\ja\r20an0311jj0109-rx-t4.pdf</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
<Category Name="ref">
|
||||
<Path>src\smc_gen\r_t4_driver_rx\ref\r_t4_driver_rx_config_reference.h</Path>
|
||||
</Category>
|
||||
<Category Name="src">
|
||||
<Path>src\smc_gen\r_t4_driver_rx\src\ether_callback.c</Path>
|
||||
<Path>src\smc_gen\r_t4_driver_rx\src\t4_driver.c</Path>
|
||||
<Path>src\smc_gen\r_t4_driver_rx\src\timer.c</Path>
|
||||
<Path>src\smc_gen\r_t4_driver_rx\src\timer.h</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
<Category Name="r_t4_rx">
|
||||
<Path>src\smc_gen\r_t4_rx\readme.txt</Path>
|
||||
<Category Name="doc">
|
||||
<Category Name="en">
|
||||
<Path>src\smc_gen\r_t4_rx\doc\en\r20an0051ej0210-rx-t4.pdf</Path>
|
||||
<Path>src\smc_gen\r_t4_rx\doc\en\r20uw0031ej0111-t4tiny.pdf</Path>
|
||||
<Path>src\smc_gen\r_t4_rx\doc\en\r20uw0032ej0109-t4tiny.pdf</Path>
|
||||
</Category>
|
||||
<Category Name="ja">
|
||||
<Path>src\smc_gen\r_t4_rx\doc\ja\r20an0051jj0210-rx-t4.pdf</Path>
|
||||
<Path>src\smc_gen\r_t4_rx\doc\ja\r20uw0031jj0111-t4tiny.pdf</Path>
|
||||
<Path>src\smc_gen\r_t4_rx\doc\ja\r20uw0032jj0109-t4tiny.pdf</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
<Category Name="lib">
|
||||
<Path>src\smc_gen\r_t4_rx\lib\r_mw_version.h</Path>
|
||||
<Path>src\smc_gen\r_t4_rx\lib\r_stdint.h</Path>
|
||||
<Path>src\smc_gen\r_t4_rx\lib\r_t4_itcpip.h</Path>
|
||||
</Category>
|
||||
<Category Name="ref">
|
||||
<Path>src\smc_gen\r_t4_rx\ref\r_t4_rx_config_reference.h</Path>
|
||||
</Category>
|
||||
<Category Name="src">
|
||||
<Path>src\smc_gen\r_t4_rx\src\config_tcpudp.c</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
<Category Name="r_tsip_rx">
|
||||
<Path>src\smc_gen\r_tsip_rx\r_tsip_rx_if.h</Path>
|
||||
<Path>src\smc_gen\r_tsip_rx\readme.txt</Path>
|
||||
<Category Name="doc">
|
||||
<Category Name="en">
|
||||
<Path>src\smc_gen\r_tsip_rx\doc\en\r20an0548ej0115-rx-tsip-security.pdf</Path>
|
||||
</Category>
|
||||
<Category Name="ja">
|
||||
<Path>src\smc_gen\r_tsip_rx\doc\ja\r20an0548jj0115-rx-tsip-security.pdf</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
</Category>
|
||||
</Category>
|
||||
</Category>
|
||||
</Files>
|
||||
<Device Category="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.cpu.rx600" Series="RX">R5F565NEHxFP</Device>
|
||||
<BuildOptions Name="CC-RX" Version="v3.04.00">
|
||||
<BuildMode Active="True" Name="HardwareDebug">
|
||||
<GeneralOptions/>
|
||||
<CompileOptions>
|
||||
<Option>-isa=rxv2</Option>
|
||||
<Option>-fpu</Option>
|
||||
<Option>-include="${ProjDirPath}\..\common"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\..\..\..\..\..\"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\Config_TMR0"</Option>
|
||||
<Option>-define=DEBUG_CONSOLE,WOLFSSL_USER_SETTINGS</Option>
|
||||
<Option>-utf8</Option>
|
||||
<Option>-nomessage</Option>
|
||||
<Option>-debug</Option>
|
||||
<Option>-outcode=utf8</Option>
|
||||
<Option>-optimize=0</Option>
|
||||
<Option>-nologo</Option>
|
||||
<Option>-lang=c99</Option>
|
||||
<Option>-lang=cpp</Option>
|
||||
<Option>-output=obj=${CONFIGDIR}\${FILELEAF}.obj</Option>
|
||||
<Option>-obj_path=${CONFIGDIR}</Option>
|
||||
</CompileOptions>
|
||||
<AssembleOptions>
|
||||
<Option>-isa=rxv2</Option>
|
||||
<Option>-fpu</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"</Option>
|
||||
<Option>-utf8</Option>
|
||||
<Option>-debug</Option>
|
||||
<Option>-nologo</Option>
|
||||
<Option>-output=${CONFIGDIR}</Option>
|
||||
</AssembleOptions>
|
||||
<LinkOptions>
|
||||
<Option>-output="${ProjName}.abs"</Option>
|
||||
<Option>-form=absolute</Option>
|
||||
<Option>-nomessage</Option>
|
||||
<Option>-vect=_undefined_interrupt_source_isr</Option>
|
||||
<Option>-list=${ProjName}.map</Option>
|
||||
<Option>-nooptimize</Option>
|
||||
<Option>-rom=D=R,D_1=R_1,D_2=R_2</Option>
|
||||
<Option>-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</Option>
|
||||
<Option>-nologo</Option>
|
||||
<Option>-library="${ProjDirPath}/../${ProjName}/src/smc_gen/r_t4_rx/lib/ccrx/T4_Library_ether_ccrx_rxv1_little_debug.lib"</Option>
|
||||
<Option>-library="${ProjDirPath}/../${ProjName}/src/smc_gen/r_tsip_rx/lib/ccrx/r_tsip_rx65n_little.lib"</Option>
|
||||
<Option>-library="${ProjDirPath}/../wolfssl/Debug/wolfssl.lib"</Option>
|
||||
<Option>-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/03C000,C_1,C_2,C,C$*,D*,W*,L,P/0FFE00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC</Option>
|
||||
<PreLinker>Auto</PreLinker>
|
||||
</LinkOptions>
|
||||
<LibraryGenerateOptions>
|
||||
<Option>-isa=rxv2</Option>
|
||||
<Option>-fpu</Option>
|
||||
<Option>-lang=c99</Option>
|
||||
<Option>-head=runtime,ctype,stdio,stdlib,string,new</Option>
|
||||
<Option>-output="${ProjName}.lib"</Option>
|
||||
<Option>-nologo</Option>
|
||||
<GenerateMode>BuildOptionChanged</GenerateMode>
|
||||
</LibraryGenerateOptions>
|
||||
<LinkOrder>
|
||||
<Path>HardwareDebug\benchmark.obj</Path>
|
||||
<Path>HardwareDebug\key_data.obj</Path>
|
||||
<Path>HardwareDebug\Config_TMR0.obj</Path>
|
||||
<Path>HardwareDebug\Config_TMR0_user.obj</Path>
|
||||
<Path>HardwareDebug\r_cg_hardware_setup.obj</Path>
|
||||
<Path>HardwareDebug\r_smc_cgc.obj</Path>
|
||||
<Path>HardwareDebug\r_smc_cgc_user.obj</Path>
|
||||
<Path>HardwareDebug\r_smc_interrupt.obj</Path>
|
||||
<Path>HardwareDebug\hwsetup.obj</Path>
|
||||
<Path>HardwareDebug\dbsct.obj</Path>
|
||||
<Path>HardwareDebug\lowlvl.obj</Path>
|
||||
<Path>HardwareDebug\lowsrc.obj</Path>
|
||||
<Path>HardwareDebug\mcu_locks.obj</Path>
|
||||
<Path>HardwareDebug\r_bsp_common.obj</Path>
|
||||
<Path>HardwareDebug\r_bsp_cpu.obj</Path>
|
||||
<Path>HardwareDebug\r_bsp_interrupts.obj</Path>
|
||||
<Path>HardwareDebug\r_bsp_locking.obj</Path>
|
||||
<Path>HardwareDebug\r_bsp_mcu_startup.obj</Path>
|
||||
<Path>HardwareDebug\r_bsp_software_interrupt.obj</Path>
|
||||
<Path>HardwareDebug\r_rx_intrinsic_functions.obj</Path>
|
||||
<Path>HardwareDebug\resetprg.obj</Path>
|
||||
<Path>HardwareDebug\sbrk.obj</Path>
|
||||
<Path>HardwareDebug\mcu_clocks.obj</Path>
|
||||
<Path>HardwareDebug\mcu_init.obj</Path>
|
||||
<Path>HardwareDebug\mcu_interrupts.obj</Path>
|
||||
<Path>HardwareDebug\mcu_mapped_interrupts.obj</Path>
|
||||
<Path>HardwareDebug\vecttbl.obj</Path>
|
||||
<Path>HardwareDebug\r_cmt_rx.obj</Path>
|
||||
<Path>HardwareDebug\phy.obj</Path>
|
||||
<Path>HardwareDebug\r_ether_rx.obj</Path>
|
||||
<Path>HardwareDebug\r_ether_setting_rx65n.obj</Path>
|
||||
<Path>HardwareDebug\Pin.obj</Path>
|
||||
<Path>HardwareDebug\r_ether_rx_pinset.obj</Path>
|
||||
<Path>HardwareDebug\r_sys_time_rx.obj</Path>
|
||||
<Path>HardwareDebug\ether_callback.obj</Path>
|
||||
<Path>HardwareDebug\t4_driver.obj</Path>
|
||||
<Path>HardwareDebug\timer.obj</Path>
|
||||
<Path>HardwareDebug\config_tcpudp.obj</Path>
|
||||
<Path>HardwareDebug\test.obj</Path>
|
||||
<Path>HardwareDebug\test_main.obj</Path>
|
||||
<Path>HardwareDebug\wolf_client.obj</Path>
|
||||
<Path>HardwareDebug\wolf_server.obj</Path>
|
||||
<Path>HardwareDebug\wolfssl_dummy.obj</Path>
|
||||
<Path>HardwareDebug\test.lib</Path>
|
||||
</LinkOrder>
|
||||
<CommonOptions>
|
||||
<IncludePathForC>"${ProjDirPath}\..\common"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\..\..\..\..\..\"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\general"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\Config_TMR0"</IncludePathForC>
|
||||
<IncludePathForAsm>"${ProjDirPath}\..\${ProjName}\src\smc_gen\general"</IncludePathForAsm>
|
||||
<IncludePathForAsm>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"</IncludePathForAsm>
|
||||
<MacroForC>DEBUG_CONSOLE</MacroForC>
|
||||
<MacroForC>WOLFSSL_USER_SETTINGS</MacroForC>
|
||||
</CommonOptions>
|
||||
</BuildMode>
|
||||
<BuildMode Active="False" Name="Debug">
|
||||
<GeneralOptions/>
|
||||
<CompileOptions>
|
||||
<Option>-isa=rxv2</Option>
|
||||
<Option>-fpu</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx231"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx66t"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx65n"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"</Option>
|
||||
<Option>-include="${ProjDirPath}\generate"</Option>
|
||||
<Option>-define=DEBUG_CONSOLE</Option>
|
||||
<Option>-utf8</Option>
|
||||
<Option>-nomessage</Option>
|
||||
<Option>-debug</Option>
|
||||
<Option>-outcode=utf8</Option>
|
||||
<Option>-nologo</Option>
|
||||
<Option>-lang=c99</Option>
|
||||
<Option>-lang=cpp</Option>
|
||||
<Option>-output=obj=${CONFIGDIR}\${FILELEAF}.obj</Option>
|
||||
<Option>-obj_path=${CONFIGDIR}</Option>
|
||||
</CompileOptions>
|
||||
<AssembleOptions>
|
||||
<Option>-isa=rxv2</Option>
|
||||
<Option>-fpu</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\general"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"</Option>
|
||||
<Option>-utf8</Option>
|
||||
<Option>-debug</Option>
|
||||
<Option>-nologo</Option>
|
||||
<Option>-output=${CONFIGDIR}</Option>
|
||||
</AssembleOptions>
|
||||
<LinkOptions>
|
||||
<Option>-output="${ProjName}.abs"</Option>
|
||||
<Option>-form=absolute</Option>
|
||||
<Option>-nomessage</Option>
|
||||
<Option>-vect=_undefined_interrupt_source_isr</Option>
|
||||
<Option>-list=${ProjName}.map</Option>
|
||||
<Option>-nooptimize</Option>
|
||||
<Option>-rom=D=R,D_1=R_1,D_2=R_2</Option>
|
||||
<Option>-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</Option>
|
||||
<Option>-nologo</Option>
|
||||
<Option>-library="${ProjDirPath}/../${ProjName}/src/smc_gen/r_t4_rx/lib/T4_Library_rxv1_ether_little.lib"</Option>
|
||||
<Option>-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</Option>
|
||||
<PreLinker>Auto</PreLinker>
|
||||
</LinkOptions>
|
||||
<LibraryGenerateOptions>
|
||||
<Option>-isa=rxv2</Option>
|
||||
<Option>-fpu</Option>
|
||||
<Option>-lang=c99</Option>
|
||||
<Option>-head=runtime,stdio,stdlib,string,new</Option>
|
||||
<Option>-output="${ProjName}.lib"</Option>
|
||||
<Option>-nologo</Option>
|
||||
<GenerateMode>BuildOptionChanged</GenerateMode>
|
||||
</LibraryGenerateOptions>
|
||||
<LinkOrder>
|
||||
<Path>Debug\benchmark.obj</Path>
|
||||
<Path>Debug\key_data.obj</Path>
|
||||
<Path>Debug\Config_TMR0.obj</Path>
|
||||
<Path>Debug\Config_TMR0_user.obj</Path>
|
||||
<Path>Debug\r_cg_hardware_setup.obj</Path>
|
||||
<Path>Debug\r_smc_cgc.obj</Path>
|
||||
<Path>Debug\r_smc_cgc_user.obj</Path>
|
||||
<Path>Debug\r_smc_interrupt.obj</Path>
|
||||
<Path>Debug\hwsetup.obj</Path>
|
||||
<Path>Debug\dbsct.obj</Path>
|
||||
<Path>Debug\lowlvl.obj</Path>
|
||||
<Path>Debug\lowsrc.obj</Path>
|
||||
<Path>Debug\mcu_locks.obj</Path>
|
||||
<Path>Debug\r_bsp_common.obj</Path>
|
||||
<Path>Debug\r_bsp_cpu.obj</Path>
|
||||
<Path>Debug\r_bsp_interrupts.obj</Path>
|
||||
<Path>Debug\r_bsp_locking.obj</Path>
|
||||
<Path>Debug\r_bsp_mcu_startup.obj</Path>
|
||||
<Path>Debug\r_bsp_software_interrupt.obj</Path>
|
||||
<Path>Debug\r_rx_intrinsic_functions.obj</Path>
|
||||
<Path>Debug\resetprg.obj</Path>
|
||||
<Path>Debug\sbrk.obj</Path>
|
||||
<Path>Debug\mcu_clocks.obj</Path>
|
||||
<Path>Debug\mcu_init.obj</Path>
|
||||
<Path>Debug\mcu_interrupts.obj</Path>
|
||||
<Path>Debug\mcu_mapped_interrupts.obj</Path>
|
||||
<Path>Debug\vecttbl.obj</Path>
|
||||
<Path>Debug\r_cmt_rx.obj</Path>
|
||||
<Path>Debug\phy.obj</Path>
|
||||
<Path>Debug\r_ether_rx.obj</Path>
|
||||
<Path>Debug\r_ether_setting_rx65n.obj</Path>
|
||||
<Path>Debug\Pin.obj</Path>
|
||||
<Path>Debug\r_ether_rx_pinset.obj</Path>
|
||||
<Path>Debug\r_sys_time_rx.obj</Path>
|
||||
<Path>Debug\ether_callback.obj</Path>
|
||||
<Path>Debug\t4_driver.obj</Path>
|
||||
<Path>Debug\timer.obj</Path>
|
||||
<Path>Debug\config_tcpudp.obj</Path>
|
||||
<Path>Debug\test.obj</Path>
|
||||
<Path>Debug\test_main.obj</Path>
|
||||
<Path>Debug\wolf_client.obj</Path>
|
||||
<Path>Debug\wolf_server.obj</Path>
|
||||
<Path>Debug\wolfssl_dummy.obj</Path>
|
||||
<Path>Debug\test.lib</Path>
|
||||
</LinkOrder>
|
||||
<CommonOptions>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_bsp"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_config"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx231"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx66t"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_tsip_rx\src\targets\rx65n"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_cmt_rx\src"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_driver_rx\src"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_t4_rx\lib"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_ether_rx"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_sys_time_rx\src"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\general"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\generate"</IncludePathForC>
|
||||
<IncludePathForAsm>"${ProjDirPath}\..\${ProjName}\src\smc_gen\general"</IncludePathForAsm>
|
||||
<IncludePathForAsm>"${ProjDirPath}\..\${ProjName}\src\smc_gen\r_pincfg"</IncludePathForAsm>
|
||||
<MacroForC>DEBUG_CONSOLE</MacroForC>
|
||||
</CommonOptions>
|
||||
</BuildMode>
|
||||
</BuildOptions>
|
||||
</Project>
|
||||
</MicomToolCommonProjectFile>
|
||||
136
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/test_HardwareDebug.launch
vendored
Normal file
136
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/test/test_HardwareDebug.launch
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.renesas.cdt.launch.dsf.gdbremote.launchConfigurationType">
|
||||
<stringAttribute key="com.renesas.cdt.core.additionalServerArgs" value=""/>
|
||||
<stringAttribute key="com.renesas.cdt.core.initCommands" value=""/>
|
||||
<stringAttribute key="com.renesas.cdt.core.ipAddress" value="localhost"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.jtagDevice" value="E1 (RX)"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.jtagDeviceId" value="com.renesas.hardwaredebug.rx.e1"/>
|
||||
<listAttribute key="com.renesas.cdt.core.listGDBExe">
|
||||
<listEntry value="rx-elf-gdb -rx-force-v2"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="com.renesas.cdt.core.listGDBLaunchName">
|
||||
<listEntry value="main"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="com.renesas.cdt.core.listGDBPort">
|
||||
<listEntry value="61234"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="com.renesas.cdt.core.optionInitCommands" value="monitor set_internal_mem_overwrite 0-581 "/>
|
||||
<intAttribute key="com.renesas.cdt.core.portNumber" value="61234"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.runCommands" value=""/>
|
||||
<stringAttribute key="com.renesas.cdt.core.secondGDBExe" value="green_dsp-elf-gdb"/>
|
||||
<booleanAttribute key="com.renesas.cdt.core.secondGDBSupport" value="false"/>
|
||||
<intAttribute key="com.renesas.cdt.core.secondGdbPortNumber" value="61237"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.serverParam" value="-g E1 -t R5F565NE -uClockSrcHoco= 1 -uAllowClockSourceInternal= 1 -uUseFine= 1 -uFineBaudRate= 2.00 -w 1 -z 0 -uRegisterSetting= 0 -uModePin= 0 -uChangeStartupBank= 0 -uStartupBank= 0 -uDebugMode= 0 -uExecuteProgram= 0 -uIdCode= FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -uresetOnReload= 1 -n 0 -uWorkRamAddress= 1000 -uverifyOnWritingMemory= 0 -uProgReWriteIRom= 0 -uProgReWriteDFlash= 0 -uhookWorkRamAddr= 0x3fdd0 -uhookWorkRamSize= 0x230"/>
|
||||
<booleanAttribute key="com.renesas.cdt.core.startServer" value="true"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.targetDevice" value="R5F565NE"/>
|
||||
<booleanAttribute key="com.renesas.cdt.core.useRemoteTarget" value="true"/>
|
||||
<booleanAttribute key="com.renesas.cdt.core.verboseMode" value="false"/>
|
||||
<stringAttribute key="com.renesas.cdt.debug.ioview.dsf.registerSelection0" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <selectedRegisterList ioFilePath="C:\Users\Taka\.eclipse\com.renesas.platform_923020927\DebugComp\RX\IoFiles\RX65N.sfrx"/> "/>
|
||||
<stringAttribute key="com.renesas.cdt.launch.dsf.IO_MAP" value="${support_area_loc}"/>
|
||||
<booleanAttribute key="com.renesas.cdt.launch.dsf.USE_DEFAULT_IO_MAP" value="true"/>
|
||||
<listAttribute key="com.renesas.cdt.launch.dsf.downloadImages">
|
||||
<listEntry value="|true|true|true|0|true|No core"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="com.renesas.cdt.launch.dsf.downloadImagesUpgradedV30" value="true"/>
|
||||
<stringAttribute key="com.renesas.cdt.launch.dsf.launchSeqType" value="com.renesas.cdt.launch.dsf.launchSequence.e2GdbServer"/>
|
||||
<stringAttribute key="com.renesas.cdt.launch.dsf.serverPath" value="${renesas.support.targetLoc:rx-debug}\e2-server-gdb"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.allow.change.startup_bank" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.allow.clock.source.internal" value="true"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.e1.clock_source" value="1"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.connection.mode" value="0"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.e1_pwr" value="true"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.enable.hot.plug" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.execute.program" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.external_memory" value=""/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.fine.baud.rate" value="2.00"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.flash_overwrite_blocks" value="0-581"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.hook_Stop_func" value="0x0"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.hook_enable_Stop" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.hook_enable_start" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.hook_start_func" value="0x0"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.e1.hook_work_ram_Addr" value="261584"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.e1.hook_work_ram_Size" value="560"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.id_code" value="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.inputclock" value="27.0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.jtag.clock.freq" value="16.5"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.jtag.or.fine" value="1"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.le" value="true"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.mode" value="0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.mode_pin" value="0"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.prog_rewrite_dflash" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.prog_rewrite_irom" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.serial_number" value=""/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.startup_bank" value="0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.supply.voltage" value="3.3V"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.e1.timer_clock" value="0"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.e1.work_ram_start" value="4096"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.allow.clock.source.internal" value="true"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.ez.clock_source" value="1"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.connection.mode" value="0"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.enable.hot.plug" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.execute.program" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.external_memory" value=""/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.fine.baud.rate" value="1.00"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.flash_overwrite_blocks" value="0-31"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.hook_Stop_func" value="0x0"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.hook_enable_Stop" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.hook_enable_start" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.hook_start_func" value="0x0"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.ez.hook_work_ram_Addr" value="9680"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.ez.hook_work_ram_Size" value="560"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.id_code" value="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.inputclock" value="22.0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.jtag.clock.freq" value="16.5"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.jtag.or.fine" value="1"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.le" value="true"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.mode" value="0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.mode_pin" value="0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.power.voltage" value="0.0000"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.prog_rewrite_dflash" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.prog_rewrite_irom" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.serial_number" value=""/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.ez.timer_clock" value="0"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.ez.work_ram_start" value="4096"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.e1.E1DebugToolSettingsTree.resetAfterReload" value="true"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.ez.EzDebugToolSettingsTree.resetAfterReload" value="true"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.timemeasurement" value="true"/>
|
||||
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.delay" value="3"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value="F:\Work\e2studioWorkspaces\RX65N\forTSIP1.06\wolfssl-4.4.0\IDE\Renesas\e2studio\Projects\test\HardwareDebug\test.x"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value="0"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value="F:\Work\e2studioWorkspaces\RX65N\forTSIP1.06\wolfssl-4.4.0\IDE\Renesas\e2studio\Projects\test\HardwareDebug\test.x"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value="0"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="rx-elf-gdb -rx-force-v2"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="true"/>
|
||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="remote"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="HardwareDebug/test.x"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="test"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration.1378385971"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/test"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><memoryBlockExpressionList context="reserved-for-future-use"><gdbmemoryBlockExpression address="6520" core_thread_id="1_i1" label="0x1978"><memoryRendering id="org.eclipse.debug.ui.rendering.raw_memory"><renderingInstance containerId="org.eclipse.debug.ui.MemoryView.RenderingViewPane.1" viewId="org.eclipse.debug.ui.MemoryView" viewSecondaryId=""/></memoryRendering></gdbmemoryBlockExpression><gdbmemoryBlockExpression address="6668" core_thread_id="1_i1" label="0x1a0c"><memoryRendering id="org.eclipse.debug.ui.rendering.raw_memory"><renderingInstance containerId="org.eclipse.debug.ui.MemoryView.RenderingViewPane.1" viewId="org.eclipse.debug.ui.MemoryView" viewSecondaryId=""/></memoryRendering></gdbmemoryBlockExpression><gdbmemoryBlockExpression address="6504" core_thread_id="1_i1" label="0x1968"><memoryRendering id="org.eclipse.debug.ui.rendering.raw_memory"><renderingInstance containerId="org.eclipse.debug.ui.MemoryView.RenderingViewPane.1" viewId="org.eclipse.debug.ui.MemoryView" viewSecondaryId=""/></memoryRendering></gdbmemoryBlockExpression></memoryBlockExpressionList>"/>
|
||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||
</launchConfiguration>
|
||||
219
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/wolfssl/wolfssl.rcpc
vendored
Normal file
219
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/wolfssl/wolfssl.rcpc
vendored
Normal file
@@ -0,0 +1,219 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<MicomToolCommonProjectFile Version="1.00">
|
||||
<CreatorType Name="e2studio" Version=""/>
|
||||
<Placeholders>
|
||||
<PlaceholderPrefix>${</PlaceholderPrefix>
|
||||
<PlaceholderPostfix>}</PlaceholderPostfix>
|
||||
</Placeholders>
|
||||
<Project Name="wolfssl" Type="Library">
|
||||
<Files>
|
||||
<Category Name="src">
|
||||
<Path>..\..\..\..\..\..\src\crl.c</Path>
|
||||
<Path>..\..\..\..\..\..\src\internal.c</Path>
|
||||
<Path>..\..\..\..\..\..\src\keys.c</Path>
|
||||
<Path>..\..\..\..\..\..\src\ocsp.c</Path>
|
||||
<Path>..\..\..\..\..\..\src\sniffer.c</Path>
|
||||
<Path>..\..\..\..\..\..\src\ssl.c</Path>
|
||||
<Path>..\..\..\..\..\..\src\tls.c</Path>
|
||||
<Path>..\..\..\..\..\..\src\tls13.c</Path>
|
||||
<Path>..\..\..\..\..\..\src\wolfio.c</Path>
|
||||
</Category>
|
||||
<Category Name="wolfcrypt">
|
||||
<Category Name="port">
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_common.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_aes.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_sha.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\port\Renesas\renesas_tsip_util.c</Path>
|
||||
</Category>
|
||||
<Category Name="src">
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\aes.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\arc4.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\asm.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\asn.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\blake2b.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\camellia.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\chacha.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\chacha20_poly1305.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\cmac.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\coding.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\compress.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\cpuid.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\cryptocb.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\curve25519.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\des3.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\dh.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\dsa.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\ecc.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\ecc_fp.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\ed25519.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\error.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\fe_low_mem.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\fe_operations.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\ge_low_mem.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\ge_operations.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\hash.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\hmac.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\integer.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\kdf.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\logging.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\md2.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\md4.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\md5.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\memory.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\pkcs12.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\pkcs7.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\poly1305.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\pwdbased.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\random.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\ripemd.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\rsa.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\sha.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\sha256.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\sha3.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\sha512.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\signature.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\sp_arm32.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\sp_arm64.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\sp_c32.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\sp_c64.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\sp_int.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\sp_x86_64.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\srp.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\tfm.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\wc_encrypt.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\wc_port.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\wolfevent.c</Path>
|
||||
<Path>..\..\..\..\..\..\wolfcrypt\src\wolfmath.c</Path>
|
||||
</Category>
|
||||
</Category>
|
||||
</Files>
|
||||
<Device Category="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.cpu.rx600" Series="RX">R5F565NEHxFP</Device>
|
||||
<BuildOptions Name="CC-RX" Version="v3.04.00">
|
||||
<BuildMode Active="True" Name="Debug">
|
||||
<GeneralOptions/>
|
||||
<CompileOptions>
|
||||
<Option>-isa=rxv2</Option>
|
||||
<Option>-fpu</Option>
|
||||
<Option>-include="${ProjDirPath}\..\common"</Option>
|
||||
<Option>-include="${ProjDirPath}\\..\..\..\..\..\..\"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\test\src\smc_gen\"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\test\src\smc_gen\r_bsp"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\test\src\smc_gen\r_config"</Option>
|
||||
<Option>-include="${ProjDirPath}\..\test\src\smc_gen\r_tsip_rx"</Option>
|
||||
<Option>-define=WOLFSSL_USER_SETTINGS</Option>
|
||||
<Option>-utf8</Option>
|
||||
<Option>-nomessage</Option>
|
||||
<Option>-debug</Option>
|
||||
<Option>-outcode=utf8</Option>
|
||||
<Option>-optimize=0</Option>
|
||||
<Option>-nologo</Option>
|
||||
<Option>-lang=c99</Option>
|
||||
<Option>-lang=cpp</Option>
|
||||
<Option>-output=obj=${CONFIGDIR}\${FILELEAF}.obj</Option>
|
||||
<Option>-obj_path=${CONFIGDIR}</Option>
|
||||
</CompileOptions>
|
||||
<AssembleOptions>
|
||||
<Option>-isa=rxv2</Option>
|
||||
<Option>-fpu</Option>
|
||||
<Option>-utf8</Option>
|
||||
<Option>-debug</Option>
|
||||
<Option>-nologo</Option>
|
||||
<Option>-output=${CONFIGDIR}</Option>
|
||||
</AssembleOptions>
|
||||
<LinkOptions>
|
||||
<Option>-output="${ProjName}.lib"</Option>
|
||||
<Option>-form=library=u</Option>
|
||||
<Option>-nomessage</Option>
|
||||
<Option>-list=${ProjName}.lbp</Option>
|
||||
<Option>-nologo</Option>
|
||||
<PreLinker>Auto</PreLinker>
|
||||
</LinkOptions>
|
||||
<LibraryGenerateOptions>
|
||||
<GenerateMode>None</GenerateMode>
|
||||
</LibraryGenerateOptions>
|
||||
<LinkOrder>
|
||||
<Path>Debug\crl.obj</Path>
|
||||
<Path>Debug\internal.obj</Path>
|
||||
<Path>Debug\keys.obj</Path>
|
||||
<Path>Debug\ocsp.obj</Path>
|
||||
<Path>Debug\sniffer.obj</Path>
|
||||
<Path>Debug\ssl.obj</Path>
|
||||
<Path>Debug\tls.obj</Path>
|
||||
<Path>Debug\tls13.obj</Path>
|
||||
<Path>Debug\wolfio.obj</Path>
|
||||
<Path>Debug\renesas_common.obj</Path>
|
||||
<Path>Debug\renesas_tsip_aes.obj</Path>
|
||||
<Path>Debug\renesas_tsip_sha.obj</Path>
|
||||
<Path>Debug\renesas_tsip_util.obj</Path>
|
||||
<Path>Debug\aes.obj</Path>
|
||||
<Path>Debug\arc4.obj</Path>
|
||||
<Path>Debug\asm.obj</Path>
|
||||
<Path>Debug\asn.obj</Path>
|
||||
<Path>Debug\blake2b.obj</Path>
|
||||
<Path>Debug\camellia.obj</Path>
|
||||
<Path>Debug\chacha.obj</Path>
|
||||
<Path>Debug\chacha20_poly1305.obj</Path>
|
||||
<Path>Debug\cmac.obj</Path>
|
||||
<Path>Debug\coding.obj</Path>
|
||||
<Path>Debug\compress.obj</Path>
|
||||
<Path>Debug\cpuid.obj</Path>
|
||||
<Path>Debug\cryptocb.obj</Path>
|
||||
<Path>Debug\curve25519.obj</Path>
|
||||
<Path>Debug\des3.obj</Path>
|
||||
<Path>Debug\dh.obj</Path>
|
||||
<Path>Debug\dsa.obj</Path>
|
||||
<Path>Debug\ecc.obj</Path>
|
||||
<Path>Debug\ecc_fp.obj</Path>
|
||||
<Path>Debug\ed25519.obj</Path>
|
||||
<Path>Debug\error.obj</Path>
|
||||
<Path>Debug\fe_low_mem.obj</Path>
|
||||
<Path>Debug\fe_operations.obj</Path>
|
||||
<Path>Debug\ge_low_mem.obj</Path>
|
||||
<Path>Debug\ge_operations.obj</Path>
|
||||
<Path>Debug\hash.obj</Path>
|
||||
<Path>Debug\hmac.obj</Path>
|
||||
<Path>Debug\integer.obj</Path>
|
||||
<Path>Debug\kdf.obj</Path>
|
||||
<Path>Debug\logging.obj</Path>
|
||||
<Path>Debug\md2.obj</Path>
|
||||
<Path>Debug\md4.obj</Path>
|
||||
<Path>Debug\md5.obj</Path>
|
||||
<Path>Debug\memory.obj</Path>
|
||||
<Path>Debug\pkcs12.obj</Path>
|
||||
<Path>Debug\pkcs7.obj</Path>
|
||||
<Path>Debug\poly1305.obj</Path>
|
||||
<Path>Debug\pwdbased.obj</Path>
|
||||
<Path>Debug\random.obj</Path>
|
||||
<Path>Debug\ripemd.obj</Path>
|
||||
<Path>Debug\rsa.obj</Path>
|
||||
<Path>Debug\sha.obj</Path>
|
||||
<Path>Debug\sha256.obj</Path>
|
||||
<Path>Debug\sha3.obj</Path>
|
||||
<Path>Debug\sha512.obj</Path>
|
||||
<Path>Debug\signature.obj</Path>
|
||||
<Path>Debug\sp_arm32.obj</Path>
|
||||
<Path>Debug\sp_arm64.obj</Path>
|
||||
<Path>Debug\sp_c32.obj</Path>
|
||||
<Path>Debug\sp_c64.obj</Path>
|
||||
<Path>Debug\sp_int.obj</Path>
|
||||
<Path>Debug\sp_x86_64.obj</Path>
|
||||
<Path>Debug\srp.obj</Path>
|
||||
<Path>Debug\tfm.obj</Path>
|
||||
<Path>Debug\wc_encrypt.obj</Path>
|
||||
<Path>Debug\wc_port.obj</Path>
|
||||
<Path>Debug\wolfevent.obj</Path>
|
||||
<Path>Debug\wolfmath.obj</Path>
|
||||
</LinkOrder>
|
||||
<CommonOptions>
|
||||
<IncludePathForC>"${ProjDirPath}\..\common"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\\..\..\..\..\..\..\"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\test\src\smc_gen\"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\test\src\smc_gen\r_bsp"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\test\src\smc_gen\r_config"</IncludePathForC>
|
||||
<IncludePathForC>"${ProjDirPath}\..\test\src\smc_gen\r_tsip_rx"</IncludePathForC>
|
||||
<MacroForC>WOLFSSL_USER_SETTINGS</MacroForC>
|
||||
</CommonOptions>
|
||||
</BuildMode>
|
||||
</BuildOptions>
|
||||
</Project>
|
||||
</MicomToolCommonProjectFile>
|
||||
Binary file not shown.
Binary file not shown.
9
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/RSK/README_EN.md
vendored
Normal file
9
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/RSK/README_EN.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
wolfSSL sample application project for Renesas RSK+RX65N-2MB evaluation board
|
||||
======
|
||||
|
||||
<br>
|
||||
|
||||
A sample program for evaluating wolfSSL targeting the Renesas RSK+RX65N-2MB evaluation board is provided. For details on the program, refer to the following documents included in the package.
|
||||
|
||||
+ InstructionManualForExample_RSK+RX65N-2MB_JP.pdf (Japanese)
|
||||
+ InstructionManualForExample_RSK+RX65N-2MB_EN.pdf (English)
|
||||
12
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/RSK/README_JP.md
vendored
Normal file
12
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/RSK/README_JP.md
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Renesas RSK+RX65N-2MB 評価ボード用 wolfSSLサンプルプロジェクト
|
||||
======
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
Renesas社製 RSK+RX65N-2MB 評価ボードをターゲットとしてwolfSSLを評価するためのサンプルプログラムを提供します。サンプルプログラムに関するマニュアルは同梱の
|
||||
|
||||
+ InstructionManualForExample_RSK+RX65N-2MB_JP.pdf (日本語版)
|
||||
+ InstructionManualForExample_RSK+RX65N-2MB_EN.pdf (英語版)
|
||||
|
||||
を参照ください。
|
||||
17
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/RSK/include.am
vendored
Normal file
17
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/RSK/include.am
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# 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/InstructionManualForExample_RSK+RX65N-2MB_EN.pdf
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/InstructionManualForExample_RSK+RX65N-2MB_JP.pdf
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/resource/section.esi
|
||||
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/wolfssl_demo/key_data.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/wolfssl_demo/key_data.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/wolfssl_demo/wolfssl_demo.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/wolfssl_demo/wolfssl_demo.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX65N/RSK/wolfssl_demo/user_settings.h
|
||||
41
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/RSK/resource/section.esi
vendored
Normal file
41
android/extern/wolfssl/IDE/Renesas/e2studio/RX65N/RSK/resource/section.esi
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="ASCII"?>
|
||||
<com.renesas.linkersection.model:SectionContainer xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:com.renesas.linkersection.model="http:///LinkerSection.ecore">
|
||||
<sections name="SU">
|
||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="4"/>
|
||||
</sections>
|
||||
<sections name="SI"/>
|
||||
<sections name="R_1"/>
|
||||
<sections name="R_2"/>
|
||||
<sections name="R"/>
|
||||
<sections name="RPFRAM2"/>
|
||||
<sections name="C_PKCS11_STORAGE*">
|
||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1050624"/>
|
||||
</sections>
|
||||
<sections name="C_SYSTEM_CONFIG*">
|
||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="1067008"/>
|
||||
</sections>
|
||||
<sections name="B_ETHERNET_BUFFERS_1">
|
||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="8388608"/>
|
||||
</sections>
|
||||
<sections name="B_RX_DESC_1"/>
|
||||
<sections name="B_TX_DESC_1"/>
|
||||
<sections name="B"/>
|
||||
<sections name="B_1"/>
|
||||
<sections name="B_2"/>
|
||||
<sections name="C_1">
|
||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="4292870144"/>
|
||||
</sections>
|
||||
<sections name="C_2"/>
|
||||
<sections name="C"/>
|
||||
<sections name="C$*"/>
|
||||
<sections name="D*"/>
|
||||
<sections name="W*"/>
|
||||
<sections name="L"/>
|
||||
<sections name="P*"/>
|
||||
<sections name="EXCEPTVECT">
|
||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="4294967168"/>
|
||||
</sections>
|
||||
<sections name="RESETVECT">
|
||||
<sectionAddress xsi:type="com.renesas.linkersection.model:FixedAddress" fixedAddress="4294967292"/>
|
||||
</sections>
|
||||
</com.renesas.linkersection.model:SectionContainer>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user