forked from wolfSSL/wolfssl
Merge pull request #4588 from miyazakh/sce_protect_mode_e2studio
This commit is contained in:
230
IDE/Renesas/e2studio/RA6M4/README.md
Normal file
230
IDE/Renesas/e2studio/RA6M4/README.md
Normal file
@@ -0,0 +1,230 @@
|
||||
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.4.0a|
|
||||
|
||||
#### Selected software components
|
||||
|
||||
|Components|Version|
|
||||
|:--|:--|
|
||||
|Board Support Package Common Files|v3.4.0a|
|
||||
|Secure Cryptography Engine on RA6 Protected Mode|v3.4.0a|
|
||||
|I/O Port|v3.4.0a|
|
||||
|Arm CMSIS Version 5 - Core (M)|v5.7.0+fsp.3.4.0a|
|
||||
|RA6M3G-EK Board Support Files|v3.4.0a|
|
||||
|Board support package for R7FA6M4AF3CFB|v3.4.0a|
|
||||
|Board support package for RA6M4|v3.4.0a|
|
||||
|FreeRTOS|v10.4.3+fsp.3.4.0a|
|
||||
|FreeRTOS - Memory Management - Heap 4|v10.4.3+fsp.3.4.0a|
|
||||
|r_ether to FreeRTOS+TCP Wrapper|v3.4.0a|
|
||||
|Ethernet|v3.4.0.a|
|
||||
|Ethernet PHY|v3.4.0a|
|
||||
|FreeRTOS+TCP|v2.3.2+fsp.3.4.0a|
|
||||
|FreeRTOS - Buffer Allocation 2|v2.3.2+fsp.3.4.0a|
|
||||
|
||||
## 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
|
||||
+ Go to `Stacks` tab
|
||||
+ Add `SCE Protected Mode` stack from `New Stack` -> `Driver` -> `Crypt`
|
||||
+ 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|
|
||||
|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|
|
||||
|
||||
+ Add `Heap 4` stack to sce_tst_thread from `New Stack` -> `FreeRTOS` -> `Memory Management`
|
||||
+ Add `FreeRTOS + TCP` stack to sce_tst_thread from `New Stack` -> `FreeRTOS` -> `Libraries` 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 inside dummy_app 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
|
||||
```
|
||||
$./example/server/server -b -d -i
|
||||
```
|
||||
|
||||
You will see the following message on J-LinK RTT Viewer
|
||||
```
|
||||
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!
|
||||
```
|
||||
|
||||
ECDSA sign and verify use, launch server with the following option
|
||||
```
|
||||
$./examples/server/server -b -d -c ./certs/server-ecc.pem -k ./certs/ecc-key.pem
|
||||
```
|
||||
|
||||
You will see the following message on J-LinK RTT Viewer
|
||||
```
|
||||
cipher : ECDHE-ECDSA-AES128-SHA256
|
||||
Received: I hear you fa shizzle!
|
||||
|
||||
cipher : ECDHE-ECDSA-AES128-GCM-SHA256
|
||||
Received: I hear you fa shizzle!
|
||||
```
|
||||
|
||||
5.) Run the example Client
|
||||
|
||||
**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 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
IDE/Renesas/e2studio/RA6M4/common/user_settings.h
Normal file
80
IDE/Renesas/e2studio/RA6M4/common/user_settings.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
/* 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
|
84
IDE/Renesas/e2studio/RA6M4/common/wolfssl_demo.h
Normal file
84
IDE/Renesas/e2studio/RA6M4/common/wolfssl_demo.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/* wolfssl_demo.h
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifndef WOLFSSL_DEMO_H_
|
||||
#define WOLFSSL_DEMO_H_
|
||||
|
||||
#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 FLASH_HP_DF_BLOCK_1
|
||||
|
||||
/* 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
|
||||
/* Specifiy cipher suites that are supported by SCE
|
||||
* ClientHello specifies the cipher suite to communicate peer Server
|
||||
* so that TLS handshake uses SCE protect mode
|
||||
*/
|
||||
#define TEST_CIPHER_SPECIFIED
|
||||
|
||||
/* 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
|
||||
|
||||
void wolfSSL_TLS_client_init();
|
||||
void wolfSSL_TLS_client();
|
||||
|
||||
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_ */
|
18
IDE/Renesas/e2studio/RA6M4/include.am
Normal file
18
IDE/Renesas/e2studio/RA6M4/include.am
Normal file
@@ -0,0 +1,18 @@
|
||||
# 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/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
|
334
IDE/Renesas/e2studio/RA6M4/test/.cproject
Normal file
334
IDE/Renesas/e2studio/RA6M4/test/.cproject
Normal file
@@ -0,0 +1,334 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="com.renesas.cdt.managedbuild.gnuarm.config.elf.debug.754339324">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.managedbuild.gnuarm.config.elf.debug.754339324" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="${cross_rm} -rf" description="" id="com.renesas.cdt.managedbuild.gnuarm.config.elf.debug.754339324" name="Debug" parent="com.renesas.cdt.managedbuild.gnuarm.config.elf.debug">
|
||||
<folderInfo id="com.renesas.cdt.managedbuild.gnuarm.config.elf.debug.754339324." name="/" resourcePath="">
|
||||
<toolChain id="com.renesas.cdt.managedbuild.gnuarm.toolchain.elf.debug.1286425821" name="GCC ARM Embedded" superClass="com.renesas.cdt.managedbuild.gnuarm.toolchain.elf.debug">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.1544446747" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.1695698036" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting" useByScannerDiscovery="false"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.7274183" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.1791602555" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.more" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.1159672748" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.1858626081" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.1932908896" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.266955822" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.1925997875" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level" useByScannerDiscovery="true"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.2070696244" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format" useByScannerDiscovery="true"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unused.659572399" name="Warn on various unused elements (-Wunused)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unused" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.uninitialized.1163676271" name="Warn on uninitialized variables (-Wuninitialised)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.uninitialized" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.713359148" name="Enable all common warnings (-Wall)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn.1686841151" name="Enable extra warnings (-Wextra)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration.1560928340" name="Warn on undeclared global function (-Wmissing-declaration)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion.2066872415" name="Warn on implicit conversions (-Wconversion)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith.616158495" name="Warn if pointer arithmetic (-Wpointer-arith)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow.763239431" name="Warn if shadowed variable (-Wshadow)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop.280058244" name="Warn if suspicious logical ops (-Wlogical-op)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn.644305041" name="Warn if struct is returned (-Wagreggate-return)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal.178955027" name="Warn if floats are compared as equal (-Wfloat-equal)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.1177346912" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" useByScannerDiscovery="false" value="GNU Tools for ARM Embedded Processors" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1658562819" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.2007288726" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m33" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.1355173081" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.1436314985" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" useByScannerDiscovery="false" value="arm-none-eabi-" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.1433936598" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" useByScannerDiscovery="false" value="gcc" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.268266911" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" useByScannerDiscovery="false" value="g++" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.84507123" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" useByScannerDiscovery="false" value="ar" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.288447021" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" useByScannerDiscovery="false" value="objcopy" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.249865238" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" useByScannerDiscovery="false" value="objdump" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.540651824" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" useByScannerDiscovery="false" value="size" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.463875934" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" useByScannerDiscovery="false" value="make" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.1451087829" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" useByScannerDiscovery="false" value="rm" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.471325724" name="FPU Type" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.fpv5spd16" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.1503256330" name="Float ABI" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.hard" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.811017489" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/test_RA6M4}/Debug" id="com.renesas.cdt.managedbuild.gnuarm.builder.608777168" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.gnuarm.builder"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.2061639686" name="GNU ARM Cross Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.1479290947" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.732220121" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/key_data}""/>
|
||||
<listOptionValue builtIn="false" value=""C:/workspace/hide/workspace/wolfssl-hide/IDE/Renesas/e2studio/RA6M4/common""/>
|
||||
<listOptionValue builtIn="false" value=""C:/workspace/hide/workspace/wolfssl-hide/""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/rm_freertos_port}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/aws/amazon-freertos/freertos_kernel/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/arm/CMSIS_5/CMSIS/Core/Include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_gen}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_cfg/fsp_cfg/bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_cfg/fsp_cfg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_cfg/aws}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/private/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/rm_freertos_plus_tcp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/aws/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_tcp/include}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.2106396416" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_RENESAS_RA_"/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.445679158" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
|
||||
</tool>
|
||||
<tool commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -x c ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1186182340" name="GNU ARM Cross C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.1084991557" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.c99" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.2023903025" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/key_data}""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/../common""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/../../../../../""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/rm_freertos_port}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/aws/amazon-freertos/freertos_kernel/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/arm/CMSIS_5/CMSIS/Core/Include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_gen}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_cfg/fsp_cfg/bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_cfg/fsp_cfg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_cfg/aws}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/private/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/rm_freertos_plus_tcp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/aws/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_tcp/include}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1484044149" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_RENESAS_RA_"/>
|
||||
<listOptionValue builtIn="false" value="WOLFSSL_RENESAS_SCEPROTECT"/>
|
||||
<listOptionValue builtIn="false" value="WOLFSSL_RENESAS_RA6M4"/>
|
||||
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1374024171" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -x c++ ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1709629884" name="GNU ARM Cross C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.37406689" name="GNU ARM Cross C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.1511615197" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano.97181039" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano" useByScannerDiscovery="false" value="false" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.1519365327" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" useByScannerDiscovery="false" value="--specs=rdimon.specs -Wl,--whole-archive -lwolfSSL_RA6M4 -Wl,--no-whole-archive" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.paths.969184986" name="Library search path (-L)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.paths" useByScannerDiscovery="false" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/script}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/Debug}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile.1259114603" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""fsp.ld""/>
|
||||
</option>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.useprintffloat.1068268601" name="Use float with nano printf (-u _printf_float)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.useprintffloat" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input.1193126753" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
<additionalInput kind="additionaldependency" paths="$(LINKER_SCRIPT)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.1154584747" name="GNU ARM Cross C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.1061224485" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.429096750" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""fsp.ld""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.744470136" name="GNU ARM Cross Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.1725499704" name="GNU ARM Cross Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.1726669496" name="Output file format (-O)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.srec" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.177887718" name="GNU ARM Cross Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.871647964" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.415019418" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.1694214938" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.319060752" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.932788298" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.1861978216" name="GNU ARM Cross Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.265275550" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format" useByScannerDiscovery="false"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="src/common|common|port" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/common"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.renesas.cdt.managedbuild.gnuarm.config.elf.release.257280805">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.managedbuild.gnuarm.config.elf.release.257280805" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="${cross_rm} -rf" description="" id="com.renesas.cdt.managedbuild.gnuarm.config.elf.release.257280805" name="Release" parent="com.renesas.cdt.managedbuild.gnuarm.config.elf.release">
|
||||
<folderInfo id="com.renesas.cdt.managedbuild.gnuarm.config.elf.release.257280805." name="/" resourcePath="">
|
||||
<toolChain id="com.renesas.cdt.managedbuild.gnuarm.toolchain.elf.release.284409028" name="GCC ARM Embedded" superClass="com.renesas.cdt.managedbuild.gnuarm.toolchain.elf.release">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.512253254" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting.516691422" name="Create extended listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createlisting"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.1416624320" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.671749623" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.more" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.8413837" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.1878179160" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.1306145613" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.357554314" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.165793267" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.1335761803" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unused.483002883" name="Warn on various unused elements (-Wunused)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unused" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.uninitialized.63074952" name="Warn on uninitialized variables (-Wuninitialised)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.uninitialized" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.66473811" name="Enable all common warnings (-Wall)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn.1782867111" name="Enable extra warnings (-Wextra)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration.964807175" name="Warn on undeclared global function (-Wmissing-declaration)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion.970685256" name="Warn on implicit conversions (-Wconversion)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith.633962632" name="Warn if pointer arithmetic (-Wpointer-arith)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow.1555867993" name="Warn if shadowed variable (-Wshadow)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop.309123046" name="Warn if suspicious logical ops (-Wlogical-op)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn.583023188" name="Warn if struct is returned (-Wagreggate-return)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal.1063751013" name="Warn if floats are compared as equal (-Wfloat-equal)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal" useByScannerDiscovery="true" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.1910016626" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="GNU Tools for ARM Embedded Processors" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.801840864" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.2047222938" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m33" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.2111760464" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.245261797" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" value="arm-none-eabi-" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.1373152617" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.1200304774" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.426241521" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.848913991" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" value="objcopy" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.259787199" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.1843513652" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.431348418" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="make" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.126688639" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="rm" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.1442836615" name="FPU Type" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.fpv5spd16" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.1821706502" name="Float ABI" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.hard" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1380043931" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/test_RA6M4}/Release" id="com.renesas.cdt.managedbuild.gnuarm.builder.874881970" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.gnuarm.builder"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.655483094" name="GNU ARM Cross Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.513875977" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.671461231" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/rm_freertos_port}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/aws/amazon-freertos/freertos_kernel/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/arm/CMSIS_5/CMSIS/Core/Include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_gen}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_cfg/fsp_cfg/bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_cfg/fsp_cfg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_cfg/aws}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/private/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/rm_freertos_plus_tcp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/aws/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_tcp/include}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.264379217" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_RENESAS_RA_"/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.813209146" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
|
||||
</tool>
|
||||
<tool commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -x c ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1411239271" name="GNU ARM Cross C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.485071330" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.c99" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.463046982" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/rm_freertos_port}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/aws/amazon-freertos/freertos_kernel/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/arm/CMSIS_5/CMSIS/Core/Include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_gen}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_cfg/fsp_cfg/bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_cfg/fsp_cfg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra_cfg/aws}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/private/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/fsp/src/rm_freertos_plus_tcp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/ra/aws/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_tcp/include}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1354894423" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_RENESAS_RA_"/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.47241044" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -x c++ ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1920686348" name="GNU ARM Cross C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.1221863252" name="GNU ARM Cross C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.187849976" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano.1378049261" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.380857151" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" useByScannerDiscovery="false" value="--specs=rdimon.specs -Wl,--whole-archive -lwolfSSL_RA6M4 -Wl,--no-whole-archive" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.paths.1801625218" name="Library search path (-L)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/script}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/wolfSSL_RA6M4/Release}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile.706815058" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""fsp.ld""/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input.1151060777" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
<additionalInput kind="additionaldependency" paths="$(LINKER_SCRIPT)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.322260340" name="GNU ARM Cross C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.290822793" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.1828837828" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""fsp.ld""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.42407954" name="GNU ARM Cross Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.109538129" name="GNU ARM Cross Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.550882320" name="Output file format (-O)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice" useByScannerDiscovery="false" value="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.srec" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.1321774651" name="GNU ARM Cross Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.1645728638" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.154890305" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.269660991" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.1691728611" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.1918079950" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.434722260" name="GNU ARM Cross Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.1465757674" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="src/common|common|port" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src/common"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="test_RA6M4.com.renesas.cdt.managedbuild.gnuarm.target.elf.1236020481" name="Executable" projectType="com.renesas.cdt.managedbuild.gnuarm.target.elf"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="com.renesas.cdt.managedbuild.gnuarm.config.elf.debug.754339324;com.renesas.cdt.managedbuild.gnuarm.config.elf.debug.754339324.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1186182340;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1374024171">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.renesas.cdt.managedbuild.gnuarm.config.elf.release.257280805;com.renesas.cdt.managedbuild.gnuarm.config.elf.release.257280805.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1411239271;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.47241044">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
</cproject>
|
49
IDE/Renesas/e2studio/RA6M4/test/.project
Normal file
49
IDE/Renesas/e2studio/RA6M4/test/.project
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>test_RA6M4</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>com.renesas.cdt.ra.contentgen.raExecutableNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>src/benchmark.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/benchmark/benchmark.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/test.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/test/test.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/common/user_settings.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/common/user_settings.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/common/wolfssl_demo.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/common/wolfssl_demo.h</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
20
IDE/Renesas/e2studio/RA6M4/test/key_data/key_data.h
Normal file
20
IDE/Renesas/e2studio/RA6M4/test/key_data/key_data.h
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
IDE/Renesas/e2studio/RA6M4/test/key_data/key_data_sce.c
Normal file
139
IDE/Renesas/e2studio/RA6M4/test/key_data/key_data_sce.c
Normal file
@@ -0,0 +1,139 @@
|
||||
/* key_data.h
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#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[] =
|
||||
{
|
||||
0x07, 0x1A, 0x68, 0xF4, 0x53, 0x2A, 0x9B, 0x1F, 0xF7, 0x7B,
|
||||
0x5C, 0x70, 0x88, 0x46, 0x03, 0x10, 0x35, 0x0C, 0x84, 0x4F,
|
||||
0xDC, 0x09, 0x8D, 0xD8, 0x97, 0x10, 0xFA, 0xC7, 0x1D, 0x7F,
|
||||
0xCC, 0xF2, 0xC9, 0x41, 0x27, 0xBA, 0x0C, 0x93, 0x77, 0x64,
|
||||
0x46, 0x89, 0xC3, 0x36, 0x45, 0x5B, 0x2E, 0xC7, 0xCF, 0xE7,
|
||||
0xDF, 0x61, 0x95, 0x12, 0x7B, 0x9B, 0x6B, 0x8B, 0xD8, 0xBD,
|
||||
0xEA, 0x7B, 0xCD, 0xF9, 0x74, 0xA1, 0x1B, 0x41, 0x91, 0x9D,
|
||||
0xC8, 0x08, 0xBA, 0xA4, 0x69, 0x19, 0xAD, 0xE0, 0x41, 0x54,
|
||||
0xC6, 0x1A, 0x4A, 0x0E, 0xDB, 0x36, 0x23, 0xD9, 0xAC, 0xF6,
|
||||
0x1B, 0x49, 0x6D, 0x74, 0x4D, 0x67, 0x5D, 0x36, 0xB9, 0xED,
|
||||
0xC6, 0x09, 0x25, 0x13, 0x3A, 0x88, 0x3D, 0x83, 0x41, 0x16,
|
||||
0x49, 0x94, 0xC5, 0x24, 0xFC, 0xD4, 0x81, 0xAE, 0x3F, 0x03,
|
||||
0x1D, 0x9D, 0x76, 0x1F, 0x44, 0x1A, 0x91, 0xFB, 0xD7, 0x7E,
|
||||
0xB7, 0x29, 0xA3, 0x73, 0x4D, 0x72, 0x21, 0xE4, 0x70, 0x02,
|
||||
0x6F, 0xBE, 0xE0, 0x73, 0x5F, 0x44, 0x91, 0x34, 0xBC, 0x5B,
|
||||
0x93, 0x27, 0x37, 0x05, 0x48, 0x19, 0x3B, 0x50, 0x19, 0x53,
|
||||
0xC0, 0xE9, 0xA1, 0x1C, 0x26, 0xA5, 0x16, 0x80, 0xE8, 0x61,
|
||||
0x39, 0xFF, 0x8B, 0x52, 0x10, 0xF7, 0x6B, 0x7A, 0x8F, 0xEC,
|
||||
0x95, 0x1B, 0x30, 0xA4, 0xA0, 0xD7, 0xDB, 0x3F, 0xEB, 0xA5,
|
||||
0x74, 0x48, 0xBA, 0x34, 0xB3, 0x34, 0xA5, 0xC1, 0x46, 0x65,
|
||||
0x2E, 0xEA, 0xF1, 0xB9, 0x00, 0xF6, 0x13, 0xC9, 0x15, 0xC6,
|
||||
0xB0, 0x4A, 0x18, 0xA8, 0x10, 0x57, 0xDF, 0x8E, 0x09, 0x67,
|
||||
0xCC, 0xCA, 0x03, 0x15, 0x04, 0x17, 0x0A, 0xAC, 0x47, 0x8F,
|
||||
0x1B, 0x0F, 0x0B, 0x6C, 0x91, 0x98, 0xFF, 0xFD, 0xC5, 0x10,
|
||||
0x3F, 0x0A, 0xE7, 0x5D, 0x48, 0xE1, 0xD9, 0x79, 0xEB, 0xEA,
|
||||
0x8D, 0x03, 0x96, 0x44, 0xB0, 0x0B
|
||||
};
|
||||
|
||||
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[] =
|
||||
{
|
||||
0x07, 0xCA, 0x3B, 0x8F, 0x49, 0x26, 0x33, 0x80, 0x46, 0xFE,
|
||||
0x07, 0x91, 0x75, 0x5B, 0xC3, 0x98, 0x5F, 0x0E, 0x93, 0x0B,
|
||||
0xDF, 0x1B, 0x1B, 0x01, 0x00, 0xD0, 0x5A, 0x48, 0x81, 0x05,
|
||||
0xFC, 0x57, 0xB6, 0x0F, 0xF4, 0x6E, 0x4E, 0x7D, 0xB4, 0x14,
|
||||
0x88, 0xFF, 0x8D, 0x75, 0x7A, 0xF5, 0xDE, 0x7B, 0x74, 0xF0,
|
||||
0x98, 0x0B, 0xE2, 0x7A, 0xCB, 0xF3, 0x41, 0x70, 0xBC, 0xE2,
|
||||
0x07, 0xF7, 0x3D, 0x69, 0xAF, 0xA8, 0xDA, 0xC5, 0x92, 0xAA,
|
||||
0xE6, 0xA6, 0xF9, 0x1A, 0xED, 0x12, 0x76, 0x06, 0x1E, 0x4D,
|
||||
0x43, 0xD9, 0x27, 0xEF, 0x30, 0x3D, 0x07, 0xAF, 0x63, 0x39,
|
||||
0x3F, 0x95, 0x5F, 0xA5, 0x54, 0xFC, 0x26, 0x52, 0xFB, 0xDC,
|
||||
0x8C, 0xA6, 0x64, 0x20, 0x39, 0x35, 0x6A, 0xB9, 0xFD, 0x52,
|
||||
0x81, 0xAE, 0x56, 0x52, 0x61, 0xDD, 0xC0, 0xCE, 0x92, 0x4F,
|
||||
0xEC, 0x0C, 0x72, 0x28, 0x2E, 0x3E, 0xB3, 0x29, 0xAA, 0x8B,
|
||||
0xF1, 0xE9, 0xC7, 0x40, 0x57, 0x3C, 0xF1, 0x5D, 0xA8, 0x43,
|
||||
0x17, 0xDB, 0x6A, 0x88, 0x36, 0x1E, 0x84, 0x88, 0xA4, 0x5D,
|
||||
0x20, 0x64, 0xD5, 0x7D, 0x48, 0x72, 0xF5, 0x1E, 0x50, 0xF7,
|
||||
0xB5, 0x49, 0x07, 0xD3, 0x9C, 0xB8, 0x2C, 0x0E, 0x9D, 0x0E,
|
||||
0x4F, 0xFA, 0xB8, 0xCC, 0x4E, 0x14, 0xFD, 0xC1, 0xA4, 0x8E,
|
||||
0x6F, 0x57, 0xA8, 0x75, 0x29, 0x25, 0xD3, 0x93, 0xD6, 0xF0,
|
||||
0x22, 0xE6, 0x1A, 0x73, 0x51, 0xFA, 0x92, 0x3D, 0x0A, 0x04,
|
||||
0xCB, 0x62, 0x8C, 0x9E, 0x50, 0x65, 0x11, 0x2A, 0xB9, 0xB8,
|
||||
0x8B, 0x5C, 0x86, 0x6C, 0x37, 0x96, 0x5F, 0xEE, 0x50, 0xC0,
|
||||
0x30, 0x9E, 0x54, 0x9E, 0xB5, 0xD8, 0xBB, 0xC5, 0x1B, 0x16,
|
||||
0xB6, 0x54, 0x6B, 0x5E, 0xA4, 0x54, 0xA7, 0x04, 0xB3, 0x30,
|
||||
0x7E, 0xE9, 0xB0, 0xAB, 0x10, 0x95, 0x6C, 0xE5, 0x76, 0x75,
|
||||
0x5B, 0x52, 0xFB, 0x37, 0x4E, 0x23
|
||||
};
|
||||
static const int sizeof_ca_ecc_cert_der_sign = sizeof(ca_ecc_cert_der_sign);
|
||||
#endif /* USE_CERT_BUFFERS_256 */
|
34
IDE/Renesas/e2studio/RA6M4/test/src/SEGGER_RTT/myprint.c
Normal file
34
IDE/Renesas/e2studio/RA6M4/test/src/SEGGER_RTT/myprint.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/* myprintf.c
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#include "SEGGER_RTT.h"
|
||||
|
||||
#define SEGGER_INDEX (0)
|
||||
|
||||
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
IDE/Renesas/e2studio/RA6M4/test/src/common/.gitignore
vendored
Normal file
2
IDE/Renesas/e2studio/RA6M4/test/src/common/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*
|
||||
!.gitignore
|
207
IDE/Renesas/e2studio/RA6M4/test/src/test_main.c
Normal file
207
IDE/Renesas/e2studio/RA6M4/test/src/test_main.c
Normal file
@@ -0,0 +1,207 @@
|
||||
/* test_main.c
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#include "stdio.h"
|
||||
#include "stdint.h"
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/types.h>
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h>
|
||||
User_SCEPKCbInfo guser_PKCbInfo;
|
||||
#endif
|
||||
|
||||
#include <wolfssl_demo.h>
|
||||
#include "key_data.h"
|
||||
#include "hal_data.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
void abort(void);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 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) || defined(TLS_SERVER) || defined(EXTRA_SCE_TSIP_TEST)
|
||||
|
||||
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) || defined(EXTRA_SCE_TSIP_TEST)
|
||||
|
||||
#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);
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT_ECC)
|
||||
guser_PKCbInfo.user_key_id = 0; /* not use user key id */
|
||||
#endif
|
||||
|
||||
#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);
|
||||
|
||||
|
||||
void sce_test(void)
|
||||
{
|
||||
|
||||
#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 "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, 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
|
||||
printf("Start wolfCrypt Benchmark\n");
|
||||
benchmark_test(NULL);
|
||||
printf("End wolfCrypt Benchmark\n");
|
||||
#endif
|
||||
|
||||
#elif defined(TLS_CLIENT)
|
||||
#include "hal_data.h"
|
||||
#include "r_sce.h"
|
||||
|
||||
#if defined(USE_CERT_BUFFERS_256)
|
||||
#if defined(TEST_CIPHER_SPECIFIED)
|
||||
const char* cipherlist[] = {
|
||||
"ECDHE-ECDSA-AES128-SHA256",
|
||||
"ECDHE-ECDSA-AES128-GCM-SHA256"
|
||||
};
|
||||
const int cipherlist_sz = 2;
|
||||
#else
|
||||
const char* cipherlist[] = {
|
||||
NULL
|
||||
};
|
||||
const int cipherlist_sz = 1;
|
||||
#endif /* TEST_CIPHER_SPECIFIED */
|
||||
|
||||
#else
|
||||
#if defined(TEST_CIPHER_SPECIFIED)
|
||||
const char* cipherlist[] = {
|
||||
"AES128-SHA256",
|
||||
"AES256-SHA256",
|
||||
"ECDHE-RSA-AES128-SHA256",
|
||||
"ECDHE-RSA-AES128-GCM-SHA256"
|
||||
};
|
||||
const int cipherlist_sz = 4;
|
||||
#else
|
||||
const char* cipherlist[] = {
|
||||
NULL
|
||||
};
|
||||
const int cipherlist_sz = 1;
|
||||
#endif /* TEST_CIPHER_SPECIFIED */
|
||||
#endif
|
||||
|
||||
int i = 0;
|
||||
|
||||
SetScetlsKey();
|
||||
|
||||
TCPInit();
|
||||
|
||||
do {
|
||||
if(cipherlist_sz > 0 && cipherlist[i] != NULL )
|
||||
printf("cipher : %s\n", cipherlist[i]);
|
||||
|
||||
wolfSSL_TLS_client_init(cipherlist[i]);
|
||||
wolfSSL_TLS_client();
|
||||
|
||||
i++;
|
||||
} while (i < cipherlist_sz);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
void abort(void)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
189
IDE/Renesas/e2studio/RA6M4/test/src/wolf_client.c
Normal file
189
IDE/Renesas/e2studio/RA6M4/test/src/wolf_client.c
Normal file
@@ -0,0 +1,189 @@
|
||||
/* wolf_client.c
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include "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];
|
||||
static WOLFSSL_CTX *client_ctx;
|
||||
|
||||
extern uint8_t g_ether0_mac_address[6];
|
||||
typedef struct user_EccPKCbInfo;
|
||||
extern struct user_PKCbInfo guser_PKCbInfo;
|
||||
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 FR_SOCKET_SUCCESS 0
|
||||
|
||||
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(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_CERT_BUFFERS_256
|
||||
const unsigned char *cert = ca_ecc_cert_der_256;
|
||||
#define SIZEOF_CERT sizeof_ca_ecc_cert_der_256
|
||||
#else
|
||||
const unsigned char *cert = ca_cert_der_2048;
|
||||
#define SIZEOF_CERT sizeof_ca_cert_der_2048
|
||||
#endif
|
||||
#endif
|
||||
|
||||
wolfSSL_Init();
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
/* Create and initialize WOLFSSL_CTX */
|
||||
if ((client_ctx = wolfSSL_CTX_new(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
|
||||
|
||||
/* 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( )
|
||||
{
|
||||
int ret;
|
||||
/* FreeRTOS+TCP Objects */
|
||||
socklen_t xSize = sizeof(struct freertos_sockaddr);
|
||||
xSocket_t xClientSocket = NULL;
|
||||
struct freertos_sockaddr xRemoteAddress;
|
||||
|
||||
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};
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
if((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
printf("ERROR wolfSSL_new: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
/* set callback ctx */
|
||||
wc_sce_set_callback_ctx(ssl, (void*)&guser_PKCbInfo);
|
||||
#endif
|
||||
/* 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);
|
||||
}
|
||||
|
||||
if(wolfSSL_connect(ssl) != SSL_SUCCESS) {
|
||||
printf("ERROR SSL connect: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
if (wolfSSL_write(ssl, sendBuff, strlen(sendBuff)) != strlen(sendBuff)) {
|
||||
printf("ERROR SSL write: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
if ((ret=wolfSSL_read(ssl, rcvBuff, BUFF_SIZE)) < 0) {
|
||||
printf("ERROR SSL read: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
rcvBuff[ret] = '\0' ;
|
||||
printf("Received: %s\n\n", rcvBuff);
|
||||
|
||||
/* frees all data before client termination */
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
wolfSSL_Cleanup();
|
||||
}
|
78
IDE/Renesas/e2studio/RA6M4/test/test_RA6M4Debug.launch
Normal file
78
IDE/Renesas/e2studio/RA6M4/test/test_RA6M4Debug.launch
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>
|
345
IDE/Renesas/e2studio/RA6M4/wolfssl/.cproject
Normal file
345
IDE/Renesas/e2studio/RA6M4/wolfssl/.cproject
Normal file
@@ -0,0 +1,345 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="com.renesas.cdt.managedbuild.gnuarm.config.lib.debug.970500279">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.managedbuild.gnuarm.config.lib.debug.970500279" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings>
|
||||
<externalSetting>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/wolfSSL_RA6M4"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/wolfSSL_RA6M4/Debug"/>
|
||||
<entry flags="RESOLVED" kind="libraryFile" name="wolfSSL_RA6M4" srcPrefixMapping="" srcRootPath=""/>
|
||||
</externalSetting>
|
||||
</externalSettings>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="${cross_rm} -rf" description="" id="com.renesas.cdt.managedbuild.gnuarm.config.lib.debug.970500279" name="Debug" parent="com.renesas.cdt.managedbuild.gnuarm.config.lib.debug">
|
||||
<folderInfo id="com.renesas.cdt.managedbuild.gnuarm.config.lib.debug.970500279." name="/" resourcePath="">
|
||||
<toolChain id="com.renesas.cdt.managedbuild.gnuarm.toolchain.lib.debug.720090130" name="GCC ARM Embedded" superClass="com.renesas.cdt.managedbuild.gnuarm.toolchain.lib.debug">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.372424128" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.more" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.802408439" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.1636222762" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.840275244" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.2057841621" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.246216390" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.1774811485" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unused.1434261464" name="Warn on various unused elements (-Wunused)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unused" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.uninitialized.984091892" name="Warn on uninitialized variables (-Wuninitialised)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.uninitialized" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.590988144" name="Enable all common warnings (-Wall)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn.1570641021" name="Enable extra warnings (-Wextra)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration.415668447" name="Warn on undeclared global function (-Wmissing-declaration)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion.2011452736" name="Warn on implicit conversions (-Wconversion)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith.2107087307" name="Warn if pointer arithmetic (-Wpointer-arith)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow.1305941481" name="Warn if shadowed variable (-Wshadow)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop.817766723" name="Warn if suspicious logical ops (-Wlogical-op)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn.85882412" name="Warn if struct is returned (-Wagreggate-return)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal.203869520" name="Warn if floats are compared as equal (-Wfloat-equal)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.75071511" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m33" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.671544124" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="GNU Tools for ARM Embedded Processors" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.1393349979" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.541770432" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.1547181695" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" value="arm-none-eabi-" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.507997460" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.228888647" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.2038968371" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.780177641" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" value="objcopy" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.1097344279" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.1410703268" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.1822043079" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="make" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.1655998274" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="rm" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.1972808282" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.457535820" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.753333144" name="FPU Type" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.fpv5spd16" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.1176186201" name="Float ABI" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.hard" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1766975825" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/wolfSSL_RA6M4}/Debug" id="com.renesas.cdt.managedbuild.gnuarm.builder.1696106404" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.gnuarm.builder"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.535305377" name="GNU ARM Cross Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.1562659327" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.1992643773" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/rm_freertos_port}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/aws/amazon-freertos/freertos_kernel/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/arm/CMSIS_5/CMSIS/Core/Include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_gen}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_cfg/fsp_cfg/bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_cfg/fsp_cfg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_cfg/aws}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/private/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/rm_freertos_plus_tcp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/aws/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_tcp/include}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.1008320129" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_RENESAS_RA_"/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1332222526" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
|
||||
</tool>
|
||||
<tool commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -x c ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.758673917" name="GNU ARM Cross C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.1771412955" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.c99" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.1577692238" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/../common""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/../../../../../""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/rm_freertos_port}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/aws/amazon-freertos/freertos_kernel/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/arm/CMSIS_5/CMSIS/Core/Include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_gen}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_cfg/fsp_cfg/bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_cfg/fsp_cfg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_cfg/aws}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/private/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/rm_freertos_plus_tcp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/aws/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_tcp/include}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1740279599" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_RENESAS_RA_"/>
|
||||
<listOptionValue builtIn="false" value="WOLFSSL_RENESAS_SCEPROTECT"/>
|
||||
<listOptionValue builtIn="false" value="WOLFSSL_RENESAS_RA6M4"/>
|
||||
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.214105753" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -x c++ ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.764823506" name="GNU ARM Cross C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.std.945817002" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.std.cpp11" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -Wl,--start-group ${INPUTS} -Wl,--end-group" id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.63989951" name="GNU ARM Cross C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.799093294" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.1762892047" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" value="--specs=rdimon.specs" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano.1872465214" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile.458487509" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""fsp.ld""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -Wl,--start-group ${INPUTS} -Wl,--end-group" id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.1469493512" name="GNU ARM Cross C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.476305001" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other.1702949098" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" value="--specs=rdimon.specs" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnano.1209661867" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnano" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.751805377" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""fsp.ld""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.1022207837" name="GNU ARM Cross Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.513431201" name="GNU ARM Cross Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.641873973" name="Output file format (-O)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice" value="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.srec" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.1729201850" name="GNU ARM Cross Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.65754162" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.1282405880" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.1117201524" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.1127205156" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.1518544988" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.861824755" name="GNU ARM Cross Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.149314115" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="ra"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="ra_gen"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
<entry excluding="port" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="wolfCrypt"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="wolfCrypt/port"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="wolfSSL"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
<storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.renesas.cdt.managedbuild.gnuarm.config.lib.release.1000694995">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.managedbuild.gnuarm.config.lib.release.1000694995" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings>
|
||||
<externalSetting>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/wolfSSL_RA6M4"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/wolfSSL_RA6M4/Release"/>
|
||||
<entry flags="RESOLVED" kind="libraryFile" name="wolfSSL_RA6M4" srcPrefixMapping="" srcRootPath=""/>
|
||||
</externalSetting>
|
||||
</externalSettings>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="${cross_rm} -rf" description="" id="com.renesas.cdt.managedbuild.gnuarm.config.lib.release.1000694995" name="Release" parent="com.renesas.cdt.managedbuild.gnuarm.config.lib.release">
|
||||
<folderInfo id="com.renesas.cdt.managedbuild.gnuarm.config.lib.release.1000694995." name="/" resourcePath="">
|
||||
<toolChain id="com.renesas.cdt.managedbuild.gnuarm.toolchain.lib.release.696281500" name="GCC ARM Embedded" superClass="com.renesas.cdt.managedbuild.gnuarm.toolchain.lib.release">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.1092203358" name="Optimization Level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level" value="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.level.more" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength.1655508176" name="Message length (-fmessage-length=0)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.messagelength" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar.1362644435" name="'char' is signed (-fsigned-char)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.signedchar" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections.1646666612" name="Function sections (-ffunction-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.functionsections" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections.1767227279" name="Data sections (-fdata-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.optimization.datasections" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level.1083900009" name="Debug level" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.level"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format.920333675" name="Debug format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.debugging.format"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unused.1153399689" name="Warn on various unused elements (-Wunused)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.unused" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.uninitialized.1526073670" name="Warn on uninitialized variables (-Wuninitialised)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.uninitialized" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn.979841893" name="Enable all common warnings (-Wall)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.allwarn" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn.679047540" name="Enable extra warnings (-Wextra)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.extrawarn" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration.848570858" name="Warn on undeclared global function (-Wmissing-declaration)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.missingdeclaration" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion.1501173791" name="Warn on implicit conversions (-Wconversion)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.conversion" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith.1506335159" name="Warn if pointer arithmetic (-Wpointer-arith)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.pointerarith" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow.563705942" name="Warn if shadowed variable (-Wshadow)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.shadow" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop.1578745722" name="Warn if suspicious logical ops (-Wlogical-op)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.logicalop" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn.500719789" name="Warn if struct is returned (-Wagreggate-return)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.agreggatereturn" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal.269627081" name="Warn if floats are compared as equal (-Wfloat-equal)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.warnings.floatequal" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family.1525979978" name="ARM family" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.family" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.mcpu.cortex-m33" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name.822170067" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.toolchain.name" value="GNU Tools for ARM Embedded Processors" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.456961705" name="Architecture" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.architecture" value="ilg.gnuarmeclipse.managedbuild.cross.option.architecture.arm" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.1663748951" name="Instruction set" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.instructionset.thumb" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix.942756758" name="Prefix" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.prefix" value="arm-none-eabi-" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.c.1527544446" name="C compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.c" value="gcc" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp.884565434" name="C++ compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.cpp" value="g++" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar.980678809" name="Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.ar" value="ar" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy.354847803" name="Hex/Bin converter" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objcopy" value="objcopy" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump.1063077906" name="Listing generator" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.objdump" value="objdump" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.size.1503804889" name="Size command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.size" value="size" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.make.279286942" name="Build command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.make" value="make" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm.235215392" name="Remove command" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.command.rm" value="rm" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash.977555522" name="Create flash image" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.createflash" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize.503835685" name="Print size" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.addtools.printsize" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.464890944" name="FPU Type" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.unit.fpv5spd16" valueType="enumerated"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.2023545035" name="Float ABI" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi" value="ilg.gnuarmeclipse.managedbuild.cross.option.arm.target.fpu.abi.hard" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform.1913516426" isAbstract="false" osList="all" superClass="ilg.gnuarmeclipse.managedbuild.cross.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/wolfSSL_RA6M4}/Release" id="com.renesas.cdt.managedbuild.gnuarm.builder.238824769" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.gnuarm.builder"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.1458313447" name="GNU ARM Cross Assembler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor.1575652994" name="Use preprocessor" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths.817572458" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/rm_freertos_port}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/aws/amazon-freertos/freertos_kernel/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/arm/CMSIS_5/CMSIS/Core/Include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_gen}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_cfg/fsp_cfg/bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_cfg/fsp_cfg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_cfg/aws}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/private/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/rm_freertos_plus_tcp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/aws/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_tcp/include}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs.98883299" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.assembler.defs" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_RENESAS_RA_"/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input.1801561027" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.assembler.input"/>
|
||||
</tool>
|
||||
<tool commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -x c ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1294119565" name="GNU ARM Cross C Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.200096746" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.std.c99" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths.777967105" name="Include paths (-I)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/rm_freertos_port}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/aws/amazon-freertos/freertos_kernel/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/arm/CMSIS_5/CMSIS/Core/Include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_gen}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_cfg/fsp_cfg/bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_cfg/fsp_cfg}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra_cfg/aws}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/api}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/inc/instances}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/r_sce_protected/crypto_procedures_protected/src/sce9/private/inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/fsp/src/rm_freertos_plus_tcp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/ra/aws/amazon-freertos/libraries/freertos_plus/standard/freertos_plus_tcp/include}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs.1403729518" name="Defined symbols (-D)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_RENESAS_RA_"/>
|
||||
</option>
|
||||
<inputType id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1088287076" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} -c ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -x c++ ${INPUTS}" id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler.1823072247" name="GNU ARM Cross C++ Compiler" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.compiler">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.std.527079060" name="Language standard" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.std" useByScannerDiscovery="true" value="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.compiler.std.cpp11" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -Wl,--start-group ${INPUTS} -Wl,--end-group" id="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker.1837136696" name="GNU ARM Cross C Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.c.linker">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections.873352042" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.gcsections" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other.1284777761" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.other" value="--specs=rdimon.specs" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano.2023163014" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.usenewlibnano" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile.978477053" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.c.linker.scriptfile" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""fsp.ld""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool commandLinePattern="${COMMAND} ${cross_toolchain_flags} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} -Wl,--start-group ${INPUTS} -Wl,--end-group" id="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker.957163491" name="GNU ARM Cross C++ Linker" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.cpp.linker">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections.969915022" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other.25916064" name="Other linker flags" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.other" value="--specs=rdimon.specs" valueType="string"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnano.1221976244" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.usenewlibnano" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile.415651152" name="Script files (-T)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.cpp.linker.scriptfile" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""fsp.ld""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver.380386144" name="GNU ARM Cross Archiver" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.archiver"/>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash.849256967" name="GNU ARM Cross Create Flash Image" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createflash">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.770453585" name="Output file format (-O)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice" value="ilg.gnuarmeclipse.managedbuild.cross.option.createflash.choice.srec" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting.446753671" name="GNU ARM Cross Create Listing" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.createlisting">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source.1367793049" name="Display source (--source|-S)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.source" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders.1765701779" name="Display all headers (--all-headers|-x)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.allheaders" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle.625996619" name="Demangle names (--demangle|-C)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.demangle" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers.1175209068" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.linenumbers" value="true" valueType="boolean"/>
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide.523929158" name="Wide lines (--wide|-w)" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.createlisting.wide" value="true" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize.799087256" name="GNU ARM Cross Print Size" superClass="ilg.gnuarmeclipse.managedbuild.cross.tool.printsize">
|
||||
<option id="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format.638667358" name="Size format" superClass="ilg.gnuarmeclipse.managedbuild.cross.option.printsize.format"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="ra"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="ra_gen"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
<entry excluding="port" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="wolfCrypt"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="wolfCrypt/port"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="wolfSSL"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="wolfSSL_RA6M4.com.renesas.cdt.managedbuild.gnuarm.target.lib.48962166" name="Static Library" projectType="com.renesas.cdt.managedbuild.gnuarm.target.lib"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="com.renesas.cdt.managedbuild.gnuarm.config.lib.debug.970500279;com.renesas.cdt.managedbuild.gnuarm.config.lib.debug.970500279.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.758673917;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.214105753">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.renesas.cdt.managedbuild.gnuarm.config.lib.release.1000694995;com.renesas.cdt.managedbuild.gnuarm.config.lib.release.1000694995.;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.1294119565;ilg.gnuarmeclipse.managedbuild.cross.tool.c.compiler.input.1088287076">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/wolfSSL_RA6M4"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/wolfSSL_RA6M4"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
</cproject>
|
430
IDE/Renesas/e2studio/RA6M4/wolfssl/.project
Normal file
430
IDE/Renesas/e2studio/RA6M4/wolfssl/.project
Normal file
@@ -0,0 +1,430 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>wolfSSL_RA6M4</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.renesas.cdt.ddsc.contentgen.ddscBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.renesas.cdt.ddsc.contentgen.ddscInterlockBundleBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
<nature>com.renesas.cdt.ddsc.contentgen.ddscNature</nature>
|
||||
<nature>com.renesas.cdt.ra.contentgen.raNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>wolfCrypt/aes.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/aes.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/arc4.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/arc4.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/asm.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/asm.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/asn.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/asn.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/blake2b.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/blake2b.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/camellia.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/camellia.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/chacha.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/chacha.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/chacha20_poly1305.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/chacha20_poly1305.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/cmac.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/cmac.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/coding.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/coding.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/compress.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/compress.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/cpuid.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/cpuid.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/cryptocb.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/cryptocb.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/curve25519.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/curve25519.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/des3.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/des3.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/dh.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/dh.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/dsa.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/dsa.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/ecc.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/ecc.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/ecc_fp.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/ecc_fp.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/ed25519.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/ed25519.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/error.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/error.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/fe_low_mem.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/fe_low_mem.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/fe_operations.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/fe_operations.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/ge_low_mem.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/ge_low_mem.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/ge_operations.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/ge_operations.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/hash.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/hash.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/hc128.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/hc128.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/hmac.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/hmac.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/idea.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/idea.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/integer.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/integer.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/kdf.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/kdf.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/logging.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/logging.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/md2.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/md2.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/md4.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/md4.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/md5.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/md5.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/memory.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/memory.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/pkcs12.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/pkcs12.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/pkcs7.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/pkcs7.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/poly1305.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/poly1305.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/pwdbased.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/pwdbased.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/rabbit.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/rabbit.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/random.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/random.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/rsa.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/rsa.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/sha.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sha.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/sha256.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sha256.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/sha3.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sha3.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/sha512.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sha512.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/signature.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/signature.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/sp_arm32.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_arm32.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/sp_arm64.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_arm64.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/sp_armthumb.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_armthumb.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/sp_c32.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_c32.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/sp_c64.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_c64.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/sp_cortexm.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_cortexm.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/sp_dsp32.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_dsp32.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/sp_int.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_int.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/sp_x86_64.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_x86_64.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/srp.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/srp.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/tfm.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/tfm.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/wc_dsp.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/wc_dsp.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/wc_encrypt.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/wc_encrypt.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/wc_pkcs11.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/wc_pkcs11.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/wc_port.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/wc_port.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/wolfevent.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/wolfevent.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/wolfmath.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/wolfmath.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfSSL/crl.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/crl.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfSSL/internal.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/internal.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfSSL/keys.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/keys.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfSSL/ocsp.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/ocsp.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfSSL/sniffer.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/sniffer.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfSSL/ssl.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/ssl.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfSSL/tls.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/tls.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfSSL/tls13.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/tls13.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfSSL/wolfio.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/wolfio.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/port/renesas_common.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_common.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/port/renesas_sce_aes.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_sce_aes.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/port/renesas_sce_sha.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_sce_sha.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfCrypt/port/renesas_sce_util.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_sce_util.c</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
@@ -31,6 +31,7 @@ include IDE/Renesas/e2studio/Projects/include.am
|
||||
include IDE/Renesas/e2studio/RA6M3/include.am
|
||||
include IDE/Renesas/e2studio/GR-ROSE/include.am
|
||||
include IDE/Renesas/e2studio/RX72NEnvisionKit/include.am
|
||||
include IDE/Renesas/e2studio/RA6M4/include.am
|
||||
include IDE/WICED-STUDIO/include.am
|
||||
include IDE/CRYPTOCELL/include.am
|
||||
include IDE/M68K/include.am
|
||||
|
119
src/internal.c
119
src/internal.c
@@ -225,6 +225,10 @@ static int SSL_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz,
|
||||
int tsip_generatePremasterSecret();
|
||||
int tsip_generateEncryptPreMasterSecret(WOLFSSL *ssl, byte *out, word32 *outSz);
|
||||
#endif
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas_cmn.h>
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_EXTRA) && defined(HAVE_SECRET_CALLBACK)
|
||||
|
||||
static int SessionSecret_callback(WOLFSSL* ssl, void* secret,
|
||||
@@ -1817,7 +1821,11 @@ int wolfSSL_session_import_internal(WOLFSSL* ssl, const unsigned char* buf,
|
||||
/* set hmac function to use when verifying */
|
||||
if (ssl->options.tls == 1 || ssl->options.tls1_1 == 1 ||
|
||||
ssl->options.dtls == 1) {
|
||||
#if !defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
ssl->hmac = TLS_hmac;
|
||||
#else
|
||||
ssl->hmac = Renesas_cmn_TLS_hmac;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* do not allow stream ciphers with DTLS, except for NULL cipher */
|
||||
@@ -4298,6 +4306,7 @@ int RsaVerify(WOLFSSL* ssl, byte* in, word32 inSz, byte** out, int sigAlgo,
|
||||
int hashAlgo, RsaKey* key, buffer* keyBufInfo)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifdef HAVE_PK_CALLBACKS
|
||||
const byte* keyBuf = NULL;
|
||||
word32 keySz = 0;
|
||||
@@ -4348,7 +4357,11 @@ int RsaVerify(WOLFSSL* ssl, byte* in, word32 inSz, byte** out, int sigAlgo,
|
||||
void* ctx = wolfSSL_GetRsaVerifyCtx(ssl);
|
||||
ret = ssl->ctx->RsaVerifyCb(ssl, in, inSz, out, keyBuf, keySz, ctx);
|
||||
}
|
||||
#if !defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
else
|
||||
#else
|
||||
if (!ssl->ctx->RsaVerifyCb || ret == CRYPTOCB_UNAVAILABLE)
|
||||
#endif
|
||||
#endif /*HAVE_PK_CALLBACKS */
|
||||
{
|
||||
ret = wc_RsaSSL_VerifyInline(in, inSz, out, key);
|
||||
@@ -4593,7 +4606,11 @@ int RsaEnc(WOLFSSL* ssl, const byte* in, word32 inSz, byte* out, word32* outSz,
|
||||
void* ctx = wolfSSL_GetRsaEncCtx(ssl);
|
||||
ret = ssl->ctx->RsaEncCb(ssl, in, inSz, out, outSz, keyBuf, keySz, ctx);
|
||||
}
|
||||
#if !defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
else
|
||||
#else
|
||||
if (!ssl->ctx->RsaEncCb || ret == CRYPTOCB_UNAVAILABLE)
|
||||
#endif
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
{
|
||||
ret = wc_RsaPublicEncrypt(in, inSz, out, *outSz, key, ssl->rng);
|
||||
@@ -4707,7 +4724,11 @@ int EccVerify(WOLFSSL* ssl, const byte* in, word32 inSz, const byte* out,
|
||||
ret = ssl->ctx->EccVerifyCb(ssl, in, inSz, out, outSz, keyBuf, keySz,
|
||||
&ssl->eccVerifyRes, ctx);
|
||||
}
|
||||
#if !defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
else
|
||||
#else
|
||||
if (!ssl->ctx->EccVerifyCb || ret == CRYPTOCB_UNAVAILABLE)
|
||||
#endif
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
{
|
||||
ret = wc_ecc_verify_hash(in, inSz, out, outSz, &ssl->eccVerifyRes, key);
|
||||
@@ -6375,7 +6396,11 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
|
||||
#ifndef NO_OLD_TLS
|
||||
ssl->hmac = SSL_hmac; /* default to SSLv3 */
|
||||
#elif !defined(WOLFSSL_NO_TLS12)
|
||||
#if !defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
ssl->hmac = TLS_hmac;
|
||||
#else
|
||||
ssl->hmac = Renesas_cmn_TLS_hmac;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -7029,8 +7054,8 @@ void SSL_ResourceFree(WOLFSSL* ssl)
|
||||
FreeKey(ssl, DYNAMIC_TYPE_RSA, (void**)&ssl->peerRsaKey);
|
||||
ssl->peerRsaKeyPresent = 0;
|
||||
#endif
|
||||
#ifdef WOLFSSL_RENESAS_TSIP_TLS
|
||||
XFREE(ssl->peerTsipEncRsaKeyIndex, ssl->heap, DYNAMIC_TYPE_RSA);
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
XFREE(ssl->peerSceTsipEncRsaKeyIndex, ssl->heap, DYNAMIC_TYPE_RSA);
|
||||
#endif
|
||||
if (ssl->buffers.inputBuffer.dynamicFlag)
|
||||
ShrinkInputBuffer(ssl, FORCED_FREE);
|
||||
@@ -11044,17 +11069,31 @@ int InitSigPkCb(WOLFSSL* ssl, SignatureCtx* sigCtx)
|
||||
|
||||
/* only setup the verify callback if a PK is set */
|
||||
#ifdef HAVE_ECC
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
sigCtx->pkCbEcc = Renesas_cmn_SigPkCbEccVerify;
|
||||
sigCtx->pkCtxEcc = (void*)&sigCtx->CertAtt;
|
||||
(void)SigPkCbEccVerify;
|
||||
#else
|
||||
if (ssl->ctx->EccVerifyCb) {
|
||||
sigCtx->pkCbEcc = SigPkCbEccVerify;
|
||||
sigCtx->pkCtxEcc = ssl;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#ifndef NO_RSA
|
||||
/* only setup the verify callback if a PK is set */
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
sigCtx->pkCbRsa = Renesas_cmn_SigPkCbRsaVerify;
|
||||
sigCtx->pkCtxRsa = (void*)&sigCtx->CertAtt;
|
||||
(void)SigPkCbRsaVerify;
|
||||
#else
|
||||
if (ssl->ctx->RsaVerifyCb) {
|
||||
sigCtx->pkCbRsa = SigPkCbRsaVerify;
|
||||
sigCtx->pkCtxRsa = ssl;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
@@ -12783,21 +12822,22 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
||||
}
|
||||
else {
|
||||
ssl->peerRsaKeyPresent = 1;
|
||||
#ifdef WOLFSSL_RENESAS_TSIP_TLS
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || \
|
||||
defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
/* copy encrypted tsip key index into ssl object */
|
||||
if (args->dCert->tsip_encRsaKeyIdx) {
|
||||
if (!ssl->peerTsipEncRsaKeyIndex) {
|
||||
ssl->peerTsipEncRsaKeyIndex = (byte*)XMALLOC(
|
||||
if (args->dCert->sce_tsip_encRsaKeyIdx) {
|
||||
if (!ssl->peerSceTsipEncRsaKeyIndex) {
|
||||
ssl->peerSceTsipEncRsaKeyIndex = (byte*)XMALLOC(
|
||||
TSIP_TLS_ENCPUBKEY_SZ_BY_CERTVRFY,
|
||||
ssl->heap, DYNAMIC_TYPE_RSA);
|
||||
if (!ssl->peerTsipEncRsaKeyIndex) {
|
||||
if (!ssl->peerSceTsipEncRsaKeyIndex) {
|
||||
args->lastErr = MEMORY_E;
|
||||
goto exit_ppc;
|
||||
}
|
||||
}
|
||||
|
||||
XMEMCPY(ssl->peerTsipEncRsaKeyIndex,
|
||||
args->dCert->tsip_encRsaKeyIdx,
|
||||
XMEMCPY(ssl->peerSceTsipEncRsaKeyIndex,
|
||||
args->dCert->sce_tsip_encRsaKeyIdx,
|
||||
TSIP_TLS_ENCPUBKEY_SZ_BY_CERTVRFY);
|
||||
}
|
||||
#endif
|
||||
@@ -12846,7 +12886,24 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
||||
{
|
||||
int keyRet = 0;
|
||||
word32 idx = 0;
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
/* copy encrypted tsip/sce key index into ssl object */
|
||||
if (args->dCert->sce_tsip_encRsaKeyIdx) {
|
||||
if (!ssl->peerSceTsipEncRsaKeyIndex) {
|
||||
ssl->peerSceTsipEncRsaKeyIndex = (byte*)XMALLOC(
|
||||
TSIP_TLS_ENCPUBKEY_SZ_BY_CERTVRFY,
|
||||
ssl->heap, DYNAMIC_TYPE_RSA);
|
||||
if (!ssl->peerSceTsipEncRsaKeyIndex) {
|
||||
args->lastErr = MEMORY_E;
|
||||
ERROR_OUT(MEMORY_ERROR, exit_ppc);
|
||||
}
|
||||
}
|
||||
|
||||
XMEMCPY(ssl->peerSceTsipEncRsaKeyIndex,
|
||||
args->dCert->sce_tsip_encRsaKeyIdx,
|
||||
TSIP_TLS_ENCPUBKEY_SZ_BY_CERTVRFY);
|
||||
}
|
||||
#endif
|
||||
if (ssl->peerEccDsaKey == NULL) {
|
||||
/* alloc/init on demand */
|
||||
keyRet = AllocKey(ssl, DYNAMIC_TYPE_ECC,
|
||||
@@ -12865,6 +12922,7 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
||||
}
|
||||
else {
|
||||
ssl->peerEccDsaKeyPresent = 1;
|
||||
|
||||
#ifdef HAVE_PK_CALLBACKS
|
||||
if (ssl->buffers.peerEccDsaKey.buffer)
|
||||
XFREE(ssl->buffers.peerEccDsaKey.buffer,
|
||||
@@ -16652,6 +16710,19 @@ static WC_INLINE int VerifyMac(WOLFSSL* ssl, const byte* input, word32 msgSz,
|
||||
padByte = 1;
|
||||
|
||||
if (ssl->options.tls) {
|
||||
#if !defined(NO_CERTS) && defined(HAVE_PK_CALLBACKS)
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
if(ssl->ctx->VerifyMacCb) {
|
||||
void* ctx = wolfSSL_GetVerifyMacCtx(ssl);
|
||||
ret = ssl->ctx->VerifyMacCb(ssl, input,
|
||||
(msgSz - ivExtra) - digestSz - pad - 1,
|
||||
digestSz, content, ctx);
|
||||
if (ret != 0 && ret != PROTOCOLCB_UNAVAILABLE) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
if (!ssl->ctx->VerifyMacCb || ret == PROTOCOLCB_UNAVAILABLE)
|
||||
#endif
|
||||
ret = TimingPadVerify(ssl, input, pad, digestSz, msgSz - ivExtra,
|
||||
content);
|
||||
if (ret != 0)
|
||||
@@ -24867,6 +24938,14 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
|
||||
#endif
|
||||
case rsa_sa_algo:
|
||||
{
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT) && \
|
||||
defined(WOLFSSL_RENESAS_SCEPROTECT_ECC)
|
||||
/* already checked signature result by SCE */
|
||||
/* skip the sign checks below */
|
||||
if (Renesas_cmn_usable(ssl, 0)) {
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
if (IsAtLeastTLSv1_2(ssl)) {
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
byte* encodedSig;
|
||||
@@ -25330,6 +25409,16 @@ int SendClientKeyExchange(WOLFSSL* ssl)
|
||||
#ifndef NO_RSA
|
||||
case rsa_kea:
|
||||
{
|
||||
#if defined(HAVE_PK_CALLBACKS)
|
||||
if (ssl->ctx->GenPreMasterCb) {
|
||||
void* ctx = wolfSSL_GetGenPreMasterCtx(ssl);
|
||||
ret = ssl->ctx->GenPreMasterCb(ssl, ssl->arrays->preMasterSecret, ENCRYPT_LEN, ctx);
|
||||
if (ret != 0 && ret != PROTOCOLCB_UNAVAILABLE) {
|
||||
goto exit_scke;
|
||||
}
|
||||
}
|
||||
if (!ssl->ctx->GenPreMasterCb || ret == PROTOCOLCB_UNAVAILABLE) {
|
||||
#endif
|
||||
/* build PreMasterSecret with RNG data */
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
|
||||
@@ -25342,19 +25431,21 @@ int SendClientKeyExchange(WOLFSSL* ssl)
|
||||
ret = wc_RNG_GenerateBlock(ssl->rng,
|
||||
&ssl->arrays->preMasterSecret[VERSION_SZ],
|
||||
SECRET_LEN - VERSION_SZ);
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
|
||||
#if (defined(WOLFSSL_RENESAS_TSIP_TLS) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION))
|
||||
}
|
||||
#endif
|
||||
if (ret != 0) {
|
||||
goto exit_scke;
|
||||
}
|
||||
|
||||
|
||||
ssl->arrays->preMasterSecret[0] = ssl->chVersion.major;
|
||||
ssl->arrays->preMasterSecret[1] = ssl->chVersion.minor;
|
||||
|
||||
ssl->arrays->preMasterSz = SECRET_LEN;
|
||||
|
||||
ssl->arrays->preMasterSz = SECRET_LEN;
|
||||
#if defined(HAVE_PK_CALLBACKS)
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
#endif /* !NO_RSA */
|
||||
|
26
src/keys.c
26
src/keys.c
@@ -42,6 +42,11 @@
|
||||
!defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
|
||||
int tsip_useable(const WOLFSSL *ssl);
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas_cmn.h>
|
||||
#endif
|
||||
|
||||
int SetCipherSpecs(WOLFSSL* ssl)
|
||||
{
|
||||
#ifndef NO_WOLFSSL_CLIENT
|
||||
@@ -2101,7 +2106,11 @@ int SetCipherSpecs(WOLFSSL* ssl)
|
||||
#ifndef NO_TLS
|
||||
ssl->options.tls = 1;
|
||||
#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_AEAD_ONLY)
|
||||
#if !defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
ssl->hmac = TLS_hmac;
|
||||
#else
|
||||
ssl->hmac = Renesas_cmn_TLS_hmac;
|
||||
#endif
|
||||
#endif
|
||||
if (ssl->version.minor >= 2) {
|
||||
ssl->options.tls1_1 = 1;
|
||||
@@ -2118,7 +2127,11 @@ int SetCipherSpecs(WOLFSSL* ssl)
|
||||
|
||||
#if defined(WOLFSSL_DTLS) && !defined(WOLFSSL_AEAD_ONLY)
|
||||
if (ssl->options.dtls)
|
||||
#if !defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
ssl->hmac = TLS_hmac;
|
||||
#else
|
||||
ssl->hmac = Renesas_cmn_TLS_hmac;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
@@ -3096,13 +3109,22 @@ int SetKeysSide(WOLFSSL* ssl, enum encrypt_side side)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
|
||||
#if (defined(WOLFSSL_RENESAS_TSIP_TLS) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION))
|
||||
/* check if keys for TSIP has been created */
|
||||
if (tsip_useable(ssl) == 1)
|
||||
ret = 0;
|
||||
else
|
||||
#endif
|
||||
|
||||
#if !defined(NO_CERTS) && defined(HAVE_PK_CALLBACKS)
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
if (ssl->ctx->EncryptKeysCb) {
|
||||
void* ctx = wolfSSL_GetEncryptKeysCtx(ssl);
|
||||
ret = ssl->ctx->EncryptKeysCb(ssl, ctx);
|
||||
}
|
||||
if (!ssl->ctx->EncryptKeysCb || ret == PROTOCOLCB_UNAVAILABLE)
|
||||
#endif
|
||||
ret = SetKeys(wc_encrypt, wc_decrypt, keys, &ssl->specs, ssl->options.side,
|
||||
ssl->heap, ssl->devId, ssl->rng, ssl->options.tls1_3);
|
||||
|
||||
|
159
src/ssl.c
159
src/ssl.c
@@ -238,13 +238,8 @@ const WOLF_EC_NIST_NAME kNistCurves[] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
|
||||
/* for root ca verification */
|
||||
int tsip_tls_RootCertVerify(const byte *cert, word32 cert_len,
|
||||
word32 key_n_start, word32 key_n_len,
|
||||
word32 key_e_start, word32 key_e_len,
|
||||
word32 cm_row);
|
||||
byte tsip_rootCAverified( );
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas_cmn.h>
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_SESSION_EXPORT
|
||||
@@ -4998,7 +4993,7 @@ int AddCA(WOLFSSL_CERT_MANAGER* cm, DerBuffer** pDer, int type, int verify)
|
||||
FreeSigner(signer, cm->heap);
|
||||
}
|
||||
}
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
/* Verify CA by TSIP so that generated tsip key is going to be able to */
|
||||
/* be used for peer's cert verification */
|
||||
/* TSIP is only able to handle USER CA, and only one CA. */
|
||||
@@ -5006,18 +5001,21 @@ int AddCA(WOLFSSL_CERT_MANAGER* cm, DerBuffer** pDer, int type, int verify)
|
||||
/* verified CA. */
|
||||
if ( ret == 0 && signer != NULL ) {
|
||||
signer->cm_idx = row;
|
||||
if (type == WOLFSSL_USER_CA && tsip_rootCAverified() == 0 ) {
|
||||
if ((ret = tsip_tls_RootCertVerify(cert->source, cert->maxIdx,
|
||||
cert->sigCtx.pubkey_n_start, cert->sigCtx.pubkey_n_len - 1,
|
||||
cert->sigCtx.pubkey_e_start, cert->sigCtx.pubkey_e_len - 1,
|
||||
if (type == WOLFSSL_USER_CA) {
|
||||
if ((ret = wc_Renesas_cmn_RootCertVerify(cert->source, cert->maxIdx,
|
||||
cert->sigCtx.CertAtt.pubkey_n_start,
|
||||
cert->sigCtx.CertAtt.pubkey_n_len - 1,
|
||||
cert->sigCtx.CertAtt.pubkey_e_start,
|
||||
cert->sigCtx.CertAtt.pubkey_e_len - 1,
|
||||
row/* cm index */))
|
||||
!= 0)
|
||||
WOLFSSL_MSG("tsip_tls_RootCertVerify() failed");
|
||||
< 0)
|
||||
WOLFSSL_MSG("Renesas_RootCertVerify() failed");
|
||||
else
|
||||
WOLFSSL_MSG("tsip_tls_RootCertVerify() succeed");
|
||||
WOLFSSL_MSG("Renesas_RootCertVerify() succeed or skipped");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif /* TSIP or SCE */
|
||||
|
||||
WOLFSSL_MSG("\tFreeing Parsed CA");
|
||||
FreeDecodedCert(cert);
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
@@ -41978,6 +41976,135 @@ void* wolfSSL_GetRsaDecCtx(WOLFSSL* ssl)
|
||||
}
|
||||
#endif /* NO_RSA */
|
||||
|
||||
/* callback for premaster secret generation */
|
||||
void wolfSSL_CTX_SetGenPreMasterCb(WOLFSSL_CTX* ctx, CallbackGenPreMaster cb)
|
||||
{
|
||||
if (ctx)
|
||||
ctx->GenPreMasterCb = cb;
|
||||
}
|
||||
/* Set premaster secret generation callback context */
|
||||
void wolfSSL_SetGenPreMasterCtx(WOLFSSL* ssl, void *ctx)
|
||||
{
|
||||
if (ssl)
|
||||
ssl->GenPreMasterCtx = ctx;
|
||||
}
|
||||
/* Get premaster secret generation callback context */
|
||||
void* wolfSSL_GetGenPreMasterCtx(WOLFSSL* ssl)
|
||||
{
|
||||
if (ssl)
|
||||
return ssl->GenPreMasterCtx;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* callback for master secret generation */
|
||||
void wolfSSL_CTX_SetGenMasterSecretCb(WOLFSSL_CTX* ctx, CallbackGenMasterSecret cb)
|
||||
{
|
||||
if (ctx)
|
||||
ctx->GenMasterCb = cb;
|
||||
}
|
||||
/* Set master secret generation callback context */
|
||||
void wolfSSL_SetGenMasterSecretCtx(WOLFSSL* ssl, void *ctx)
|
||||
{
|
||||
if (ssl)
|
||||
ssl->GenMasterCtx = ctx;
|
||||
}
|
||||
/* Get master secret generation callback context */
|
||||
void* wolfSSL_GetGenMasterSecretCtx(WOLFSSL* ssl)
|
||||
{
|
||||
if (ssl)
|
||||
return ssl->GenMasterCtx;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* callback for session key generation */
|
||||
void wolfSSL_CTX_SetGenSessionKeyCb(WOLFSSL_CTX* ctx, CallbackGenSessionKey cb)
|
||||
{
|
||||
if (ctx)
|
||||
ctx->GenSessionKeyCb = cb;
|
||||
}
|
||||
/* Set sesssion key generation callback context */
|
||||
void wolfSSL_SetGenSessionKeyCtx(WOLFSSL* ssl, void *ctx)
|
||||
{
|
||||
if (ssl)
|
||||
ssl->GenSessionKeyCtx = ctx;
|
||||
}
|
||||
/* Get sesssion key generation callback context */
|
||||
void* wolfSSL_GetGenSessionKeyCtx(WOLFSSL* ssl)
|
||||
{
|
||||
if (ssl)
|
||||
return ssl->GenSessionKeyCtx;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* callback for setting encryption keys */
|
||||
void wolfSSL_CTX_SetEncryptKeysCb(WOLFSSL_CTX* ctx, CallbackEncryptKeys cb)
|
||||
{
|
||||
if (ctx)
|
||||
ctx->EncryptKeysCb = cb;
|
||||
}
|
||||
/* Set encryption keys callback context */
|
||||
void wolfSSL_SetEncryptKeysCtx(WOLFSSL* ssl, void *ctx)
|
||||
{
|
||||
if (ssl)
|
||||
ssl->EncryptKeysCtx = ctx;
|
||||
}
|
||||
/* Get encryption keys callback context */
|
||||
void* wolfSSL_GetEncryptKeysCtx(WOLFSSL* ssl)
|
||||
{
|
||||
if (ssl)
|
||||
return ssl->EncryptKeysCtx;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* callback for Tls finished */
|
||||
/* the callback can be used to build TLS Finished message if enabled */
|
||||
void wolfSSL_CTX_SetTlsFinishedCb(WOLFSSL_CTX* ctx, CallbackTlsFinished cb)
|
||||
{
|
||||
if (ctx)
|
||||
ctx->TlsFinishedCb = cb;
|
||||
}
|
||||
/* Set Tls finished callback context */
|
||||
void wolfSSL_SetTlsFinishedCtx(WOLFSSL* ssl, void *ctx)
|
||||
{
|
||||
if (ssl)
|
||||
ssl->TlsFinishedCtx = ctx;
|
||||
}
|
||||
/* Get Tls finished callback context */
|
||||
void* wolfSSL_GetTlsFinishedCtx(WOLFSSL* ssl)
|
||||
{
|
||||
if (ssl)
|
||||
return ssl->TlsFinishedCtx;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_AEAD_ONLY)
|
||||
/* callback for verify data */
|
||||
void wolfSSL_CTX_SetVerifyMacCb(WOLFSSL_CTX* ctx, CallbackVerifyMac cb)
|
||||
{
|
||||
if (ctx)
|
||||
ctx->VerifyMacCb = cb;
|
||||
}
|
||||
|
||||
/* Set set keys callback context */
|
||||
void wolfSSL_SetVerifyMacCtx(WOLFSSL* ssl, void *ctx)
|
||||
{
|
||||
if (ssl)
|
||||
ssl->VerifyMacCtx = ctx;
|
||||
}
|
||||
/* Get set keys callback context */
|
||||
void* wolfSSL_GetVerifyMacCtx(WOLFSSL* ssl)
|
||||
{
|
||||
if (ssl)
|
||||
return ssl->VerifyMacCtx;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif /* !WOLFSSL_NO_TLS12 && !WOLFSSL_AEAD_ONLY */
|
||||
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
#endif /* NO_CERTS */
|
||||
|
||||
|
31
src/tls.c
31
src/tls.c
@@ -210,6 +210,14 @@ int BuildTlsFinished(WOLFSSL* ssl, Hashes* hashes, const byte* sender)
|
||||
side = tls_server;
|
||||
|
||||
#ifdef WOLFSSL_HAVE_PRF
|
||||
#if !defined(NO_CERTS) && defined(HAVE_PK_CALLBACKS)
|
||||
if (ssl->ctx->TlsFinishedCb) {
|
||||
void* ctx = wolfSSL_GetTlsFinishedCtx(ssl);
|
||||
ret = ssl->ctx->TlsFinishedCb(ssl, side, handshake_hash,
|
||||
(byte*)hashes, ctx);
|
||||
}
|
||||
if (!ssl->ctx->TlsFinishedCb || ret == PROTOCOLCB_UNAVAILABLE)
|
||||
#endif
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
|
||||
if (tsip_useable(ssl)) {
|
||||
@@ -393,15 +401,23 @@ int DeriveTlsKeys(WOLFSSL* ssl)
|
||||
ret = tsip_generateSeesionKey(ssl);
|
||||
else {
|
||||
#endif
|
||||
ret = _DeriveTlsKeys(key_dig, key_dig_len,
|
||||
#if !defined(NO_CERTS) && defined(HAVE_PK_CALLBACKS)
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
if (ssl->ctx->GenSessionKeyCb) {
|
||||
void* ctx = wolfSSL_GetGenSessionKeyCtx(ssl);
|
||||
ret = ssl->ctx->GenSessionKeyCb(ssl, ctx);
|
||||
}
|
||||
if (!ssl->ctx->GenSessionKeyCb || ret == PROTOCOLCB_UNAVAILABLE)
|
||||
#endif
|
||||
ret = _DeriveTlsKeys(key_dig, key_dig_len,
|
||||
ssl->arrays->masterSecret, SECRET_LEN,
|
||||
ssl->arrays->serverRandom, ssl->arrays->clientRandom,
|
||||
IsAtLeastTLSv1_2(ssl), ssl->specs.mac_algorithm,
|
||||
ssl->heap, ssl->devId);
|
||||
if (ret == 0)
|
||||
ret = StoreKeys(ssl, key_dig, PROVISION_CLIENT_SERVER);
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
|
||||
#if (defined(WOLFSSL_RENESAS_TSIP_TLS) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION))
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -576,6 +592,14 @@ int MakeTlsMasterSecret(WOLFSSL* ssl)
|
||||
|
||||
#endif
|
||||
} else
|
||||
#endif
|
||||
#if !defined(NO_CERTS) && defined(HAVE_PK_CALLBACKS)
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
if (ssl->ctx->GenMasterCb) {
|
||||
void* ctx = wolfSSL_GetGenMasterSecretCtx(ssl);
|
||||
ret = ssl->ctx->GenMasterCb(ssl, ctx);
|
||||
}
|
||||
if (!ssl->ctx->GenMasterCb || ret == PROTOCOLCB_UNAVAILABLE)
|
||||
#endif
|
||||
ret = _MakeTlsMasterSecret(ssl->arrays->masterSecret, SECRET_LEN,
|
||||
ssl->arrays->preMasterSecret, ssl->arrays->preMasterSz,
|
||||
@@ -1196,6 +1220,7 @@ int TLS_hmac(WOLFSSL* ssl, byte* digest, const byte* in, word32 sz, int padSz,
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = wc_HmacInit(&hmac, ssl->heap, ssl->devId);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
@@ -215,6 +215,9 @@
|
||||
#ifdef HAVE_CAVIUM_OCTEON_SYNC
|
||||
#include <wolfssl/wolfcrypt/port/cavium/cavium_octeon_sync.h>
|
||||
#endif
|
||||
#ifdef HAVE_RENESAS_SYNC
|
||||
#include <wolfssl/wolfcrypt/port/renesas/renesas_sync.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
@@ -1452,6 +1455,12 @@ static void* benchmarks_do(void* args)
|
||||
printf("Couldn't get the Octeon device ID\n");
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_RENESAS_SYNC
|
||||
devId = wc_CryptoCb_CryptInitRenesasCmn(NULL, &guser_PKCbInfo);
|
||||
if (devId == INVALID_DEVID) {
|
||||
printf("Couldn't get the Renesas device ID\n");
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LOCAL_RNG)
|
||||
@@ -1523,7 +1532,8 @@ static void* benchmarks_do(void* args)
|
||||
bench_aescbc(0);
|
||||
#endif
|
||||
#if ((defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_3DES)) || \
|
||||
defined(HAVE_INTEL_QA_SYNC) || defined(HAVE_CAVIUM_OCTEON_SYNC)) && \
|
||||
defined(HAVE_INTEL_QA_SYNC) || defined(HAVE_CAVIUM_OCTEON_SYNC) || \
|
||||
defined(HAVE_RENESAS_SYNC)) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_aescbc(1);
|
||||
#endif
|
||||
@@ -1535,7 +1545,8 @@ static void* benchmarks_do(void* args)
|
||||
bench_aesgcm(0);
|
||||
#endif
|
||||
#if ((defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_3DES)) || \
|
||||
defined(HAVE_INTEL_QA_SYNC) || defined(HAVE_CAVIUM_OCTEON_SYNC)) && \
|
||||
defined(HAVE_INTEL_QA_SYNC) || defined(HAVE_CAVIUM_OCTEON_SYNC) || \
|
||||
defined(HAVE_RENESAS_SYNC)) && \
|
||||
!defined(NO_HW_BENCH)
|
||||
bench_aesgcm(1);
|
||||
#endif
|
||||
@@ -2107,9 +2118,11 @@ int benchmark_free(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifndef HAVE_RENESAS_SYNC
|
||||
if (gPrintStats || devId != INVALID_DEVID) {
|
||||
bench_stats_print();
|
||||
}
|
||||
#endif
|
||||
|
||||
bench_stats_free();
|
||||
|
||||
@@ -2120,6 +2133,9 @@ int benchmark_free(void)
|
||||
#ifdef HAVE_CAVIUM_OCTEON_SYNC
|
||||
wc_CryptoCb_CleanupOcteon(&devId);
|
||||
#endif
|
||||
#ifdef HAVE_RENESAS_SYNC
|
||||
wc_CryptoCb_CleanupRenesasCmn(&devId);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
|
@@ -139,6 +139,10 @@ ASN Options:
|
||||
#include <wolfssl/wolfcrypt/port/caam/wolfcaam.h>
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_RENESAS_SCEPROTECT
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas_cmn.h>
|
||||
#endif
|
||||
|
||||
#ifndef NO_RSA
|
||||
#include <wolfssl/wolfcrypt/rsa.h>
|
||||
#if defined(WOLFSSL_XILINX_CRYPT) || defined(WOLFSSL_CRYPTOCELL)
|
||||
@@ -199,6 +203,7 @@ int tsip_tls_CertVerify(const byte *cert, word32 certSz,
|
||||
byte *tsip_encRsaKeyIdx);
|
||||
#endif
|
||||
|
||||
|
||||
/* Calculates the minimum number of bytes required to encode the value.
|
||||
*
|
||||
* @param [in] value Value to be encoded.
|
||||
@@ -7647,7 +7652,7 @@ int EncryptContent(byte* input, word32 inputSz, byte* out, word32* outSz,
|
||||
#ifndef NO_RSA
|
||||
|
||||
#ifndef HAVE_USER_RSA
|
||||
#ifdef WOLFSSL_RENESAS_TSIP
|
||||
#if defined(WOLFSSL_RENESAS_TSIP) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
/* This function is to retrieve key position information in a cert.*
|
||||
* The information will be used to call TSIP TLS-linked API for *
|
||||
* certificate verification. */
|
||||
@@ -9586,9 +9591,9 @@ void FreeDecodedCert(DecodedCert* cert)
|
||||
if (cert->subjectName != NULL)
|
||||
wolfSSL_X509_NAME_free((WOLFSSL_X509_NAME*)cert->subjectName);
|
||||
#endif /* WOLFSSL_X509_NAME_AVAILABLE */
|
||||
#ifdef WOLFSSL_RENESAS_TSIP_TLS
|
||||
if (cert->tsip_encRsaKeyIdx != NULL)
|
||||
XFREE(cert->tsip_encRsaKeyIdx, cert->heap, DYNAMIC_TYPE_RSA);
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (cert->sce_tsip_encRsaKeyIdx != NULL)
|
||||
XFREE(cert->sce_tsip_encRsaKeyIdx, cert->heap, DYNAMIC_TYPE_RSA);
|
||||
#endif
|
||||
#ifndef NO_CERTS
|
||||
FreeSignatureCtx(&cert->sigCtx);
|
||||
@@ -9709,8 +9714,9 @@ static int StoreRsaKey(DecodedCert* cert, const byte* source, word32* srcIdx,
|
||||
if (GetSequence(source, srcIdx, &length, pubIdx + pubLen) < 0)
|
||||
return ASN_PARSE_E;
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
cert->sigCtx.pubkey_n_start = cert->sigCtx.pubkey_e_start = pubIdx;
|
||||
#if defined(WOLFSSL_RENESAS_TSIP) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
cert->sigCtx.CertAtt.pubkey_n_start =
|
||||
cert->sigCtx.CertAtt.pubkey_e_start = pubIdx;
|
||||
#endif
|
||||
cert->pubKeySize = pubLen;
|
||||
cert->publicKey = source + pubIdx;
|
||||
@@ -9735,10 +9741,10 @@ static int StoreRsaKey(DecodedCert* cert, const byte* source, word32* srcIdx,
|
||||
* SEQUENCE. */
|
||||
GetASN_GetConstRef(&dataASN[0], &cert->publicKey, &cert->pubKeySize);
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
#if defined(WOLFSSL_RENESAS_TSIP) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
/* Start of SEQUENCE. */
|
||||
cert->sigCtx.pubkey_n_start = cert->sigCtx.pubkey_e_start =
|
||||
dataASN[1].offset;
|
||||
cert->sigCtx.CertAtt.pubkey_n_start =
|
||||
cert->sigCtx.CertAtt.pubkey_e_start = dataASN[1].offset;
|
||||
#endif
|
||||
#ifdef HAVE_OCSP
|
||||
/* Calculate the hash of the public key for OCSP. */
|
||||
@@ -9806,13 +9812,25 @@ static int StoreEccKey(DecodedCert* cert, const byte* source, word32* srcIdx,
|
||||
maxIdx) < 0)
|
||||
return ASN_PARSE_E;
|
||||
|
||||
if (CheckCurve(cert->pkCurveOID) < 0)
|
||||
if ((ret = CheckCurve(cert->pkCurveOID)) < 0)
|
||||
return ECC_CURVE_OID_E;
|
||||
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
cert->sigCtx.CertAtt.curve_id = ret;
|
||||
#endif
|
||||
/* key header */
|
||||
ret = CheckBitString(source, srcIdx, &length, maxIdx, 1, NULL);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
cert->sigCtx.CertAtt.pubkey_n_start =
|
||||
cert->sigCtx.CertAtt.pubkey_e_start = (*srcIdx + 1);
|
||||
cert->sigCtx.CertAtt.pubkey_n_len = ((length - 1) >> 1);
|
||||
cert->sigCtx.CertAtt.pubkey_e_start +=
|
||||
cert->sigCtx.CertAtt.pubkey_n_len;
|
||||
cert->sigCtx.CertAtt.pubkey_e_len =
|
||||
cert->sigCtx.CertAtt.pubkey_n_len;
|
||||
#endif
|
||||
#ifdef HAVE_OCSP
|
||||
ret = CalcHashId(source + *srcIdx, length, cert->subjectKeyHash);
|
||||
if (ret != 0)
|
||||
@@ -13072,9 +13090,7 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
|
||||
const byte* sig, word32 sigSz, word32 sigOID, byte* rsaKeyIdx)
|
||||
{
|
||||
int ret = 0;
|
||||
#ifndef WOLFSSL_RENESAS_TSIP_TLS
|
||||
(void)rsaKeyIdx;
|
||||
#endif
|
||||
|
||||
if (sigCtx == NULL || buf == NULL || bufSz == 0 || key == NULL ||
|
||||
keySz == 0 || sig == NULL || sigSz == 0) {
|
||||
return BAD_FUNC_ARG;
|
||||
@@ -13087,6 +13103,21 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
|
||||
|
||||
WOLFSSL_ENTER("ConfirmSignature");
|
||||
|
||||
#if !defined(WOLFSSL_RENESAS_TSIP_TLS) && !defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
(void)rsaKeyIdx;
|
||||
#else
|
||||
CertAttribute* certatt = NULL;
|
||||
|
||||
#if !defined(NO_RSA) || defined(HAVE_ECC)
|
||||
certatt = (CertAttribute*)&sigCtx->CertAtt;
|
||||
#endif
|
||||
if(certatt) {
|
||||
certatt->keyIndex = rsaKeyIdx;
|
||||
certatt->cert = buf;
|
||||
certatt->certSz = bufSz;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef NO_ASN_CRYPT
|
||||
switch (sigCtx->state) {
|
||||
case SIG_STATE_BEGIN:
|
||||
@@ -13413,29 +13444,34 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
|
||||
#ifndef NO_RSA
|
||||
case RSAk:
|
||||
{
|
||||
#ifdef HAVE_PK_CALLBACKS
|
||||
#if defined(HAVE_PK_CALLBACKS) && \
|
||||
!defined(WOLFSSL_RENESAS_TSIP_TLS)
|
||||
if (sigCtx->pkCbRsa) {
|
||||
ret = sigCtx->pkCbRsa(
|
||||
sigCtx->sigCpy, sigSz, &sigCtx->out,
|
||||
key, keySz,
|
||||
sigCtx->pkCtxRsa);
|
||||
}
|
||||
#if !defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
else
|
||||
#else
|
||||
if (!sigCtx->pkCbRsa || ret == CRYPTOCB_UNAVAILABLE)
|
||||
#endif /* WOLFSSL_RENESAS_SCEPROTECT */
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
{
|
||||
#ifdef WOLFSSL_RENESAS_TSIP_TLS
|
||||
if (rsaKeyIdx != NULL)
|
||||
{
|
||||
ret = tsip_tls_CertVerify(buf, bufSz, sigCtx->sigCpy,
|
||||
sigSz,
|
||||
sigCtx->pubkey_n_start - sigCtx->certBegin,
|
||||
sigCtx->pubkey_n_len - 1,
|
||||
sigCtx->pubkey_e_start - sigCtx->certBegin,
|
||||
sigCtx->pubkey_e_len - 1,
|
||||
rsaKeyIdx);
|
||||
sigSz,
|
||||
sigCtx->.CertAtt.pubkey_n_start - sigCtx->certBegin,
|
||||
sigCtx->.CertAtt.pubkey_n_len - 1,
|
||||
sigCtx->.CertAtt.pubkey_e_start - sigCtx->certBegin,
|
||||
sigCtx->.CertAtt.pubkey_e_len - 1,
|
||||
rsaKeyIdx);
|
||||
|
||||
if (ret == 0){
|
||||
sigCtx->verifyByTSIP = 1;
|
||||
sigCtx->verifyByTSIP_SCE = 1;
|
||||
ret = 0;
|
||||
} else {
|
||||
WOLFSSL_MSG("RSA Verify by tsip didn't match");
|
||||
@@ -13460,7 +13496,7 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
|
||||
#if defined(HAVE_ECC)
|
||||
case ECDSAk:
|
||||
{
|
||||
#ifdef HAVE_PK_CALLBACKS
|
||||
#if defined(HAVE_PK_CALLBACKS)
|
||||
if (sigCtx->pkCbEcc) {
|
||||
ret = sigCtx->pkCbEcc(
|
||||
sig, sigSz,
|
||||
@@ -13468,7 +13504,11 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
|
||||
key, keySz, &sigCtx->verify,
|
||||
sigCtx->pkCtxEcc);
|
||||
}
|
||||
#if !defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
else
|
||||
#else
|
||||
if (!sigCtx->pkCbEcc || ret == CRYPTOCB_UNAVAILABLE)
|
||||
#endif /* WOLFSSL_RENESAS_SCEPROTECT */
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
{
|
||||
ret = wc_ecc_verify_hash(sig, sigSz, sigCtx->digest,
|
||||
@@ -13532,8 +13572,9 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
|
||||
case RSAk:
|
||||
{
|
||||
int encodedSigSz, verifySz;
|
||||
#ifdef WOLFSSL_RENESAS_TSIP
|
||||
if (sigCtx->verifyByTSIP == 1) break;
|
||||
#if defined(WOLFSSL_RENESAS_TSIP) || \
|
||||
defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (sigCtx->CertAtt.verifyByTSIP_SCE == 1) break;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
byte* encodedSig = (byte*)XMALLOC(MAX_ENCODED_SIG_SZ,
|
||||
@@ -17791,10 +17832,10 @@ int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
|
||||
int len = 0;
|
||||
#endif
|
||||
#endif
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
#if defined(WOLFSSL_RENESAS_TSIP) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
int idx = 0;
|
||||
#endif
|
||||
byte* tsip_encRsaKeyIdx;
|
||||
byte* sce_tsip_encRsaKeyIdx;
|
||||
|
||||
if (cert == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
@@ -18149,52 +18190,56 @@ int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
|
||||
}
|
||||
#endif /* HAVE_OCSP */
|
||||
}
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
#if defined(WOLFSSL_RENESAS_TSIP) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
/* prepare for TSIP TLS cert verification API use */
|
||||
if (cert->keyOID == RSAk) {
|
||||
/* to call TSIP API, it needs keys position info in bytes */
|
||||
if ((ret = RsaPublicKeyDecodeRawIndex(cert->publicKey, (word32*)&idx,
|
||||
cert->pubKeySize,
|
||||
&cert->sigCtx.pubkey_n_start,
|
||||
&cert->sigCtx.pubkey_n_len,
|
||||
&cert->sigCtx.pubkey_e_start,
|
||||
&cert->sigCtx.pubkey_e_len)) != 0) {
|
||||
&cert->sigCtx.CertAtt.pubkey_n_start,
|
||||
&cert->sigCtx.CertAtt.pubkey_n_len,
|
||||
&cert->sigCtx.CertAtt.pubkey_e_start,
|
||||
&cert->sigCtx.CertAtt.pubkey_e_len)) != 0) {
|
||||
WOLFSSL_MSG("Decoding index from cert failed.");
|
||||
return ret;
|
||||
}
|
||||
cert->sigCtx.certBegin = cert->certBegin;
|
||||
cert->sigCtx.CertAtt.certBegin = cert->certBegin;
|
||||
} else if (cert->keyOID == ECDSAk) {
|
||||
cert->sigCtx.CertAtt.certBegin = cert->certBegin;
|
||||
}
|
||||
/* check if we can use TSIP for cert verification */
|
||||
/* if the ca is verified as tsip root ca. */
|
||||
/* TSIP can only handle 2048 bits(256 byte) key. */
|
||||
if (cert->ca && tsip_checkCA(cert->ca->cm_idx) != 0 &&
|
||||
cert->sigCtx.pubkey_n_len == 256) {
|
||||
if (cert->ca && Renesas_cmn_checkCA(cert->ca->cm_idx) != 0 &&
|
||||
(cert->sigCtx.CertAtt.pubkey_n_len == 256 ||
|
||||
cert->sigCtx.CertAtt.curve_id == ECC_SECP256R1)) {
|
||||
|
||||
/* assign memory to encrypted tsip Rsa key index */
|
||||
if (!cert->tsip_encRsaKeyIdx)
|
||||
cert->tsip_encRsaKeyIdx =
|
||||
if (!cert->sce_tsip_encRsaKeyIdx)
|
||||
cert->sce_tsip_encRsaKeyIdx =
|
||||
(byte*)XMALLOC(TSIP_TLS_ENCPUBKEY_SZ_BY_CERTVRFY,
|
||||
cert->heap, DYNAMIC_TYPE_RSA);
|
||||
if (cert->tsip_encRsaKeyIdx == NULL)
|
||||
if (cert->sce_tsip_encRsaKeyIdx == NULL)
|
||||
return MEMORY_E;
|
||||
} else {
|
||||
if (cert->ca) {
|
||||
/* TSIP isn't usable */
|
||||
if (tsip_checkCA(cert->ca->cm_idx) == 0)
|
||||
WOLFSSL_MSG("TSIP isn't usable because the ca isn't verified "
|
||||
if (Renesas_cmn_checkCA(cert->ca->cm_idx) == 0)
|
||||
WOLFSSL_MSG("SCE-TSIP isn't usable because the ca isn't verified "
|
||||
"by TSIP.");
|
||||
else if (cert->sigCtx.pubkey_n_len != 256)
|
||||
WOLFSSL_MSG("TSIP isn't usable because the ca isn't signed by "
|
||||
else if (cert->sigCtx.CertAtt.pubkey_n_len != 256)
|
||||
WOLFSSL_MSG("SCE-TSIP isn't usable because the ca isn't signed by "
|
||||
"RSA 2048.");
|
||||
else
|
||||
WOLFSSL_MSG("TSIP isn't usable");
|
||||
WOLFSSL_MSG("SCE-TSIP isn't usable");
|
||||
}
|
||||
cert->tsip_encRsaKeyIdx = NULL;
|
||||
cert->sce_tsip_encRsaKeyIdx = NULL;
|
||||
}
|
||||
|
||||
tsip_encRsaKeyIdx = cert->tsip_encRsaKeyIdx;
|
||||
|
||||
sce_tsip_encRsaKeyIdx = cert->sce_tsip_encRsaKeyIdx;
|
||||
|
||||
#else
|
||||
tsip_encRsaKeyIdx = NULL;
|
||||
sce_tsip_encRsaKeyIdx = NULL;
|
||||
#endif
|
||||
|
||||
if (verify != NO_VERIFY && type != CA_TYPE && type != TRUSTED_PEER_TYPE) {
|
||||
@@ -18208,7 +18253,7 @@ int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
|
||||
cert->ca->publicKey, cert->ca->pubKeySize,
|
||||
cert->ca->keyOID, cert->signature,
|
||||
cert->sigLength, cert->signatureOID,
|
||||
tsip_encRsaKeyIdx)) != 0) {
|
||||
sce_tsip_encRsaKeyIdx)) != 0) {
|
||||
if (ret != WC_PENDING_E) {
|
||||
WOLFSSL_MSG("Confirm signature failed");
|
||||
}
|
||||
|
@@ -554,6 +554,8 @@ const char* wc_GetErrorString(int error)
|
||||
case FIPS_PRIVATE_KEY_LOCKED_E:
|
||||
return "Cannot export private key, locked";
|
||||
|
||||
case PROTOCOLCB_UNAVAILABLE:
|
||||
return "Protocol callback unavailable";
|
||||
default:
|
||||
return "unknown error number";
|
||||
|
||||
|
@@ -115,6 +115,10 @@ EXTRA_DIST += wolfcrypt/src/port/ti/ti-aes.c \
|
||||
wolfcrypt/src/port/Renesas/renesas_tsip_aes.c \
|
||||
wolfcrypt/src/port/Renesas/renesas_tsip_sha.c \
|
||||
wolfcrypt/src/port/Renesas/renesas_tsip_util.c \
|
||||
wolfcrypt/src/port/Renesas/renesas_sce_util.c \
|
||||
wolfcrypt/src/port/Renesas/renesas_sce_aes.c \
|
||||
wolfcrypt/src/port/Renesas/renesas_sce_sha.c \
|
||||
wolfcrypt/src/port/Renesas/renesas_common.c \
|
||||
wolfcrypt/src/port/Renesas/README.md \
|
||||
wolfcrypt/src/port/cypress/psoc6_crypto.c
|
||||
|
||||
|
824
wolfcrypt/src/port/Renesas/renesas_common.c
Normal file
824
wolfcrypt/src/port/Renesas/renesas_common.c
Normal file
@@ -0,0 +1,824 @@
|
||||
/* renesas_common.c
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_TSIP_TLS)
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h>
|
||||
#elif defined(WOLFSSL_RENESAS_TSIP_TLS)
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h>
|
||||
#endif
|
||||
|
||||
#include <wolfssl/wolfcrypt/wc_port.h>
|
||||
#include <wolfssl/wolfcrypt/types.h>
|
||||
#include <wolfssl/wolfcrypt/asn.h>
|
||||
#include <wolfssl/internal.h>
|
||||
#include <wolfssl/error-ssl.h>
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
|
||||
extern uint32_t g_CAscm_Idx = (uint32_t)-1; /* index of CM table */
|
||||
static int devId = 7890; /* dev Id for Crypt Callback */
|
||||
|
||||
#ifdef WOLF_CRYPTO_CB
|
||||
|
||||
#include <wolfssl/wolfcrypt/cryptocb.h>
|
||||
|
||||
/* Renesas Security Library Common Callback
|
||||
* For Crypto Call back
|
||||
*
|
||||
* devIdArg device Id
|
||||
* info pointer to wc_CryptInfo
|
||||
* ctx Crypto Callback context
|
||||
* return 0 on success, otherwise MEMORY_E or BAD_FUNC_ARG on failure
|
||||
*/
|
||||
static int Renesas_cmn_CryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
|
||||
{
|
||||
int ret = NOT_COMPILED_IN; /* return this to bypass HW and use SW */
|
||||
User_SCEPKCbInfo* cbInfo = (User_SCEPKCbInfo*) ctx;
|
||||
|
||||
if (info == NULL || ctx == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
printf("CryptoDevCb: Algo Type %d\n", info->algo_type);
|
||||
#endif
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip aes api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
|
||||
if (info->algo_type == WC_ALGO_TYPE_CIPHER) {
|
||||
|
||||
#if !defined(NO_AES) || !defined(NO_DES3)
|
||||
#ifdef HAVE_AESGCM
|
||||
if (info->cipher.type == WC_CIPHER_AES_GCM) {
|
||||
|
||||
if (info->cipher.enc &&
|
||||
( cbInfo->session_key_set == 1 ||
|
||||
(cbInfo->aes256_installedkey_set == 1 &&
|
||||
info->cipher.aesgcm_enc.aes->keylen == 32) ||
|
||||
(cbInfo->aes128_installedkey_set == 1 &&
|
||||
info->cipher.aesgcm_enc.aes->keylen == 16))) {
|
||||
|
||||
if(cbInfo->aes256_installedkey_set == 1 &&
|
||||
info->cipher.aesgcm_enc.aes->keylen == 32) {
|
||||
|
||||
XMEMCPY(&info->cipher.aesgcm_enc.aes->ctx.sce_wrapped_key,
|
||||
&cbInfo->sce_wrapped_key_aes256,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
info->cipher.aesgcm_enc.aes->ctx.keySize = 32;
|
||||
|
||||
} else if (cbInfo->aes128_installedkey_set == 1 &&
|
||||
info->cipher.aesgcm_enc.aes->keylen == 16) {
|
||||
|
||||
XMEMCPY(&info->cipher.aesgcm_enc.aes->ctx.sce_wrapped_key,
|
||||
&cbInfo->sce_wrapped_key_aes128,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
info->cipher.aesgcm_enc.aes->ctx.keySize = 16;
|
||||
}
|
||||
|
||||
ret = wc_sce_AesGcmEncrypt(
|
||||
info->cipher.aesgcm_enc.aes,
|
||||
(byte*)info->cipher.aesgcm_enc.out,
|
||||
(byte*)info->cipher.aesgcm_enc.in,
|
||||
info->cipher.aesgcm_enc.sz,
|
||||
(byte*)info->cipher.aesgcm_enc.iv,
|
||||
info->cipher.aesgcm_enc.ivSz,
|
||||
(byte*)info->cipher.aesgcm_enc.authTag,
|
||||
info->cipher.aesgcm_enc.authTagSz,
|
||||
(byte*)info->cipher.aesgcm_enc.authIn,
|
||||
info->cipher.aesgcm_enc.authInSz,
|
||||
(void*)ctx);
|
||||
|
||||
} else if (cbInfo->session_key_set == 1 ||
|
||||
(cbInfo->aes256_installedkey_set == 1 &&
|
||||
info->cipher.aesgcm_dec.aes->keylen == 32) ||
|
||||
(cbInfo->aes128_installedkey_set == 1 &&
|
||||
info->cipher.aesgcm_dec.aes->keylen == 16)) {
|
||||
|
||||
if(cbInfo->aes256_installedkey_set == 1 &&
|
||||
info->cipher.aesgcm_dec.aes->keylen == 32) {
|
||||
|
||||
XMEMCPY(&info->cipher.aesgcm_dec.aes->ctx.sce_wrapped_key,
|
||||
&cbInfo->sce_wrapped_key_aes256,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
info->cipher.aesgcm_dec.aes->ctx.keySize = 32;
|
||||
|
||||
} else if (cbInfo->aes128_installedkey_set == 1 &&
|
||||
info->cipher.aesgcm_dec.aes->keylen == 16) {
|
||||
|
||||
XMEMCPY(&info->cipher.aesgcm_dec.aes->ctx.sce_wrapped_key,
|
||||
&cbInfo->sce_wrapped_key_aes128,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
info->cipher.aesgcm_dec.aes->ctx.keySize = 16;
|
||||
}
|
||||
|
||||
ret = wc_sce_AesGcmDecrypt(
|
||||
info->cipher.aesgcm_dec.aes,
|
||||
(byte*)info->cipher.aesgcm_dec.out,
|
||||
(byte*)info->cipher.aesgcm_dec.in,
|
||||
info->cipher.aesgcm_dec.sz,
|
||||
(byte*)info->cipher.aesgcm_dec.iv,
|
||||
info->cipher.aesgcm_dec.ivSz,
|
||||
(byte*)info->cipher.aesgcm_dec.authTag,
|
||||
info->cipher.aesgcm_dec.authTagSz,
|
||||
(byte*)info->cipher.aesgcm_dec.authIn,
|
||||
info->cipher.aesgcm_dec.authInSz,
|
||||
(void*)ctx);
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_AESGCM */
|
||||
#ifdef HAVE_AES_CBC
|
||||
if ((info->cipher.type == WC_CIPHER_AES_CBC) &&
|
||||
(cbInfo->session_key_set == 1 ||
|
||||
(cbInfo->aes256_installedkey_set == 1 &&
|
||||
info->cipher.aescbc.aes->keylen == 32) ||
|
||||
(cbInfo->aes128_installedkey_set == 1 &&
|
||||
info->cipher.aescbc.aes->keylen == 16))) {
|
||||
|
||||
if (info->cipher.enc) {
|
||||
if(cbInfo->aes256_installedkey_set == 1 &&
|
||||
info->cipher.aescbc.aes->keylen == 32) {
|
||||
XMEMCPY(&info->cipher.aescbc.aes->ctx.sce_wrapped_key,
|
||||
&cbInfo->sce_wrapped_key_aes256,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
info->cipher.aescbc.aes->ctx.keySize = 32;
|
||||
|
||||
} else if (cbInfo->aes128_installedkey_set == 1 &&
|
||||
info->cipher.aescbc.aes->keylen == 16) {
|
||||
XMEMCPY(&info->cipher.aescbc.aes->ctx.sce_wrapped_key,
|
||||
&cbInfo->sce_wrapped_key_aes128,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
info->cipher.aescbc.aes->ctx.keySize = 16;
|
||||
}
|
||||
|
||||
ret = wc_sce_AesCbcEncrypt(
|
||||
info->cipher.aescbc.aes,
|
||||
(byte*)info->cipher.aescbc.out,
|
||||
(byte*)info->cipher.aescbc.in,
|
||||
info->cipher.aescbc.sz);
|
||||
}
|
||||
else {
|
||||
if(cbInfo->aes256_installedkey_set == 1 &&
|
||||
info->cipher.aescbc.aes->keylen == 32) {
|
||||
XMEMCPY(&info->cipher.aescbc.aes->ctx.sce_wrapped_key,
|
||||
&cbInfo->sce_wrapped_key_aes256,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
info->cipher.aescbc.aes->ctx.keySize = 32;
|
||||
|
||||
} else if (cbInfo->aes128_installedkey_set == 1 &&
|
||||
info->cipher.aescbc.aes->keylen == 16) {
|
||||
XMEMCPY(&info->cipher.aescbc.aes->ctx.sce_wrapped_key,
|
||||
&cbInfo->sce_wrapped_key_aes128,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
info->cipher.aescbc.aes->ctx.keySize = 16;
|
||||
}
|
||||
|
||||
ret = wc_sce_AesCbcDecrypt(
|
||||
info->cipher.aescbc.aes,
|
||||
(byte*)info->cipher.aescbc.out,
|
||||
(byte*)info->cipher.aescbc.in,
|
||||
info->cipher.aescbc.sz);
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_AES_CBC */
|
||||
#endif /* !NO_AES || !NO_DES3 */
|
||||
#endif /* TSIP or SCE */
|
||||
}
|
||||
|
||||
(void)devIdArg;
|
||||
(void)ctx;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Renesas Security Library Common Entry Point
|
||||
* For usable method
|
||||
*
|
||||
* ssl : a pointer to WOLFSSL object
|
||||
* session_key_generated : if session key has been generated
|
||||
* return 1 for usable, 0 for unusable
|
||||
*/
|
||||
int Renesas_cmn_usable(const WOLFSSL* ssl, byte session_key_generated)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
ret = wc_sce_usable(ssl, session_key_generated);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Renesas Security Library Common Method
|
||||
* Crypt Callback initialization
|
||||
*
|
||||
* ssl : a pointer to WOLFSSL object
|
||||
* ctx : callback context
|
||||
* return valid device Id on success, otherwise INVALID_DEVIID
|
||||
*/
|
||||
int wc_CryptoCb_CryptInitRenesasCmn(WOLFSSL* ssl, void* ctx)
|
||||
{
|
||||
(void)ssl;
|
||||
(void)ctx;
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
void* cbInfo = NULL;/* TODO cast tsip cb context */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
User_SCEPKCbInfo* cbInfo = (User_SCEPKCbInfo*)ctx;
|
||||
#endif
|
||||
|
||||
if (wc_CryptoCb_RegisterDevice(devId, Renesas_cmn_CryptoDevCb, cbInfo) < 0) {
|
||||
return INVALID_DEVID;
|
||||
}
|
||||
|
||||
if(ssl)
|
||||
wolfSSL_SetDevId(ssl, devId);
|
||||
|
||||
return devId;
|
||||
}
|
||||
|
||||
/* Renesas Security Library Common Method
|
||||
* Clean up CryptCb
|
||||
*
|
||||
* id : a pointer to device id to unregister
|
||||
* no return value
|
||||
*/
|
||||
void wc_CryptoCb_CleanupRenesasCmn(int* id)
|
||||
{
|
||||
wc_CryptoCb_UnRegisterDevice(*id);
|
||||
*id = INVALID_DEVID;
|
||||
}
|
||||
|
||||
#endif /* WOLF_CRYPTO_CB */
|
||||
|
||||
/* Renesas Security Library Common Method
|
||||
* Check CA index if CA can be used for SCE/TSIP because
|
||||
* the CA has been verified by SCE/TSIP
|
||||
*
|
||||
* cmdIdx : ca index
|
||||
* return 1 can be used, otherwise 0
|
||||
*/
|
||||
WOLFSSL_LOCAL byte Renesas_cmn_checkCA(word32 cmIdx)
|
||||
{
|
||||
return (cmIdx == g_CAscm_Idx? 1:0);
|
||||
}
|
||||
|
||||
/* check if the root CA has been verified by TSIP/SCE,
|
||||
* and it exists in the CM table.
|
||||
*/
|
||||
static byte sce_tsip_rootCAverified( )
|
||||
{
|
||||
return (g_CAscm_Idx != (uint32_t)-1 ? 1:0);
|
||||
}
|
||||
/* Renesas Security Library Common Callback
|
||||
* Callback for Rsa verify
|
||||
*
|
||||
* ssl the WOLFSSL object
|
||||
* sig Buffer holding signature
|
||||
* sigSz Length of signature in bytes
|
||||
* out Buffer to hold hash
|
||||
* key Buffer to hold ecc key
|
||||
* keySz Length of key in bytes
|
||||
* return FSP_SUCCESS(0) on sucess, otherwise FSP/TSIP error code
|
||||
*/
|
||||
WOLFSSL_LOCAL int Renesas_cmn_RsaVerify(WOLFSSL* ssl, byte* sig, word32 sigSz,
|
||||
byte** out, const byte* key, word32 keySz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO TSIP */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
ret = wc_SCE_RsaVerify(ssl, sig, sigSz, out,key, keySz, ctx);
|
||||
|
||||
if (ret == 0 && ret != CRYPTOCB_UNAVAILABLE) {
|
||||
/* Set Call back for SharedScret when being successful */
|
||||
wolfSSL_CTX_SetEccSharedSecretCb(ssl->ctx, SCE_EccSharedSecret);
|
||||
wolfSSL_SetEccSharedSecretCtx(ssl, ctx);
|
||||
} else {
|
||||
WOLFSSL_MSG("failed R_SCE_TLS_ServerKeyExchangeVerify");
|
||||
wolfSSL_CTX_SetEccSharedSecretCb(ctx, NULL);
|
||||
wolfSSL_SetEccSharedSecretCtx(ssl, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
/* Renesas Security Library Common Callback
|
||||
* Callback for Ecc verify
|
||||
*
|
||||
* ssl the WOLFSSL object
|
||||
* sig Buffer holding signature
|
||||
* sigSz Length of signature in bytes
|
||||
* hash Buffer to hold hash
|
||||
* hashSz Length of hash
|
||||
* key Buffer to hold ecc key
|
||||
* keySz Length of key in bytes
|
||||
* result a pointer to int indicates if the verify is ok
|
||||
* return FSP_SUCCESS(0) on sucess, otherwise FSP/TSIP error code
|
||||
*/
|
||||
WOLFSSL_LOCAL int Renesas_cmn_EccVerify(WOLFSSL* ssl, const uint8_t* sig,
|
||||
uint32_t sigSz, const uint8_t* hash, uint32_t hashSz,
|
||||
const uint8_t* key, uint32_t keySz, int* result, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO TSIP */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
ret = wc_SCE_EccVerify(ssl, sig, sigSz, hash, hashSz, key, keySz,
|
||||
result, ctx);
|
||||
if (ret == 0 && *result == 1 && ret != CRYPTOCB_UNAVAILABLE) {
|
||||
/* Set Call back for SharedScret when being successful */
|
||||
wolfSSL_CTX_SetEccSharedSecretCb(ssl->ctx, SCE_EccSharedSecret);
|
||||
wolfSSL_SetEccSharedSecretCtx(ssl, ctx);
|
||||
} else {
|
||||
WOLFSSL_MSG("failed R_SCE_TLS_ServerKeyExchangeVerify");
|
||||
wolfSSL_CTX_SetEccSharedSecretCb(ctx, NULL);
|
||||
wolfSSL_SetEccSharedSecretCtx(ssl, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
/* Renesas Security Library Common Entry Point
|
||||
* For ROOT CA verifycation
|
||||
*
|
||||
* cert Buffer to hold cert
|
||||
* cert_len Length of cert
|
||||
* key_n_start Byte position of public key in cert
|
||||
* key_n_len Length of public key in bytes
|
||||
* key_e_start Byte position of public key exponent in cert
|
||||
* key_e_len Length of public key exponent
|
||||
* cm_row CA index
|
||||
* return FSP_SUCCESS(0) on sucess, otherwise FSP/TSIP error code
|
||||
*/
|
||||
int wc_Renesas_cmn_RootCertVerify(const byte* cert, word32 cert_len, word32 key_n_start,
|
||||
word32 key_n_len, word32 key_e_start, word32 key_e_len, word32 cm_row)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (sce_tsip_rootCAverified() == 0) {
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
ret = tsip_tls_RootCertVerify(cert, cert_len, key_n_start,
|
||||
key_n_len, key_e_start, key_e_len, cm_row);
|
||||
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
|
||||
ret = wc_sce_tls_RootCertVerify(cert, cert_len, key_n_start,
|
||||
key_n_len, key_e_start, key_e_len, cm_row);
|
||||
#endif
|
||||
} else {
|
||||
/* already verified. skipped */
|
||||
ret = 0;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Renesas Security Library Common Callback
|
||||
* Callback for tls finished
|
||||
*
|
||||
* ssl the WOLFSSL object
|
||||
* side CLIENT or SERVER
|
||||
* handshake_hash hash while doing handshake
|
||||
* hashes calculated data by SCE/TSIP pseduo random function
|
||||
* return FSP_SUCCESS(0) on sucess, otherwise FSP/TSIP error code
|
||||
*/
|
||||
WOLFSSL_LOCAL int Renesas_cmn_TlsFinished(WOLFSSL* ssl, const byte *side,
|
||||
const byte *handshake_hash,
|
||||
byte *hashes, void* ctx)
|
||||
{
|
||||
int ret = -1;
|
||||
|
||||
(void)ctx;
|
||||
|
||||
/* sanity check */
|
||||
if (ssl == NULL || ctx == NULL || side == NULL || handshake_hash == NULL ||
|
||||
hashes == NULL )
|
||||
return BAD_FUNC_ARG;
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
ret = wc_sce_generateVerifyData(ssl->arrays->sce_masterSecret, /* master secret */
|
||||
side, handshake_hash, hashes);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Renesas Security Library Common Callback
|
||||
* Callback for setting Encrypt Keys.
|
||||
* Register callback for setting Encrypt Keys when keys are generated by SCE/TSIP
|
||||
*
|
||||
* ssl the WOLFSSL object
|
||||
* ctx Callback context
|
||||
* return 0 on sucess, -1 when keys are not generated by SCE/TSIP
|
||||
*/
|
||||
static int Renesas_cmn_EncryptKeys(WOLFSSL* ssl, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* sanity check */
|
||||
if (ssl == NULL || ctx == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
User_SCEPKCbInfo* cbInfo = (User_SCEPKCbInfo*)ctx;
|
||||
if (cbInfo->session_key_set == 1) {
|
||||
ret = 0;
|
||||
|
||||
wolfSSL_CTX_SetTlsFinishedCb(ssl->ctx, Renesas_cmn_TlsFinished);
|
||||
wolfSSL_SetTlsFinishedCtx(ssl, cbInfo);
|
||||
} else {
|
||||
wolfSSL_CTX_SetTlsFinishedCb(ssl->ctx, NULL);
|
||||
wolfSSL_SetTlsFinishedCtx(ssl, NULL);
|
||||
ret = -1;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Renesas Security Library Common Callback
|
||||
* Callback for Sesssion Key generation
|
||||
* Register callback for Set Keys when keys are successfully
|
||||
* generated by SCE/TSIP
|
||||
*
|
||||
* ssl the WOLFSSL object
|
||||
* ctx Callback context
|
||||
* return FSP_SUCCESS(0) on sucess, otherwise SCE/TSIP error code
|
||||
*/
|
||||
WOLFSSL_LOCAL int Renesas_cmn_generateSeesionKey(WOLFSSL* ssl, void* ctx)
|
||||
{
|
||||
int ret = -1;
|
||||
|
||||
(void)ctx;
|
||||
|
||||
/* sanity check */
|
||||
if (ssl == NULL || ctx == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
ret = wc_sce_generateSeesionKey(ssl, ctx, devId);
|
||||
if (ret == 0) {
|
||||
wolfSSL_CTX_SetEncryptKeysCb(ssl->ctx, Renesas_cmn_EncryptKeys);
|
||||
wolfSSL_SetEncryptKeysCtx(ssl, ctx);
|
||||
} else {
|
||||
wolfSSL_CTX_SetEncryptKeysCb(ssl->ctx, NULL);
|
||||
wolfSSL_SetEncryptKeysCtx(ssl, NULL);
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Renesas Security Library Common Callback
|
||||
* Callback for Premaster Secret generation
|
||||
* Register callback for Set Keys when keys are successfully
|
||||
* generated by SCE/TSIP
|
||||
*
|
||||
* ssl the WOLFSSL object
|
||||
* premaster Buffer to hold pre master
|
||||
* preSz Length of pre-master
|
||||
* ctx Callback context
|
||||
* return FSP_SUCCESS(0) on sucess,
|
||||
* otherwise PROTOCOLCB_UNAVAILABLE
|
||||
* so that caller could continue to process if want
|
||||
*/
|
||||
WOLFSSL_LOCAL int Renesas_cmn_generatePremasterSecret(WOLFSSL* ssl,
|
||||
byte *premaster, word32 preSz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
|
||||
(void) ctx;
|
||||
(void) ssl;
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (Renesas_cmn_usable(ssl, 0)) {
|
||||
ret = wc_sce_generatePremasterSecret(premaster, preSz);
|
||||
ssl->arrays->preMasterSz = preSz;
|
||||
} else
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Renesas Security Library Common Callback
|
||||
* Callback for Master Secret generation
|
||||
* Register callback for Session Key Generation when master secret is
|
||||
* successfully generated by SCE/TSIP
|
||||
*
|
||||
* ssl the WOLFSSL object
|
||||
* ctx Callback context
|
||||
* return FSP_SUCCESS(0) on sucess,
|
||||
* otherwise PROTOCOLCB_UNAVAILABLE
|
||||
* so that caller could continue to process if want
|
||||
*/
|
||||
WOLFSSL_LOCAL int Renesas_cmn_genMasterSecret(struct WOLFSSL* ssl, void* ctx)
|
||||
{
|
||||
int ret = WOLFSSL_NOT_IMPLEMENTED;
|
||||
|
||||
(void) ret;
|
||||
(void) ctx;
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (Renesas_cmn_usable(ssl, 0)) {
|
||||
ret = wc_sce_generateMasterSecret(
|
||||
ssl->options.cipherSuite0,
|
||||
ssl->options.cipherSuite,
|
||||
ssl->arrays->preMasterSecret,
|
||||
ssl->arrays->clientRandom,
|
||||
ssl->arrays->serverRandom,
|
||||
ssl->arrays->sce_masterSecret);
|
||||
if (ret == 0) {
|
||||
wc_sce_storeKeyCtx(ssl, ctx);
|
||||
/* set Session Key generation Callback for use */
|
||||
wolfSSL_CTX_SetGenSessionKeyCb(ssl->ctx,
|
||||
Renesas_cmn_generateSeesionKey);
|
||||
wolfSSL_SetGenSessionKeyCtx(ssl, ctx);
|
||||
} else {
|
||||
wolfSSL_CTX_SetGenSessionKeyCb(ssl->ctx, NULL);
|
||||
wolfSSL_SetGenSessionKeyCtx(ssl, NULL);
|
||||
}
|
||||
} else
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Renesas Security Library Common Callback
|
||||
* Callback for Rsa Encryption
|
||||
*
|
||||
* ssl the WOLFSSL object
|
||||
* in Buffer to hold plain text
|
||||
* inSz Length of plain text
|
||||
* out Buffer to hold cipher text
|
||||
* outSz Length of cipher text buffer
|
||||
* KeyDer Buffer holding Key in der format
|
||||
* KeySz Length of Key Der
|
||||
* ctx Callback context
|
||||
* return FSP_SUCCESS(0) on sucess,
|
||||
* otherwise CRYPTOCB_UNAVAILABLE
|
||||
* so that caller could continue to process if want
|
||||
*/
|
||||
WOLFSSL_LOCAL int Renesas_cmn_RsaEnc(WOLFSSL* ssl, const unsigned char* in,
|
||||
unsigned int inSz, unsigned char* out, word32* outSz,
|
||||
const unsigned char* keyDer, unsigned int keySz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
int EncSz;
|
||||
|
||||
(void)ctx;
|
||||
(void)in;
|
||||
(void)inSz;
|
||||
(void)keyDer;
|
||||
(void)keySz;
|
||||
(void)EncSz;
|
||||
|
||||
/* sanity check */
|
||||
if (ssl == NULL || in == NULL || out == NULL || keyDer == NULL ||
|
||||
ctx == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
EncSz = wc_RsaEncryptSize(ssl->peerRsaKey);
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (wc_sce_usable(ssl, 0) && EncSz == 256) {
|
||||
ret = wc_sce_generateEncryptPreMasterSecret(ssl, out, outSz);
|
||||
} else {
|
||||
if (EncSz != 256)
|
||||
WOLFSSL_MSG("SCE cannot use"
|
||||
"because Rsa Encrypt Size isn't 256 bytes(2048 bits).");
|
||||
|
||||
ret = CRYPTOCB_UNAVAILABLE;
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Renesas Security Library Common Callback
|
||||
* Callback for Verify hmac
|
||||
*
|
||||
* ssl the WOLFSSL object
|
||||
* message Buffer to hold message
|
||||
* inSz Length of message
|
||||
* macSz Length of mac size
|
||||
* content content of inner data
|
||||
* ctx Callback context
|
||||
* return FSP_SUCCESS(0) on sucess,
|
||||
* otherwise PROTOCOLCB_UNAVAILABLE
|
||||
* so that caller could continue to process if want
|
||||
*/
|
||||
WOLFSSL_LOCAL int Renesas_cmn_VerifyHmac(WOLFSSL *ssl, const byte* message,
|
||||
word32 messageSz, word32 macSz, word32 content, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
(void)ctx;
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (wc_sce_usable(ssl, 1)) {
|
||||
ret = wc_sce_Sha256VerifyHmac(ssl, message, messageSz, macSz, content);
|
||||
} else
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Renesas Security Library Common Callback
|
||||
* Callback for TLS hmac
|
||||
*
|
||||
* ssl the WOLFSSL object
|
||||
* digest Buffer to hold digest by hmac
|
||||
* in Buffer to hold in data
|
||||
* sz Length of in data
|
||||
* padSz Length of padding
|
||||
* content content of inner data
|
||||
* epocOrder
|
||||
* return FSP_SUCCESS(0) on sucess, otherwise error code
|
||||
*/
|
||||
WOLFSSL_LOCAL int Renesas_cmn_TLS_hmac(WOLFSSL* ssl, byte* digest,
|
||||
const byte* in, word32 sz, int padSz, int content, int verify, int epochOrder)
|
||||
{
|
||||
int ret;
|
||||
byte myInner[WOLFSSL_TLS_HMAC_INNER_SZ];
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (Renesas_cmn_usable(ssl, 1)) {
|
||||
if (ssl->specs.hash_size == WC_SHA256_DIGEST_SIZE) {
|
||||
wolfSSL_SetTlsHmacInner(ssl, myInner, sz, content, verify);
|
||||
ret = wc_sce_Sha256GenerateHmac(ssl, myInner, WOLFSSL_TLS_HMAC_INNER_SZ,
|
||||
in, sz, digest);
|
||||
}
|
||||
else
|
||||
ret = TSIP_MAC_DIGSZ_E;
|
||||
} else {
|
||||
/* fall through to original TLS hmac method when SCE cannot be used */
|
||||
ret = TLS_hmac(ssl, digest, in, sz, padSz, content, verify, epochOrder);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Renesas Security Library Common Callback
|
||||
* Callback for Signature PK Rsa verify
|
||||
*
|
||||
* sig Buffer holding signature
|
||||
* sigSz Length of signature in bytes
|
||||
* out Buffer to hold hash
|
||||
* keyDer Buffer to hold rsa key
|
||||
* keySz Length of key in bytes
|
||||
* ctx Callback context
|
||||
* return FSP_SUCCESS(0) on sucess,
|
||||
* otherwise CRYPTOCB_UNAVAILABLE
|
||||
* so that caller could continue to process if want
|
||||
*/
|
||||
WOLFSSL_LOCAL int Renesas_cmn_SigPkCbRsaVerify(unsigned char* sig,
|
||||
unsigned int sigSz, unsigned char** out, const unsigned char* keyDer,
|
||||
unsigned int keySz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
CertAttribute* CertAtt;
|
||||
|
||||
(void)out;
|
||||
(void)keyDer;
|
||||
(void)keySz;
|
||||
|
||||
/* sanity check */
|
||||
if (sig == NULL || out == NULL || keyDer == NULL || ctx == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
CertAtt = (CertAttribute*)ctx;
|
||||
if (!CertAtt) {
|
||||
return CRYPTOCB_UNAVAILABLE;
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (CertAtt->keyIndex != NULL)
|
||||
{
|
||||
ret = wc_sce_tls_CertVerify(CertAtt->cert, CertAtt->certSz, sig, sigSz,
|
||||
CertAtt->pubkey_n_start - CertAtt->certBegin,
|
||||
CertAtt->pubkey_n_len - 1,
|
||||
CertAtt->pubkey_e_start - CertAtt->certBegin,
|
||||
CertAtt->pubkey_e_len -1,
|
||||
(uint8_t*)CertAtt->keyIndex);
|
||||
if (ret == 0){
|
||||
CertAtt->verifyByTSIP_SCE = 1;
|
||||
} else {
|
||||
WOLFSSL_MSG("RSA Verify by SCE didn't match");
|
||||
ret = ASN_SIG_CONFIRM_E;
|
||||
}
|
||||
} else
|
||||
ret = CRYPTOCB_UNAVAILABLE;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Renesas Security Library Common Callback
|
||||
* Callback for Signature PK Ecc verify
|
||||
*
|
||||
* sig Buffer holding signature
|
||||
* sigSz Length of signature in bytes
|
||||
* has Buffer to hold hash
|
||||
* hashSz Length of hash
|
||||
* keyDer Buffer to hold rsa key
|
||||
* keySz Length of key in bytes
|
||||
* result A pointer to int indicates a result
|
||||
* ctx Callback context
|
||||
* return FSP_SUCCESS(0) on sucess,
|
||||
* otherwise CRYPTOCB_UNAVAILABLE
|
||||
* so that caller could continue to process if want
|
||||
*/
|
||||
WOLFSSL_LOCAL int Renesas_cmn_SigPkCbEccVerify(const unsigned char* sig,
|
||||
unsigned int sigSz, const unsigned char* hash, unsigned int hashSz,
|
||||
const unsigned char* keyDer, unsigned int keySz,
|
||||
int* result, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
CertAttribute* CertAtt;
|
||||
|
||||
(void)result;
|
||||
(void)keyDer;
|
||||
(void)keySz;
|
||||
(void)hash;
|
||||
(void)hashSz;
|
||||
/* sanity check */
|
||||
if (sig == NULL || keyDer == NULL || hash == NULL || ctx == NULL ||
|
||||
result == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
|
||||
CertAtt = (CertAttribute*)ctx;
|
||||
if (!CertAtt) {
|
||||
return CRYPTOCB_UNAVAILABLE;
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (CertAtt->keyIndex != NULL)
|
||||
{
|
||||
ret = wc_sce_tls_CertVerify(CertAtt->cert, CertAtt->certSz, sig, sigSz,
|
||||
CertAtt->pubkey_n_start - CertAtt->certBegin,
|
||||
CertAtt->pubkey_n_len - 1,
|
||||
CertAtt->pubkey_e_start - CertAtt->certBegin,
|
||||
CertAtt->pubkey_e_len -1,
|
||||
(uint8_t*)CertAtt->keyIndex);
|
||||
if (ret == 0) {
|
||||
CertAtt->verifyByTSIP_SCE = 1;
|
||||
*result = 1;
|
||||
} else {
|
||||
WOLFSSL_MSG("RSA Verify by SCE didn't match");
|
||||
ret = ASN_SIG_CONFIRM_E;
|
||||
}
|
||||
} else
|
||||
ret = CRYPTOCB_UNAVAILABLE;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* SCEPROTECT || TSIP */
|
531
wolfcrypt/src/port/Renesas/renesas_sce_aes.c
Normal file
531
wolfcrypt/src/port/Renesas/renesas_sce_aes.c
Normal file
@@ -0,0 +1,531 @@
|
||||
/* renesas_sce_aes.c
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
#ifndef NO_AES
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_SCEPROTECT_AES)
|
||||
|
||||
#include <wolfssl/wolfcrypt/wc_port.h>
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
#include <wolfssl/internal.h>
|
||||
#include <wolfssl/wolfcrypt/aes.h>
|
||||
#include "wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h"
|
||||
|
||||
#ifdef NO_INLINE
|
||||
#include <wolfssl/wolfcrypt/misc.h>
|
||||
#else
|
||||
#define WOLFSSL_MISC_INCLUDED
|
||||
#include <wolfcrypt/src/misc.c>
|
||||
#endif
|
||||
|
||||
struct Aes;
|
||||
|
||||
#define SCE_AES_GCM_AUTH_TAG_SIZE 16
|
||||
|
||||
typedef fsp_err_t (*aesGcmEncInitFn)
|
||||
(sce_gcm_handle_t*, sce_aes_wrapped_key_t*, uint8_t*, uint32_t);
|
||||
typedef fsp_err_t (*aesGcmEncUpdateFn)
|
||||
(sce_gcm_handle_t*,uint8_t*, uint8_t*, uint32_t, uint8_t*, uint32_t);
|
||||
typedef fsp_err_t (*aesGcmEncFinalFn)
|
||||
(sce_gcm_handle_t*, uint8_t*, uint32_t*, uint8_t*);
|
||||
|
||||
typedef fsp_err_t (*aesGcmDecInitFn)
|
||||
(sce_gcm_handle_t*, sce_aes_wrapped_key_t*, uint8_t*, uint32_t);
|
||||
typedef fsp_err_t (*aesGcmDecUpdateFn)
|
||||
(sce_gcm_handle_t*,uint8_t*, uint8_t*, uint32_t, uint8_t*, uint32_t);
|
||||
typedef fsp_err_t (*aesGcmDecFinalFn)
|
||||
(sce_gcm_handle_t*, uint8_t*, uint32_t*, uint8_t*, uint32_t);
|
||||
|
||||
/* Perform Aes Gcm encryption by SCE
|
||||
*
|
||||
* aes The AES object.
|
||||
* out Buffer to hold cipher text
|
||||
* in Buffer to hold plaintext
|
||||
* sz Length of cipher text/plaintext in bytes
|
||||
* iv Buffer holding IV/nonce
|
||||
* ivSz Length of IV/nonce in bytes
|
||||
* authTag Buffer to hold authentication data
|
||||
* authTagSz Length of authentication data in bytes
|
||||
* ctx The callback context
|
||||
* return FSP_SUCCESS(0) on Success, otherwise negative value
|
||||
*/
|
||||
WOLFSSL_LOCAL int wc_sce_AesGcmEncrypt(struct Aes* aes, byte* out,
|
||||
const byte* in, word32 sz,
|
||||
byte* iv, word32 ivSz,
|
||||
byte* authTag, word32 authTagSz,
|
||||
const byte* authIn, word32 authInSz,
|
||||
void* ctx)
|
||||
{
|
||||
int ret;
|
||||
sce_gcm_handle_t _handle;
|
||||
uint32_t dataLen = sz;
|
||||
User_SCEPKCbInfo *info = (User_SCEPKCbInfo*)ctx;
|
||||
|
||||
aesGcmEncInitFn initFn;
|
||||
aesGcmEncUpdateFn updateFn;
|
||||
aesGcmEncFinalFn finalFn;
|
||||
|
||||
uint8_t* plainBuf = NULL;
|
||||
uint8_t* cipherBuf = NULL;
|
||||
uint8_t* aTagBuf = NULL;
|
||||
uint8_t delta;
|
||||
const uint8_t* iv_l = NULL;
|
||||
uint32_t ivSz_l = 0;
|
||||
|
||||
sce_hmac_sha_wrapped_key_t key_client_mac;
|
||||
sce_hmac_sha_wrapped_key_t key_server_mac;
|
||||
sce_aes_wrapped_key_t key_client_aes;
|
||||
sce_aes_wrapped_key_t key_server_aes;
|
||||
|
||||
/* sanity check */
|
||||
if (aes == NULL || authTagSz > AES_BLOCK_SIZE || ivSz == 0 || ctx == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
if (authTagSz < WOLFSSL_MIN_AUTH_TAG_SZ) {
|
||||
WOLFSSL_MSG("GcmEncrypt authTagSz too small error");
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
if (aes->ctx.keySize != 16 && aes->ctx.keySize != 32) {
|
||||
WOLFSSL_MSG("keySize is invalid, neither 16 or 32.");
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
if (aes->ctx.keySize == 16) {
|
||||
initFn = R_SCE_AES128GCM_EncryptInit;
|
||||
updateFn = R_SCE_AES128GCM_EncryptUpdate;
|
||||
finalFn = R_SCE_AES128GCM_EncryptFinal;
|
||||
}
|
||||
else {
|
||||
initFn = R_SCE_AES256GCM_EncryptInit;
|
||||
updateFn = R_SCE_AES256GCM_EncryptUpdate;
|
||||
finalFn = R_SCE_AES256GCM_EncryptFinal;
|
||||
}
|
||||
|
||||
|
||||
/* check if AES GCM can be used by SCE */
|
||||
if ((ret = wc_sce_hw_lock()) == 0) {
|
||||
|
||||
/* allocate buffers for plaintaxt, ciphertext and authTag to make sure
|
||||
* those buffers 32bit aligned as SCE requests.
|
||||
*/
|
||||
delta = sz % AES_BLOCK_SIZE;
|
||||
plainBuf = XMALLOC(sz, aes->heap, DYNAMIC_TYPE_AES);
|
||||
cipherBuf = XMALLOC(sz + delta, aes->heap, DYNAMIC_TYPE_AES);
|
||||
aTagBuf = XMALLOC(SCE_AES_GCM_AUTH_TAG_SIZE, aes->heap,
|
||||
DYNAMIC_TYPE_AES);
|
||||
|
||||
if (plainBuf == NULL || cipherBuf == NULL || aTagBuf == NULL) {
|
||||
WOLFSSL_MSG("wc_sce_AesGcmEncrypt: buffer allocation faild");
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
XMEMCPY(plainBuf, in, sz);
|
||||
XMEMSET((void*)cipherBuf, 0, sz + delta);
|
||||
XMEMSET((void*)authTag, 0, authTagSz);
|
||||
}
|
||||
|
||||
if (ret == 0 &&
|
||||
info->session_key_set == 1) {
|
||||
/* generate AES-GCM session key. The key stored in
|
||||
* Aes.ctx.tsip_keyIdx is not used here.
|
||||
*/
|
||||
ret = R_SCE_TLS_SessionKeyGenerate(
|
||||
info->sce_cipher,
|
||||
(uint32_t*)info->sce_masterSecret,
|
||||
(uint8_t*) info->sce_clientRandom,
|
||||
(uint8_t*) info->sce_serverRandom,
|
||||
&iv[AESGCM_IMP_IV_SZ], /* use exp_IV */
|
||||
&key_client_mac,
|
||||
&key_server_mac,
|
||||
&key_client_aes,
|
||||
&key_server_aes,
|
||||
NULL, NULL);
|
||||
if (ret != FSP_SUCCESS) {
|
||||
WOLFSSL_MSG("R_SCE_TLS_SessionKeyGenerate failed");
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
} else if (info->aes256_installedkey_set == 1) {
|
||||
XMEMCPY(&key_client_aes, &info->sce_wrapped_key_aes256,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
iv_l = iv;
|
||||
ivSz_l = ivSz;
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
|
||||
/* since generated session key is coupled to iv, no need to pass
|
||||
* them init func.
|
||||
*/
|
||||
ret = initFn(&_handle, &key_client_aes, (uint8_t*)iv_l, ivSz_l);
|
||||
|
||||
if (ret == FSP_SUCCESS) {
|
||||
ret = updateFn(&_handle, NULL, NULL, 0UL, (uint8_t*)authIn,
|
||||
authInSz);
|
||||
}
|
||||
if (ret == FSP_SUCCESS) {
|
||||
ret = updateFn(&_handle, plainBuf, cipherBuf, sz, NULL, 0UL);
|
||||
}
|
||||
if (ret != FSP_SUCCESS) {
|
||||
WOLFSSL_MSG("R_SCE_AesXXXGcmEncryptUpdate: failed");
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
if (ret == FSP_SUCCESS) {
|
||||
/* Once R_SCE_AesxxxGcmEncryptInit or R_SCE_AesxxxEncryptUpdate is
|
||||
* called, R_SCE_AesxxxGcmEncryptFinal must be called regardless of
|
||||
* the result of the previous call. Otherwise, SCE can not come out
|
||||
* from its error state and all the trailing APIs will fail.
|
||||
*/
|
||||
dataLen = 0;
|
||||
ret = finalFn(&_handle,
|
||||
cipherBuf + (sz / AES_BLOCK_SIZE) * AES_BLOCK_SIZE,
|
||||
&dataLen,
|
||||
aTagBuf);
|
||||
|
||||
if (ret == FSP_SUCCESS) {
|
||||
/* copy encrypted data to out */
|
||||
XMEMCPY(out, cipherBuf, dataLen);
|
||||
|
||||
/* copy auth tag to caller's buffer */
|
||||
XMEMCPY((void*)authTag, (void*)aTagBuf,
|
||||
min(authTagSz, SCE_AES_GCM_AUTH_TAG_SIZE ));
|
||||
|
||||
}
|
||||
else {
|
||||
WOLFSSL_MSG("R_SCE_AesxxxGcmEncryptFinal: failed");
|
||||
ret = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
XFREE(plainBuf, aes->heap, DYNAMIC_TYPE_AES);
|
||||
XFREE(cipherBuf, aes->heap, DYNAMIC_TYPE_AES);
|
||||
XFREE(aTagBuf, aes->heap, DYNAMIC_TYPE_AES);
|
||||
|
||||
wc_sce_hw_unlock();
|
||||
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
/* Perform Aes Gcm decryption by SCE
|
||||
*
|
||||
* aes The AES object.
|
||||
* out Buffer to hold plaintext
|
||||
* in Buffer to hold cipher text
|
||||
* sz Length of cipher text/plaintext in bytes
|
||||
* iv Buffer holding IV/nonce
|
||||
* ivSz Length of IV/nonce in bytes
|
||||
* authTag Buffer to hold authntication data
|
||||
* authTagSz Length of authentication data in bytes
|
||||
* ctx The Callback context
|
||||
* return FSP_SUCCESS(0) on Success, otherwise negative value
|
||||
*/
|
||||
WOLFSSL_LOCAL int wc_sce_AesGcmDecrypt(struct Aes* aes, byte* out,
|
||||
const byte* in, word32 sz,
|
||||
const byte* iv, word32 ivSz,
|
||||
const byte* authTag, word32 authTagSz,
|
||||
const byte* authIn, word32 authInSz,
|
||||
void* ctx)
|
||||
{
|
||||
int ret;
|
||||
sce_gcm_handle_t _handle;
|
||||
uint32_t dataLen = sz;
|
||||
User_SCEPKCbInfo *info = (User_SCEPKCbInfo*)ctx;
|
||||
|
||||
aesGcmDecInitFn initFn;
|
||||
aesGcmDecUpdateFn updateFn;
|
||||
aesGcmDecFinalFn finalFn;
|
||||
|
||||
uint8_t* cipherBuf = NULL;
|
||||
uint8_t* plainBuf = NULL;
|
||||
uint8_t* aTagBuf = NULL;
|
||||
uint8_t delta;
|
||||
const uint8_t* iv_l = NULL;
|
||||
uint32_t ivSz_l = 0;
|
||||
|
||||
sce_hmac_sha_wrapped_key_t key_client_mac;
|
||||
sce_hmac_sha_wrapped_key_t key_server_mac;
|
||||
sce_aes_wrapped_key_t key_client_aes;
|
||||
sce_aes_wrapped_key_t key_server_aes;
|
||||
|
||||
/* sanity check */
|
||||
if (aes == NULL || authTagSz > AES_BLOCK_SIZE || ivSz == 0 || ctx == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
if (authTagSz < WOLFSSL_MIN_AUTH_TAG_SZ) {
|
||||
WOLFSSL_MSG("GcmEncrypt authTagSz too small error");
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
if (aes->ctx.keySize != 16 && aes->ctx.keySize != 32) {
|
||||
WOLFSSL_MSG("keySize is invalid, neither 16 or 32.");
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
if (aes->ctx.keySize == 16) {
|
||||
initFn = R_SCE_AES128GCM_DecryptInit;
|
||||
updateFn = R_SCE_AES128GCM_DecryptUpdate;
|
||||
finalFn = R_SCE_AES128GCM_DecryptFinal;
|
||||
}
|
||||
else {
|
||||
initFn = R_SCE_AES256GCM_DecryptInit;
|
||||
updateFn = R_SCE_AES256GCM_DecryptUpdate;
|
||||
finalFn = R_SCE_AES256GCM_DecryptFinal;
|
||||
}
|
||||
|
||||
|
||||
if ((ret = wc_sce_hw_lock()) == 0) {
|
||||
/* allocate buffers for plain-taxt, cipher-text, authTag and AAD.
|
||||
* TSIP requests those buffers 32bit aligned.
|
||||
*/
|
||||
delta = sz % AES_BLOCK_SIZE;
|
||||
cipherBuf = XMALLOC(sz, aes->heap, DYNAMIC_TYPE_AES);
|
||||
plainBuf = XMALLOC(sz + delta, aes->heap, DYNAMIC_TYPE_AES);
|
||||
aTagBuf = XMALLOC(SCE_AES_GCM_AUTH_TAG_SIZE, aes->heap,
|
||||
DYNAMIC_TYPE_AES);
|
||||
|
||||
if (plainBuf == NULL || cipherBuf == NULL || aTagBuf == NULL) {
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
XMEMSET((void*)plainBuf, 0, sz);
|
||||
XMEMCPY(cipherBuf, in, sz);
|
||||
XMEMCPY(aTagBuf, authTag, authTagSz);
|
||||
}
|
||||
|
||||
if (ret == 0 &&
|
||||
info->session_key_set == 1) {
|
||||
/* generate AES-GCM session key. The key stored in
|
||||
* Aes.ctx.tsip_keyIdx is not used here.
|
||||
*/
|
||||
ret = R_SCE_TLS_SessionKeyGenerate(
|
||||
info->sce_cipher,
|
||||
(uint32_t*)info->sce_masterSecret,
|
||||
(uint8_t*) info->sce_clientRandom,
|
||||
(uint8_t*) info->sce_serverRandom,
|
||||
(uint8_t*)&iv[AESGCM_IMP_IV_SZ], /* use exp_IV */
|
||||
&key_client_mac,
|
||||
&key_server_mac,
|
||||
&key_client_aes,
|
||||
&key_server_aes,
|
||||
NULL, NULL);
|
||||
if (ret != FSP_SUCCESS) {
|
||||
WOLFSSL_MSG("R_SCE_TLS_SessionKeyGenerate failed");
|
||||
ret = -1;
|
||||
}
|
||||
} else if (info->aes256_installedkey_set == 1) {
|
||||
XMEMCPY(&key_server_aes, &info->sce_wrapped_key_aes256,
|
||||
sizeof(sce_aes_wrapped_key_t));
|
||||
iv_l = iv;
|
||||
ivSz_l = ivSz;
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
/* since key_index has iv and ivSz in it, no need to pass them init
|
||||
* func. Pass NULL and 0 as 3rd and 4th parameter respectively.
|
||||
*/
|
||||
ret = initFn(&_handle, &key_server_aes, (uint8_t*)iv_l, ivSz_l);
|
||||
|
||||
|
||||
if (ret == FSP_SUCCESS) {
|
||||
/* pass only AAD and it's size before passing cipher text */
|
||||
ret = updateFn(&_handle, NULL, NULL, 0UL, (uint8_t*)authIn,
|
||||
authInSz);
|
||||
}
|
||||
if (ret == FSP_SUCCESS) {
|
||||
ret = updateFn(&_handle, cipherBuf, plainBuf, sz, NULL, 0UL);
|
||||
}
|
||||
if (ret != FSP_SUCCESS) {
|
||||
WOLFSSL_MSG("R_SCE_AesXXXGcmDecryptUpdate: failed in decrypt");
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
if (ret == FSP_SUCCESS) {
|
||||
dataLen = 0;
|
||||
ret = finalFn(&_handle,
|
||||
plainBuf + (sz / AES_BLOCK_SIZE) * AES_BLOCK_SIZE,
|
||||
&dataLen,
|
||||
aTagBuf,
|
||||
min(16, authTagSz));
|
||||
|
||||
if (ret == FSP_SUCCESS) {
|
||||
/* copy plain data to out */
|
||||
XMEMCPY(out, plainBuf, dataLen);
|
||||
}
|
||||
else {
|
||||
WOLFSSL_MSG("R_SCE_AesXXXGcmDecryptFinal: failed");
|
||||
ret = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
XFREE(aTagBuf, aes->heap, DYNAMIC_TYPE_AES);
|
||||
XFREE(plainBuf, aes->heap, DYNAMIC_TYPE_AES);
|
||||
XFREE(cipherBuf, aes->heap, DYNAMIC_TYPE_AES);
|
||||
|
||||
wc_sce_hw_unlock();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
/* Perform Aes Cbc encryption by SCE
|
||||
*
|
||||
* aes The AES object.
|
||||
* out Buffer to hold cipher text
|
||||
* in Buffer to hold plain text
|
||||
* sz Length of cipher text/plaintext in bytes
|
||||
* return FSP_SUCCESS(0) on Success, otherwise negative value
|
||||
*/
|
||||
WOLFSSL_LOCAL int wc_sce_AesCbcEncrypt(struct Aes* aes, byte* out,
|
||||
const byte* in, word32 sz)
|
||||
{
|
||||
sce_aes_handle_t _handle;
|
||||
word32 ret;
|
||||
word32 blocks = (sz / AES_BLOCK_SIZE);
|
||||
uint32_t dataLength;
|
||||
byte *iv;
|
||||
|
||||
if ((in == NULL) || (out == NULL) || (aes == NULL))
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
/* while doing TLS handshake, SCE driver keeps true-key and iv *
|
||||
* on the device. iv is dummy */
|
||||
iv = (uint8_t*)aes->reg;
|
||||
|
||||
if((ret = wc_sce_hw_lock()) != 0){
|
||||
WOLFSSL_MSG("Failed to lock");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (aes->ctx.keySize == 16) {
|
||||
ret = R_SCE_AES128CBC_EncryptInit(&_handle, &aes->ctx.sce_wrapped_key, iv);
|
||||
} else if (aes->ctx.keySize == 32) {
|
||||
ret = R_SCE_AES256CBC_EncryptInit(&_handle, &aes->ctx.sce_wrapped_key, iv);
|
||||
} else {
|
||||
WOLFSSL_MSG("invalid key Size for SCE. Key size is neither 16 or 32.");
|
||||
wc_sce_hw_unlock();
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (ret == FSP_SUCCESS && blocks--) {
|
||||
|
||||
if (aes->ctx.keySize == 16)
|
||||
ret = R_SCE_AES128CBC_EncryptUpdate(&_handle, (uint8_t*)in,
|
||||
(uint8_t*)out, (uint32_t)AES_BLOCK_SIZE);
|
||||
else
|
||||
ret = R_SCE_AES256CBC_EncryptUpdate(&_handle, (uint8_t*)in,
|
||||
(uint8_t*)out, (uint32_t)AES_BLOCK_SIZE);
|
||||
|
||||
in += AES_BLOCK_SIZE;
|
||||
out += AES_BLOCK_SIZE;
|
||||
}
|
||||
|
||||
if (ret == FSP_SUCCESS) {
|
||||
if (aes->ctx.keySize == 16) {
|
||||
ret = R_SCE_AES128CBC_EncryptFinal(&_handle, out, &dataLength);
|
||||
} else {
|
||||
ret = R_SCE_AES256CBC_EncryptFinal(&_handle, out, &dataLength);
|
||||
}
|
||||
} else {
|
||||
WOLFSSL_MSG("SCE AES CBC encryption failed");
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
wc_sce_hw_unlock();
|
||||
return ret;
|
||||
}
|
||||
/* Perform Aes Cbc decryption by SCE
|
||||
*
|
||||
* aes The AES object.
|
||||
* out Buffer to hold plain text
|
||||
* in Buffer to hold cipher text
|
||||
* sz Length of cipher text/plaintext in bytes
|
||||
* return FSP_SUCCESS(0) on Success, otherwise negative value
|
||||
*/
|
||||
WOLFSSL_LOCAL int wc_sce_AesCbcDecrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
|
||||
{
|
||||
sce_aes_handle_t _handle;
|
||||
word32 ret;
|
||||
word32 blocks = (sz / AES_BLOCK_SIZE);
|
||||
uint32_t dataLength;
|
||||
byte *iv;
|
||||
|
||||
if ((in == NULL) || (out == NULL) || (aes == NULL))
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
iv = (uint8_t*)aes->reg;
|
||||
|
||||
if((ret = wc_sce_hw_lock()) != 0){
|
||||
WOLFSSL_MSG("Failed to lock");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (aes->ctx.keySize == 16) {
|
||||
ret = R_SCE_AES128CBC_DecryptInit(&_handle, &aes->ctx.sce_wrapped_key, iv);
|
||||
} else if (aes->ctx.keySize == 32) {
|
||||
ret = R_SCE_AES256CBC_DecryptInit(&_handle, &aes->ctx.sce_wrapped_key, iv);
|
||||
} else {
|
||||
wc_sce_hw_unlock();
|
||||
return -1;
|
||||
}
|
||||
|
||||
while (ret == FSP_SUCCESS && blocks--) {
|
||||
|
||||
if (aes->ctx.keySize == 16)
|
||||
ret = R_SCE_AES128CBC_DecryptUpdate(&_handle, (uint8_t*)in,
|
||||
(uint8_t*)out, (uint32_t)AES_BLOCK_SIZE);
|
||||
else
|
||||
ret = R_SCE_AES256CBC_DecryptUpdate(&_handle, (uint8_t*)in,
|
||||
(uint8_t*)out, (uint32_t)AES_BLOCK_SIZE);
|
||||
|
||||
in += AES_BLOCK_SIZE;
|
||||
out += AES_BLOCK_SIZE;
|
||||
}
|
||||
|
||||
if (ret == FSP_SUCCESS) {
|
||||
if (aes->ctx.keySize == 16)
|
||||
ret = R_SCE_AES128CBC_DecryptFinal(&_handle, out, &dataLength);
|
||||
else
|
||||
ret = R_SCE_AES256CBC_DecryptFinal(&_handle, out, &dataLength);
|
||||
} else {
|
||||
WOLFSSL_MSG("SCE AES CBC decryption failed");
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
wc_sce_hw_unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* WOLFSSL_RENESAS_TSIP_CRYPT */
|
||||
#endif /* NO_AES */
|
263
wolfcrypt/src/port/Renesas/renesas_sce_sha.c
Normal file
263
wolfcrypt/src/port/Renesas/renesas_sce_sha.c
Normal file
@@ -0,0 +1,263 @@
|
||||
/* renesas_sce_sha.c
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
#if !defined(NO_SHA256)
|
||||
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h>
|
||||
|
||||
/* Free up allocation for msg
|
||||
*
|
||||
* hash The SCE Hash object.
|
||||
* no return value
|
||||
*/
|
||||
static void SCEHashFree(wolfssl_SCE_Hash* hash)
|
||||
{
|
||||
if (hash == NULL)
|
||||
return;
|
||||
|
||||
if (hash->msg != NULL) {
|
||||
XFREE(hash->msg, hash->heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
hash->msg = NULL;
|
||||
}
|
||||
}
|
||||
/* Initialize Hash object
|
||||
*
|
||||
* hash The SCE Hash object.
|
||||
* heap Buffer to hold heap if available
|
||||
* devId device Id
|
||||
* return 0 on success, BAD_FUNC_ARG when has is NULL
|
||||
*/
|
||||
static int SCEHashInit(wolfssl_SCE_Hash* hash, void* heap, int devId,
|
||||
word32 sha_type)
|
||||
{
|
||||
if (hash == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
(void)devId;
|
||||
XMEMSET(hash, 0, sizeof(wolfssl_SCE_Hash));
|
||||
|
||||
hash->heap = heap;
|
||||
hash->len = 0;
|
||||
hash->used = 0;
|
||||
hash->msg = NULL;
|
||||
hash->sha_type = sha_type;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Add data to msg(work buffer) for final hash operation
|
||||
*
|
||||
* hash The SCE Hash object.
|
||||
* data Buffer to hold plain text for hash
|
||||
* sz Length of data
|
||||
* return 0 on success, otherwise MEMORY_E or BAD_FUNC_ARG on failure
|
||||
*/
|
||||
static int SCEHashUpdate(wolfssl_SCE_Hash* hash, const byte* data, word32 sz)
|
||||
{
|
||||
if (hash == NULL || (sz > 0 && data == NULL)) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
if (hash->len < hash->used + sz) {
|
||||
if (hash->msg == NULL) {
|
||||
hash->msg = (byte*)XMALLOC(hash->used + sz, hash->heap,
|
||||
DYNAMIC_TYPE_TMP_BUFFER);
|
||||
} else {
|
||||
#ifdef FREERTOS
|
||||
byte* pt = (byte*)XMALLOC(hash->used + sz, hash->heap,
|
||||
DYNAMIC_TYPE_TMP_BUFFER);
|
||||
if (pt == NULL) {
|
||||
return MEMORY_E;
|
||||
}
|
||||
XMEMCPY(pt, hash->msg, hash->used);
|
||||
XFREE(hash->msg, hash->heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
hash->msg = NULL;
|
||||
hash->msg = pt;
|
||||
#else
|
||||
byte* pt = (byte*)XREALLOC(hash->msg, hash->used + sz, hash->heap,
|
||||
DYNAMIC_TYPE_TMP_BUFFER);
|
||||
if (pt == NULL) {
|
||||
return MEMORY_E;
|
||||
}
|
||||
hash->msg = pt;
|
||||
#endif
|
||||
}
|
||||
if (hash->msg == NULL) {
|
||||
return MEMORY_E;
|
||||
}
|
||||
hash->len = hash->used + sz;
|
||||
}
|
||||
XMEMCPY(hash->msg + hash->used, data , sz);
|
||||
hash->used += sz;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Perform hash operation using accumulated msg
|
||||
*
|
||||
* hash The SCE Hash object.
|
||||
* out Buffer to hold hashed text
|
||||
* outSz Length of out
|
||||
* return FSP_SUCCESS(0) on success,
|
||||
* otherwise BAD_FUNC_ARG or FSP Error code on failure
|
||||
*/
|
||||
static int SCEHashFinal(wolfssl_SCE_Hash* hash, byte* out, word32 outSz)
|
||||
{
|
||||
int ret;
|
||||
void* heap;
|
||||
sce_sha_md5_handle_t handle;
|
||||
uint32_t sz;
|
||||
|
||||
fsp_err_t (*Init)(sce_sha_md5_handle_t*);
|
||||
fsp_err_t (*Update)(sce_sha_md5_handle_t*, uint8_t*, uint32_t);
|
||||
fsp_err_t (*Final )(sce_sha_md5_handle_t*, uint8_t*, uint32_t*);
|
||||
|
||||
if (hash == NULL || out == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
if (hash->sha_type == SCE_SHA256) {
|
||||
Init = R_SCE_SHA256_Init;
|
||||
Update = R_SCE_SHA256_Update;
|
||||
Final = R_SCE_SHA256_Final;
|
||||
} else
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
heap = hash->heap;
|
||||
|
||||
wc_sce_hw_lock();
|
||||
|
||||
if (Init(&handle) == FSP_SUCCESS) {
|
||||
ret = Update(&handle, (uint8_t*)hash->msg, hash->used);
|
||||
if (ret == FSP_SUCCESS) {
|
||||
ret = Final(&handle, out, (uint32_t*)&sz);
|
||||
if (ret != FSP_SUCCESS || sz != outSz) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
wc_sce_hw_unlock();
|
||||
|
||||
SCEHashFree(hash);
|
||||
return SCEHashInit(hash, heap, 0, hash->sha_type);
|
||||
}
|
||||
/* Hash operation to message and return a result */
|
||||
static int SCEHashGet(wolfssl_SCE_Hash* hash, byte* out, word32 outSz)
|
||||
{
|
||||
int ret;
|
||||
sce_sha_md5_handle_t handle;
|
||||
uint32_t sz;
|
||||
|
||||
fsp_err_t (*Init)(sce_sha_md5_handle_t*);
|
||||
fsp_err_t (*Update)(sce_sha_md5_handle_t*, uint8_t*, uint32_t);
|
||||
fsp_err_t (*Final )(sce_sha_md5_handle_t*, uint8_t*, uint32_t*);
|
||||
|
||||
if (hash == NULL || out == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
if (hash->sha_type == SCE_SHA256) {
|
||||
Init = R_SCE_SHA256_Init;
|
||||
Update = R_SCE_SHA256_Update;
|
||||
Final = R_SCE_SHA256_Final;
|
||||
} else
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
wc_sce_hw_lock();
|
||||
|
||||
if (Init(&handle) == FSP_SUCCESS) {
|
||||
ret = Update(&handle, (uint8_t*)hash->msg, hash->used);
|
||||
if (ret == FSP_SUCCESS) {
|
||||
ret = Final(&handle, out, &sz);
|
||||
if (ret != FSP_SUCCESS || sz != outSz) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wc_sce_hw_unlock();
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* copy hash result from src to dst */
|
||||
static int SCEHashCopy(wolfssl_SCE_Hash* src, wolfssl_SCE_Hash* dst)
|
||||
{
|
||||
if (src == NULL || dst == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
XMEMCPY(dst, src, sizeof(wolfssl_SCE_Hash));
|
||||
|
||||
if (src->len > 0 && src->msg != NULL) {
|
||||
dst->msg = (byte*)XMALLOC(src->len, dst->heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
if (dst->msg == NULL) {
|
||||
return MEMORY_E;
|
||||
}
|
||||
XMEMCPY(dst->msg, src->msg, src->len);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !defined(NO_SHA256)
|
||||
#include <wolfssl/wolfcrypt/sha256.h>
|
||||
|
||||
/* wrapper for wc_InitSha256_ex */
|
||||
int wc_InitSha256_ex(wc_Sha256* sha, void* heap, int devId)
|
||||
{
|
||||
return SCEHashInit(sha, heap, devId, SCE_SHA256);
|
||||
}
|
||||
/* wrapper for wc_Sha256Update */
|
||||
int wc_Sha256Update(wc_Sha256* sha, const byte* in, word32 sz)
|
||||
{
|
||||
return SCEHashUpdate(sha, in, sz);
|
||||
}
|
||||
/* wrapper for wc_Sha256Final */
|
||||
int wc_Sha256Final(wc_Sha256* sha, byte* hash)
|
||||
{
|
||||
return SCEHashFinal(sha, hash, WC_SHA256_DIGEST_SIZE);
|
||||
}
|
||||
/* wrapper for wc_Sha256GetHash */
|
||||
int wc_Sha256GetHash(wc_Sha256* sha, byte* hash)
|
||||
{
|
||||
return SCEHashGet(sha, hash, WC_SHA256_DIGEST_SIZE);
|
||||
}
|
||||
/* wrapper for wc_Sha256Copy */
|
||||
int wc_Sha256Copy(wc_Sha256* src, wc_Sha256* dst)
|
||||
{
|
||||
return SCEHashCopy(src, dst);
|
||||
}
|
||||
#endif /* !NO_SHA256 */
|
||||
#endif /* WOLFSSL_RENESAS_SCEPROTECT */
|
||||
#endif /* #if !defined(NO_SHA) || !defined(NO_SHA256) */
|
1112
wolfcrypt/src/port/Renesas/renesas_sce_util.c
Normal file
1112
wolfcrypt/src/port/Renesas/renesas_sce_util.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -218,7 +218,7 @@ int tsip_useable(const struct WOLFSSL *ssl)
|
||||
|
||||
/* when rsa key index == NULL, tsip isn't used for cert verification. */
|
||||
/* in the case, we cannot use TSIP. */
|
||||
if (!ssl->peerTsipEncRsaKeyIndex)
|
||||
if (!ssl->peerSceTsipEncRsaKeyIndex)
|
||||
return 0;
|
||||
|
||||
/* when enabled Extended Master Secret, we cannot use TSIP. */
|
||||
@@ -242,19 +242,7 @@ int tsip_useable(const struct WOLFSSL *ssl)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* check if the g_alreadyVerified CA's key can be used for *
|
||||
* peer's certification */
|
||||
byte tsip_checkCA(word32 cmIdx)
|
||||
{
|
||||
return (cmIdx == g_CAscm_Idx? 1:0);
|
||||
}
|
||||
|
||||
/* check if the root CA has been verified by TSIP, *
|
||||
* and it exists in the CM table. */
|
||||
byte tsip_rootCAverified( )
|
||||
{
|
||||
return (g_CAscm_Idx != (uint32_t)-1 ? 1:0);
|
||||
}
|
||||
|
||||
/* open TSIP driver for use */
|
||||
int tsip_Open()
|
||||
@@ -820,14 +808,14 @@ int tsip_generateEncryptPreMasterSecret(
|
||||
#if (WOLFSSL_RENESAS_TSIP_VER>=109)
|
||||
|
||||
ret = R_TSIP_TlsEncryptPreMasterSecretWithRsa2048PublicKey(
|
||||
(uint32_t*)ssl->peerTsipEncRsaKeyIndex,
|
||||
(uint32_t*)ssl->peerSceTsipEncRsaKeyIndex,
|
||||
(uint32_t*)&ssl->arrays->preMasterSecret[VERSION_SZ],
|
||||
(uint8_t*)out);
|
||||
|
||||
#elif (WOLFSSL_RENESAS_TSIP_VER>=106)
|
||||
|
||||
ret = R_TSIP_TlsEncryptPreMasterSecret(
|
||||
(uint32_t*)ssl->peerTsipEncRsaKeyIndex,
|
||||
(uint32_t*)ssl->peerSceTsipEncRsaKeyIndex,
|
||||
(uint32_t*)&ssl->arrays->preMasterSecret[VERSION_SZ],
|
||||
(uint8_t*)out);
|
||||
|
||||
|
@@ -2488,7 +2488,32 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
#include "r_sce.h"
|
||||
|
||||
int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
||||
{
|
||||
int ret;
|
||||
word32 buffer[4];
|
||||
|
||||
while (sz > 0) {
|
||||
word32 len = sizeof(buffer);
|
||||
|
||||
if (sz < len) {
|
||||
len = sz;
|
||||
}
|
||||
/* return 4 words random number*/
|
||||
ret = R_SCE_RandomNumberGenerate(buffer);
|
||||
if(ret == FSP_SUCCESS) {
|
||||
XMEMCPY(output, &buffer, len);
|
||||
output += len;
|
||||
sz -= len;
|
||||
} else
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#elif defined(WOLFSSL_SCE) && !defined(WOLFSSL_SCE_NO_TRNG)
|
||||
#include "hal_data.h"
|
||||
|
||||
|
@@ -182,7 +182,9 @@ where 0 <= L < 2^64.
|
||||
(!defined(WOLFSSL_ESP32WROOM32_CRYPT) || defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH)) && \
|
||||
(!defined(WOLFSSL_RENESAS_TSIP_CRYPT) || defined(NO_WOLFSSL_RENESAS_TSIP_HASH)) && \
|
||||
!defined(WOLFSSL_PSOC6_CRYPTO) && !defined(WOLFSSL_IMXRT_DCP) && !defined(WOLFSSL_SILABS_SE_ACCEL) && \
|
||||
!defined(WOLFSSL_KCAPI_HASH) && !defined(WOLFSSL_SE050_HASH)
|
||||
!defined(WOLFSSL_KCAPI_HASH) && !defined(WOLFSSL_SE050_HASH) && \
|
||||
(!defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(NO_WOLFSSL_RENESAS_SCEPROTECT_HASH))
|
||||
|
||||
|
||||
|
||||
static int InitSha256(wc_Sha256* sha256)
|
||||
@@ -743,6 +745,11 @@ static int InitSha256(wc_Sha256* sha256)
|
||||
|
||||
/* implemented in wolfcrypt/src/port/Renesas/renesas_tsip_sha.c */
|
||||
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_SCEPROTECT_HASH)
|
||||
|
||||
/* implemented in wolfcrypt/src/port/Renesas/renesas_sce_sha.c */
|
||||
|
||||
#elif defined(WOLFSSL_PSOC6_CRYPTO)
|
||||
|
||||
/* implemented in wolfcrypt/src/port/cypress/psoc6_crypto.c */
|
||||
@@ -1640,7 +1647,10 @@ void wc_Sha256Free(wc_Sha256* sha256)
|
||||
#if (defined(WOLFSSL_AFALG_HASH) && defined(WOLFSSL_AFALG_HASH_KEEP)) || \
|
||||
(defined(WOLFSSL_DEVCRYPTO_HASH) && defined(WOLFSSL_DEVCRYPTO_HASH_KEEP)) || \
|
||||
(defined(WOLFSSL_RENESAS_TSIP_CRYPT) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_TSIP_CRYPT_HASH))
|
||||
!defined(NO_WOLFSSL_RENESAS_TSIP_CRYPT_HASH)) && \
|
||||
(defined(WOLFSSL_RENESAS_SCEPROTECT) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_SCEPROTECT_HASH))
|
||||
|
||||
if (sha256->msg != NULL) {
|
||||
XFREE(sha256->msg, sha256->heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
sha256->msg = NULL;
|
||||
@@ -1739,6 +1749,12 @@ void wc_Sha256Free(wc_Sha256* sha256)
|
||||
!defined(NO_WOLFSSL_RENESAS_TSIP_CRYPT_HASH)
|
||||
|
||||
/* implemented in wolfcrypt/src/port/Renesas/renesas_tsip_sha.c */
|
||||
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_SCEPROTECT_HASH)
|
||||
|
||||
/* implemented in wolfcrypt/src/port/Renesas/renesas_sce_sha.c */
|
||||
|
||||
#elif defined(WOLFSSL_PSOC6_CRYPTO)
|
||||
/* implemented in wolfcrypt/src/port/cypress/psoc6_crypto.c */
|
||||
#elif defined(WOLFSSL_IMXRT_DCP)
|
||||
|
@@ -57,6 +57,9 @@
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h>
|
||||
#endif
|
||||
#if defined(WOLFSSL_RENESAS_SCE)
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h>
|
||||
#endif
|
||||
#if defined(WOLFSSL_STSAFEA100)
|
||||
#include <wolfssl/wolfcrypt/port/st/stsafe.h>
|
||||
#endif
|
||||
@@ -153,7 +156,17 @@ int wolfCrypt_Init(void)
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
ret = wc_sce_Open( );
|
||||
if( ret != FSP_SUCCESS ) {
|
||||
WOLFSSL_MSG("RENESAS SCE Open failed");
|
||||
/* not return 1 since WOLFSSL_SUCCESS=1*/
|
||||
ret = -1;/* FATAL ERROR */
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_TRACK_MEMORY) && !defined(WOLFSSL_STATIC_MEMORY)
|
||||
ret = InitMemoryTracker();
|
||||
if (ret != 0) {
|
||||
@@ -353,9 +366,16 @@ int wolfCrypt_Cleanup(void)
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
wolfAsync_HardwareStop();
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_RENESAS_SCEPROTECT
|
||||
wc_sce_Close();
|
||||
#else
|
||||
|
||||
#ifdef WOLFSSL_SCE
|
||||
|
||||
WOLFSSL_SCE_GSCE_HANDLE.p_api->close(WOLFSSL_SCE_GSCE_HANDLE.p_ctrl);
|
||||
#endif
|
||||
#endif
|
||||
#if defined(WOLFSSL_IMX6_CAAM) || defined(WOLFSSL_IMX6_CAAM_RNG) || \
|
||||
defined(WOLFSSL_IMX6_CAAM_BLOB)
|
||||
wc_caamFree();
|
||||
|
@@ -1226,7 +1226,7 @@ initDefaultName();
|
||||
test_pass("OPENSSL (EVP Sign/Verify) passed!\n");
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_ECC
|
||||
PRIVATE_KEY_UNLOCK();
|
||||
if ( (ret = ecc_test()) != 0)
|
||||
@@ -2316,7 +2316,7 @@ WOLFSSL_TEST_SUBROUTINE int sha_test(void)
|
||||
|
||||
/* BEGIN LARGE HASH TEST */ {
|
||||
byte large_input[1024];
|
||||
#ifdef WOLFSSL_RENESAS_TSIP
|
||||
#if defined(WOLFSSL_RENESAS_TSIP) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
const char* large_digest =
|
||||
"\x1d\x6a\x5a\xf6\xe5\x7c\x86\xce\x7f\x7c\xaf\xd5\xdb\x08\xcd\x59"
|
||||
"\x15\x8c\x6d\xb6";
|
||||
@@ -2328,7 +2328,7 @@ WOLFSSL_TEST_SUBROUTINE int sha_test(void)
|
||||
for (i = 0; i < (int)sizeof(large_input); i++) {
|
||||
large_input[i] = (byte)(i & 0xFF);
|
||||
}
|
||||
#ifdef WOLFSSL_RENESAS_TSIP
|
||||
#if defined(WOLFSSL_RENESAS_TSIP) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
times = 20;
|
||||
#else
|
||||
times = 100;
|
||||
@@ -2706,7 +2706,7 @@ WOLFSSL_TEST_SUBROUTINE int sha256_test(void)
|
||||
|
||||
/* BEGIN LARGE HASH TEST */ {
|
||||
byte large_input[1024];
|
||||
#ifdef WOLFSSL_RENESAS_TSIP_CRYPT
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_CRYPT) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
const char* large_digest =
|
||||
"\xa4\x75\x9e\x7a\xa2\x03\x38\x32\x88\x66\xa2\xea\x17\xea\xf8\xc7"
|
||||
"\xfe\x4e\xc6\xbb\xe3\xbb\x71\xce\xe7\xdf\x7c\x04\x61\xb3\xc2\x2f";
|
||||
@@ -2718,7 +2718,7 @@ WOLFSSL_TEST_SUBROUTINE int sha256_test(void)
|
||||
for (i = 0; i < (int)sizeof(large_input); i++) {
|
||||
large_input[i] = (byte)(i & 0xFF);
|
||||
}
|
||||
#ifdef WOLFSSL_RENESAS_TSIP
|
||||
#if defined(WOLFSSL_RENESAS_TSIP) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
times = 20;
|
||||
#else
|
||||
times = 100;
|
||||
@@ -22723,7 +22723,7 @@ static int ecc_exp_imp_test(ecc_key* key)
|
||||
#endif
|
||||
byte priv[32];
|
||||
word32 privLen;
|
||||
byte pub[65];
|
||||
byte pub[65*2];
|
||||
word32 pubLen, pubLenX, pubLenY;
|
||||
const char qx[] = "7a4e287890a1a47ad3457e52f2f76a83"
|
||||
"ce46cbc947616d0cbaa82323818a793d";
|
||||
|
@@ -2256,6 +2256,11 @@ typedef struct Keys {
|
||||
tsip_hmac_sha_key_index_t tsip_server_write_MAC_secret;
|
||||
|
||||
#endif
|
||||
#ifdef WOLFSSL_RENESAS_SCEPROTECT
|
||||
|
||||
sce_hmac_sha_wrapped_key_t sce_client_write_MAC_secret;
|
||||
sce_hmac_sha_wrapped_key_t sce_server_write_MAC_secret;
|
||||
#endif
|
||||
} Keys;
|
||||
|
||||
|
||||
@@ -3052,6 +3057,12 @@ struct WOLFSSL_CTX {
|
||||
CallbackRsaEnc RsaEncCb; /* User Rsa Public Encrypt handler */
|
||||
CallbackRsaDec RsaDecCb; /* User Rsa Private Decrypt handler */
|
||||
#endif /* NO_RSA */
|
||||
CallbackGenPreMaster GenPreMasterCb; /* Use generate pre-master handler */
|
||||
CallbackGenMasterSecret GenMasterCb; /* Use generate master secret handler */
|
||||
CallbackGenSessionKey GenSessionKeyCb; /* Use generate session key handler */
|
||||
CallbackEncryptKeys EncryptKeysCb;/* Use setting encrypt keys handler */
|
||||
CallbackTlsFinished TlsFinishedCb; /* Use Tls finished handler */
|
||||
CallbackVerifyMac VerifyMacCb; /* Use Verify mac handler */
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
#ifdef HAVE_WOLF_EVENT
|
||||
WOLF_EVENT_QUEUE event_queue;
|
||||
@@ -3756,6 +3767,9 @@ typedef struct Arrays {
|
||||
!defined(NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION)
|
||||
byte tsip_masterSecret[TSIP_TLS_MASTERSECRET_SIZE];
|
||||
#endif
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
byte sce_masterSecret[SCE_TLS_MASTERSECRET_SIZE];
|
||||
#endif
|
||||
#ifdef WOLFSSL_DTLS
|
||||
byte cookie[MAX_COOKIE_LEN];
|
||||
byte cookieSz;
|
||||
@@ -4242,8 +4256,8 @@ struct WOLFSSL {
|
||||
#endif /* OPENSSL_EXTRA */
|
||||
#ifndef NO_RSA
|
||||
RsaKey* peerRsaKey;
|
||||
#ifdef WOLFSSL_RENESAS_TSIP_TLS
|
||||
byte *peerTsipEncRsaKeyIndex;
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
byte* peerSceTsipEncRsaKeyIndex;
|
||||
#endif
|
||||
byte peerRsaKeyPresent;
|
||||
#endif
|
||||
@@ -4469,6 +4483,12 @@ struct WOLFSSL {
|
||||
void* RsaEncCtx; /* Rsa Public Encrypt Callback Context */
|
||||
void* RsaDecCtx; /* Rsa Private Decrypt Callback Context */
|
||||
#endif /* NO_RSA */
|
||||
void* GenPreMasterCtx; /* Generate Premaster Callback Context */
|
||||
void* GenMasterCtx; /* Generate Master Callback Context */
|
||||
void* GenSessionKeyCtx; /* Generate Sesssion Key Callback Context */
|
||||
void* EncryptKeysCtx; /* Set Encrypt keys Callback Context */
|
||||
void* TlsFinishedCtx; /* Generate Tls Finished Callback Context */
|
||||
void* VerifyMacCtx; /* Verify mac Callback Context */
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
#ifdef HAVE_SECRET_CALLBACK
|
||||
SessionSecretCb sessionSecretCb;
|
||||
|
@@ -3208,6 +3208,49 @@ WOLFSSL_API void wolfSSL_CTX_SetRsaDecCb(WOLFSSL_CTX*, CallbackRsaDec);
|
||||
WOLFSSL_API void wolfSSL_SetRsaDecCtx(WOLFSSL* ssl, void *ctx);
|
||||
WOLFSSL_API void* wolfSSL_GetRsaDecCtx(WOLFSSL* ssl);
|
||||
#endif
|
||||
|
||||
/* Protocol Callback */
|
||||
typedef int (*CallbackGenMasterSecret)(WOLFSSL* ssl, void* ctx);
|
||||
WOLFSSL_API void wolfSSL_CTX_SetGenMasterSecretCb(WOLFSSL_CTX*,
|
||||
CallbackGenMasterSecret);
|
||||
WOLFSSL_API void wolfSSL_SetGenMasterSecretCtx(WOLFSSL* ssl, void *ctx);
|
||||
WOLFSSL_API void* wolfSSL_GetGenMasterSecretCtx(WOLFSSL* ssl);
|
||||
|
||||
typedef int (*CallbackGenPreMaster)(WOLFSSL* ssl, byte *premaster,
|
||||
word32 preSz, void* ctx);
|
||||
WOLFSSL_API void wolfSSL_CTX_SetGenPreMasterCb(WOLFSSL_CTX*,
|
||||
CallbackGenPreMaster);
|
||||
WOLFSSL_API void wolfSSL_SetGenPreMasterCtx(WOLFSSL* ssl, void *ctx);
|
||||
WOLFSSL_API void* wolfSSL_GetGenPreMasterCtx(WOLFSSL* ssl);
|
||||
|
||||
typedef int (*CallbackGenSessionKey)(WOLFSSL* ssl, void* ctx);
|
||||
WOLFSSL_API void wolfSSL_CTX_SetGenSessionKeyCb(WOLFSSL_CTX*,
|
||||
CallbackGenSessionKey);
|
||||
WOLFSSL_API void wolfSSL_SetGenSessionKeyCtx(WOLFSSL* ssl, void *ctx);
|
||||
WOLFSSL_API void* wolfSSL_GetGenSessionKeyCtx(WOLFSSL* ssl);
|
||||
|
||||
typedef int (*CallbackEncryptKeys)(WOLFSSL* ssl, void* ctx);
|
||||
WOLFSSL_API void wolfSSL_CTX_SetEncryptKeysCb(WOLFSSL_CTX*,
|
||||
CallbackEncryptKeys);
|
||||
WOLFSSL_API void wolfSSL_SetEncryptKeysCtx(WOLFSSL* ssl, void *ctx);
|
||||
WOLFSSL_API void* wolfSSL_GetEncryptKeysCtx(WOLFSSL* ssl);
|
||||
|
||||
typedef int (*CallbackTlsFinished)(WOLFSSL* ssl,
|
||||
const byte *side,
|
||||
const byte *handshake_hash,
|
||||
byte *hashes, void* ctx);
|
||||
WOLFSSL_API void wolfSSL_CTX_SetTlsFinishedCb(WOLFSSL_CTX*, CallbackTlsFinished);
|
||||
WOLFSSL_API void wolfSSL_SetTlsFinishedCtx(WOLFSSL* ssl, void *ctx);
|
||||
WOLFSSL_API void* wolfSSL_GetTlsFinishedCtx(WOLFSSL* ssl);
|
||||
|
||||
#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_AEAD_ONLY)
|
||||
typedef int (*CallbackVerifyMac)(WOLFSSL *ssl, const byte* message,
|
||||
word32 messageSz, word32 macSz, word32 content, void* ctx);
|
||||
WOLFSSL_API void wolfSSL_CTX_SetVerifyMacCb(WOLFSSL_CTX*, CallbackVerifyMac);
|
||||
WOLFSSL_API void wolfSSL_SetVerifyMacCtx(WOLFSSL* ssl, void *ctx);
|
||||
WOLFSSL_API void* wolfSSL_GetVerifyMacCtx(WOLFSSL* ssl);
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
|
||||
#ifndef NO_CERTS
|
||||
|
138
wolfssl/test.h
138
wolfssl/test.h
@@ -4606,6 +4606,118 @@ static WC_INLINE int myRsaDec(WOLFSSL* ssl, byte* in, word32 inSz,
|
||||
|
||||
#endif /* NO_RSA */
|
||||
|
||||
static WC_INLINE int myGenMaster(WOLFSSL* ssl, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
PkCbInfo* cbInfo = (PkCbInfo*)ctx;
|
||||
|
||||
(void)ssl;
|
||||
(void)cbInfo;
|
||||
|
||||
WOLFSSL_PKMSG("Gen Master");
|
||||
/* fall through to original routine */
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
WOLFSSL_PKMSG("Gen Master: ret %d\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static WC_INLINE int myGenPreMaster(WOLFSSL* ssl, byte *premaster,
|
||||
word32 preSz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
PkCbInfo* cbInfo = (PkCbInfo*)ctx;
|
||||
|
||||
(void) ssl;
|
||||
(void) cbInfo;
|
||||
(void) premaster;
|
||||
(void) preSz;
|
||||
|
||||
WOLFSSL_PKMSG("Gen Pre-Master Cb");
|
||||
/* fall through to original routine */
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
WOLFSSL_PKMSG("Gen Pre-Master Cb: ret %d\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static WC_INLINE int myGenSessionKey(WOLFSSL* ssl, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
PkCbInfo* cbInfo = (PkCbInfo*)ctx;
|
||||
|
||||
(void)ssl;
|
||||
(void)cbInfo;
|
||||
|
||||
WOLFSSL_PKMSG("Gen Master Cb");
|
||||
/* fall through to original routine */
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
WOLFSSL_PKMSG("Gen Master Cb: ret %d\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static WC_INLINE int mySetEncryptKeys(WOLFSSL* ssl, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
PkCbInfo* cbInfo = (PkCbInfo*)ctx;
|
||||
|
||||
(void)ssl;
|
||||
(void)cbInfo;
|
||||
|
||||
WOLFSSL_PKMSG("Set Encrypt Keys Cb");
|
||||
/* fall through to original routine */
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
WOLFSSL_PKMSG("Set Encrypt Keys Cb: ret %d\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_AEAD_ONLY)
|
||||
static WC_INLINE int myVerifyMac(WOLFSSL *ssl, const byte* message,
|
||||
word32 messageSz, word32 macSz, word32 content, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
PkCbInfo* cbInfo = (PkCbInfo*)ctx;
|
||||
|
||||
(void)ssl;
|
||||
(void)message;
|
||||
(void)messageSz;
|
||||
(void)macSz;
|
||||
(void)content;
|
||||
(void)cbInfo;
|
||||
|
||||
WOLFSSL_PKMSG("Verify Mac Cb");
|
||||
/* fall through to original routine */
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
WOLFSSL_PKMSG("Verify Mac Cb: ret %d\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
static WC_INLINE int myTlsFinished(WOLFSSL* ssl,
|
||||
const byte *side,
|
||||
const byte *handshake_hash,
|
||||
byte *hashes, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
PkCbInfo* cbInfo = (PkCbInfo*)ctx;
|
||||
|
||||
(void)ssl;
|
||||
(void)cbInfo;
|
||||
(void)side;
|
||||
(void)handshake_hash;
|
||||
(void)hashes;
|
||||
|
||||
WOLFSSL_PKMSG("Tls Finished Cb");
|
||||
/* fall through to original routine */
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
WOLFSSL_PKMSG("Tls Finished Cb: ret %d\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static WC_INLINE void SetupPkCallbacks(WOLFSSL_CTX* ctx)
|
||||
{
|
||||
(void)ctx;
|
||||
@@ -4655,6 +4767,19 @@ static WC_INLINE void SetupPkCallbacks(WOLFSSL_CTX* ctx)
|
||||
wolfSSL_CTX_SetRsaEncCb(ctx, myRsaEnc);
|
||||
wolfSSL_CTX_SetRsaDecCb(ctx, myRsaDec);
|
||||
#endif /* NO_RSA */
|
||||
|
||||
#ifndef NO_CERTS
|
||||
wolfSSL_CTX_SetGenMasterSecretCb(ctx, myGenMaster);
|
||||
wolfSSL_CTX_SetGenPreMasterCb(ctx, myGenPreMaster);
|
||||
wolfSSL_CTX_SetGenSessionKeyCb(ctx, myGenSessionKey);
|
||||
wolfSSL_CTX_SetEncryptKeysCb(ctx, mySetEncryptKeys);
|
||||
|
||||
#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_AEAD_ONLY)
|
||||
wolfSSL_CTX_SetVerifyMacCb(ctx, myVerifyMac);
|
||||
#endif
|
||||
|
||||
wolfSSL_CTX_SetTlsFinishedCb(ctx, myTlsFinished);
|
||||
#endif /* NO_CERTS */
|
||||
}
|
||||
|
||||
static WC_INLINE void SetupPkCallbackContexts(WOLFSSL* ssl, void* myCtx)
|
||||
@@ -4694,6 +4819,19 @@ static WC_INLINE void SetupPkCallbackContexts(WOLFSSL* ssl, void* myCtx)
|
||||
wolfSSL_SetRsaEncCtx(ssl, myCtx);
|
||||
wolfSSL_SetRsaDecCtx(ssl, myCtx);
|
||||
#endif /* NO_RSA */
|
||||
|
||||
#ifndef NO_CERTS
|
||||
wolfSSL_SetGenMasterSecretCtx(ssl, myCtx);
|
||||
wolfSSL_SetGenPreMasterCtx(ssl, myCtx);
|
||||
wolfSSL_SetGenSessionKeyCtx(ssl, myCtx);
|
||||
wolfSSL_SetEncryptKeysCtx(ssl, myCtx);
|
||||
|
||||
#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_AEAD_ONLY)
|
||||
wolfSSL_SetVerifyMacCtx(ssl, myCtx);
|
||||
#endif
|
||||
|
||||
wolfSSL_SetTlsFinishedCtx(ssl, myCtx);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
|
@@ -262,6 +262,9 @@ struct Aes {
|
||||
defined(WOLFSSL_RENESAS_TSIP_TLS_AES_CRYPT)
|
||||
TSIP_AES_CTX ctx;
|
||||
#endif
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
SCE_AES_CTX ctx;
|
||||
#endif
|
||||
#if defined(WOLFSSL_IMXRT_DCP)
|
||||
dcp_handle_t handle;
|
||||
#endif
|
||||
|
@@ -1213,6 +1213,22 @@ enum SignatureState {
|
||||
#endif
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT) ||\
|
||||
defined(HAVE_PK_CALLBACKS)
|
||||
typedef struct tagCertAttribute {
|
||||
byte verifyByTSIP_SCE;
|
||||
word32 certBegin;
|
||||
word32 pubkey_n_start;
|
||||
word32 pubkey_n_len;
|
||||
word32 pubkey_e_start;
|
||||
word32 pubkey_e_len;
|
||||
int curve_id;
|
||||
const byte* cert;
|
||||
word32 certSz;
|
||||
const byte* keyIndex;
|
||||
} CertAttribute;
|
||||
#endif
|
||||
|
||||
struct SignatureCtx {
|
||||
void* heap;
|
||||
byte* digest;
|
||||
@@ -1268,13 +1284,9 @@ struct SignatureCtx {
|
||||
#endif
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
#ifndef NO_RSA
|
||||
#ifdef WOLFSSL_RENESAS_TSIP_TLS
|
||||
byte verifyByTSIP;
|
||||
word32 certBegin;
|
||||
word32 pubkey_n_start;
|
||||
word32 pubkey_n_len;
|
||||
word32 pubkey_e_start;
|
||||
word32 pubkey_e_len;
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT) ||\
|
||||
defined(HAVE_PK_CALLBACKS)
|
||||
CertAttribute CertAtt;
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
@@ -1552,10 +1564,10 @@ struct DecodedCert {
|
||||
#ifndef NO_CERTS
|
||||
SignatureCtx sigCtx;
|
||||
#endif
|
||||
#ifdef WOLFSSL_RENESAS_TSIP
|
||||
byte* tsip_encRsaKeyIdx;
|
||||
#if defined(WOLFSSL_RENESAS_TSIP) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
byte* sce_tsip_encRsaKeyIdx;
|
||||
#endif
|
||||
|
||||
|
||||
int badDate;
|
||||
int criticalExt;
|
||||
|
||||
@@ -1643,7 +1655,7 @@ struct Signer {
|
||||
#ifdef WOLFSSL_SIGNER_DER_CERT
|
||||
DerBuffer* derCert;
|
||||
#endif
|
||||
#ifdef WOLFSSL_RENESAS_TSIP_TLS
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
word32 cm_idx;
|
||||
#endif
|
||||
Signer* next;
|
||||
|
@@ -246,8 +246,9 @@ enum {
|
||||
DHE_PCT_E = -285, /* DHE Pairwise Consistency Test failure */
|
||||
ECC_PCT_E = -286, /* ECDHE Pairwise Consistency Test failure */
|
||||
FIPS_PRIVATE_KEY_LOCKED_E = -287, /* Cannot export private key. */
|
||||
|
||||
WC_LAST_E = -287, /* Update this to indicate last error */
|
||||
PROTOCOLCB_UNAVAILABLE = -288, /* Protocol callback unavailable */
|
||||
|
||||
WC_LAST_E = -288, /* Update this to indicate last error */
|
||||
MIN_CODE_E = -300 /* errors -101 - -299 */
|
||||
|
||||
/* add new companion error id strings for any new error codes
|
||||
|
@@ -94,6 +94,9 @@ noinst_HEADERS+= \
|
||||
wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h \
|
||||
wolfssl/wolfcrypt/port/arm/cryptoCell.h \
|
||||
wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h \
|
||||
wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h \
|
||||
wolfssl/wolfcrypt/port/Renesas/renesas_sync.h \
|
||||
wolfssl/wolfcrypt/port/Renesas/renesas_cmn.h \
|
||||
wolfssl/wolfcrypt/port/cypress/psoc6_crypto.h
|
||||
|
||||
if BUILD_CRYPTOAUTHLIB
|
||||
|
214
wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h
Normal file
214
wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h
Normal file
@@ -0,0 +1,214 @@
|
||||
/* renesas-sce-crypt.h
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#ifndef __RENESAS_SCE_CRYPT_H__
|
||||
#define __RENESAS_SCE_CRYPT_H__
|
||||
|
||||
#include "r_sce.h"
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SCE_SESSIONKEY_NONCE_SIZE 8
|
||||
#define WOLFSSL_SCE_ILLEGAL_CIPHERSUITE -1
|
||||
|
||||
#define MAX_SCE_CBINDEX 5
|
||||
|
||||
typedef struct tagUser_SCEPKCbInfo {
|
||||
uint32_t user_key_id;
|
||||
|
||||
/* out from R_SCE_TLS_ServerKeyExchangeVerify */
|
||||
uint32_t encrypted_ephemeral_ecdh_public_key[SCE_TLS_ENCRYPTED_ECCPUBKEY_SZ];
|
||||
/* out from R_SCE_TLS_ECC_secp256r1_EphemeralWrappedKeyPairGenerate */
|
||||
sce_tls_p256_ecc_wrapped_key_t ecc_p256_wrapped_key;
|
||||
uint8_t ecc_ecdh_public_key[HW_SCE_ECC_PUBLIC_KEY_BYTE_SIZE];
|
||||
|
||||
uint32_t sce_masterSecret[SCE_TLS_MASTERSECRET_SIZE/4];
|
||||
uint8_t sce_clientRandom[SCE_TLS_CLIENTRANDOM_SZ];
|
||||
uint8_t sce_serverRandom[SCE_TLS_SERVERRANDOM_SZ];
|
||||
uint8_t sce_cipher;
|
||||
|
||||
/* installed key handling */
|
||||
sce_aes_wrapped_key_t sce_wrapped_key_aes256;
|
||||
uint8_t aes256_installedkey_set:1;
|
||||
sce_aes_wrapped_key_t sce_wrapped_key_aes128;
|
||||
uint8_t aes128_installedkey_set:1;
|
||||
|
||||
/* flag whether encrypted ec key is set */
|
||||
uint8_t pk_key_set:1;
|
||||
uint8_t session_key_set:1;
|
||||
|
||||
} User_SCEPKCbInfo;
|
||||
|
||||
typedef struct tagSCE_PKCbInfo {
|
||||
User_SCEPKCbInfo *user_PKCbInfo[MAX_SCE_CBINDEX];
|
||||
uint32_t num_session;
|
||||
} SCE_PKCbInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t *encrypted_provisioning_key;
|
||||
uint8_t *iv;
|
||||
uint8_t *encrypted_user_tls_key;
|
||||
uint32_t encrypted_user_tls_key_type;
|
||||
sce_tls_ca_certification_public_wrapped_key_t user_rsa2048_tls_wrappedkey;
|
||||
} sce_key_data;
|
||||
|
||||
struct WOLFSSL;
|
||||
struct WOLFSSL_CTX;
|
||||
struct ecc_key;
|
||||
|
||||
WOLFSSL_LOCAL int wc_sce_Open();
|
||||
WOLFSSL_LOCAL void wc_sce_Close();
|
||||
WOLFSSL_LOCAL int wc_sce_hw_lock();
|
||||
WOLFSSL_LOCAL void wc_sce_hw_unlock( void );
|
||||
WOLFSSL_LOCAL int wc_sce_usable(const struct WOLFSSL *ssl,
|
||||
uint8_t session_key_generated);
|
||||
|
||||
typedef struct {
|
||||
sce_aes_wrapped_key_t sce_wrapped_key;
|
||||
word32 keySize;
|
||||
byte setup;
|
||||
} SCE_AES_CTX;
|
||||
|
||||
struct Aes;
|
||||
WOLFSSL_LOCAL int wc_sce_AesCbcEncrypt(struct Aes* aes, byte* out, const byte* in,
|
||||
word32 sz);
|
||||
WOLFSSL_LOCAL int wc_sce_AesCbcDecrypt(struct Aes* aes, byte* out, const byte* in,
|
||||
word32 sz);
|
||||
|
||||
WOLFSSL_LOCAL int wc_sce_AesGcmEncrypt(struct Aes* aes, byte* out,
|
||||
const byte* in, word32 sz,
|
||||
byte* iv, word32 ivSz,
|
||||
byte* authTag, word32 authTagSz,
|
||||
const byte* authIn, word32 authInSz,
|
||||
void* ctx);
|
||||
|
||||
WOLFSSL_LOCAL int wc_sce_AesGcmDecrypt(struct Aes* aes, byte* out,
|
||||
const byte* in, word32 sz,
|
||||
const byte* iv, word32 ivSz,
|
||||
const byte* authTag, word32 authTagSz,
|
||||
const byte* authIn, word32 authInSz,
|
||||
void* ctx);
|
||||
|
||||
#if !defined(NO_SHA256) && !defined(NO_WOLFSSL_RENESAS_SCEPROTECT_HASH)
|
||||
|
||||
typedef enum {
|
||||
SCE_SHA256 = 1,
|
||||
} SCE_SHA_TYPE;
|
||||
|
||||
typedef struct {
|
||||
byte* msg;
|
||||
void* heap;
|
||||
word32 used;
|
||||
word32 len;
|
||||
word32 sha_type;
|
||||
#if defined(WOLF_CRYPTO_CB)
|
||||
word32 flags;
|
||||
int devId;
|
||||
#endif
|
||||
} wolfssl_SCE_Hash;
|
||||
|
||||
/* RAW hash function APIs are not implemented with SCE */
|
||||
#undef WOLFSSL_NO_HASH_RAW
|
||||
#define WOLFSSL_NO_HASH_RAW
|
||||
|
||||
typedef wolfssl_SCE_Hash wc_Sha256;
|
||||
|
||||
#endif /* NO_SHA */
|
||||
|
||||
|
||||
WOLFSSL_LOCAL int wc_sce_tls_RootCertVerify(
|
||||
const uint8_t* cert, uint32_t cert_len,
|
||||
uint32_t key_n_start, uint32_t key_n_len,
|
||||
uint32_t key_e_start, uint32_t key_e_len,
|
||||
uint32_t cm_row);
|
||||
|
||||
WOLFSSL_LOCAL int wc_sce_tls_CertVerify(
|
||||
const uint8_t* cert, uint32_t certSz,
|
||||
const uint8_t* signature, uint32_t sigSz,
|
||||
uint32_t key_n_start, uint32_t key_n_len,
|
||||
uint32_t key_e_start, uint32_t key_e_len,
|
||||
uint8_t* sce_encRsaKeyIdx);
|
||||
|
||||
|
||||
WOLFSSL_LOCAL int wc_sce_generatePremasterSecret(
|
||||
uint8_t* premaster,
|
||||
uint32_t preSz);
|
||||
|
||||
WOLFSSL_LOCAL int wc_sce_generateEncryptPreMasterSecret(
|
||||
struct WOLFSSL* ssl,
|
||||
uint8_t* out,
|
||||
uint32_t* outSz);
|
||||
|
||||
WOLFSSL_LOCAL int wc_sce_Sha256GenerateHmac(
|
||||
const struct WOLFSSL *ssl,
|
||||
const uint8_t* myInner,
|
||||
uint32_t innerSz,
|
||||
const uint8_t* in,
|
||||
uint32_t sz,
|
||||
uint8_t* digest);
|
||||
|
||||
WOLFSSL_LOCAL int wc_sce_Sha256VerifyHmac(
|
||||
const struct WOLFSSL *ssl,
|
||||
const uint8_t* message,
|
||||
uint32_t messageSz,
|
||||
uint32_t macSz,
|
||||
uint32_t content);
|
||||
|
||||
WOLFSSL_LOCAL int wc_sce_storeKeyCtx(struct WOLFSSL* ssl, User_SCEPKCbInfo* info);
|
||||
WOLFSSL_LOCAL int wc_sce_generateVerifyData(const uint8_t *ms, /* master secret */
|
||||
const uint8_t *side, const uint8_t *handshake_hash,
|
||||
uint8_t *hashes /* out */);
|
||||
WOLFSSL_LOCAL int wc_sce_generateSeesionKey(struct WOLFSSL *ssl, User_SCEPKCbInfo* cbInfo,
|
||||
int devId);
|
||||
WOLFSSL_LOCAL int wc_sce_generateMasterSecret(
|
||||
uint8_t cipherSuiteFirst,
|
||||
uint8_t cipherSuite,
|
||||
const uint8_t *pr, /* pre-master */
|
||||
const uint8_t *cr, /* client random */
|
||||
const uint8_t *sr, /* server random */
|
||||
uint8_t *ms);
|
||||
|
||||
WOLFSSL_LOCAL int wc_SCE_RsaVerify(struct WOLFSSL* ssl, byte* sig, uint32_t sigSz,
|
||||
uint8_t** out, const byte* key, uint32_t keySz, void* ctx);
|
||||
WOLFSSL_LOCAL int wc_SCE_EccVerify(struct WOLFSSL* ssl, const uint8_t* sig, uint32_t sigSz,
|
||||
const uint8_t* hash, uint32_t hashSz, const uint8_t* key, uint32_t keySz,
|
||||
int* result, void* ctx);
|
||||
/* Callback for EccShareSecret */
|
||||
WOLFSSL_LOCAL int SCE_EccSharedSecret(struct WOLFSSL* ssl, struct ecc_key* otherKey,
|
||||
uint8_t* pubKeyDer, unsigned int* pubKeySz,
|
||||
uint8_t* out, unsigned int* outlen, int side, void* ctx);
|
||||
|
||||
/* user API */
|
||||
WOLFSSL_API void wc_sce_inform_user_keys(
|
||||
uint8_t* encrypted_provisioning_key,
|
||||
uint8_t* iv,
|
||||
uint8_t* encrypted_user_tls_key,
|
||||
uint32_t encrypted_user_tls_key_type);
|
||||
|
||||
WOLFSSL_API void wc_sce_set_callbacks(struct WOLFSSL_CTX* ctx);
|
||||
WOLFSSL_API int wc_sce_set_callback_ctx(struct WOLFSSL* ssl, void* user_ctx);
|
||||
WOLFSSL_API void wc_sce_inform_cert_sign(const uint8_t *sign);
|
||||
|
||||
#endif /* __RENESAS_SCE_CRYPT_H__ */
|
59
wolfssl/wolfcrypt/port/Renesas/renesas_cmn.h
Executable file
59
wolfssl/wolfcrypt/port/Renesas/renesas_cmn.h
Executable file
@@ -0,0 +1,59 @@
|
||||
/* renesas_cmn.h
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#ifndef __RENESAS_CMN_H__
|
||||
#define __RENESAS_CMN_H__
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/internal.h>
|
||||
|
||||
/* Common Callbacks */
|
||||
WOLFSSL_LOCAL int Renesas_cmn_genMasterSecret(WOLFSSL* ssl, void* ctx);
|
||||
WOLFSSL_LOCAL int Renesas_cmn_generatePremasterSecret(WOLFSSL* ssl,
|
||||
byte *premaster, word32 preSz, void* ctx);
|
||||
WOLFSSL_LOCAL int Renesas_cmn_RsaEnc(WOLFSSL* ssl, const unsigned char* in,
|
||||
unsigned int inSz, unsigned char* out, word32* outSz,
|
||||
const unsigned char* keyDer, unsigned int keySz, void* ctx);
|
||||
WOLFSSL_LOCAL int Renesas_cmn_VerifyHmac(WOLFSSL *ssl, const byte* message,
|
||||
word32 messageSz, word32 macSz, word32 content);
|
||||
WOLFSSL_LOCAL int Renesas_cmn_EccVerify(WOLFSSL* ssl, const uint8_t* sig,
|
||||
uint32_t sigSz, const uint8_t* hash, uint32_t hashSz,
|
||||
const uint8_t* key, uint32_t keySz, int* result, void* ctx);
|
||||
WOLFSSL_LOCAL int Renesas_cmn_RsaVerify(WOLFSSL* ssl, byte* sig, uint32_t sigSz,
|
||||
uint8_t** out, const byte* key, uint32_t keySz, void* ctx);
|
||||
WOLFSSL_LOCAL int Renesas_cmn_TLS_hmac(WOLFSSL* ssl, byte* digest, const byte* in,
|
||||
word32 sz, int padSz, int content, int verify, int epochOrder);
|
||||
WOLFSSL_LOCAL int Renesas_cmn_usable(const WOLFSSL *ssl, byte seskey_gennerated);
|
||||
WOLFSSL_LOCAL int Renesas_cmn_SigPkCbRsaVerify(unsigned char* sig, unsigned int sigSz,
|
||||
unsigned char** out, const unsigned char* keyDer, unsigned int keySz,
|
||||
void* ctx);
|
||||
WOLFSSL_LOCAL int Renesas_cmn_SigPkCbEccVerify(const unsigned char* sig, unsigned int sigSz,
|
||||
const unsigned char* hash, unsigned int hashSz,
|
||||
const unsigned char* keyDer, unsigned int keySz,
|
||||
int* result, void* ctx);
|
||||
|
||||
/* Common Methods */
|
||||
int wc_CryptoCb_CryptInitRenesasCmn(WOLFSSL* ssl, void* ctx);
|
||||
void wc_CryptoCb_CleanupRenesasCmn(int* id);
|
||||
int wc_Renesas_cmn_RootCertVerify(const byte* cert, word32 cert_len,
|
||||
word32 key_n_start, word32 key_n_len, word32 key_e_start,
|
||||
word32 key_e_len, word32 cm_row);
|
||||
WOLFSSL_LOCAL byte Renesas_cmn_checkCA(word32 cmIdx);
|
||||
#endif /* __RENESAS_CMN_H__ */
|
35
wolfssl/wolfcrypt/port/Renesas/renesas_sync.h
Normal file
35
wolfssl/wolfcrypt/port/Renesas/renesas_sync.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/* renesas_sync.h
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifndef _RENESAS_SYNC_H_
|
||||
#define _RENESAS_SYNC_H_
|
||||
|
||||
#ifdef HAVE_RENESAS_SYNC
|
||||
|
||||
struct WOLFSSL;
|
||||
struct User_SCEPKCbInfo;
|
||||
extern User_SCEPKCbInfo guser_PKCbInfo;
|
||||
|
||||
WOLFSSL_API int wc_CryptoCb_CryptInitRenesasCmn(struct WOLFSSL* ssl, void* ctx);
|
||||
WOLFSSL_API void wc_CryptoCb_CleanupRenesasCmn(int* id);
|
||||
|
||||
#endif /* HAVE_RENESAS_SYNC */
|
||||
#endif /* _RENESAS_SYNC_H_ */
|
@@ -212,6 +212,12 @@
|
||||
/* Uncomment next line if using RENESAS RX64N */
|
||||
/* #define WOLFSSL_RENESAS_RX65N */
|
||||
|
||||
/* Uncomment next line if using RENESAS SCE Protected Mode */
|
||||
/* #define WOLFSSL_RENESAS_SCEPROTECT */
|
||||
|
||||
/* Uncomment next line if using RENESAS RA6M4 */
|
||||
/* #define WOLFSSL_RENESAS_RA6M4 */
|
||||
|
||||
/* Uncomment next line if using Solaris OS*/
|
||||
/* #define WOLFSSL_SOLARIS */
|
||||
|
||||
@@ -326,7 +332,22 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_RA6M3G) || defined(WOLFSSL_RENESAS_RA6M3)
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
#define SCE_TLS_MASTERSECRET_SIZE 80 /* 20 words */
|
||||
#define TSIP_TLS_HMAC_KEY_INDEX_WORDSIZE 64
|
||||
#define TSIP_TLS_ENCPUBKEY_SZ_BY_CERTVRFY 560 /* in bytes */
|
||||
#define SCE_TLS_CLIENTRANDOM_SZ 36 /* in bytes */
|
||||
#define SCE_TLS_SERVERRANDOM_SZ 36 /* in bytes */
|
||||
#define SCE_TLS_ENCRYPTED_ECCPUBKEY_SZ 96 /* in bytes */
|
||||
|
||||
#define WOLFSSL_RENESAS_SCEPROTECT_ECC
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT_ECC)
|
||||
#define HAVE_PK_CALLBACKS
|
||||
/* #define DEBUG_PK_CB */
|
||||
#endif
|
||||
#endif
|
||||
#if defined(WOLFSSL_RENESAS_RA6M3G) || defined(WOLFSSL_RENESAS_RA6M3) ||\
|
||||
defined(WOLFSSL_RENESAS_RA6M4)
|
||||
/* settings in user_settings.h */
|
||||
#endif
|
||||
|
||||
|
@@ -142,6 +142,9 @@ enum {
|
||||
#elif defined(WOLFSSL_RENESAS_TSIP_CRYPT) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_TSIP_CRYPT_HASH)
|
||||
#include "wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h"
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT) && \
|
||||
!defined(NO_WOLFSSL_RENESAS_SCEPROTECT_HASH)
|
||||
#include "wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h"
|
||||
#else
|
||||
|
||||
#if defined(WOLFSSL_SE050) && defined(WOLFSSL_SE050_HASH)
|
||||
|
@@ -168,7 +168,9 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_RA6M3G) || defined(WOLFSSL_RENESAS_RA6M3) /* Uses FREERTOS_TCP */
|
||||
#if defined(WOLFSSL_RENESAS_RA6M3G) || defined(WOLFSSL_RENESAS_RA6M3) ||\
|
||||
defined(WOLFSSL_RENESAS_RA6M4)
|
||||
/* Uses FREERTOS_TCP */
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user