mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
addressed review comments prt1
This commit is contained in:
@@ -1,19 +1,21 @@
|
||||
<WIP>wolfSSL for Renesas RA Evaluation Kit (EK-RA6M4)
|
||||
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.\
|
||||
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` \
|
||||
|
||||
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 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
|
||||
@@ -51,25 +53,66 @@ The wolfssl Project Summary is listed below and is relevant for every project.
|
||||
+ 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 project Content by Smart Configurator
|
||||
2.) Create a `dummy_library` Static Library.
|
||||
|
||||
+ Open Smart Configurator by clicking configuration.xml in wolfSSL_RA6M4 project
|
||||
+ Create project content by clicking `Generate Project Content`
|
||||
+ 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' Renesas RA C Project Using RA Library.
|
||||
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_app` as the project name. Click Next.
|
||||
+ 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)
|
||||
@@ -111,14 +154,14 @@ static const byte ucIPAddress[4] = { 192, 168, 11, 241 };
|
||||
|
||||
+ On Linux
|
||||
```
|
||||
$ autogen.sh
|
||||
$ ./configure --enable-extended-master=no CFLAGS="-DWOLFSSL_STATIC_RSA -DHAVE_AES_CBC"
|
||||
$ 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
|
||||
$./example/server/server -b -d -i
|
||||
```
|
||||
|
||||
You will see the following message on J-LinK RTT Viewer
|
||||
@@ -136,9 +179,9 @@ cipher : ECDHE-RSA-AES128-GCM-SHA256
|
||||
Received: I hear you fa shizzle!
|
||||
```
|
||||
|
||||
ECDSA sign and verifyuse, launch server with the following option
|
||||
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
|
||||
$./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
|
||||
@@ -175,8 +218,13 @@ In the example code for benchmark, it assumes that AES key is installed at DIREC
|
||||
#endif
|
||||
```
|
||||
|
||||
To install key, please refer [Installing and Updating Secure Keys](chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/https://www.renesas.com/us/en/document/apn/installing-and-updating-secure-keys-ra-family).
|
||||
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.
|
||||
|
@@ -32,10 +32,8 @@
|
||||
#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*/
|
||||
@@ -45,13 +43,17 @@
|
||||
/*#define BENCHMARK*/
|
||||
|
||||
/* Enable TLS client */
|
||||
/* cannot enable with other definition */
|
||||
/* 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
|
||||
|
||||
/* RSA certification use */
|
||||
/* Use RSA certificates */
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
/* ECC certification use */
|
||||
/* Use ECC certificates */
|
||||
/*#define USE_CERT_BUFFERS_256*/
|
||||
|
||||
#if defined(USE_CERT_BUFFERS_2048) && defined(USE_CERT_BUFFERS_256)
|
||||
@@ -59,7 +61,7 @@
|
||||
#endif
|
||||
|
||||
void wolfSSL_TLS_client_init();
|
||||
uint32_t wolfSSL_TLS_client();
|
||||
void wolfSSL_TLS_client();
|
||||
|
||||
static void util_Cleanup(xSocket_t xSock, WOLFSSL_CTX *ctx, WOLFSSL *ssl) {
|
||||
printf("Cleaning up socket and wolfSSL objects.\n");
|
||||
|
@@ -5,15 +5,11 @@
|
||||
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/wolfssl/configuration.xml
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/wolfssl/R7FA6M4AF3CFB.pincfg
|
||||
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/hal_entry.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RA6M4/test/src/sce_tst_thread_entry.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
|
||||
|
@@ -6,13 +6,14 @@
|
||||
/** 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];
|
||||
uint8_t encrypted_user_update_key[HW_SCE_AES256_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[];
|
||||
|
||||
|
@@ -1,52 +1,75 @@
|
||||
|
||||
/* 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"
|
||||
|
||||
/**********************************************************************************************************************
|
||||
Exported global variables
|
||||
*********************************************************************************************************************/
|
||||
/*******************************************************************************
|
||||
* 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
|
||||
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
|
||||
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
|
||||
},
|
||||
/* uint8_t encrypted_user_update_key[R_TSIP_AES256_KEY_BYTE_SIZE + 16]; */
|
||||
{
|
||||
0x96, 0x15, 0xD0, 0x32, 0x6C, 0x80, 0xDB, 0xF7, 0x5D, 0xD7, 0x28, 0xAF, 0xFD, 0x0F, 0xA5, 0xB0,
|
||||
0x44, 0x76, 0x19, 0x75, 0x13, 0x3A, 0x10, 0x92, 0xE2, 0x97, 0xE3, 0x83, 0x6C, 0x42, 0x69, 0xA3,
|
||||
0x7E, 0x30, 0x5D, 0xFE, 0x7B, 0x2A, 0x8F, 0x30, 0x92, 0x25, 0x8C, 0xC5, 0xDB, 0x3E, 0x68, 0x06
|
||||
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.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,
|
||||
@@ -79,7 +102,10 @@ const unsigned char ca_cert_der_sign[] =
|
||||
|
||||
const int sizeof_ca_cert_der_sign = sizeof(ca_cert_der_sign);
|
||||
#else
|
||||
/* ca-ecc-cert.der.sign, */
|
||||
/* 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,
|
||||
@@ -110,4 +136,4 @@ const unsigned char ca_ecc_cert_der_sign[] =
|
||||
0x5B, 0x52, 0xFB, 0x37, 0x4E, 0x23
|
||||
};
|
||||
static const int sizeof_ca_ecc_cert_der_sign = sizeof(ca_ecc_cert_der_sign);
|
||||
#endif
|
||||
#endif /* USE_CERT_BUFFERS_256 */
|
||||
|
@@ -1,59 +0,0 @@
|
||||
#include "hal_data.h"
|
||||
|
||||
FSP_CPP_HEADER
|
||||
void R_BSP_WarmStart(bsp_warm_start_event_t event);
|
||||
FSP_CPP_FOOTER
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* main() is generated by the RA Configuration editor and is used to generate threads if an RTOS is used. This function
|
||||
* is called by main() when no RTOS is used.
|
||||
**********************************************************************************************************************/
|
||||
void hal_entry(void)
|
||||
{
|
||||
/* TODO: add your own code here */
|
||||
|
||||
#if BSP_TZ_SECURE_BUILD
|
||||
/* Enter non-secure code */
|
||||
R_BSP_NonSecureEnter();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*******************************************************************************************************************//**
|
||||
* This function is called at various points during the startup process. This implementation uses the event that is
|
||||
* called right before main() to set up the pins.
|
||||
*
|
||||
* @param[in] event Where at in the start up process the code is currently at
|
||||
**********************************************************************************************************************/
|
||||
void R_BSP_WarmStart (bsp_warm_start_event_t event)
|
||||
{
|
||||
if (BSP_WARM_START_RESET == event)
|
||||
{
|
||||
#if BSP_FEATURE_FLASH_LP_VERSION != 0
|
||||
|
||||
/* Enable reading from data flash. */
|
||||
R_FACI_LP->DFLCTL = 1U;
|
||||
|
||||
/* Would normally have to wait tDSTOP(6us) for data flash recovery. Placing the enable here, before clock and
|
||||
* C runtime initialization, should negate the need for a delay since the initialization will typically take more than 6us. */
|
||||
#endif
|
||||
}
|
||||
|
||||
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 BSP_TZ_SECURE_BUILD
|
||||
|
||||
BSP_CMSE_NONSECURE_ENTRY void template_nonsecure_callable ();
|
||||
|
||||
/* Trustzone Secure Projects require at least one nonsecure callable function in order to build (Remove this if it is not required to build). */
|
||||
BSP_CMSE_NONSECURE_ENTRY void template_nonsecure_callable ()
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
@@ -1,18 +0,0 @@
|
||||
#include "sce_tst_thread.h"
|
||||
#include "user_settings.h"
|
||||
/* sce_tst_thread entry function */
|
||||
/* pvParameters contains TaskHandle_t */
|
||||
|
||||
int sce_test();
|
||||
|
||||
void sce_tst_thread_entry(void *pvParameters)
|
||||
{
|
||||
FSP_PARAMETER_NOT_USED (pvParameters);
|
||||
|
||||
/* TODO: add your own code here */
|
||||
sce_test();
|
||||
while (1)
|
||||
{
|
||||
vTaskDelay (1);
|
||||
}
|
||||
}
|
@@ -24,12 +24,15 @@
|
||||
#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;
|
||||
#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" {
|
||||
@@ -37,7 +40,17 @@ 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)
|
||||
|
||||
@@ -53,12 +66,12 @@ static int SetScetlsKey()
|
||||
#if defined(TLS_CLIENT) || defined(EXTRA_SCE_TSIP_TEST)
|
||||
|
||||
#if defined(USE_CERT_BUFFERS_256)
|
||||
sce_inform_cert_sign((const byte *)ca_ecc_cert_der_sign);
|
||||
wc_sce_inform_cert_sign((const byte *)ca_ecc_cert_der_sign);
|
||||
encrypted_user_key_type = 2;
|
||||
#else
|
||||
sce_inform_cert_sign((const byte *)ca_cert_der_sign);
|
||||
wc_sce_inform_cert_sign((const byte *)ca_cert_der_sign);
|
||||
#endif
|
||||
sce_inform_user_keys(
|
||||
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,
|
||||
@@ -69,8 +82,8 @@ static int SetScetlsKey()
|
||||
|
||||
#elif defined(TLS_SERVER)
|
||||
|
||||
sce_inform_cert_sign((const byte *)client_cert_der_sign);
|
||||
sce_inform_user_keys(
|
||||
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,
|
||||
@@ -96,7 +109,6 @@ int benchmark_test(void *args);
|
||||
|
||||
void sce_test(void)
|
||||
{
|
||||
/*(void)timeTick;*/
|
||||
|
||||
#if defined(CRYPT_TEST) || defined(BENCHMARK)
|
||||
#if defined(CRYPT_TEST)
|
||||
@@ -170,10 +182,6 @@ void sce_test(void)
|
||||
#endif
|
||||
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
uint32_t elapsed_time_total = 0;
|
||||
uint32_t elapsed_time = 0.0;
|
||||
const int benchmark_times = 1;
|
||||
|
||||
SetScetlsKey();
|
||||
|
||||
@@ -181,20 +189,11 @@ void sce_test(void)
|
||||
|
||||
do {
|
||||
if(cipherlist_sz > 0 && cipherlist[i] != NULL )
|
||||
printf("cipher : %s\n", cipherlist[i]);
|
||||
|
||||
elapsed_time_total = 0;
|
||||
for(j = 0; j < benchmark_times; j++){
|
||||
wolfSSL_TLS_client_init(cipherlist[i]);
|
||||
elapsed_time = wolfSSL_TLS_client();
|
||||
elapsed_time_total += elapsed_time;
|
||||
printf("elapsed_time(%d) %d mS\n", j, elapsed_time);
|
||||
}
|
||||
if(cipherlist_sz > 0 && i < cipherlist_sz && cipherlist[i] != NULL ) {
|
||||
printf("cipher : %s took %d mS for TLS connection(%d times).\n\n", cipherlist[i],
|
||||
elapsed_time_total, benchmark_times);
|
||||
}
|
||||
printf("cipher : %s\n", cipherlist[i]);
|
||||
|
||||
wolfSSL_TLS_client_init(cipherlist[i]);
|
||||
wolfSSL_TLS_client();
|
||||
|
||||
i++;
|
||||
} while (i < cipherlist_sz);
|
||||
#endif
|
||||
|
@@ -45,13 +45,6 @@ static const byte ucDNSServerAddress[4] = { 192, 168, 11, 1 };
|
||||
|
||||
#define FR_SOCKET_SUCCESS 0
|
||||
|
||||
static uint32_t TimeNowInMilliseconds(void)
|
||||
{
|
||||
return (unsigned int)(((float)xTaskGetTickCount()) /
|
||||
(configTICK_RATE_HZ / 1000));
|
||||
}
|
||||
|
||||
|
||||
void TCPInit( )
|
||||
{
|
||||
BaseType_t fr_status;
|
||||
@@ -98,7 +91,7 @@ void wolfSSL_TLS_client_init(const char* cipherlist)
|
||||
}
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
/* set callback functions for ECC */
|
||||
sce_set_callbacks(client_ctx);
|
||||
wc_sce_set_callbacks(client_ctx);
|
||||
#endif
|
||||
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
@@ -120,11 +113,10 @@ void wolfSSL_TLS_client_init(const char* cipherlist)
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t wolfSSL_TLS_client( )
|
||||
void wolfSSL_TLS_client( )
|
||||
{
|
||||
int ret;
|
||||
/* FreeRTOS+TCP Objects */
|
||||
uint32_t elipsed_time = 0;
|
||||
socklen_t xSize = sizeof(struct freertos_sockaddr);
|
||||
xSocket_t xClientSocket = NULL;
|
||||
struct freertos_sockaddr xRemoteAddress;
|
||||
@@ -159,11 +151,11 @@ uint32_t wolfSSL_TLS_client( )
|
||||
|
||||
if((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
printf("ERROR wolfSSL_new: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return elipsed_time;
|
||||
return;
|
||||
}
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
/* set callback ctx */
|
||||
sce_set_callback_ctx(ssl, (void*)&guser_PKCbInfo);
|
||||
wc_sce_set_callback_ctx(ssl, (void*)&guser_PKCbInfo);
|
||||
#endif
|
||||
/* Attach wolfSSL to the socket */
|
||||
ret = wolfSSL_set_fd(ssl, (int) xClientSocket);
|
||||
@@ -172,21 +164,19 @@ uint32_t wolfSSL_TLS_client( )
|
||||
util_inf_loop(xClientSocket, ctx, ssl);
|
||||
}
|
||||
|
||||
elipsed_time = TimeNowInMilliseconds( );
|
||||
if(wolfSSL_connect(ssl) != SSL_SUCCESS) {
|
||||
printf("ERROR SSL connect: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return elipsed_time;;
|
||||
return;
|
||||
}
|
||||
elipsed_time = TimeNowInMilliseconds( ) - elipsed_time;
|
||||
|
||||
if (wolfSSL_write(ssl, sendBuff, strlen(sendBuff)) != strlen(sendBuff)) {
|
||||
printf("ERROR SSL write: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return elipsed_time;;
|
||||
return;
|
||||
}
|
||||
|
||||
if ((ret=wolfSSL_read(ssl, rcvBuff, BUFF_SIZE)) < 0) {
|
||||
printf("ERROR SSL read: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return elipsed_time;;
|
||||
return;
|
||||
}
|
||||
|
||||
rcvBuff[ret] = '\0' ;
|
||||
@@ -196,7 +186,4 @@ uint32_t wolfSSL_TLS_client( )
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
wolfSSL_Cleanup();
|
||||
|
||||
|
||||
return elipsed_time;
|
||||
}
|
||||
|
@@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<v1:pinSettings xmlns:v1="http://www.tasking.com/schema/pinsettings/v1.1">
|
||||
<v1:pinMappingsRef version="2.05" file="" />
|
||||
<v1:deviceSetting id="renesas.ra6m4_fb" pattern="R7FA6M4****FB">
|
||||
<v1:packageSetting id="renesas.144lqfp" />
|
||||
</v1:deviceSetting>
|
||||
<v1:configSetting configurationId="debug0.mode" altId="debug0.mode.jtag" />
|
||||
<v1:configSetting configurationId="p108.gpio_mode" altId="p108.gpio_mode.gpio_mode_peripheral" />
|
||||
<v1:configSetting configurationId="p108" altId="p108.debug0.tms">
|
||||
<v1:connectionSetting altId="debug0.tms.p108" />
|
||||
</v1:configSetting>
|
||||
<v1:configSetting configurationId="debug0.tms" altId="debug0.tms.p108">
|
||||
<v1:connectionSetting altId="p108.debug0.tms" />
|
||||
</v1:configSetting>
|
||||
<v1:configSetting configurationId="p109.gpio_mode" altId="p109.gpio_mode.gpio_mode_peripheral" />
|
||||
<v1:configSetting configurationId="p109" altId="p109.debug0.tdo">
|
||||
<v1:connectionSetting altId="debug0.tdo.p109" />
|
||||
</v1:configSetting>
|
||||
<v1:configSetting configurationId="debug0.tdo" altId="debug0.tdo.p109">
|
||||
<v1:connectionSetting altId="p109.debug0.tdo" />
|
||||
</v1:configSetting>
|
||||
<v1:configSetting configurationId="p110.gpio_mode" altId="p110.gpio_mode.gpio_mode_peripheral" />
|
||||
<v1:configSetting configurationId="p110" altId="p110.debug0.tdi">
|
||||
<v1:connectionSetting altId="debug0.tdi.p110" />
|
||||
</v1:configSetting>
|
||||
<v1:configSetting configurationId="debug0.tdi" altId="debug0.tdi.p110">
|
||||
<v1:connectionSetting altId="p110.debug0.tdi" />
|
||||
</v1:configSetting>
|
||||
<v1:configSetting configurationId="p300.gpio_mode" altId="p300.gpio_mode.gpio_mode_peripheral" />
|
||||
<v1:configSetting configurationId="p300" altId="p300.debug0.tck">
|
||||
<v1:connectionSetting altId="debug0.tck.p300" />
|
||||
</v1:configSetting>
|
||||
<v1:configSetting configurationId="debug0.tck" altId="debug0.tck.p300">
|
||||
<v1:connectionSetting altId="p300.debug0.tck" />
|
||||
</v1:configSetting>
|
||||
</v1:pinSettings>
|
@@ -1,799 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<raConfiguration version="6">
|
||||
<generalSettings>
|
||||
<option key="#Board#" value="board.ra6m4ek"/>
|
||||
<option key="CPU" value="RA6M4"/>
|
||||
<option key="#TargetName#" value="R7FA6M4AF3CFB"/>
|
||||
<option key="#TargetARCHITECTURE#" value="cortex-m33"/>
|
||||
<option key="#DeviceCommand#" value="R7FA6M4AF"/>
|
||||
<option key="#RTOS#" value="rtos.awsfreertos"/>
|
||||
<option key="#pinconfiguration#" value="R7FA6M4AF3CFB.pincfg"/>
|
||||
<option key="#FSPVersion#" value="3.4.0-alpha0+20210926.81b96644"/>
|
||||
<option key="#ConfigurationFragments#" value="Renesas##BSP##Board##ra6m4_ek##"/>
|
||||
<option key="#SELECTED_TOOLCHAIN#" value="iar.arm.toolchain"/>
|
||||
</generalSettings>
|
||||
<raBspConfiguration>
|
||||
<config id="config.bsp.ra6m4.R7FA6M4AF3CFB">
|
||||
<property id="config.bsp.part_number" value="config.bsp.part_number.value"/>
|
||||
<property id="config.bsp.rom_size_bytes" value="config.bsp.rom_size_bytes.value"/>
|
||||
<property id="config.bsp.rom_size_bytes_hidden" value="1048576"/>
|
||||
<property id="config.bsp.ram_size_bytes" value="config.bsp.ram_size_bytes.value"/>
|
||||
<property id="config.bsp.data_flash_size_bytes" value="config.bsp.data_flash_size_bytes.value"/>
|
||||
<property id="config.bsp.package_style" value="config.bsp.package_style.value"/>
|
||||
<property id="config.bsp.package_pins" value="config.bsp.package_pins.value"/>
|
||||
</config>
|
||||
<config id="config.bsp.ra6m4">
|
||||
<property id="config.bsp.series" value="config.bsp.series.value"/>
|
||||
</config>
|
||||
<config id="config.bsp.ra6m4.fsp">
|
||||
<property id="config.bsp.fsp.tz.exception_response" value="config.bsp.fsp.tz.exception_response.nmi"/>
|
||||
<property id="config.bsp.fsp.tz.cmsis.bfhfnmins" value="config.bsp.fsp.tz.cmsis.bfhfnmins.secure"/>
|
||||
<property id="config.bsp.fsp.tz.cmsis.sysresetreqs" value="config.bsp.fsp.tz.cmsis.sysresetreqs.secure_only"/>
|
||||
<property id="config.bsp.fsp.tz.cmsis.s_priority_boost" value="config.bsp.fsp.tz.cmsis.s_priority_boost.disabled"/>
|
||||
<property id="config.bsp.fsp.tz.csar" value="config.bsp.fsp.tz.csar.both"/>
|
||||
<property id="config.bsp.fsp.tz.rstsar" value="config.bsp.fsp.tz.rstsar.both"/>
|
||||
<property id="config.bsp.fsp.tz.bbfsar" value="config.bsp.fsp.tz.bbfsar.both"/>
|
||||
<property id="config.bsp.fsp.tz.sramsar.sramprcr" value="config.bsp.fsp.tz.sramsar.sramprcr.both"/>
|
||||
<property id="config.bsp.fsp.tz.sramsar.sramecc" value="config.bsp.fsp.tz.sramsar.sramecc.both"/>
|
||||
<property id="config.bsp.fsp.tz.stbramsar" value="config.bsp.fsp.tz.stbramsar.both"/>
|
||||
<property id="config.bsp.fsp.tz.bussara" value="config.bsp.fsp.tz.bussara.both"/>
|
||||
<property id="config.bsp.fsp.tz.bussarb" value="config.bsp.fsp.tz.bussarb.both"/>
|
||||
<property id="config.bsp.fsp.cache_line_size" value="config.bsp.fsp.cache_line_size.32"/>
|
||||
<property id="config.bsp.fsp.OFS0.iwdt_start_mode" value="config.bsp.fsp.OFS0.iwdt_start_mode.disabled"/>
|
||||
<property id="config.bsp.fsp.OFS0.iwdt_timeout" value="config.bsp.fsp.OFS0.iwdt_timeout.2048"/>
|
||||
<property id="config.bsp.fsp.OFS0.iwdt_divisor" value="config.bsp.fsp.OFS0.iwdt_divisor.128"/>
|
||||
<property id="config.bsp.fsp.OFS0.iwdt_window_end" value="config.bsp.fsp.OFS0.iwdt_window_end.0"/>
|
||||
<property id="config.bsp.fsp.OFS0.iwdt_window_start" value="config.bsp.fsp.OFS0.iwdt_window_start.100"/>
|
||||
<property id="config.bsp.fsp.OFS0.iwdt_reset_interrupt" value="config.bsp.fsp.OFS0.iwdt_reset_interrupt.Reset"/>
|
||||
<property id="config.bsp.fsp.OFS0.iwdt_stop_control" value="config.bsp.fsp.OFS0.iwdt_stop_control.stops"/>
|
||||
<property id="config.bsp.fsp.OFS0.wdt_start_mode" value="config.bsp.fsp.OFS0.wdt_start_mode.register"/>
|
||||
<property id="config.bsp.fsp.OFS0.wdt_timeout" value="config.bsp.fsp.OFS0.wdt_timeout.16384"/>
|
||||
<property id="config.bsp.fsp.OFS0.wdt_divisor" value="config.bsp.fsp.OFS0.wdt_divisor.128"/>
|
||||
<property id="config.bsp.fsp.OFS0.wdt_window_end" value="config.bsp.fsp.OFS0.wdt_window_end.0"/>
|
||||
<property id="config.bsp.fsp.OFS0.wdt_window_start" value="config.bsp.fsp.OFS0.wdt_window_start.100"/>
|
||||
<property id="config.bsp.fsp.OFS0.wdt_reset_interrupt" value="config.bsp.fsp.OFS0.wdt_reset_interrupt.Reset"/>
|
||||
<property id="config.bsp.fsp.OFS0.wdt_stop_control" value="config.bsp.fsp.OFS0.wdt_stop_control.stops"/>
|
||||
<property id="config.bsp.fsp.OFS1.voltage_detection0.start" value="config.bsp.fsp.OFS1.voltage_detection0.start.disabled"/>
|
||||
<property id="config.bsp.fsp.OFS1.voltage_detection0_level" value="config.bsp.fsp.OFS1.voltage_detection0_level.280"/>
|
||||
<property id="config.bsp.fsp.OFS1.hoco_osc" value="config.bsp.fsp.OFS1.hoco_osc.disabled"/>
|
||||
<property id="config.bsp.fsp.BPS.BPS0" value=""/>
|
||||
<property id="config.bsp.fsp.BPS.BPS1" value=""/>
|
||||
<property id="config.bsp.fsp.BPS.BPS2" value=""/>
|
||||
<property id="config.bsp.fsp.PBPS.PBPS0" value=""/>
|
||||
<property id="config.bsp.fsp.PBPS.PBPS1" value=""/>
|
||||
<property id="config.bsp.fsp.PBPS.PBPS2" value=""/>
|
||||
<property id="config.bsp.fsp.dual_bank" value="config.bsp.fsp.dual_bank.disabled"/>
|
||||
<property id="config.bsp.fsp.hoco_fll" value="config.bsp.fsp.hoco_fll.disabled"/>
|
||||
<property id="config.bsp.common.main_osc_wait" value="config.bsp.common.main_osc_wait.wait_8163"/>
|
||||
<property id="config.bsp.fsp.mcu.adc.max_freq_hz" value="50000000"/>
|
||||
<property id="config.bsp.fsp.mcu.sci_uart.max_baud" value="20000000"/>
|
||||
<property id="config.bsp.fsp.mcu.adc.sample_and_hold" value="0"/>
|
||||
<property id="config.bsp.fsp.mcu.sci_spi.max_bitrate" value="25000000"/>
|
||||
<property id="config.bsp.fsp.mcu.spi.max_bitrate" value="50000000"/>
|
||||
<property id="config.bsp.fsp.mcu.iic_master.rate.rate_fastplus" value="1"/>
|
||||
<property id="config.bsp.fsp.mcu.sci_uart.cstpen_channels" value="0x03F9"/>
|
||||
</config>
|
||||
<config id="config.bsp.ra">
|
||||
<property id="config.bsp.common.main" value="0x400"/>
|
||||
<property id="config.bsp.common.heap" value="0x1000"/>
|
||||
<property id="config.bsp.common.vcc" value="3300"/>
|
||||
<property id="config.bsp.common.checking" value="config.bsp.common.checking.disabled"/>
|
||||
<property id="config.bsp.common.assert" value="config.bsp.common.assert.none"/>
|
||||
<property id="config.bsp.common.error_log" value="config.bsp.common.error_log.none"/>
|
||||
<property id="config.bsp.common.soft_reset" value="config.bsp.common.soft_reset.disabled"/>
|
||||
<property id="config.bsp.common.main_osc_populated" value="config.bsp.common.main_osc_populated.enabled"/>
|
||||
<property id="config.bsp.common.pfs_protect" value="config.bsp.common.pfs_protect.enabled"/>
|
||||
<property id="config.bsp.common.c_runtime_init" value="config.bsp.common.c_runtime_init.enabled"/>
|
||||
<property id="config.bsp.common.main_osc_clock_source" value="config.bsp.common.main_osc_clock_source.crystal"/>
|
||||
<property id="config.bsp.common.subclock_populated" value="config.bsp.common.subclock_populated.enabled"/>
|
||||
<property id="config.bsp.common.subclock_drive" value="config.bsp.common.subclock_drive.standard"/>
|
||||
<property id="config.bsp.common.subclock_stabilization_ms" value="1000"/>
|
||||
</config>
|
||||
</raBspConfiguration>
|
||||
<raClockConfiguration>
|
||||
<node id="board.clock.xtal.freq" mul="24000000" option="_edit"/>
|
||||
<node id="board.clock.hoco.freq" option="board.clock.hoco.freq.20m"/>
|
||||
<node id="board.clock.loco.freq" option="board.clock.loco.freq.32768"/>
|
||||
<node id="board.clock.moco.freq" option="board.clock.moco.freq.8m"/>
|
||||
<node id="board.clock.subclk.freq" option="board.clock.subclk.freq.32768"/>
|
||||
<node id="board.clock.pll.source" option="board.clock.pll.source.xtal"/>
|
||||
<node id="board.clock.pll.div" option="board.clock.pll.div.3"/>
|
||||
<node id="board.clock.pll.mul" option="board.clock.pll.mul.250"/>
|
||||
<node id="board.clock.pll.display" option="board.clock.pll.display.value"/>
|
||||
<node id="board.clock.pll2.source" option="board.clock.pll2.source.disabled"/>
|
||||
<node id="board.clock.pll2.div" option="board.clock.pll2.div.2"/>
|
||||
<node id="board.clock.pll2.mul" option="board.clock.pll2.mul.200"/>
|
||||
<node id="board.clock.pll2.display" option="board.clock.pll2.display.value"/>
|
||||
<node id="board.clock.clock.source" option="board.clock.clock.source.pll"/>
|
||||
<node id="board.clock.clkout.source" option="board.clock.clkout.source.disabled"/>
|
||||
<node id="board.clock.uclk.source" option="board.clock.uclk.source.disabled"/>
|
||||
<node id="board.clock.octaspiclk.source" option="board.clock.octaspiclk.source.disabled"/>
|
||||
<node id="board.clock.iclk.div" option="board.clock.iclk.div.1"/>
|
||||
<node id="board.clock.pclka.div" option="board.clock.pclka.div.2"/>
|
||||
<node id="board.clock.pclkb.div" option="board.clock.pclkb.div.4"/>
|
||||
<node id="board.clock.pclkc.div" option="board.clock.pclkc.div.4"/>
|
||||
<node id="board.clock.pclkd.div" option="board.clock.pclkd.div.2"/>
|
||||
<node id="board.clock.bclk.div" option="board.clock.bclk.div.2"/>
|
||||
<node id="board.clock.bclkout.div" option="board.clock.bclkout.div.2"/>
|
||||
<node id="board.clock.fclk.div" option="board.clock.fclk.div.4"/>
|
||||
<node id="board.clock.clkout.div" option="board.clock.clkout.div.1"/>
|
||||
<node id="board.clock.uclk.div" option="board.clock.uclk.div.5"/>
|
||||
<node id="board.clock.octaspiclk.div" option="board.clock.octaspiclk.div.1"/>
|
||||
<node id="board.clock.iclk.display" option="board.clock.iclk.display.value"/>
|
||||
<node id="board.clock.pclka.display" option="board.clock.pclka.display.value"/>
|
||||
<node id="board.clock.pclkb.display" option="board.clock.pclkb.display.value"/>
|
||||
<node id="board.clock.pclkc.display" option="board.clock.pclkc.display.value"/>
|
||||
<node id="board.clock.pclkd.display" option="board.clock.pclkd.display.value"/>
|
||||
<node id="board.clock.bclk.display" option="board.clock.bclk.display.value"/>
|
||||
<node id="board.clock.bclkout.display" option="board.clock.bclkout.display.value"/>
|
||||
<node id="board.clock.fclk.display" option="board.clock.fclk.display.value"/>
|
||||
<node id="board.clock.clkout.display" option="board.clock.clkout.display.value"/>
|
||||
<node id="board.clock.uclk.display" option="board.clock.uclk.display.value"/>
|
||||
<node id="board.clock.octaspiclk.display" option="board.clock.octaspiclk.display.value"/>
|
||||
</raClockConfiguration>
|
||||
<raComponentSelection>
|
||||
<component apiversion="" class="Common" condition="" group="all" subgroup="fsp_common" variant="" vendor="Renesas" version="3.4.0-alpha0+20210926.81b96644">
|
||||
<description>Board Support Package Common Files</description>
|
||||
<originalPack>Renesas.RA.3.4.0-alpha0+20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="HAL Drivers" condition="" group="all" subgroup="r_ether_phy" variant="" vendor="Renesas" version="3.4.0-alpha0+20210926.81b96644">
|
||||
<description>Ethernet PHY</description>
|
||||
<originalPack>Renesas.RA.3.4.0-alpha0+20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="HAL Drivers" condition="" group="all" subgroup="r_ether" variant="" vendor="Renesas" version="3.4.0-alpha0+20210926.81b96644">
|
||||
<description>Ethernet</description>
|
||||
<originalPack>Renesas.RA.3.4.0-alpha0+20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="HAL Drivers" condition="" group="all" subgroup="r_ioport" variant="" vendor="Renesas" version="3.4.0-alpha0+20210926.81b96644">
|
||||
<description>I/O Port</description>
|
||||
<originalPack>Renesas.RA.3.4.0-alpha0+20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="HAL Drivers" condition="" group="all" subgroup="r_sce9_ra6_protected" variant="" vendor="Renesas" version="3.4.0-alpha0+20210926.81b96644">
|
||||
<description>Secure Cryptography Engine on RA6 Protected Mode</description>
|
||||
<originalPack>Renesas.RA.3.4.0-alpha0+20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="Middleware" condition="" group="all" subgroup="rm_freertos_plus_tcp" variant="" vendor="Renesas" version="3.4.0-alpha0+20210926.81b96644">
|
||||
<description>r_ether to FreeRTOS+TCP Wrapper</description>
|
||||
<originalPack>Renesas.RA.3.4.0-alpha0+20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="Middleware" condition="" group="all" subgroup="rm_freertos_port" variant="" vendor="Renesas" version="3.4.0-alpha0+20210926.81b96644">
|
||||
<description>FreeRTOS Port</description>
|
||||
<originalPack>Renesas.RA.3.4.0-alpha0+20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="Libraries" condition="" group="FreeRTOS" subgroup="BufferAllocation2" variant="" vendor="AWS" version="2.3.2+fsp.3.4.0.alpha0.20210926.81b96644">
|
||||
<description>FreeRTOS - Buffer Allocation 2</description>
|
||||
<originalPack>Amazon.FreeRTOS-Plus-TCP.2.3.2+fsp.3.4.0.alpha0.20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="Libraries" condition="" group="FreeRTOS_Plus" subgroup="FreeRTOS_Plus_TCP" variant="" vendor="AWS" version="2.3.2+fsp.3.4.0.alpha0.20210926.81b96644">
|
||||
<description>FreeRTOS+TCP</description>
|
||||
<originalPack>Amazon.FreeRTOS-Plus-TCP.2.3.2+fsp.3.4.0.alpha0.20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="CMSIS" condition="" group="CMSIS5" subgroup="CoreM" variant="" vendor="Arm" version="5.7.0+fsp.3.4.0.alpha0.20210926.81b96644">
|
||||
<description>Arm CMSIS Version 5 - Core (M)</description>
|
||||
<originalPack>Arm.CMSIS5.5.7.0+fsp.3.4.0.alpha0.20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="BSP" condition="" group="ra6m4" subgroup="device" variant="R7FA6M4AF3CFB" vendor="Renesas" version="3.4.0-alpha0+20210926.81b96644">
|
||||
<description>Board support package for R7FA6M4AF3CFB</description>
|
||||
<originalPack>Renesas.RA_mcu_ra6m4.3.4.0-alpha0+20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="BSP" condition="" group="ra6m4" subgroup="device" variant="" vendor="Renesas" version="3.4.0-alpha0+20210926.81b96644">
|
||||
<description>Board support package for RA6M4</description>
|
||||
<originalPack>Renesas.RA_mcu_ra6m4.3.4.0-alpha0+20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="BSP" condition="" group="ra6m4" subgroup="fsp" variant="" vendor="Renesas" version="3.4.0-alpha0+20210926.81b96644">
|
||||
<description>Board support package for RA6M4 - FSP Data</description>
|
||||
<originalPack>Renesas.RA_mcu_ra6m4.3.4.0-alpha0+20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="RTOS" condition="" group="FreeRTOS" subgroup="all" variant="" vendor="AWS" version="10.4.3+fsp.3.4.0.alpha0.20210926.81b96644">
|
||||
<description>FreeRTOS</description>
|
||||
<originalPack>Amazon.FreeRTOS-Kernel.10.4.3+fsp.3.4.0.alpha0.20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="Heaps" condition="" group="FreeRTOS" subgroup="heap_4" variant="" vendor="AWS" version="10.4.3+fsp.3.4.0.alpha0.20210926.81b96644">
|
||||
<description>FreeRTOS - Memory Management - Heap 4</description>
|
||||
<originalPack>Amazon.FreeRTOS-Kernel.10.4.3+fsp.3.4.0.alpha0.20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
<component apiversion="" class="BSP" condition="" group="Board" subgroup="ra6m4_ek" variant="" vendor="Renesas" version="3.4.0-alpha0+20210926.81b96644">
|
||||
<description>RA6M4-EK Board Support Files</description>
|
||||
<originalPack>Renesas.RA_board_ra6m4_ek.3.4.0-alpha0+20210926.81b96644.pack</originalPack>
|
||||
</component>
|
||||
</raComponentSelection>
|
||||
<raElcConfiguration/>
|
||||
<raIcuConfiguration/>
|
||||
<raModuleConfiguration>
|
||||
<module id="module.driver.ioport_on_ioport.0">
|
||||
<property id="module.driver.ioport.name" value="g_ioport"/>
|
||||
<property id="module.driver.ioport.elc_trigger_ioport1" value="_disabled"/>
|
||||
<property id="module.driver.ioport.elc_trigger_ioport2" value="_disabled"/>
|
||||
<property id="module.driver.ioport.elc_trigger_ioport3" value="_disabled"/>
|
||||
<property id="module.driver.ioport.elc_trigger_ioport4" value="_disabled"/>
|
||||
<property id="module.driver.ioport.pincfg" value="g_bsp_pin_cfg"/>
|
||||
</module>
|
||||
<module id="module.middleware.rm_freertos_port.0"/>
|
||||
<module id="module.driver.sce_protected.782997201"/>
|
||||
<module id="module.freertos.heap.4.576479331"/>
|
||||
<module id="module.aws.freertosplus.freertosplus_tcp.1385024092"/>
|
||||
<module id="module.driver.freertos_plus_tcp_on_ether.1999156504"/>
|
||||
<module id="module.driver.ether_on_ether.364635349">
|
||||
<property id="module.driver.ether.name" value="g_ether0"/>
|
||||
<property id="module.driver.ether.channel" value="module.driver.ether.channel.0"/>
|
||||
<property id="module.driver.ether.mac_address" value="00:11:22:33:44:55"/>
|
||||
<property id="module.driver.ether.zerocopy" value="module.driver.ether.zerocopy.0"/>
|
||||
<property id="module.driver.ether.flow_control" value="module.driver.ether.flow_control.0"/>
|
||||
<property id="module.driver.ether.multicast" value="module.driver.ether.multicast.1"/>
|
||||
<property id="module.driver.ether.promiscuous" value="module.driver.ether.promiscuous.0"/>
|
||||
<property id="module.driver.ether.broadcast_filter" value="0"/>
|
||||
<property id="module.driver.ether.num_tx_descriptors" value="1"/>
|
||||
<property id="module.driver.ether.num_rx_descriptors" value="1"/>
|
||||
<property id="module.driver.ether.allocate_rx_buffer" value="module.driver.ether.allocate_rx_buffer.1"/>
|
||||
<property id="module.driver.ether.ether_buffer_size" value="1514"/>
|
||||
<property id="module.driver.ether.padding" value="module.driver.ether.padding.0"/>
|
||||
<property id="module.driver.ether.padding_offset" value="0"/>
|
||||
<property id="module.driver.ether.interrupt_priority" value="board.icu.common.irq.priority12"/>
|
||||
<property id="module.driver.ether.p_callback" value="NULL"/>
|
||||
</module>
|
||||
<module id="module.driver.ether_phy_on_ether_phy.333582791">
|
||||
<property id="module.driver.ether_phy.name" value="g_ether_phy0"/>
|
||||
<property id="module.driver.ether_phy.channel" value="module.driver.ether_phy.channel.0"/>
|
||||
<property id="module.driver.ether_phy.phy_lsi_address" value="0"/>
|
||||
<property id="module.driver.ether_phy.phy_reset_wait_time" value="0x00020000"/>
|
||||
<property id="module.driver.ether_phy.mii_type" value="module.driver.mii_type.mii"/>
|
||||
<property id="module.driver.ether_phy.mii_bit_access_wait_time" value="8"/>
|
||||
<property id="module.driver.ether_phy.flow_control" value="module.driver.ether_phy.flow_control.0"/>
|
||||
</module>
|
||||
<module id="module.freertos.bufferallocation2.1740236291"/>
|
||||
<context id="_hal.0">
|
||||
<stack module="module.driver.ioport_on_ioport.0"/>
|
||||
<stack module="module.middleware.rm_freertos_port.0"/>
|
||||
<stack module="module.driver.sce_protected.782997201"/>
|
||||
</context>
|
||||
<context id="rtos.awsfreertos.thread.1893492516">
|
||||
<property id="_symbol" value="sce_tst_thread"/>
|
||||
<property id="rtos.awsfreertos.thread.name" value="sce_tst_thread"/>
|
||||
<property id="rtos.awsfreertos.thread.stack" value="0xA000"/>
|
||||
<property id="rtos.awsfreertos.thread.priority" value="1"/>
|
||||
<property id="rtos.awsfreertos.thread.context" value="NULL"/>
|
||||
<property id="rtos.awsfreertos.thread.allocation" value="rtos.awsfreertos.thread.allocation.dynamic"/>
|
||||
<property id="rtos.awsfreertos.thread.secure_context" value="rtos.awsfreertos.thread.secure_context.enable"/>
|
||||
<stack module="module.freertos.heap.4.576479331"/>
|
||||
<stack module="module.aws.freertosplus.freertosplus_tcp.1385024092">
|
||||
<stack module="module.driver.freertos_plus_tcp_on_ether.1999156504" requires="module.aws.freertosplus.freertosplus_tcp.requires.freertosplus_tcp_driver">
|
||||
<stack module="module.driver.ether_on_ether.364635349" requires="module.driver.freertos_plus_tcp_on_ether.requires.ether">
|
||||
<stack module="module.driver.ether_phy_on_ether_phy.333582791" requires="module.driver.ether.requires.ether_phy"/>
|
||||
</stack>
|
||||
<stack module="module.freertos.bufferallocation2.1740236291" requires="module.driver.freertos_plus_tcp_on_ether.requires.bufferallocation2"/>
|
||||
</stack>
|
||||
</stack>
|
||||
</context>
|
||||
<config id="config.driver.ioport">
|
||||
<property id="config.driver.ioport.checking" value="config.driver.ioport.checking.system"/>
|
||||
</config>
|
||||
<config id="config.driver.ether">
|
||||
<property id="config.driver.ether.param_checking_enable" value="config.driver.ether.param_checking_enable.bsp"/>
|
||||
<property id="config.driver.ether.link_present" value="config.driver.ether.link_present.0"/>
|
||||
<property id="config.driver.ether.use_linksta" value="config.driver.ether.use_linksta.0"/>
|
||||
</config>
|
||||
<config id="config.awsfreertos.thread">
|
||||
<property id="config.awsfreertos.custom_freertosconfig" value=""/>
|
||||
<property id="config.awsfreertos.thread.configuse_preemption" value="config.awsfreertos.thread.configuse_preemption.enabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_port_optimised_task_selection" value="config.awsfreertos.thread.configuse_port_optimised_task_selection.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_tickless_idle" value="config.awsfreertos.thread.configuse_tickless_idle.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_idle_hook" value="config.awsfreertos.thread.configuse_idle_hook.enabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_malloc_failed_hook" value="config.awsfreertos.thread.configuse_malloc_failed_hook.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_daemon_task_startup_hook" value="config.awsfreertos.thread.configuse_daemon_task_startup_hook.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_tick_hook" value="config.awsfreertos.thread.configuse_tick_hook.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configcpu_clock_hz" value="SystemCoreClock"/>
|
||||
<property id="config.awsfreertos.thread.configtick_rate_hz" value="1000"/>
|
||||
<property id="config.awsfreertos.thread.configmax_priorities" value="5"/>
|
||||
<property id="config.awsfreertos.thread.configminimal_stack_size" value="128"/>
|
||||
<property id="config.awsfreertos.thread.configmax_task_name_len" value="16"/>
|
||||
<property id="config.awsfreertos.thread.configuse_trace_facility" value="config.awsfreertos.thread.configuse_trace_facility.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_stats_formatting_functions" value="config.awsfreertos.thread.configuse_stats_formatting_functions.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_16_bit_ticks" value="config.awsfreertos.thread.configuse_16_bit_ticks.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configidle_should_yield" value="config.awsfreertos.thread.configidle_should_yield.enabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_task_notifications" value="config.awsfreertos.thread.configuse_task_notifications.enabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_mutexes" value="config.awsfreertos.thread.configuse_mutexes.enabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_recursive_mutexes" value="config.awsfreertos.thread.configuse_recursive_mutexes.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_counting_semaphores" value="config.awsfreertos.thread.configuse_counting_semaphores.enabled"/>
|
||||
<property id="config.awsfreertos.thread.configcheck_for_stack_overflow" value="config.awsfreertos.thread.configcheck_for_stack_overflow.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configqueue_registry_size" value="10"/>
|
||||
<property id="config.awsfreertos.thread.configuse_queue_sets" value="config.awsfreertos.thread.configuse_queue_sets.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_time_slicing" value="config.awsfreertos.thread.configuse_time_slicing.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_newlib_reentrant" value="config.awsfreertos.thread.configuse_newlib_reentrant.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configenable_backward_compatibility" value="config.awsfreertos.thread.configenable_backward_compatibility.enabled"/>
|
||||
<property id="config.awsfreertos.thread.confignum_thread_local_storage_pointers" value="5"/>
|
||||
<property id="config.awsfreertos.thread.configstack_depth_type" value="uint32_t"/>
|
||||
<property id="config.awsfreertos.thread.configmessage_buffer_length_type" value="size_t"/>
|
||||
<property id="config.awsfreertos.thread.configsupport_static_allocation" value="config.awsfreertos.thread.configsupport_static_allocation.enabled"/>
|
||||
<property id="config.awsfreertos.thread.configsupport_dynamic_allocation" value="config.awsfreertos.thread.configsupport_dynamic_allocation.enabled"/>
|
||||
<property id="config.awsfreertos.thread.configtotal_heap_size" value="0x20000"/>
|
||||
<property id="config.awsfreertos.thread.configapplication_allocated_heap" value="config.awsfreertos.thread.configapplication_allocated_heap.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configgenerate_run_time_stats" value="config.awsfreertos.thread.configgenerate_run_time_stats.disabled"/>
|
||||
<property id="config.awsfreertos.thread.configuse_timers" value="config.awsfreertos.thread.configuse_timers.enabled"/>
|
||||
<property id="config.awsfreertos.thread.configtimer_task_priority" value="3"/>
|
||||
<property id="config.awsfreertos.thread.configtimer_queue_length" value="10"/>
|
||||
<property id="config.awsfreertos.thread.configtimer_task_stack_depth" value="128"/>
|
||||
<property id="config.awsfreertos.thread.configlibrary_max_syscall_interrupt_priority" value="board.icu.common.irq.priority1"/>
|
||||
<property id="config.awsfreertos.thread.configassert" value="assert(x)"/>
|
||||
<property id="config.awsfreertos.thread.configinclude_application_defined_privileged_functions" value="config.awsfreertos.thread.configinclude_application_defined_privileged_functions.disabled"/>
|
||||
<property id="config.awsfreertos.thread.include_vtaskpriorityset" value="config.awsfreertos.thread.include_vtaskpriorityset.enabled"/>
|
||||
<property id="config.awsfreertos.thread.include_uxtaskpriorityget" value="config.awsfreertos.thread.include_uxtaskpriorityget.enabled"/>
|
||||
<property id="config.awsfreertos.thread.include_vtaskdelete" value="config.awsfreertos.thread.include_vtaskdelete.enabled"/>
|
||||
<property id="config.awsfreertos.thread.include_vtasksuspend" value="config.awsfreertos.thread.include_vtasksuspend.enabled"/>
|
||||
<property id="config.awsfreertos.thread.include_xresumefromisr" value="config.awsfreertos.thread.include_xresumefromisr.enabled"/>
|
||||
<property id="config.awsfreertos.thread.include_vtaskdelayuntil" value="config.awsfreertos.thread.include_vtaskdelayuntil.enabled"/>
|
||||
<property id="config.awsfreertos.thread.include_vtaskdelay" value="config.awsfreertos.thread.include_vtaskdelay.enabled"/>
|
||||
<property id="config.awsfreertos.thread.include_xtaskgetschedulerstate" value="config.awsfreertos.thread.include_xtaskgetschedulerstate.enabled"/>
|
||||
<property id="config.awsfreertos.thread.include_xtaskgetcurrenttaskhandle" value="config.awsfreertos.thread.include_xtaskgetcurrenttaskhandle.enabled"/>
|
||||
<property id="config.awsfreertos.thread.include_uxtaskgetstackhighwatermark" value="config.awsfreertos.thread.include_uxtaskgetstackhighwatermark.disabled"/>
|
||||
<property id="config.awsfreertos.thread.include_xtaskgetidletaskhandle" value="config.awsfreertos.thread.include_xtaskgetidletaskhandle.disabled"/>
|
||||
<property id="config.awsfreertos.thread.include_etaskgetstate" value="config.awsfreertos.thread.include_etaskgetstate.disabled"/>
|
||||
<property id="config.awsfreertos.thread.include_xeventgroupsetbitfromisr" value="config.awsfreertos.thread.include_xeventgroupsetbitfromisr.enabled"/>
|
||||
<property id="config.awsfreertos.thread.include_xtimerpendfunctioncall" value="config.awsfreertos.thread.include_xtimerpendfunctioncall.disabled"/>
|
||||
<property id="config.awsfreertos.thread.include_xtaskabortdelay" value="config.awsfreertos.thread.include_xtaskabortdelay.disabled"/>
|
||||
<property id="config.awsfreertos.thread.include_xtaskgethandle" value="config.awsfreertos.thread.include_xtaskgethandle.disabled"/>
|
||||
<property id="config.awsfreertos.thread.include_xtaskresumefromisr" value="config.awsfreertos.thread.include_xtaskresumefromisr.enabled"/>
|
||||
<property id="config.awsfreertos.thread.include_hw_stack_monitor" value="config.awsfreertos.thread.include_hw_stack_monitor.disabled"/>
|
||||
<property id="config.awsfreertos.thread.print_function" value="printf(x)"/>
|
||||
<property id="config.awsfreertos.thread.max_length" value="192"/>
|
||||
<property id="config.awsfreertos.thread.include_time_and_task" value="config.awsfreertos.thread.include_time_and_task.disabled"/>
|
||||
</config>
|
||||
<config id="config.driver.sce">
|
||||
<property id="config.driver.sce.rsa_key_generation_retry_count" value="10240"/>
|
||||
<property id="config.driver.sce.sha384" value="config.driver.sce.sha384.disabled"/>
|
||||
<property id="config.driver.sce.sha_384_function" value="crypto_sha384_user_function"/>
|
||||
</config>
|
||||
<config id="config.driver.ether_phy">
|
||||
<property id="config.driver.ether_phy.param_checking_enable" value="config.driver.ether_phy.param_checking_enable.bsp"/>
|
||||
<property id="config.driver.ether_phy.use_phy" value="config.driver.ether_phy.use_phy.default"/>
|
||||
<property id="config.driver.ether_phy.use_reference_clock" value="config.driver.ether_phy.use_reference_clock.default"/>
|
||||
</config>
|
||||
<config id="config.aws.freertosplus.freertosplus_tcp">
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigHAS_DEBUG_PRINTF" value="config.aws.freertosplus.freertosplus_tcp.ipconfigHAS_DEBUG_PRINTF.1"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigHAS_PRINTF" value="config.aws.freertosplus.freertosplus_tcp.ipconfigHAS_PRINTF.1"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigBYTE_ORDER" value="config.aws.freertosplus.freertosplus_tcp.ipconfigBYTE_ORDER.pdFREERTOS_LITTLE_ENDIAN"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM" value="config.aws.freertosplus.freertosplus_tcp.ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM.1"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigSOCK_DEFAULT_RECEIVE_BLOCK_TIME" value="10000"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME" value="10000"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_DNS_CACHE" value="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_DNS_CACHE.1"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigDNS_REQUEST_ATTEMPTS" value="2"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigIP_TASK_PRIORITY" value="configMAX_PRIORITIES - 2"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigIP_TASK_STACK_SIZE_WORDS" value="configMINIMAL_STACK_SIZE * 5"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_NETWORK_EVENT_HOOK" value="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_NETWORK_EVENT_HOOK.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS" value="15000 / portTICK_PERIOD_MS"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_DHCP" value="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_DHCP.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigDHCP_REGISTER_HOSTNAME" value="config.aws.freertosplus.freertosplus_tcp.ipconfigDHCP_REGISTER_HOSTNAME.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigDHCP_USES_UNICAST" value="config.aws.freertosplus.freertosplus_tcp.ipconfigDHCP_USES_UNICAST.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigDHCP_SEND_DISCOVER_AFTER_AUTO_IP" value="config.aws.freertosplus.freertosplus_tcp.ipconfigDHCP_SEND_DISCOVER_AFTER_AUTO_IP.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_DHCP_HOOK" value="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_DHCP_HOOK.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigMAXIMUM_DISCOVER_TX_PERIOD" value="120000 / portTICK_PERIOD_MS"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigARP_CACHE_ENTRIES" value="6"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigMAX_ARP_RETRANSMISSIONS" value="5"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigMAX_ARP_AGE" value="150"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigINCLUDE_FULL_INET_ADDR" value="config.aws.freertosplus.freertosplus_tcp.ipconfigINCLUDE_FULL_INET_ADDR.1"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS" value="10"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigEVENT_QUEUE_LENGTH" value="ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND" value="config.aws.freertosplus.freertosplus_tcp.ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigUDP_TIME_TO_LIVE" value="128"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigTCP_TIME_TO_LIVE" value="128"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_TCP" value="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_TCP.1"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_TCP_WIN" value="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_TCP_WIN.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigNETWORK_MTU" value="1500"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_DNS" value="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_DNS.1"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigREPLY_TO_INCOMING_PINGS" value="config.aws.freertosplus.freertosplus_tcp.ipconfigREPLY_TO_INCOMING_PINGS.1"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigSUPPORT_OUTGOING_PINGS" value="config.aws.freertosplus.freertosplus_tcp.ipconfigSUPPORT_OUTGOING_PINGS.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigSUPPORT_SELECT_FUNCTION" value="config.aws.freertosplus.freertosplus_tcp.ipconfigSUPPORT_SELECT_FUNCTION.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES" value="config.aws.freertosplus.freertosplus_tcp.ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES.1"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES" value="config.aws.freertosplus.freertosplus_tcp.ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigIGNORE_UNKNOWN_PACKETS" value="config.aws.freertosplus.freertosplus_tcp.ipconfigIGNORE_UNKNOWN_PACKETS.1"/>
|
||||
<property id="configWINDOWS_MAC_INTERRUPT_SIMULATOR_DELAY" value="20 / portTICK_PERIOD_MS"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigPACKET_FILLER_SIZE" value="2"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigTCP_WIN_SEG_COUNT" value="240"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigTCP_RX_BUFFER_LENGTH" value="3000"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigTCP_TX_BUFFER_LENGTH" value="3000"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigTCP_KEEP_ALIVE" value="config.aws.freertosplus.freertosplus_tcp.ipconfigTCP_KEEP_ALIVE.1"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigTCP_KEEP_ALIVE_INTERVAL" value="120"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigSOCKET_HAS_USER_SEMAPHORE" value="config.aws.freertosplus.freertosplus_tcp.ipconfigSOCKET_HAS_USER_SEMAPHORE.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigSOCKET_HAS_USER_WAKE_CALLBACK" value="config.aws.freertosplus.freertosplus_tcp.ipconfigSOCKET_HAS_USER_WAKE_CALLBACK.1"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_CALLBACKS" value="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_CALLBACKS.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigZERO_COPY_TX_DRIVER" value="config.aws.freertosplus.freertosplus_tcp.ipconfigZERO_COPY_TX_DRIVER.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigZERO_COPY_RX_DRIVER" value="config.aws.freertosplus.freertosplus_tcp.ipconfigZERO_COPY_RX_DRIVER.0"/>
|
||||
<property id="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_LINKED_RX_MESSAGES" value="config.aws.freertosplus.freertosplus_tcp.ipconfigUSE_LINKED_RX_MESSAGES.0"/>
|
||||
</config>
|
||||
</raModuleConfiguration>
|
||||
<raPinConfiguration>
|
||||
<symbolicName propertyId="p000.symbolic_name" value="ARDUINO_A0_MIKROBUS_AN"/>
|
||||
<symbolicName propertyId="p001.symbolic_name" value="ARDUINO_A1"/>
|
||||
<symbolicName propertyId="p002.symbolic_name" value="ETH_INT"/>
|
||||
<symbolicName propertyId="p003.symbolic_name" value="ARDUINO_A2"/>
|
||||
<symbolicName propertyId="p004.symbolic_name" value="OSPI_RST"/>
|
||||
<symbolicName propertyId="p005.symbolic_name" value="SW1"/>
|
||||
<symbolicName propertyId="p006.symbolic_name" value="SW2"/>
|
||||
<symbolicName propertyId="p007.symbolic_name" value="ARDUINO_A3"/>
|
||||
<symbolicName propertyId="p008.symbolic_name" value="PMOD1_INT"/>
|
||||
<symbolicName propertyId="p009.symbolic_name" value="ARDUINO_D2"/>
|
||||
<symbolicName propertyId="p014.symbolic_name" value="ARDUINO_A4"/>
|
||||
<symbolicName propertyId="p015.symbolic_name" value="ARDUINO_A5"/>
|
||||
<symbolicName propertyId="p100.symbolic_name" value="OSPI_CLK"/>
|
||||
<symbolicName propertyId="p101.symbolic_name" value="OSPI_SIO7"/>
|
||||
<symbolicName propertyId="p102.symbolic_name" value="OSPI_SIO1"/>
|
||||
<symbolicName propertyId="p103.symbolic_name" value="OSPI_SIO6"/>
|
||||
<symbolicName propertyId="p104.symbolic_name" value="OSPI_DQS"/>
|
||||
<symbolicName propertyId="p105.symbolic_name" value="OSPI_SIO5"/>
|
||||
<symbolicName propertyId="p106.symbolic_name" value="OSPI_SIO0"/>
|
||||
<symbolicName propertyId="p107.symbolic_name" value="OSPI_SIO3"/>
|
||||
<symbolicName propertyId="p111.symbolic_name" value="ARDUINO_D3"/>
|
||||
<symbolicName propertyId="p115.symbolic_name" value="MIKROBUS_RST"/>
|
||||
<symbolicName propertyId="p202.symbolic_name" value="ARDUILD_MISO_MIKROBUS_MISO"/>
|
||||
<symbolicName propertyId="p203.symbolic_name" value="ARDUILD_MOSI_MIKROBUS_MOSI"/>
|
||||
<symbolicName propertyId="p204.symbolic_name" value="ARDUILD_CLK_MIKROBUS_CLK"/>
|
||||
<symbolicName propertyId="p205.symbolic_name" value="ARDUILD_SS_MIKROBUS_SS"/>
|
||||
<symbolicName propertyId="p301.symbolic_name" value="PMOD1_SS"/>
|
||||
<symbolicName propertyId="p303.symbolic_name" value="ARDUINO_D9"/>
|
||||
<symbolicName propertyId="p304.symbolic_name" value="ARDUINO_D7"/>
|
||||
<symbolicName propertyId="p305.symbolic_name" value="QSPI_CLK"/>
|
||||
<symbolicName propertyId="p306.symbolic_name" value="QSPI_SSL"/>
|
||||
<symbolicName propertyId="p307.symbolic_name" value="QSPI_IO0"/>
|
||||
<symbolicName propertyId="p308.symbolic_name" value="QSPI_IO1"/>
|
||||
<symbolicName propertyId="p309.symbolic_name" value="QSPI_IO2"/>
|
||||
<symbolicName propertyId="p310.symbolic_name" value="QSPI_IO3"/>
|
||||
<symbolicName propertyId="p311.symbolic_name" value="PMOD1_IO1"/>
|
||||
<symbolicName propertyId="p312.symbolic_name" value="PMOD1_IO2"/>
|
||||
<symbolicName propertyId="p313.symbolic_name" value="PMOD1_IO3"/>
|
||||
<symbolicName propertyId="p400.symbolic_name" value="LED3"/>
|
||||
<symbolicName propertyId="p401.symbolic_name" value="ETH_MDC"/>
|
||||
<symbolicName propertyId="p402.symbolic_name" value="ETH_MDIO"/>
|
||||
<symbolicName propertyId="p403.symbolic_name" value="ETH_RST"/>
|
||||
<symbolicName propertyId="p404.symbolic_name" value="LED2"/>
|
||||
<symbolicName propertyId="p405.symbolic_name" value="ETH_TXD_EN"/>
|
||||
<symbolicName propertyId="p406.symbolic_name" value="ETH_TXD1"/>
|
||||
<symbolicName propertyId="p407.symbolic_name" value="USB_VBUS_DETECT"/>
|
||||
<symbolicName propertyId="p408.symbolic_name" value="ARDUINO_D6_MIKROBUS_PWM"/>
|
||||
<symbolicName propertyId="p409.symbolic_name" value="MIKROBUS_INT"/>
|
||||
<symbolicName propertyId="p410.symbolic_name" value="PMOD2_MISO"/>
|
||||
<symbolicName propertyId="p411.symbolic_name" value="PMOD2_MOSI"/>
|
||||
<symbolicName propertyId="p412.symbolic_name" value="PMOD2_CLK"/>
|
||||
<symbolicName propertyId="p413.symbolic_name" value="PMOD2_SS"/>
|
||||
<symbolicName propertyId="p414.symbolic_name" value="PMOD2_INT"/>
|
||||
<symbolicName propertyId="p415.symbolic_name" value="LED1"/>
|
||||
<symbolicName propertyId="p500.symbolic_name" value="USB_VBUS_EN"/>
|
||||
<symbolicName propertyId="p501.symbolic_name" value="USB_OC"/>
|
||||
<symbolicName propertyId="p505.symbolic_name" value="GROVE2_SCL"/>
|
||||
<symbolicName propertyId="p506.symbolic_name" value="GROVE2_SDA"/>
|
||||
<symbolicName propertyId="p511.symbolic_name" value="ARDUINO_SDA_MIKROBUS_SDA_GROVE1_SDA_QWIIC_SDA"/>
|
||||
<symbolicName propertyId="p512.symbolic_name" value="ARDUINO_SCL_MIKROBUS_SCL_GROVE1_SCL_QWIIC_SCL"/>
|
||||
<symbolicName propertyId="p600.symbolic_name" value="OSPI_SIO4"/>
|
||||
<symbolicName propertyId="p601.symbolic_name" value="OSPI_SIO2"/>
|
||||
<symbolicName propertyId="p609.symbolic_name" value="OSPI_CS"/>
|
||||
<symbolicName propertyId="p610.symbolic_name" value="OSPI_CS0"/>
|
||||
<symbolicName propertyId="p611.symbolic_name" value="ARDUINO_D8"/>
|
||||
<symbolicName propertyId="p612.symbolic_name" value="ARDUINO_RST"/>
|
||||
<symbolicName propertyId="p613.symbolic_name" value="ARDUINO_TX_MIKROBUS_TX"/>
|
||||
<symbolicName propertyId="p614.symbolic_name" value="ARDUINO_RX_MIKROBUS_RX"/>
|
||||
<symbolicName propertyId="p700.symbolic_name" value="ETH_TXD0"/>
|
||||
<symbolicName propertyId="p701.symbolic_name" value="ETH_REF50"/>
|
||||
<symbolicName propertyId="p702.symbolic_name" value="ETH_RXD0"/>
|
||||
<symbolicName propertyId="p703.symbolic_name" value="ETH_RXD1"/>
|
||||
<symbolicName propertyId="p704.symbolic_name" value="ETH_RX_ERR"/>
|
||||
<symbolicName propertyId="p705.symbolic_name" value="ETH_CRS_DV"/>
|
||||
<symbolicName propertyId="p708.symbolic_name" value="PMOD2_IO1"/>
|
||||
<symbolicName propertyId="p709.symbolic_name" value="PMOD2_IO2"/>
|
||||
<symbolicName propertyId="p710.symbolic_name" value="PMOD2_IO3"/>
|
||||
<symbolicName propertyId="p712.symbolic_name" value="ARDUINO_D5"/>
|
||||
<symbolicName propertyId="p713.symbolic_name" value="ARDUINO_D4"/>
|
||||
<pincfg active="true" name="RA6M4 EK" selected="true" symbol="g_bsp_pin_cfg">
|
||||
<configSetting altId="adc0.an00.p000" configurationId="adc0.an00"/>
|
||||
<configSetting altId="adc0.an01.p001" configurationId="adc0.an01"/>
|
||||
<configSetting altId="adc0.an03.p003" configurationId="adc0.an03"/>
|
||||
<configSetting altId="adc0.an07.p007" configurationId="adc0.an07"/>
|
||||
<configSetting altId="adc0.an12.p014" configurationId="adc0.an12"/>
|
||||
<configSetting altId="adc0.an13.p015" configurationId="adc0.an13"/>
|
||||
<configSetting altId="adc0.mode.custom" configurationId="adc0.mode"/>
|
||||
<configSetting altId="cgc0.extal.p212" configurationId="cgc0.extal"/>
|
||||
<configSetting altId="cgc0.mode.mainsub" configurationId="cgc0.mode"/>
|
||||
<configSetting altId="cgc0.xtal.p213" configurationId="cgc0.xtal"/>
|
||||
<configSetting altId="debug0.mode.jtag" configurationId="debug0.mode"/>
|
||||
<configSetting altId="debug0.tck.p300" configurationId="debug0.tck"/>
|
||||
<configSetting altId="debug0.tdi.p110" configurationId="debug0.tdi"/>
|
||||
<configSetting altId="debug0.tdo.p109" configurationId="debug0.tdo"/>
|
||||
<configSetting altId="debug0.tms.p108" configurationId="debug0.tms"/>
|
||||
<configSetting altId="etherc0.rmii.crs_dv.p705" configurationId="etherc0.rmii.crs_dv"/>
|
||||
<configSetting altId="etherc0.rmii.mdc.p401" configurationId="etherc0.rmii.mdc"/>
|
||||
<configSetting altId="etherc0.rmii.mdio.p402" configurationId="etherc0.rmii.mdio"/>
|
||||
<configSetting altId="etherc0.rmii.mode.rmii.free" configurationId="etherc0.rmii.mode"/>
|
||||
<configSetting altId="etherc0.rmii.pairing.free" configurationId="etherc0.rmii.pairing"/>
|
||||
<configSetting altId="etherc0.rmii.ref50ck.p701" configurationId="etherc0.rmii.ref50ck"/>
|
||||
<configSetting altId="etherc0.rmii.rx_er.p704" configurationId="etherc0.rmii.rx_er"/>
|
||||
<configSetting altId="etherc0.rmii.rxd0.p702" configurationId="etherc0.rmii.rxd0"/>
|
||||
<configSetting altId="etherc0.rmii.rxd1.p703" configurationId="etherc0.rmii.rxd1"/>
|
||||
<configSetting altId="etherc0.rmii.txd0.p700" configurationId="etherc0.rmii.txd0"/>
|
||||
<configSetting altId="etherc0.rmii.txd1.p406" configurationId="etherc0.rmii.txd1"/>
|
||||
<configSetting altId="etherc0.rmii.txd_en.p405" configurationId="etherc0.rmii.txd_en"/>
|
||||
<configSetting altId="gpt6.gtiocb.p408" configurationId="gpt6.gtiocb"/>
|
||||
<configSetting altId="gpt6.mode.gtiocaorgtiocb.free" configurationId="gpt6.mode"/>
|
||||
<configSetting altId="iic1.mode.enabled.a" configurationId="iic1.mode"/>
|
||||
<configSetting altId="iic1.scl.p512" configurationId="iic1.scl"/>
|
||||
<configSetting altId="iic1.sda.p511" configurationId="iic1.sda"/>
|
||||
<configSetting altId="irq0.irq06.p409" configurationId="irq0.irq06"/>
|
||||
<configSetting altId="irq0.irq08.p002" configurationId="irq0.irq08"/>
|
||||
<configSetting altId="irq0.irq09.p414" configurationId="irq0.irq09"/>
|
||||
<configSetting altId="irq0.irq10.p005" configurationId="irq0.irq10"/>
|
||||
<configSetting altId="irq0.irq11.p006" configurationId="irq0.irq11"/>
|
||||
<configSetting altId="irq0.irq12.p008" configurationId="irq0.irq12"/>
|
||||
<configSetting altId="irq0.mode.enabled" configurationId="irq0.mode"/>
|
||||
<configSetting altId="ospi0.mode.enable.free" configurationId="ospi0.mode"/>
|
||||
<configSetting altId="ospi0.omcs0.p610" configurationId="ospi0.omcs0"/>
|
||||
<configSetting altId="ospi0.omcs1.p602" configurationId="ospi0.omcs1"/>
|
||||
<configSetting altId="ospi0.omdqs.p104" configurationId="ospi0.omdqs"/>
|
||||
<configSetting altId="ospi0.omsclk.p100" configurationId="ospi0.omsclk"/>
|
||||
<configSetting altId="ospi0.omsio0.p106" configurationId="ospi0.omsio0"/>
|
||||
<configSetting altId="ospi0.omsio1.p102" configurationId="ospi0.omsio1"/>
|
||||
<configSetting altId="ospi0.omsio2.p601" configurationId="ospi0.omsio2"/>
|
||||
<configSetting altId="ospi0.omsio3.p107" configurationId="ospi0.omsio3"/>
|
||||
<configSetting altId="ospi0.omsio4.p600" configurationId="ospi0.omsio4"/>
|
||||
<configSetting altId="ospi0.omsio5.p105" configurationId="ospi0.omsio5"/>
|
||||
<configSetting altId="ospi0.omsio6.p103" configurationId="ospi0.omsio6"/>
|
||||
<configSetting altId="ospi0.omsio7.p101" configurationId="ospi0.omsio7"/>
|
||||
<configSetting altId="ospi0.pairing.free" configurationId="ospi0.pairing"/>
|
||||
<configSetting altId="p000.adc0.an00" configurationId="p000"/>
|
||||
<configSetting altId="p000.gpio_mode.gpio_mode_an" configurationId="p000.gpio_mode"/>
|
||||
<configSetting altId="p001.adc0.an01" configurationId="p001"/>
|
||||
<configSetting altId="p001.gpio_mode.gpio_mode_an" configurationId="p001.gpio_mode"/>
|
||||
<configSetting altId="p002.irq0.irq08" configurationId="p002"/>
|
||||
<configSetting altId="p002.gpio_irq.gpio_irq_enabled" configurationId="p002.gpio_irq"/>
|
||||
<configSetting altId="p002.gpio_mode.gpio_mode_irq" configurationId="p002.gpio_mode"/>
|
||||
<configSetting altId="p003.adc0.an03" configurationId="p003"/>
|
||||
<configSetting altId="p003.gpio_mode.gpio_mode_an" configurationId="p003.gpio_mode"/>
|
||||
<configSetting altId="p004.output.low" configurationId="p004"/>
|
||||
<configSetting altId="p004.gpio_mode.gpio_mode_out.low" configurationId="p004.gpio_mode"/>
|
||||
<configSetting altId="p005.irq0.irq10" configurationId="p005"/>
|
||||
<configSetting altId="p005.gpio_irq.gpio_irq_enabled" configurationId="p005.gpio_irq"/>
|
||||
<configSetting altId="p005.gpio_mode.gpio_mode_irq" configurationId="p005.gpio_mode"/>
|
||||
<configSetting altId="p006.irq0.irq11" configurationId="p006"/>
|
||||
<configSetting altId="p006.gpio_irq.gpio_irq_enabled" configurationId="p006.gpio_irq"/>
|
||||
<configSetting altId="p006.gpio_mode.gpio_mode_irq" configurationId="p006.gpio_mode"/>
|
||||
<configSetting altId="p007.adc0.an07" configurationId="p007"/>
|
||||
<configSetting altId="p007.gpio_mode.gpio_mode_an" configurationId="p007.gpio_mode"/>
|
||||
<configSetting altId="p008.irq0.irq12" configurationId="p008"/>
|
||||
<configSetting altId="p008.gpio_irq.gpio_irq_enabled" configurationId="p008.gpio_irq"/>
|
||||
<configSetting altId="p008.gpio_mode.gpio_mode_irq" configurationId="p008.gpio_mode"/>
|
||||
<configSetting altId="p008.gpio_pupd.gpio_pupd_ip_up" configurationId="p008.gpio_pupd"/>
|
||||
<configSetting altId="p009.output.low" configurationId="p009"/>
|
||||
<configSetting altId="p009.gpio_mode.gpio_mode_out.low" configurationId="p009.gpio_mode"/>
|
||||
<configSetting altId="p014.adc0.an12" configurationId="p014"/>
|
||||
<configSetting altId="p014.gpio_mode.gpio_mode_an" configurationId="p014.gpio_mode"/>
|
||||
<configSetting altId="p015.adc0.an13" configurationId="p015"/>
|
||||
<configSetting altId="p015.gpio_mode.gpio_mode_an" configurationId="p015.gpio_mode"/>
|
||||
<configSetting altId="p100.ospi0.omsclk" configurationId="p100"/>
|
||||
<configSetting altId="p100.gpio_speed.gpio_speed_high" configurationId="p100.gpio_drivecapacity"/>
|
||||
<configSetting altId="p100.gpio_mode.gpio_mode_peripheral" configurationId="p100.gpio_mode"/>
|
||||
<configSetting altId="p101.ospi0.omsio7" configurationId="p101"/>
|
||||
<configSetting altId="p101.gpio_speed.gpio_speed_high" configurationId="p101.gpio_drivecapacity"/>
|
||||
<configSetting altId="p101.gpio_mode.gpio_mode_peripheral" configurationId="p101.gpio_mode"/>
|
||||
<configSetting altId="p102.ospi0.omsio1" configurationId="p102"/>
|
||||
<configSetting altId="p102.gpio_speed.gpio_speed_high" configurationId="p102.gpio_drivecapacity"/>
|
||||
<configSetting altId="p102.gpio_mode.gpio_mode_peripheral" configurationId="p102.gpio_mode"/>
|
||||
<configSetting altId="p103.ospi0.omsio6" configurationId="p103"/>
|
||||
<configSetting altId="p103.gpio_speed.gpio_speed_high" configurationId="p103.gpio_drivecapacity"/>
|
||||
<configSetting altId="p103.gpio_mode.gpio_mode_peripheral" configurationId="p103.gpio_mode"/>
|
||||
<configSetting altId="p104.ospi0.omdqs" configurationId="p104"/>
|
||||
<configSetting altId="p104.gpio_speed.gpio_speed_high" configurationId="p104.gpio_drivecapacity"/>
|
||||
<configSetting altId="p104.gpio_mode.gpio_mode_peripheral" configurationId="p104.gpio_mode"/>
|
||||
<configSetting altId="p105.ospi0.omsio5" configurationId="p105"/>
|
||||
<configSetting altId="p105.gpio_speed.gpio_speed_high" configurationId="p105.gpio_drivecapacity"/>
|
||||
<configSetting altId="p105.gpio_mode.gpio_mode_peripheral" configurationId="p105.gpio_mode"/>
|
||||
<configSetting altId="p106.ospi0.omsio0" configurationId="p106"/>
|
||||
<configSetting altId="p106.gpio_speed.gpio_speed_high" configurationId="p106.gpio_drivecapacity"/>
|
||||
<configSetting altId="p106.gpio_mode.gpio_mode_peripheral" configurationId="p106.gpio_mode"/>
|
||||
<configSetting altId="p107.ospi0.omsio3" configurationId="p107"/>
|
||||
<configSetting altId="p107.gpio_speed.gpio_speed_high" configurationId="p107.gpio_drivecapacity"/>
|
||||
<configSetting altId="p107.gpio_mode.gpio_mode_peripheral" configurationId="p107.gpio_mode"/>
|
||||
<configSetting altId="p108.debug0.tms" configurationId="p108"/>
|
||||
<configSetting altId="p108.gpio_mode.gpio_mode_peripheral" configurationId="p108.gpio_mode"/>
|
||||
<configSetting altId="p109.debug0.tdo" configurationId="p109"/>
|
||||
<configSetting altId="p109.gpio_mode.gpio_mode_peripheral" configurationId="p109.gpio_mode"/>
|
||||
<configSetting altId="p110.debug0.tdi" configurationId="p110"/>
|
||||
<configSetting altId="p110.gpio_mode.gpio_mode_peripheral" configurationId="p110.gpio_mode"/>
|
||||
<configSetting altId="p111.output.low" configurationId="p111"/>
|
||||
<configSetting altId="p111.gpio_mode.gpio_mode_out.low" configurationId="p111.gpio_mode"/>
|
||||
<configSetting altId="p115.output.low" configurationId="p115"/>
|
||||
<configSetting altId="p115.gpio_mode.gpio_mode_out.low" configurationId="p115.gpio_mode"/>
|
||||
<configSetting altId="p202.spi0.miso" configurationId="p202"/>
|
||||
<configSetting altId="p202.gpio_mode.gpio_mode_peripheral" configurationId="p202.gpio_mode"/>
|
||||
<configSetting altId="p203.spi0.mosi" configurationId="p203"/>
|
||||
<configSetting altId="p203.gpio_mode.gpio_mode_peripheral" configurationId="p203.gpio_mode"/>
|
||||
<configSetting altId="p204.spi0.rspck" configurationId="p204"/>
|
||||
<configSetting altId="p204.gpio_mode.gpio_mode_peripheral" configurationId="p204.gpio_mode"/>
|
||||
<configSetting altId="p205.spi0.ssl0" configurationId="p205"/>
|
||||
<configSetting altId="p205.gpio_mode.gpio_mode_peripheral" configurationId="p205.gpio_mode"/>
|
||||
<configSetting altId="p212.cgc0.extal" configurationId="p212"/>
|
||||
<configSetting altId="p212.gpio_mode.gpio_mode_peripheral" configurationId="p212.gpio_mode"/>
|
||||
<configSetting altId="p213.cgc0.xtal" configurationId="p213"/>
|
||||
<configSetting altId="p213.gpio_mode.gpio_mode_peripheral" configurationId="p213.gpio_mode"/>
|
||||
<configSetting altId="p300.debug0.tck" configurationId="p300"/>
|
||||
<configSetting altId="p300.gpio_mode.gpio_mode_peripheral" configurationId="p300.gpio_mode"/>
|
||||
<configSetting altId="p301.spi0.ssl2" configurationId="p301"/>
|
||||
<configSetting altId="p301.gpio_mode.gpio_mode_peripheral" configurationId="p301.gpio_mode"/>
|
||||
<configSetting altId="p303.output.low" configurationId="p303"/>
|
||||
<configSetting altId="p303.gpio_mode.gpio_mode_out.low" configurationId="p303.gpio_mode"/>
|
||||
<configSetting altId="p304.output.low" configurationId="p304"/>
|
||||
<configSetting altId="p304.gpio_mode.gpio_mode_out.low" configurationId="p304.gpio_mode"/>
|
||||
<configSetting altId="p305.qspi0.qspclk" configurationId="p305"/>
|
||||
<configSetting altId="p305.gpio_speed.gpio_speed_high" configurationId="p305.gpio_drivecapacity"/>
|
||||
<configSetting altId="p305.gpio_mode.gpio_mode_peripheral" configurationId="p305.gpio_mode"/>
|
||||
<configSetting altId="p306.qspi0.qssl" configurationId="p306"/>
|
||||
<configSetting altId="p306.gpio_speed.gpio_speed_high" configurationId="p306.gpio_drivecapacity"/>
|
||||
<configSetting altId="p306.gpio_mode.gpio_mode_peripheral" configurationId="p306.gpio_mode"/>
|
||||
<configSetting altId="p307.qspi0.qio0" configurationId="p307"/>
|
||||
<configSetting altId="p307.gpio_speed.gpio_speed_high" configurationId="p307.gpio_drivecapacity"/>
|
||||
<configSetting altId="p307.gpio_mode.gpio_mode_peripheral" configurationId="p307.gpio_mode"/>
|
||||
<configSetting altId="p308.qspi0.qio1" configurationId="p308"/>
|
||||
<configSetting altId="p308.gpio_speed.gpio_speed_high" configurationId="p308.gpio_drivecapacity"/>
|
||||
<configSetting altId="p308.gpio_mode.gpio_mode_peripheral" configurationId="p308.gpio_mode"/>
|
||||
<configSetting altId="p309.qspi0.qio2" configurationId="p309"/>
|
||||
<configSetting altId="p309.gpio_speed.gpio_speed_high" configurationId="p309.gpio_drivecapacity"/>
|
||||
<configSetting altId="p309.gpio_mode.gpio_mode_peripheral" configurationId="p309.gpio_mode"/>
|
||||
<configSetting altId="p310.qspi0.qio3" configurationId="p310"/>
|
||||
<configSetting altId="p310.gpio_speed.gpio_speed_high" configurationId="p310.gpio_drivecapacity"/>
|
||||
<configSetting altId="p310.gpio_mode.gpio_mode_peripheral" configurationId="p310.gpio_mode"/>
|
||||
<configSetting altId="p311.output.low" configurationId="p311"/>
|
||||
<configSetting altId="p311.gpio_mode.gpio_mode_out.low" configurationId="p311.gpio_mode"/>
|
||||
<configSetting altId="p312.output.low" configurationId="p312"/>
|
||||
<configSetting altId="p312.gpio_mode.gpio_mode_out.low" configurationId="p312.gpio_mode"/>
|
||||
<configSetting altId="p313.output.low" configurationId="p313"/>
|
||||
<configSetting altId="p313.gpio_mode.gpio_mode_out.low" configurationId="p313.gpio_mode"/>
|
||||
<configSetting altId="p400.output.low" configurationId="p400"/>
|
||||
<configSetting altId="p400.gpio_mode.gpio_mode_out.low" configurationId="p400.gpio_mode"/>
|
||||
<configSetting altId="p401.etherc0.rmii.mdc" configurationId="p401"/>
|
||||
<configSetting altId="p401.gpio_speed.gpio_speed_high" configurationId="p401.gpio_drivecapacity"/>
|
||||
<configSetting altId="p401.gpio_mode.gpio_mode_peripheral" configurationId="p401.gpio_mode"/>
|
||||
<configSetting altId="p402.etherc0.rmii.mdio" configurationId="p402"/>
|
||||
<configSetting altId="p402.gpio_speed.gpio_speed_high" configurationId="p402.gpio_drivecapacity"/>
|
||||
<configSetting altId="p402.gpio_mode.gpio_mode_peripheral" configurationId="p402.gpio_mode"/>
|
||||
<configSetting altId="p403.output.high" configurationId="p403"/>
|
||||
<configSetting altId="p403.gpio_speed.gpio_speed_high" configurationId="p403.gpio_drivecapacity"/>
|
||||
<configSetting altId="p403.gpio_mode.gpio_mode_out.high" configurationId="p403.gpio_mode"/>
|
||||
<configSetting altId="p404.output.low" configurationId="p404"/>
|
||||
<configSetting altId="p404.gpio_mode.gpio_mode_out.low" configurationId="p404.gpio_mode"/>
|
||||
<configSetting altId="p405.etherc0.rmii.txd_en" configurationId="p405"/>
|
||||
<configSetting altId="p405.gpio_speed.gpio_speed_high" configurationId="p405.gpio_drivecapacity"/>
|
||||
<configSetting altId="p405.gpio_mode.gpio_mode_peripheral" configurationId="p405.gpio_mode"/>
|
||||
<configSetting altId="p406.etherc0.rmii.txd1" configurationId="p406"/>
|
||||
<configSetting altId="p406.gpio_speed.gpio_speed_high" configurationId="p406.gpio_drivecapacity"/>
|
||||
<configSetting altId="p406.gpio_mode.gpio_mode_peripheral" configurationId="p406.gpio_mode"/>
|
||||
<configSetting altId="p407.usbfs0.vbus" configurationId="p407"/>
|
||||
<configSetting altId="p407.gpio_mode.gpio_mode_peripheral" configurationId="p407.gpio_mode"/>
|
||||
<configSetting altId="p408.gpt6.gtiocb" configurationId="p408"/>
|
||||
<configSetting altId="p408.gpio_mode.gpio_mode_peripheral" configurationId="p408.gpio_mode"/>
|
||||
<configSetting altId="p409.irq0.irq06" configurationId="p409"/>
|
||||
<configSetting altId="p409.gpio_irq.gpio_irq_enabled" configurationId="p409.gpio_irq"/>
|
||||
<configSetting altId="p409.gpio_mode.gpio_mode_irq" configurationId="p409.gpio_mode"/>
|
||||
<configSetting altId="p409.gpio_pupd.gpio_pupd_ip_up" configurationId="p409.gpio_pupd"/>
|
||||
<configSetting altId="p410.spi1.miso" configurationId="p410"/>
|
||||
<configSetting altId="p410.gpio_mode.gpio_mode_peripheral" configurationId="p410.gpio_mode"/>
|
||||
<configSetting altId="p411.spi1.mosi" configurationId="p411"/>
|
||||
<configSetting altId="p411.gpio_mode.gpio_mode_peripheral" configurationId="p411.gpio_mode"/>
|
||||
<configSetting altId="p412.spi1.rspck" configurationId="p412"/>
|
||||
<configSetting altId="p412.gpio_mode.gpio_mode_peripheral" configurationId="p412.gpio_mode"/>
|
||||
<configSetting altId="p413.spi1.ssl0" configurationId="p413"/>
|
||||
<configSetting altId="p413.gpio_mode.gpio_mode_peripheral" configurationId="p413.gpio_mode"/>
|
||||
<configSetting altId="p414.irq0.irq09" configurationId="p414"/>
|
||||
<configSetting altId="p414.gpio_irq.gpio_irq_enabled" configurationId="p414.gpio_irq"/>
|
||||
<configSetting altId="p414.gpio_mode.gpio_mode_irq" configurationId="p414.gpio_mode"/>
|
||||
<configSetting altId="p414.gpio_pupd.gpio_pupd_ip_up" configurationId="p414.gpio_pupd"/>
|
||||
<configSetting altId="p415.output.low" configurationId="p415"/>
|
||||
<configSetting altId="p415.gpio_mode.gpio_mode_out.low" configurationId="p415.gpio_mode"/>
|
||||
<configSetting altId="p500.usbfs0.vbusen" configurationId="p500"/>
|
||||
<configSetting altId="p500.gpio_mode.gpio_mode_peripheral" configurationId="p500.gpio_mode"/>
|
||||
<configSetting altId="p501.usbfs0.ovrcura" configurationId="p501"/>
|
||||
<configSetting altId="p501.gpio_mode.gpio_mode_peripheral" configurationId="p501.gpio_mode"/>
|
||||
<configSetting altId="p505.sci6.scl" configurationId="p505"/>
|
||||
<configSetting altId="p505.gpio_mode.gpio_mode_peripheral" configurationId="p505.gpio_mode"/>
|
||||
<configSetting altId="p505.gpio_otype.gpio_otype_n_ch_od" configurationId="p505.gpio_otype"/>
|
||||
<configSetting altId="p506.sci6.sda" configurationId="p506"/>
|
||||
<configSetting altId="p506.gpio_mode.gpio_mode_peripheral" configurationId="p506.gpio_mode"/>
|
||||
<configSetting altId="p506.gpio_otype.gpio_otype_n_ch_od" configurationId="p506.gpio_otype"/>
|
||||
<configSetting altId="p511.iic1.sda" configurationId="p511"/>
|
||||
<configSetting altId="p511.gpio_speed.gpio_speed_medium" configurationId="p511.gpio_drivecapacity"/>
|
||||
<configSetting altId="p511.gpio_mode.gpio_mode_peripheral" configurationId="p511.gpio_mode"/>
|
||||
<configSetting altId="p512.iic1.scl" configurationId="p512"/>
|
||||
<configSetting altId="p512.gpio_speed.gpio_speed_medium" configurationId="p512.gpio_drivecapacity"/>
|
||||
<configSetting altId="p512.gpio_mode.gpio_mode_peripheral" configurationId="p512.gpio_mode"/>
|
||||
<configSetting altId="p600.ospi0.omsio4" configurationId="p600"/>
|
||||
<configSetting altId="p600.gpio_speed.gpio_speed_high" configurationId="p600.gpio_drivecapacity"/>
|
||||
<configSetting altId="p600.gpio_mode.gpio_mode_peripheral" configurationId="p600.gpio_mode"/>
|
||||
<configSetting altId="p601.ospi0.omsio2" configurationId="p601"/>
|
||||
<configSetting altId="p601.gpio_speed.gpio_speed_high" configurationId="p601.gpio_drivecapacity"/>
|
||||
<configSetting altId="p601.gpio_mode.gpio_mode_peripheral" configurationId="p601.gpio_mode"/>
|
||||
<configSetting altId="p602.ospi0.omcs1" configurationId="p602"/>
|
||||
<configSetting altId="p602.gpio_speed.gpio_speed_high" configurationId="p602.gpio_drivecapacity"/>
|
||||
<configSetting altId="p602.gpio_mode.gpio_mode_peripheral" configurationId="p602.gpio_mode"/>
|
||||
<configSetting altId="p610.ospi0.omcs0" configurationId="p610"/>
|
||||
<configSetting altId="p610.gpio_speed.gpio_speed_high" configurationId="p610.gpio_drivecapacity"/>
|
||||
<configSetting altId="p610.gpio_mode.gpio_mode_peripheral" configurationId="p610.gpio_mode"/>
|
||||
<configSetting altId="p611.output.low" configurationId="p611"/>
|
||||
<configSetting altId="p611.gpio_mode.gpio_mode_out.low" configurationId="p611.gpio_mode"/>
|
||||
<configSetting altId="p612.output.low" configurationId="p612"/>
|
||||
<configSetting altId="p612.gpio_mode.gpio_mode_out.low" configurationId="p612.gpio_mode"/>
|
||||
<configSetting altId="p613.sci7.txd" configurationId="p613"/>
|
||||
<configSetting altId="p613.gpio_mode.gpio_mode_peripheral" configurationId="p613.gpio_mode"/>
|
||||
<configSetting altId="p614.sci7.rxd" configurationId="p614"/>
|
||||
<configSetting altId="p614.gpio_mode.gpio_mode_peripheral" configurationId="p614.gpio_mode"/>
|
||||
<configSetting altId="p700.etherc0.rmii.txd0" configurationId="p700"/>
|
||||
<configSetting altId="p700.gpio_speed.gpio_speed_high" configurationId="p700.gpio_drivecapacity"/>
|
||||
<configSetting altId="p700.gpio_mode.gpio_mode_peripheral" configurationId="p700.gpio_mode"/>
|
||||
<configSetting altId="p701.etherc0.rmii.ref50ck" configurationId="p701"/>
|
||||
<configSetting altId="p701.gpio_speed.gpio_speed_high" configurationId="p701.gpio_drivecapacity"/>
|
||||
<configSetting altId="p701.gpio_mode.gpio_mode_peripheral" configurationId="p701.gpio_mode"/>
|
||||
<configSetting altId="p702.etherc0.rmii.rxd0" configurationId="p702"/>
|
||||
<configSetting altId="p702.gpio_speed.gpio_speed_high" configurationId="p702.gpio_drivecapacity"/>
|
||||
<configSetting altId="p702.gpio_mode.gpio_mode_peripheral" configurationId="p702.gpio_mode"/>
|
||||
<configSetting altId="p703.etherc0.rmii.rxd1" configurationId="p703"/>
|
||||
<configSetting altId="p703.gpio_speed.gpio_speed_high" configurationId="p703.gpio_drivecapacity"/>
|
||||
<configSetting altId="p703.gpio_mode.gpio_mode_peripheral" configurationId="p703.gpio_mode"/>
|
||||
<configSetting altId="p704.etherc0.rmii.rx_er" configurationId="p704"/>
|
||||
<configSetting altId="p704.gpio_speed.gpio_speed_high" configurationId="p704.gpio_drivecapacity"/>
|
||||
<configSetting altId="p704.gpio_mode.gpio_mode_peripheral" configurationId="p704.gpio_mode"/>
|
||||
<configSetting altId="p705.etherc0.rmii.crs_dv" configurationId="p705"/>
|
||||
<configSetting altId="p705.gpio_speed.gpio_speed_high" configurationId="p705.gpio_drivecapacity"/>
|
||||
<configSetting altId="p705.gpio_mode.gpio_mode_peripheral" configurationId="p705.gpio_mode"/>
|
||||
<configSetting altId="p708.output.low" configurationId="p708"/>
|
||||
<configSetting altId="p708.gpio_mode.gpio_mode_out.low" configurationId="p708.gpio_mode"/>
|
||||
<configSetting altId="p709.output.low" configurationId="p709"/>
|
||||
<configSetting altId="p709.gpio_mode.gpio_mode_out.low" configurationId="p709.gpio_mode"/>
|
||||
<configSetting altId="p710.output.low" configurationId="p710"/>
|
||||
<configSetting altId="p710.gpio_mode.gpio_mode_out.low" configurationId="p710.gpio_mode"/>
|
||||
<configSetting altId="p712.output.low" configurationId="p712"/>
|
||||
<configSetting altId="p712.gpio_mode.gpio_mode_out.low" configurationId="p712.gpio_mode"/>
|
||||
<configSetting altId="p713.output.low" configurationId="p713"/>
|
||||
<configSetting altId="p713.gpio_mode.gpio_mode_out.low" configurationId="p713.gpio_mode"/>
|
||||
<configSetting altId="qspi0.mode.quad.b" configurationId="qspi0.mode"/>
|
||||
<configSetting altId="qspi0.pairing.b" configurationId="qspi0.pairing"/>
|
||||
<configSetting altId="qspi0.qio0.p307" configurationId="qspi0.qio0"/>
|
||||
<configSetting altId="qspi0.qio1.p308" configurationId="qspi0.qio1"/>
|
||||
<configSetting altId="qspi0.qio2.p309" configurationId="qspi0.qio2"/>
|
||||
<configSetting altId="qspi0.qio3.p310" configurationId="qspi0.qio3"/>
|
||||
<configSetting altId="qspi0.qspclk.p305" configurationId="qspi0.qspclk"/>
|
||||
<configSetting altId="qspi0.qssl.p306" configurationId="qspi0.qssl"/>
|
||||
<configSetting altId="sci6.mode.iic.b" configurationId="sci6.mode"/>
|
||||
<configSetting altId="sci6.pairing.b" configurationId="sci6.pairing"/>
|
||||
<configSetting altId="sci6.scl.p505" configurationId="sci6.scl"/>
|
||||
<configSetting altId="sci6.sda.p506" configurationId="sci6.sda"/>
|
||||
<configSetting altId="sci7.mode.asynchronous.c" configurationId="sci7.mode"/>
|
||||
<configSetting altId="sci7.pairing.c" configurationId="sci7.pairing"/>
|
||||
<configSetting altId="sci7.rxd.p614" configurationId="sci7.rxd"/>
|
||||
<configSetting altId="sci7.txd.p613" configurationId="sci7.txd"/>
|
||||
<configSetting altId="spi0.miso.p202" configurationId="spi0.miso"/>
|
||||
<configSetting altId="spi0.mode.enabled.free" configurationId="spi0.mode"/>
|
||||
<configSetting altId="spi0.mosi.p203" configurationId="spi0.mosi"/>
|
||||
<configSetting altId="spi0.pairing.free" configurationId="spi0.pairing"/>
|
||||
<configSetting altId="spi0.rspck.p204" configurationId="spi0.rspck"/>
|
||||
<configSetting altId="spi0.ssl0.p205" configurationId="spi0.ssl0"/>
|
||||
<configSetting altId="spi0.ssl2.p301" configurationId="spi0.ssl2"/>
|
||||
<configSetting altId="spi1.miso.p410" configurationId="spi1.miso"/>
|
||||
<configSetting altId="spi1.mode.enabled.b" configurationId="spi1.mode"/>
|
||||
<configSetting altId="spi1.mosi.p411" configurationId="spi1.mosi"/>
|
||||
<configSetting altId="spi1.pairing.b" configurationId="spi1.pairing"/>
|
||||
<configSetting altId="spi1.rspck.p412" configurationId="spi1.rspck"/>
|
||||
<configSetting altId="spi1.ssl0.p413" configurationId="spi1.ssl0"/>
|
||||
<configSetting altId="usbfs0.mode.custom" configurationId="usbfs0.mode"/>
|
||||
<configSetting altId="usbfs0.ovrcura.p501" configurationId="usbfs0.ovrcura"/>
|
||||
<configSetting altId="usbfs0.vbus.p407" configurationId="usbfs0.vbus"/>
|
||||
<configSetting altId="usbfs0.vbusen.p500" configurationId="usbfs0.vbusen"/>
|
||||
</pincfg>
|
||||
<pincfg active="false" name="R7FA6M4AF3CFB.pincfg" selected="false" symbol="">
|
||||
<configSetting altId="debug0.mode.jtag" configurationId="debug0.mode"/>
|
||||
<configSetting altId="debug0.tck.p300" configurationId="debug0.tck"/>
|
||||
<configSetting altId="debug0.tdi.p110" configurationId="debug0.tdi"/>
|
||||
<configSetting altId="debug0.tdo.p109" configurationId="debug0.tdo"/>
|
||||
<configSetting altId="debug0.tms.p108" configurationId="debug0.tms"/>
|
||||
<configSetting altId="p108.debug0.tms" configurationId="p108"/>
|
||||
<configSetting altId="p108.gpio_mode.gpio_mode_peripheral" configurationId="p108.gpio_mode"/>
|
||||
<configSetting altId="p109.debug0.tdo" configurationId="p109"/>
|
||||
<configSetting altId="p109.gpio_mode.gpio_mode_peripheral" configurationId="p109.gpio_mode"/>
|
||||
<configSetting altId="p110.debug0.tdi" configurationId="p110"/>
|
||||
<configSetting altId="p110.gpio_mode.gpio_mode_peripheral" configurationId="p110.gpio_mode"/>
|
||||
<configSetting altId="p300.debug0.tck" configurationId="p300"/>
|
||||
<configSetting altId="p300.gpio_mode.gpio_mode_peripheral" configurationId="p300.gpio_mode"/>
|
||||
</pincfg>
|
||||
</raPinConfiguration>
|
||||
</raConfiguration>
|
@@ -225,15 +225,8 @@ 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
|
||||
#ifdef WOLFSSL_RENESAS_SCEPROTECT
|
||||
int Renesas_cmn_useable(const WOLFSSL *ssl, byte seskey_gennerated);
|
||||
int Renesas_cmn_SigPkCbRsaVerify(unsigned char* sig, unsigned int sigSz,
|
||||
unsigned char** out, const unsigned char* keyDer, unsigned int keySz,
|
||||
void* ctx);
|
||||
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);
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas_cmn.h>
|
||||
#endif
|
||||
|
||||
#if defined(OPENSSL_EXTRA) && defined(HAVE_SECRET_CALLBACK)
|
||||
@@ -11071,29 +11064,29 @@ int InitSigPkCb(WOLFSSL* ssl, SignatureCtx* sigCtx)
|
||||
|
||||
/* only setup the verify callback if a PK is set */
|
||||
#ifdef HAVE_ECC
|
||||
#if !defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
sigCtx->pkCbEcc = Renesas_cmn_SigPkCbEccVerify;
|
||||
sigCtx->pkCtxEcc = (void*)&sigCtx->CertAtt;
|
||||
(void)SigPkCbEccVerify;
|
||||
#else
|
||||
if (ssl->ctx->EccVerifyCb) {
|
||||
sigCtx->pkCbEcc = SigPkCbEccVerify;
|
||||
sigCtx->pkCtxEcc = ssl;
|
||||
}
|
||||
#else
|
||||
sigCtx->pkCbEcc = Renesas_cmn_SigPkCbEccVerify;
|
||||
sigCtx->pkCtxEcc = (void*)&sigCtx->CertAtt;
|
||||
(void)SigPkCbEccVerify;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#ifndef NO_RSA
|
||||
/* only setup the verify callback if a PK is set */
|
||||
#if !defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
#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;
|
||||
}
|
||||
#else
|
||||
sigCtx->pkCbRsa = Renesas_cmn_SigPkCbRsaVerify;
|
||||
sigCtx->pkCtxRsa = (void*)&sigCtx->CertAtt;
|
||||
(void)SigPkCbRsaVerify;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -12824,7 +12817,8 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
||||
}
|
||||
else {
|
||||
ssl->peerRsaKeyPresent = 1;
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || \
|
||||
defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
/* copy encrypted tsip key index into ssl object */
|
||||
if (args->dCert->sce_tsip_encRsaKeyIdx) {
|
||||
if (!ssl->peerSceTsipEncRsaKeyIndex) {
|
||||
@@ -12888,7 +12882,7 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
||||
int keyRet = 0;
|
||||
word32 idx = 0;
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
/* copy encrypted tsip key index into ssl object */
|
||||
/* copy encrypted tsip/sce key index into ssl object */
|
||||
if (args->dCert->sce_tsip_encRsaKeyIdx) {
|
||||
if (!ssl->peerSceTsipEncRsaKeyIndex) {
|
||||
ssl->peerSceTsipEncRsaKeyIndex = (byte*)XMALLOC(
|
||||
@@ -12896,7 +12890,7 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
||||
ssl->heap, DYNAMIC_TYPE_RSA);
|
||||
if (!ssl->peerSceTsipEncRsaKeyIndex) {
|
||||
args->lastErr = MEMORY_E;
|
||||
goto exit_ppc;
|
||||
ERROR_OUT(MEMORY_ERROR, exit_ppc);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16713,16 +16707,16 @@ static WC_INLINE int VerifyMac(WOLFSSL* ssl, const byte* input, word32 msgSz,
|
||||
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,
|
||||
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)
|
||||
if (!ssl->ctx->VerifyMacCb || ret == PROTOCOLCB_UNAVAILABLE)
|
||||
#endif
|
||||
ret = TimingPadVerify(ssl, input, pad, digestSz, msgSz - ivExtra,
|
||||
content);
|
||||
@@ -24935,9 +24929,9 @@ static int DoServerKeyExchange(WOLFSSL* ssl, const byte* input,
|
||||
defined(WOLFSSL_RENESAS_SCEPROTECT_ECC)
|
||||
/* already checked signature result by SCE */
|
||||
/* skip the sign checks below */
|
||||
if (Renesas_cmn_useable(ssl, 0)) {
|
||||
if (Renesas_cmn_usable(ssl, 0)) {
|
||||
break;
|
||||
} else
|
||||
}
|
||||
#endif
|
||||
if (IsAtLeastTLSv1_2(ssl)) {
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
|
12
src/keys.c
12
src/keys.c
@@ -44,9 +44,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
/* callback for TLS hmac in SCE use case */
|
||||
int Renesas_cmn_TLS_hmac(WOLFSSL* ssl, byte* digest, const byte* in,
|
||||
word32 sz, int padSz, int content, int verify, int epochOrder);
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas_cmn.h>
|
||||
#endif
|
||||
|
||||
int SetCipherSpecs(WOLFSSL* ssl)
|
||||
@@ -3121,11 +3119,11 @@ int SetKeysSide(WOLFSSL* ssl, enum encrypt_side side)
|
||||
|
||||
#if !defined(NO_CERTS) && defined(HAVE_PK_CALLBACKS)
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
if (ssl->ctx->SetKeysCb) {
|
||||
void* ctx = wolfSSL_GetSetKeysCtx(ssl);
|
||||
ret = ssl->ctx->SetKeysCb(ssl, ctx);
|
||||
if (ssl->ctx->EncryptKeysCb) {
|
||||
void* ctx = wolfSSL_GetEncryptKeysCtx(ssl);
|
||||
ret = ssl->ctx->EncryptKeysCb(ssl, ctx);
|
||||
}
|
||||
if (!ssl->ctx->SetKeysCb || ret == PROTOCOLCB_UNAVAILABLE)
|
||||
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);
|
||||
|
62
src/ssl.c
62
src/ssl.c
@@ -239,11 +239,7 @@ const WOLF_EC_NIST_NAME kNistCurves[] = {
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
/* for root ca verification */
|
||||
int 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);
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas_cmn.h>
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_SESSION_EXPORT
|
||||
@@ -5006,7 +5002,7 @@ int AddCA(WOLFSSL_CERT_MANAGER* cm, DerBuffer** pDer, int type, int verify)
|
||||
if ( ret == 0 && signer != NULL ) {
|
||||
signer->cm_idx = row;
|
||||
if (type == WOLFSSL_USER_CA) {
|
||||
if ((ret = Renesas_cmn_RootCertVerify(cert->source, cert->maxIdx,
|
||||
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,
|
||||
@@ -41986,13 +41982,13 @@ void wolfSSL_CTX_SetGenPreMasterCb(WOLFSSL_CTX* ctx, CallbackGenPreMaster cb)
|
||||
if (ctx)
|
||||
ctx->GenPreMasterCb = cb;
|
||||
}
|
||||
/* Set master secret generation callback context */
|
||||
/* Set premaster secret generation callback context */
|
||||
void wolfSSL_SetGenPreMasterCtx(WOLFSSL* ssl, void *ctx)
|
||||
{
|
||||
if (ssl)
|
||||
ssl->GenPreMasterCtx = ctx;
|
||||
}
|
||||
/* Get master secret generation callback context */
|
||||
/* Get premaster secret generation callback context */
|
||||
void* wolfSSL_GetGenPreMasterCtx(WOLFSSL* ssl)
|
||||
{
|
||||
if (ssl)
|
||||
@@ -42001,19 +41997,19 @@ void* wolfSSL_GetGenPreMasterCtx(WOLFSSL* ssl)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* callback for premaster secret generation */
|
||||
/* callback for master secret generation */
|
||||
void wolfSSL_CTX_SetGenMasterSecretCb(WOLFSSL_CTX* ctx, CallbackGenMasterSecret cb)
|
||||
{
|
||||
if (ctx)
|
||||
ctx->GenMasterCb = cb;
|
||||
}
|
||||
/* Set premaster secret generation callback context */
|
||||
/* Set master secret generation callback context */
|
||||
void wolfSSL_SetGenMasterSecretCtx(WOLFSSL* ssl, void *ctx)
|
||||
{
|
||||
if (ssl)
|
||||
ssl->GenMasterCtx = ctx;
|
||||
}
|
||||
/* Get premaster secret generation callback context */
|
||||
/* Get master secret generation callback context */
|
||||
void* wolfSSL_GetGenMasterSecretCtx(WOLFSSL* ssl)
|
||||
{
|
||||
if (ssl)
|
||||
@@ -42023,19 +42019,19 @@ void* wolfSSL_GetGenMasterSecretCtx(WOLFSSL* ssl)
|
||||
}
|
||||
|
||||
/* callback for session key generation */
|
||||
void wolfSSL_CTX_SetGenSesssionKeyCb(WOLFSSL_CTX* ctx, CallbackGenSessionKey cb)
|
||||
void wolfSSL_CTX_SetGenSessionKeyCb(WOLFSSL_CTX* ctx, CallbackGenSessionKey cb)
|
||||
{
|
||||
if (ctx)
|
||||
ctx->GenSessionKeyCb = cb;
|
||||
}
|
||||
/* Set sesssion key generation callback context */
|
||||
void wolfSSL_SetGenSesssionKeyCtx(WOLFSSL* ssl, void *ctx)
|
||||
void wolfSSL_SetGenSessionKeyCtx(WOLFSSL* ssl, void *ctx)
|
||||
{
|
||||
if (ssl)
|
||||
ssl->GenSessionKeyCtx = ctx;
|
||||
}
|
||||
/* Get sesssion key generation callback context */
|
||||
void* wolfSSL_GetGenSesssionKeyCtx(WOLFSSL* ssl)
|
||||
void* wolfSSL_GetGenSessionKeyCtx(WOLFSSL* ssl)
|
||||
{
|
||||
if (ssl)
|
||||
return ssl->GenSessionKeyCtx;
|
||||
@@ -42043,40 +42039,41 @@ void* wolfSSL_GetGenSesssionKeyCtx(WOLFSSL* ssl)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* callback for set keys */
|
||||
void wolfSSL_CTX_SetSetKeysCb(WOLFSSL_CTX* ctx, CallbackSetKeys cb)
|
||||
/* callback for setting encryption keys */
|
||||
void wolfSSL_CTX_SetEncryptKeysCb(WOLFSSL_CTX* ctx, CallbackEncryptKeys cb)
|
||||
{
|
||||
if (ctx)
|
||||
ctx->SetKeysCb = cb;
|
||||
ctx->EncryptKeysCb = cb;
|
||||
}
|
||||
/* Set set keys callback context */
|
||||
void wolfSSL_SetSetKeysCtx(WOLFSSL* ssl, void *ctx)
|
||||
/* Set encryption keys callback context */
|
||||
void wolfSSL_SetEncryptKeysCtx(WOLFSSL* ssl, void *ctx)
|
||||
{
|
||||
if (ssl)
|
||||
ssl->SetKeysCtx = ctx;
|
||||
ssl->EncryptKeysCtx = ctx;
|
||||
}
|
||||
/* Get set keys callback context */
|
||||
void* wolfSSL_GetSetKeysCtx(WOLFSSL* ssl)
|
||||
/* Get encryption keys callback context */
|
||||
void* wolfSSL_GetEncryptKeysCtx(WOLFSSL* ssl)
|
||||
{
|
||||
if (ssl)
|
||||
return ssl->SetKeysCtx;
|
||||
return ssl->EncryptKeysCtx;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* callback for verify data */
|
||||
/* 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 set keys callback context */
|
||||
/* Set Tls finished callback context */
|
||||
void wolfSSL_SetTlsFinishedCtx(WOLFSSL* ssl, void *ctx)
|
||||
{
|
||||
if (ssl)
|
||||
ssl->TlsFinishedCtx = ctx;
|
||||
}
|
||||
/* Get set keys callback context */
|
||||
/* Get Tls finished callback context */
|
||||
void* wolfSSL_GetTlsFinishedCtx(WOLFSSL* ssl)
|
||||
{
|
||||
if (ssl)
|
||||
@@ -42086,22 +42083,23 @@ void* wolfSSL_GetTlsFinishedCtx(WOLFSSL* ssl)
|
||||
}
|
||||
#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_AEAD_ONLY)
|
||||
/* callback for verify data */
|
||||
void wolfSSL_CTX_SetVerifymacCb(WOLFSSL_CTX* ctx, CallbackVerifymac cb)
|
||||
void wolfSSL_CTX_SetVerifyMacCb(WOLFSSL_CTX* ctx, CallbackVerifyMac cb)
|
||||
{
|
||||
if (ctx)
|
||||
ctx->VerifymacCb = cb;
|
||||
ctx->VerifyMacCb = cb;
|
||||
}
|
||||
|
||||
/* Set set keys callback context */
|
||||
void wolfSSL_SetVerifymacCtx(WOLFSSL* ssl, void *ctx)
|
||||
void wolfSSL_SetVerifyMacCtx(WOLFSSL* ssl, void *ctx)
|
||||
{
|
||||
if (ssl)
|
||||
ssl->VerifymacCtx = ctx;
|
||||
ssl->VerifyMacCtx = ctx;
|
||||
}
|
||||
/* Get set keys callback context */
|
||||
void* wolfSSL_GetVerifymacCtx(WOLFSSL* ssl)
|
||||
void* wolfSSL_GetVerifyMacCtx(WOLFSSL* ssl)
|
||||
{
|
||||
if (ssl)
|
||||
return ssl->VerifymacCtx;
|
||||
return ssl->VerifyMacCtx;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@@ -404,7 +404,7 @@ int DeriveTlsKeys(WOLFSSL* ssl)
|
||||
#if !defined(NO_CERTS) && defined(HAVE_PK_CALLBACKS)
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
if (ssl->ctx->GenSessionKeyCb) {
|
||||
void* ctx = wolfSSL_GetGenSesssionKeyCtx(ssl);
|
||||
void* ctx = wolfSSL_GetGenSessionKeyCtx(ssl);
|
||||
ret = ssl->ctx->GenSessionKeyCb(ssl, ctx);
|
||||
}
|
||||
if (!ssl->ctx->GenSessionKeyCb || ret == PROTOCOLCB_UNAVAILABLE)
|
||||
|
@@ -1441,7 +1441,7 @@ static void* benchmarks_do(void* args)
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_RENESAS_SYNC
|
||||
devId = wc_CryptoCb_CryptInitRenesascmn(NULL, &guser_PKCbInfo);
|
||||
devId = wc_CryptoCb_CryptInitRenesasCmn(NULL, &guser_PKCbInfo);
|
||||
if (devId == INVALID_DEVID) {
|
||||
printf("Couldn't get the Renesas device ID\n");
|
||||
}
|
||||
@@ -2119,7 +2119,7 @@ int benchmark_free(void)
|
||||
wc_CryptoCb_CleanupOcteon(&devId);
|
||||
#endif
|
||||
#ifdef HAVE_RENESAS_SYNC
|
||||
wc_CryptoCb_CleanupRenesascmn(&devId);
|
||||
wc_CryptoCb_CleanupRenesasCmn(&devId);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@@ -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)
|
||||
@@ -198,9 +202,7 @@ int tsip_tls_CertVerify(const byte *cert, word32 certSz,
|
||||
word32 key_e_start, word32 key_e_len,
|
||||
byte *tsip_encRsaKeyIdx);
|
||||
#endif
|
||||
#ifdef WOLFSSL_RENESAS_SCEPROTECT
|
||||
byte Rnesas_cmn_checkCA(word32 cmdIdx);
|
||||
#endif
|
||||
|
||||
|
||||
/* Calculates the minimum number of bytes required to encode the value.
|
||||
*
|
||||
@@ -13105,9 +13107,7 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
|
||||
#else
|
||||
CertAttribute* certatt = NULL;
|
||||
|
||||
#if !defined(NO_RSA)
|
||||
certatt = (CertAttribute*)&sigCtx->CertAtt;
|
||||
#elif defined(HAVE_ECC)
|
||||
#if !defined(NO_RSA) || defined(HAVE_ECC)
|
||||
certatt = (CertAttribute*)&sigCtx->CertAtt;
|
||||
#endif
|
||||
if(certatt) {
|
||||
@@ -13462,12 +13462,12 @@ static int ConfirmSignature(SignatureCtx* sigCtx,
|
||||
if (rsaKeyIdx != NULL)
|
||||
{
|
||||
ret = tsip_tls_CertVerify(buf, bufSz, sigCtx->sigCpy,
|
||||
sigSz,
|
||||
sigCtx->.CertAtt.pubkey_n_start - sigCtx->certBegin,
|
||||
sigCtx->.CertAtt.pubkey_n_len - 1,
|
||||
sigCtx->.CertAtt.pubkey_e_start - sigCtx->certBegin,
|
||||
sigCtx->.CertAtt.pubkey_e_len - 1,
|
||||
rsaKeyIdx);
|
||||
sigSz,
|
||||
sigCtx->.CertAtt.pubkey_n_start - sigCtx->certBegin,
|
||||
sigCtx->.CertAtt.pubkey_n_len - 1,
|
||||
sigCtx->.CertAtt.pubkey_e_start - sigCtx->certBegin,
|
||||
sigCtx->.CertAtt.pubkey_e_len - 1,
|
||||
rsaKeyIdx);
|
||||
|
||||
if (ret == 0){
|
||||
sigCtx->verifyByTSIP_SCE = 1;
|
||||
@@ -18209,7 +18209,7 @@ int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
|
||||
/* 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 && Rnesas_cmn_checkCA(cert->ca->cm_idx) != 0 &&
|
||||
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)) {
|
||||
|
||||
@@ -18223,7 +18223,7 @@ int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
|
||||
} else {
|
||||
if (cert->ca) {
|
||||
/* TSIP isn't usable */
|
||||
if (Rnesas_cmn_checkCA(cert->ca->cm_idx) == 0)
|
||||
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.CertAtt.pubkey_n_len != 256)
|
||||
|
@@ -35,10 +35,10 @@
|
||||
#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; /* index of CM table */
|
||||
static int devId = 7890; /* dev Id for Crypt Callback */
|
||||
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
|
||||
|
||||
@@ -219,14 +219,14 @@ static int Renesas_cmn_CryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
|
||||
* session_key_generated : if session key has been generated
|
||||
* return 1 for usable, 0 for unusable
|
||||
*/
|
||||
int Renesas_cmn_useable(const WOLFSSL* ssl, byte session_key_generated)
|
||||
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 = sce_useable(ssl, session_key_generated);
|
||||
ret = wc_sce_usable(ssl, session_key_generated);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
@@ -239,7 +239,7 @@ int Renesas_cmn_useable(const WOLFSSL* ssl, byte session_key_generated)
|
||||
* ctx : callback context
|
||||
* return valid device Id on success, otherwise INVALID_DEVIID
|
||||
*/
|
||||
int wc_CryptoCb_CryptInitRenesascmn(WOLFSSL* ssl, void* ctx)
|
||||
int wc_CryptoCb_CryptInitRenesasCmn(WOLFSSL* ssl, void* ctx)
|
||||
{
|
||||
(void)ssl;
|
||||
(void)ctx;
|
||||
@@ -266,7 +266,7 @@ int wc_CryptoCb_CryptInitRenesascmn(WOLFSSL* ssl, void* ctx)
|
||||
* id : a pointer to device id to unregister
|
||||
* no return value
|
||||
*/
|
||||
void wc_CryptoCb_CleanupRenesascmn(int* id)
|
||||
void wc_CryptoCb_CleanupRenesasCmn(int* id)
|
||||
{
|
||||
wc_CryptoCb_UnRegisterDevice(*id);
|
||||
*id = INVALID_DEVID;
|
||||
@@ -281,7 +281,7 @@ void wc_CryptoCb_CleanupRenesascmn(int* id)
|
||||
* cmdIdx : ca index
|
||||
* return 1 can be used, otherwise 0
|
||||
*/
|
||||
byte Rnesas_cmn_checkCA(word32 cmIdx)
|
||||
WOLFSSL_LOCAL byte Renesas_cmn_checkCA(word32 cmIdx)
|
||||
{
|
||||
return (cmIdx == g_CAscm_Idx? 1:0);
|
||||
}
|
||||
@@ -304,7 +304,7 @@ static byte sce_tsip_rootCAverified( )
|
||||
* keySz Length of key in bytes
|
||||
* return FSP_SUCCESS(0) on sucess, otherwise FSP/TSIP error code
|
||||
*/
|
||||
int Renesas_cmn_RsaVerify(WOLFSSL* ssl, byte* sig, word32 sigSz,
|
||||
WOLFSSL_LOCAL int Renesas_cmn_RsaVerify(WOLFSSL* ssl, byte* sig, word32 sigSz,
|
||||
byte** out, const byte* key, word32 keySz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
@@ -312,17 +312,17 @@ int Renesas_cmn_RsaVerify(WOLFSSL* ssl, byte* sig, word32 sigSz,
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO TSIP */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
ret = SCE_RsaVerify(ssl, sig, sigSz, out,key, keySz, ctx);
|
||||
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);
|
||||
}
|
||||
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;
|
||||
@@ -340,16 +340,16 @@ int Renesas_cmn_RsaVerify(WOLFSSL* ssl, byte* sig, word32 sigSz,
|
||||
* result a pointer to int indicates if the verify is ok
|
||||
* return FSP_SUCCESS(0) on sucess, otherwise FSP/TSIP error code
|
||||
*/
|
||||
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_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 = SCE_EccVerify(ssl, sig, sigSz, hash, hashSz, key, keySz,
|
||||
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 */
|
||||
@@ -376,7 +376,7 @@ int Renesas_cmn_EccVerify(WOLFSSL* ssl, const uint8_t* sig, uint32_t sigSz,
|
||||
* cm_row CA index
|
||||
* return FSP_SUCCESS(0) on sucess, otherwise FSP/TSIP error code
|
||||
*/
|
||||
int Renesas_cmn_RootCertVerify(const byte* cert, word32 cert_len, word32 key_n_start,
|
||||
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;
|
||||
@@ -389,7 +389,7 @@ int Renesas_cmn_RootCertVerify(const byte* cert, word32 cert_len, word32 key_n_s
|
||||
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
|
||||
ret = sce_tls_RootCertVerify(cert, cert_len, key_n_start,
|
||||
ret = wc_sce_tls_RootCertVerify(cert, cert_len, key_n_start,
|
||||
key_n_len, key_e_start, key_e_len, cm_row);
|
||||
#endif
|
||||
} else {
|
||||
@@ -405,10 +405,10 @@ int Renesas_cmn_RootCertVerify(const byte* cert, word32 cert_len, word32 key_n_s
|
||||
* ssl the WOLFSSL object
|
||||
* side CLIENT or SERVER
|
||||
* handshake_hash hash while doing handshake
|
||||
* hashes calculated data by SCE/TSIP pseduo reandom function
|
||||
* hashes calculated data by SCE/TSIP pseduo random function
|
||||
* return FSP_SUCCESS(0) on sucess, otherwise FSP/TSIP error code
|
||||
*/
|
||||
int Renesas_cmn_TlsFinished(WOLFSSL* ssl, const byte *side,
|
||||
WOLFSSL_LOCAL int Renesas_cmn_TlsFinished(WOLFSSL* ssl, const byte *side,
|
||||
const byte *handshake_hash,
|
||||
byte *hashes, void* ctx)
|
||||
{
|
||||
@@ -423,7 +423,7 @@ int Renesas_cmn_TlsFinished(WOLFSSL* ssl, const byte *side,
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
ret = sce_generateVerifyData(ssl->arrays->sce_masterSecret, /* master secret */
|
||||
ret = wc_sce_generateVerifyData(ssl->arrays->sce_masterSecret, /* master secret */
|
||||
side, handshake_hash, hashes);
|
||||
#endif
|
||||
|
||||
@@ -431,14 +431,14 @@ int Renesas_cmn_TlsFinished(WOLFSSL* ssl, const byte *side,
|
||||
}
|
||||
|
||||
/* Renesas Security Library Common Callback
|
||||
* Callback for Set Keys.
|
||||
* Register callback for tls finished when keys are generated by SCE/TSIP
|
||||
* 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
|
||||
*/
|
||||
int Renesas_cmn_SetKeys(WOLFSSL* ssl, void* ctx)
|
||||
static int Renesas_cmn_EncryptKeys(WOLFSSL* ssl, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -473,7 +473,7 @@ int Renesas_cmn_SetKeys(WOLFSSL* ssl, void* ctx)
|
||||
* ctx Callback context
|
||||
* return FSP_SUCCESS(0) on sucess, otherwise SCE/TSIP error code
|
||||
*/
|
||||
int Renesas_cmn_generateSeesionKey(WOLFSSL* ssl, void* ctx)
|
||||
WOLFSSL_LOCAL int Renesas_cmn_generateSeesionKey(WOLFSSL* ssl, void* ctx)
|
||||
{
|
||||
int ret = -1;
|
||||
|
||||
@@ -485,13 +485,13 @@ int Renesas_cmn_generateSeesionKey(WOLFSSL* ssl, void* ctx)
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
ret = sce_generateSeesionKey(ssl, ctx, devId);
|
||||
ret = wc_sce_generateSeesionKey(ssl, ctx, devId);
|
||||
if (ret == 0) {
|
||||
wolfSSL_CTX_SetSetKeysCb(ssl->ctx, Renesas_cmn_SetKeys);
|
||||
wolfSSL_SetSetKeysCtx(ssl, ctx);
|
||||
wolfSSL_CTX_SetEncryptKeysCb(ssl->ctx, Renesas_cmn_EncryptKeys);
|
||||
wolfSSL_SetEncryptKeysCtx(ssl, ctx);
|
||||
} else {
|
||||
wolfSSL_CTX_SetSetKeysCb(ssl->ctx, NULL);
|
||||
wolfSSL_SetSetKeysCtx(ssl, NULL);
|
||||
wolfSSL_CTX_SetEncryptKeysCb(ssl->ctx, NULL);
|
||||
wolfSSL_SetEncryptKeysCtx(ssl, NULL);
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
@@ -510,8 +510,8 @@ int Renesas_cmn_generateSeesionKey(WOLFSSL* ssl, void* ctx)
|
||||
* otherwise PROTOCOLCB_UNAVAILABLE
|
||||
* so that caller could continue to process if want
|
||||
*/
|
||||
int Renesas_cmn_generatePremasterSecret(WOLFSSL* ssl, byte *premaster,
|
||||
word32 preSz, void* ctx)
|
||||
WOLFSSL_LOCAL int Renesas_cmn_generatePremasterSecret(WOLFSSL* ssl,
|
||||
byte *premaster, word32 preSz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@@ -521,8 +521,8 @@ int Renesas_cmn_generatePremasterSecret(WOLFSSL* ssl, byte *premaster,
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (Renesas_cmn_useable(ssl, 0)) {
|
||||
ret = sce_generatePremasterSecret(premaster, preSz);
|
||||
if (Renesas_cmn_usable(ssl, 0)) {
|
||||
ret = wc_sce_generatePremasterSecret(premaster, preSz);
|
||||
ssl->arrays->preMasterSz = preSz;
|
||||
} else
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
@@ -542,7 +542,7 @@ int Renesas_cmn_generatePremasterSecret(WOLFSSL* ssl, byte *premaster,
|
||||
* otherwise PROTOCOLCB_UNAVAILABLE
|
||||
* so that caller could continue to process if want
|
||||
*/
|
||||
int Renesas_cmn_genMasterSecret(struct WOLFSSL* ssl, void* ctx)
|
||||
WOLFSSL_LOCAL int Renesas_cmn_genMasterSecret(struct WOLFSSL* ssl, void* ctx)
|
||||
{
|
||||
int ret = WOLFSSL_NOT_IMPLEMENTED;
|
||||
|
||||
@@ -552,8 +552,8 @@ int Renesas_cmn_genMasterSecret(struct WOLFSSL* ssl, void* ctx)
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (Renesas_cmn_useable(ssl, 0)) {
|
||||
ret = sce_generateMasterSecret(
|
||||
if (Renesas_cmn_usable(ssl, 0)) {
|
||||
ret = wc_sce_generateMasterSecret(
|
||||
ssl->options.cipherSuite0,
|
||||
ssl->options.cipherSuite,
|
||||
ssl->arrays->preMasterSecret,
|
||||
@@ -561,13 +561,14 @@ int Renesas_cmn_genMasterSecret(struct WOLFSSL* ssl, void* ctx)
|
||||
ssl->arrays->serverRandom,
|
||||
ssl->arrays->sce_masterSecret);
|
||||
if (ret == 0) {
|
||||
sce_storeKeyCtx(ssl, ctx);
|
||||
wc_sce_storeKeyCtx(ssl, ctx);
|
||||
/* set Session Key generation Callback for use */
|
||||
wolfSSL_CTX_SetGenSesssionKeyCb(ssl->ctx, Renesas_cmn_generateSeesionKey);
|
||||
wolfSSL_SetGenSesssionKeyCtx(ssl, ctx);
|
||||
wolfSSL_CTX_SetGenSessionKeyCb(ssl->ctx,
|
||||
Renesas_cmn_generateSeesionKey);
|
||||
wolfSSL_SetGenSessionKeyCtx(ssl, ctx);
|
||||
} else {
|
||||
wolfSSL_CTX_SetGenSesssionKeyCb(ssl->ctx, NULL);
|
||||
wolfSSL_SetGenSesssionKeyCtx(ssl, NULL);
|
||||
wolfSSL_CTX_SetGenSessionKeyCb(ssl->ctx, NULL);
|
||||
wolfSSL_SetGenSessionKeyCtx(ssl, NULL);
|
||||
}
|
||||
} else
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
@@ -591,25 +592,40 @@ int Renesas_cmn_genMasterSecret(struct WOLFSSL* ssl, void* ctx)
|
||||
* otherwise CRYPTOCB_UNAVAILABLE
|
||||
* so that caller could continue to process if want
|
||||
*/
|
||||
int Renesas_cmn_RsaEnc(WOLFSSL* ssl, const unsigned char* in,
|
||||
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 (sce_useable(ssl, 0) && wc_RsaEncryptSize(ssl->peerRsaKey) == 256) {
|
||||
ret = sce_generateEncryptPreMasterSecret(ssl, out, outSz);
|
||||
} else
|
||||
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;
|
||||
}
|
||||
@@ -627,7 +643,7 @@ int Renesas_cmn_RsaEnc(WOLFSSL* ssl, const unsigned char* in,
|
||||
* otherwise PROTOCOLCB_UNAVAILABLE
|
||||
* so that caller could continue to process if want
|
||||
*/
|
||||
int Renesas_cmn_VerifyHmac(WOLFSSL *ssl, const byte* message,
|
||||
WOLFSSL_LOCAL int Renesas_cmn_VerifyHmac(WOLFSSL *ssl, const byte* message,
|
||||
word32 messageSz, word32 macSz, word32 content, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
@@ -636,8 +652,8 @@ int Renesas_cmn_VerifyHmac(WOLFSSL *ssl, const byte* message,
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (sce_useable(ssl, 1)) {
|
||||
ret = sce_Sha256VerifyHmac(ssl, message, messageSz, macSz, content);
|
||||
if (wc_sce_usable(ssl, 1)) {
|
||||
ret = wc_sce_Sha256VerifyHmac(ssl, message, messageSz, macSz, content);
|
||||
} else
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
#endif
|
||||
@@ -657,8 +673,8 @@ int Renesas_cmn_VerifyHmac(WOLFSSL *ssl, const byte* message,
|
||||
* epocOrder
|
||||
* return FSP_SUCCESS(0) on sucess, otherwise error code
|
||||
*/
|
||||
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_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];
|
||||
@@ -666,11 +682,11 @@ int Renesas_cmn_TLS_hmac(WOLFSSL* ssl, byte* digest, const byte* in,
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
/* TODO call tsip api */
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (Renesas_cmn_useable(ssl, 1)) {
|
||||
if (Renesas_cmn_usable(ssl, 1)) {
|
||||
if (ssl->specs.hash_size == WC_SHA256_DIGEST_SIZE) {
|
||||
wolfSSL_SetTlsHmacInner(ssl, myInner, sz, content, verify);
|
||||
ret = sce_Sha256GenerateHmac(ssl, myInner, WOLFSSL_TLS_HMAC_INNER_SZ,
|
||||
in, sz, digest);
|
||||
ret = wc_sce_Sha256GenerateHmac(ssl, myInner, WOLFSSL_TLS_HMAC_INNER_SZ,
|
||||
in, sz, digest);
|
||||
}
|
||||
else
|
||||
ret = TSIP_MAC_DIGSZ_E;
|
||||
@@ -697,9 +713,9 @@ int Renesas_cmn_TLS_hmac(WOLFSSL* ssl, byte* digest, const byte* in,
|
||||
* otherwise CRYPTOCB_UNAVAILABLE
|
||||
* so that caller could continue to process if want
|
||||
*/
|
||||
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_SigPkCbRsaVerify(unsigned char* sig,
|
||||
unsigned int sigSz, unsigned char** out, const unsigned char* keyDer,
|
||||
unsigned int keySz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
CertAttribute* CertAtt;
|
||||
@@ -722,7 +738,7 @@ int Renesas_cmn_SigPkCbRsaVerify(unsigned char* sig, unsigned int sigSz,
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (CertAtt->keyIndex != NULL)
|
||||
{
|
||||
ret = sce_tls_CertVerify(CertAtt->cert, CertAtt->certSz, sig, sigSz,
|
||||
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,
|
||||
@@ -731,7 +747,7 @@ int Renesas_cmn_SigPkCbRsaVerify(unsigned char* sig, unsigned int sigSz,
|
||||
if (ret == 0){
|
||||
CertAtt->verifyByTSIP_SCE = 1;
|
||||
} else {
|
||||
WOLFSSL_MSG("RSA Verify by tsip didn't match");
|
||||
WOLFSSL_MSG("RSA Verify by SCE didn't match");
|
||||
ret = ASN_SIG_CONFIRM_E;
|
||||
}
|
||||
} else
|
||||
@@ -756,8 +772,8 @@ int Renesas_cmn_SigPkCbRsaVerify(unsigned char* sig, unsigned int sigSz,
|
||||
* otherwise CRYPTOCB_UNAVAILABLE
|
||||
* so that caller could continue to process if want
|
||||
*/
|
||||
int Renesas_cmn_SigPkCbEccVerify(const unsigned char* sig, unsigned int sigSz,
|
||||
const unsigned char* hash, unsigned int hashSz,
|
||||
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)
|
||||
{
|
||||
@@ -770,7 +786,7 @@ int Renesas_cmn_SigPkCbEccVerify(const unsigned char* sig, unsigned int sigSz,
|
||||
(void)hash;
|
||||
(void)hashSz;
|
||||
/* sanity check */
|
||||
if (sig == NULL || keyDer == NULL || hash == NULL || ctx == NULL||
|
||||
if (sig == NULL || keyDer == NULL || hash == NULL || ctx == NULL ||
|
||||
result == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
@@ -785,17 +801,17 @@ int Renesas_cmn_SigPkCbEccVerify(const unsigned char* sig, unsigned int sigSz,
|
||||
#elif defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
if (CertAtt->keyIndex != NULL)
|
||||
{
|
||||
ret = sce_tls_CertVerify(CertAtt->cert, CertAtt->certSz, sig, sigSz,
|
||||
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){
|
||||
if (ret == 0) {
|
||||
CertAtt->verifyByTSIP_SCE = 1;
|
||||
*result = 1;
|
||||
} else {
|
||||
WOLFSSL_MSG("RSA Verify by tsip didn't match");
|
||||
WOLFSSL_MSG("RSA Verify by SCE didn't match");
|
||||
ret = ASN_SIG_CONFIRM_E;
|
||||
}
|
||||
} else
|
||||
@@ -804,4 +820,5 @@ int Renesas_cmn_SigPkCbEccVerify(const unsigned char* sig, unsigned int sigSz,
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* SCEPROTECT || TSIP */
|
||||
|
@@ -68,12 +68,12 @@ typedef fsp_err_t (*aesGcmDecFinalFn)
|
||||
* 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
|
||||
* 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
|
||||
*/
|
||||
int wc_sce_AesGcmEncrypt(struct Aes* aes, byte* out,
|
||||
WOLFSSL_LOCAL int wc_sce_AesGcmEncrypt(struct Aes* aes, byte* out,
|
||||
const byte* in, word32 sz,
|
||||
byte* iv, word32 ivSz,
|
||||
byte* authTag, word32 authTagSz,
|
||||
@@ -111,6 +111,11 @@ int wc_sce_AesGcmEncrypt(struct Aes* aes, byte* out,
|
||||
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;
|
||||
@@ -124,10 +129,10 @@ int wc_sce_AesGcmEncrypt(struct Aes* aes, byte* out,
|
||||
|
||||
|
||||
/* check if AES GCM can be used by SCE */
|
||||
if ((ret = sce_hw_lock()) == 0) {
|
||||
if ((ret = wc_sce_hw_lock()) == 0) {
|
||||
|
||||
/* allocate buffers for plaintaxt, ciphertext and authTag to make sure
|
||||
* those buffers 32bit aligned as TSIP requests.
|
||||
* those buffers 32bit aligned as SCE requests.
|
||||
*/
|
||||
delta = sz % AES_BLOCK_SIZE;
|
||||
plainBuf = XMALLOC(sz, aes->heap, DYNAMIC_TYPE_AES);
|
||||
@@ -136,7 +141,7 @@ int wc_sce_AesGcmEncrypt(struct Aes* aes, byte* out,
|
||||
DYNAMIC_TYPE_AES);
|
||||
|
||||
if (plainBuf == NULL || cipherBuf == NULL || aTagBuf == NULL) {
|
||||
WOLFSSL_MSG("wc_tsip_AesGcmEncrypt: buffer allocation faild");
|
||||
WOLFSSL_MSG("wc_sce_AesGcmEncrypt: buffer allocation faild");
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
@@ -189,14 +194,14 @@ int wc_sce_AesGcmEncrypt(struct Aes* aes, byte* out,
|
||||
ret = updateFn(&_handle, plainBuf, cipherBuf, sz, NULL, 0UL);
|
||||
}
|
||||
if (ret != FSP_SUCCESS) {
|
||||
WOLFSSL_MSG("R_TSIP_AesXXXGcmEncryptUpdate: failed");
|
||||
WOLFSSL_MSG("R_SCE_AesXXXGcmEncryptUpdate: failed");
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
if (ret == FSP_SUCCESS) {
|
||||
/* Once R_TSIP_AesxxxGcmEncryptInit or R_TSIP_AesxxxEncryptUpdate is
|
||||
* called, R_TSIP_AesxxxGcmEncryptFinal must be called regardless of
|
||||
* the result of the previous call. Otherwise, TSIP can not come out
|
||||
/* 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;
|
||||
@@ -215,7 +220,7 @@ int wc_sce_AesGcmEncrypt(struct Aes* aes, byte* out,
|
||||
|
||||
}
|
||||
else {
|
||||
WOLFSSL_MSG("R_TSIP_AesxxxGcmEncryptFinal: failed");
|
||||
WOLFSSL_MSG("R_SCE_AesxxxGcmEncryptFinal: failed");
|
||||
ret = -1;
|
||||
}
|
||||
}
|
||||
@@ -225,7 +230,7 @@ int wc_sce_AesGcmEncrypt(struct Aes* aes, byte* out,
|
||||
XFREE(cipherBuf, aes->heap, DYNAMIC_TYPE_AES);
|
||||
XFREE(aTagBuf, aes->heap, DYNAMIC_TYPE_AES);
|
||||
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
|
||||
}
|
||||
|
||||
@@ -244,7 +249,7 @@ int wc_sce_AesGcmEncrypt(struct Aes* aes, byte* out,
|
||||
* ctx The Callback context
|
||||
* return FSP_SUCCESS(0) on Success, otherwise negative value
|
||||
*/
|
||||
int wc_sce_AesGcmDecrypt(struct Aes* aes, byte* out,
|
||||
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,
|
||||
@@ -282,7 +287,11 @@ int wc_sce_AesGcmDecrypt(struct Aes* aes, byte* out,
|
||||
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;
|
||||
@@ -295,7 +304,7 @@ int wc_sce_AesGcmDecrypt(struct Aes* aes, byte* out,
|
||||
}
|
||||
|
||||
|
||||
if ((ret = sce_hw_lock()) == 0) {
|
||||
if ((ret = wc_sce_hw_lock()) == 0) {
|
||||
/* allocate buffers for plain-taxt, cipher-text, authTag and AAD.
|
||||
* TSIP requests those buffers 32bit aligned.
|
||||
*/
|
||||
@@ -332,7 +341,7 @@ int wc_sce_AesGcmDecrypt(struct Aes* aes, byte* out,
|
||||
&key_server_aes,
|
||||
NULL, NULL);
|
||||
if (ret != FSP_SUCCESS) {
|
||||
WOLFSSL_MSG("R_TSIP_TlsGenerateSessionKey failed");
|
||||
WOLFSSL_MSG("R_SCE_TLS_SessionKeyGenerate failed");
|
||||
ret = -1;
|
||||
}
|
||||
} else if (info->aes256_installedkey_set == 1) {
|
||||
@@ -358,7 +367,7 @@ int wc_sce_AesGcmDecrypt(struct Aes* aes, byte* out,
|
||||
ret = updateFn(&_handle, cipherBuf, plainBuf, sz, NULL, 0UL);
|
||||
}
|
||||
if (ret != FSP_SUCCESS) {
|
||||
WOLFSSL_MSG("R_TSIP_AesXXXGcmDecryptUpdate: failed in decrypt");
|
||||
WOLFSSL_MSG("R_SCE_AesXXXGcmDecryptUpdate: failed in decrypt");
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
@@ -375,7 +384,7 @@ int wc_sce_AesGcmDecrypt(struct Aes* aes, byte* out,
|
||||
XMEMCPY(out, plainBuf, dataLen);
|
||||
}
|
||||
else {
|
||||
WOLFSSL_MSG("R_TSIP_AesXXXGcmDecryptFinal: failed");
|
||||
WOLFSSL_MSG("R_SCE_AesXXXGcmDecryptFinal: failed");
|
||||
ret = -1;
|
||||
}
|
||||
}
|
||||
@@ -385,7 +394,7 @@ int wc_sce_AesGcmDecrypt(struct Aes* aes, byte* out,
|
||||
XFREE(plainBuf, aes->heap, DYNAMIC_TYPE_AES);
|
||||
XFREE(cipherBuf, aes->heap, DYNAMIC_TYPE_AES);
|
||||
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -398,7 +407,8 @@ int wc_sce_AesGcmDecrypt(struct Aes* aes, byte* out,
|
||||
* sz Length of cipher text/plaintext in bytes
|
||||
* return FSP_SUCCESS(0) on Success, otherwise negative value
|
||||
*/
|
||||
int wc_sce_AesCbcEncrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
|
||||
WOLFSSL_LOCAL int wc_sce_AesCbcEncrypt(struct Aes* aes, byte* out,
|
||||
const byte* in, word32 sz)
|
||||
{
|
||||
sce_aes_handle_t _handle;
|
||||
word32 ret;
|
||||
@@ -413,7 +423,7 @@ int wc_sce_AesCbcEncrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
|
||||
* on the device. iv is dummy */
|
||||
iv = (uint8_t*)aes->reg;
|
||||
|
||||
if((ret = sce_hw_lock()) != 0){
|
||||
if((ret = wc_sce_hw_lock()) != 0){
|
||||
WOLFSSL_MSG("Failed to lock");
|
||||
return ret;
|
||||
}
|
||||
@@ -423,7 +433,8 @@ int wc_sce_AesCbcEncrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
|
||||
} else if (aes->ctx.keySize == 32) {
|
||||
ret = R_SCE_AES256CBC_EncryptInit(&_handle, &aes->ctx.sce_wrapped_key, iv);
|
||||
} else {
|
||||
sce_hw_unlock();
|
||||
WOLFSSL_MSG("invalid key Size for SCE. Key size is neither 16 or 32.");
|
||||
wc_sce_hw_unlock();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -451,7 +462,7 @@ int wc_sce_AesCbcEncrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
return ret;
|
||||
}
|
||||
/* Perform Aes Cbc decryption by SCE
|
||||
@@ -462,7 +473,7 @@ int wc_sce_AesCbcEncrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
|
||||
* sz Length of cipher text/plaintext in bytes
|
||||
* return FSP_SUCCESS(0) on Success, otherwise negative value
|
||||
*/
|
||||
int wc_sce_AesCbcDecrypt(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)
|
||||
{
|
||||
sce_aes_handle_t _handle;
|
||||
word32 ret;
|
||||
@@ -475,7 +486,7 @@ int wc_sce_AesCbcDecrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
|
||||
|
||||
iv = (uint8_t*)aes->reg;
|
||||
|
||||
if((ret = sce_hw_lock()) != 0){
|
||||
if((ret = wc_sce_hw_lock()) != 0){
|
||||
WOLFSSL_MSG("Failed to lock");
|
||||
return ret;
|
||||
}
|
||||
@@ -485,7 +496,7 @@ int wc_sce_AesCbcDecrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
|
||||
} else if (aes->ctx.keySize == 32) {
|
||||
ret = R_SCE_AES256CBC_DecryptInit(&_handle, &aes->ctx.sce_wrapped_key, iv);
|
||||
} else {
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -512,7 +523,7 @@ int wc_sce_AesCbcDecrypt(struct Aes* aes, byte* out, const byte* in, word32 sz)
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@@ -156,7 +156,7 @@ static int SCEHashFinal(wolfssl_SCE_Hash* hash, byte* out, word32 outSz)
|
||||
|
||||
heap = hash->heap;
|
||||
|
||||
sce_hw_lock();
|
||||
wc_sce_hw_lock();
|
||||
|
||||
if (Init(&handle) == FSP_SUCCESS) {
|
||||
ret = Update(&handle, (uint8_t*)hash->msg, hash->used);
|
||||
@@ -167,7 +167,7 @@ static int SCEHashFinal(wolfssl_SCE_Hash* hash, byte* out, word32 outSz)
|
||||
}
|
||||
}
|
||||
}
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
|
||||
SCEHashFree(hash);
|
||||
return SCEHashInit(hash, heap, 0, hash->sha_type);
|
||||
@@ -194,7 +194,7 @@ static int SCEHashGet(wolfssl_SCE_Hash* hash, byte* out, word32 outSz)
|
||||
} else
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
sce_hw_lock();
|
||||
wc_sce_hw_lock();
|
||||
|
||||
if (Init(&handle) == FSP_SUCCESS) {
|
||||
ret = Update(&handle, (uint8_t*)hash->msg, hash->used);
|
||||
@@ -206,7 +206,7 @@ static int SCEHashGet(wolfssl_SCE_Hash* hash, byte* out, word32 outSz)
|
||||
}
|
||||
}
|
||||
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -78,7 +78,7 @@ static int sce_CryptHwMutexUnLock(wolfSSL_Mutex* mutex)
|
||||
* lock hw engine
|
||||
* this should be called before using engine.
|
||||
*/
|
||||
int sce_hw_lock()
|
||||
WOLFSSL_LOCAL int wc_sce_hw_lock()
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
@@ -104,17 +104,17 @@ int sce_hw_lock()
|
||||
/*
|
||||
* release hw engine
|
||||
*/
|
||||
void sce_hw_unlock( void )
|
||||
WOLFSSL_LOCAL void wc_sce_hw_unlock( void )
|
||||
{
|
||||
sce_CryptHwMutexUnLock(&sce_mutex);
|
||||
}
|
||||
|
||||
/* Open sce driver for use */
|
||||
int sce_Open()
|
||||
WOLFSSL_LOCAL int wc_sce_Open()
|
||||
{
|
||||
WOLFSSL_ENTER("sce_Open");
|
||||
WOLFSSL_ENTER("wc_sce_Open");
|
||||
int ret;
|
||||
if ((ret = sce_hw_lock()) == 0) {
|
||||
if ((ret = wc_sce_hw_lock()) == 0) {
|
||||
|
||||
ret = R_SCE_Open(&sce_ctrl, &sce_cfg);
|
||||
|
||||
@@ -139,24 +139,24 @@ int sce_Open()
|
||||
}
|
||||
|
||||
/* unlock hw */
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
|
||||
WOLFSSL_LEAVE("sce_Open", ret);
|
||||
WOLFSSL_LEAVE("wc_sce_Open", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* close SCE driver */
|
||||
void sce_Close()
|
||||
WOLFSSL_LOCAL void wc_sce_Close()
|
||||
{
|
||||
WOLFSSL_ENTER("sce Close");
|
||||
int ret;
|
||||
|
||||
if ((ret = sce_hw_lock()) == 0) {
|
||||
if ((ret = wc_sce_hw_lock()) == 0) {
|
||||
/* close SCE */
|
||||
ret = R_SCE_Close(&sce_ctrl);
|
||||
|
||||
/* unlock hw */
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
if( ret != FSP_SUCCESS ) {
|
||||
WOLFSSL_MSG("RENESAS SCE Close failed");
|
||||
}
|
||||
@@ -226,7 +226,7 @@ static int SCE_ServerKeyExVerify(uint32_t type, WOLFSSL* ssl, const uint8_t* sig
|
||||
return ret;
|
||||
}
|
||||
/* Callback for Rsa Verify */
|
||||
int SCE_RsaVerify(WOLFSSL* ssl, byte* sig, uint32_t sigSz,
|
||||
WOLFSSL_LOCAL int wc_SCE_RsaVerify(WOLFSSL* ssl, byte* sig, uint32_t sigSz,
|
||||
uint8_t** out, const byte* key, uint32_t keySz, void* ctx)
|
||||
{
|
||||
int ret = WOLFSSL_FAILURE;
|
||||
@@ -236,7 +236,7 @@ int SCE_RsaVerify(WOLFSSL* ssl, byte* sig, uint32_t sigSz,
|
||||
|
||||
WOLFSSL_PKMSG("SCE RSA Verify: sigSz %d, keySz %d\n", sigSz, keySz);
|
||||
|
||||
if (sce_useable(ssl, 0))
|
||||
if (wc_sce_usable(ssl, 0))
|
||||
ret = SCE_ServerKeyExVerify(0, ssl, sig, sigSz, ctx);
|
||||
else
|
||||
ret = CRYPTOCB_UNAVAILABLE;
|
||||
@@ -249,9 +249,9 @@ int SCE_RsaVerify(WOLFSSL* ssl, byte* sig, uint32_t sigSz,
|
||||
return ret;
|
||||
}
|
||||
/* Callback for Ecc Verify */
|
||||
int SCE_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 wc_SCE_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 = WOLFSSL_FAILURE;
|
||||
uint8_t *sigforSCE;
|
||||
@@ -270,7 +270,7 @@ int SCE_EccVerify(WOLFSSL* ssl, const uint8_t* sig, uint32_t sigSz,
|
||||
WOLFSSL_PKMSG("SCE ECC Verify: ssl->options.serverState = %d sigSz %d, hashSz %d, keySz %d\n",
|
||||
ssl->options.serverState, sigSz, hashSz, keySz);
|
||||
|
||||
if (!sce_useable(ssl, 0)) {
|
||||
if (!wc_sce_usable(ssl, 0)) {
|
||||
WOLFSSL_PKMSG("Cannot handle cipher suite by SCE");
|
||||
return CRYPTOCB_UNAVAILABLE;
|
||||
}
|
||||
@@ -321,7 +321,7 @@ int SCE_EccVerify(WOLFSSL* ssl, const uint8_t* sig, uint32_t sigSz,
|
||||
return ret;
|
||||
}
|
||||
/* Callback for ECC shared secret */
|
||||
int SCE_EccSharedSecret(WOLFSSL* ssl, ecc_key* otherKey,
|
||||
WOLFSSL_LOCAL int SCE_EccSharedSecret(WOLFSSL* ssl, ecc_key* otherKey,
|
||||
uint8_t* pubKeyDer, unsigned int* pubKeySz,
|
||||
uint8_t* out, unsigned int* outlen, int side, void* ctx)
|
||||
{
|
||||
@@ -379,30 +379,21 @@ int SCE_EccSharedSecret(WOLFSSL* ssl, ecc_key* otherKey,
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
/* Return cipher suite enumuration used in SCE library */
|
||||
uint32_t GetSceCipherSuite(
|
||||
/* Return tls cipher suite enumuration that is supported by SCE library */
|
||||
static uint32_t GetSceCipherSuite(
|
||||
uint8_t cipherSuiteFirst,
|
||||
uint8_t cipherSuite)
|
||||
{
|
||||
WOLFSSL_ENTER("GetTsipCipherSuite");
|
||||
WOLFSSL_ENTER("GetSceCipherSuite");
|
||||
uint32_t sceCipher;
|
||||
|
||||
if(cipherSuiteFirst == CIPHER_BYTE )
|
||||
{
|
||||
switch(cipherSuite){
|
||||
|
||||
case TLS_RSA_WITH_AES_128_CBC_SHA: /*2F*/
|
||||
sceCipher = SCE_TLS_RSA_WITH_AES_128_CBC_SHA; /*0*/
|
||||
break;
|
||||
|
||||
case TLS_RSA_WITH_AES_128_CBC_SHA256:
|
||||
sceCipher = SCE_TLS_RSA_WITH_AES_128_CBC_SHA256;
|
||||
break;
|
||||
|
||||
case TLS_RSA_WITH_AES_256_CBC_SHA:
|
||||
sceCipher = SCE_TLS_RSA_WITH_AES_256_CBC_SHA;
|
||||
break;
|
||||
|
||||
case TLS_RSA_WITH_AES_256_CBC_SHA256:
|
||||
sceCipher = SCE_TLS_RSA_WITH_AES_256_CBC_SHA256;
|
||||
break;
|
||||
@@ -411,7 +402,7 @@ uint32_t GetSceCipherSuite(
|
||||
sceCipher = (uint32_t)WOLFSSL_SCE_ILLEGAL_CIPHERSUITE;
|
||||
break;
|
||||
}
|
||||
WOLFSSL_MSG( "<< GetTsipCipherSuite");
|
||||
WOLFSSL_MSG( "<< GetSceCipherSuite");
|
||||
return sceCipher;
|
||||
}
|
||||
else if( cipherSuiteFirst == ECC_BYTE )
|
||||
@@ -454,10 +445,11 @@ uint32_t GetSceCipherSuite(
|
||||
/* ssl : a pointer to WOLFSSL object */
|
||||
/* session_key_generated : if session key has been generated */
|
||||
/* return 1 for usable, 0 for unusable */
|
||||
int sce_useable(const struct WOLFSSL *ssl, uint8_t session_key_generated)
|
||||
WOLFSSL_LOCAL int wc_sce_usable(const struct WOLFSSL *ssl,
|
||||
uint8_t session_key_generated)
|
||||
{
|
||||
WOLFSSL_ENTER("sce_usable");
|
||||
byte cipher;
|
||||
byte Scecipher;
|
||||
byte side;
|
||||
const Ciphers *enc;
|
||||
const Ciphers *dec;
|
||||
@@ -492,25 +484,19 @@ int sce_useable(const struct WOLFSSL *ssl, uint8_t session_key_generated)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
cipher = ssl->options.cipherSuite;
|
||||
/* retrieve cipher suite if SCE supports */
|
||||
Scecipher = GetSceCipherSuite(ssl->options.cipherSuite0,
|
||||
ssl->options.cipherSuite);
|
||||
side = ssl->options.side;
|
||||
|
||||
if (((cipher == l_TLS_RSA_WITH_AES_128_CBC_SHA256 ||
|
||||
cipher == l_TLS_RSA_WITH_AES_256_CBC_SHA256) ||
|
||||
(cipher == l_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 ||
|
||||
cipher == l_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 ||
|
||||
cipher == l_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ||
|
||||
cipher == l_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256)) &&
|
||||
side == WOLFSSL_CLIENT_END)
|
||||
|
||||
if (Scecipher != WOLFSSL_SCE_ILLEGAL_CIPHERSUITE && side == WOLFSSL_CLIENT_END)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Generate Hmac by sha256*/
|
||||
int sce_Sha256GenerateHmac(const struct WOLFSSL *ssl,const uint8_t* myInner,
|
||||
WOLFSSL_LOCAL int wc_sce_Sha256GenerateHmac(const struct WOLFSSL *ssl,const uint8_t* myInner,
|
||||
uint32_t innerSz,const uint8_t* in, uint32_t sz, byte* digest)
|
||||
{
|
||||
WOLFSSL_ENTER("sce_Sha256HmacGenerate");
|
||||
@@ -525,7 +511,7 @@ int sce_Sha256GenerateHmac(const struct WOLFSSL *ssl,const uint8_t* myInner,
|
||||
|
||||
wrapped_key = ssl->keys.sce_client_write_MAC_secret;
|
||||
|
||||
if ((ret = sce_hw_lock()) != 0) {
|
||||
if ((ret = wc_sce_hw_lock()) != 0) {
|
||||
WOLFSSL_MSG("hw lock failed\n");
|
||||
return ret;
|
||||
}
|
||||
@@ -555,14 +541,15 @@ int sce_Sha256GenerateHmac(const struct WOLFSSL *ssl,const uint8_t* myInner,
|
||||
ret = WOLFSSL_FAILURE;
|
||||
|
||||
/* unlock hw */
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
WOLFSSL_LEAVE("sce_Sha256HmacGenerate", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Verify hmac */
|
||||
int sce_Sha256VerifyHmac(const struct WOLFSSL *ssl,const uint8_t* message,
|
||||
uint32_t messageSz,uint32_t macSz, uint32_t content)
|
||||
WOLFSSL_LOCAL int wc_sce_Sha256VerifyHmac(const struct WOLFSSL *ssl,
|
||||
const uint8_t* message, uint32_t messageSz,
|
||||
uint32_t macSz, uint32_t content)
|
||||
{
|
||||
WOLFSSL_ENTER("sce_Sha256HmacVerify");
|
||||
|
||||
@@ -576,7 +563,7 @@ int sce_Sha256VerifyHmac(const struct WOLFSSL *ssl,const uint8_t* message,
|
||||
|
||||
wrapped_key = ssl->keys.sce_server_write_MAC_secret;
|
||||
|
||||
if ((ret = sce_hw_lock()) != 0) {
|
||||
if ((ret = wc_sce_hw_lock()) != 0) {
|
||||
WOLFSSL_MSG("hw lock failed\n");
|
||||
return ret;
|
||||
}
|
||||
@@ -611,13 +598,13 @@ int sce_Sha256VerifyHmac(const struct WOLFSSL *ssl,const uint8_t* message,
|
||||
}
|
||||
|
||||
/* unlock hw */
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
WOLFSSL_LEAVE("sce_Sha256HmacVerify", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* generate Verify Data based on master secret */
|
||||
int sce_generateVerifyData(const uint8_t *ms, /* master secret */
|
||||
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 */)
|
||||
{
|
||||
@@ -635,7 +622,7 @@ int sce_generateVerifyData(const uint8_t *ms, /* master secret */
|
||||
l_side = SCE_TLS_GENERATE_SERVER_VERIFY;
|
||||
}
|
||||
|
||||
if ((ret = sce_hw_lock()) == 0) {
|
||||
if ((ret = wc_sce_hw_lock()) == 0) {
|
||||
ret = R_SCE_TLS_VerifyDataGenerate(l_side, (uint32_t*)ms,
|
||||
(uint8_t*)handshake_hash, hashes/* out */);
|
||||
if (ret != FSP_SUCCESS) {
|
||||
@@ -643,14 +630,14 @@ int sce_generateVerifyData(const uint8_t *ms, /* master secret */
|
||||
}
|
||||
}
|
||||
/* unlock hw */
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
WOLFSSL_LEAVE("sce_generateVerifyData", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* generate keys for TLS communication */
|
||||
int sce_generateSeesionKey(struct WOLFSSL *ssl, User_SCEPKCbInfo* cbInfo,
|
||||
int devId)
|
||||
WOLFSSL_LOCAL int wc_sce_generateSeesionKey(struct WOLFSSL *ssl,
|
||||
User_SCEPKCbInfo* cbInfo, int devId)
|
||||
{
|
||||
WOLFSSL_MSG("sce_generateSeesionKey()");
|
||||
int ret;
|
||||
@@ -667,9 +654,9 @@ int sce_generateSeesionKey(struct WOLFSSL *ssl, User_SCEPKCbInfo* cbInfo,
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
|
||||
if ((ret = sce_hw_lock()) == 0) {
|
||||
if (sceCS == l_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ||
|
||||
sceCS == l_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256)
|
||||
if ((ret = wc_sce_hw_lock()) == 0) {
|
||||
if (sceCS == TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ||
|
||||
sceCS == TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256)
|
||||
{
|
||||
WOLFSSL_MSG("Session key for AES-GCM generation skipped.");
|
||||
|
||||
@@ -736,18 +723,18 @@ int sce_generateSeesionKey(struct WOLFSSL *ssl, User_SCEPKCbInfo* cbInfo,
|
||||
XMEMCPY(&dec->aes->ctx.sce_wrapped_key, &key_client_aes,
|
||||
sizeof(key_client_aes));
|
||||
}
|
||||
/* copy hac key index into keys */
|
||||
/* copy mac key index into keys */
|
||||
ssl->keys.sce_client_write_MAC_secret = key_client_mac;
|
||||
ssl->keys.sce_server_write_MAC_secret = key_server_mac;
|
||||
|
||||
/* set up key size and marked readly */
|
||||
/* set up key size and marked ready */
|
||||
if (enc){
|
||||
enc->aes->ctx.keySize = ssl->specs.key_size;
|
||||
enc->aes->ctx.setup = 1;
|
||||
/* ready for use */
|
||||
enc->setup = 1;
|
||||
}
|
||||
/* set up key size and marked readly */
|
||||
/* set up key size and marked ready */
|
||||
if (dec) {
|
||||
dec->aes->ctx.keySize = ssl->specs.key_size;
|
||||
dec->aes->ctx.setup = 1;
|
||||
@@ -767,7 +754,7 @@ int sce_generateSeesionKey(struct WOLFSSL *ssl, User_SCEPKCbInfo* cbInfo,
|
||||
cbInfo->session_key_set = 1;
|
||||
}
|
||||
/* unlock hw */
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
} else
|
||||
WOLFSSL_LEAVE("hw lock failed\n", ret);
|
||||
|
||||
@@ -776,7 +763,7 @@ int sce_generateSeesionKey(struct WOLFSSL *ssl, User_SCEPKCbInfo* cbInfo,
|
||||
}
|
||||
|
||||
/* generate master secret based on pre-master which is generated by SCE */
|
||||
int sce_generateMasterSecret(
|
||||
WOLFSSL_LOCAL int wc_sce_generateMasterSecret(
|
||||
uint8_t cipherSuiteFirst,
|
||||
uint8_t cipherSuite,
|
||||
const uint8_t *pr, /* pre-master */
|
||||
@@ -795,7 +782,7 @@ int sce_generateMasterSecret(
|
||||
if( sceCS == 0xffffffff)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
if ((ret = sce_hw_lock()) == 0) {
|
||||
if ((ret = wc_sce_hw_lock()) == 0) {
|
||||
ret = R_SCE_TLS_MasterSecretGenerate(
|
||||
sceCS,
|
||||
(uint32_t*)pr,
|
||||
@@ -804,7 +791,7 @@ int sce_generateMasterSecret(
|
||||
WOLFSSL_MSG("R_SCE_TLS_MasterSecretGenerate failed\n");
|
||||
}
|
||||
/* unlock hw */
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
} else {
|
||||
WOLFSSL_MSG(" hw lock failed ");
|
||||
}
|
||||
@@ -813,7 +800,8 @@ int sce_generateMasterSecret(
|
||||
}
|
||||
|
||||
/* generate pre-Master secrete by SCE */
|
||||
int sce_generatePremasterSecret(uint8_t *premaster, uint32_t preSz)
|
||||
WOLFSSL_LOCAL int wc_sce_generatePremasterSecret(uint8_t *premaster,
|
||||
uint32_t preSz)
|
||||
{
|
||||
WOLFSSL_ENTER("sce_generatePremasterSecret");
|
||||
int ret;
|
||||
@@ -821,7 +809,7 @@ int sce_generatePremasterSecret(uint8_t *premaster, uint32_t preSz)
|
||||
if (premaster == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
if ((ret = sce_hw_lock()) == 0 && preSz >=
|
||||
if ((ret = wc_sce_hw_lock()) == 0 && preSz >=
|
||||
(SCE_TLS_MASTER_SECRET_WORD_SIZE*4)) {
|
||||
/* generate pre-master, 80 bytes */
|
||||
ret = R_SCE_TLS_PreMasterSecretGenerateForRSA2048((uint32_t*)premaster);
|
||||
@@ -829,7 +817,7 @@ int sce_generatePremasterSecret(uint8_t *premaster, uint32_t preSz)
|
||||
WOLFSSL_MSG(" R_SCE_TLS_GeneratePreMasterSecret failed\n");
|
||||
}
|
||||
/* unlock hw */
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
} else {
|
||||
WOLFSSL_MSG(" hw lock failed or preSz is smaller than 80");
|
||||
}
|
||||
@@ -842,7 +830,7 @@ int sce_generatePremasterSecret(uint8_t *premaster, uint32_t preSz)
|
||||
/*
|
||||
* generate encrypted pre-Master secrete by SCE
|
||||
*/
|
||||
int sce_generateEncryptPreMasterSecret(
|
||||
WOLFSSL_LOCAL int wc_sce_generateEncryptPreMasterSecret(
|
||||
WOLFSSL* ssl,
|
||||
uint8_t* out,
|
||||
uint32_t* outSz)
|
||||
@@ -853,7 +841,7 @@ int sce_generateEncryptPreMasterSecret(
|
||||
if ((ssl == NULL) || (out == NULL) || (outSz == NULL))
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
if ((ret = sce_hw_lock()) == 0) {
|
||||
if ((ret = wc_sce_hw_lock()) == 0) {
|
||||
if (*outSz >= 256)
|
||||
ret = R_SCE_TLS_PreMasterSecretEncryptWithRSA2048(
|
||||
(uint32_t*)ssl->peerSceTsipEncRsaKeyIndex,
|
||||
@@ -865,13 +853,14 @@ int sce_generateEncryptPreMasterSecret(
|
||||
if (ret != FSP_SUCCESS) {
|
||||
WOLFSSL_MSG("R_SCE_TLS_PreMasterSecretEncryptWithRSA2048 failed\n");
|
||||
} else {
|
||||
*outSz = 256; /* TSIP can only handles 2048 RSA */
|
||||
/* set GenMaster Callbackt for Master secret generation */
|
||||
*outSz = 256; /* SCE can only handles 2048 RSA */
|
||||
/* set GenMaster Callback for Master secret generation */
|
||||
void* ctx = wolfSSL_GetRsaVerifyCtx(ssl);
|
||||
wolfSSL_CTX_SetGenMasterSecretCb(ssl->ctx, Renesas_cmn_genMasterSecret);
|
||||
wolfSSL_CTX_SetGenMasterSecretCb(ssl->ctx,
|
||||
Renesas_cmn_genMasterSecret);
|
||||
wolfSSL_SetGenMasterSecretCtx(ssl, ctx);
|
||||
}
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
|
||||
} else {
|
||||
WOLFSSL_MSG(" hw lock failed ");
|
||||
@@ -882,7 +871,7 @@ int sce_generateEncryptPreMasterSecret(
|
||||
|
||||
|
||||
/* Certificate verification by SCE */
|
||||
int sce_tls_CertVerify(
|
||||
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,
|
||||
@@ -948,7 +937,7 @@ int sce_tls_CertVerify(
|
||||
}
|
||||
|
||||
|
||||
if ((ret = sce_hw_lock()) == 0) {
|
||||
if ((ret = wc_sce_hw_lock()) == 0) {
|
||||
ret = R_SCE_TLS_CertificateVerify(
|
||||
g_user_key_info.encrypted_user_tls_key_type,
|
||||
(uint32_t*)g_encrypted_publicCA_key,/* encrypted public key */
|
||||
@@ -967,7 +956,7 @@ int sce_tls_CertVerify(
|
||||
if (sigforSCE) {
|
||||
XFREE(sigforSCE, NULL, DYNAMIC_TYPE_TEMP);
|
||||
}
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
} else {
|
||||
WOLFSSL_MSG(" hw lock failed ");
|
||||
}
|
||||
@@ -976,7 +965,7 @@ int sce_tls_CertVerify(
|
||||
}
|
||||
|
||||
/* Root Certificate verification */
|
||||
int sce_tls_RootCertVerify(
|
||||
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,
|
||||
@@ -986,7 +975,7 @@ int sce_tls_RootCertVerify(
|
||||
/* call to generate encrypted public key for certificate verification */
|
||||
uint8_t *signature = (uint8_t*)ca_cert_sig;
|
||||
|
||||
WOLFSSL_ENTER("sce_tls_RootCertVerify");
|
||||
WOLFSSL_ENTER("wc_sce_tls_RootCertVerify");
|
||||
|
||||
if (cert == NULL)
|
||||
return BAD_FUNC_ARG;
|
||||
@@ -996,7 +985,7 @@ int sce_tls_RootCertVerify(
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((ret = sce_hw_lock()) == 0) {
|
||||
if ((ret = wc_sce_hw_lock()) == 0) {
|
||||
ret = R_SCE_TLS_RootCertificateVerify(
|
||||
g_user_key_info.encrypted_user_tls_key_type,
|
||||
(uint8_t*)cert, /* CA cert */
|
||||
@@ -1013,52 +1002,18 @@ int sce_tls_RootCertVerify(
|
||||
} else {
|
||||
g_CAscm_Idx = cm_row;
|
||||
}
|
||||
sce_hw_unlock();
|
||||
wc_sce_hw_unlock();
|
||||
} else {
|
||||
WOLFSSL_MSG(" hw lock failed ");
|
||||
}
|
||||
WOLFSSL_LEAVE("sce_tls_RootCertVerify", ret);
|
||||
WOLFSSL_LEAVE("wc_sce_tls_RootCertVerify", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* to inform ca certificate sign */
|
||||
/* signature format expects RSA 2048 PSS with SHA256 */
|
||||
void sce_inform_cert_sign(const uint8_t *sign)
|
||||
{
|
||||
if(sign)
|
||||
ca_cert_sig = sign;
|
||||
}
|
||||
|
||||
void 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_ENTER("sce_inform_user_keys");
|
||||
g_user_key_info.encrypted_provisioning_key = NULL;
|
||||
g_user_key_info.iv = NULL;
|
||||
g_user_key_info.encrypted_user_tls_key = NULL;
|
||||
|
||||
if ( encrypted_provisioning_key ) {
|
||||
g_user_key_info.encrypted_provisioning_key = encrypted_provisioning_key;
|
||||
}
|
||||
if ( iv ) {
|
||||
g_user_key_info.iv = iv;
|
||||
}
|
||||
if ( encrypted_user_tls_key ) {
|
||||
g_user_key_info.encrypted_user_tls_key = encrypted_user_tls_key;
|
||||
}
|
||||
|
||||
g_user_key_info.encrypted_user_tls_key_type = encrypted_user_tls_key_type;
|
||||
|
||||
/* set callback for ECC */
|
||||
WOLFSSL_MSG("sce_inform_user_keys_ex");
|
||||
}
|
||||
/* store elements for session key generation into ssl->keys.
|
||||
* return 0 on success, negative value on failure
|
||||
*/
|
||||
int sce_storeKeyCtx(struct WOLFSSL* ssl, User_SCEPKCbInfo* info)
|
||||
WOLFSSL_LOCAL int wc_sce_storeKeyCtx(struct WOLFSSL* ssl, User_SCEPKCbInfo* info)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
@@ -1080,19 +1035,56 @@ int sce_storeKeyCtx(struct WOLFSSL* ssl, User_SCEPKCbInfo* info)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* to inform ca certificate sign */
|
||||
/* signature format expects RSA 2048 PSS with SHA256 */
|
||||
WOLFSSL_API void wc_sce_inform_cert_sign(const uint8_t *sign)
|
||||
{
|
||||
if(sign)
|
||||
ca_cert_sig = sign;
|
||||
}
|
||||
|
||||
/* let wolfSSL know user key information using TLS operation by SCE */
|
||||
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_ENTER("sce_inform_user_keys");
|
||||
g_user_key_info.encrypted_provisioning_key = NULL;
|
||||
g_user_key_info.iv = NULL;
|
||||
g_user_key_info.encrypted_user_tls_key = NULL;
|
||||
|
||||
if ( encrypted_provisioning_key ) {
|
||||
g_user_key_info.encrypted_provisioning_key = encrypted_provisioning_key;
|
||||
}
|
||||
if ( iv ) {
|
||||
g_user_key_info.iv = iv;
|
||||
}
|
||||
if ( encrypted_user_tls_key ) {
|
||||
g_user_key_info.encrypted_user_tls_key = encrypted_user_tls_key;
|
||||
}
|
||||
|
||||
g_user_key_info.encrypted_user_tls_key_type = encrypted_user_tls_key_type;
|
||||
|
||||
/* set callback for ECC */
|
||||
WOLFSSL_MSG("sce_inform_user_keys_ex");
|
||||
}
|
||||
|
||||
|
||||
/* Set callbacks needed for sce TLS api handling */
|
||||
void sce_set_callbacks(WOLFSSL_CTX* ctx)
|
||||
WOLFSSL_API void wc_sce_set_callbacks(WOLFSSL_CTX* ctx)
|
||||
{
|
||||
wolfSSL_CTX_SetEccVerifyCb(ctx, Renesas_cmn_EccVerify);
|
||||
wolfSSL_CTX_SetRsaVerifyCb(ctx, Renesas_cmn_RsaVerify);
|
||||
wolfSSL_CTX_SetGenPreMasterCb(ctx, Renesas_cmn_generatePremasterSecret);
|
||||
wolfSSL_CTX_SetRsaEncCb(ctx, Renesas_cmn_RsaEnc);
|
||||
wolfSSL_CTX_SetVerifymacCb(ctx, Renesas_cmn_VerifyHmac);
|
||||
wolfSSL_CTX_SetVerifyMacCb(ctx, Renesas_cmn_VerifyHmac);
|
||||
|
||||
wolfSSL_CTX_SetEccSharedSecretCb(ctx, NULL);
|
||||
}
|
||||
/* Set callback contexts needed for sce TLS api handling */
|
||||
int sce_set_callback_ctx(WOLFSSL* ssl, void* user_ctx)
|
||||
WOLFSSL_API int wc_sce_set_callback_ctx(WOLFSSL* ssl, void* user_ctx)
|
||||
{
|
||||
if (sce_sess_idx > MAX_SCE_CBINDEX) {
|
||||
WOLFSSL_MSG("exceeds maximum session index");
|
||||
@@ -1103,13 +1095,14 @@ int sce_set_callback_ctx(WOLFSSL* ssl, void* user_ctx)
|
||||
gSCE_PKCbInfo.user_PKCbInfo[sce_sess_idx]->session_key_set = 0;
|
||||
|
||||
wolfSSL_SetEccVerifyCtx(ssl, user_ctx);
|
||||
wolfSSL_SetRsaEncCtx(ssl, user_ctx);
|
||||
wolfSSL_SetRsaVerifyCtx(ssl, user_ctx);
|
||||
wolfSSL_SetGenPreMasterCtx(ssl, user_ctx);
|
||||
wolfSSL_SetEccSharedSecretCtx(ssl, NULL);
|
||||
wolfSSL_SetVerifymacCtx(ssl, user_ctx);
|
||||
wolfSSL_SetVerifyMacCtx(ssl, user_ctx);
|
||||
|
||||
/* set up crypt callback */
|
||||
wc_CryptoCb_CryptInitRenesascmn(ssl, user_ctx);
|
||||
wc_CryptoCb_CryptInitRenesasCmn(ssl, user_ctx);
|
||||
|
||||
gSCE_PKCbInfo.num_session = ++sce_sess_idx;
|
||||
|
||||
|
@@ -158,7 +158,7 @@ int wolfCrypt_Init(void)
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
ret = sce_Open( );
|
||||
ret = wc_sce_Open( );
|
||||
if( ret != FSP_SUCCESS ) {
|
||||
WOLFSSL_MSG("RENESAS SCE Open failed");
|
||||
/* not return 1 since WOLFSSL_SUCCESS=1*/
|
||||
@@ -368,7 +368,7 @@ int wolfCrypt_Cleanup(void)
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_RENESAS_SCEPROTECT
|
||||
sce_Close();
|
||||
wc_sce_Close();
|
||||
#else
|
||||
|
||||
#ifdef WOLFSSL_SCE
|
||||
|
@@ -22721,7 +22721,7 @@ static int ecc_exp_imp_test(ecc_key* key)
|
||||
#else
|
||||
ecc_key keyImp[1];
|
||||
#endif
|
||||
byte priv[32*4];
|
||||
byte priv[32];
|
||||
word32 privLen;
|
||||
byte pub[65*2];
|
||||
word32 pubLen, pubLenX, pubLenY;
|
||||
|
@@ -3060,9 +3060,9 @@ struct WOLFSSL_CTX {
|
||||
CallbackGenPreMaster GenPreMasterCb; /* Use generate pre-master handler */
|
||||
CallbackGenMasterSecret GenMasterCb; /* Use generate master secret handler */
|
||||
CallbackGenSessionKey GenSessionKeyCb; /* Use generate session key handler */
|
||||
CallbackSetKeys SetKeysCb; /* Use set keys handler */
|
||||
CallbackEncryptKeys EncryptKeysCb;/* Use setting encrypt keys handler */
|
||||
CallbackTlsFinished TlsFinishedCb; /* Use Tls finished handler */
|
||||
CallbackVerifymac VerifymacCb; /* Use Verify mac handler */
|
||||
CallbackVerifyMac VerifyMacCb; /* Use Verify mac handler */
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
#ifdef HAVE_WOLF_EVENT
|
||||
WOLF_EVENT_QUEUE event_queue;
|
||||
@@ -4485,9 +4485,9 @@ struct WOLFSSL {
|
||||
void* GenPreMasterCtx; /* Generate Premaster Callback Context */
|
||||
void* GenMasterCtx; /* Generate Master Callback Context */
|
||||
void* GenSessionKeyCtx; /* Generate Sesssion Key Callback Context */
|
||||
void* SetKeysCtx; /* 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 */
|
||||
void* VerifyMacCtx; /* Verify mac Callback Context */
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
#ifdef HAVE_SECRET_CALLBACK
|
||||
SessionSecretCb sessionSecretCb;
|
||||
|
@@ -3209,25 +3209,29 @@ WOLFSSL_API void* wolfSSL_GetRsaDecCtx(WOLFSSL* ssl);
|
||||
|
||||
/* Protocol Callback */
|
||||
typedef int (*CallbackGenMasterSecret)(WOLFSSL* ssl, void* ctx);
|
||||
WOLFSSL_API void wolfSSL_CTX_SetGenMasterSecretCb(WOLFSSL_CTX*, CallbackGenMasterSecret);
|
||||
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_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_SetGenSesssionKeyCb(WOLFSSL_CTX*, CallbackGenSessionKey);
|
||||
WOLFSSL_API void wolfSSL_SetGenSesssionKeyCtx(WOLFSSL* ssl, void *ctx);
|
||||
WOLFSSL_API void* wolfSSL_GetGenSesssionKeyCtx(WOLFSSL* ssl);
|
||||
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 (*CallbackSetKeys)(WOLFSSL* ssl, void* ctx);
|
||||
WOLFSSL_API void wolfSSL_CTX_SetSetKeysCb(WOLFSSL_CTX*, CallbackSetKeys);
|
||||
WOLFSSL_API void wolfSSL_SetSetKeysCtx(WOLFSSL* ssl, void *ctx);
|
||||
WOLFSSL_API void* wolfSSL_GetSetKeysCtx(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,
|
||||
@@ -3238,11 +3242,11 @@ 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,
|
||||
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);
|
||||
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 */
|
||||
|
@@ -4615,7 +4615,7 @@ static WC_INLINE int myGenMaster(WOLFSSL* ssl, void* ctx)
|
||||
(void)cbInfo;
|
||||
|
||||
WOLFSSL_PKMSG("Gen Master");
|
||||
/* fall through original routine */
|
||||
/* fall through to original routine */
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
WOLFSSL_PKMSG("Gen Master: ret %d\n", ret);
|
||||
|
||||
@@ -4634,7 +4634,7 @@ static WC_INLINE int myGenPreMaster(WOLFSSL* ssl, byte *premaster,
|
||||
(void) preSz;
|
||||
|
||||
WOLFSSL_PKMSG("Gen Pre-Master Cb");
|
||||
/* fall through original routine */
|
||||
/* fall through to original routine */
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
WOLFSSL_PKMSG("Gen Pre-Master Cb: ret %d\n", ret);
|
||||
|
||||
@@ -4650,14 +4650,14 @@ static WC_INLINE int myGenSessionKey(WOLFSSL* ssl, void* ctx)
|
||||
(void)cbInfo;
|
||||
|
||||
WOLFSSL_PKMSG("Gen Master Cb");
|
||||
/* fall through original routine */
|
||||
/* fall through to original routine */
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
WOLFSSL_PKMSG("Gen Master Cb: ret %d\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static WC_INLINE int mySetKeys(WOLFSSL* ssl, void* ctx)
|
||||
static WC_INLINE int mySetEncryptKeys(WOLFSSL* ssl, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
PkCbInfo* cbInfo = (PkCbInfo*)ctx;
|
||||
@@ -4665,16 +4665,16 @@ static WC_INLINE int mySetKeys(WOLFSSL* ssl, void* ctx)
|
||||
(void)ssl;
|
||||
(void)cbInfo;
|
||||
|
||||
WOLFSSL_PKMSG("Set Keys Cb");
|
||||
/* fall through original routine */
|
||||
WOLFSSL_PKMSG("Set Encrypt Keys Cb");
|
||||
/* fall through to original routine */
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
WOLFSSL_PKMSG("Set Keys Cb: ret %d\n", ret);
|
||||
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,
|
||||
static WC_INLINE int myVerifyMac(WOLFSSL *ssl, const byte* message,
|
||||
word32 messageSz, word32 macSz, word32 content, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
@@ -4688,7 +4688,7 @@ static WC_INLINE int myVerifymac(WOLFSSL *ssl, const byte* message,
|
||||
(void)cbInfo;
|
||||
|
||||
WOLFSSL_PKMSG("Verify Mac Cb");
|
||||
/* fall through original routine */
|
||||
/* fall through to original routine */
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
WOLFSSL_PKMSG("Verify Mac Cb: ret %d\n", ret);
|
||||
|
||||
@@ -4711,7 +4711,7 @@ static WC_INLINE int myTlsFinished(WOLFSSL* ssl,
|
||||
(void)hashes;
|
||||
|
||||
WOLFSSL_PKMSG("Tls Finished Cb");
|
||||
/* fall through original routine */
|
||||
/* fall through to original routine */
|
||||
ret = PROTOCOLCB_UNAVAILABLE;
|
||||
WOLFSSL_PKMSG("Tls Finished Cb: ret %d\n", ret);
|
||||
|
||||
@@ -4771,11 +4771,11 @@ static WC_INLINE void SetupPkCallbacks(WOLFSSL_CTX* ctx)
|
||||
#ifndef NO_CERTS
|
||||
wolfSSL_CTX_SetGenMasterSecretCb(ctx, myGenMaster);
|
||||
wolfSSL_CTX_SetGenPreMasterCb(ctx, myGenPreMaster);
|
||||
wolfSSL_CTX_SetGenSesssionKeyCb(ctx, myGenSessionKey);
|
||||
wolfSSL_CTX_SetSetKeysCb(ctx, mySetKeys);
|
||||
wolfSSL_CTX_SetGenSessionKeyCb(ctx, myGenSessionKey);
|
||||
wolfSSL_CTX_SetEncryptKeysCb(ctx, mySetEncryptKeys);
|
||||
|
||||
#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_AEAD_ONLY)
|
||||
wolfSSL_CTX_SetVerifymacCb(ctx, myVerifymac);
|
||||
wolfSSL_CTX_SetVerifyMacCb(ctx, myVerifyMac);
|
||||
#endif
|
||||
|
||||
wolfSSL_CTX_SetTlsFinishedCb(ctx, myTlsFinished);
|
||||
@@ -4823,11 +4823,11 @@ static WC_INLINE void SetupPkCallbackContexts(WOLFSSL* ssl, void* myCtx)
|
||||
#ifndef NO_CERTS
|
||||
wolfSSL_SetGenMasterSecretCtx(ssl, myCtx);
|
||||
wolfSSL_SetGenPreMasterCtx(ssl, myCtx);
|
||||
wolfSSL_SetGenSesssionKeyCtx(ssl, myCtx);
|
||||
wolfSSL_SetSetKeysCtx(ssl, myCtx);
|
||||
wolfSSL_SetGenSessionKeyCtx(ssl, myCtx);
|
||||
wolfSSL_SetEncryptKeysCtx(ssl, myCtx);
|
||||
|
||||
#if !defined(WOLFSSL_NO_TLS12) && !defined(WOLFSSL_AEAD_ONLY)
|
||||
wolfSSL_SetVerifymacCtx(ssl, myCtx);
|
||||
wolfSSL_SetVerifyMacCtx(ssl, myCtx);
|
||||
#endif
|
||||
|
||||
wolfSSL_SetTlsFinishedCtx(ssl, myCtx);
|
||||
|
@@ -1213,7 +1213,8 @@ enum SignatureState {
|
||||
#endif
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) ||defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT) ||\
|
||||
defined(HAVE_PK_CALLBACKS)
|
||||
typedef struct tagCertAttribute {
|
||||
byte verifyByTSIP_SCE;
|
||||
word32 certBegin;
|
||||
@@ -1283,7 +1284,8 @@ struct SignatureCtx {
|
||||
#endif
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
#ifndef NO_RSA
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT)
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) || defined(WOLFSSL_RENESAS_SCEPROTECT) ||\
|
||||
defined(HAVE_PK_CALLBACKS)
|
||||
CertAttribute CertAtt;
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -32,17 +32,6 @@ extern "C" {
|
||||
#define SCE_SESSIONKEY_NONCE_SIZE 8
|
||||
#define WOLFSSL_SCE_ILLEGAL_CIPHERSUITE -1
|
||||
|
||||
enum {
|
||||
l_TLS_RSA_WITH_AES_128_CBC_SHA = 0x2F,
|
||||
l_TLS_RSA_WITH_AES_128_CBC_SHA256 = 0x3c,
|
||||
l_TLS_RSA_WITH_AES_256_CBC_SHA = 0x35,
|
||||
l_TLS_RSA_WITH_AES_256_CBC_SHA256 = 0x3d,
|
||||
l_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = 0x27,
|
||||
l_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = 0x23,
|
||||
l_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0x2b,
|
||||
l_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0x2f,
|
||||
};
|
||||
|
||||
#define MAX_SCE_CBINDEX 5
|
||||
|
||||
typedef struct tagUser_SCEPKCbInfo {
|
||||
@@ -89,11 +78,12 @@ struct WOLFSSL;
|
||||
struct WOLFSSL_CTX;
|
||||
struct ecc_key;
|
||||
|
||||
int sce_Open();
|
||||
void sce_Close();
|
||||
int sce_hw_lock();
|
||||
void sce_hw_unlock( void );
|
||||
int sce_usable(const struct WOLFSSL *ssl);
|
||||
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;
|
||||
@@ -102,19 +92,19 @@ typedef struct {
|
||||
} SCE_AES_CTX;
|
||||
|
||||
struct Aes;
|
||||
int wc_sce_AesCbcEncrypt(struct Aes* aes, byte* out, const byte* in,
|
||||
WOLFSSL_LOCAL int wc_sce_AesCbcEncrypt(struct Aes* aes, byte* out, const byte* in,
|
||||
word32 sz);
|
||||
int wc_sce_AesCbcDecrypt(struct Aes* aes, byte* out, const byte* in,
|
||||
WOLFSSL_LOCAL int wc_sce_AesCbcDecrypt(struct Aes* aes, byte* out, const byte* in,
|
||||
word32 sz);
|
||||
|
||||
int wc_sce_AesGcmEncrypt(struct Aes* aes, byte* out,
|
||||
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 wc_sce_AesGcmDecrypt(struct Aes* aes, byte* out,
|
||||
|
||||
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,
|
||||
@@ -147,19 +137,14 @@ typedef wolfssl_SCE_Hash wc_Sha256;
|
||||
|
||||
#endif /* NO_SHA */
|
||||
|
||||
void sce_inform_cert_sign(const uint8_t *sign);
|
||||
|
||||
byte sce_rootCAverified();
|
||||
|
||||
byte sce_checkCA(uint32_t cmIdx);
|
||||
|
||||
int sce_tls_RootCertVerify(
|
||||
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);
|
||||
|
||||
int sce_tls_CertVerify(
|
||||
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,
|
||||
@@ -167,16 +152,16 @@ int sce_tls_CertVerify(
|
||||
uint8_t* sce_encRsaKeyIdx);
|
||||
|
||||
|
||||
int sce_generatePremasterSecret(
|
||||
WOLFSSL_LOCAL int wc_sce_generatePremasterSecret(
|
||||
uint8_t* premaster,
|
||||
uint32_t preSz);
|
||||
|
||||
int sce_generateEncryptPreMasterSecret(
|
||||
WOLFSSL_LOCAL int wc_sce_generateEncryptPreMasterSecret(
|
||||
struct WOLFSSL* ssl,
|
||||
uint8_t* out,
|
||||
uint32_t* outSz);
|
||||
|
||||
int sce_Sha256GenerateHmac(
|
||||
WOLFSSL_LOCAL int wc_sce_Sha256GenerateHmac(
|
||||
const struct WOLFSSL *ssl,
|
||||
const uint8_t* myInner,
|
||||
uint32_t innerSz,
|
||||
@@ -184,35 +169,20 @@ int sce_Sha256GenerateHmac(
|
||||
uint32_t sz,
|
||||
uint8_t* digest);
|
||||
|
||||
int sce_Sha256VerifyHmac(
|
||||
WOLFSSL_LOCAL int wc_sce_Sha256VerifyHmac(
|
||||
const struct WOLFSSL *ssl,
|
||||
const uint8_t* message,
|
||||
uint32_t messageSz,
|
||||
uint32_t macSz,
|
||||
uint32_t content);
|
||||
|
||||
void 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);
|
||||
|
||||
void sce_set_callbacks(struct WOLFSSL_CTX* ctx);
|
||||
int sce_set_callback_ctx(struct WOLFSSL* ssl, void* user_ctx);
|
||||
|
||||
uint32_t GetSceCipherSuite(
|
||||
uint8_t cipherSuiteFirst,
|
||||
uint8_t cipherSuite);
|
||||
|
||||
int sce_useable(const struct WOLFSSL *ssl,
|
||||
uint8_t session_key_generated);
|
||||
int sce_storeKeyCtx(struct WOLFSSL* ssl, User_SCEPKCbInfo* info);
|
||||
int sce_generateVerifyData(const uint8_t *ms, /* master secret */
|
||||
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 */);
|
||||
int sce_generateSeesionKey(struct WOLFSSL *ssl, User_SCEPKCbInfo* cbInfo,
|
||||
WOLFSSL_LOCAL int wc_sce_generateSeesionKey(struct WOLFSSL *ssl, User_SCEPKCbInfo* cbInfo,
|
||||
int devId);
|
||||
int sce_generateMasterSecret(
|
||||
WOLFSSL_LOCAL int wc_sce_generateMasterSecret(
|
||||
uint8_t cipherSuiteFirst,
|
||||
uint8_t cipherSuite,
|
||||
const uint8_t *pr, /* pre-master */
|
||||
@@ -220,12 +190,25 @@ int sce_generateMasterSecret(
|
||||
const uint8_t *sr, /* server random */
|
||||
uint8_t *ms);
|
||||
|
||||
int SCE_RsaVerify(struct WOLFSSL* ssl, byte* sig, uint32_t sigSz,
|
||||
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);
|
||||
int SCE_EccVerify(struct WOLFSSL* ssl, const uint8_t* sig, uint32_t sigSz,
|
||||
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);
|
||||
int SCE_EccSharedSecret(struct WOLFSSL* ssl, struct ecc_key* otherKey,
|
||||
/* 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__ */
|
||||
|
@@ -24,20 +24,36 @@
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/internal.h>
|
||||
|
||||
/* Common Callback and Method */
|
||||
int Renesas_cmn_genMasterSecret(WOLFSSL* ssl, void* ctx);
|
||||
int Renesas_cmn_generatePremasterSecret(WOLFSSL* ssl, byte *premaster,
|
||||
word32 preSz, void* ctx);
|
||||
int Renesas_cmn_RsaEnc(WOLFSSL* ssl, const unsigned char* in,
|
||||
/* 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);
|
||||
int Renesas_cmn_VerifyHmac(WOLFSSL *ssl, const byte* message,
|
||||
WOLFSSL_LOCAL int Renesas_cmn_VerifyHmac(WOLFSSL *ssl, const byte* message,
|
||||
word32 messageSz, word32 macSz, word32 content);
|
||||
int wc_CryptoCb_CryptInitRenesascmn(WOLFSSL* ssl, void* ctx);
|
||||
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 Renesas_cmn_RsaVerify(WOLFSSL* ssl, byte* sig, uint32_t sigSz,
|
||||
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__ */
|
@@ -1,4 +1,4 @@
|
||||
/* cavium_octeon_sync.h
|
||||
/* renesas_sync.h
|
||||
*
|
||||
* Copyright (C) 2006-2021 wolfSSL Inc.
|
||||
*
|
||||
@@ -28,8 +28,8 @@ 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);
|
||||
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,7 +212,7 @@
|
||||
/* Uncomment next line if using RENESAS RX64N */
|
||||
/* #define WOLFSSL_RENESAS_RX65N */
|
||||
|
||||
/* Uncomment next line if using RENESAS SCE PROTECT MODE */
|
||||
/* Uncomment next line if using RENESAS SCE Protected Mode */
|
||||
/* #define WOLFSSL_RENESAS_SCEPROTECT */
|
||||
|
||||
/* Uncomment next line if using RENESAS RA6M4 */
|
||||
|
Reference in New Issue
Block a user