mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 15:50:51 +02:00
Merge branch 'master' into GH2998_REWORK_FOLLOWUP
This commit is contained in:
@@ -0,0 +1,155 @@
|
||||
-----------------------------------------------------
|
||||
0. 初めに
|
||||
-----------------------------------------------------
|
||||
|
||||
このドキュメントではE2Studio上でwolfsslを含んだテストアプリケーションを作成する手順を示します。
|
||||
|
||||
このREADMEが含まれているフォルダには
|
||||
1.smc ---スマートコンフィギュレータ用プロジェクトが格納されているフォルダです
|
||||
2.test ---テストアプリケーション用プロジェクトが格納されているフォルダです
|
||||
3.wolfssl ---テストアプリケーションにリンクされて使用されるwolfsslライブラリ用プロジェクトが格納されているフォルダです
|
||||
4.common ---設定ファイル等が格納されたフォルダです
|
||||
|
||||
フォルダが存在しています。
|
||||
|
||||
-------------------------------------
|
||||
1.プロジェクトのインポート
|
||||
-------------------------------------
|
||||
|
||||
e2studioを起動したら、プロジェクト・エクスプローラー画面を表示させ、"ファイル"メニュー > ”ファイル・システムからプロジェクトを開く...”を選択し、
|
||||
プロジェクトインポートダイアログを表示させます。
|
||||
|
||||
ディレクトリボタンを押して、上記の1~3のフォルダの3プロジェクトをインポートしてください。
|
||||
|
||||
-------------------------------------
|
||||
2.smcプロジェクトでソースファイルを生成させる
|
||||
-------------------------------------
|
||||
|
||||
smcプロジェクトにはsmc.scfgファイルが既に用意してあります。
|
||||
このファイルをダブルクリックするとスマートコンフィギュレータパースペクティブが開き、複数のタブを含んだ設定ページが表示されます。
|
||||
概要タブに現在選択されているコンポーネントがバージョンとともにリストアップされています。
|
||||
これらはテストアプリケーションの実行に必要なものが設定済みとなっています。
|
||||
ボード情報、クロック設定などもRX72N EnvisionKitに合わせて設定済みです。
|
||||
|
||||
設定が必要な個所は、
|
||||
コンポーネントタブで r_t4_rx コンポーネントの設定を表示させます。ここで、次のプロパティの値
|
||||
#IP address for ch0,when DHCP disable.
|
||||
|
||||
として、RX72N EnvisionKitに設定するIPv4アドレスを皆さんの環境に合った値に設定してください。
|
||||
ここだけが設定が必要な個所です。
|
||||
|
||||
設定を保存し、画面右上のソースファイル生成ボタンを押してソースファイルを生成させてください。
|
||||
|
||||
-------------------------------------
|
||||
3.testプロジェクトに生成させたソースファイルをコピーする
|
||||
-------------------------------------
|
||||
|
||||
e2studioのプロジェクト・エクスプローラー画面のtestプロジェクトのフォルダを展開すると、
|
||||
srcフォルダがあります。このフォルダに、smcプロジェクトフォルダ内のsrc/smc_genをコピーしてください。
|
||||
|
||||
-------------------------------------
|
||||
4.testプロジェクトの動作を選択する
|
||||
-------------------------------------
|
||||
|
||||
テストアプリケーションは、暗号化テスト、ベンチマーク、TLSクライアント、TLSサーバーの
|
||||
4種類の動作を選択できます。選択は、common/user_settings.hの
|
||||
定義文のいずれか一つを有効化することで行います。
|
||||
|
||||
-------------------------------------
|
||||
5.wolfsslプロジェクト、testプロジェクトをビルドする
|
||||
-------------------------------------
|
||||
|
||||
ビルド前に必ず上記4の設定が終わっていることを確認してください。
|
||||
ビルドはwolfssl,testの順に行います。
|
||||
|
||||
-------------------------------------
|
||||
6.エミュレータを使ってtestアプリケーションを実行する
|
||||
-------------------------------------
|
||||
|
||||
エミュレータとターゲットボードとPCをケーブルで接続したら、すでに、test HardwareDebug.launchが用意してありますから
|
||||
e2studioのメニュー”実行” >”デバッグ”を選択してデバッグを開始してください。
|
||||
|
||||
お手持ちのエミュレータが異なる場合はデバッグ構成を変更して上記ファイルを更新してください。
|
||||
|
||||
デバッグパースペクティブ表示になったら、e2studioのメニュー”Renesas Views” > ”デバッグ” > "Renesas Debug Virtual Console"を選択して
|
||||
デバッグコンソール画面を表示してください。 testアプリケーション実行時の経過、結果等の表示がこのコンソールに出力されます。
|
||||
|
||||
|
||||
=================================================================================
|
||||
|
||||
-----------------------------------------------------
|
||||
0. About this document
|
||||
-----------------------------------------------------
|
||||
|
||||
This document will show you how to create a test application containing wolfssl on E2Studio.
|
||||
|
||||
The folder that contains this README has:
|
||||
1.smc --- the folder where the smart configurator project is stored.
|
||||
2.test --- the folder where the test application project is stored
|
||||
3.wolfssl --- the folder where the project for the wolfssl library used by the test application is stored.
|
||||
4.common --- the folder where the configuration files etc. are stored
|
||||
|
||||
|
||||
-------------------------------------
|
||||
1. Import projects
|
||||
-------------------------------------
|
||||
|
||||
After starting e2studio, display the project explorer screen,
|
||||
select "File" menu> "Open project from file system...",
|
||||
Display the project import dialog.
|
||||
|
||||
Press the directory button and import the 3 projects in the folders 1 to 3 above.
|
||||
|
||||
-------------------------------------
|
||||
2. Generate source files in smc project
|
||||
-------------------------------------
|
||||
|
||||
The smc.scfg file is already prepared in the smc project.
|
||||
Double-clicking on this file will open the Smart Configurator perspective,
|
||||
displaying a configuration page with multiple tabs.
|
||||
The components currently selected in the Overview tab are listed along with their version.
|
||||
These are already set up to run the test application.
|
||||
Board information and clock settings are already set according to RX72N EnvisionKit.
|
||||
|
||||
The points that need to be set are
|
||||
Display the r_t4_rx component settings in the component tab. Where the value of the following property
|
||||
#IP address for ch0,when DHCP disable.
|
||||
|
||||
Then, set the IPv4 address set in RX72N EnvisionKit to a value that suits your environment.
|
||||
This is the only place that needs to be set.
|
||||
|
||||
Save the settings and press the source file generation button at the top right of the screen to generate the source file.
|
||||
|
||||
-------------------------------------
|
||||
3. Copy the source files generated in the test project
|
||||
-------------------------------------
|
||||
|
||||
When you expand the test project folder on the e2studio Project Explorer screen,
|
||||
There is a src folder. Copy src/smc_gen in the smc project folder to test/src folder.
|
||||
|
||||
-------------------------------------
|
||||
4. Select the behavior of the test project
|
||||
-------------------------------------
|
||||
|
||||
Test applications include encryption test, benchmark, TLS client, TLS server
|
||||
You can select four types of operation.
|
||||
This is done by activating one of those commented definition statements in common/user_settings.h.
|
||||
|
||||
-------------------------------------
|
||||
5. Build wolfssl project, test project
|
||||
-------------------------------------
|
||||
|
||||
Make sure that the above settings are completed before building.
|
||||
Build in order of wolfssl and test.
|
||||
|
||||
-------------------------------------
|
||||
6. Run the test application using the emulator
|
||||
-------------------------------------
|
||||
|
||||
After connecting the emulator, target board and PC with a cable, test HardwareDebug.launch is already prepared.
|
||||
Select "Run"> "Debug" in e2 studio to start debugging.
|
||||
|
||||
If the emulator you have is different, change the debug configuration and update the above file.
|
||||
|
||||
When the debug perspective is displayed, select the e2 studio menu "Renesas Views"> "Debug"> "Renesas Debug Virtual Console"
|
||||
Display the debug console screen. The progress and results of the test application execution are output to this console.
|
||||
@@ -0,0 +1,22 @@
|
||||
/* strings.h
|
||||
*
|
||||
* Copyright (C) 2006-2020 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
int strncasecmp(const char *s1, const char * s2, unsigned int sz);
|
||||
@@ -0,0 +1,22 @@
|
||||
/* unistd.h
|
||||
*
|
||||
* Copyright (C) 2006-2020 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
/* DUMMY Header */
|
||||
@@ -0,0 +1,181 @@
|
||||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2020 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
/*-- Renesas MCU type ---------------------------------------------------------
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
/*#define WOLFSSL_RENESAS_RX65N*/
|
||||
#define WOLFSSL_RENESAS_RX72N
|
||||
|
||||
|
||||
/*-- Renesas TSIP usage and its version ---------------------------------------
|
||||
*
|
||||
* "WOLFSSL_RENESAS_TSIP" definition makes wolfSSL to use H/W acceleration
|
||||
* for cipher operations.
|
||||
* TSIP definition asks to have its version number.
|
||||
* "WOLFSSL_RENESAS_TSIP_VER" takes following value:
|
||||
* 106: TSIPv1.06
|
||||
* 109: TSIPv1.09
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define WOLFSSL_RENESAS_TSIP
|
||||
#define WOLFSSL_RENESAS_TSIP_VER 109
|
||||
|
||||
|
||||
/*-- TLS version definitions --------------------------------------------------
|
||||
*
|
||||
* wolfSSL supports TLSv1.2 by default. In case you want your system supports
|
||||
* TLSv1.3, uncomment line below.
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
/*#define WOLFSSL_TLS13*/
|
||||
|
||||
|
||||
/*-- Operating System related definitions --------------------------------------
|
||||
*
|
||||
* In case any real-time OS is used, define its name(e.g. FREERTOS).
|
||||
* Otherwise, define "SINGLE_THREADED". They are exclusive each other.
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define SINGLE_THREADED
|
||||
/*#define FREERTOS*/
|
||||
|
||||
|
||||
/*-- Cipher related definitions -----------------------------------------------
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#define NO_DEV_RANDOM
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
#define WOLFSSL_DH_CONST
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
|
||||
#define HAVE_AESGCM
|
||||
#define HAVE_AES_CBC
|
||||
#define WOLFSSL_SHA512
|
||||
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define CURVE25519_SMALL
|
||||
#define HAVE_ED25519
|
||||
|
||||
#define WOLFSSL_STATIC_RSA
|
||||
|
||||
|
||||
/*-- Misc definitions ---------------------------------------------------------
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
#if !defined(min)
|
||||
#define min(data1, data2) _builtin_min(data1, data2)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* -- "NO_ASN_TIME" macro is to avoid certificate expiration validation --
|
||||
*
|
||||
* Note. In your actual products, do not forget to comment-out
|
||||
* "NO_ASN_TIME" macro. And prepare time function to get calender time,
|
||||
* otherwise, certificate expiration validation will not work.
|
||||
*/
|
||||
/*#define NO_ASN_TIME*/
|
||||
|
||||
#define NO_MAIN_DRIVER
|
||||
#define BENCH_EMBEDDED
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
#define NO_FILESYSTEM
|
||||
#define WOLFSSL_LOG_PRINTF
|
||||
#define WOLFSSL_HAVE_MIN
|
||||
#define WOLFSSL_HAVE_MAX
|
||||
#define WOLFSSL_SMALL_STACK
|
||||
#define NO_WRITEV
|
||||
#define WOLFSSL_USER_IO
|
||||
|
||||
#define WOLFSSL_USER_CURRTIME
|
||||
#define USER_TIME
|
||||
#define XTIME time
|
||||
#define USE_WOLF_SUSECONDS_T
|
||||
#define USE_WOLF_TIMEVAL_T
|
||||
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
#define WC_RSA_BLINDING
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define ECC_TIMING_RESISTANT
|
||||
|
||||
/*-- Debugging options ------------------------------------------------------
|
||||
*
|
||||
* "DEBUG_WOLFSSL" definition enables log to output into stdout.
|
||||
* Note: wolfSSL_Debugging_ON() must be called just after wolfSSL_Init().
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
/*#define DEBUG_WOLFSSL*/
|
||||
|
||||
/*-- Definitions for functionality negation -----------------------------------
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
/*#define NO_RENESAS_TSIP_CRYPT*/
|
||||
/*#define NO_WOLFSSL_RENESAS_TSIP_TLS_SESSION*/
|
||||
|
||||
|
||||
/*-- Consistency checking between definitions ---------------------------------
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
/*-- TSIP TLS specific definitions --*/
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
#if !defined(WOLFSSL_RENESAS_TSIP_VER)
|
||||
#error "WOLFSSL_RENESAS_TSIP_VER is required to be defined and have value"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*-- Complementary definitions ------------------------------------------------
|
||||
*
|
||||
*
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
|
||||
#if !defined(NO_RENESAS_TSIP_CRYPT)
|
||||
#define WOLFSSL_RENESAS_TSIP_CRYPT
|
||||
#define WOLFSSL_RENESAS_TSIP_TLS
|
||||
#define WOLFSSL_RENESAS_TSIP_TLS_AES_CRYPT
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define OPENSSL_EXTRA
|
||||
#define WOLFSSL_GENSEED_FORTEST /* Warning: define your own seed gen */
|
||||
#endif
|
||||
|
||||
|
||||
/*-- TLS version and required definitions --*/
|
||||
#if defined(WOLFSSL_TLS13)
|
||||
#define HAVE_FFDHE_2048
|
||||
#define HAVE_HKDF
|
||||
#define WC_RSA_PSS
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
/* wolfssl_dummy.c
|
||||
*
|
||||
* Copyright (C) 2006-2020 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
typedef unsigned long time_t;
|
||||
|
||||
#define YEAR 2020
|
||||
#define MON 7
|
||||
|
||||
static int tick = 0;
|
||||
|
||||
time_t time(time_t *t)
|
||||
{
|
||||
return ((YEAR-1970)*365+30*MON)*24*60*60 + tick++;
|
||||
}
|
||||
|
||||
#include <ctype.h>
|
||||
int strncasecmp(const char *s1, const char * s2, unsigned int sz)
|
||||
{
|
||||
for( ; sz>0; sz--)
|
||||
if(toupper(s1++) != toupper(s2++))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
# vim:ft=automake
|
||||
# included from Top Level Makefile.am
|
||||
# All paths should be given relative to the root
|
||||
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/README
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/wolfssl/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/wolfssl/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/test_HardwareDebug.launch
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/test_main.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/key_data.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/key_data.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolf_client.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolf_server.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/test/src/wolfssl_demo.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/common/wolfssl_dummy.c
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/common/strings.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/common/unistd.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/common/user_settings.h
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/smc/.cproject
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/smc/.project
|
||||
EXTRA_DIST+= IDE/Renesas/e2studio/RX72NEnvisionKit/smc/smc.scfg
|
||||
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration.1034911632">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration.1034911632" moduleId="org.eclipse.cdt.core.settings" name="HardwareDebug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.renesas.cdt.managedbuild.renesas.core.RenesasCompilerAssemblerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.renesas.cdt.managedbuild.core.buildRunnerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo">
|
||||
<option id="toolchain.id" value="Renesas_RXC"/>
|
||||
<option id="toolchain.version" value="v3.02.00"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="abs" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" description="Debug on hardware" id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration.1034911632" name="HardwareDebug" parent="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration">
|
||||
<folderInfo id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration.1034911632." name="/" resourcePath="">
|
||||
<toolChain id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.toolChain.2083798146" name="Renesas CCRX Toolchain" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.toolChain">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE" id="com.renesas.cdt.managedbuild.renesas.ccrx.base.targetPlatform.1553425974" osList="win32" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/smc}/HardwareDebug" id="com.renesas.cdt.managedbuild.renesas.ccrx.base.builder.728775241" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CCRX Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.builder"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.dsp.1074736849" name="DSP Assembler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.dsp">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.noDebugInfo.1437047237" name="デバッグ情報を出力する (-no_debug_info)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.noDebugInfo" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian.850740926" name="出力するデータ値のエンディアン (-littleEndianData)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian.big" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.common.189886433" name="Common" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.common">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.1998690625" name="命令セット・アーキテクチャ (-isa)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.rxv3" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.rxArchitecture.960776357" name="RX Architecture" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.rxArchitecture" useByScannerDiscovery="false" value="rxv3" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns.478847685" name="浮動小数点演算命令を使用する (-fpu/-nofpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns.yes" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasFpu.217406660" name="Has FPU" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasFpu" useByScannerDiscovery="false" value="TRUE" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.doublePrecisionFPU.1863668418" name="倍精度浮動小数点処理命令を使用する (-dpfpu/-nodpfpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.doublePrecisionFPU" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceName.1644771309" name="Device Name" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceName" useByScannerDiscovery="false" value="R5F572NNHxFB" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceHistory.1014766670" name="Device history" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceHistory" useByScannerDiscovery="false" value="non_init;R5F572NNHxFB" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isaHistory.799048652" name="ISA history" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isaHistory" useByScannerDiscovery="false" value="non_init;com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.rxv3" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceCommand.401879791" name="Device Command" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceCommand" useByScannerDiscovery="false" value="R5F572NN" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos.723360463" name="Check RTOS" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos" useByScannerDiscovery="false" value="unusedRtos" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp.1084188471" name="Has DSP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp" useByScannerDiscovery="false" value="false" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily.1569119399" name="Device Family" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily" useByScannerDiscovery="false" value="RX72N" valueType="string"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler.1255239266" name="Compiler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.40700832" name="浮動小数点演算命令を使用する (-fpu/-nofpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.yes" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include.1698327371" name="インクルード・ファイルを検索するフォルダ (-include)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${TCINSTALL}/include"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx/lib}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_driver_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_driver_rx/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_config}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_sys_time_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_sys_time_rx/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_cmt_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_cmt_rx/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_ether_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/general}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_pincfg}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userBefore.689082812" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userAfter.1291582485" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.1092400212" name="Cソース (-lang)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.c99" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode.1134863351" name="プログラムの文字コード (-euc/-sjis/-latin1/-utf8/-big5/-gb2312)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode.utf8" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode.1384702193" name="出力する文字コード (-outcode)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode.utf8" valueType="enumerated"/>
|
||||
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType.1318182307" name="Compiler Input C" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType"/>
|
||||
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType.2014243112" name="Compiler Input CPP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.assembler.828471590" name="Assembler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.assembler">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userBefore.1076957084" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userAfter.322327641" name="追加するオプション(すべての指定オプションの後ろに追加) " superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode.1981032357" name="プログラムの文字コード (-euc/-sjis/-latin1/-big5/-gb2312)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode.utf8" valueType="enumerated"/>
|
||||
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType.1925809882" name="Assembler InputType" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker.1186652965" name="Linker" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.rom.97438325" name="ROMからRAMへマップするセクション (-rom)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.rom" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="D=R"/>
|
||||
<listOptionValue builtIn="false" value="D_1=R_1"/>
|
||||
<listOptionValue builtIn="false" value="D_2=R_2"/>
|
||||
<listOptionValue builtIn="false" value="D_8=R_8"/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection.319906735" name="セクション (-start)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection" useByScannerDiscovery="false" value="SU,SI,B_1,R_1,B_2,R_2,B,R,B_8,R_8/04,C_1,C_2,C,C_8,C$*,D*,W*,L,P*/0FFC00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC,B_ETHERNET_BUFFERS_1,B_RX_DESC_1,B_TX_DESC_1/00010000" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userBefore.1970509300" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userAfter.525178825" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.vect.1813480503" name="可変ベクタテーブルのアドレス未設定ベクタ番号に指定するアドレス (-vect)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.vect" useByScannerDiscovery="false" value="_undefined_interrupt_source_isr" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.checkSection.122296241" name="セクションの割り付けアドレスをチェックする (-cpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.checkSection" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType.341427834" name="アドレス範囲指定方法 (-cpu(アドレス範囲指定方法))" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType.autoSpecify" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList.1967673887" name="(リンク順序のリスト) (-input/-library/-binary)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="".\smc.lib""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.inputFile.702731379" name="リンクするリロケータブル・ファイル、ライブラリ・ファイルおよびバイナリ・ファイル (-input/-library/-binary)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.inputFile" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx/lib/ccrx/T4_Library_ether_ccrx_rxv1_little.lib}""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.librarian.267645921" name="Library Generator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.librarian">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu.1945977999" name="浮動小数点演算命令を使用する (-fpu/-nofpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu.yes" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userBefore.1559216167" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userAfter.478801180" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang.1104431523" name="C言語標準ライブラリ関数の構成 (-lang)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang.c99" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.converter.135636800" name="Converter" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.converter">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userBefore.1334132823" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userAfter.1353925049" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig.1515705145" name="RTOS Configurator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="smc.com.renesas.cdt.managedbuild.renesas.ccrx.projectType.586427983" name="実行可能" projectType="com.renesas.cdt.managedbuild.renesas.ccrx.projectType"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
</cproject>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>smc</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.renesas.cdt.managedbuild.renesas.misrachecker.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,859 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<smc>
|
||||
<general version="2.0.0.0">
|
||||
<configuration active="true" id="com.renesas.smc.toolchain.rxc.configuration.release">
|
||||
<property id="com.renesas.smc.service.project.buildArtefactType" values="com.renesas.smc.service.project.buildArtefactType.exe"/>
|
||||
<toolchain id="com.renesas.smc.toolchain.rxc.toolchain.rxc">
|
||||
<option id="com.renesas.smc.toolchain.option.buildArtefactType" key="com.renesas.smc.toolchain.option.buildArtefactType.exe"/>
|
||||
<option id="com.renesas.smc.toolchain.option.rtos" key="com.renesas.smc.toolchain.option.rtos.none"/>
|
||||
</toolchain>
|
||||
</configuration>
|
||||
<platform id="R5F572NNHxFB"/>
|
||||
<option id="board" value="カスタムユーザボード"/>
|
||||
</general>
|
||||
<tool id="Clock">
|
||||
<Item current="true" id="vccSetting.isSelected"/>
|
||||
<Item current="" id="vccSetting.InputValue"/>
|
||||
<Item current="vcc2_7-3_6" id="vccSetting.OutputValue"/>
|
||||
<Item current="3.3" id="vccSetting.vccTxt"/>
|
||||
<Item current="true" id="mainclock.selectBox"/>
|
||||
<Item current="" id="mainclock.InputValue"/>
|
||||
<Item current="16 MHz" id="mainclock.OutputValue"/>
|
||||
<Item current="16" error="false" id="mainclock.frequencyTxt"/>
|
||||
<Item current="srcR" id="mainclock.sourceBox"/>
|
||||
<Item current="9980" id="mainclock.cycleValueTxt"/>
|
||||
<Item current="false" id="subclock.selectBox"/>
|
||||
<Item current="" id="subclock.InputValue"/>
|
||||
<Item current="" id="subclock.OutputValue"/>
|
||||
<Item current="32.768" error="false" id="subclock.frequencyTxt"/>
|
||||
<Item current="standardCL" id="subclock.generalBox"/>
|
||||
<Item current="2000" id="subclock.cycleValueTxt"/>
|
||||
<Item current="false" id="hococlock.selectBox"/>
|
||||
<Item current="" id="hococlock.InputValue"/>
|
||||
<Item current="" id="hococlock.OutputValue"/>
|
||||
<Item current="frq16" id="hococlock.frequencyListBox"/>
|
||||
<Item current="false" id="lococlock.selectBox"/>
|
||||
<Item current="" id="lococlock.InputValue"/>
|
||||
<Item current="" id="lococlock.OutputValue"/>
|
||||
<Item current="240" error="false" id="lococlock.frequencyTxt"/>
|
||||
<Item current="false" id="iwdtclock.selectBox"/>
|
||||
<Item current="" id="iwdtclock.InputValue"/>
|
||||
<Item current="" id="iwdtclock.OutputValue"/>
|
||||
<Item current="120" error="false" id="iwdtclock.frequencyTxt"/>
|
||||
<Item current="true" id="pllSourceSelect.isSelected"/>
|
||||
<Item current="16 MHz" id="pllSourceSelect.InputValue"/>
|
||||
<Item current="16 MHz" id="pllSourceSelect.OutputValue"/>
|
||||
<Item current="swtmainclock" id="pllSourceSelect.radiobutton"/>
|
||||
<Item current="0" id="pllSourceSelect.CurrentValue"/>
|
||||
<Item current="false" id="pllSourceSelect.buttonDisable.0"/>
|
||||
<Item current="true" id="pllSourceSelect.buttonDisable.1"/>
|
||||
<Item current="true" id="pll.isSelected"/>
|
||||
<Item current="16 MHz" id="pll.InputValue"/>
|
||||
<Item current="240.0 MHz" id="pll.OutputValue"/>
|
||||
<Item current="mul15-1" error="false" id="pll.multiplyBox"/>
|
||||
<Item current="div1-1" error="false" id="pll.dividerBox"/>
|
||||
<Item current="16.0 MHz" error="false" id="pll.MiddleValue"/>
|
||||
<Item current="true" id="ppll.isSelected"/>
|
||||
<Item current="16 MHz" id="ppll.InputValue"/>
|
||||
<Item current="200.0 MHz" id="ppll.OutputValue"/>
|
||||
<Item current="mul25-1" error="false" id="ppll.multiplyBox"/>
|
||||
<Item current="div1-2" error="false" id="ppll.dividerBox"/>
|
||||
<Item current="8.0 MHz" error="false" id="ppll.MiddleValue"/>
|
||||
<Item current="true" id="sckselector.isSelected"/>
|
||||
<Item current="240.0 MHz" id="sckselector.InputValue"/>
|
||||
<Item current="240.0 MHz" id="sckselector.OutputValue"/>
|
||||
<Item current="swtpll" id="sckselector.radiobutton"/>
|
||||
<Item current="0" id="sckselector.CurrentValue"/>
|
||||
<Item current="false" id="sckselector.buttonDisable.0"/>
|
||||
<Item current="false" id="sckselector.buttonDisable.1"/>
|
||||
<Item current="true" id="sckselector.buttonDisable.2"/>
|
||||
<Item current="true" id="sckselector.buttonDisable.3"/>
|
||||
<Item current="true" id="sckselector.buttonDisable.4"/>
|
||||
<Item current="true" id="ckoselector.isSelected"/>
|
||||
<Item current="16 MHz" id="ckoselector.InputValue"/>
|
||||
<Item current="16 MHz" id="ckoselector.OutputValue"/>
|
||||
<Item current="swtmainclock" id="ckoselector.radiobutton"/>
|
||||
<Item current="2" id="ckoselector.CurrentValue"/>
|
||||
<Item current="false" id="ckoselector.buttonDisable.0"/>
|
||||
<Item current="false" id="ckoselector.buttonDisable.1"/>
|
||||
<Item current="false" id="ckoselector.buttonDisable.2"/>
|
||||
<Item current="true" id="ckoselector.buttonDisable.3"/>
|
||||
<Item current="true" id="ckoselector.buttonDisable.4"/>
|
||||
<Item current="true" id="ckoselector.buttonDisable.5"/>
|
||||
<Item current="true" id="bckdivider.isSelected"/>
|
||||
<Item current="240.0 MHz" id="bckdivider.InputValue"/>
|
||||
<Item current="80.0 MHz" id="bckdivider.OutputValue"/>
|
||||
<Item current="sckselector.radiobutton.swtpll" id="bckdivider.Condition"/>
|
||||
<Item current="comboBox1-3" error="false" id="bckdivider.comboBox"/>
|
||||
<Item current="240.0 MHz" error="false" id="bckdivider.PreOutput"/>
|
||||
<Item current="iclkdivider" error="false" id="bckdivider.PreOutputController"/>
|
||||
<Item current="false" id="bckselector.selectBox"/>
|
||||
<Item current="80.0 MHz" id="bckselector.InputValue"/>
|
||||
<Item current="" id="bckselector.OutputValue"/>
|
||||
<Item current="comboBox1-2" error="false" id="bckselector.comboBox"/>
|
||||
<Item current="true" id="fclkdivider.isSelected"/>
|
||||
<Item current="240.0 MHz" id="fclkdivider.InputValue"/>
|
||||
<Item current="60.0 MHz" id="fclkdivider.OutputValue"/>
|
||||
<Item current="sckselector.radiobutton.swtpll" id="fclkdivider.Condition"/>
|
||||
<Item current="comboBox1-4" error="false" id="fclkdivider.comboBox"/>
|
||||
<Item current="true" id="pclkcdivider.isSelected"/>
|
||||
<Item current="240.0 MHz" id="pclkcdivider.InputValue"/>
|
||||
<Item current="60.0 MHz" id="pclkcdivider.OutputValue"/>
|
||||
<Item current="sckselector.radiobutton.swtpll" id="pclkcdivider.Condition"/>
|
||||
<Item current="comboBox1-4" error="false" id="pclkcdivider.comboBox"/>
|
||||
<Item current="60.0 MHz" error="false" id="pclkcdivider.PreOutput"/>
|
||||
<Item current="pclkbdivider" error="false" id="pclkcdivider.PreOutputController"/>
|
||||
<Item current="true" id="pclkddivider.isSelected"/>
|
||||
<Item current="240.0 MHz" id="pclkddivider.InputValue"/>
|
||||
<Item current="60.0 MHz" id="pclkddivider.OutputValue"/>
|
||||
<Item current="sckselector.radiobutton.swtpll" id="pclkddivider.Condition"/>
|
||||
<Item current="comboBox1-4" error="false" id="pclkddivider.comboBox"/>
|
||||
<Item current="60.0 MHz" error="false" id="pclkddivider.PreOutput"/>
|
||||
<Item current="pclkbdivider" error="false" id="pclkddivider.PreOutputController"/>
|
||||
<Item current="true" id="pclkbdivider.isSelected"/>
|
||||
<Item current="240.0 MHz" id="pclkbdivider.InputValue"/>
|
||||
<Item current="60.0 MHz" id="pclkbdivider.OutputValue"/>
|
||||
<Item current="sckselector.radiobutton.swtpll" id="pclkbdivider.Condition"/>
|
||||
<Item current="comboBox1-4" error="false" id="pclkbdivider.comboBox"/>
|
||||
<Item current="120.0 MHz" error="false" id="pclkbdivider.PreOutput"/>
|
||||
<Item current="pclkadivider" error="false" id="pclkbdivider.PreOutputController"/>
|
||||
<Item current="true" id="pclkadivider.isSelected"/>
|
||||
<Item current="240.0 MHz" id="pclkadivider.InputValue"/>
|
||||
<Item current="120.0 MHz" id="pclkadivider.OutputValue"/>
|
||||
<Item current="sckselector.radiobutton.swtpll" id="pclkadivider.Condition"/>
|
||||
<Item current="comboBox1-2" error="false" id="pclkadivider.comboBox"/>
|
||||
<Item current="true" id="uckdivider.selectBox"/>
|
||||
<Item current="240.0 MHz" id="uckdivider.InputValue"/>
|
||||
<Item current="48.0 MHz" id="uckdivider.OutputValue"/>
|
||||
<Item current="sckselector.radiobutton.swtpll" id="uckdivider.Condition"/>
|
||||
<Item current="comboBox1-5" error="false" id="uckdivider.comboBox"/>
|
||||
<Item current="true" id="iclkdivider.isSelected"/>
|
||||
<Item current="240.0 MHz" id="iclkdivider.InputValue"/>
|
||||
<Item current="240.0 MHz" id="iclkdivider.OutputValue"/>
|
||||
<Item current="sckselector.radiobutton.swtpll" id="iclkdivider.Condition"/>
|
||||
<Item current="comboBox1-1" error="false" id="iclkdivider.comboBox"/>
|
||||
<Item current="true" id="pplldivider.isSelected"/>
|
||||
<Item current="200.0 MHz" id="pplldivider.InputValue"/>
|
||||
<Item current="100.0 MHz" id="pplldivider.OutputValue"/>
|
||||
<Item current="comboBox1-2" error="false" id="pplldivider.comboBox"/>
|
||||
<Item current="true" id="ckodivider.isSelected"/>
|
||||
<Item current="16 MHz" id="ckodivider.InputValue"/>
|
||||
<Item current="16.0 MHz" id="ckodivider.OutputValue"/>
|
||||
<Item current="ckoselector.radiobutton.swtmainclock" id="ckodivider.Condition"/>
|
||||
<Item current="comboBox1-1" error="false" id="ckodivider.comboBox"/>
|
||||
<Item current="16 MHz" error="false" id="ckodivider.PreOutput"/>
|
||||
<Item current="ckoselector" error="false" id="ckodivider.PreOutputController"/>
|
||||
<Item current="true" id="uclkSourceSelect.isSelected"/>
|
||||
<Item current="48.0 MHz" id="uclkSourceSelect.InputValue"/>
|
||||
<Item current="48.0 MHz" id="uclkSourceSelect.OutputValue"/>
|
||||
<Item current="swtuckdivider" id="uclkSourceSelect.radiobutton"/>
|
||||
<Item current="0" id="uclkSourceSelect.CurrentValue"/>
|
||||
<Item current="false" id="uclkSourceSelect.buttonDisable.0"/>
|
||||
<Item current="false" id="uclkSourceSelect.buttonDisable.1"/>
|
||||
<Item current="true" id="outckSourceSelect.isSelected"/>
|
||||
<Item current="200.0 MHz" id="outckSourceSelect.InputValue"/>
|
||||
<Item current="200.0 MHz" id="outckSourceSelect.OutputValue"/>
|
||||
<Item current="swtppll" id="outckSourceSelect.radiobutton"/>
|
||||
<Item current="1" id="outckSourceSelect.CurrentValue"/>
|
||||
<Item current="false" id="outckSourceSelect.buttonDisable.0"/>
|
||||
<Item current="false" id="outckSourceSelect.buttonDisable.1"/>
|
||||
<Item current="true" id="fclk.isSelected"/>
|
||||
<Item current="60.0 MHz" id="fclk.InputValue"/>
|
||||
<Item current="60.0 MHz" id="fclk.OutputValue"/>
|
||||
<Item current="60.0" id="fclk.frequencyTxt"/>
|
||||
<Item current="MHz" id="fclk.unitTxt"/>
|
||||
<Item current="60.0" id="fclk.CurrentValue"/>
|
||||
<Item current="false" id="fclk.Disabled"/>
|
||||
<Item current="true" id="iclk.isSelected"/>
|
||||
<Item current="240.0 MHz" id="iclk.InputValue"/>
|
||||
<Item current="240.0 MHz" id="iclk.OutputValue"/>
|
||||
<Item current="240.0" id="iclk.frequencyTxt"/>
|
||||
<Item current="MHz" id="iclk.unitTxt"/>
|
||||
<Item current="240.0" id="iclk.CurrentValue"/>
|
||||
<Item current="false" id="iclk.Disabled"/>
|
||||
<Item current="true" id="pclka.isSelected"/>
|
||||
<Item current="120.0 MHz" id="pclka.InputValue"/>
|
||||
<Item current="120.0 MHz" id="pclka.OutputValue"/>
|
||||
<Item current="120.0" id="pclka.frequencyTxt"/>
|
||||
<Item current="MHz" id="pclka.unitTxt"/>
|
||||
<Item current="120.0" id="pclka.CurrentValue"/>
|
||||
<Item current="false" id="pclka.Disabled"/>
|
||||
<Item current="true" id="pclkb.isSelected"/>
|
||||
<Item current="60.0 MHz" id="pclkb.InputValue"/>
|
||||
<Item current="60.0 MHz" id="pclkb.OutputValue"/>
|
||||
<Item current="60.0" id="pclkb.frequencyTxt"/>
|
||||
<Item current="MHz" id="pclkb.unitTxt"/>
|
||||
<Item current="60.0" id="pclkb.CurrentValue"/>
|
||||
<Item current="false" id="pclkb.Disabled"/>
|
||||
<Item current="true" id="pclkc.isSelected"/>
|
||||
<Item current="60.0 MHz" id="pclkc.InputValue"/>
|
||||
<Item current="60.0 MHz" id="pclkc.OutputValue"/>
|
||||
<Item current="60.0" id="pclkc.frequencyTxt"/>
|
||||
<Item current="MHz" id="pclkc.unitTxt"/>
|
||||
<Item current="60.0" id="pclkc.CurrentValue"/>
|
||||
<Item current="false" id="pclkc.Disabled"/>
|
||||
<Item current="true" id="pclkd.isSelected"/>
|
||||
<Item current="60.0 MHz" id="pclkd.InputValue"/>
|
||||
<Item current="60.0 MHz" id="pclkd.OutputValue"/>
|
||||
<Item current="60.0" id="pclkd.frequencyTxt"/>
|
||||
<Item current="MHz" id="pclkd.unitTxt"/>
|
||||
<Item current="60.0" id="pclkd.CurrentValue"/>
|
||||
<Item current="false" id="pclkd.Disabled"/>
|
||||
<Item current="false" id="bckpin.isSelected"/>
|
||||
<Item current="" id="bckpin.InputValue"/>
|
||||
<Item current="0" id="bckpin.OutputValue"/>
|
||||
<Item current="-" id="bckpin.frequencyTxt"/>
|
||||
<Item current="MHz" id="bckpin.unitTxt"/>
|
||||
<Item current="true" id="bckpin.Disabled"/>
|
||||
<Item current="true" id="bck.isSelected"/>
|
||||
<Item current="80.0 MHz" id="bck.InputValue"/>
|
||||
<Item current="80.0 MHz" id="bck.OutputValue"/>
|
||||
<Item current="80.0" id="bck.frequencyTxt"/>
|
||||
<Item current="MHz" id="bck.unitTxt"/>
|
||||
<Item current="80.0" id="bck.CurrentValue"/>
|
||||
<Item current="false" id="bck.Disabled"/>
|
||||
<Item current="false" id="sdclk.selectBox"/>
|
||||
<Item current="80.0 MHz" id="sdclk.InputValue"/>
|
||||
<Item current="0" id="sdclk.OutputValue"/>
|
||||
<Item current="-" id="sdclk.frequencyTxt"/>
|
||||
<Item current="MHz" id="sdclk.unitTxt"/>
|
||||
<Item current="80.0" id="sdclk.CurrentValue"/>
|
||||
<Item current="true" id="sdclk.Disabled"/>
|
||||
<Item current="false" id="sdclk.SelectBoxDisabled"/>
|
||||
<Item current="true" id="uclk.isSelected"/>
|
||||
<Item current="48.0 MHz" id="uclk.InputValue"/>
|
||||
<Item current="48.0 MHz" id="uclk.OutputValue"/>
|
||||
<Item current="48.0" id="uclk.frequencyTxt"/>
|
||||
<Item current="MHz" id="uclk.unitTxt"/>
|
||||
<Item current="48.0" id="uclk.CurrentValue"/>
|
||||
<Item current="false" id="uclk.Disabled"/>
|
||||
<Item current="true" id="outckdivider.isSelected"/>
|
||||
<Item current="200.0 MHz" id="outckdivider.InputValue"/>
|
||||
<Item current="25.0 MHz" id="outckdivider.OutputValue"/>
|
||||
<Item current="comboBox1-8" error="false" id="outckdivider.comboBox"/>
|
||||
<Item current="true" id="clkout25m.isSelected"/>
|
||||
<Item current="25.0 MHz" id="clkout25m.InputValue"/>
|
||||
<Item current="25.0 MHz" id="clkout25m.OutputValue"/>
|
||||
<Item current="25.0" id="clkout25m.frequencyTxt"/>
|
||||
<Item current="MHz" id="clkout25m.unitTxt"/>
|
||||
<Item current="25.0" id="clkout25m.CurrentValue"/>
|
||||
<Item current="false" id="clkout25m.Disabled"/>
|
||||
<Item current="false" id="clkout.selectBox"/>
|
||||
<Item current="16.0 MHz" id="clkout.InputValue"/>
|
||||
<Item current="0" id="clkout.OutputValue"/>
|
||||
<Item current="-" id="clkout.frequencyTxt"/>
|
||||
<Item current="MHz" id="clkout.unitTxt"/>
|
||||
<Item current="16.0" id="clkout.CurrentValue"/>
|
||||
<Item current="true" id="clkout.Disabled"/>
|
||||
<Item current="false" id="clkout.SelectBoxDisabled"/>
|
||||
<Item current="false" id="cacilsclk.isSelected"/>
|
||||
<Item current="" id="cacilsclk.InputValue"/>
|
||||
<Item current="0" id="cacilsclk.OutputValue"/>
|
||||
<Item current="-" id="cacilsclk.frequencyTxt"/>
|
||||
<Item current="MHz" id="cacilsclk.unitTxt"/>
|
||||
<Item current="true" id="cacilsclk.Disabled"/>
|
||||
<Item current="false" id="caclclk.isSelected"/>
|
||||
<Item current="" id="caclclk.InputValue"/>
|
||||
<Item current="0" id="caclclk.OutputValue"/>
|
||||
<Item current="-" id="caclclk.frequencyTxt"/>
|
||||
<Item current="MHz" id="caclclk.unitTxt"/>
|
||||
<Item current="true" id="caclclk.Disabled"/>
|
||||
<Item current="false" id="cachclk.isSelected"/>
|
||||
<Item current="" id="cachclk.InputValue"/>
|
||||
<Item current="0" id="cachclk.OutputValue"/>
|
||||
<Item current="-" id="cachclk.frequencyTxt"/>
|
||||
<Item current="MHz" id="cachclk.unitTxt"/>
|
||||
<Item current="true" id="cachclk.Disabled"/>
|
||||
<Item current="false" id="cacsclk.isSelected"/>
|
||||
<Item current="" id="cacsclk.InputValue"/>
|
||||
<Item current="0" id="cacsclk.OutputValue"/>
|
||||
<Item current="-" id="cacsclk.frequencyTxt"/>
|
||||
<Item current="MHz" id="cacsclk.unitTxt"/>
|
||||
<Item current="true" id="cacsclk.Disabled"/>
|
||||
<Item current="false" id="rtcclk.selectBox"/>
|
||||
<Item current="" id="rtcclk.InputValue"/>
|
||||
<Item current="0" id="rtcclk.OutputValue"/>
|
||||
<Item current="-" id="rtcclk.frequencyTxt"/>
|
||||
<Item current="MHz" id="rtcclk.unitTxt"/>
|
||||
<Item current="true" id="rtcclk.Disabled"/>
|
||||
<Item current="true" id="rtcclk.SelectBoxDisabled"/>
|
||||
<Item current="true" id="cacmclk.isSelected"/>
|
||||
<Item current="16 MHz" id="cacmclk.InputValue"/>
|
||||
<Item current="16 MHz" id="cacmclk.OutputValue"/>
|
||||
<Item current="16" id="cacmclk.frequencyTxt"/>
|
||||
<Item current="MHz" id="cacmclk.unitTxt"/>
|
||||
<Item current="16" id="cacmclk.CurrentValue"/>
|
||||
<Item current="false" id="cacmclk.Disabled"/>
|
||||
</tool>
|
||||
<tool id="Pins" version="1.0.1.0">
|
||||
<pinItem allocation="20" comments="" direction="None" id="XTAL" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="50" comments="" direction="None" id="CLKOUT25M" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="65" comments="" direction="None" id="ET0_TX_EN" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="67" comments="" direction="None" id="ET0_TX_ER" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="85" comments="" direction="None" id="ET0_MDC" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="60" comments="" direction="None" id="ET0_COL" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="58" comments="" direction="None" id="ET0_CRS" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="22" comments="" direction="None" id="EXTAL" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="70" comments="" direction="None" id="ET0_RX_DV" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="68" comments="" direction="None" id="ET0_RX_ER" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="61" comments="" direction="None" id="ET0_ETXD3" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="62" comments="" direction="None" id="ET0_ETXD2" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="63" comments="" direction="None" id="ET0_ETXD1" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="64" comments="" direction="None" id="ET0_ETXD0" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="69" comments="" direction="None" id="ET0_RX_CLK" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="75" comments="" direction="None" id="ET0_ERXD3" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="73" comments="" direction="None" id="ET0_ERXD2" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="72" comments="" direction="None" id="ET0_ERXD1" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="71" comments="" direction="None" id="ET0_ERXD0" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="66" comments="" direction="None" id="ET0_TX_CLK" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="86" comments="" direction="None" id="ET0_MDIO" isUsedBySoftware="true" locked="false" status="0"/>
|
||||
<pinItem allocation="" comments="" direction="None" id="PMGI0_MDIO" isUsedBySoftware="false" locked="false" status="0"/>
|
||||
<pinItem allocation="" comments="" direction="None" id="PMGI0_MDC" isUsedBySoftware="false" locked="false" status="0"/>
|
||||
</tool>
|
||||
<tool id="Interrupt">
|
||||
<Item id="BSC_BUSERR" priority="15"/>
|
||||
<Item id="IE0" priority="15"/>
|
||||
<Item id="RAM_RAMERR" priority="15"/>
|
||||
<Item id="FCU_FIFERR" priority="15"/>
|
||||
<Item id="FCU_FRDYI" priority="15"/>
|
||||
<Item id="ICU_SWINT2" priority="15"/>
|
||||
<Item id="ICU_SWINT" priority="15"/>
|
||||
<Item id="CMT0_CMI0" priority="15"/>
|
||||
<Item id="CMT1_CMI1" priority="15"/>
|
||||
<Item id="CMTW0_CMWI0" priority="15"/>
|
||||
<Item id="CMTW1_CMWI1" priority="15"/>
|
||||
<Item id="USB0_D0FIFO0" priority="15"/>
|
||||
<Item id="USB0_D1FIFO0" priority="15"/>
|
||||
<Item id="RSPI0_SPRI0" priority="15"/>
|
||||
<Item id="RSPI0_SPTI0" priority="15"/>
|
||||
<Item id="RSPI1_SPRI1" priority="15"/>
|
||||
<Item id="RSPI1_SPTI1" priority="15"/>
|
||||
<Item id="QSPI_SPRI" priority="15"/>
|
||||
<Item id="QSPI_SPTI" priority="15"/>
|
||||
<Item id="SDHI_SBFAI" priority="15"/>
|
||||
<Item id="MMCIF_MBFAI" priority="15"/>
|
||||
<Item id="SSIE0_SSITXI0" priority="15"/>
|
||||
<Item id="SSIE0_SSIRXI0" priority="15"/>
|
||||
<Item id="SSIE1_SSIRTI1" priority="15"/>
|
||||
<Item id="RIIC1_RXI1" priority="15"/>
|
||||
<Item id="RIIC1_TXI1" priority="15"/>
|
||||
<Item id="RIIC0_RXI0" priority="15"/>
|
||||
<Item id="RIIC0_TXI0" priority="15"/>
|
||||
<Item id="RIIC2_RXI2" priority="15"/>
|
||||
<Item id="RIIC2_TXI2" priority="15"/>
|
||||
<Item id="SCI0_RXI0" priority="15"/>
|
||||
<Item id="SCI0_TXI0" priority="15"/>
|
||||
<Item id="SCI1_RXI1" priority="15"/>
|
||||
<Item id="SCI1_TXI1" priority="15"/>
|
||||
<Item id="SCI2_RXI2" priority="15"/>
|
||||
<Item id="SCI2_TXI2" priority="15"/>
|
||||
<Item id="ICU_IRQ0" priority="15"/>
|
||||
<Item id="ICU_IRQ1" priority="15"/>
|
||||
<Item id="ICU_IRQ2" priority="15"/>
|
||||
<Item id="ICU_IRQ3" priority="15"/>
|
||||
<Item id="ICU_IRQ4" priority="15"/>
|
||||
<Item id="ICU_IRQ5" priority="15"/>
|
||||
<Item id="ICU_IRQ6" priority="15"/>
|
||||
<Item id="ICU_IRQ7" priority="15"/>
|
||||
<Item id="ICU_IRQ8" priority="15"/>
|
||||
<Item id="ICU_IRQ9" priority="15"/>
|
||||
<Item id="ICU_IRQ10" priority="15"/>
|
||||
<Item id="ICU_IRQ11" priority="15"/>
|
||||
<Item id="ICU_IRQ12" priority="15"/>
|
||||
<Item id="ICU_IRQ13" priority="15"/>
|
||||
<Item id="ICU_IRQ14" priority="15"/>
|
||||
<Item id="ICU_IRQ15" priority="15"/>
|
||||
<Item id="SCI3_RXI3" priority="15"/>
|
||||
<Item id="SCI3_TXI3" priority="15"/>
|
||||
<Item id="SCI4_RXI4" priority="15"/>
|
||||
<Item id="SCI4_TXI4" priority="15"/>
|
||||
<Item id="SCI5_RXI5" priority="15"/>
|
||||
<Item id="SCI5_TXI5" priority="15"/>
|
||||
<Item id="SCI6_RXI6" priority="15"/>
|
||||
<Item id="SCI6_TXI6" priority="15"/>
|
||||
<Item id="LVD1_LVD1" priority="15"/>
|
||||
<Item id="LVD2_LVD2" priority="15"/>
|
||||
<Item id="USB0_USBR0" priority="15"/>
|
||||
<Item id="RTC_ALM" priority="15"/>
|
||||
<Item id="RTC_PRD" priority="15"/>
|
||||
<Item id="IWDT_IWUNI" priority="15"/>
|
||||
<Item id="WDT_WUNI" priority="15"/>
|
||||
<Item id="PDC_PCDFI" priority="15"/>
|
||||
<Item id="SCI7_RXI7" priority="15"/>
|
||||
<Item id="SCI7_TXI7" priority="15"/>
|
||||
<Item id="SCI8_RXI8" priority="15"/>
|
||||
<Item id="SCI8_TXI8" priority="15"/>
|
||||
<Item id="SCI9_RXI9" priority="15"/>
|
||||
<Item id="SCI9_TXI9" priority="15"/>
|
||||
<Item id="SCI10_RXI10" priority="15"/>
|
||||
<Item id="SCI10_TXI10" priority="15"/>
|
||||
<Item id="BE0" priority="15"/>
|
||||
<Item id="BL2" priority="15"/>
|
||||
<Item id="RSPI2_SPRI2" priority="15"/>
|
||||
<Item id="RSPI2_SPTI2" priority="15"/>
|
||||
<Item id="BL0" priority="15"/>
|
||||
<Item id="BL1" priority="15"/>
|
||||
<Item id="AL0" priority="15"/>
|
||||
<Item id="AL1" priority="2"/>
|
||||
<Item id="SCI11_RXI11" priority="15"/>
|
||||
<Item id="SCI11_TXI11" priority="15"/>
|
||||
<Item id="SCI12_RXI12" priority="15"/>
|
||||
<Item id="SCI12_TXI12" priority="15"/>
|
||||
<Item id="DMAC_DMAC0I" priority="15"/>
|
||||
<Item id="DMAC_DMAC1I" priority="15"/>
|
||||
<Item id="DMAC_DMAC2I" priority="15"/>
|
||||
<Item id="DMAC_DMAC3I" priority="15"/>
|
||||
<Item id="DMAC_DMAC74I" priority="15"/>
|
||||
<Item id="OST_OSTDI" priority="15"/>
|
||||
<Item id="EXDMAC_EXDMAC0I" priority="15"/>
|
||||
<Item id="EXDMAC_EXDMAC1I" priority="15"/>
|
||||
<Item defaultVect="128" id="CMT2_CMI2" priority="15"/>
|
||||
<Item defaultVect="129" id="CMT3_CMI3" priority="15"/>
|
||||
<Item defaultVect="130" id="TPU0_TGI0A" priority="15"/>
|
||||
<Item defaultVect="131" id="TPU0_TGI0B" priority="15"/>
|
||||
<Item defaultVect="132" id="TPU0_TGI0C" priority="15"/>
|
||||
<Item defaultVect="133" id="TPU0_TGI0D" priority="15"/>
|
||||
<Item defaultVect="134" id="TPU0_TCI0V" priority="15"/>
|
||||
<Item defaultVect="135" id="TPU1_TGI1B" priority="15"/>
|
||||
<Item defaultVect="136" id="TPU1_TCI1V" priority="15"/>
|
||||
<Item defaultVect="137" id="TPU1_TCI1U" priority="15"/>
|
||||
<Item defaultVect="138" id="TPU2_TGI2A" priority="15"/>
|
||||
<Item defaultVect="139" id="TPU2_TGI2B" priority="15"/>
|
||||
<Item defaultVect="140" id="TPU2_TCI2V" priority="15"/>
|
||||
<Item defaultVect="141" id="TPU2_TCI2U" priority="15"/>
|
||||
<Item defaultVect="142" id="TPU3_TGI3A" priority="15"/>
|
||||
<Item defaultVect="143" id="TPU3_TGI3B" priority="15"/>
|
||||
<Item defaultVect="144" id="TPU1_TGI1A" priority="15"/>
|
||||
<Item defaultVect="145" id="TPU3_TGI3C" priority="15"/>
|
||||
<Item defaultVect="146" id="TMR0_CMIA0" priority="15"/>
|
||||
<Item defaultVect="147" id="TMR0_CMIB0" priority="15"/>
|
||||
<Item defaultVect="148" id="TMR0_OVI0" priority="15"/>
|
||||
<Item defaultVect="149" id="TMR1_CMIA1" priority="15"/>
|
||||
<Item defaultVect="150" id="TMR1_CMIB1" priority="15"/>
|
||||
<Item defaultVect="151" id="TMR1_OVI1" priority="15"/>
|
||||
<Item defaultVect="152" id="TMR2_CMIA2" priority="15"/>
|
||||
<Item defaultVect="153" id="TMR2_CMIB2" priority="15"/>
|
||||
<Item defaultVect="154" id="TMR2_OVI2" priority="15"/>
|
||||
<Item defaultVect="155" id="TMR3_CMIA3" priority="15"/>
|
||||
<Item defaultVect="156" id="TMR3_CMIB3" priority="15"/>
|
||||
<Item defaultVect="157" id="TMR3_OVI3" priority="15"/>
|
||||
<Item defaultVect="158" id="TPU3_TGI3D" priority="15"/>
|
||||
<Item defaultVect="159" id="TPU3_TCI3V" priority="15"/>
|
||||
<Item defaultVect="160" id="TPU4_TGI4A" priority="15"/>
|
||||
<Item defaultVect="161" id="TPU4_TGI4B" priority="15"/>
|
||||
<Item defaultVect="162" id="TPU4_TCI4V" priority="15"/>
|
||||
<Item defaultVect="163" id="TPU4_TCI4U" priority="15"/>
|
||||
<Item defaultVect="164" id="TPU5_TGI5A" priority="15"/>
|
||||
<Item defaultVect="165" id="TPU5_TGI5B" priority="15"/>
|
||||
<Item defaultVect="166" id="TPU5_TCI5V" priority="15"/>
|
||||
<Item defaultVect="167" id="TPU5_TCI5U" priority="15"/>
|
||||
<Item defaultVect="168" id="CMTW0_IC0I0" priority="15"/>
|
||||
<Item defaultVect="169" id="CMTW0_IC1I0" priority="15"/>
|
||||
<Item defaultVect="170" id="CMTW0_OC0I0" priority="15"/>
|
||||
<Item defaultVect="171" id="CMTW0_OC1I0" priority="15"/>
|
||||
<Item defaultVect="172" id="CMTW1_IC0I1" priority="15"/>
|
||||
<Item defaultVect="173" id="CMTW1_IC1I1" priority="15"/>
|
||||
<Item defaultVect="174" id="CMTW1_OC0I1" priority="15"/>
|
||||
<Item defaultVect="175" id="CMTW1_OC1I1" priority="15"/>
|
||||
<Item defaultVect="176" id="RTC_CUP" priority="15"/>
|
||||
<Item defaultVect="177" id="CAN0_RXF0" priority="15"/>
|
||||
<Item defaultVect="178" id="CAN0_TXF0" priority="15"/>
|
||||
<Item defaultVect="179" id="CAN0_RXM0" priority="15"/>
|
||||
<Item defaultVect="180" id="CAN0_TXM0" priority="15"/>
|
||||
<Item defaultVect="181" id="CAN1_RXF1" priority="15"/>
|
||||
<Item defaultVect="182" id="CAN1_TXF1" priority="15"/>
|
||||
<Item defaultVect="183" id="CAN1_RXM1" priority="15"/>
|
||||
<Item defaultVect="184" id="CAN1_TXM1" priority="15"/>
|
||||
<Item defaultVect="185" id="USB0_USBI0" priority="15"/>
|
||||
<Item defaultVect="186" id="S12AD_S12ADI" priority="15"/>
|
||||
<Item defaultVect="187" id="S12AD_S12GBADI" priority="15"/>
|
||||
<Item defaultVect="188" id="S12AD_S12GCADI" priority="15"/>
|
||||
<Item defaultVect="189" id="S12AD1_S12ADI1" priority="15"/>
|
||||
<Item defaultVect="190" id="S12AD1_S12GBADI1" priority="15"/>
|
||||
<Item defaultVect="191" id="S12AD1_S12GCADI1" priority="15"/>
|
||||
<Item defaultVect="192" id="ELC_ELSR18I" priority="15"/>
|
||||
<Item defaultVect="193" id="ELC_ELSR19I" priority="15"/>
|
||||
<Item defaultVect="194" id="TSIP_PROC_BUSY" priority="15"/>
|
||||
<Item defaultVect="195" id="TSIP_ROMOK" priority="15"/>
|
||||
<Item defaultVect="196" id="TSIP_LONG_PLG" priority="15"/>
|
||||
<Item defaultVect="197" id="TSIP_TEST_BUSY" priority="15"/>
|
||||
<Item defaultVect="198" id="TSIP_WRRDY0" priority="15"/>
|
||||
<Item defaultVect="199" id="TSIP_WRRDY1" priority="15"/>
|
||||
<Item defaultVect="200" id="TSIP_WRRDY4" priority="15"/>
|
||||
<Item defaultVect="201" id="TSIP_RDRDY0" priority="15"/>
|
||||
<Item defaultVect="202" id="TSIP_RDRDY1" priority="15"/>
|
||||
<Item defaultVect="203" id="TSIP_INTEGRATE_WRRDY" priority="15"/>
|
||||
<Item defaultVect="204" id="TSIP_INTEGRATE_RDRDY" priority="15"/>
|
||||
<Item id="PERIB_INTB205" priority="15"/>
|
||||
<Item id="PERIB_INTB206" priority="15"/>
|
||||
<Item id="PERIB_INTB207" priority="15"/>
|
||||
<Item defaultVect="208" id="MTU1_TGIA1" priority="15"/>
|
||||
<Item defaultVect="209" id="MTU0_TGIA0" priority="15"/>
|
||||
<Item defaultVect="210" id="MTU0_TGIB0" priority="15"/>
|
||||
<Item defaultVect="211" id="MTU0_TGIC0" priority="15"/>
|
||||
<Item defaultVect="212" id="MTU0_TGID0" priority="15"/>
|
||||
<Item defaultVect="213" id="MTU0_TCIV0" priority="15"/>
|
||||
<Item defaultVect="214" id="MTU0_TGIE0" priority="15"/>
|
||||
<Item defaultVect="215" id="MTU0_TGIF0" priority="15"/>
|
||||
<Item defaultVect="216" id="MTU1_TGIB1" priority="15"/>
|
||||
<Item defaultVect="217" id="MTU1_TCIV1" priority="15"/>
|
||||
<Item defaultVect="218" id="MTU1_TCIU1" priority="15"/>
|
||||
<Item defaultVect="219" id="MTU2_TGIA2" priority="15"/>
|
||||
<Item defaultVect="220" id="MTU2_TGIB2" priority="15"/>
|
||||
<Item defaultVect="221" id="MTU2_TCIV2" priority="15"/>
|
||||
<Item defaultVect="222" id="MTU2_TCIU2" priority="15"/>
|
||||
<Item defaultVect="223" id="MTU3_TGIA3" priority="15"/>
|
||||
<Item defaultVect="224" id="MTU3_TGIB3" priority="15"/>
|
||||
<Item defaultVect="225" id="MTU3_TGIC3" priority="15"/>
|
||||
<Item defaultVect="226" id="MTU3_TGID3" priority="15"/>
|
||||
<Item defaultVect="227" id="MTU3_TCIV3" priority="15"/>
|
||||
<Item defaultVect="228" id="MTU4_TGIA4" priority="15"/>
|
||||
<Item defaultVect="229" id="MTU4_TGIB4" priority="15"/>
|
||||
<Item defaultVect="230" id="MTU4_TGIC4" priority="15"/>
|
||||
<Item defaultVect="231" id="MTU4_TGID4" priority="15"/>
|
||||
<Item defaultVect="232" id="MTU4_TCIV4" priority="15"/>
|
||||
<Item defaultVect="233" id="MTU5_TGIU5" priority="15"/>
|
||||
<Item defaultVect="234" id="MTU5_TGIV5" priority="15"/>
|
||||
<Item defaultVect="235" id="MTU5_TGIW5" priority="15"/>
|
||||
<Item defaultVect="236" id="MTU6_TGIA6" priority="15"/>
|
||||
<Item defaultVect="237" id="MTU6_TGIB6" priority="15"/>
|
||||
<Item defaultVect="238" id="MTU6_TGIC6" priority="15"/>
|
||||
<Item defaultVect="239" id="MTU6_TGID6" priority="15"/>
|
||||
<Item defaultVect="240" id="MTU6_TCIV6" priority="15"/>
|
||||
<Item defaultVect="241" id="MTU7_TGIA7" priority="15"/>
|
||||
<Item defaultVect="242" id="MTU7_TGIB7" priority="15"/>
|
||||
<Item defaultVect="243" id="MTU7_TGIC7" priority="15"/>
|
||||
<Item defaultVect="244" id="MTU7_TGID7" priority="15"/>
|
||||
<Item defaultVect="245" id="MTU7_TCIV7" priority="15"/>
|
||||
<Item defaultVect="246" id="MTU8_TGIA8" priority="15"/>
|
||||
<Item defaultVect="247" id="MTU8_TGIB8" priority="15"/>
|
||||
<Item defaultVect="248" id="MTU8_TGIC8" priority="15"/>
|
||||
<Item defaultVect="249" id="MTU8_TGID8" priority="15"/>
|
||||
<Item defaultVect="250" id="MTU8_TCIV8" priority="15"/>
|
||||
<Item defaultVect="251" id="EPTPC_IPLS" priority="15"/>
|
||||
<Item defaultVect="252" id="PMGI0_PMGI0I" priority="2"/>
|
||||
<Item defaultVect="253" id="PMGI1_PMGI1I" priority="2"/>
|
||||
<Item id="PERIA_INTA254" priority="15"/>
|
||||
<Item id="PERIA_INTA255" priority="15"/>
|
||||
</tool>
|
||||
<tool id="SWComponent" version="1.0.0.0">
|
||||
<configuration inuse="true" name="r_t4_rx">
|
||||
<component description="依存モジュール: r_t4_driver_rx バージョン 1.08 T4 is TCP/IP protocol stack that has small footprint for Renesas MCUs." detailDescription="The TCP/IP functions for Renesas MCUs." display="r_t4_rx" id="r_t4_rx2.09" version="2.09">
|
||||
<gridItem id="T4_CFG_SYSTEM_CHANNEL_NUMBER" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_SYSTEM_DHCP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_FIXED_IP_ADDRESS_CH0" selectedIndex="192,168,1,34"/>
|
||||
<gridItem id="T4_CFG_FIXED_SABNET_MASK_CH0" selectedIndex="255,255,255,0"/>
|
||||
<gridItem id="T4_CFG_FIXED_GATEWAY_ADDRESS_CH0" selectedIndex="0,0,0,0"/>
|
||||
<gridItem id="T4_CFG_FIXED_IP_ADDRESS_CH1" selectedIndex="192,168,0,10"/>
|
||||
<gridItem id="T4_CFG_FIXED_SABNET_MASK_CH1" selectedIndex="255,255,255,0"/>
|
||||
<gridItem id="T4_CFG_FIXED_GATEWAY_ADDRESS_CH1" selectedIndex="0,0,0,0"/>
|
||||
<gridItem id="T4_CFG_ETHER_CH0_MAC_ADDRESS" selectedIndex="0x74,0x90,0x50,0x00,0x79,0x03"/>
|
||||
<gridItem id="T4_CFG_ETHER_CH1_MAC_ADDRESS" selectedIndex="0x74,0x90,0x50,0x00,0x79,0x10"/>
|
||||
<gridItem id="T4_CFG_SYSTEM_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_SYSTEM_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="system_callback"/>
|
||||
<gridItem id="T4_CFG_TCP_REPID1_PORT_NUMBER" selectedIndex="1024"/>
|
||||
<gridItem id="T4_CFG_TCP_REPID2_PORT_NUMBER" selectedIndex="1025"/>
|
||||
<gridItem id="T4_CFG_TCP_REPID3_PORT_NUMBER" selectedIndex="1026"/>
|
||||
<gridItem id="T4_CFG_TCP_REPID4_PORT_NUMBER" selectedIndex="1027"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID1_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID1_RECEIVE_WINDOW_SIZE" selectedIndex="1460"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID1_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID1_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID1_KEEPALIVE_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID2_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID2_RECEIVE_WINDOW_SIZE" selectedIndex="1460"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID2_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID2_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID2_KEEPALIVE_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID3_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID3_RECEIVE_WINDOW_SIZE" selectedIndex="1460"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID3_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID3_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID3_KEEPALIVE_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID4_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID4_RECEIVE_WINDOW_SIZE" selectedIndex="1460"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID4_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID4_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID4_KEEPALIVE_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID5_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID5_RECEIVE_WINDOW_SIZE" selectedIndex="1460"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID5_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID5_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID5_KEEPALIVE_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID6_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID6_RECEIVE_WINDOW_SIZE" selectedIndex="1460"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID6_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID6_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_CEPID6_KEEPALIVE_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_TCP_MSS" selectedIndex="1460"/>
|
||||
<gridItem id="T4_CFG_TCP_2MSL_TIME" selectedIndex="60"/>
|
||||
<gridItem id="T4_CFG_TCP_MAX_TIMEOUT_PERIOD" selectedIndex="600"/>
|
||||
<gridItem id="T4_CFG_TCP_DIVIDE_SENDING_PACKET" selectedIndex="1"/>
|
||||
<gridItem id="T4_CFG_TCP_KEEPALIVE_START" selectedIndex="7200"/>
|
||||
<gridItem id="T4_CFG_TCP_KEEPALIVE_INTERVAL" selectedIndex="10"/>
|
||||
<gridItem id="T4_CFG_TCP_KEEPALIVE_COUNT" selectedIndex="10"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID1_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID1_PORT_NUMBER" selectedIndex="1365"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID1_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID1_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID2_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID2_PORT_NUMBER" selectedIndex="1366"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID2_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID2_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID3_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID3_PORT_NUMBER" selectedIndex="1367"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID3_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID3_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID4_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID4_PORT_NUMBER" selectedIndex="1368"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID4_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID4_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID5_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID5_PORT_NUMBER" selectedIndex="1369"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID5_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID5_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID6_CHANNEL" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID6_PORT_NUMBER" selectedIndex="1370"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID6_CALLBACK_FUNCTION_USE" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_CEPID6_CALLBACK_FUNCTION_NAME_TMP" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_UDP_MULTICAST_TTL" selectedIndex="1"/>
|
||||
<gridItem id="T4_CFG_UDP_BEHAVIOR_OF_RECEIVED_ZERO_CHECKSUM" selectedIndex="0"/>
|
||||
<gridItem id="T4_CFG_IP_ARP_CACHE_TABLE_COUNT" selectedIndex="3"/>
|
||||
</component>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
</configuration>
|
||||
<configuration inuse="true" name="r_t4_driver_rx">
|
||||
<component description="依存モジュール: r_bsp バージョン 5.20 依存モジュール: r_ether_rx バージョン 1.16 依存モジュール: r_sys_time_rx バージョン 1.01 依存モジュール: r_t4_rx バージョン 2.09 Convert the TCP/IP(T4) - RX Ethernet Driver Interface." detailDescription="Convert the TCP/IP(T4) - RX Ethernet Driver Interface." display="r_t4_driver_rx" id="r_t4_driver_rx1.08" version="1.08"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
</configuration>
|
||||
<configuration inuse="true" name="r_sys_time_rx">
|
||||
<component description="依存モジュール: r_bsp バージョン 5.20 依存モジュール: r_cmt_rx バージョン 4.00 Generic system timer for RX MCUs using CMT module." detailDescription="Generic system timer for RX MCUs using CMT module." display="r_sys_time_rx" id="r_sys_time_rx1.01" version="1.01"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
</configuration>
|
||||
<configuration inuse="true" name="r_cmt_rx">
|
||||
<component description="依存モジュール: r_bsp バージョン 5.50 This module creates a timer tick using a CMT channel based on a frequency input by the user." detailDescription="Simple CMT driver for creating timer tick." display="r_cmt_rx" id="r_cmt_rx4.31" version="4.31">
|
||||
<gridItem id="CMT_RX_CFG_IPR" selectedIndex="5"/>
|
||||
</component>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
</configuration>
|
||||
<configuration inuse="true" name="r_ether_rx">
|
||||
<component description="依存モジュール: r_bsp バージョン 5.50 The Ethernet fit module provides a method to send and receive Ethernet / IEEE802.3 frame using Ethernet controller (ETHERC), Ethernet DMA controller (EDMAC)." detailDescription="Ethernet Driver." display="r_ether_rx" id="r_ether_rx1.20" version="1.20">
|
||||
<gridItem id="CLKOUT25M" selectedIndex="1"/>
|
||||
<gridItem id="ET0_TX_CLK" selectedIndex="1"/>
|
||||
<gridItem id="ET0_RX_CLK" selectedIndex="1"/>
|
||||
<gridItem id="ET0_TX_EN" selectedIndex="1"/>
|
||||
<gridItem id="ET0_ETXD3" selectedIndex="1"/>
|
||||
<gridItem id="ET0_ETXD2" selectedIndex="1"/>
|
||||
<gridItem id="ET0_ETXD1" selectedIndex="1"/>
|
||||
<gridItem id="ET0_ETXD0" selectedIndex="1"/>
|
||||
<gridItem id="ET0_TX_ER" selectedIndex="1"/>
|
||||
<gridItem id="ET0_RX_DV" selectedIndex="1"/>
|
||||
<gridItem id="ET0_ERXD3" selectedIndex="1"/>
|
||||
<gridItem id="ET0_ERXD2" selectedIndex="1"/>
|
||||
<gridItem id="ET0_ERXD1" selectedIndex="1"/>
|
||||
<gridItem id="ET0_ERXD0" selectedIndex="1"/>
|
||||
<gridItem id="ET0_RX_ER" selectedIndex="1"/>
|
||||
<gridItem id="ET0_CRS" selectedIndex="1"/>
|
||||
<gridItem id="ET0_COL" selectedIndex="1"/>
|
||||
<gridItem id="ET0_MDC" selectedIndex="1"/>
|
||||
<gridItem id="ET0_MDIO" selectedIndex="1"/>
|
||||
<gridItem id="PMGI0_MDC" selectedIndex="0"/>
|
||||
<gridItem id="PMGI0_MDIO" selectedIndex="0"/>
|
||||
<gridItem id="ET0_LINKSTA" selectedIndex="0"/>
|
||||
<gridItem id="ET0_EXOUT" selectedIndex="0"/>
|
||||
<gridItem id="ET0_WOL" selectedIndex="0"/>
|
||||
<gridItem id="ETHERC0_MII" selectedIndex="1"/>
|
||||
<gridItem id="REF50CK0" selectedIndex="0"/>
|
||||
<gridItem id="RMII0_TXD_EN" selectedIndex="0"/>
|
||||
<gridItem id="RMII0_TXD1" selectedIndex="0"/>
|
||||
<gridItem id="RMII0_TXD0" selectedIndex="0"/>
|
||||
<gridItem id="RMII0_RXD1" selectedIndex="0"/>
|
||||
<gridItem id="RMII0_RXD0" selectedIndex="0"/>
|
||||
<gridItem id="RMII0_RX_ER" selectedIndex="0"/>
|
||||
<gridItem id="RMII0_CRS_DV" selectedIndex="0"/>
|
||||
<gridItem id="ET0_MDC" selectedIndex="1"/>
|
||||
<gridItem id="ET0_MDIO" selectedIndex="1"/>
|
||||
<gridItem id="PMGI0_MDC" selectedIndex="0"/>
|
||||
<gridItem id="PMGI0_MDIO" selectedIndex="0"/>
|
||||
<gridItem id="ET0_LINKSTA" selectedIndex="0"/>
|
||||
<gridItem id="ET0_EXOUT" selectedIndex="0"/>
|
||||
<gridItem id="ET0_WOL" selectedIndex="0"/>
|
||||
<gridItem id="ETHERC0_RMII" selectedIndex="0"/>
|
||||
<gridItem id="CLKOUT25M" selectedIndex="1"/>
|
||||
<gridItem id="ET1_TX_CLK" selectedIndex="0"/>
|
||||
<gridItem id="ET1_RX_CLK" selectedIndex="0"/>
|
||||
<gridItem id="ET1_TX_EN" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ETXD3" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ETXD2" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ETXD1" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ETXD0" selectedIndex="0"/>
|
||||
<gridItem id="ET1_TX_ER" selectedIndex="0"/>
|
||||
<gridItem id="ET1_RX_DV" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ERXD3" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ERXD2" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ERXD1" selectedIndex="0"/>
|
||||
<gridItem id="ET1_ERXD0" selectedIndex="0"/>
|
||||
<gridItem id="ET1_RX_ER" selectedIndex="0"/>
|
||||
<gridItem id="ET1_CRS" selectedIndex="0"/>
|
||||
<gridItem id="ET1_COL" selectedIndex="0"/>
|
||||
<gridItem id="ET1_MDC" selectedIndex="0"/>
|
||||
<gridItem id="ET1_MDIO" selectedIndex="0"/>
|
||||
<gridItem id="PMGI1_MDC" selectedIndex="0"/>
|
||||
<gridItem id="PMGI1_MDIO" selectedIndex="0"/>
|
||||
<gridItem id="ET1_LINKSTA" selectedIndex="0"/>
|
||||
<gridItem id="ET1_EXOUT" selectedIndex="0"/>
|
||||
<gridItem id="ET1_WOL" selectedIndex="0"/>
|
||||
<gridItem id="ETHERC1_MII" selectedIndex="0"/>
|
||||
<gridItem id="REF50CK1" selectedIndex="0"/>
|
||||
<gridItem id="RMII1_TXD_EN" selectedIndex="0"/>
|
||||
<gridItem id="RMII1_TXD1" selectedIndex="0"/>
|
||||
<gridItem id="RMII1_TXD0" selectedIndex="0"/>
|
||||
<gridItem id="RMII1_RXD1" selectedIndex="0"/>
|
||||
<gridItem id="RMII1_RXD0" selectedIndex="0"/>
|
||||
<gridItem id="RMII1_RX_ER" selectedIndex="0"/>
|
||||
<gridItem id="RMII1_CRS_DV" selectedIndex="0"/>
|
||||
<gridItem id="ET1_MDC" selectedIndex="0"/>
|
||||
<gridItem id="ET1_MDIO" selectedIndex="0"/>
|
||||
<gridItem id="PMGI1_MDC" selectedIndex="0"/>
|
||||
<gridItem id="PMGI1_MDIO" selectedIndex="0"/>
|
||||
<gridItem id="ET1_LINKSTA" selectedIndex="0"/>
|
||||
<gridItem id="ET1_EXOUT" selectedIndex="0"/>
|
||||
<gridItem id="ET1_WOL" selectedIndex="0"/>
|
||||
<gridItem id="ETHERC1_RMII" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_MODE_SEL" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_CH0_PHY_ADDRESS" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_CH1_PHY_ADDRESS" selectedIndex="1"/>
|
||||
<gridItem id="ETHER_CFG_EMAC_RX_DESCRIPTORS" selectedIndex="1"/>
|
||||
<gridItem id="ETHER_CFG_EMAC_TX_DESCRIPTORS" selectedIndex="1"/>
|
||||
<gridItem id="ETHER_CFG_BUFSIZE" selectedIndex="1536"/>
|
||||
<gridItem id="ETHER_CFG_AL1_INT_PRIORTY" selectedIndex="1"/>
|
||||
<gridItem id="ETHER_CFG_CH0_PHY_ACCESS" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_CH1_PHY_ACCESS" selectedIndex="1"/>
|
||||
<gridItem id="ETHER_CFG_PHY_MII_WAIT" selectedIndex="8"/>
|
||||
<gridItem id="ETHER_CFG_PHY_DELAY_RESET" selectedIndex="0x00020000L"/>
|
||||
<gridItem id="ETHER_CFG_LINK_PRESENT" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_USE_LINKSTA" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_USE_PHY_KSZ8041NL" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_NON_BLOCKING" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_PMGI_CLOCK" selectedIndex="2500000"/>
|
||||
<gridItem id="ETHER_CFG_PMGI_ENABLE_PREAMBLE" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_PMGI_HOLD_TIME" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_PMGI_CAPTURE_TIME" selectedIndex="0"/>
|
||||
<gridItem id="ETHER_CFG_PMGI_INT_PRIORTY" selectedIndex="1"/>
|
||||
</component>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
</configuration>
|
||||
<configuration inuse="true" name="r_tsip_rx">
|
||||
<component description="依存モジュール: r_bsp バージョン 5.51 Support functions: AES, GCM, CCM, CMAC, SHA, MD5, Triple-DES, RSA, ECC, Random number generate, Key management, secure boot/secure firmware update." detailDescription="TSIP(Trusted Secure IP) driver." display="r_tsip_rx" id="r_tsip_rx1.09" version="1.09">
|
||||
<gridItem id="TSIP_AES_128_ECB_ENCRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_256_ECB_ENCRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_128_ECB_DECRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_256_ECB_DECRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_128_CBC_ENCRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_256_CBC_ENCRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_128_CBC_DECRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_256_CBC_DECRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_128_GCM_ENCRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_256_GCM_ENCRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_128_GCM_DECRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_256_GCM_DECRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_128_CMAC" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_256_CMAC" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_128_CCM_ENCRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_256_CCM_ENCRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_128_CCM_DECRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_AES_256_CCM_DECRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_TDES_ECB_ENCRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_TDES_ECB_DECRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_TDES_CBC_ENCRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_TDES_CBC_DECRYPT" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_SHA_1" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_SHA_256" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_MD5" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_SHA_1_HMAC" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_SHA_256_HMAC" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_RSAES_1024" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_RSAES_2048" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_RSASSA_1024" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_RSASSA_2048" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_USER_HASH_ENABLED" selectedIndex="0"/>
|
||||
<gridItem id="TSIP_RSA_RETRY_COUNT_FOR_RSA_KEY_GENERATION" selectedIndex="5120*2"/>
|
||||
<gridItem id="TSIP_ECDSA_P192" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_ECDSA_P224" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_ECDSA_P256" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_ECDH" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_TLS" selectedIndex="1"/>
|
||||
<gridItem id="TSIP_SECURE_BOOT" selectedIndex="0"/>
|
||||
<gridItem id="TSIP_FIRMWARE_UPDATE" selectedIndex="1"/>
|
||||
</component>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
</configuration>
|
||||
<configuration inuse="true" name="r_bsp">
|
||||
<component description="依存モジュール: なし The r_bsp package provides a foundation for code to be built on top of. It provides startup code, iodefines, and MCU information for different boards. There are 2 folders that make up the r_bsp package. The 'mcu' folder contains files that are common to a MCU group. These files provide functionality such as easy register access, CPU functions, and a file named 'mcu_info.h' for each MCU group. The 'mcu_info.h' file has information about the MCU on the board and is configured based on the information given in r_bsp_config.h. The information in 'mcu_info.h' is used to help configure Renesas middleware that uses the r_bsp package. The 'board' folder has a folder with startup code for each supported board. Which MCU and board is chosen is decided by the settings in 'platform.h'. The user can choose which board they are using by uncommenting the include path that applies to their board. For example, if you are using the RSK+RX64M then you would uncomment the #include "./board/generic_rx64m/r_bsp.h" include path. Users are encouraged to add their own boards to the 'board' directory. BSPs are configured by using the r_bsp_config.h file. Each board will have a reference configuration file named r_bsp_config_reference.h. The user should copy this file to their project, rename it to r_bsp_config.h, and use the options inside the file to configure the BSP for their project." detailDescription="Board Support Packages." display="r_bsp" id="r_bsp5.52" version="5.52">
|
||||
<gridItem id="BSP_CFG_STARTUP_DISABLE" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_USER_STACK_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_USTACK_BYTES" selectedIndex="0x2000"/>
|
||||
<gridItem id="BSP_CFG_ISTACK_BYTES" selectedIndex="0x400"/>
|
||||
<gridItem id="BSP_CFG_HEAP_BYTES" selectedIndex="0xc000"/>
|
||||
<gridItem id="BSP_CFG_IO_LIB_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_USER_CHARGET_ENABLED" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_USER_CHARGET_FUNCTION" selectedIndex="my_sw_charget_function"/>
|
||||
<gridItem id="BSP_CFG_USER_CHARPUT_ENABLED" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_USER_CHARPUT_FUNCTION" selectedIndex="my_sw_charput_function"/>
|
||||
<gridItem id="BSP_CFG_RUN_IN_USER_MODE" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_ID_CODE_LONG_1" selectedIndex="0xFFFFFFFF"/>
|
||||
<gridItem id="BSP_CFG_ID_CODE_LONG_2" selectedIndex="0xFFFFFFFF"/>
|
||||
<gridItem id="BSP_CFG_ID_CODE_LONG_3" selectedIndex="0xFFFFFFFF"/>
|
||||
<gridItem id="BSP_CFG_ID_CODE_LONG_4" selectedIndex="0xFFFFFFFF"/>
|
||||
<gridItem id="BSP_CFG_ROM_CACHE_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_TRUSTED_MODE_FUNCTION" selectedIndex="0xFFFFFFFF"/>
|
||||
<gridItem id="BSP_CFG_FAW_REG_VALUE" selectedIndex="0xFFFFFFFF"/>
|
||||
<gridItem id="BSP_CFG_ROMCODE_REG_VALUE" selectedIndex="0xFFFFFFFF"/>
|
||||
<gridItem id="BSP_CFG_CODE_FLASH_BANK_MODE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_CODE_FLASH_START_BANK" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_USER_LOCKING_ENABLED" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_USER_LOCKING_TYPE" selectedIndex="bsp_lock_t"/>
|
||||
<gridItem id="BSP_CFG_USER_LOCKING_HW_LOCK_FUNCTION" selectedIndex="my_hw_locking_function"/>
|
||||
<gridItem id="BSP_CFG_USER_LOCKING_HW_UNLOCK_FUNCTION" selectedIndex="my_hw_unlocking_function"/>
|
||||
<gridItem id="BSP_CFG_USER_LOCKING_SW_LOCK_FUNCTION" selectedIndex="my_sw_locking_function"/>
|
||||
<gridItem id="BSP_CFG_USER_LOCKING_SW_UNLOCK_FUNCTION" selectedIndex="my_sw_unlocking_function"/>
|
||||
<gridItem id="BSP_CFG_USER_WARM_START_CALLBACK_PRE_INITC_ENABLED" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_USER_WARM_START_PRE_C_FUNCTION" selectedIndex="my_sw_warmstart_prec_function"/>
|
||||
<gridItem id="BSP_CFG_USER_WARM_START_CALLBACK_POST_INITC_ENABLED" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_USER_WARM_START_POST_C_FUNCTION" selectedIndex="my_sw_warmstart_postc_function"/>
|
||||
<gridItem id="BSP_CFG_PARAM_CHECKING_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_EBMAPCR_1ST_PRIORITY" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_EBMAPCR_2ND_PRIORITY" selectedIndex="3"/>
|
||||
<gridItem id="BSP_CFG_EBMAPCR_3RD_PRIORITY" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_EBMAPCR_4TH_PRIORITY" selectedIndex="2"/>
|
||||
<gridItem id="BSP_CFG_EBMAPCR_5TH_PRIORITY" selectedIndex="4"/>
|
||||
<gridItem id="BSP_CFG_NONCACHEABLE_AREA0_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_NONCACHEABLE_AREA0_ADDR" selectedIndex="0xFFE00000"/>
|
||||
<gridItem id="BSP_CFG_NONCACHEABLE_AREA0_SIZE" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_NONCACHEABLE_AREA0_IF_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_NONCACHEABLE_AREA0_OA_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_NONCACHEABLE_AREA0_DM_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_NONCACHEABLE_AREA1_ENABLE" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_NONCACHEABLE_AREA1_ADDR" selectedIndex="0xFFE00000"/>
|
||||
<gridItem id="BSP_CFG_NONCACHEABLE_AREA1_SIZE" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_NONCACHEABLE_AREA1_IF_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_NONCACHEABLE_AREA1_OA_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_NONCACHEABLE_AREA1_DM_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_FIT_IPL_MAX" selectedIndex="15"/>
|
||||
<gridItem id="BSP_CFG_CLKOUT_OUTPUT" selectedIndex="0"/>
|
||||
<gridItem id="BSP_CFG_SWINT_UNIT1_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_SWINT_UNIT2_ENABLE" selectedIndex="1"/>
|
||||
<gridItem id="BSP_CFG_SWINT_TASK_BUFFER_NUMBER" selectedIndex="8"/>
|
||||
<gridItem id="BSP_CFG_SWINT_IPR_INITIAL_VALUE" selectedIndex="1"/>
|
||||
</component>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
<source description="Components supporting Firmware Integration Technology" display="Firmware Integration Technology" id="com.renesas.smc.tools.swcomponent.fit.source"/>
|
||||
</configuration>
|
||||
</tool>
|
||||
</smc>
|
||||
@@ -0,0 +1,508 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration.1378385971">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration.1378385971" moduleId="org.eclipse.cdt.core.settings" name="HardwareDebug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.renesas.cdt.managedbuild.renesas.core.RenesasCompilerAssemblerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.renesas.cdt.managedbuild.core.buildRunnerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo">
|
||||
<option id="toolchain.id" value="Renesas_RXC"/>
|
||||
<option id="toolchain.version" value="v3.02.00"/>
|
||||
<option id="toolchain.enable" value="true"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="abs" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" description="Debug on hardware" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;com.renesas.cdt.managedbuild.renesas.core.RenesasCompilerAssemblerErrorParser;com.renesas.cdt.managedbuild.core.buildRunnerErrorParser" id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration.1378385971" name="HardwareDebug" parent="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration">
|
||||
<folderInfo id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration.1378385971." name="/" resourcePath="">
|
||||
<toolChain id="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.toolChain.1637393351" name="Renesas CCRX Toolchain" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.toolChain">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE" id="com.renesas.cdt.managedbuild.renesas.ccrx.base.targetPlatform.808325012" osList="win32" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/test}/HardwareDebug" id="com.renesas.cdt.managedbuild.renesas.ccrx.base.builder.65531188" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CCRX Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.builder"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.dsp.1710373085" name="DSP Assembler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.dsp">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.noDebugInfo.390598726" name="デバッグ情報を出力する (-no_debug_info)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.noDebugInfo" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian.2145260692" name="出力するデータ値のエンディアン (-littleEndianData)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian.big" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.common.385785132" name="Common" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.common">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.968417281" name="命令セット・アーキテクチャ (-isa)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.rxv3" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.rxArchitecture.1826562770" name="RX Architecture" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.rxArchitecture" useByScannerDiscovery="false" value="rxv3" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns.2015650112" name="浮動小数点演算命令を使用する (-fpu/-nofpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns.yes" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasFpu.1065149525" name="Has FPU" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasFpu" useByScannerDiscovery="false" value="TRUE" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceName.1439501151" name="Device Name" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceName" useByScannerDiscovery="false" value="R5F572NNHxFB" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceHistory.141103170" name="Device history" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceHistory" useByScannerDiscovery="false" value="non_init;R5F572NNHxFB" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isaHistory.13818145" name="ISA history" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isaHistory" useByScannerDiscovery="false" value="non_init;com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.rxv2" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceCommand.624156745" name="Device Command" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceCommand" useByScannerDiscovery="false" value="R5F565NE" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos.198501700" name="Check RTOS" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos" useByScannerDiscovery="false" value="unusedRtos" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp.898504242" name="Has DSP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp" useByScannerDiscovery="false" value="false" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily.2015079094" name="Device Family" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily" useByScannerDiscovery="false" value="RX72N" valueType="string"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler.220371913" name="Compiler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.1764475068" name="浮動小数点演算命令を使用する (-fpu/-nofpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.yes" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include.477145288" name="インクルード・ファイルを検索するフォルダ (-include)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${TCINSTALL}/include"/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/../common""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/../../../../../""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_config}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_cmt_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_cmt_rx/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_driver_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_driver_rx/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx/lib}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_ether_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_sys_time_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_sys_time_rx/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/general}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_pincfg}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.define.511269805" name="プリプロセッサ・マクロの定義 (-define)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.define" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="DEBUG_CONSOLE"/>
|
||||
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userBefore.165256012" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userAfter.850666858" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.897672730" name="Cソース (-lang)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.c99" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode.862144636" name="プログラムの文字コード (-euc/-sjis/-latin1/-utf8/-big5/-gb2312)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode.utf8" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode.48690443" name="出力する文字コード (-outcode)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode.utf8" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.optimize.1557621233" name="最適化レベル (-optimize)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.optimize" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.optimize.level2" valueType="enumerated"/>
|
||||
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType.1722484558" name="Compiler Input C" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType"/>
|
||||
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType.709788007" name="Compiler Input CPP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.assembler.1564576801" name="Assembler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.assembler">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userBefore.1555827005" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userAfter.912893655" name="追加するオプション(すべての指定オプションの後ろに追加) " superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode.864537553" name="プログラムの文字コード (-euc/-sjis/-latin1/-big5/-gb2312)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode.utf8" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.include.1616986135" name="インクルード・ファイルを検索するフォルダ (-include)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.include" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/general}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_pincfg}""/>
|
||||
</option>
|
||||
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType.502444415" name="Assembler InputType" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker.1333901009" name="Linker" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.rom.2020069967" name="ROMからRAMへマップするセクション (-rom)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.rom" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="D=R"/>
|
||||
<listOptionValue builtIn="false" value="D_1=R_1"/>
|
||||
<listOptionValue builtIn="false" value="D_2=R_2"/>
|
||||
<listOptionValue builtIn="false" value="D_8=R_8"/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection.2043161263" name="セクション (-start)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection" useByScannerDiscovery="false" value="SU,SI,B_1,R_1,B_2,R_2,B,R,B_8,R_8/04,B_ETHERNET_BUFFERS_1,B_RX_DESC_1,B_TX_DESC_1/020000,C_1,C_2,C,C_8,C$*,D*,W*,L,P*/0FFC00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userBefore.1452234640" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userAfter.1724535779" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.vect.47410515" name="可変ベクタテーブルのアドレス未設定ベクタ番号に指定するアドレス (-vect)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.vect" useByScannerDiscovery="false" value="_undefined_interrupt_source_isr" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.checkSection.239094904" name="セクションの割り付けアドレスをチェックする (-cpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.checkSection" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType.1942768497" name="アドレス範囲指定方法 (-cpu(アドレス範囲指定方法))" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType.autoSpecify" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList.1237940973" name="(リンク順序のリスト) (-input/-library/-binary)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="".\src\benchmark.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src\key_data.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/general\r_cg_hardware_setup.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/general\r_smc_cgc.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/general\r_smc_cgc_user.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/general\r_smc_interrupt.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/board/generic_rx65n\hwsetup.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/all\dbsct.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/all\lowlvl.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/all\lowsrc.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/all\mcu_locks.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/all\r_bsp_common.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/all\r_bsp_cpu.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/all\r_bsp_interrupts.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/all\r_bsp_locking.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/all\r_bsp_mcu_startup.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/all\r_bsp_software_interrupt.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/all\r_rx_intrinsic_functions.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/all\resetprg.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/all\sbrk.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/rx65n\mcu_clocks.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/rx65n\mcu_init.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/rx65n\mcu_interrupts.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/rx65n\mcu_mapped_interrupts.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_bsp/mcu/rx65n\vecttbl.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_cmt_rx/src\r_cmt_rx.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_ether_rx/src/phy\phy.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_ether_rx/src\r_ether_rx.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_ether_rx/src/targets/rx65n\r_ether_setting_rx65n.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_pincfg\Pin.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_pincfg\r_ether_rx_pinset.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_sys_time_rx/src\r_sys_time_rx.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_t4_driver_rx/src\ether_callback.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_t4_driver_rx/src\t4_driver.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_t4_driver_rx/src\timer.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_t4_rx/src\config_tcpudp.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function000.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function001.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function002.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function003.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function004.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function005.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function006.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function007.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function008.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function009.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function010.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function011.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function022.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function023.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function025.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function030.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function050.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function051.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function052.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function053.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function054.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function100.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function101.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function102.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function103.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function200.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function202.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function205.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function206.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_function207.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p00.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p01.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p02.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p03.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p04.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p05.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p06.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p07.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p08.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p0a.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p0b.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p0c.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p0d.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p0e.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p0f.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p10.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p14.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p18.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p1e.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p1f.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p20.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p21.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p22.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p23.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p26.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p29.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p2a.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p2b.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p2c.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p31.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p32.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p33.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p34.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p35.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p36.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p37.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p38.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p39.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p3a.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p3b.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p3c.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p3d.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p41.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p42.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p43.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p44.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p45.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p46.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p47.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p48.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p49.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p4a.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p4b.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p4c.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p4d.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p50.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p51.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p52.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p53.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p54.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p56.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p57.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p59.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p5a.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p5b.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p5c.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p5d.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p5e.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p60.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p62.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p63.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p6a.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p6b.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p71.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p72.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p73.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p74.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p75.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p76.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p77.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p78.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p80.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p95.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p96.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p97.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p98.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_p99.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pa0.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pa1.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pa2.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pa3.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pa4.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pa5.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pa6.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pd5.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pd9.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pda.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pdb.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pdf.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe0.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe1.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe2.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe3.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe4.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe5.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe6.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe7.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe8.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pe9.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pf0.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pf1.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pf3.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pf4.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_pfa.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_subprc01.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_subprc02.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_subprc03.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\r_tsip_rx_subprc04.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n/ip\s_flash.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_aes_rx.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_ecc_rx.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_kw_rx.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_md5_rx.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_rsa_rx.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_rx.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_rx_private.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_sha_rx.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_tdes_rx.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src/smc_gen/r_tsip_rx/src/targets/rx65n\r_tsip_tls_rx.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src\test.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src\test_main.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src\wolf_client.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src\wolf_server.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src\wolfssl_dummy.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\test.lib""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx/lib/ccrx/T4_Library_ether_ccrx_rxv1_little_debug.lib}""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/../wolfssl/Debug/wolfssl.lib""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.inputFile.1438206933" name="リンクするリロケータブル・ファイル、ライブラリ・ファイルおよびバイナリ・ファイル (-input/-library/-binary)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.inputFile" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx/lib/ccrx/T4_Library_ether_ccrx_rxv1_little_debug.lib}""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/../wolfssl/Debug/wolfssl.lib""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.librarian.1723543812" name="Library Generator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.librarian">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu.1397073307" name="浮動小数点演算命令を使用する (-fpu/-nofpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu.yes" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userBefore.1773409552" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userAfter.946493093" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang.338617005" name="C言語標準ライブラリ関数の構成 (-lang)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang.c99" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.headCtype.1293885198" name="ctype.h(C89/C99):文字操作用ライブラリ (-head=ctype)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.headCtype" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.converter.1917108303" name="Converter" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.converter">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userBefore.109845398" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userAfter.289006348" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig.318974000" name="RTOS Configurator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="ether" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.992474000">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.992474000" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.renesas.cdt.managedbuild.renesas.core.RenesasCompilerAssemblerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.renesas.cdt.managedbuild.core.buildRunnerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo">
|
||||
<option id="toolchain.id" value="Renesas_RXC"/>
|
||||
<option id="toolchain.version" value="v3.01.00"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="abs" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" description="Debug" id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.992474000" name="Debug" parent="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration">
|
||||
<folderInfo id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.992474000." name="/" resourcePath="">
|
||||
<toolChain id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.toolChain.1794956243" name="Renesas CCRX Toolchain" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.debug.toolChain">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE" id="com.renesas.cdt.managedbuild.renesas.ccrx.base.targetPlatform.617132481" osList="win32" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/test}/Debug" id="com.renesas.cdt.managedbuild.renesas.ccrx.base.builder.117543810" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CCRX Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.builder"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.dsp.1744140894" name="DSP Assembler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.dsp">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.noDebugInfo.1464228342" name="デバッグ情報を出力する (-no_debug_info)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.noDebugInfo" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian.733005442" name="出力するデータ値のエンディアン (-littleEndianData)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.endian.big" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.common.1294844059" name="Common" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.common">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.644795578" name="命令セット・アーキテクチャ (-isa)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.rxv2" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.rxArchitecture.1771586719" name="RX Architecture" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.rxArchitecture" useByScannerDiscovery="false" value="rxv2" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns.1045346284" name="浮動小数点演算命令を使用する (-fpu/-nofpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.floatIns.yes" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasFpu.229476184" name="Has FPU" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasFpu" useByScannerDiscovery="false" value="TRUE" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceName.748972653" name="Device Name" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceName" useByScannerDiscovery="false" value="R5F565NEHxFP" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceHistory.780008434" name="Device history" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceHistory" useByScannerDiscovery="false" value="non_init;R5F565NEHxFP" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isaHistory.783836823" name="ISA history" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isaHistory" useByScannerDiscovery="false" value="non_init;com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.rxv2" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceCommand.1221884092" name="Device Command" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceCommand" useByScannerDiscovery="false" value="R5F565NE" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos.1001057208" name="Check RTOS" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos" useByScannerDiscovery="false" value="unusedRtos" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp.963664750" name="Has DSP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp" useByScannerDiscovery="false" value="false" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily.1280023203" name="Device Family" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily" useByScannerDiscovery="false" value="RX65N" valueType="string"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler.278830907" name="Compiler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.2144484247" name="浮動小数点演算命令を使用する (-fpu/-nofpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.yes" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include.545347560" name="インクルード・ファイルを検索するフォルダ (-include)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${TCINSTALL}/include"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_bsp}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_config}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx/src/targets/rx231}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx/src/targets/rx66t}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_tsip_rx/src/targets/rx65n}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_cmt_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_cmt_rx/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_driver_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_driver_rx/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx/lib}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_ether_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_sys_time_rx}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_sys_time_rx/src}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/general}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_pincfg}""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.define.935611572" name="プリプロセッサ・マクロの定義 (-define)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.define" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="DEBUG_CONSOLE"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userBefore.878126292" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userAfter.443993930" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.47850385" name="Cソース (-lang)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.c99" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode.24533273" name="プログラムの文字コード (-euc/-sjis/-latin1/-utf8/-big5/-gb2312)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.inputCharCode.utf8" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode.542364588" name="出力する文字コード (-outcode)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.outcode.utf8" valueType="enumerated"/>
|
||||
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType.1919404628" name="Compiler Input C" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType"/>
|
||||
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType.293530100" name="Compiler Input CPP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.assembler.607581328" name="Assembler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.assembler">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userBefore.622904140" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userAfter.67379527" name="追加するオプション(すべての指定オプションの後ろに追加) " superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode.1186358257" name="プログラムの文字コード (-euc/-sjis/-latin1/-big5/-gb2312)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.characterCode.utf8" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.include.1360045103" name="インクルード・ファイルを検索するフォルダ (-include)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.option.include" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/general}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_pincfg}""/>
|
||||
</option>
|
||||
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType.1482916460" name="Assembler InputType" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker.1516159151" name="Linker" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.rom.1765662172" name="ROMからRAMへマップするセクション (-rom)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.rom" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="D=R"/>
|
||||
<listOptionValue builtIn="false" value="D_1=R_1"/>
|
||||
<listOptionValue builtIn="false" value="D_2=R_2"/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection.1046231838" name="セクション (-start)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection" useByScannerDiscovery="false" value="SU,SI,B_1,R_1,B_2,R_2,B,R/04,C_1,C_2,C,C$*,D*,W*,L,P*/0FFE00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC,B_ETHERNET_BUFFERS_1,B_RX_DESC_1,B_TX_DESC_1/00010000" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userBefore.1651005552" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userAfter.40118921" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.vect.1524833684" name="可変ベクタテーブルのアドレス未設定ベクタ番号に指定するアドレス (-vect)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.vect" useByScannerDiscovery="false" value="_undefined_interrupt_source_isr" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.checkSection.1914971075" name="セクションの割り付けアドレスをチェックする (-cpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.checkSection" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType.1670384649" name="アドレス範囲指定方法 (-cpu(アドレス範囲指定方法))" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.memoryType.autoSpecify" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList.1556433699" name="(リンク順序のリスト) (-input/-library/-binary)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="".\test.lib""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.inputFile.856176867" name="リンクするリロケータブル・ファイル、ライブラリ・ファイルおよびバイナリ・ファイル (-input/-library/-binary)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.inputFile" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/src/smc_gen/r_t4_rx/lib/T4_Library_rxv1_ether_little.lib}""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.librarian.1598250045" name="Library Generator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.librarian">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu.665362864" name="浮動小数点演算命令を使用する (-fpu/-nofpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu.yes" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userBefore.413642487" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userAfter.322853429" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang.1591825359" name="C言語標準ライブラリ関数の構成 (-lang)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.lang.c99" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.converter.175269062" name="Converter" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.converter">
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userBefore.1586351233" name="追加するオプション(すべての指定オプションの前に追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userBefore" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userAfter.900284814" name="追加するオプション(すべての指定オプションの後ろに追加)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.converter.option.userAfter" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value=""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig.1118615463" name="RTOS Configurator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="ether" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="test.com.renesas.cdt.managedbuild.renesas.ccrx.projectType.1611298680" name="実行可能" projectType="com.renesas.cdt.managedbuild.renesas.ccrx.projectType"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="HardwareDebug">
|
||||
<resource resourceType="PROJECT" workspacePath="/test"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/test"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
</cproject>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>test</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.renesas.cdt.managedbuild.renesas.misrachecker.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>src/benchmark.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>$%7BPARENT-5-PROJECT_LOC%7D/wolfcrypt/benchmark/benchmark.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/benchmark.h</name>
|
||||
<type>1</type>
|
||||
<locationURI>$%7BPARENT-5-PROJECT_LOC%7D/wolfcrypt/benchmark/benchmark.h</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/test.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/test/test.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfssl_dummy.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>$%7BPARENT-1-PROJECT_LOC%7D/common/wolfssl_dummy.c</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
<variableList>
|
||||
<variable>
|
||||
<name>copy_PARENT</name>
|
||||
<value>$%7BPARENT-3-ECLIPSE_HOME%7D/workspace/wolfssl</value>
|
||||
</variable>
|
||||
</variableList>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,126 @@
|
||||
/* key_data.c
|
||||
*
|
||||
* Copyright (C) 2006-2020 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#include "key_data.h"
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
TSIP v1.09
|
||||
--------------------------------------------------------------------------*/
|
||||
#if defined(WOLFSSL_RENESAS_TSIP_TLS) && (WOLFSSL_RENESAS_TSIP_VER >=109)
|
||||
|
||||
/* Key type of the encrypted user_public_key 0: RSA-2048 2: ECDSA-P256*/
|
||||
const uint32_t encrypted_user_key_type = 0;
|
||||
|
||||
const st_key_block_data_t g_key_block_data =
|
||||
{
|
||||
/* uint8_t encrypted_provisioning_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2]; */
|
||||
{
|
||||
0xD8, 0xB3, 0xA7, 0xDB, 0xD1, 0x5E, 0x44, 0x24, 0x00, 0xDA, 0xEB, 0xB3, 0x33, 0xE1, 0x49, 0xAF,
|
||||
0x4B, 0xAC, 0xC5, 0xF5, 0xC8, 0xD5, 0xAC, 0x12, 0x7F, 0xF7, 0x58, 0xAE, 0x59, 0xFE, 0xFB, 0x32
|
||||
},
|
||||
/* uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE]; */
|
||||
{
|
||||
0xF6, 0xA9, 0x83, 0x5A, 0xA1, 0x65, 0x1D, 0x28, 0xC8, 0x1A, 0xA6, 0x9D, 0x34, 0xB2, 0x4D, 0x92
|
||||
},
|
||||
/* uint8_t encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16]; */
|
||||
{
|
||||
0xC1, 0xB7, 0xCC, 0x99, 0x0A, 0xC8, 0x3E, 0xAB, 0x74, 0x35, 0x9D, 0x1C, 0x81, 0x32, 0x72, 0xA7,
|
||||
0xA8, 0x0D, 0xBA, 0x1B, 0x35, 0x42, 0x2F, 0x7B, 0xB4, 0x1C, 0x86, 0x81, 0xC4, 0xFA, 0xD9, 0x65,
|
||||
0xCE, 0x8A, 0x70, 0x1A, 0x28, 0x09, 0x72, 0xC0, 0x4F, 0x7A, 0x4A, 0xC7, 0xE6, 0x21, 0x65, 0x6E,
|
||||
0xEB, 0x11, 0x45, 0x23, 0x35, 0xC0, 0x0F, 0x1D, 0x48, 0xC6, 0x8A, 0x1C, 0x27, 0x70, 0xA6, 0x26,
|
||||
0xD0, 0x49, 0xCD, 0x42, 0x8D, 0x65, 0x2F, 0xFC, 0x32, 0x12, 0x6F, 0xE6, 0x61, 0xB6, 0x2F, 0xD9,
|
||||
0xA7, 0xC3, 0xB0, 0x3A, 0x4F, 0x58, 0xFD, 0x1E, 0x8E, 0xDE, 0x5C, 0xD4, 0xF3, 0x4E, 0xF7, 0x45,
|
||||
0x01, 0xDC, 0x39, 0x38, 0x15, 0x37, 0x8A, 0xFD, 0x59, 0x1A, 0x6C, 0x04, 0x55, 0x31, 0x56, 0x14,
|
||||
0x07, 0x71, 0x9A, 0x19, 0x81, 0x7F, 0x69, 0x88, 0xD7, 0xD5, 0xBE, 0xB4, 0x95, 0x83, 0xC5, 0x35,
|
||||
0xA8, 0xDE, 0x65, 0x5E, 0x95, 0xBB, 0xE3, 0x9C, 0x81, 0x4C, 0x8B, 0x18, 0x4C, 0xEA, 0x12, 0xEE,
|
||||
0xF3, 0x98, 0x68, 0x35, 0xC8, 0xA5, 0x69, 0x6F, 0x71, 0x8C, 0xAA, 0xB5, 0x3F, 0xF7, 0x3C, 0x10,
|
||||
0xC0, 0xD4, 0x46, 0x4D, 0xD0, 0x56, 0xDB, 0x7F, 0xC1, 0x52, 0xE0, 0x06, 0xD8, 0xB9, 0x5E, 0x41,
|
||||
0x43, 0x0E, 0xBB, 0xCD, 0x5C, 0x4D, 0x02, 0x37, 0xD1, 0xFD, 0x88, 0xCB, 0x49, 0xC3, 0x51, 0x0C,
|
||||
0x8A, 0x17, 0x71, 0xFE, 0x97, 0x8F, 0xF6, 0x65, 0xFC, 0xF8, 0xB4, 0xC2, 0x65, 0x4B, 0x5B, 0x74,
|
||||
0x4B, 0xFF, 0x35, 0xE9, 0x33, 0x3A, 0xBE, 0xDF, 0x23, 0x4F, 0xDB, 0x3F, 0x94, 0x6F, 0x34, 0x21,
|
||||
0x76, 0x14, 0xAF, 0x2B, 0x96, 0x62, 0xA5, 0x52, 0x80, 0xB9, 0x36, 0x7E, 0x25, 0xAF, 0xB6, 0x75,
|
||||
0xE5, 0x79, 0x8E, 0xE8, 0x67, 0xE4, 0xDD, 0x4B, 0x3D, 0xB2, 0x7F, 0xAF, 0x32, 0xC5, 0xF5, 0x1B,
|
||||
0x90, 0x0E, 0x41, 0x97, 0x5D, 0xFD, 0xC1, 0x9A, 0xA1, 0xF9, 0x57, 0xF1, 0x21, 0x94, 0xF9, 0x31,
|
||||
0xC9, 0xC7, 0x16, 0xAA, 0xD8, 0xE9, 0x78, 0x03, 0xAD, 0xEF, 0x3E, 0x98, 0x1F, 0x32, 0x3D, 0x8E
|
||||
},
|
||||
/* uint8_t encrypted_user_update_key[R_TSIP_AES256_KEY_BYTE_SIZE + 16]; */
|
||||
{
|
||||
0x70, 0xA8, 0xB5, 0x63, 0xE9, 0xC2, 0xA0, 0xFC, 0xE5, 0xA5, 0x4D, 0x94, 0x6E, 0x69, 0xE8, 0x94,
|
||||
0xAC, 0xE6, 0x68, 0x7C, 0xB2, 0xB9, 0xDC, 0xCF, 0x69, 0xBC, 0xE6, 0xB9, 0x8C, 0xDA, 0x72, 0x5C,
|
||||
0x62, 0xE9, 0xB9, 0xC1, 0xB4, 0xC7, 0x60, 0x21, 0xAE, 0x1B, 0x52, 0x25, 0x06, 0x8A, 0x91, 0xA1
|
||||
},
|
||||
|
||||
};
|
||||
/* ./ca-cert.der.sign, */
|
||||
const unsigned char ca_cert_sig[] =
|
||||
{
|
||||
0x04,0x1C,0x4C,0x29,0x93,0x38,0x78,0x72,0x32,0x55,0x90,0x4F,0xA7,0x43,0xC8,0x00,
|
||||
0x98,0x75,0xC8,0x62,0x37,0xEC,0x8F,0xAD,0x8F,0x98,0x04,0x5B,0xC9,0x50,0xD2,0xE3,
|
||||
0xC3,0x89,0x21,0xC7,0xF4,0x43,0x27,0xFB,0xC0,0x7A,0x17,0x45,0x5C,0x10,0x23,0x1B,
|
||||
0xC0,0x63,0x2F,0x61,0xE5,0xEE,0x0B,0x89,0xF2,0x6E,0x6B,0x49,0xFB,0xD4,0xB5,0x89,
|
||||
0xED,0xB4,0x7F,0x70,0xA0,0x68,0x44,0x6F,0xE6,0x15,0x0F,0x0C,0x78,0x9D,0x4C,0xBD,
|
||||
0x1C,0x24,0x50,0xAE,0xD2,0xB4,0x53,0xA5,0x7C,0x5F,0x5D,0x8C,0x8C,0x37,0xAB,0x72,
|
||||
0x61,0x83,0x39,0xDD,0x76,0x86,0xB4,0xEC,0xCF,0x57,0x35,0xC4,0x56,0x6B,0x45,0xCE,
|
||||
0x4C,0x06,0x35,0xBE,0xF2,0x95,0x5A,0x37,0x43,0x15,0x7F,0x42,0x3A,0xBA,0x90,0xE7,
|
||||
0x01,0x37,0x10,0x46,0x5B,0x65,0x7D,0x2F,0xAF,0x9F,0xCB,0xBB,0xFF,0x0D,0x5D,0xE0,
|
||||
0xCD,0xA8,0x09,0x62,0xCA,0x38,0x10,0x09,0x1B,0x81,0x2D,0xC2,0x3E,0x15,0x9E,0x36,
|
||||
0x6B,0x10,0xF9,0xD9,0x55,0xBF,0x93,0x79,0xC0,0x0D,0x74,0x31,0x83,0xA4,0xB9,0x66,
|
||||
0x30,0x6C,0xC9,0xA9,0xE6,0x93,0xF0,0x1D,0x61,0x18,0xBD,0x95,0xA5,0xB4,0x0F,0x69,
|
||||
0xCD,0xD7,0xA3,0x4A,0x74,0x8B,0xBE,0x2D,0x90,0xA5,0x49,0x69,0x9B,0x59,0x29,0x3A,
|
||||
0x4D,0x77,0xF0,0x4F,0x37,0x42,0x89,0x67,0xE2,0x62,0x91,0xC6,0x25,0xA6,0x2B,0x35,
|
||||
0x2C,0x59,0x60,0xB4,0xAF,0x9F,0xBF,0x43,0x4E,0x32,0x11,0xCE,0x8F,0x7A,0x4C,0xA4,
|
||||
0x26,0xBF,0x3A,0x35,0x70,0xD6,0x9F,0x0C,0x76,0xC8,0xCA,0x94,0xA0,0xD4,0x0B,0x2D
|
||||
};
|
||||
const int sizeof_ca_cert_sig = sizeof(ca_cert_sig);
|
||||
/* ./client-cert.der.sign, */
|
||||
const unsigned char client_cert_der_sign[] =
|
||||
{
|
||||
0x5D, 0x1F, 0x89, 0x41, 0xEC, 0x47, 0xC8, 0x90, 0x61, 0x79,
|
||||
0x8A, 0x16, 0x1F, 0x31, 0x96, 0x67, 0xD9, 0x3C, 0xEC, 0x6B,
|
||||
0x58, 0xC6, 0x5A, 0xED, 0x99, 0xB3, 0xEF, 0x27, 0x6F, 0x04,
|
||||
0x8C, 0xD9, 0x68, 0xB1, 0xD6, 0x23, 0x15, 0x84, 0x00, 0xE1,
|
||||
0x27, 0xD1, 0x1F, 0x68, 0xB7, 0x3F, 0x13, 0x53, 0x8A, 0x95,
|
||||
0x5A, 0x20, 0x7C, 0xB2, 0x76, 0x5B, 0xDC, 0xE0, 0xA6, 0x21,
|
||||
0x7C, 0x49, 0xCF, 0x93, 0xBA, 0xD5, 0x12, 0x9F, 0xEE, 0x90,
|
||||
0x5B, 0x3F, 0xA3, 0x9D, 0x13, 0x72, 0xAC, 0x72, 0x16, 0xFE,
|
||||
0x1D, 0xBE, 0xEB, 0x8E, 0xC7, 0xDC, 0xC4, 0xF8, 0x1A, 0xD8,
|
||||
0xA0, 0xA4, 0xF6, 0x04, 0x30, 0xF6, 0x7E, 0xB6, 0xC8, 0xE1,
|
||||
0xAB, 0x88, 0x37, 0x08, 0x63, 0x72, 0xAA, 0x46, 0xCC, 0xCA,
|
||||
0xF0, 0x9E, 0x02, 0x1E, 0x65, 0x67, 0xFF, 0x2C, 0x9D, 0x81,
|
||||
0x6C, 0x1E, 0xF1, 0x54, 0x05, 0x68, 0x68, 0x18, 0x72, 0x26,
|
||||
0x55, 0xB6, 0x2C, 0x95, 0xC0, 0xC9, 0xB2, 0xA7, 0x0B, 0x60,
|
||||
0xD7, 0xEB, 0x1D, 0x08, 0x1A, 0xA2, 0x54, 0x15, 0x89, 0xCB,
|
||||
0x83, 0x21, 0x5D, 0x15, 0x9B, 0x38, 0xAC, 0x89, 0x63, 0xD5,
|
||||
0x4B, 0xF4, 0x8B, 0x47, 0x93, 0x78, 0x43, 0xCB, 0x9B, 0x71,
|
||||
0xBF, 0x94, 0x76, 0xB5, 0xCE, 0x35, 0xA9, 0x1A, 0xD5, 0xA5,
|
||||
0xD8, 0x19, 0xA6, 0x04, 0x39, 0xB1, 0x09, 0x8C, 0x65, 0x02,
|
||||
0x58, 0x3A, 0x95, 0xEF, 0xA2, 0xC3, 0x85, 0x18, 0x61, 0x23,
|
||||
0x2D, 0xC5, 0xCD, 0x62, 0xC1, 0x19, 0x31, 0xE5, 0x36, 0x95,
|
||||
0x22, 0xDB, 0x3E, 0x1A, 0x3C, 0xE8, 0xC6, 0x2E, 0xDF, 0xD9,
|
||||
0x2F, 0x84, 0xC1, 0xF0, 0x38, 0x2B, 0xE5, 0x73, 0x35, 0x4F,
|
||||
0x05, 0xE2, 0xA5, 0x60, 0x79, 0xB0, 0x23, 0xDC, 0x56, 0x4C,
|
||||
0xE7, 0xD9, 0x1F, 0xCF, 0x6A, 0xFC, 0x55, 0xEB, 0xAA, 0x48,
|
||||
0x3E, 0x95, 0x2A, 0x10, 0x01, 0x05
|
||||
};
|
||||
const int sizeof_client_cert_der_sign = sizeof(client_cert_der_sign);
|
||||
|
||||
uint32_t s_inst1[R_TSIP_SINST_WORD_SIZE] = { 0 };
|
||||
uint32_t s_inst2[R_TSIP_SINST2_WORD_SIZE]= { 0 };
|
||||
#endif
|
||||
@@ -0,0 +1,54 @@
|
||||
/* key_data.h
|
||||
*
|
||||
* Copyright (C) 2006-2020 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef KEY_DATA_H_
|
||||
#define KEY_DATA_H_
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
|
||||
#include "r_tsip_rx_if.h"
|
||||
|
||||
typedef struct st_key_block_data
|
||||
{
|
||||
uint8_t encrypted_provisioning_key[R_TSIP_AES_CBC_IV_BYTE_SIZE * 2];
|
||||
uint8_t iv[R_TSIP_AES_CBC_IV_BYTE_SIZE];
|
||||
uint8_t encrypted_user_rsa2048_ne_key[R_TSIP_RSA2048_NE_KEY_BYTE_SIZE + 16];
|
||||
uint8_t encrypted_user_update_key[R_TSIP_AES256_KEY_BYTE_SIZE + 16];
|
||||
} st_key_block_data_t;
|
||||
|
||||
|
||||
extern const uint32_t encrypted_user_key_type;
|
||||
extern const st_key_block_data_t g_key_block_data;
|
||||
|
||||
extern const unsigned char ca_cert_sig[];
|
||||
extern const unsigned char ca_cert_der[];
|
||||
extern const unsigned char client_cert_der_sign[];
|
||||
extern const int sizeof_ca_cert_der;
|
||||
|
||||
|
||||
#endif /* (WOLFSSL_RENESAS_TSIP */
|
||||
#endif /* KEY_DATA_H_ */
|
||||
|
||||
@@ -0,0 +1,251 @@
|
||||
/* test_main.c
|
||||
*
|
||||
* Copyright (C) 2006-2020 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#include "stdio.h"
|
||||
#include "stdint.h"
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include "wolfssl/wolfcrypt/types.h"
|
||||
#include "wolfssl_demo.h"
|
||||
|
||||
void main(void);
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
void abort(void);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(TLS_CLIENT) || defined(TLS_SERVER)
|
||||
#include "r_t4_itcpip.h"
|
||||
#include "r_sys_time_rx_if.h"
|
||||
#include "Pin.h"
|
||||
|
||||
#define T4_WORK_SIZE (14800)
|
||||
static UW tcpudp_work[(T4_WORK_SIZE / 4) + 1];
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
#include "key_data.h"
|
||||
#include <wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h>
|
||||
|
||||
extern const st_key_block_data_t g_key_block_data;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
static long tick;
|
||||
static void timeTick(void *pdata)
|
||||
{
|
||||
tick++;
|
||||
}
|
||||
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
char** argv;
|
||||
int return_code;
|
||||
} func_args;
|
||||
|
||||
|
||||
void wolfcrypt_test(func_args args);
|
||||
int benchmark_test(void *args);
|
||||
|
||||
double current_time(int reset)
|
||||
{
|
||||
if(reset) tick = 0 ;
|
||||
return ((double)tick/FREQ) ;
|
||||
}
|
||||
|
||||
#if defined(TLS_CLIENT) || defined(TLS_SERVER)
|
||||
|
||||
int SetTsiptlsKey()
|
||||
{
|
||||
#if defined(WOLFSSL_RENESAS_TSIP) && (WOLFSSL_RENESAS_TSIP_VER >=109)
|
||||
|
||||
#if defined(TLS_CLIENT)
|
||||
|
||||
tsip_inform_cert_sign((const byte *)ca_cert_sig);
|
||||
tsip_inform_user_keys_ex(
|
||||
(byte*)&g_key_block_data.encrypted_provisioning_key,
|
||||
(byte*)&g_key_block_data.iv,
|
||||
(byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key,
|
||||
encrypted_user_key_type);
|
||||
|
||||
#elif defined(TLS_SERVER)
|
||||
|
||||
tsip_inform_cert_sign((const byte *)client_cert_der_sign);
|
||||
tsip_inform_user_keys_ex(
|
||||
(byte*)&g_key_block_data.encrypted_provisioning_key,
|
||||
(byte*)&g_key_block_data.iv,
|
||||
(byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key,
|
||||
encrypted_user_key_type);
|
||||
|
||||
#endif
|
||||
|
||||
#elif defined(WOLFSSL_RENESAS_TSIP) && (WOLFSSL_RENESAS_TSIP_VER >=106)
|
||||
|
||||
#if defined(TLS_CLIENT)
|
||||
|
||||
tsip_inform_cert_sign((const byte *)ca_cert_sig);
|
||||
tsip_inform_user_keys((byte*)&g_key_block_data.encrypted_session_key,
|
||||
(byte*)&g_key_block_data.iv,
|
||||
(byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key);
|
||||
|
||||
#elif defined(TLS_SERVER)
|
||||
|
||||
tsip_inform_cert_sign((const byte *)client_cert_der_sign);
|
||||
tsip_inform_user_keys((byte*)&g_key_block_data.encrypted_session_key,
|
||||
(byte*)&g_key_block_data.iv,
|
||||
(byte*)&g_key_block_data.encrypted_user_rsa2048_ne_key);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Open_tcp( )
|
||||
{
|
||||
ER ercd;
|
||||
W size;
|
||||
sys_time_err_t sys_ercd;
|
||||
char ver[128];
|
||||
|
||||
/* cast from uint8_t to char* */
|
||||
strcpy(ver, (char*)R_t4_version.library);
|
||||
|
||||
sys_ercd = R_SYS_TIME_Open();
|
||||
if (sys_ercd != SYS_TIME_SUCCESS) {
|
||||
printf("ERROR : R_SYS_TIME_Open() failed\n");
|
||||
return -1;
|
||||
}
|
||||
R_Pins_Create();
|
||||
/* start LAN controller */
|
||||
ercd = lan_open();
|
||||
/* initialize TCP/IP */
|
||||
size = tcpudp_get_ramsize();
|
||||
if (size > (sizeof(tcpudp_work))) {
|
||||
printf("size > (sizeof(tcpudp_work))!\n");
|
||||
return -1;
|
||||
}
|
||||
ercd = tcpudp_open(tcpudp_work);
|
||||
if (ercd != E_OK) {
|
||||
printf("ERROR : tcpudp_open failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Close_tcp()
|
||||
{
|
||||
/* end TCP/IP */
|
||||
tcpudp_close();
|
||||
lan_close();
|
||||
R_SYS_TIME_Close();
|
||||
}
|
||||
#endif
|
||||
|
||||
void main(void)
|
||||
{
|
||||
(void)timeTick;
|
||||
|
||||
#if defined(CRYPT_TEST) || defined(BENCHMARK)
|
||||
#if defined(CRYPT_TEST)
|
||||
int ret;
|
||||
func_args args = { 0 };
|
||||
|
||||
if ((ret = wolfCrypt_Init()) != 0) {
|
||||
printf("wolfCrypt_Init failed %d\n", ret);
|
||||
}
|
||||
|
||||
printf("Start wolfCrypt Test\n");
|
||||
wolfcrypt_test(args);
|
||||
printf("End wolfCrypt Test\n");
|
||||
|
||||
if ((ret = wolfCrypt_Cleanup()) != 0) {
|
||||
printf("wolfCrypt_Cleanup failed %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
#if defined(BENCHMARK)
|
||||
#include "r_cmt_rx_if.h"
|
||||
|
||||
uint32_t channel;
|
||||
R_CMT_CreatePeriodic(FREQ, &timeTick, &channel);
|
||||
|
||||
printf("Start wolfCrypt Benchmark\n");
|
||||
benchmark_test(NULL);
|
||||
printf("End wolfCrypt Benchmark\n");
|
||||
#endif
|
||||
#elif defined(TLS_CLIENT)
|
||||
#include "r_cmt_rx_if.h"
|
||||
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
const char* cipherlist[] = {
|
||||
|
||||
"AES128-SHA",
|
||||
"AES128-SHA256",
|
||||
"AES256-SHA",
|
||||
"AES256-SHA256"
|
||||
};
|
||||
const int cipherlist_sz = 4;
|
||||
#else
|
||||
const char* cipherlist[] = { NULL };
|
||||
const int cipherlist_sz = 0;
|
||||
|
||||
#endif
|
||||
int i = 0;
|
||||
|
||||
Open_tcp();
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
SetTsiptlsKey();
|
||||
#endif
|
||||
|
||||
do {
|
||||
if(cipherlist_sz > 0 ) printf("cipher : %s\n", cipherlist[i]);
|
||||
|
||||
wolfSSL_TLS_client_init(cipherlist[i]);
|
||||
|
||||
wolfSSL_TLS_client();
|
||||
|
||||
i++;
|
||||
} while (i < cipherlist_sz);
|
||||
|
||||
Close_tcp();
|
||||
#elif defined(TLS_SERVER)
|
||||
|
||||
Open_tcp();
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
SetTsiptlsKey();
|
||||
#endif
|
||||
|
||||
wolfSSL_TLS_server_init();
|
||||
wolfSSL_TLS_server();
|
||||
|
||||
Close_tcp();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
void abort(void)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,212 @@
|
||||
/* wolf_client.c
|
||||
*
|
||||
* Copyright (C) 2006-2020 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "r_t4_itcpip.h"
|
||||
#include "wolfssl/wolfcrypt/settings.h"
|
||||
#include "wolfssl/ssl.h"
|
||||
#include "wolfssl/certs_test.h"
|
||||
#include "key_data.h"
|
||||
#include "wolfssl_demo.h"
|
||||
|
||||
|
||||
#define SIMPLE_TLSSEVER_IP "192.168.1.3"
|
||||
#define SIMPLE_TLSSERVER_PORT "11111"
|
||||
|
||||
ER t4_tcp_callback(ID cepid, FN fncd , VP p_parblk);
|
||||
uint32_t g_encrypted_root_public_key[140];
|
||||
|
||||
static WOLFSSL_CTX *client_ctx;
|
||||
|
||||
|
||||
static int my_IORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
ID cepid;
|
||||
|
||||
if(ctx != NULL)
|
||||
cepid = *(ID *)ctx;
|
||||
else
|
||||
return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
|
||||
ret = tcp_rcv_dat(cepid, buff, sz, TMO_FEVR);
|
||||
if(ret > 0)
|
||||
return ret;
|
||||
else
|
||||
return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
}
|
||||
|
||||
static int my_IOSend(WOLFSSL* ssl, char* buff, int sz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
ID cepid;
|
||||
|
||||
if(ctx != NULL)
|
||||
cepid = *(ID *)ctx;
|
||||
else
|
||||
return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
|
||||
ret = tcp_snd_dat(cepid, buff, sz, TMO_FEVR);
|
||||
if(ret == sz)
|
||||
return ret;
|
||||
else
|
||||
return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
}
|
||||
|
||||
static int getIPaddr(char *arg)
|
||||
{
|
||||
int a1, a2, a3, a4;
|
||||
if(sscanf(arg, "%d.%d.%d.%d", &a1, &a2, &a3, &a4) == 4)
|
||||
return (a1 << 24) | (a2 << 16) | (a3 << 8) | a4;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
static int getPort(char *arg)
|
||||
{
|
||||
int port;
|
||||
if(sscanf(arg, "%d", &port) == 1)
|
||||
return port;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
void wolfSSL_TLS_client_init(const char* cipherlist)
|
||||
{
|
||||
|
||||
#ifndef NO_FILESYSTEM
|
||||
#ifdef USE_ECC_CERT
|
||||
char *cert = "./certs/ca-ecc-cert.pem";
|
||||
#else
|
||||
char *cert = "./certs/ca-cert.pem";
|
||||
#endif
|
||||
#else
|
||||
#ifdef USE_ECC_CERT
|
||||
const unsigned char *cert = ca_ecc_der_256;
|
||||
#define SIZEOF_CERT sizeof_ca_ecc_der_256
|
||||
#else
|
||||
const unsigned char *cert = ca_cert_der_2048;
|
||||
#define SIZEOF_CERT sizeof_ca_cert_der_2048
|
||||
#endif
|
||||
#endif
|
||||
|
||||
wolfSSL_Init();
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
/* Create and initialize WOLFSSL_CTX */
|
||||
if ((client_ctx = wolfSSL_CTX_new(wolfTLSv1_2_client_method_ex((void *)NULL))) == NULL) {
|
||||
printf("ERROR: failed to create WOLFSSL_CTX\n");
|
||||
return;
|
||||
}
|
||||
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
if (wolfSSL_CTX_load_verify_locations(client_ctx, cert, 0) != SSL_SUCCESS) {
|
||||
printf("ERROR: can't load \"%s\"\n", cert);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
if (wolfSSL_CTX_load_verify_buffer(client_ctx, cert, SIZEOF_CERT, SSL_FILETYPE_ASN1) != SSL_SUCCESS){
|
||||
printf("ERROR: can't load certificate data\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Register callbacks */
|
||||
wolfSSL_SetIORecv(client_ctx, my_IORecv);
|
||||
wolfSSL_SetIOSend(client_ctx, my_IOSend);
|
||||
|
||||
/* use specific cipher */
|
||||
if (cipherlist != NULL && wolfSSL_CTX_set_cipher_list(client_ctx, cipherlist) != WOLFSSL_SUCCESS) {
|
||||
wolfSSL_CTX_free(client_ctx); client_ctx = NULL;
|
||||
printf("client can't set cipher list 1");
|
||||
}
|
||||
}
|
||||
|
||||
void wolfSSL_TLS_client( )
|
||||
{
|
||||
ID cepid = 1;
|
||||
ER ercd;
|
||||
int ret;
|
||||
WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)client_ctx;
|
||||
WOLFSSL *ssl;
|
||||
|
||||
#define BUFF_SIZE 256
|
||||
static const char sendBuff[]= "Hello Server\n" ;
|
||||
|
||||
char rcvBuff[BUFF_SIZE] = {0};
|
||||
|
||||
static T_IPV4EP my_addr = { 0, 0 };
|
||||
|
||||
T_IPV4EP dst_addr;
|
||||
|
||||
if((dst_addr.ipaddr = getIPaddr(SIMPLE_TLSSEVER_IP)) == 0){
|
||||
printf("ERROR: IP address\n");
|
||||
return;
|
||||
}
|
||||
if((dst_addr.portno = getPort(SIMPLE_TLSSERVER_PORT)) == 0){
|
||||
printf("ERROR: IP address\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if((ercd = tcp_con_cep(cepid, &my_addr, &dst_addr, TMO_FEVR)) != E_OK) {
|
||||
printf("ERROR TCP Connect: %d\n", ercd);
|
||||
return;
|
||||
}
|
||||
|
||||
if((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
printf("ERROR wolfSSL_new: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
/* set callback context */
|
||||
wolfSSL_SetIOReadCtx(ssl, (void *)&cepid);
|
||||
wolfSSL_SetIOWriteCtx(ssl, (void *)&cepid);
|
||||
|
||||
|
||||
if(wolfSSL_connect(ssl) != SSL_SUCCESS) {
|
||||
printf("ERROR SSL connect: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
if (wolfSSL_write(ssl, sendBuff, strlen(sendBuff)) != strlen(sendBuff)) {
|
||||
printf("ERROR SSL write: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
if ((ret=wolfSSL_read(ssl, rcvBuff, BUFF_SIZE)) < 0) {
|
||||
printf("ERROR SSL read: %d\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
rcvBuff[ret] = '\0' ;
|
||||
printf("Received: %s\n\n", rcvBuff);
|
||||
|
||||
/* frees all data before client termination */
|
||||
wolfSSL_free(ssl);
|
||||
wolfSSL_CTX_free(ctx);
|
||||
wolfSSL_Cleanup();
|
||||
|
||||
tcp_sht_cep(cepid);
|
||||
tcp_cls_cep(cepid, TMO_FEVR);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
/* wolf_server.c
|
||||
*
|
||||
* Copyright (C) 2006-2020 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "r_t4_itcpip.h"
|
||||
|
||||
#include "wolfssl/wolfcrypt/settings.h"
|
||||
#include "wolfssl/ssl.h"
|
||||
#include "wolfssl/certs_test.h"
|
||||
#include "wolfssl_demo.h"
|
||||
|
||||
static WOLFSSL_CTX *server_ctx;
|
||||
static byte doCliCertCheck;
|
||||
|
||||
static int my_IORecv(WOLFSSL* ssl, char* buff, int sz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
ID cepid;
|
||||
|
||||
if(ctx != NULL)
|
||||
cepid = *(ID *)ctx;
|
||||
else
|
||||
return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
|
||||
ret = tcp_rcv_dat(cepid, buff, sz, TMO_FEVR);
|
||||
if(ret == sz)
|
||||
return ret;
|
||||
else
|
||||
return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
}
|
||||
|
||||
static int my_IOSend(WOLFSSL* ssl, char* buff, int sz, void* ctx)
|
||||
{
|
||||
int ret;
|
||||
ID cepid;
|
||||
|
||||
if(ctx != NULL)
|
||||
cepid = *(ID *)ctx;
|
||||
else
|
||||
return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
|
||||
ret = tcp_snd_dat(cepid, buff, sz, TMO_FEVR);
|
||||
if(ret == sz)
|
||||
return ret;
|
||||
else
|
||||
return WOLFSSL_CBIO_ERR_GENERAL;
|
||||
}
|
||||
|
||||
|
||||
void wolfSSL_TLS_server_init(byte doClientCheck)
|
||||
{
|
||||
|
||||
int ret;
|
||||
|
||||
|
||||
#ifndef NO_FILESYSTEM
|
||||
#ifdef USE_ECC_CERT
|
||||
char *cert = "./certs/server-ecc-cert.pem";
|
||||
char *key = "./certs/server-ecc-key.pem";
|
||||
#else
|
||||
char *cert = "./certs/server-cert.pem";
|
||||
char *key = "./certs/server-key.pem";
|
||||
#endif
|
||||
char *clientCert = "./certs/client-cert.pem";
|
||||
#else
|
||||
#ifdef USE_ECC_CERT
|
||||
char *cert = serv_ecc_der_256;
|
||||
int sizeof_cert = sizeof_serv_ecc_der_256;
|
||||
char *cert = serv_ecc_key_der_256;
|
||||
int sizeof_key = sizeof_serv_ecc_key_der_256;
|
||||
#else
|
||||
const unsigned char *cert = server_cert_der_2048;
|
||||
#define sizeof_cert sizeof_server_cert_der_2048
|
||||
const unsigned char *key = server_key_der_2048;
|
||||
#define sizeof_key sizeof_server_key_der_2048
|
||||
const unsigned char *clientCert = client_cert_der_2048;
|
||||
#define sizeof_clicert sizeof_client_cert_der_2048
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
wolfSSL_Init();
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
|
||||
/* Create and initialize WOLFSSL_CTX */
|
||||
if ((server_ctx = wolfSSL_CTX_new(wolfSSLv23_server_method_ex((void *)NULL)))
|
||||
== NULL) {
|
||||
printf("ERROR: failed to create WOLFSSL_CTX\n");
|
||||
return;
|
||||
}
|
||||
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
ret = wolfSSL_CTX_use_certificate_file(server_ctx, cert, 0);
|
||||
#else
|
||||
ret = wolfSSL_CTX_use_certificate_buffer(server_ctx, cert,
|
||||
sizeof_cert, SSL_FILETYPE_ASN1);
|
||||
#endif
|
||||
if (ret != SSL_SUCCESS) {
|
||||
printf("Error %d loading server-cert!\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Load server key into WOLFSSL_CTX */
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
ret = wolfSSL_CTX_use_PrivateKey_file(server_ctx, key, 0);
|
||||
#else
|
||||
ret = wolfSSL_CTX_use_PrivateKey_buffer(server_ctx, key, sizeof_key,
|
||||
SSL_FILETYPE_ASN1);
|
||||
#endif
|
||||
if (ret != SSL_SUCCESS) {
|
||||
printf("Error %d loading server-key!\n", ret);
|
||||
return;
|
||||
}
|
||||
#if defined(WOLFSSL_RENESAS_TSIP)
|
||||
doCliCertCheck = 1;
|
||||
#endif
|
||||
if (doCliCertCheck) {
|
||||
wolfSSL_CTX_set_verify(server_ctx, WOLFSSL_VERIFY_PEER |
|
||||
WOLFSSL_VERIFY_FAIL_IF_NO_PEER_CERT, 0);
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
if (wolfSSL_CTX_load_verify_locations(server_ctx, clientCert, 0)
|
||||
!= WOLFSSL_SUCCESS)
|
||||
#else
|
||||
if (wolfSSL_CTX_load_verify_buffer(server_ctx, clientCert,
|
||||
sizeof_clicert,
|
||||
SSL_FILETYPE_ASN1) != SSL_SUCCESS)
|
||||
#endif
|
||||
printf("can't load ca file, Please run from wolfSSL home dir\n");
|
||||
}
|
||||
|
||||
/* Register callbacks */
|
||||
wolfSSL_SetIORecv(server_ctx, my_IORecv);
|
||||
wolfSSL_SetIOSend(server_ctx, my_IOSend);
|
||||
|
||||
}
|
||||
|
||||
void wolfSSL_TLS_server( )
|
||||
{
|
||||
ID cepid = 1;
|
||||
ID repid = 1;
|
||||
ER ercd;
|
||||
WOLFSSL_CTX *ctx = (WOLFSSL_CTX *)server_ctx;
|
||||
|
||||
WOLFSSL *ssl;
|
||||
int len;
|
||||
#define BUFF_SIZE 256
|
||||
char buff[BUFF_SIZE];
|
||||
T_IPV4EP dst_addr = {0, 0};
|
||||
|
||||
if((ercd = tcp_acp_cep(cepid, repid, &dst_addr, TMO_FEVR)) != E_OK) {
|
||||
printf("ERROR TCP Accept: %d\n", ercd);
|
||||
return;
|
||||
}
|
||||
|
||||
if((ssl = wolfSSL_new(ctx)) == NULL) {
|
||||
printf("ERROR: failed wolfSSL_new\n");
|
||||
return;
|
||||
}
|
||||
|
||||
wolfSSL_SetIOReadCtx(ssl, (void *)&cepid);
|
||||
wolfSSL_SetIOWriteCtx(ssl, (void *)&cepid);
|
||||
|
||||
if (wolfSSL_accept(ssl) < 0) {
|
||||
printf("ERROR: SSL Accept(%d)\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
if ((len = wolfSSL_read(ssl, buff, sizeof(buff) - 1)) < 0) {
|
||||
printf("ERROR: SSL Read(%d)\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
buff[len] = '\0';
|
||||
printf("Received: %s\n", buff);
|
||||
|
||||
if (wolfSSL_write(ssl, buff, len) != len) {
|
||||
printf("ERROR: SSL Write(%d)\n", wolfSSL_get_error(ssl, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
wolfSSL_free(ssl);
|
||||
tcp_sht_cep(cepid);
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/* wolfssl_demo.h
|
||||
*
|
||||
* Copyright (C) 2006-2020 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifndef WOLFSSL_DEMO_H_
|
||||
#define WOLFSSL_DEMO_H_
|
||||
|
||||
#define FREQ 10000 /* Hz */
|
||||
|
||||
/* Enable wolfcrypt test */
|
||||
/* can be enabled with benchmark test */
|
||||
/* #define CRYPT_TEST */
|
||||
|
||||
/* Enable benchmark */
|
||||
/* can be enabled with cyrpt test */
|
||||
/* #define BENCHMARK*/
|
||||
|
||||
/* Enable TLS client */
|
||||
/* cannot enable with other definition */
|
||||
/* #define TLS_CLIENT*/
|
||||
|
||||
/* Enable TLS server */
|
||||
/* cannot enable with other definition */
|
||||
/* #define TLS_SERVER */
|
||||
|
||||
void wolfSSL_TLS_client_init();
|
||||
void wolfSSL_TLS_client();
|
||||
void wolfSSL_TLS_server_init();
|
||||
void wolfSSL_TLS_server();
|
||||
|
||||
#endif /* WOLFSSL_DEMO_H_ */
|
||||
@@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.renesas.cdt.launch.dsf.gdbremote.launchConfigurationType">
|
||||
<stringAttribute key="com.renesas.cdt.core.additionalServerArgs" value=""/>
|
||||
<stringAttribute key="com.renesas.cdt.core.initCommands" value=""/>
|
||||
<stringAttribute key="com.renesas.cdt.core.ipAddress" value="localhost"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.jtagDevice" value="E2 Lite (RX)"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.jtagDeviceId" value="com.renesas.hardwaredebug.rx.e2"/>
|
||||
<listAttribute key="com.renesas.cdt.core.listGDBExe">
|
||||
<listEntry value="rx-elf-gdb -rx-force-isa=v3 -rx-force-double-fpu"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="com.renesas.cdt.core.listGDBLaunchName">
|
||||
<listEntry value="main"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="com.renesas.cdt.core.listGDBPort">
|
||||
<listEntry value="61234"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="com.renesas.cdt.core.optionInitCommands" value="monitor set_internal_mem_overwrite 0-645 "/>
|
||||
<intAttribute key="com.renesas.cdt.core.portNumber" value="61234"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.runCommands" value=""/>
|
||||
<stringAttribute key="com.renesas.cdt.core.secondGDBExe" value="green_dsp-elf-gdb"/>
|
||||
<booleanAttribute key="com.renesas.cdt.core.secondGDBSupport" value="false"/>
|
||||
<intAttribute key="com.renesas.cdt.core.secondGdbPortNumber" value="61237"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.serverParam" value="-g E2LITE -t R5F572NN -uClockSrcHoco= 0 -uInputClock= 16.0000 -uAllowClockSourceInternal= 1 -uUseFine= 1 -uFineBaudRate= 1.50 -w 0 -z 0 -uRegisterSetting= 0 -uModePin= 0 -uChangeStartupBank= 0 -uStartupBank= 0 -uDebugMode= 0 -uExecuteProgram= 0 -uIdCode= FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -uresetOnReload= 1 -n 0 -uWorkRamAddress= 1000 -uProgReWriteIRom= 0 -uProgReWriteDFlash= 0 -uhookWorkRamAddr= 0x7fb40 -uhookWorkRamSize= 0x4c0"/>
|
||||
<booleanAttribute key="com.renesas.cdt.core.startServer" value="true"/>
|
||||
<stringAttribute key="com.renesas.cdt.core.targetDevice" value="R5F572NN"/>
|
||||
<booleanAttribute key="com.renesas.cdt.core.useRemoteTarget" value="true"/>
|
||||
<booleanAttribute key="com.renesas.cdt.core.verboseMode" value="false"/>
|
||||
<stringAttribute key="com.renesas.cdt.debug.ioview.dsf.registerSelection0" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <selectedRegisterList ioFilePath="F:\Work\Renesas\e2studio\DebugComp\RX\Iofiles\RX72N.sfrx"/> "/>
|
||||
<stringAttribute key="com.renesas.cdt.launch.dsf.IO_MAP" value="${support_area_loc}"/>
|
||||
<booleanAttribute key="com.renesas.cdt.launch.dsf.USE_DEFAULT_IO_MAP" value="true"/>
|
||||
<listAttribute key="com.renesas.cdt.launch.dsf.downloadImages">
|
||||
<listEntry value="|true|true|true|0|true|No core"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="com.renesas.cdt.launch.dsf.downloadImagesUpgradedV30" value="true"/>
|
||||
<stringAttribute key="com.renesas.cdt.launch.dsf.launchSeqType" value="com.renesas.cdt.launch.dsf.launchSequence.e2GdbServer"/>
|
||||
<stringAttribute key="com.renesas.cdt.launch.dsf.serverPath" value="${renesas.support.targetLoc:rx-debug}\e2-server-gdb"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.allow.change.startup_bank" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.allow.clock.source.internal" value="true"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.e1.clock_source" value="0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.connection.mode" value="0"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.e1_pwr" value="true"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.enable.hot.plug" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.execute.program" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.external_memory" value=""/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.fine.baud.rate" value="2.00"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.flash_overwrite_blocks" value="0-581"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.hook_Stop_func" value="0x0"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.hook_enable_Stop" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.hook_enable_start" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.hook_start_func" value="0x0"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.e1.hook_work_ram_Addr" value="261584"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.e1.hook_work_ram_Size" value="560"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.id_code" value="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.inputclock" value="12.0000"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.jtag.clock.freq" value="16.5"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.jtag.or.fine" value="1"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.le" value="true"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.mode" value="0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.mode_pin" value="0"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.prog_rewrite_dflash" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.e1.prog_rewrite_irom" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.serial_number" value=""/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.startup_bank" value="0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.e1.supply.voltage" value="3.3V"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.e1.timer_clock" value="0"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.e1.work_ram_start" value="4096"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.allow.clock.source.internal" value="true"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.ez.clock_source" value="1"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.connection.mode" value="0"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.enable.hot.plug" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.execute.program" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.external_memory" value=""/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.fine.baud.rate" value="1.00"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.flash_overwrite_blocks" value="0-31"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.hook_Stop_func" value="0x0"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.hook_enable_Stop" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.hook_enable_start" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.hook_start_func" value="0x0"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.ez.hook_work_ram_Addr" value="9680"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.ez.hook_work_ram_Size" value="560"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.id_code" value="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.inputclock" value="22.0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.jtag.clock.freq" value="16.5"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.jtag.or.fine" value="1"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.le" value="true"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.mode" value="0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.mode_pin" value="0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.power.voltage" value="0.0000"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.prog_rewrite_dflash" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.ez.prog_rewrite_irom" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.ez.serial_number" value=""/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.ez.timer_clock" value="0"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.ez.work_ram_start" value="4096"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.e1.E1DebugToolSettingsTree.resetAfterReload" value="true"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2.E2LiteDebugToolSettingsTree.resetAfterReload" value="true"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.allow.change.startup_bank" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.allow.clock.source.internal" value="true"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.rx.e2lite.clock_source" value="0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.connection.mode" value="0"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.e2lite_pwr" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.enable.hot.plug" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.execute.program" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.external_memory" value=""/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.fine.baud.rate" value="1.50"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.flash_overwrite_blocks" value="0-645"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.hook_Stop_func" value="0x0"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.hook_enable_Stop" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.hook_enable_start" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.hook_start_func" value="0x0"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.rx.e2lite.hook_work_ram_Addr" value="523072"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.rx.e2lite.hook_work_ram_Size" value="1216"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.id_code" value="FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.inputclock" value="16.0000"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.jtag.clock.freq" value="6.00"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.jtag.or.fine" value="1"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.le" value="true"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.mode" value="0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.mode_pin" value="0"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.prog_rewrite_dflash" value="false"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.e2lite.prog_rewrite_irom" value="false"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.serial_number" value=""/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.startup_bank" value="0"/>
|
||||
<stringAttribute key="com.renesas.hardwaredebug.rx.e2lite.supply.voltage" value="3.3"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.rx.e2lite.timer_clock" value="0"/>
|
||||
<intAttribute key="com.renesas.hardwaredebug.rx.e2lite.work_ram_start" value="4096"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.rx.ez.EzDebugToolSettingsTree.resetAfterReload" value="true"/>
|
||||
<booleanAttribute key="com.renesas.hardwaredebug.timemeasurement" value="true"/>
|
||||
<intAttribute key="org.eclipse.cdt.debug.gdbjtag.core.delay" value="3"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doHalt" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.doReset" value="false"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageFileName" value="F:\Work\RX72NEnvisionKit\IDE\Renesas\e2studio\RX72NEnvisionKit\test\HardwareDebug\test.x"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.imageOffset" value="0"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.initCommands" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadImage" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.loadSymbols" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.pcRegister" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.runCommands" value=""/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setPcRegister" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setResume" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.setStopAt" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.stopAt" value="main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsFileName" value="F:\Work\RX72NEnvisionKit\IDE\Renesas\e2studio\RX72NEnvisionKit\test\HardwareDebug\test.x"/>
|
||||
<stringAttribute key="org.eclipse.cdt.debug.gdbjtag.core.symbolsOffset" value="0"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForImage" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useFileForSymbols" value="false"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForImage" value="true"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.debug.gdbjtag.core.useProjBinaryForSymbols" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="rx-elf-gdb -rx-force-isa=v3 -rx-force-double-fpu"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.dsf.gdb.NON_STOP" value="true"/>
|
||||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="remote"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="HardwareDebug/test.x"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="test"/>
|
||||
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.renesas.cdt.managedbuild.renesas.ccrx.hardwaredebug.configuration.1378385971"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/test"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList context="reserved-for-future-use"/> "/>
|
||||
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
|
||||
</launchConfiguration>
|
||||
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.13311124">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.13311124" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.renesas.cdt.managedbuild.renesas.core.RenesasCompilerAssemblerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="com.renesas.cdt.managedbuild.core.buildRunnerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="com.renesas.cdt.managedbuild.core.toolchainInfo">
|
||||
<option id="toolchain.id" value="Renesas_RXC"/>
|
||||
<option id="toolchain.version" value="v3.02.00"/>
|
||||
<option id="toolchain.enable" value="true"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="lib" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" description="Debug" id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.13311124" name="Debug" parent="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration">
|
||||
<folderInfo id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.configuration.13311124." name="/" resourcePath="">
|
||||
<toolChain id="com.renesas.cdt.managedbuild.renesas.ccrx.debug.toolChain.279048774" name="Renesas CCRX Toolchain" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.debug.toolChain">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.PE" id="com.renesas.cdt.managedbuild.renesas.ccrx.base.targetPlatform.174341512" osList="win32" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/wolfssl}/Debug" id="com.renesas.cdt.managedbuild.renesas.ccrx.base.builder.1547537924" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CCRX Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.builder"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.dsp.1555184586" name="DSP Assembler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.dsp">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.noDebugInfo.317830941" name="デバッグ情報を出力する (-no_debug_info)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.dsp.option.noDebugInfo" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.common.566285610" name="Common" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.common">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.789156168" name="命令セット・アーキテクチャ (-isa)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.isa.rxv2" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasFpu.1416683217" name="Has FPU" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasFpu" useByScannerDiscovery="false" value="TRUE" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceName.738625467" name="Device Name" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceName" useByScannerDiscovery="false" value="R5F572NNHxFB" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceCommand.806008705" name="Device Command" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceCommand" useByScannerDiscovery="false" value="R5F572NN" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos.313687436" name="Check RTOS" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.checkRtos" useByScannerDiscovery="false" value="unusedRtos" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp.963524125" name="Has DSP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.hasDsp" useByScannerDiscovery="false" value="false" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily.664031971" name="Device Family" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceFamily" useByScannerDiscovery="false" value="RX72N" valueType="string"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceHistory.1128940076" name="Device history" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.common.option.deviceHistory" useByScannerDiscovery="false" value="non_init;R5F572NNHxFB" valueType="string"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler.958103973" name="Compiler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.compiler">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.1276851320" name="浮動小数点演算命令を使用する (-fpu/-nofpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.fpu.yes" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include.1381248206" name="インクルード・ファイルを検索するフォルダ (-include)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.include" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="${ProjDirPath}/../common"/>
|
||||
<listOptionValue builtIn="false" value="${ProjDirPath}//../../../../../"/>
|
||||
<listOptionValue builtIn="false" value="${TCINSTALL}/include"/>
|
||||
<listOptionValue builtIn="false" value="${ProjDirPath}/../test/src/smc_gen/"/>
|
||||
<listOptionValue builtIn="false" value="${ProjDirPath}/../test/src/smc_gen/r_bsp"/>
|
||||
<listOptionValue builtIn="false" value="${ProjDirPath}/../test/src/smc_gen/r_config"/>
|
||||
<listOptionValue builtIn="false" value="${ProjDirPath}/../test/src/smc_gen/r_tsip_rx"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.define.687020263" name="プリプロセッサ・マクロの定義 (-define)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.define" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="WOLFSSL_USER_SETTINGS"/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.1494793389" name="Cソース (-lang)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.langFileC.c99" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.optimize.573554071" name="最適化レベル (-optimize)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.optimize" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.option.optimize.level2" valueType="enumerated"/>
|
||||
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType.971510512" name="Compiler Input C" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gcc.inputType"/>
|
||||
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType.948214383" name="Compiler Input CPP" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.compiler.gpp.inputType"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.assembler.1769723979" name="Assembler" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.assembler">
|
||||
<inputType id="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType.328050806" name="Assembler InputType" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.assembler.inputType"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker.945835579" name="Linker" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.linker">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.typeOfOutputFileOption.139100472" name="出力ファイル形式 (-form)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.typeOfOutputFileOption" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.typeOfOutputFileOption.userLibrary" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.rom.177476365" name="ROMからRAMへマップするセクション (-rom)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.rom" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="D=R"/>
|
||||
<listOptionValue builtIn="false" value="D_1=R_1"/>
|
||||
<listOptionValue builtIn="false" value="D_2=R_2"/>
|
||||
</option>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection.1739258398" name="セクション (-start)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.linkerSection" useByScannerDiscovery="false" value="SU,SI,B_1,R_1,B_2,R_2,B,R/04,PResetPRG,C_1,C_2,C,C$*,D*,W*,L,PIntPRG,P/0FFC00000,EXCEPTVECT/0FFFFFF80,RESETVECT/0FFFFFFFC" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList.1344120748" name="(リンク順序のリスト) (-input/-library/-binary)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.linker.option.noneLinkageOrderList" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="".\src\sample3.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src\sample1.obj""/>
|
||||
<listOptionValue builtIn="false" value="".\src\sample2.obj""/>
|
||||
</option>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.librarian.1901868731" name="Library Generator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.librarian">
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu.1987941672" name="浮動小数点演算命令を使用する (-fpu/-nofpu)" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.fpu.yes" valueType="enumerated"/>
|
||||
<option id="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.mode.820377223" name="標準ライブラリを生成する条件" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.mode" useByScannerDiscovery="false" value="com.renesas.cdt.managedbuild.renesas.ccrx.librarian.option.mode.donotAddLibrary" valueType="enumerated"/>
|
||||
</tool>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.converter.620355579" name="Converter" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.converter"/>
|
||||
<tool id="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig.1798199560" name="RTOS Configurator" superClass="com.renesas.cdt.managedbuild.renesas.ccrx.base.rtosConfig"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="wolfssl.com.renesas.cdt.managedbuild.renesas.ccrx.projectType.1748882159" name="実行可能" projectType="com.renesas.cdt.managedbuild.renesas.ccrx.projectType"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/wolfssl"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
@@ -0,0 +1,393 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>wolfssl</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>src/crl.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/crl.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/internal.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/internal.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/keys.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/keys.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/ocsp.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/ocsp.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/sniffer.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/sniffer.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/ssl.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/ssl.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/tls.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/tls.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/tls13.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/tls13.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>src/wolfio.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/src/wolfio.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/port/renesas_tsip_aes.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_aes.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/port/renesas_tsip_sha.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_sha.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/port/renesas_tsip_util.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/port/Renesas/renesas_tsip_util.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/aes.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/aes.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/arc4.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/arc4.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/asm.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/asm.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/asn.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/asn.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/blake2b.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/blake2b.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/camellia.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/camellia.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/chacha.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/chacha.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/chacha20_poly1305.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/chacha20_poly1305.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/cmac.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/cmac.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/coding.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/coding.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/compress.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/compress.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/cpuid.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/cpuid.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/cryptocb.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/cryptocb.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/curve25519.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/curve25519.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/des3.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/des3.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/dh.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/dh.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/dsa.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/dsa.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/ecc.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/ecc.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/ecc_fp.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/ecc_fp.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/ed25519.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/ed25519.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/error.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/error.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/fe_low_mem.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/fe_low_mem.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/fe_operations.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/fe_operations.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/ge_low_mem.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/ge_low_mem.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/ge_operations.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/ge_operations.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/hash.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/hash.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/hc128.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/hc128.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/hmac.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/hmac.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/idea.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/idea.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/include.am</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/include.am</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/integer.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/integer.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/logging.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/logging.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/md2.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/md2.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/md4.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/md4.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/md5.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/md5.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/memory.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/memory.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/pkcs12.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/pkcs12.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/pkcs7.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/pkcs7.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/poly1305.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/poly1305.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/pwdbased.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/pwdbased.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/rabbit.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/rabbit.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/random.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/random.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/ripemd.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/ripemd.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/rsa.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/rsa.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/sha.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sha.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/sha256.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sha256.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/sha3.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sha3.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/sha512.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sha512.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/signature.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/signature.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/sp_arm32.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_arm32.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/sp_arm64.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_arm64.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/sp_c32.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_c32.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/sp_c64.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_c64.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/sp_int.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_int.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/sp_x86_64.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/sp_x86_64.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/srp.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/srp.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/tfm.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/tfm.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/wc_encrypt.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/wc_encrypt.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/wc_port.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/wc_port.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/wolfevent.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/wolfevent.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>wolfcrypt/src/wolfmath.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-5-PROJECT_LOC/wolfcrypt/src/wolfmath.c</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
Executable → Regular
@@ -10,7 +10,6 @@
|
||||
52114C8721B5A7320022ADA1 /* sp_c64.c in Sources */ = {isa = PBXBuildFile; fileRef = 52114C8621B5A7320022ADA1 /* sp_c64.c */; };
|
||||
A46FE16F2493E8F800A25BE7 /* armv8-chacha.c in Sources */ = {isa = PBXBuildFile; fileRef = A46FE14C2493E8F500A25BE7 /* armv8-chacha.c */; };
|
||||
A46FE1702493E8F800A25BE7 /* sp_int.c in Sources */ = {isa = PBXBuildFile; fileRef = A46FE14D2493E8F600A25BE7 /* sp_int.c */; };
|
||||
A46FE1732493E8F800A25BE7 /* armv8-poly1305.c in Sources */ = {isa = PBXBuildFile; fileRef = A46FE1502493E8F600A25BE7 /* armv8-poly1305.c */; };
|
||||
A46FE1742493E8F800A25BE7 /* sp_cortexm.c in Sources */ = {isa = PBXBuildFile; fileRef = A46FE1512493E8F600A25BE7 /* sp_cortexm.c */; };
|
||||
A46FE1752493E8F800A25BE7 /* blake2s.c in Sources */ = {isa = PBXBuildFile; fileRef = A46FE1522493E8F600A25BE7 /* blake2s.c */; };
|
||||
A46FE1772493E8F800A25BE7 /* wc_pkcs11.c in Sources */ = {isa = PBXBuildFile; fileRef = A46FE1542493E8F600A25BE7 /* wc_pkcs11.c */; };
|
||||
@@ -95,17 +94,20 @@
|
||||
A4ADF9281FCE0C5600A06E90 /* ecc.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8CC1FCE0C5500A06E90 /* ecc.c */; };
|
||||
A4ADF92A1FCE0C5600A06E90 /* coding.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8CE1FCE0C5500A06E90 /* coding.c */; };
|
||||
A4ADF92C1FCE0C5600A06E90 /* ge_low_mem.c in Sources */ = {isa = PBXBuildFile; fileRef = A4ADF8D01FCE0C5500A06E90 /* ge_low_mem.c */; };
|
||||
A4CA2EA324C8AF97003CCC50 /* armv8-sha512.c in Sources */ = {isa = PBXBuildFile; fileRef = A4CA2E9E24C8AF97003CCC50 /* armv8-sha512.c */; };
|
||||
A4DFEC0D1FD4CAA300A7BB33 /* benchmark.c in Sources */ = {isa = PBXBuildFile; fileRef = A4DFEC0C1FD4CAA300A7BB33 /* benchmark.c */; };
|
||||
A4DFEC101FD4CB8500A7BB33 /* armv8-sha256.c in Sources */ = {isa = PBXBuildFile; fileRef = A4DFEC0E1FD4CB8500A7BB33 /* armv8-sha256.c */; };
|
||||
A4DFEC111FD4CB8500A7BB33 /* armv8-aes.c in Sources */ = {isa = PBXBuildFile; fileRef = A4DFEC0F1FD4CB8500A7BB33 /* armv8-aes.c */; };
|
||||
A4DFEC3C1FD6B9CC00A7BB33 /* test.c in Sources */ = {isa = PBXBuildFile; fileRef = A4DFEC3B1FD6B9CC00A7BB33 /* test.c */; };
|
||||
CB81DE1D24C9284700B98DA6 /* armv8-poly1305.c in Sources */ = {isa = PBXBuildFile; fileRef = CB81DE1C24C9284700B98DA6 /* armv8-poly1305.c */; };
|
||||
CB81DE1F24C93EC000B98DA6 /* armv8-curve25519.S in Sources */ = {isa = PBXBuildFile; fileRef = CB81DE1E24C93EC000B98DA6 /* armv8-curve25519.S */; };
|
||||
CB81DE2324C93FB300B98DA6 /* armv8-sha512-asm.S in Sources */ = {isa = PBXBuildFile; fileRef = CB81DE2224C93FB300B98DA6 /* armv8-sha512-asm.S */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
52114C8621B5A7320022ADA1 /* sp_c64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sp_c64.c; path = ../../../wolfcrypt/src/sp_c64.c; sourceTree = "<group>"; };
|
||||
A46FE14C2493E8F500A25BE7 /* armv8-chacha.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "armv8-chacha.c"; path = "../../../wolfcrypt/src/port/arm/armv8-chacha.c"; sourceTree = "<group>"; };
|
||||
A46FE14D2493E8F600A25BE7 /* sp_int.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sp_int.c; path = ../../../wolfcrypt/src/sp_int.c; sourceTree = "<group>"; };
|
||||
A46FE1502493E8F600A25BE7 /* armv8-poly1305.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "armv8-poly1305.c"; path = "../../../wolfcrypt/src/port/arm/armv8-poly1305.c"; sourceTree = "<group>"; };
|
||||
A46FE1512493E8F600A25BE7 /* sp_cortexm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sp_cortexm.c; path = ../../../wolfcrypt/src/sp_cortexm.c; sourceTree = "<group>"; };
|
||||
A46FE1522493E8F600A25BE7 /* blake2s.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = blake2s.c; path = ../../../wolfcrypt/src/blake2s.c; sourceTree = "<group>"; };
|
||||
A46FE1542493E8F600A25BE7 /* wc_pkcs11.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wc_pkcs11.c; path = ../../../wolfcrypt/src/wc_pkcs11.c; sourceTree = "<group>"; };
|
||||
@@ -195,10 +197,14 @@
|
||||
A4ADF8CC1FCE0C5500A06E90 /* ecc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ecc.c; path = ../../../wolfcrypt/src/ecc.c; sourceTree = "<group>"; };
|
||||
A4ADF8CE1FCE0C5500A06E90 /* coding.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = coding.c; path = ../../../wolfcrypt/src/coding.c; sourceTree = "<group>"; };
|
||||
A4ADF8D01FCE0C5500A06E90 /* ge_low_mem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ge_low_mem.c; path = ../../../wolfcrypt/src/ge_low_mem.c; sourceTree = "<group>"; };
|
||||
A4CA2E9E24C8AF97003CCC50 /* armv8-sha512.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "armv8-sha512.c"; path = "../../../wolfcrypt/src/port/arm/armv8-sha512.c"; sourceTree = "<group>"; };
|
||||
A4DFEC0C1FD4CAA300A7BB33 /* benchmark.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = benchmark.c; path = ../../../wolfcrypt/benchmark/benchmark.c; sourceTree = "<group>"; };
|
||||
A4DFEC0E1FD4CB8500A7BB33 /* armv8-sha256.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "armv8-sha256.c"; path = "../../../wolfcrypt/src/port/arm/armv8-sha256.c"; sourceTree = "<group>"; };
|
||||
A4DFEC0F1FD4CB8500A7BB33 /* armv8-aes.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "armv8-aes.c"; path = "../../../wolfcrypt/src/port/arm/armv8-aes.c"; sourceTree = "<group>"; };
|
||||
A4DFEC3B1FD6B9CC00A7BB33 /* test.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = test.c; path = ../../../wolfcrypt/test/test.c; sourceTree = "<group>"; };
|
||||
CB81DE1C24C9284700B98DA6 /* armv8-poly1305.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "armv8-poly1305.c"; path = "../../../wolfcrypt/src/port/arm/armv8-poly1305.c"; sourceTree = "<group>"; };
|
||||
CB81DE1E24C93EC000B98DA6 /* armv8-curve25519.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = "armv8-curve25519.S"; path = "../../../wolfcrypt/src/port/arm/armv8-curve25519.S"; sourceTree = "<group>"; };
|
||||
CB81DE2224C93FB300B98DA6 /* armv8-sha512-asm.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = "armv8-sha512-asm.S"; path = "../../../wolfcrypt/src/port/arm/armv8-sha512-asm.S"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -273,8 +279,11 @@
|
||||
A4ADF8921FCE0C4E00A06E90 /* arc4.c */,
|
||||
A4DFEC0F1FD4CB8500A7BB33 /* armv8-aes.c */,
|
||||
A46FE14C2493E8F500A25BE7 /* armv8-chacha.c */,
|
||||
A46FE1502493E8F600A25BE7 /* armv8-poly1305.c */,
|
||||
CB81DE1E24C93EC000B98DA6 /* armv8-curve25519.S */,
|
||||
CB81DE1C24C9284700B98DA6 /* armv8-poly1305.c */,
|
||||
A4DFEC0E1FD4CB8500A7BB33 /* armv8-sha256.c */,
|
||||
A4CA2E9E24C8AF97003CCC50 /* armv8-sha512.c */,
|
||||
CB81DE2224C93FB300B98DA6 /* armv8-sha512-asm.S */,
|
||||
A4ADF8A01FCE0C4F00A06E90 /* asm.c */,
|
||||
A4ADF8C21FCE0C5300A06E90 /* asn.c */,
|
||||
A4ADF8B11FCE0C5100A06E90 /* blake2b.c */,
|
||||
@@ -434,6 +443,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
CB81DE2324C93FB300B98DA6 /* armv8-sha512-asm.S in Sources */,
|
||||
A4ADF9041FCE0C5600A06E90 /* des3.c in Sources */,
|
||||
A46FE18A2493E8F800A25BE7 /* ge_448.c in Sources */,
|
||||
A4ADF9121FCE0C5600A06E90 /* wc_port.c in Sources */,
|
||||
@@ -458,6 +468,8 @@
|
||||
A4ADF90D1FCE0C5600A06E90 /* blake2b.c in Sources */,
|
||||
A4ADF9071FCE0C5600A06E90 /* dh.c in Sources */,
|
||||
A46FE1912493E8F800A25BE7 /* sp_c32.c in Sources */,
|
||||
CB81DE1D24C9284700B98DA6 /* armv8-poly1305.c in Sources */,
|
||||
CB81DE1F24C93EC000B98DA6 /* armv8-curve25519.S in Sources */,
|
||||
A4ADF8F31FCE0C5600A06E90 /* rsa.c in Sources */,
|
||||
A46FE1752493E8F800A25BE7 /* blake2s.c in Sources */,
|
||||
A4ADF8FA1FCE0C5600A06E90 /* pkcs12.c in Sources */,
|
||||
@@ -498,7 +510,6 @@
|
||||
A4ADF9051FCE0C5600A06E90 /* cmac.c in Sources */,
|
||||
52114C8721B5A7320022ADA1 /* sp_c64.c in Sources */,
|
||||
A4ADF8F41FCE0C5600A06E90 /* pkcs7.c in Sources */,
|
||||
A46FE1732493E8F800A25BE7 /* armv8-poly1305.c in Sources */,
|
||||
A4ADF90B1FCE0C5600A06E90 /* logging.c in Sources */,
|
||||
A4ADF8E01FCE0C5600A06E90 /* ecc_fp.c in Sources */,
|
||||
A4ADF8EB1FCE0C5600A06E90 /* chacha20_poly1305.c in Sources */,
|
||||
@@ -522,6 +533,7 @@
|
||||
A4ADF8D71FCE0C5600A06E90 /* wolfevent.c in Sources */,
|
||||
A46FE1802493E8F800A25BE7 /* ed448.c in Sources */,
|
||||
A4DFEC0D1FD4CAA300A7BB33 /* benchmark.c in Sources */,
|
||||
A4CA2EA324C8AF97003CCC50 /* armv8-sha512.c in Sources */,
|
||||
A4ADF91D1FCE0C5600A06E90 /* cpuid.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -671,10 +683,10 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = 2S2PAGNS5B;
|
||||
DEVELOPMENT_TEAM = TJKX238PPD;
|
||||
INFOPLIST_FILE = wolfBench/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.wolfSSL.wolfBench;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.wolfSSL.wolfBench-ios";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
@@ -685,10 +697,10 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = 2S2PAGNS5B;
|
||||
DEVELOPMENT_TEAM = TJKX238PPD;
|
||||
INFOPLIST_FILE = wolfBench/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.wolfSSL.wolfBench;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.wolfSSL.wolfBench-ios";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
|
||||
@@ -56,7 +56,9 @@
|
||||
#define HAVE_CHACHA
|
||||
|
||||
#define HAVE_CURVE25519
|
||||
#define HAVE_ED25519
|
||||
#ifndef WOLFSSL_ARMASM
|
||||
#define HAVE_ED25519
|
||||
#endif
|
||||
|
||||
/* TLS extensions */
|
||||
#define HAVE_ONE_TIME_AUTH
|
||||
|
||||
@@ -26,6 +26,7 @@ include IDE/Renesas/cs+/Projects/include.am
|
||||
include IDE/Renesas/e2studio/Projects/include.am
|
||||
include IDE/Renesas/e2studio/RA6M3/include.am
|
||||
include IDE/Renesas/e2studio/GR-ROSE/include.am
|
||||
include IDE/Renesas/e2studio/RX72NEnvisionKit/include.am
|
||||
include IDE/WICED-STUDIO/include.am
|
||||
include IDE/CRYPTOCELL/include.am
|
||||
include IDE/M68K/include.am
|
||||
|
||||
+2
-1
@@ -118,7 +118,8 @@ CLEANFILES+= cert.der \
|
||||
pkcs7signedEncryptedCompressedFirmwarePkgData_ECDSA_SHA256.der \
|
||||
pkcs7signedEncryptedCompressedFirmwarePkgData_ECDSA_SHA256_noattr.der \
|
||||
pkcs7signedEncryptedCompressedFirmwarePkgData_RSA_SHA256.der \
|
||||
pkcs7signedEncryptedCompressedFirmwarePkgData_RSA_SHA256_noattr.der
|
||||
pkcs7signedEncryptedCompressedFirmwarePkgData_RSA_SHA256_noattr.der \
|
||||
tests/test-log-dump-to-file.txt
|
||||
|
||||
exampledir = $(docdir)/example
|
||||
dist_example_DATA=
|
||||
|
||||
@@ -108,6 +108,7 @@ include certs/ed25519/include.am
|
||||
include certs/ed448/include.am
|
||||
include certs/external/include.am
|
||||
include certs/ocsp/include.am
|
||||
include certs/statickeys/include.am
|
||||
include certs/test/include.am
|
||||
include certs/test-pathlen/include.am
|
||||
include certs/intermediate/include.am
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
-----BEGIN DH PARAMETERS-----
|
||||
MIIBCAKCAQEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz
|
||||
+8yTnc4kmz75fS/jY2MMddj2gbICrsRhetPfHtXV/WVhJDP1H18GbtCFY2VVPe0a
|
||||
87VXE15/V8k1mE8McODmi3fipona8+/och3xWKE2rec1MKzKT0g6eXq8CrGCsyT7
|
||||
YdEIqUuyyOP7uWrat2DX9GgdT0Kj3jlN9K5W7edjcrsZCwenyO4KbXCeAvzhzffi
|
||||
7MA0BM0oNC9hkXL+nOmFg/+OTxIy7vKBg8P+OxtMb61zO7X8vC7CIAXFjvGDfRaD
|
||||
ssbzSibBsu/6iGtCOGEoXJf//////////wIBAg==
|
||||
-----END DH PARAMETERS-----
|
||||
Binary file not shown.
@@ -0,0 +1,9 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIIBPwIBADCCARcGCSqGSIb3DQEDATCCAQgCggEBAP//////////rfhUWKK7Spqv
|
||||
3FYgJz088di5xYPOLTaVqeE2QRRkM/vMk53OJJs++X0v42NjDHXY9oGyAq7EYXrT
|
||||
3x7V1f1lYSQz9R9fBm7QhWNlVT3tGvO1VxNef1fJNZhPDHDg5ot34qaJ2vPv6HId
|
||||
8VihNq3nNTCsyk9IOnl6vAqxgrMk+2HRCKlLssjj+7lq2rdg1/RoHU9Co945TfSu
|
||||
Vu3nY3K7GQsHp8juCm1wngL84c334uzANATNKDQvYZFy/pzphYP/jk8SMu7ygYPD
|
||||
/jsbTG+tczu1/LwuwiAFxY7xg30Wg7LG80omwbLv+ohrQjhhKFyX//////////8C
|
||||
AQIEHwIdXPuG9/pRAnlxnsApmAPPPmVG9jS4sMFVOvfIQ7g=
|
||||
-----END PRIVATE KEY-----
|
||||
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
-----BEGIN EC PRIVATE KEY-----
|
||||
MHcCAQEEINNrxmh23tiXlfbZji9Bc1P4A1ftkIAZ66pKkYqPMWNFoAoGCCqGSM49
|
||||
AwEHoUQDQgAEWKCAfFHs3UFfk6h6YEdH6c9aQOTdN+zKpxAcQ9roc4wo9cnsGjML
|
||||
Ji6XgC7guAGRFrTMAhi1Hcy6PO0EyaiSNw==
|
||||
-----END EC PRIVATE KEY-----
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# run from wolfssl root
|
||||
|
||||
# SECP256R1
|
||||
openssl ecparam -name secp256r1 -genkey -noout -out certs/statickeys/ecc-secp256r1.pem -noout
|
||||
openssl ec -inform pem -in certs/statickeys/ecc-secp256r1.pem -outform der -out certs/statickeys/ecc-secp256r1.der
|
||||
|
||||
# DH 2048-bit (keySz = 29)
|
||||
# Using one generated and capture with wolfSSL using wc_DhGenerateKeyPair (openssl generates DH keys with 2048-bits... based on the DH "p" prime size)
|
||||
#openssl genpkey -paramfile certs/statickeys/dh-ffdhe2048-params.pem -out certs/statickeys/dh-ffdhe2048.der
|
||||
openssl pkey -inform der -in certs/statickeys/dh-ffdhe2048.der -outform pem -out certs/statickeys/dh-ffdhe2048.pem
|
||||
@@ -0,0 +1,17 @@
|
||||
# vim:ft=automake
|
||||
# All paths should be given relative to the root
|
||||
#
|
||||
|
||||
EXTRA_DIST += \
|
||||
certs/statickeys/gen-static.sh
|
||||
|
||||
# ECC
|
||||
EXTRA_DIST += \
|
||||
certs/statickeys/ecc-secp256r1.der \
|
||||
certs/statickeys/ecc-secp256r1.pem
|
||||
|
||||
# DH FFDHE Groups
|
||||
EXTRA_DIST += \
|
||||
certs/statickeys/dh-ffdhe2048-params.pem \
|
||||
certs/statickeys/dh-ffdhe2048.der \
|
||||
certs/statickeys/dh-ffdhe2048.pem
|
||||
+34
-16
@@ -889,7 +889,7 @@ fi
|
||||
ENABLED_SNIFFTEST=no
|
||||
AS_IF([ test "x$ENABLED_SNIFFER" = "xyes" ],
|
||||
[
|
||||
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SNIFFER"
|
||||
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SNIFFER -DWOLFSSL_STATIC_EPHEMERAL"
|
||||
AC_CHECK_HEADERS([pcap/pcap.h],
|
||||
[ ENABLED_SNIFFTEST=yes ],
|
||||
[ AC_MSG_WARN([cannot enable sniffer test without having libpcap available.]) ]
|
||||
@@ -1545,13 +1545,18 @@ then
|
||||
ENABLED_ECC="yes"
|
||||
fi
|
||||
|
||||
if test "$ENABLED_ECC" = "yes"
|
||||
if test "$ENABLED_ECC" != "no"
|
||||
then
|
||||
AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC -DTFM_ECC256"
|
||||
if test "$ENABLED_ECC_SHAMIR" = "yes" && test "$ENABLED_LOWRESOURCE" = "no"
|
||||
then
|
||||
AM_CFLAGS="$AM_CFLAGS -DECC_SHAMIR"
|
||||
fi
|
||||
|
||||
if test "$ENABLED_ECC" = "nonblock"
|
||||
then
|
||||
AM_CFLAGS="$AM_CFLAGS -DWC_ECC_NONBLOCK"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -3206,7 +3211,7 @@ then
|
||||
ENABLED_ENCRYPT_THEN_MAC=yes
|
||||
AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI -DHAVE_MAX_FRAGMENT -DHAVE_TRUNCATED_HMAC -DHAVE_ALPN -DHAVE_TRUSTED_CA"
|
||||
# Check the ECC supported curves prereq
|
||||
AS_IF([test "x$ENABLED_ECC" = "xyes" || test "x$ENABLED_CURVE25519" = "xyes" || test "x$ENABLED_TLS13" = "xyes"],
|
||||
AS_IF([test "x$ENABLED_ECC" != "xno" || test "x$ENABLED_CURVE25519" = "xyes" || test "x$ENABLED_TLS13" = "xyes"],
|
||||
[ENABLED_SUPPORTED_CURVES=yes
|
||||
AM_CFLAGS="$AM_CFLAGS -DHAVE_SUPPORTED_CURVES"])
|
||||
fi
|
||||
@@ -3762,7 +3767,7 @@ then
|
||||
AM_CFLAGS="$AM_CFLAGS -DHAVE_TLS_EXTENSIONS -DHAVE_SNI -DHAVE_MAX_FRAGMENT -DHAVE_TRUNCATED_HMAC"
|
||||
|
||||
# Check the ECC supported curves prereq
|
||||
AS_IF([test "x$ENABLED_ECC" = "xyes" || test "x$ENABLED_CURVE25519" = "xyes"],
|
||||
AS_IF([test "x$ENABLED_ECC" != "xno" || test "x$ENABLED_CURVE25519" = "xyes"],
|
||||
[ENABLED_SUPPORTED_CURVES=yes
|
||||
AM_CFLAGS="$AM_CFLAGS -DHAVE_SUPPORTED_CURVES"])
|
||||
fi
|
||||
@@ -3905,7 +3910,7 @@ then
|
||||
AC_MSG_ERROR([please enable psk if disabling asn.])
|
||||
fi
|
||||
|
||||
if test "x$ENABLED_ECC" = "xyes" && test "x$ENABLED_ASN" = "xno"
|
||||
if test "x$ENABLED_ECC" != "xno" && test "x$ENABLED_ASN" = "xno"
|
||||
then
|
||||
AC_MSG_ERROR([please disable ecc if disabling asn.])
|
||||
fi
|
||||
@@ -4251,6 +4256,7 @@ ENABLED_SP_ECC=no
|
||||
ENABLED_SP_EC_256=no
|
||||
ENABLED_SP_EC_384=no
|
||||
ENABLED_SP_NO_MALLOC=no
|
||||
ENABLED_SP_NONBLOCK=no
|
||||
for v in `echo $ENABLED_SP | tr "," " "`
|
||||
do
|
||||
case $v in
|
||||
@@ -4267,6 +4273,7 @@ do
|
||||
ENABLED_SP_EC_384=yes
|
||||
fi
|
||||
;;
|
||||
|
||||
yes)
|
||||
ENABLED_SP_RSA=yes
|
||||
ENABLED_SP_DH=yes
|
||||
@@ -4279,6 +4286,7 @@ do
|
||||
ENABLED_SP_EC_384=yes
|
||||
fi
|
||||
;;
|
||||
|
||||
no)
|
||||
;;
|
||||
|
||||
@@ -4312,7 +4320,6 @@ do
|
||||
ENABLED_SP_DH=yes
|
||||
ENABLED_SP_FF_2048=yes
|
||||
;;
|
||||
|
||||
smallrsa2048)
|
||||
ENABLED_SP_SMALL=yes
|
||||
ENABLED_SP_RSA=yes
|
||||
@@ -4334,7 +4341,6 @@ do
|
||||
ENABLED_SP_DH=yes
|
||||
ENABLED_SP_FF_3072=yes
|
||||
;;
|
||||
|
||||
smallrsa3072)
|
||||
ENABLED_SP_SMALL=yes
|
||||
ENABLED_SP_RSA=yes
|
||||
@@ -4351,19 +4357,16 @@ do
|
||||
ENABLED_SP_DH=yes
|
||||
ENABLED_SP_FF_4096=yes
|
||||
;;
|
||||
|
||||
4096 | +4096)
|
||||
ENABLED_SP_RSA=yes
|
||||
ENABLED_SP_DH=yes
|
||||
ENABLED_SP_FF_4096=yes
|
||||
;;
|
||||
|
||||
smallrsa4096)
|
||||
ENABLED_SP_SMALL=yes
|
||||
ENABLED_SP_RSA=yes
|
||||
ENABLED_SP_FF_4096=yes
|
||||
;;
|
||||
|
||||
rsa4096)
|
||||
ENABLED_SP_RSA=yes
|
||||
ENABLED_SP_FF_4096=yes
|
||||
@@ -4373,6 +4376,13 @@ do
|
||||
ENABLED_SP_NO_MALLOC=yes
|
||||
;;
|
||||
|
||||
nonblock)
|
||||
# Requires small and no malloc
|
||||
ENABLED_SP_NONBLOCK=yes
|
||||
ENABLED_SP_NO_MALLOC=yes
|
||||
ENABLED_SP_SMALL=yes
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_ERROR([Invalid choice of Single Precision length in bits [256, 2048, 3072]: $ENABLED_SP.])
|
||||
break;;
|
||||
@@ -4404,7 +4414,7 @@ if test "$ENABLED_SP_RSA" = "yes" || test "$ENABLED_SP_DH" = "yes"; then
|
||||
AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_4096"
|
||||
fi
|
||||
fi
|
||||
if test "$ENABLED_ECC" = "yes" && test "$ENABLED_SP_ECC" = "yes"; then
|
||||
if test "$ENABLED_ECC" != "no" && test "$ENABLED_SP_ECC" = "yes"; then
|
||||
ENABLED_SP=yes
|
||||
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_HAVE_SP_ECC"
|
||||
AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_HAVE_SP_ECC"
|
||||
@@ -4425,6 +4435,10 @@ if test "$ENABLED_SP_NO_MALLOC" = "yes"; then
|
||||
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_NO_MALLOC"
|
||||
AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_NO_MALLOC"
|
||||
fi
|
||||
if test "$ENABLED_SP_NONBLOCK" = "yes"; then
|
||||
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SP_NONBLOCK"
|
||||
AM_CCASFLAGS="$AM_CCASFLAGS -DWOLFSSL_SP_NONBLOCK"
|
||||
fi
|
||||
|
||||
|
||||
AC_ARG_ENABLE([sp-asm],
|
||||
@@ -4436,6 +4450,9 @@ if test "$ENABLED_SP_ASM" = "yes"; then
|
||||
if test "$ENABLED_SP" = "no"; then
|
||||
AC_MSG_ERROR([Must have SP enabled: --enable-sp])
|
||||
fi
|
||||
if test "$ENABLED_SP_NONBLOCK" = "yes"; then
|
||||
AC_MSG_ERROR([SP non-blocking not supported with sp-asm])
|
||||
fi
|
||||
if test "$ENABLED_ASM" = "no"; then
|
||||
AC_MSG_ERROR([Assembly code turned off])
|
||||
fi
|
||||
@@ -4908,7 +4925,7 @@ AS_CASE(["$CFLAGS $CPPFLAGS"],[*'WOLFSSL_TRUST_PEER_CERT'*],[ENABLED_TRUSTED_PEE
|
||||
|
||||
|
||||
# dertermine if we have key validation mechanism
|
||||
if test "x$ENABLED_ECC" = "xyes" || test "x$ENABLED_RSA" = "xyes"
|
||||
if test "x$ENABLED_ECC" != "xno" || test "x$ENABLED_RSA" = "xyes"
|
||||
then
|
||||
if test "x$ENABLED_ASN" = "xyes"
|
||||
then
|
||||
@@ -4984,8 +5001,9 @@ AS_IF([test "x$ENABLED_LEANTLS" = "xyes" && \
|
||||
[AC_MSG_ERROR([please enable ecc if enabling leantls.])])
|
||||
|
||||
AS_IF([test "x$ENABLED_SNIFFER" = "xyes" && \
|
||||
test "x$ENABLED_RSA" = "xno"],
|
||||
[AC_MSG_ERROR([please enable rsa if enabling sniffer.])])
|
||||
test "x$ENABLED_RSA" = "xno" && \
|
||||
test "x$ENABLED_ECC" = "xno"],
|
||||
[AC_MSG_ERROR([please enable ecc or rsa if enabling sniffer.])])
|
||||
|
||||
# Lean TLS forces off prereqs of SCEP.
|
||||
AS_IF([test "x$ENABLED_SCEP" = "xyes" && \
|
||||
@@ -5046,7 +5064,7 @@ then
|
||||
ENABLED_AESKEYWRAP="yes"
|
||||
AM_CFLAGS="$AM_CFLAGS -DHAVE_AES_KEYWRAP -DWOLFSSL_AES_DIRECT"
|
||||
fi
|
||||
if test "x$ENABLED_X963KDF" = "xno" && test "$ENABLED_ECC" = "yes"
|
||||
if test "x$ENABLED_X963KDF" = "xno" && test "$ENABLED_ECC" != "no"
|
||||
then
|
||||
ENABLED_X963KDF="yes"
|
||||
AM_CFLAGS="$AM_CFLAGS -DHAVE_X963_KDF"
|
||||
@@ -5218,7 +5236,7 @@ AM_CONDITIONAL([BUILD_BLAKE2],[test "x$ENABLED_BLAKE2" = "xyes" || test "x$ENABL
|
||||
AM_CONDITIONAL([BUILD_BLAKE2S],[test "x$ENABLED_BLAKE2S" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_SHA512],[test "x$ENABLED_SHA512" = "xyes" || test "x$ENABLED_SHA384" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_DSA],[test "x$ENABLED_DSA" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_ECC],[test "x$ENABLED_ECC" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_ECC],[test "x$ENABLED_ECC" != "xno" || test "x$ENABLED_USERSETTINGS" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_ED25519],[test "x$ENABLED_ED25519" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_ED25519_SMALL],[test "x$ENABLED_ED25519_SMALL" = "xyes"])
|
||||
AM_CONDITIONAL([BUILD_FEMATH], [test "x$ENABLED_FEMATH" = "xyes" || test "x$ENABLED_USERSETTINGS" = "xyes"])
|
||||
|
||||
@@ -149,6 +149,27 @@ int wc_ecc_make_key_ex(WC_RNG* rng, int keysize, ecc_key* key, int curve_id);
|
||||
WOLFSSL_API
|
||||
int wc_ecc_check_key(ecc_key* key);
|
||||
|
||||
/*!
|
||||
\ingroup ECC
|
||||
|
||||
\brief This function frees an ecc_key key after it has been used.
|
||||
|
||||
|
||||
\param key pointer to the ecc_key structure to free
|
||||
|
||||
_Example_
|
||||
\code
|
||||
// initialize key and perform ECC operations
|
||||
...
|
||||
wc_ecc_key_free(&key);
|
||||
\endcode
|
||||
|
||||
\sa wc_ecc_key_new
|
||||
\sa wc_ecc_init_ex
|
||||
*/
|
||||
WOLFSSL_API
|
||||
void wc_ecc_key_free(ecc_key* key);
|
||||
|
||||
/*!
|
||||
\ingroup ECC
|
||||
|
||||
@@ -541,6 +562,54 @@ int wc_ecc_verify_hash_ex(mp_int *r, mp_int *s, const byte* hash,
|
||||
WOLFSSL_API
|
||||
int wc_ecc_init(ecc_key* key);
|
||||
|
||||
/*!
|
||||
\ingroup ECC
|
||||
|
||||
\brief This function initializes an ecc_key object for future
|
||||
use with message verification or key negotiation.
|
||||
|
||||
\return 0 Returned upon successfully initializing the ecc_key object
|
||||
\return MEMORY_E Returned if there is an error allocating memory
|
||||
|
||||
\param key pointer to the ecc_key object to initialize
|
||||
\param devId ID to use with async hardware
|
||||
\param heap pointer to a heap identifier
|
||||
|
||||
_Example_
|
||||
\code
|
||||
ecc_key key;
|
||||
wc_ecc_init_ex(&key, heap, devId);
|
||||
\endcode
|
||||
|
||||
\sa wc_ecc_make_key
|
||||
\sa wc_ecc_free
|
||||
\sa wc_ecc_init
|
||||
*/
|
||||
WOLFSSL_API
|
||||
int wc_ecc_init_ex(ecc_key* key, void* heap, int devId);
|
||||
|
||||
/*!
|
||||
\ingroup ECC
|
||||
|
||||
\brief This function uses a user defined heap and allocates space for the
|
||||
key structure.
|
||||
|
||||
\return 0 Returned upon successfully initializing the ecc_key object
|
||||
\return MEMORY_E Returned if there is an error allocating memory
|
||||
|
||||
|
||||
_Example_
|
||||
\code
|
||||
wc_ecc_key_new(&heap);
|
||||
\endcode
|
||||
|
||||
\sa wc_ecc_make_key
|
||||
\sa wc_ecc_key_free
|
||||
\sa wc_ecc_init
|
||||
*/
|
||||
WOLFSSL_API
|
||||
ecc_key* wc_ecc_key_new(void* heap);
|
||||
|
||||
/*!
|
||||
\ingroup ECC
|
||||
|
||||
@@ -1752,8 +1821,51 @@ int wc_ecc_encrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg,
|
||||
}
|
||||
\endcode
|
||||
|
||||
\sa Wc_ecc_encrypt
|
||||
\sa wc_ecc_encrypt
|
||||
*/
|
||||
WOLFSSL_API
|
||||
int wc_ecc_decrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg,
|
||||
word32 msgSz, byte* out, word32* outSz, ecEncCtx* ctx);
|
||||
|
||||
|
||||
/*!
|
||||
\ingroup ECC
|
||||
|
||||
\brief Enable ECC support for non-blocking operations. Supported for
|
||||
Single Precision (SP) math with the following build options:
|
||||
WOLFSSL_SP_NONBLOCK
|
||||
WOLFSSL_SP_SMALL
|
||||
WOLFSSL_SP_NO_MALLOC
|
||||
WC_ECC_NONBLOCK
|
||||
|
||||
\return 0 Returned upon successfully setting the callback context the input message
|
||||
|
||||
\param key pointer to the ecc_key object
|
||||
\param ctx pointer to ecc_nb_ctx_t structure with stack data cache for SP
|
||||
|
||||
_Example_
|
||||
\code
|
||||
int ret;
|
||||
ecc_key ecc;
|
||||
ecc_nb_ctx_t nb_ctx;
|
||||
|
||||
ret = wc_ecc_init(&ecc);
|
||||
if (ret == 0) {
|
||||
ret = wc_ecc_set_nonblock(&ecc, &nb_ctx);
|
||||
if (ret == 0) {
|
||||
do {
|
||||
ret = wc_ecc_verify_hash_ex(
|
||||
&r, &s, // r/s as mp_int
|
||||
hash, hashSz, // computed hash digest
|
||||
&verify_res, // verification result 1=success
|
||||
&key
|
||||
);
|
||||
|
||||
// TODO: Real-time work can be called here
|
||||
} while (ret == FP_WOULDBLOCK);
|
||||
}
|
||||
wc_ecc_free(&key);
|
||||
}
|
||||
\endcode
|
||||
*/
|
||||
WOLFSSL_API int wc_ecc_set_nonblock(ecc_key *key, ecc_nb_ctx_t* ctx);
|
||||
|
||||
@@ -137,6 +137,38 @@ WOLFSSL_API int wc_InitRng(WC_RNG*);
|
||||
*/
|
||||
WOLFSSL_API int wc_RNG_GenerateBlock(WC_RNG*, byte*, word32 sz);
|
||||
|
||||
/*!
|
||||
\ingroup Random
|
||||
|
||||
\brief Creates a new WC_RNG structure.
|
||||
|
||||
|
||||
\return WC_RNG structure on success
|
||||
\return NULL on error
|
||||
|
||||
|
||||
\param heap pointer to a heap identifier
|
||||
\param nonce pointer to the buffer containing the nonce
|
||||
\param nonceSz length of the nonce
|
||||
|
||||
_Example_
|
||||
\code
|
||||
RNG rng;
|
||||
byte nonce[] = { initialize nonce };
|
||||
word32 nonceSz = sizeof(nonce);
|
||||
|
||||
wc_rng_new(&nonce, nonceSz, &heap);
|
||||
|
||||
|
||||
\endcode
|
||||
|
||||
\sa wc_InitRng
|
||||
\sa wc_rng_free
|
||||
\sa wc_FreeRng
|
||||
\sa wc_RNG_HealthTest
|
||||
*/
|
||||
WOLFSSL_API WC_RNG* wc_rng_new(byte* nonce, word32 nonceSz, void* heap)
|
||||
|
||||
/*!
|
||||
\ingroup Random
|
||||
|
||||
@@ -211,6 +243,36 @@ WOLFSSL_API int wc_RNG_GenerateByte(WC_RNG*, byte*);
|
||||
*/
|
||||
WOLFSSL_API int wc_FreeRng(WC_RNG*);
|
||||
|
||||
/*!
|
||||
\ingroup Random
|
||||
|
||||
\brief Should be called when RNG no longer needed in order to securely
|
||||
free rng.
|
||||
|
||||
|
||||
\param rng random number generator initialized with wc_InitRng
|
||||
|
||||
_Example_
|
||||
\code
|
||||
RNG rng;
|
||||
byte nonce[] = { initialize nonce };
|
||||
word32 nonceSz = sizeof(nonce);
|
||||
|
||||
rng = wc_rng_new(&nonce, nonceSz, &heap);
|
||||
|
||||
// use rng
|
||||
|
||||
wc_rng_free(&rng);
|
||||
|
||||
\endcode
|
||||
|
||||
\sa wc_InitRng
|
||||
\sa wc_rng_new
|
||||
\sa wc_FreeRng
|
||||
\sa wc_RNG_HealthTest
|
||||
*/
|
||||
WOLFSSL_API WC_RNG* wc_rng_free(WC_RNG* rng);
|
||||
|
||||
/*!
|
||||
\ingroup Random
|
||||
|
||||
|
||||
@@ -2659,6 +2659,75 @@ WOLFSSL_API void wolfSSL_load_error_strings(void);
|
||||
*/
|
||||
WOLFSSL_API int wolfSSL_library_init(void);
|
||||
|
||||
/*!
|
||||
\brief This function sets the Device Id at the WOLFSSL session level.
|
||||
|
||||
\return WOLFSSL_SUCCESS upon success.
|
||||
\return BAD_FUNC_ARG if ssl is NULL.
|
||||
|
||||
\param ssl pointer to a SSL object, created with wolfSSL_new().
|
||||
\param devId ID to use with async hardware
|
||||
|
||||
_Example_
|
||||
\code
|
||||
WOLFSSL* ssl;
|
||||
int DevId = -2;
|
||||
|
||||
wolfSSL_SetDevId(ssl, devId);
|
||||
|
||||
\endcode
|
||||
|
||||
\sa wolfSSL_CTX_SetDevId
|
||||
\sa wolfSSL_CTX_GetDevId
|
||||
*/
|
||||
WOLFSSL_API int wolfSSL_SetDevId(WOLFSSL* ssl, int devId);
|
||||
|
||||
/*!
|
||||
\brief This function sets the Device Id at the WOLFSSL_CTX context level.
|
||||
|
||||
\return WOLFSSL_SUCCESS upon success.
|
||||
\return BAD_FUNC_ARG if ssl is NULL.
|
||||
|
||||
\param ctx pointer to the SSL context, created with wolfSSL_CTX_new().
|
||||
\param devId ID to use with async hardware
|
||||
|
||||
_Example_
|
||||
\code
|
||||
WOLFSSL_CTX* ctx;
|
||||
int DevId = -2;
|
||||
|
||||
wolfSSL_CTX_SetDevId(ctx, devId);
|
||||
|
||||
\endcode
|
||||
|
||||
\sa wolfSSL_SetDevId
|
||||
\sa wolfSSL_CTX_GetDevId
|
||||
*/
|
||||
WOLFSSL_API int wolfSSL_CTX_SetDevId(WOLFSSL_CTX* ctx, int devId);
|
||||
|
||||
/*!
|
||||
\brief This function retrieves the Device Id.
|
||||
|
||||
\return devId upon success.
|
||||
\return INVALID_DEVID if both ssl and ctx are NULL.
|
||||
|
||||
\param ctx pointer to the SSL context, created with wolfSSL_CTX_new().
|
||||
\param ssl pointer to a SSL object, created with wolfSSL_new().
|
||||
|
||||
_Example_
|
||||
\code
|
||||
WOLFSSL_CTX* ctx;
|
||||
|
||||
wolfSSL_CTX_GetDevId(ctx, ssl);
|
||||
|
||||
\endcode
|
||||
|
||||
\sa wolfSSL_SetDevId
|
||||
\sa wolfSSL_CTX_SetDevId
|
||||
|
||||
*/
|
||||
WOLFSSL_API int wolfSSL_CTX_GetDevId(WOLFSSL_CTX* ctx, WOLFSSL* ssl);
|
||||
|
||||
/*!
|
||||
\ingroup Setup
|
||||
|
||||
@@ -4385,6 +4454,31 @@ WOLFSSL_API int wolfSSL_X509_NAME_get_text_by_NID(
|
||||
*/
|
||||
WOLFSSL_API int wolfSSL_X509_get_signature_type(WOLFSSL_X509*);
|
||||
|
||||
/*!
|
||||
\brief This function frees a WOLFSSL_X509 structure.
|
||||
|
||||
|
||||
\param x509 a pointer to the WOLFSSL_X509 struct.
|
||||
|
||||
_Example_
|
||||
\code
|
||||
WOLFSSL_X509* x509 = (WOLFSSL_X509*)XMALOC(sizeof(WOLFSSL_X509), NULL,
|
||||
DYNAMIC_TYPE_X509) ;
|
||||
|
||||
wolfSSL_X509_free(x509);
|
||||
|
||||
\endcode
|
||||
|
||||
\sa wolfSSL_X509_get_signature
|
||||
\sa wolfSSL_X509_version
|
||||
\sa wolfSSL_X509_get_der
|
||||
\sa wolfSSL_X509_get_serial_number
|
||||
\sa wolfSSL_X509_notBefore
|
||||
\sa wolfSSL_X509_notAfter
|
||||
|
||||
*/
|
||||
WOLFSSL_API void wolfSSL_X509_free(WOLFSSL_X509* x509);
|
||||
|
||||
/*!
|
||||
\ingroup CertsKeys
|
||||
|
||||
@@ -4500,6 +4594,67 @@ WOLFSSL_API WOLFSSL_STACK* wolfSSL_X509_STORE_CTX_get_chain(
|
||||
WOLFSSL_API int wolfSSL_X509_STORE_set_flags(WOLFSSL_X509_STORE* store,
|
||||
unsigned long flag);
|
||||
|
||||
/*!
|
||||
\ingroup CertsKeys
|
||||
|
||||
\brief This function the certificate "not before" validity encoded as
|
||||
a byte array.
|
||||
|
||||
|
||||
\return NULL returned if the WOLFSSL_X509 structure is NULL.
|
||||
\return byte is returned that contains the notBeforeData.
|
||||
|
||||
\param x509 pointer to a WOLFSSL_X509 structure.
|
||||
|
||||
_Example_
|
||||
\code
|
||||
WOLFSSL_X509* x509 = (WOLFSSL_X509*)XMALLOC(sizeof(WOLFSSL_X509), NULL,
|
||||
DYNAMIC_TYPE_X509);
|
||||
...
|
||||
byte* notBeforeData = wolfSSL_X509_notBefore(x509);
|
||||
|
||||
|
||||
\endcode
|
||||
|
||||
\sa wolfSSL_X509_get_signature
|
||||
\sa wolfSSL_X509_version
|
||||
\sa wolfSSL_X509_get_der
|
||||
\sa wolfSSL_X509_get_serial_number
|
||||
\sa wolfSSL_X509_notAfter
|
||||
\sa wolfSSL_X509_free
|
||||
*/
|
||||
WOLFSSL_API const byte* wolfSSL_X509_notBefore(WOLFSSL_X509* x509);
|
||||
|
||||
/*!
|
||||
\ingroup CertsKeys
|
||||
|
||||
\brief This function the certificate "not after" validity encoded as
|
||||
a byte array.
|
||||
|
||||
\return NULL returned if the WOLFSSL_X509 structure is NULL.
|
||||
\return byte is returned that contains the notAfterData.
|
||||
|
||||
\param x509 pointer to a WOLFSSL_X509 structure.
|
||||
|
||||
_Example_
|
||||
\code
|
||||
WOLFSSL_X509* x509 = (WOLFSSL_X509*)XMALLOC(sizeof(WOLFSSL_X509), NULL,
|
||||
DYNAMIC_TYPE_X509);
|
||||
...
|
||||
byte* notAfterData = wolfSSL_X509_notAfter(x509);
|
||||
|
||||
|
||||
\endcode
|
||||
|
||||
\sa wolfSSL_X509_get_signature
|
||||
\sa wolfSSL_X509_version
|
||||
\sa wolfSSL_X509_get_der
|
||||
\sa wolfSSL_X509_get_serial_number
|
||||
\sa wolfSSL_X509_notBefore
|
||||
\sa wolfSSL_X509_free
|
||||
*/
|
||||
WOLFSSL_API const byte* wolfSSL_X509_notAfter(WOLFSSL_X509* x509);
|
||||
|
||||
/*!
|
||||
\ingroup Setup
|
||||
|
||||
@@ -7567,6 +7722,27 @@ WOLFSSL_API int wolfSSL_DTLS_SetCookieSecret(WOLFSSL*,
|
||||
const unsigned char*,
|
||||
unsigned int);
|
||||
|
||||
/*!
|
||||
\brief This function retrieves the random number.
|
||||
|
||||
\return rng upon success.
|
||||
\return NULL if ssl is NULL.
|
||||
|
||||
\param ssl pointer to a SSL object, created with wolfSSL_new().
|
||||
|
||||
_Example_
|
||||
\code
|
||||
WOLFSSL* ssl;
|
||||
|
||||
wolfSSL_GetRNG(ssl);
|
||||
|
||||
\endcode
|
||||
|
||||
\sa wolfSSL_CTX_new_rng
|
||||
|
||||
*/
|
||||
WOLFSSL_API WC_RNG* wolfSSL_GetRNG(WOLFSSL* ssl);
|
||||
|
||||
/*!
|
||||
\ingroup Setup
|
||||
|
||||
@@ -13529,3 +13705,26 @@ WOLFSSL_API WOLFSSL_METHOD *wolfTLSv1_3_method_ex(void* heap);
|
||||
*/
|
||||
WOLFSSL_API WOLFSSL_METHOD *wolfTLSv1_3_method(void);
|
||||
|
||||
/*!
|
||||
\ingroup SSL
|
||||
\brief This function sets a fixed / static ephemeral key for testing only
|
||||
\return 0 Key loaded successfully
|
||||
\param ctx A WOLFSSL_CTX context pointer
|
||||
\param keyAlgo enum wc_PkType like WC_PK_TYPE_DH and WC_PK_TYPE_ECDH
|
||||
\param key key file path (if keySz == 0) or actual key buffer (PEM or ASN.1)
|
||||
\param keySz key size (should be 0 for "key" arg is file path)
|
||||
\param format WOLFSSL_FILETYPE_ASN1 or WOLFSSL_FILETYPE_PEM
|
||||
*/
|
||||
WOLFSSL_API int wolfSSL_CTX_set_ephemeral_key(WOLFSSL_CTX* ctx, int keyAlgo, const char* key, unsigned int keySz, int format);
|
||||
|
||||
/*!
|
||||
\ingroup SSL
|
||||
\brief This function sets a fixed / static ephemeral key for testing only
|
||||
\return 0 Key loaded successfully
|
||||
\param ssl A WOLFSSL object pointer
|
||||
\param keyAlgo enum wc_PkType like WC_PK_TYPE_DH and WC_PK_TYPE_ECDH
|
||||
\param key key file path (if keySz == 0) or actual key buffer (PEM or ASN.1)
|
||||
\param keySz key size (should be 0 for "key" arg is file path)
|
||||
\param format WOLFSSL_FILETYPE_ASN1 or WOLFSSL_FILETYPE_PEM
|
||||
*/
|
||||
WOLFSSL_API int wolfSSL_set_ephemeral_key(WOLFSSL* ssl, int keyAlgo, const char* key, unsigned int keySz, int format);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div id="lowCenter">
|
||||
<p class="footText" id="center">Copyright © 2017 wolfSSL Inc.<br>All rights reserved.</p>
|
||||
<p class="footText" id="center">Copyright © 2020 wolfSSL Inc.<br>All rights reserved.</p>
|
||||
<div class="lowNav">
|
||||
<p class="footText">Help and Support</p>
|
||||
<ul class="lowNavList">
|
||||
|
||||
@@ -1285,7 +1285,7 @@ static int bench_tls_server(info_t* info)
|
||||
ret = SocketWaitClient(info);
|
||||
#ifdef BENCH_USE_NONBLOCK
|
||||
if (ret == -2) {
|
||||
sleep(0);
|
||||
XSLEEP_MS(0);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
@@ -1831,7 +1831,7 @@ int bench_tls(void* args)
|
||||
info = &theadInfo[i];
|
||||
if (!info->to_client.done || !info->to_server.done) {
|
||||
doShutdown = 0;
|
||||
sleep(1); /* Allow other threads to run */
|
||||
XSLEEP_MS(1000); /* Allow other threads to run */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+36
-28
@@ -86,6 +86,14 @@ static const char kHttpGetMsg[] = "GET /index.html HTTP/1.0\r\n\r\n";
|
||||
/* Read needs to be at least sizeof server.c `webServerMsg` (226) */
|
||||
#define CLI_REPLY_SZ 256
|
||||
|
||||
#if defined(XSLEEP_US) && defined(NO_MAIN_DRIVER)
|
||||
/* This is to force the server's thread to get a chance to
|
||||
* execute before continuing the resume in non-blocking
|
||||
* DTLS test cases. */
|
||||
#define TEST_DELAY() XSLEEP_US(10000)
|
||||
#else
|
||||
#define TEST_DELAY() XSLEEP_MS(1000)
|
||||
#endif
|
||||
|
||||
/* Note on using port 0: the client standalone example doesn't utilize the
|
||||
* port 0 port sharing; that is used by (1) the server in external control
|
||||
@@ -505,7 +513,7 @@ static int ClientBenchmarkConnections(WOLFSSL_CTX* ctx, char* host, word16 port,
|
||||
/* Measures throughput in kbps. Throughput = number of bytes */
|
||||
static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port,
|
||||
int dtlsUDP, int dtlsSCTP, int block, size_t throughput, int useX25519,
|
||||
int useX448)
|
||||
int useX448, int exitWithRet)
|
||||
{
|
||||
double start, conn_time = 0, tx_time = 0, rx_time = 0;
|
||||
SOCKET_T sockfd;
|
||||
@@ -610,7 +618,9 @@ static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port,
|
||||
} while (err == WC_PENDING_E);
|
||||
if (ret != len) {
|
||||
printf("SSL_write bench error %d!\n", err);
|
||||
err_sys("SSL_write failed");
|
||||
if (!exitWithRet)
|
||||
err_sys("SSL_write failed");
|
||||
goto doExit;
|
||||
}
|
||||
tx_time += current_time(0) - start;
|
||||
|
||||
@@ -664,6 +674,7 @@ static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port,
|
||||
else {
|
||||
err_sys("Client buffer malloc failed");
|
||||
}
|
||||
doExit:
|
||||
if(tx_buffer) XFREE(tx_buffer, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
if(rx_buffer) XFREE(rx_buffer, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
}
|
||||
@@ -675,6 +686,9 @@ static int ClientBenchmarkThroughput(WOLFSSL_CTX* ctx, char* host, word16 port,
|
||||
wolfSSL_free(ssl); ssl = NULL;
|
||||
CloseSocket(sockfd);
|
||||
|
||||
if (exitWithRet)
|
||||
return err;
|
||||
|
||||
#if !defined(__MINGW32__)
|
||||
printf("wolfSSL Client Benchmark %zu bytes\n"
|
||||
#else
|
||||
@@ -1602,6 +1616,9 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
|
||||
StackTrap();
|
||||
|
||||
/* Reinitialize the global myVerifyAction. */
|
||||
myVerifyAction = VERIFY_OVERRIDE_ERROR;
|
||||
|
||||
#ifndef WOLFSSL_VXWORKS
|
||||
/* Not used: All used */
|
||||
while ((ch = mygetopt(argc, argv, "?:"
|
||||
@@ -2385,10 +2402,11 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
wolfSSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack);
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_SNIFFER)
|
||||
#ifdef WOLFSSL_SNIFFER
|
||||
if (cipherList == NULL && version < 4) {
|
||||
/* don't use EDH, can't sniff tmp keys */
|
||||
if (wolfSSL_CTX_set_cipher_list(ctx, "AES128-SHA") != WOLFSSL_SUCCESS) {
|
||||
/* static RSA or ECC cipher suites */
|
||||
const char* staticCipherList = "AES128-SHA:ECDH-ECDSA-AES128-SHA";
|
||||
if (wolfSSL_CTX_set_cipher_list(ctx, staticCipherList) != WOLFSSL_SUCCESS) {
|
||||
wolfSSL_CTX_free(ctx); ctx = NULL;
|
||||
err_sys("client can't set cipher list 3");
|
||||
}
|
||||
@@ -2620,9 +2638,13 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
if (throughput) {
|
||||
((func_args*)args)->return_code =
|
||||
ClientBenchmarkThroughput(ctx, host, port, dtlsUDP, dtlsSCTP,
|
||||
block, throughput, useX25519, useX448);
|
||||
block, throughput, useX25519, useX448,
|
||||
exitWithRet);
|
||||
wolfSSL_CTX_free(ctx); ctx = NULL;
|
||||
XEXIT_T(EXIT_SUCCESS);
|
||||
if (!exitWithRet)
|
||||
XEXIT_T(EXIT_SUCCESS);
|
||||
else
|
||||
goto exit;
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_MDK_ARM)
|
||||
@@ -3146,13 +3168,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
|
||||
/* allow some time for exporting the session */
|
||||
#ifdef WOLFSSL_SESSION_EXPORT_DEBUG
|
||||
#ifdef USE_WINDOWS_API
|
||||
Sleep(500);
|
||||
#elif defined(WOLFSSL_TIRTOS)
|
||||
Task_sleep(1);
|
||||
#else
|
||||
sleep(1);
|
||||
#endif
|
||||
TEST_DELAY();
|
||||
#endif /* WOLFSSL_SESSION_EXPORT_DEBUG */
|
||||
|
||||
#ifdef WOLFSSL_TLS13
|
||||
@@ -3163,12 +3179,16 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
err = ClientWrite(ssl, msg, msgSz, "", exitWithRet);
|
||||
if (exitWithRet && (err != 0)) {
|
||||
((func_args*)args)->return_code = err;
|
||||
wolfSSL_free(ssl); ssl = NULL;
|
||||
wolfSSL_CTX_free(ctx); ctx = NULL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
err = ClientRead(ssl, reply, sizeof(reply)-1, 1, "", exitWithRet);
|
||||
if (exitWithRet && (err != 0)) {
|
||||
((func_args*)args)->return_code = err;
|
||||
wolfSSL_free(ssl); ssl = NULL;
|
||||
wolfSSL_CTX_free(ctx); ctx = NULL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@@ -3248,13 +3268,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
#endif
|
||||
|
||||
if (dtlsUDP) {
|
||||
#ifdef USE_WINDOWS_API
|
||||
Sleep(500);
|
||||
#elif defined(WOLFSSL_TIRTOS)
|
||||
Task_sleep(1);
|
||||
#else
|
||||
sleep(1);
|
||||
#endif
|
||||
TEST_DELAY();
|
||||
}
|
||||
tcp_connect(&sockfd, host, port, dtlsUDP, dtlsSCTP, sslResume);
|
||||
if (wolfSSL_set_fd(sslResume, sockfd) != WOLFSSL_SUCCESS) {
|
||||
@@ -3376,13 +3390,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
||||
|
||||
/* allow some time for exporting the session */
|
||||
#ifdef WOLFSSL_SESSION_EXPORT_DEBUG
|
||||
#ifdef USE_WINDOWS_API
|
||||
Sleep(500);
|
||||
#elif defined(WOLFSSL_TIRTOS)
|
||||
Task_sleep(1);
|
||||
#else
|
||||
sleep(1);
|
||||
#endif
|
||||
TEST_DELAY();
|
||||
#endif /* WOLFSSL_SESSION_EXPORT_DEBUG */
|
||||
|
||||
#ifdef HAVE_SECURE_RENEGOTIATION
|
||||
|
||||
@@ -391,6 +391,10 @@ int ServerEchoData(SSL* ssl, int clientfd, int echoData, int block,
|
||||
err_sys_ex(runWithErrors, "SSL_read failed");
|
||||
break;
|
||||
}
|
||||
if (err == WOLFSSL_ERROR_ZERO_RETURN) {
|
||||
free(buffer);
|
||||
return WOLFSSL_ERROR_ZERO_RETURN;
|
||||
}
|
||||
}
|
||||
else {
|
||||
rx_pos += ret;
|
||||
@@ -449,7 +453,7 @@ int ServerEchoData(SSL* ssl, int clientfd, int echoData, int block,
|
||||
);
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ServerRead(WOLFSSL* ssl, char* input, int inputLen)
|
||||
@@ -1103,6 +1107,10 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
|
||||
#ifdef WOLFSSL_VXWORKS
|
||||
useAnyAddr = 1;
|
||||
#else
|
||||
|
||||
/* Reinitialize the global myVerifyAction. */
|
||||
myVerifyAction = VERIFY_OVERRIDE_ERROR;
|
||||
|
||||
/* Not Used: h, z, F, T, V, W, X */
|
||||
while ((ch = mygetopt(argc, argv, "?:"
|
||||
"abc:defgijk:l:mnop:q:rstuv:wxy"
|
||||
@@ -1652,6 +1660,25 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
|
||||
wolfSSL_CTX_set_TicketEncCb(ctx, myTicketEncCb);
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_SNIFFER) && defined(WOLFSSL_STATIC_EPHEMERAL)
|
||||
/* used for testing only to set a static/fixed ephemeral key
|
||||
for use with the sniffer */
|
||||
#if defined(HAVE_ECC) && !defined(NO_ECC_SECP) && \
|
||||
(!defined(NO_ECC256) || defined(HAVE_ALL_CURVES))
|
||||
ret = wolfSSL_CTX_set_ephemeral_key(ctx, WC_PK_TYPE_ECDH,
|
||||
"./certs/statickeys/ecc-secp256r1.pem", 0, WOLFSSL_FILETYPE_PEM);
|
||||
if (ret != 0) {
|
||||
err_sys_ex(runWithErrors, "error loading static ECDH key");
|
||||
}
|
||||
#elif !defined(NO_DH)
|
||||
ret = wolfSSL_CTX_set_ephemeral_key(ctx, WC_PK_TYPE_DH,
|
||||
"./certs/statickeys/dh-ffdhe2048.pem", 0, WOLFSSL_FILETYPE_PEM);
|
||||
if (ret != 0) {
|
||||
err_sys_ex(runWithErrors, "error loading static DH key");
|
||||
}
|
||||
#endif
|
||||
#endif /* WOLFSSL_SNIFFER && WOLFSSL_STATIC_EPHEMERAL */
|
||||
|
||||
if (cipherList && !useDefCipherList) {
|
||||
if (SSL_CTX_set_cipher_list(ctx, cipherList) != WOLFSSL_SUCCESS)
|
||||
err_sys_ex(runWithErrors, "server can't set custom cipher list");
|
||||
@@ -1813,7 +1840,8 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
|
||||
SSL_CTX_set_verify(ctx, WOLFSSL_VERIFY_PEER |
|
||||
(usePskPlus ? WOLFSSL_VERIFY_FAIL_EXCEPT_PSK :
|
||||
WOLFSSL_VERIFY_FAIL_IF_NO_PEER_CERT),
|
||||
myVerifyAction == VERIFY_OVERRIDE_DATE_ERR ? myVerify : NULL);
|
||||
(myVerifyAction == VERIFY_OVERRIDE_DATE_ERR ||
|
||||
myVerifyAction == VERIFY_FORCE_FAIL) ? myVerify : NULL);
|
||||
|
||||
#ifdef TEST_BEFORE_DATE
|
||||
verify_flags |= WOLFSSL_LOAD_FLAG_DATE_ERR_OKAY;
|
||||
@@ -1836,11 +1864,13 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_SNIFFER)
|
||||
/* don't use EDH, can't sniff tmp keys */
|
||||
#ifdef WOLFSSL_SNIFFER
|
||||
if (cipherList == NULL && version < 4) {
|
||||
if (SSL_CTX_set_cipher_list(ctx, "AES128-SHA") != WOLFSSL_SUCCESS)
|
||||
/* static RSA or static ECC cipher suites */
|
||||
const char* staticCipherList = "AES128-SHA:ECDH-ECDSA-AES128-SHA";
|
||||
if (SSL_CTX_set_cipher_list(ctx, staticCipherList) != WOLFSSL_SUCCESS) {
|
||||
err_sys_ex(runWithErrors, "server can't set cipher list 3");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -2456,7 +2486,15 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
|
||||
#endif
|
||||
}
|
||||
else if (err == 0 || err == WOLFSSL_ERROR_ZERO_RETURN) {
|
||||
ServerEchoData(ssl, clientfd, echoData, block, throughput);
|
||||
err = ServerEchoData(ssl, clientfd, echoData, block, throughput);
|
||||
if (err != 0) {
|
||||
SSL_free(ssl); ssl = NULL;
|
||||
SSL_CTX_free(ctx); ctx = NULL;
|
||||
CloseSocket(clientfd);
|
||||
CloseSocket(sockfd);
|
||||
((func_args*)args)->return_code = err;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_MDK_SHELL) && defined(HAVE_MDK_RTX)
|
||||
|
||||
@@ -12,3 +12,4 @@ rm -f ./certeccrsa.der
|
||||
rm -f ./ecc-key.der
|
||||
rm -f ./ecc-key.pem
|
||||
rm -f ./ecc-public-key.der
|
||||
rm -f ./tests/test-log-dump-to-file.txt
|
||||
|
||||
@@ -85,6 +85,9 @@ endif
|
||||
|
||||
EXTRA_DIST += scripts/testsuite.pcap \
|
||||
scripts/sniffer-ipv6.pcap \
|
||||
scripts/sniffer-tls13-dh.pcap \
|
||||
scripts/sniffer-tls13-ecc.pcap \
|
||||
scripts/sniffer-tls13-gen.sh \
|
||||
scripts/ping.test
|
||||
|
||||
# leave openssl.test as extra until non bash works
|
||||
|
||||
@@ -2,13 +2,34 @@
|
||||
|
||||
#sniffer-testsuite.test
|
||||
|
||||
# ./configure --enable-sniffer [--enable-session-ticket]
|
||||
# Resumption tests require "--enable-session-ticket"
|
||||
|
||||
echo -e "\nStaring snifftest on testsuite.pcap...\n"
|
||||
./sslSniffer/sslSnifferTest/snifftest ./scripts/testsuite.pcap ./certs/server-key.pem 127.0.0.1 11111
|
||||
|
||||
RESULT=$?
|
||||
[ $RESULT -ne 0 ] && echo -e "\nsnifftest failed\n" && exit 1
|
||||
|
||||
# TLS v1.3 sniffer test ECC (and resumption)
|
||||
if test $# -ne 0
|
||||
then
|
||||
./sslSniffer/sslSnifferTest/snifftest ./scripts/sniffer-tls13-ecc.pcap ./certs/statickeys/ecc-secp256r1.pem 127.0.0.1 11111
|
||||
|
||||
RESULT=$?
|
||||
[ $RESULT -ne 0 ] && echo -e "\nsnifftest TLS v1.3 ECC\n" && exit 1
|
||||
fi
|
||||
|
||||
# TLS v1.3 sniffer test DH (and resumption)
|
||||
if test $# -ne 0
|
||||
then
|
||||
./sslSniffer/sslSnifferTest/snifftest ./scripts/sniffer-tls13-dh.pcap ./certs/statickeys/dh-ffdhe2048.pem 127.0.0.1 11111
|
||||
|
||||
RESULT=$?
|
||||
[ $RESULT -ne 0 ] && echo -e "\nsnifftest TLS v1.3 DH\n" && exit 1
|
||||
fi
|
||||
|
||||
# IPv6
|
||||
if test $# -ne 0 && test "x$1" = "x-6";
|
||||
then
|
||||
echo -e "\nStaring snifftest on sniffer-ipv6.pcap...\n"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Run these configures and the example server/client below
|
||||
# Script to generate wireshark trace for sniffer-tls13-ecc.pcap
|
||||
#./configure --enable-sniffer --enable-session-ticket && make
|
||||
|
||||
# Script to generate wireshark trace for sniffer-tls13-dh.pcap
|
||||
#./configure --enable-sniffer --enable-session-ticket --disable-ecc && make
|
||||
|
||||
# TLS v1.3
|
||||
./examples/server/server -v 4 -l TLS13-AES128-GCM-SHA256 &
|
||||
./examples/client/client -v 4 -l TLS13-AES128-GCM-SHA256
|
||||
./examples/server/server -v 4 -l TLS13-AES256-GCM-SHA384 &
|
||||
./examples/client/client -v 4 -l TLS13-AES256-GCM-SHA384
|
||||
./examples/server/server -v 4 -l TLS13-CHACHA20-POLY1305-SHA256 &
|
||||
./examples/client/client -v 4 -l TLS13-CHACHA20-POLY1305-SHA256
|
||||
|
||||
# TLS v1.3 Resumption
|
||||
./examples/server/server -v 4 -l TLS13-AES128-GCM-SHA256 -r &
|
||||
./examples/client/client -v 4 -l TLS13-AES128-GCM-SHA256 -r
|
||||
./examples/server/server -v 4 -l TLS13-AES256-GCM-SHA384 -r &
|
||||
./examples/client/client -v 4 -l TLS13-AES256-GCM-SHA384 -r
|
||||
./examples/server/server -v 4 -l TLS13-CHACHA20-POLY1305-SHA256 -r &
|
||||
./examples/client/client -v 4 -l TLS13-CHACHA20-POLY1305-SHA256 -r
|
||||
+75
-106
@@ -1897,6 +1897,11 @@ void SSL_CtxResourceFree(WOLFSSL_CTX* ctx)
|
||||
ctx->alpn_cli_protos = NULL;
|
||||
}
|
||||
#endif
|
||||
#ifdef WOLFSSL_STATIC_EPHEMERAL
|
||||
if (ctx->staticKE.key) {
|
||||
FreeDer(&ctx->staticKE.key);
|
||||
}
|
||||
#endif
|
||||
#ifdef WOLFSSL_STATIC_MEMORY
|
||||
if (ctx->heap != NULL) {
|
||||
#ifdef WOLFSSL_HEAP_TEST
|
||||
@@ -5680,6 +5685,10 @@ int InitSSL(WOLFSSL* ssl, WOLFSSL_CTX* ctx, int writeDup)
|
||||
ssl->options.useClientOrder = ctx->useClientOrder;
|
||||
ssl->options.mutualAuth = ctx->mutualAuth;
|
||||
|
||||
#ifdef WOLFSSL_STATIC_EPHEMERAL
|
||||
ssl->staticKE = ctx->staticKE;
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_TLS13
|
||||
#ifdef HAVE_SESSION_TICKET
|
||||
ssl->options.noTicketTls13 = ctx->noTicketTls13;
|
||||
@@ -6409,6 +6418,11 @@ void SSL_ResourceFree(WOLFSSL* ssl)
|
||||
XFREE(curr, ssl->heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
}
|
||||
#endif
|
||||
#ifdef WOLFSSL_STATIC_EPHEMERAL
|
||||
if (ssl->staticKE.key != NULL && ssl->staticKE.key != ssl->ctx->staticKE.key) {
|
||||
FreeDer(&ssl->staticKE.key);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_STATIC_MEMORY
|
||||
/* check if using fixed io buffers and free them */
|
||||
@@ -7674,49 +7688,46 @@ static int EdDSA_Update(WOLFSSL* ssl, const byte* data, int sz)
|
||||
}
|
||||
#endif /* (HAVE_ED25519 || HAVE_ED448) && !WOLFSSL_NO_CLIENT_AUTH */
|
||||
|
||||
int HashOutputRaw(WOLFSSL* ssl, const byte* output, int sz)
|
||||
int HashRaw(WOLFSSL* ssl, const byte* data, int sz)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
(void)output;
|
||||
(void)data;
|
||||
(void)sz;
|
||||
|
||||
if (ssl->hsHashes == NULL)
|
||||
if (ssl->hsHashes == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
#ifdef HAVE_FUZZER
|
||||
if (ssl->fuzzerCb)
|
||||
ssl->fuzzerCb(ssl, output, sz, FUZZ_HASH, ssl->fuzzerCtx);
|
||||
#endif
|
||||
#ifndef NO_OLD_TLS
|
||||
#ifndef NO_SHA
|
||||
wc_ShaUpdate(&ssl->hsHashes->hashSha, output, sz);
|
||||
wc_ShaUpdate(&ssl->hsHashes->hashSha, data, sz);
|
||||
#endif
|
||||
#ifndef NO_MD5
|
||||
wc_Md5Update(&ssl->hsHashes->hashMd5, output, sz);
|
||||
wc_Md5Update(&ssl->hsHashes->hashMd5, data, sz);
|
||||
#endif
|
||||
#endif /* NO_OLD_TLS */
|
||||
|
||||
if (IsAtLeastTLSv1_2(ssl)) {
|
||||
#ifndef NO_SHA256
|
||||
ret = wc_Sha256Update(&ssl->hsHashes->hashSha256, output, sz);
|
||||
ret = wc_Sha256Update(&ssl->hsHashes->hashSha256, data, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA384
|
||||
ret = wc_Sha384Update(&ssl->hsHashes->hashSha384, output, sz);
|
||||
ret = wc_Sha384Update(&ssl->hsHashes->hashSha384, data, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA512
|
||||
ret = wc_Sha512Update(&ssl->hsHashes->hashSha512, output, sz);
|
||||
ret = wc_Sha512Update(&ssl->hsHashes->hashSha512, data, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
#if !defined(WOLFSSL_NO_CLIENT_AUTH) && \
|
||||
((defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)) || \
|
||||
(defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)))
|
||||
ret = EdDSA_Update(ssl, output, sz);
|
||||
ret = EdDSA_Update(ssl, data, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
@@ -7728,7 +7739,6 @@ int HashOutputRaw(WOLFSSL* ssl, const byte* output, int sz)
|
||||
/* add output to md5 and sha handshake hashes, exclude record header */
|
||||
int HashOutput(WOLFSSL* ssl, const byte* output, int sz, int ivSz)
|
||||
{
|
||||
int ret = 0;
|
||||
const byte* adj;
|
||||
|
||||
if (ssl->hsHashes == NULL)
|
||||
@@ -7747,55 +7757,23 @@ int HashOutput(WOLFSSL* ssl, const byte* output, int sz, int ivSz)
|
||||
sz -= DTLS_RECORD_EXTRA;
|
||||
}
|
||||
#endif
|
||||
#ifndef NO_OLD_TLS
|
||||
#ifndef NO_SHA
|
||||
wc_ShaUpdate(&ssl->hsHashes->hashSha, adj, sz);
|
||||
#endif
|
||||
#ifndef NO_MD5
|
||||
wc_Md5Update(&ssl->hsHashes->hashMd5, adj, sz);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (IsAtLeastTLSv1_2(ssl)) {
|
||||
#ifndef NO_SHA256
|
||||
ret = wc_Sha256Update(&ssl->hsHashes->hashSha256, adj, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA384
|
||||
ret = wc_Sha384Update(&ssl->hsHashes->hashSha384, adj, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA512
|
||||
ret = wc_Sha512Update(&ssl->hsHashes->hashSha512, adj, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
#if !defined(WOLFSSL_NO_CLIENT_AUTH) && \
|
||||
((defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)) || \
|
||||
(defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)))
|
||||
ret = EdDSA_Update(ssl, adj, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
return ret;
|
||||
return HashRaw(ssl, adj, sz);
|
||||
}
|
||||
|
||||
|
||||
/* add input to md5 and sha handshake hashes, include handshake header */
|
||||
int HashInput(WOLFSSL* ssl, const byte* input, int sz)
|
||||
{
|
||||
int ret = 0;
|
||||
const byte* adj;
|
||||
|
||||
if (ssl->hsHashes == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
adj = input - HANDSHAKE_HEADER_SZ;
|
||||
sz += HANDSHAKE_HEADER_SZ;
|
||||
|
||||
(void)adj;
|
||||
|
||||
#ifdef WOLFSSL_DTLS
|
||||
if (ssl->options.dtls) {
|
||||
adj -= DTLS_HANDSHAKE_EXTRA;
|
||||
@@ -7803,45 +7781,7 @@ int HashInput(WOLFSSL* ssl, const byte* input, int sz)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ssl->hsHashes == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
#ifndef NO_OLD_TLS
|
||||
#ifndef NO_SHA
|
||||
wc_ShaUpdate(&ssl->hsHashes->hashSha, adj, sz);
|
||||
#endif
|
||||
#ifndef NO_MD5
|
||||
wc_Md5Update(&ssl->hsHashes->hashMd5, adj, sz);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (IsAtLeastTLSv1_2(ssl)) {
|
||||
#ifndef NO_SHA256
|
||||
ret = wc_Sha256Update(&ssl->hsHashes->hashSha256, adj, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA384
|
||||
ret = wc_Sha384Update(&ssl->hsHashes->hashSha384, adj, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA512
|
||||
ret = wc_Sha512Update(&ssl->hsHashes->hashSha512, adj, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
#if !defined(WOLFSSL_NO_CLIENT_AUTH) && \
|
||||
((defined(HAVE_ED25519) && !defined(NO_ED25519_CLIENT_AUTH)) || \
|
||||
(defined(HAVE_ED448) && !defined(NO_ED448_CLIENT_AUTH)))
|
||||
ret = EdDSA_Update(ssl, adj, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
return ret;
|
||||
return HashRaw(ssl, adj, sz);
|
||||
}
|
||||
|
||||
|
||||
@@ -10007,6 +9947,8 @@ int DoVerifyCallback(WOLFSSL_CERT_MANAGER* cm, WOLFSSL* ssl, int ret,
|
||||
/* Determine if verify was okay */
|
||||
if (ret == 0) {
|
||||
verify_ok = 1;
|
||||
use_cb = 1; /* use verify callback on success, in case callback
|
||||
* could force fail a cert */
|
||||
}
|
||||
|
||||
/* Determine if verify callback should be used */
|
||||
@@ -11062,8 +11004,11 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
||||
}
|
||||
else if (ret == ASN_PARSE_E || ret == BUFFER_E) {
|
||||
WOLFSSL_MSG("Got Peer cert ASN PARSE or BUFFER ERROR");
|
||||
#if defined(WOLFSSL_EXTRA_ALERTS) || defined(OPENSSL_EXTRA) || \
|
||||
defined(OPENSSL_EXTRA_X509_SMALL)
|
||||
DoCertFatalAlert(ssl, ret);
|
||||
#endif
|
||||
#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
|
||||
SendAlert(ssl, alert_fatal, bad_certificate);
|
||||
ssl->peerVerifyRet = X509_V_ERR_CERT_REJECTED;
|
||||
#endif
|
||||
args->fatal = 1;
|
||||
@@ -11078,12 +11023,20 @@ int ProcessPeerCerts(WOLFSSL* ssl, byte* input, word32* inOutIdx,
|
||||
"\tCallback override available, will continue");
|
||||
/* check if fatal error */
|
||||
args->fatal = (args->verifyErr) ? 1 : 0;
|
||||
#if defined(WOLFSSL_EXTRA_ALERTS) || \
|
||||
defined(OPENSSL_EXTRA) || \
|
||||
defined(OPENSSL_EXTRA_X509_SMALL)
|
||||
if (args->fatal)
|
||||
DoCertFatalAlert(ssl, ret);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
WOLFSSL_MSG("\tNo callback override available, fatal");
|
||||
args->fatal = 1;
|
||||
#ifdef OPENSSL_EXTRA
|
||||
SendAlert(ssl, alert_fatal, bad_certificate);
|
||||
#if defined(WOLFSSL_EXTRA_ALERTS) || \
|
||||
defined(OPENSSL_EXTRA) || \
|
||||
defined(OPENSSL_EXTRA_X509_SMALL)
|
||||
DoCertFatalAlert(ssl, ret);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -15327,6 +15280,13 @@ int ProcessReply(WOLFSSL* ssl)
|
||||
if (ssl->options.tls1_3) {
|
||||
word16 i = (word16)(ssl->buffers.inputBuffer.length -
|
||||
ssl->keys.padSz);
|
||||
|
||||
/* sanity check on underflow */
|
||||
if (ssl->keys.padSz >= ssl->buffers.inputBuffer.length) {
|
||||
WOLFSSL_ERROR(DECRYPT_ERROR);
|
||||
return DECRYPT_ERROR;
|
||||
}
|
||||
|
||||
/* Remove padding from end of plain text. */
|
||||
for (--i; i > ssl->buffers.inputBuffer.idx; i--) {
|
||||
if (ssl->buffers.inputBuffer.buffer[i] != 0)
|
||||
@@ -16920,15 +16880,15 @@ int SendCertificate(WOLFSSL* ssl)
|
||||
if (!ssl->options.dtls) {
|
||||
AddFragHeaders(output, fragSz, 0, payloadSz, certificate, ssl);
|
||||
if (!IsEncryptionOn(ssl, 1))
|
||||
HashOutputRaw(ssl, output + RECORD_HEADER_SZ,
|
||||
HashRaw(ssl, output + RECORD_HEADER_SZ,
|
||||
HANDSHAKE_HEADER_SZ);
|
||||
}
|
||||
else {
|
||||
#ifdef WOLFSSL_DTLS
|
||||
AddHeaders(output, payloadSz, certificate, ssl);
|
||||
HashOutputRaw(ssl,
|
||||
output + RECORD_HEADER_SZ + DTLS_RECORD_EXTRA,
|
||||
HANDSHAKE_HEADER_SZ + DTLS_HANDSHAKE_EXTRA);
|
||||
HashRaw(ssl,
|
||||
output + RECORD_HEADER_SZ + DTLS_RECORD_EXTRA,
|
||||
HANDSHAKE_HEADER_SZ + DTLS_HANDSHAKE_EXTRA);
|
||||
/* Adding the headers increments these, decrement them for
|
||||
* actual message header. */
|
||||
ssl->keys.dtls_handshake_number--;
|
||||
@@ -16940,22 +16900,22 @@ int SendCertificate(WOLFSSL* ssl)
|
||||
/* list total */
|
||||
c32to24(listSz, output + i);
|
||||
if (ssl->options.dtls || !IsEncryptionOn(ssl, 1))
|
||||
HashOutputRaw(ssl, output + i, CERT_HEADER_SZ);
|
||||
HashRaw(ssl, output + i, CERT_HEADER_SZ);
|
||||
i += CERT_HEADER_SZ;
|
||||
length -= CERT_HEADER_SZ;
|
||||
fragSz -= CERT_HEADER_SZ;
|
||||
if (certSz) {
|
||||
c32to24(certSz, output + i);
|
||||
if (ssl->options.dtls || !IsEncryptionOn(ssl, 1))
|
||||
HashOutputRaw(ssl, output + i, CERT_HEADER_SZ);
|
||||
HashRaw(ssl, output + i, CERT_HEADER_SZ);
|
||||
i += CERT_HEADER_SZ;
|
||||
length -= CERT_HEADER_SZ;
|
||||
fragSz -= CERT_HEADER_SZ;
|
||||
|
||||
if (ssl->options.dtls || !IsEncryptionOn(ssl, 1)) {
|
||||
HashOutputRaw(ssl, ssl->buffers.certificate->buffer, certSz);
|
||||
HashRaw(ssl, ssl->buffers.certificate->buffer, certSz);
|
||||
if (certChainSz)
|
||||
HashOutputRaw(ssl, ssl->buffers.certChain->buffer,
|
||||
HashRaw(ssl, ssl->buffers.certChain->buffer,
|
||||
certChainSz);
|
||||
}
|
||||
}
|
||||
@@ -17709,9 +17669,11 @@ int SendData(WOLFSSL* ssl, const void* data, int sz)
|
||||
|
||||
len = wolfSSL_GetMaxRecordSize(ssl, sz - sent);
|
||||
|
||||
#ifdef WOLFSSL_DTLS
|
||||
if (IsDtlsNotSctpMode(ssl)) {
|
||||
len = min(len, MAX_UDP_SIZE);
|
||||
#if defined(WOLFSSL_DTLS) && !defined(WOLFSSL_NO_DTLS_SIZE_CHECK)
|
||||
if (ssl->options.dtls && (len < sz - sent)) {
|
||||
ssl->error = DTLS_SIZE_ERROR;
|
||||
WOLFSSL_ERROR(ssl->error);
|
||||
return ssl->error;
|
||||
}
|
||||
#endif
|
||||
buffSz = len;
|
||||
@@ -18439,6 +18401,12 @@ const char* wolfSSL_ERR_reason_error_string(unsigned long e)
|
||||
case TLS13_SECRET_CB_E:
|
||||
return "TLS1.3 Secret Callback Error";
|
||||
|
||||
case DTLS_SIZE_ERROR:
|
||||
return "DTLS trying to send too much in single datagram error";
|
||||
|
||||
case NO_CERT_ERROR:
|
||||
return "TLS1.3 No Certificate Set Error";
|
||||
|
||||
default :
|
||||
return "unknown error number";
|
||||
}
|
||||
@@ -21004,7 +20972,7 @@ exit_dpk:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* HAVE_ECC */
|
||||
#endif /* HAVE_ECC || HAVE_CURVE25519 || HAVE_CURVE448 */
|
||||
|
||||
/* Persistable DoServerKeyExchange arguments */
|
||||
typedef struct DskeArgs {
|
||||
@@ -28077,6 +28045,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
||||
#endif
|
||||
} InternalTicket;
|
||||
|
||||
/* RFC 5077 defines this for session tickets */
|
||||
/* fit within SESSION_TICKET_LEN */
|
||||
typedef struct ExternalTicket {
|
||||
byte key_name[WOLFSSL_TICKET_NAME_SZ]; /* key context name */
|
||||
@@ -29977,7 +29946,7 @@ int wolfSSL_GetMaxRecordSize(WOLFSSL* ssl, int maxFragment)
|
||||
}
|
||||
#endif /* HAVE_MAX_FRAGMENT */
|
||||
#ifdef WOLFSSL_DTLS
|
||||
if ((ssl->options.dtls) && (maxFragment > MAX_UDP_SIZE)) {
|
||||
if (IsDtlsNotSctpMode(ssl) && (maxFragment > MAX_UDP_SIZE)) {
|
||||
maxFragment = MAX_UDP_SIZE;
|
||||
}
|
||||
#endif
|
||||
|
||||
+1038
-273
File diff suppressed because it is too large
Load Diff
@@ -2025,7 +2025,7 @@ static int wolfSSL_read_internal(WOLFSSL* ssl, void* data, int sz, int peek)
|
||||
#ifdef WOLFSSL_SCTP
|
||||
if (ssl->options.dtlsSctp)
|
||||
#endif
|
||||
#if defined(WOLLSSL_SCTP) || defined(WOLFSSL_DTLS_MTU)
|
||||
#if defined(WOLFSSL_SCTP) || defined(WOLFSSL_DTLS_MTU)
|
||||
ssl->dtls_expected_rx = max(ssl->dtls_expected_rx, ssl->dtlsMtuSz);
|
||||
#endif
|
||||
}
|
||||
@@ -17388,9 +17388,39 @@ WOLFSSL_X509* wolfSSL_X509_d2i(WOLFSSL_X509** x509, const byte* in, int len)
|
||||
|
||||
return newX509;
|
||||
}
|
||||
|
||||
int wolfSSL_X509_get_isCA(WOLFSSL_X509* x509)
|
||||
{
|
||||
int isCA = 0;
|
||||
|
||||
WOLFSSL_ENTER("wolfSSL_X509_get_isCA");
|
||||
|
||||
if (x509 != NULL)
|
||||
isCA = x509->isCa;
|
||||
|
||||
WOLFSSL_LEAVE("wolfSSL_X509_get_isCA", isCA);
|
||||
|
||||
return isCA;
|
||||
}
|
||||
#endif /* KEEP_PEER_CERT || SESSION_CERTS || OPENSSL_EXTRA ||
|
||||
OPENSSL_EXTRA_X509_SMALL */
|
||||
|
||||
#if defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL)
|
||||
/* returns the number of entries in the WOLFSSL_X509_NAME */
|
||||
int wolfSSL_X509_NAME_entry_count(WOLFSSL_X509_NAME* name)
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
WOLFSSL_ENTER("wolfSSL_X509_NAME_entry_count");
|
||||
|
||||
if (name != NULL)
|
||||
count = name->entrySz;
|
||||
|
||||
WOLFSSL_LEAVE("wolfSSL_X509_NAME_entry_count", count);
|
||||
return count;
|
||||
}
|
||||
#endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */
|
||||
|
||||
|
||||
|
||||
#if defined(OPENSSL_ALL) || defined(KEEP_OUR_CERT) || defined(KEEP_PEER_CERT) || \
|
||||
@@ -17416,20 +17446,6 @@ WOLFSSL_X509* wolfSSL_X509_d2i(WOLFSSL_X509** x509, const byte* in, int len)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int wolfSSL_X509_get_isCA(WOLFSSL_X509* x509)
|
||||
{
|
||||
int isCA = 0;
|
||||
|
||||
WOLFSSL_ENTER("wolfSSL_X509_get_isCA");
|
||||
|
||||
if (x509 != NULL)
|
||||
isCA = x509->isCa;
|
||||
|
||||
WOLFSSL_LEAVE("wolfSSL_X509_get_isCA", isCA);
|
||||
|
||||
return isCA;
|
||||
}
|
||||
|
||||
int wolfSSL_X509_get_signature(WOLFSSL_X509* x509,
|
||||
unsigned char* buf, int* bufSz)
|
||||
{
|
||||
@@ -20264,21 +20280,6 @@ int wolfSSL_X509_cmp(const WOLFSSL_X509 *a, const WOLFSSL_X509 *b)
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
/* returns the number of entries in the WOLFSSL_X509_NAME */
|
||||
int wolfSSL_X509_NAME_entry_count(WOLFSSL_X509_NAME* name)
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
WOLFSSL_ENTER("wolfSSL_X509_NAME_entry_count");
|
||||
|
||||
if (name != NULL)
|
||||
count = name->entrySz;
|
||||
|
||||
WOLFSSL_LEAVE("wolfSSL_X509_NAME_entry_count", count);
|
||||
return count;
|
||||
}
|
||||
#endif /* !NO_CERTS && OPENSSL_EXTRA */
|
||||
|
||||
#if defined(OPENSSL_EXTRA) || defined(WOLFSSL_WPAS_SMALL) || \
|
||||
@@ -24958,9 +24959,9 @@ long wolfSSL_set_tlsext_debug_arg(WOLFSSL* ssl, void *arg)
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
|
||||
#if defined(OPENSSL_ALL) || defined(WOLFSSL_HAPROXY)
|
||||
const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *sess, unsigned int *sid_ctx_length)
|
||||
const unsigned char *SSL_SESSION_get0_id_context(const WOLFSSL_SESSION *sess, unsigned int *sid_ctx_length)
|
||||
{
|
||||
const byte *c = wolfSSL_SESSION_get_id((SSL_SESSION *)sess, sid_ctx_length);
|
||||
const byte *c = wolfSSL_SESSION_get_id((WOLFSSL_SESSION *)sess, sid_ctx_length);
|
||||
return c;
|
||||
}
|
||||
#endif
|
||||
@@ -28686,21 +28687,21 @@ int SetDhInternal(WOLFSSL_DH* dh)
|
||||
int ret = WOLFSSL_FATAL_ERROR;
|
||||
int pSz = 1024;
|
||||
int gSz = 1024;
|
||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
int privSz = 256; /* Up to 2048-bit */
|
||||
int pubSz = 256;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
unsigned char* p = NULL;
|
||||
unsigned char* g = NULL;
|
||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
unsigned char* priv_key = NULL;
|
||||
unsigned char* pub_key = NULL;
|
||||
#endif
|
||||
#else
|
||||
unsigned char p[1024];
|
||||
unsigned char g[1024];
|
||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
unsigned char priv_key[256];
|
||||
unsigned char pub_key[256];
|
||||
#endif
|
||||
@@ -28714,21 +28715,22 @@ int SetDhInternal(WOLFSSL_DH* dh)
|
||||
WOLFSSL_MSG("Bad p internal size");
|
||||
else if (wolfSSL_BN_bn2bin(dh->g, NULL) > gSz)
|
||||
WOLFSSL_MSG("Bad g internal size");
|
||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
else if (wolfSSL_BN_bn2bin(dh->priv_key, NULL) > privSz)
|
||||
WOLFSSL_MSG("Bad private key internal size");
|
||||
else if (wolfSSL_BN_bn2bin(dh->pub_key, NULL) > privSz)
|
||||
WOLFSSL_MSG("Bad public key internal size");
|
||||
#endif
|
||||
#endif
|
||||
else {
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
p = (unsigned char*)XMALLOC(pSz, NULL, DYNAMIC_TYPE_PUBLIC_KEY);
|
||||
g = (unsigned char*)XMALLOC(gSz, NULL, DYNAMIC_TYPE_PUBLIC_KEY);
|
||||
|
||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||
priv_key = (unsigned char*)XMALLOC(privSz,NULL,DYNAMIC_TYPE_PRIVATE_KEY);
|
||||
pub_key = (unsigned char*)XMALLOC(pubSz,NULL,DYNAMIC_TYPE_PUBLIC_KEY);
|
||||
#endif
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
priv_key = (unsigned char*)XMALLOC(privSz, NULL,
|
||||
DYNAMIC_TYPE_PRIVATE_KEY);
|
||||
pub_key = (unsigned char*)XMALLOC(pubSz, NULL,
|
||||
DYNAMIC_TYPE_PUBLIC_KEY);
|
||||
#endif
|
||||
|
||||
if (p == NULL || g == NULL) {
|
||||
XFREE(p, NULL, DYNAMIC_TYPE_PUBLIC_KEY);
|
||||
@@ -28737,7 +28739,7 @@ int SetDhInternal(WOLFSSL_DH* dh)
|
||||
}
|
||||
#endif /* WOLFSSL_SMALL_STACK */
|
||||
|
||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
privSz = wolfSSL_BN_bn2bin(dh->priv_key, priv_key);
|
||||
pubSz = wolfSSL_BN_bn2bin(dh->pub_key, pub_key);
|
||||
if (privSz <= 0) {
|
||||
@@ -28747,13 +28749,17 @@ int SetDhInternal(WOLFSSL_DH* dh)
|
||||
WOLFSSL_MSG("No public key size.");
|
||||
}
|
||||
if (privSz > 0 || pubSz > 0) {
|
||||
ret = wc_DhSetFullKeys((DhKey*)dh->internal,priv_key,privSz,
|
||||
pub_key,pubSz);
|
||||
if (ret == WOLFSSL_FAILURE) {
|
||||
ret = wc_DhImportKeyPair((DhKey*)dh->internal, priv_key, privSz,
|
||||
pub_key, pubSz);
|
||||
if (ret == 0) {
|
||||
ret = WOLFSSL_SUCCESS;
|
||||
}
|
||||
else {
|
||||
WOLFSSL_MSG("Failed setting private or public key.");
|
||||
ret = WOLFSSL_FAILURE;
|
||||
}
|
||||
}
|
||||
#endif /* WOLFSSL_QT || OPENSSL_ALL */
|
||||
#endif /* WOLFSSL_DH_EXTRA */
|
||||
|
||||
pSz = wolfSSL_BN_bn2bin(dh->p, p);
|
||||
gSz = wolfSSL_BN_bn2bin(dh->g, g);
|
||||
@@ -28770,14 +28776,13 @@ int SetDhInternal(WOLFSSL_DH* dh)
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
XFREE(p, NULL, DYNAMIC_TYPE_PUBLIC_KEY);
|
||||
XFREE(g, NULL, DYNAMIC_TYPE_PUBLIC_KEY);
|
||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
XFREE(priv_key, NULL, DYNAMIC_TYPE_PRIVATE_KEY);
|
||||
XFREE(pub_key, NULL, DYNAMIC_TYPE_PUBLIC_KEY);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -29441,9 +29446,10 @@ int wolfSSL_DH_set0_pqg(WOLFSSL_DH *dh, WOLFSSL_BIGNUM *p,
|
||||
#endif /* !HAVE_FIPS || HAVE_FIPS_VERSION > 2 */
|
||||
|
||||
#endif /* NO_DH */
|
||||
#endif /* OPENSSL_EXTRA */
|
||||
|
||||
|
||||
#ifndef NO_DSA
|
||||
#if !defined(NO_DSA) && \
|
||||
(defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL))
|
||||
static void InitwolfSSL_DSA(WOLFSSL_DSA* dsa)
|
||||
{
|
||||
if (dsa) {
|
||||
@@ -29516,12 +29522,6 @@ void wolfSSL_DSA_free(WOLFSSL_DSA* dsa)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* NO_DSA */
|
||||
#endif /* OPENSSL_EXTRA */
|
||||
|
||||
#ifdef OPENSSL_EXTRA
|
||||
|
||||
#ifndef NO_DSA
|
||||
/* wolfSSL -> OpenSSL */
|
||||
int SetDsaExternal(WOLFSSL_DSA* dsa)
|
||||
{
|
||||
@@ -29564,7 +29564,10 @@ int SetDsaExternal(WOLFSSL_DSA* dsa)
|
||||
|
||||
return WOLFSSL_SUCCESS;
|
||||
}
|
||||
#endif /* !NO_DSA && (OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL) */
|
||||
|
||||
|
||||
#if !defined(NO_DSA) && defined(OPENSSL_EXTRA)
|
||||
/* Openssl -> WolfSSL */
|
||||
int SetDsaInternal(WOLFSSL_DSA* dsa)
|
||||
{
|
||||
@@ -29620,8 +29623,7 @@ int SetDsaInternal(WOLFSSL_DSA* dsa)
|
||||
|
||||
return WOLFSSL_SUCCESS;
|
||||
}
|
||||
#endif /* NO_DSA */
|
||||
#endif /* OPENSSL_EXTRA */
|
||||
#endif /* !NO_DSA && OPENSSL_EXTRA */
|
||||
|
||||
|
||||
#ifdef OPENSSL_EXTRA
|
||||
@@ -35559,8 +35561,8 @@ int wolfSSL_RSA_set0_key(WOLFSSL_RSA *r, WOLFSSL_BIGNUM *n, WOLFSSL_BIGNUM *e,
|
||||
#endif /* OPENSSL_EXTRA */
|
||||
#endif /* NO_RSA */
|
||||
|
||||
#ifdef OPENSSL_EXTRA
|
||||
#ifndef NO_DSA
|
||||
#if !defined(NO_DSA) && \
|
||||
(defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL))
|
||||
/* return WOLFSSL_SUCCESS if success, WOLFSSL_FATAL_ERROR if error */
|
||||
int wolfSSL_DSA_LoadDer(WOLFSSL_DSA* dsa, const unsigned char* derBuf, int derSz)
|
||||
{
|
||||
@@ -35630,8 +35632,9 @@ int wolfSSL_DSA_LoadDer_ex(WOLFSSL_DSA* dsa, const unsigned char* derBuf,
|
||||
|
||||
return WOLFSSL_SUCCESS;
|
||||
}
|
||||
#endif /* !NO_DSA */
|
||||
#endif /* !NO_DSA && (OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL) */
|
||||
|
||||
#ifdef OPENSSL_EXTRA
|
||||
#ifdef HAVE_ECC
|
||||
/* return WOLFSSL_SUCCESS if success, WOLFSSL_FATAL_ERROR if error */
|
||||
int wolfSSL_EC_KEY_LoadDer(WOLFSSL_EC_KEY* key, const unsigned char* derBuf,
|
||||
@@ -36748,9 +36751,16 @@ static int CopyX509NameToCertName(WOLFSSL_X509_NAME* n, CertName* cName)
|
||||
int hashType;
|
||||
int sigType = WOLFSSL_FAILURE;
|
||||
|
||||
#if !defined(NO_PWDBASED)
|
||||
/* Convert key type and hash algorithm to a signature algorithm */
|
||||
if (wolfSSL_EVP_get_hashinfo(md, &hashType, NULL) == WOLFSSL_FAILURE)
|
||||
if (wolfSSL_EVP_get_hashinfo(md, &hashType, NULL) == WOLFSSL_FAILURE) {
|
||||
return WOLFSSL_FAILURE;
|
||||
}
|
||||
#else
|
||||
(void)md;
|
||||
WOLFSSL_MSG("Cannot get hashinfo when NO_PWDBASED is defined");
|
||||
return WOLFSSL_FAILURE;
|
||||
#endif /* !defined(NO_PWDBASED) */
|
||||
|
||||
|
||||
if (pkey->type == EVP_PKEY_RSA) {
|
||||
@@ -47743,4 +47753,106 @@ int wolfSSL_X509_REQ_set_pubkey(WOLFSSL_X509 *req, WOLFSSL_EVP_PKEY *pkey)
|
||||
}
|
||||
#endif /* OPENSSL_EXTRA && !NO_CERTS && WOLFSSL_CERT_GEN && WOLFSSL_CERT_REQ */
|
||||
|
||||
#ifdef WOLFSSL_STATIC_EPHEMERAL
|
||||
static int SetStaticEphemeralKey(StaticKeyExchangeInfo_t* staticKE, int keyAlgo,
|
||||
const char* key, unsigned int keySz, int format, void* heap)
|
||||
{
|
||||
int ret = 0;
|
||||
byte* keyBuf = NULL;
|
||||
#ifndef NO_FILESYSTEM
|
||||
const char* keyFile = NULL;
|
||||
#endif
|
||||
|
||||
/* allow empty key to free buffer */
|
||||
if (staticKE == NULL || (key == NULL && keySz > 0)) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
/* check if just free'ing key */
|
||||
if (key == NULL && keySz == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef NO_FILESYSTEM
|
||||
/* load file from filesystem */
|
||||
if (key && keySz == 0) {
|
||||
size_t keyBufSz = 0;
|
||||
keyFile = (const char*)key;
|
||||
ret = wc_FileLoad(keyFile, &keyBuf, &keyBufSz, heap);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
keySz = (unsigned int)keyBufSz;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
/* use as key buffer directly */
|
||||
keyBuf = (byte*)key;
|
||||
}
|
||||
|
||||
if (format == WOLFSSL_FILETYPE_PEM) {
|
||||
#ifdef WOLFSSL_PEM_TO_DER
|
||||
int keyFormat = 0;
|
||||
ret = PemToDer(keyBuf, keySz, PRIVATEKEY_TYPE, &staticKE->key,
|
||||
heap, NULL, &keyFormat);
|
||||
/* auto detect key type */
|
||||
if (ret == 0 && keyAlgo == 0) {
|
||||
if (keyFormat == ECDSAk)
|
||||
keyAlgo = WC_PK_TYPE_ECDH;
|
||||
else
|
||||
keyAlgo = WC_PK_TYPE_DH;
|
||||
}
|
||||
#else
|
||||
ret = NOT_COMPILED_IN;
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
ret = AllocDer(&staticKE->key, keySz, PRIVATEKEY_TYPE, heap);
|
||||
if (ret == 0) {
|
||||
XMEMCPY(staticKE->key->buffer, keyBuf, keySz);
|
||||
}
|
||||
}
|
||||
staticKE->keyAlgo = keyAlgo;
|
||||
|
||||
#ifndef NO_FILESYSTEM
|
||||
if (keyFile && keyBuf) {
|
||||
XFREE(keyBuf, heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
}
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
int wolfSSL_CTX_set_ephemeral_key(WOLFSSL_CTX* ctx, int keyAlgo,
|
||||
const char* key, unsigned int keySz, int format)
|
||||
{
|
||||
if (ctx == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
/* if key is already set free it */
|
||||
if (ctx->staticKE.key != NULL) {
|
||||
FreeDer(&ctx->staticKE.key);
|
||||
}
|
||||
|
||||
return SetStaticEphemeralKey(&ctx->staticKE, keyAlgo, key, keySz, format,
|
||||
ctx->heap);
|
||||
}
|
||||
|
||||
int wolfSSL_set_ephemeral_key(WOLFSSL* ssl, int keyAlgo,
|
||||
const char* key, unsigned int keySz, int format)
|
||||
{
|
||||
if (ssl == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
/* if key is already set and not created by ctx... set free it */
|
||||
if (ssl->staticKE.key != NULL && ssl->staticKE.key != ssl->ctx->staticKE.key) {
|
||||
FreeDer(&ssl->staticKE.key);
|
||||
}
|
||||
|
||||
return SetStaticEphemeralKey(&ssl->staticKE, keyAlgo, key, keySz, format,
|
||||
ssl->heap);
|
||||
}
|
||||
|
||||
#endif /* WOLFSSL_STATIC_EPHEMERAL */
|
||||
|
||||
@@ -3528,14 +3528,19 @@ static int TLSX_CSR2_Parse(WOLFSSL* ssl, byte* input, word16 length,
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
/* accept the first good status_type and return */
|
||||
ret = TLSX_UseCertificateStatusRequestV2(&ssl->extensions,
|
||||
/* TLS 1.3 servers MUST NOT act upon presence or information in
|
||||
* this extension (RFC 8448 Section 4.4.2.1).
|
||||
*/
|
||||
if (!IsAtLeastTLSv1_3(ssl->version)) {
|
||||
/* accept the first good status_type and return */
|
||||
ret = TLSX_UseCertificateStatusRequestV2(&ssl->extensions,
|
||||
status_type, 0, ssl->heap, ssl->devId);
|
||||
if (ret != WOLFSSL_SUCCESS)
|
||||
return ret; /* throw error */
|
||||
if (ret != WOLFSSL_SUCCESS)
|
||||
return ret; /* throw error */
|
||||
|
||||
TLSX_SetResponse(ssl, TLSX_STATUS_REQUEST_V2);
|
||||
ssl->status_request_v2 = status_type;
|
||||
TLSX_SetResponse(ssl, TLSX_STATUS_REQUEST_V2);
|
||||
ssl->status_request_v2 = status_type;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -6621,14 +6626,14 @@ static int TLSX_KeyShare_GenDhKey(WOLFSSL *ssl, KeyShareEntry* kse)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Allocate space for the public key. */
|
||||
/* Allocate space for the public key */
|
||||
dataSz = params->p_len;
|
||||
keyData = (byte*)XMALLOC(dataSz, ssl->heap, DYNAMIC_TYPE_PUBLIC_KEY);
|
||||
if (keyData == NULL) {
|
||||
ret = MEMORY_E;
|
||||
goto end;
|
||||
}
|
||||
/* Allocate space for the private key. */
|
||||
/* Allocate space for the private key */
|
||||
key = (byte*)XMALLOC(keySz, ssl->heap, DYNAMIC_TYPE_PRIVATE_KEY);
|
||||
if (key == NULL) {
|
||||
ret = MEMORY_E;
|
||||
@@ -6642,20 +6647,34 @@ static int TLSX_KeyShare_GenDhKey(WOLFSSL *ssl, KeyShareEntry* kse)
|
||||
if (ret != 0)
|
||||
goto end;
|
||||
|
||||
/* Generate a new key pair. */
|
||||
ret = wc_DhGenerateKeyPair(dhKey, ssl->rng, (byte*)key, &keySz, keyData,
|
||||
&dataSz);
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
/* TODO: Make this function non-blocking */
|
||||
if (ret == WC_PENDING_E) {
|
||||
ret = wc_AsyncWait(ret, &dhKey->asyncDev, WC_ASYNC_FLAG_NONE);
|
||||
#if defined(WOLFSSL_STATIC_EPHEMERAL) && defined(WOLFSSL_DH_EXTRA)
|
||||
if (ssl->staticKE.key && ssl->staticKE.keyAlgo == WC_PK_TYPE_DH) {
|
||||
DerBuffer* keyDer = ssl->staticKE.key;
|
||||
word32 idx = 0;
|
||||
WOLFSSL_MSG("Using static DH key");
|
||||
ret = wc_DhKeyDecode(keyDer->buffer, &idx, dhKey, keyDer->length);
|
||||
if (ret == 0) {
|
||||
ret = wc_DhExportKeyPair(dhKey, (byte*)key, &keySz, keyData, &dataSz);
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
/* Generate a new key pair */
|
||||
ret = wc_DhGenerateKeyPair(dhKey, ssl->rng, (byte*)key, &keySz, keyData,
|
||||
&dataSz);
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
/* TODO: Make this function non-blocking */
|
||||
if (ret == WC_PENDING_E) {
|
||||
ret = wc_AsyncWait(ret, &dhKey->asyncDev, WC_ASYNC_FLAG_NONE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (ret != 0)
|
||||
goto end;
|
||||
|
||||
if (params->p_len != dataSz) {
|
||||
/* Pad the front of the key data with zeros. */
|
||||
/* Zero pad the front of the public key to match prime "p" size */
|
||||
XMEMMOVE(keyData + params->p_len - dataSz, keyData, dataSz);
|
||||
XMEMSET(keyData, 0, params->p_len - dataSz);
|
||||
}
|
||||
@@ -6913,13 +6932,26 @@ static int TLSX_KeyShare_GenEccKey(WOLFSSL *ssl, KeyShareEntry* kse)
|
||||
ret = wc_ecc_init_ex(eccKey, ssl->heap, ssl->devId);
|
||||
if (ret != 0)
|
||||
goto end;
|
||||
ret = wc_ecc_make_key_ex(ssl->rng, keySize, eccKey, curveId);
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
/* TODO: Make this function non-blocking */
|
||||
if (ret == WC_PENDING_E) {
|
||||
ret = wc_AsyncWait(ret, &eccKey->asyncDev, WC_ASYNC_FLAG_NONE);
|
||||
|
||||
#ifdef WOLFSSL_STATIC_EPHEMERAL
|
||||
if (ssl->staticKE.key && ssl->staticKE.keyAlgo == WC_PK_TYPE_ECDH) {
|
||||
DerBuffer* keyDer = ssl->staticKE.key;
|
||||
word32 idx = 0;
|
||||
WOLFSSL_MSG("Using static ECDH key");
|
||||
ret = wc_EccPrivateKeyDecode(keyDer->buffer, &idx, eccKey, keyDer->length);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
/* Generate ephemeral ECC key */
|
||||
ret = wc_ecc_make_key_ex(ssl->rng, keySize, eccKey, curveId);
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
/* TODO: Make this function non-blocking */
|
||||
if (ret == WC_PENDING_E) {
|
||||
ret = wc_AsyncWait(ret, &eccKey->asyncDev, WC_ASYNC_FLAG_NONE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (ret != 0)
|
||||
goto end;
|
||||
|
||||
@@ -9120,6 +9152,7 @@ void TLSX_FreeAll(TLSX* list, void* heap)
|
||||
MFL_FREE_ALL(extension->data, heap);
|
||||
break;
|
||||
|
||||
case TLSX_EXTENDED_MASTER_SECRET:
|
||||
case TLSX_TRUNCATED_HMAC:
|
||||
/* Nothing to do. */
|
||||
break;
|
||||
@@ -9235,7 +9268,6 @@ static int TLSX_GetSize(TLSX* list, byte* semaphore, byte msgType,
|
||||
/* extension type + extension data length. */
|
||||
length += HELLO_EXT_TYPE_SZ + OPAQUE16_LEN;
|
||||
|
||||
|
||||
switch (extension->type) {
|
||||
|
||||
case TLSX_SERVER_NAME:
|
||||
@@ -9254,6 +9286,7 @@ static int TLSX_GetSize(TLSX* list, byte* semaphore, byte msgType,
|
||||
length += MFL_GET_SIZE(extension->data);
|
||||
break;
|
||||
|
||||
case TLSX_EXTENDED_MASTER_SECRET:
|
||||
case TLSX_TRUNCATED_HMAC:
|
||||
/* always empty. */
|
||||
break;
|
||||
@@ -9404,6 +9437,11 @@ static int TLSX_Write(TLSX* list, byte* output, byte* semaphore,
|
||||
offset += MFL_WRITE((byte*)extension->data, output + offset);
|
||||
break;
|
||||
|
||||
case TLSX_EXTENDED_MASTER_SECRET:
|
||||
WOLFSSL_MSG("Extended Master Secret");
|
||||
/* always empty. */
|
||||
break;
|
||||
|
||||
case TLSX_TRUNCATED_HMAC:
|
||||
WOLFSSL_MSG("Truncated HMAC extension to write");
|
||||
/* always empty. */
|
||||
@@ -10294,6 +10332,7 @@ int TLSX_GetRequestSize(WOLFSSL* ssl, byte msgType, word16* pLength)
|
||||
#ifdef WOLFSSL_TLS13
|
||||
#ifndef NO_CERTS
|
||||
else if (msgType == certificate_request) {
|
||||
/* Don't send out any extension except those that are turned off. */
|
||||
XMEMSET(semaphore, 0xff, SEMAPHORE_SIZE);
|
||||
#if !defined(WOLFSSL_NO_SIGALG)
|
||||
TURN_OFF(semaphore, TLSX_ToSemaphore(TLSX_SIGNATURE_ALGORITHMS));
|
||||
@@ -10388,6 +10427,7 @@ int TLSX_WriteRequest(WOLFSSL* ssl, byte* output, byte msgType, word16* pOffset)
|
||||
#ifdef WOLFSSL_TLS13
|
||||
#ifndef NO_CERTS
|
||||
else if (msgType == certificate_request) {
|
||||
/* Don't send out any extension except those that are turned off. */
|
||||
XMEMSET(semaphore, 0xff, SEMAPHORE_SIZE);
|
||||
#if !defined(WOLFSSL_NO_SIGALG)
|
||||
TURN_OFF(semaphore, TLSX_ToSemaphore(TLSX_SIGNATURE_ALGORITHMS));
|
||||
@@ -10491,6 +10531,7 @@ int TLSX_GetResponseSize(WOLFSSL* ssl, byte msgType, word16* pLength)
|
||||
|
||||
#ifdef WOLFSSL_TLS13
|
||||
case encrypted_extensions:
|
||||
/* Send out all extension except those that are turned on. */
|
||||
TURN_ON(semaphore, TLSX_ToSemaphore(TLSX_EC_POINT_FORMATS));
|
||||
TURN_ON(semaphore, TLSX_ToSemaphore(TLSX_SUPPORTED_VERSIONS));
|
||||
TURN_ON(semaphore, TLSX_ToSemaphore(TLSX_SESSION_TICKET));
|
||||
@@ -10501,6 +10542,9 @@ int TLSX_GetResponseSize(WOLFSSL* ssl, byte msgType, word16* pLength)
|
||||
#ifdef HAVE_CERTIFICATE_STATUS_REQUEST
|
||||
TURN_ON(semaphore, TLSX_ToSemaphore(TLSX_STATUS_REQUEST));
|
||||
#endif
|
||||
#ifdef HAVE_CERTIFICATE_STATUS_REQUEST_V2
|
||||
TURN_ON(semaphore, TLSX_ToSemaphore(TLSX_STATUS_REQUEST_V2));
|
||||
#endif
|
||||
#if defined(HAVE_SECURE_RENEGOTIATION)
|
||||
TURN_ON(semaphore, TLSX_ToSemaphore(TLSX_RENEGOTIATION_INFO));
|
||||
#endif
|
||||
@@ -10520,6 +10564,7 @@ int TLSX_GetResponseSize(WOLFSSL* ssl, byte msgType, word16* pLength)
|
||||
#ifdef WOLFSSL_TLS13
|
||||
#ifndef NO_CERTS
|
||||
case certificate:
|
||||
/* Don't send out any extension except those that are turned off. */
|
||||
XMEMSET(semaphore, 0xff, SEMAPHORE_SIZE);
|
||||
TURN_OFF(semaphore, TLSX_ToSemaphore(TLSX_STATUS_REQUEST));
|
||||
/* TODO: TLSX_SIGNED_CERTIFICATE_TIMESTAMP,
|
||||
@@ -10607,6 +10652,7 @@ int TLSX_WriteResponse(WOLFSSL *ssl, byte* output, byte msgType, word16* pOffset
|
||||
|
||||
#ifdef WOLFSSL_TLS13
|
||||
case encrypted_extensions:
|
||||
/* Send out all extension except those that are turned on. */
|
||||
TURN_ON(semaphore, TLSX_ToSemaphore(TLSX_EC_POINT_FORMATS));
|
||||
TURN_ON(semaphore, TLSX_ToSemaphore(TLSX_SUPPORTED_VERSIONS));
|
||||
TURN_ON(semaphore, TLSX_ToSemaphore(TLSX_SESSION_TICKET));
|
||||
@@ -10617,6 +10663,9 @@ int TLSX_WriteResponse(WOLFSSL *ssl, byte* output, byte msgType, word16* pOffset
|
||||
#ifdef HAVE_CERTIFICATE_STATUS_REQUEST
|
||||
TURN_ON(semaphore, TLSX_ToSemaphore(TLSX_STATUS_REQUEST));
|
||||
#endif
|
||||
#ifdef HAVE_CERTIFICATE_STATUS_REQUEST_V2
|
||||
TURN_ON(semaphore, TLSX_ToSemaphore(TLSX_STATUS_REQUEST_V2));
|
||||
#endif
|
||||
#if defined(HAVE_SECURE_RENEGOTIATION)
|
||||
TURN_ON(semaphore, TLSX_ToSemaphore(TLSX_RENEGOTIATION_INFO));
|
||||
#endif
|
||||
@@ -10636,6 +10685,8 @@ int TLSX_WriteResponse(WOLFSSL *ssl, byte* output, byte msgType, word16* pOffset
|
||||
#ifdef WOLFSSL_TLS13
|
||||
#ifndef NO_CERTS
|
||||
case certificate:
|
||||
/* Don't send out any extension except those that are turned
|
||||
* off. */
|
||||
XMEMSET(semaphore, 0xff, SEMAPHORE_SIZE);
|
||||
TURN_OFF(semaphore, TLSX_ToSemaphore(TLSX_STATUS_REQUEST));
|
||||
/* TODO: TLSX_SIGNED_CERTIFICATE_TIMESTAMP,
|
||||
|
||||
+82
-68
@@ -444,6 +444,9 @@ static const byte binderKeyLabel[BINDER_KEY_LABEL_SZ + 1] =
|
||||
static int DeriveBinderKey(WOLFSSL* ssl, byte* key)
|
||||
{
|
||||
WOLFSSL_MSG("Derive Binder Key");
|
||||
if (ssl == NULL || ssl->arrays == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
return DeriveKeyMsg(ssl, key, -1, ssl->arrays->secret,
|
||||
binderKeyLabel, BINDER_KEY_LABEL_SZ,
|
||||
NULL, 0, ssl->specs.mac_algorithm);
|
||||
@@ -467,6 +470,9 @@ static const byte binderKeyResumeLabel[BINDER_KEY_RESUME_LABEL_SZ + 1] =
|
||||
static int DeriveBinderKeyResume(WOLFSSL* ssl, byte* key)
|
||||
{
|
||||
WOLFSSL_MSG("Derive Binder Key - Resumption");
|
||||
if (ssl == NULL || ssl->arrays == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
return DeriveKeyMsg(ssl, key, -1, ssl->arrays->secret,
|
||||
binderKeyResumeLabel, BINDER_KEY_RESUME_LABEL_SZ,
|
||||
NULL, 0, ssl->specs.mac_algorithm);
|
||||
@@ -491,6 +497,9 @@ static int DeriveEarlyTrafficSecret(WOLFSSL* ssl, byte* key)
|
||||
{
|
||||
int ret;
|
||||
WOLFSSL_MSG("Derive Early Traffic Secret");
|
||||
if (ssl == NULL || ssl->arrays == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
ret = DeriveKey(ssl, key, -1, ssl->arrays->secret,
|
||||
earlyTrafficLabel, EARLY_TRAFFIC_LABEL_SZ,
|
||||
ssl->specs.mac_algorithm, 1);
|
||||
@@ -523,6 +532,9 @@ static int DeriveEarlyExporterSecret(WOLFSSL* ssl, byte* key)
|
||||
{
|
||||
int ret;
|
||||
WOLFSSL_MSG("Derive Early Exporter Secret");
|
||||
if (ssl == NULL || ssl->arrays == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
ret = DeriveKey(ssl, key, -1, ssl->arrays->secret,
|
||||
earlyExporterLabel, EARLY_EXPORTER_LABEL_SZ,
|
||||
ssl->specs.mac_algorithm, 1);
|
||||
@@ -556,6 +568,9 @@ static int DeriveClientHandshakeSecret(WOLFSSL* ssl, byte* key)
|
||||
{
|
||||
int ret;
|
||||
WOLFSSL_MSG("Derive Client Handshake Secret");
|
||||
if (ssl == NULL || ssl->arrays == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
ret = DeriveKey(ssl, key, -1, ssl->arrays->preMasterSecret,
|
||||
clientHandshakeLabel, CLIENT_HANDSHAKE_LABEL_SZ,
|
||||
ssl->specs.mac_algorithm, 1);
|
||||
@@ -587,6 +602,9 @@ static int DeriveServerHandshakeSecret(WOLFSSL* ssl, byte* key)
|
||||
{
|
||||
int ret;
|
||||
WOLFSSL_MSG("Derive Server Handshake Secret");
|
||||
if (ssl == NULL || ssl->arrays == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
ret = DeriveKey(ssl, key, -1, ssl->arrays->preMasterSecret,
|
||||
serverHandshakeLabel, SERVER_HANDSHAKE_LABEL_SZ,
|
||||
ssl->specs.mac_algorithm, 1);
|
||||
@@ -618,6 +636,9 @@ static int DeriveClientTrafficSecret(WOLFSSL* ssl, byte* key)
|
||||
{
|
||||
int ret;
|
||||
WOLFSSL_MSG("Derive Client Traffic Secret");
|
||||
if (ssl == NULL || ssl->arrays == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
ret = DeriveKey(ssl, key, -1, ssl->arrays->masterSecret,
|
||||
clientAppLabel, CLIENT_APP_LABEL_SZ,
|
||||
ssl->specs.mac_algorithm, 1);
|
||||
@@ -649,6 +670,9 @@ static int DeriveServerTrafficSecret(WOLFSSL* ssl, byte* key)
|
||||
{
|
||||
int ret;
|
||||
WOLFSSL_MSG("Derive Server Traffic Secret");
|
||||
if (ssl == NULL || ssl->arrays == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
ret = DeriveKey(ssl, key, -1, ssl->arrays->masterSecret,
|
||||
serverAppLabel, SERVER_APP_LABEL_SZ,
|
||||
ssl->specs.mac_algorithm, 1);
|
||||
@@ -681,6 +705,9 @@ static int DeriveExporterSecret(WOLFSSL* ssl, byte* key)
|
||||
{
|
||||
int ret;
|
||||
WOLFSSL_MSG("Derive Exporter Secret");
|
||||
if (ssl == NULL || ssl->arrays == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
ret = DeriveKey(ssl, key, -1, ssl->arrays->masterSecret,
|
||||
exporterMasterLabel, EXPORTER_MASTER_LABEL_SZ,
|
||||
ssl->specs.mac_algorithm, 1);
|
||||
@@ -710,9 +737,12 @@ static const byte resumeMasterLabel[RESUME_MASTER_LABEL_SZ + 1] =
|
||||
* key The derived key.
|
||||
* returns 0 on success, otherwise failure.
|
||||
*/
|
||||
static int DeriveResumptionSecret(WOLFSSL* ssl, byte* key)
|
||||
int DeriveResumptionSecret(WOLFSSL* ssl, byte* key)
|
||||
{
|
||||
WOLFSSL_MSG("Derive Resumption Secret");
|
||||
if (ssl == NULL || ssl->arrays == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
return DeriveKey(ssl, key, -1, ssl->arrays->masterSecret,
|
||||
resumeMasterLabel, RESUME_MASTER_LABEL_SZ,
|
||||
ssl->specs.mac_algorithm, 1);
|
||||
@@ -761,9 +791,12 @@ static int DeriveTrafficSecret(WOLFSSL* ssl, byte* secret)
|
||||
*
|
||||
* ssl The SSL/TLS object.
|
||||
*/
|
||||
static int DeriveEarlySecret(WOLFSSL* ssl)
|
||||
int DeriveEarlySecret(WOLFSSL* ssl)
|
||||
{
|
||||
WOLFSSL_MSG("Derive Early Secret");
|
||||
if (ssl == NULL || ssl->arrays == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
#if defined(HAVE_SESSION_TICKET) || !defined(NO_PSK)
|
||||
return Tls13_HKDF_Extract(ssl->arrays->secret, NULL, 0,
|
||||
ssl->arrays->psk_key, ssl->arrays->psk_keySz,
|
||||
@@ -784,13 +817,14 @@ static const byte derivedLabel[DERIVED_LABEL_SZ + 1] =
|
||||
*
|
||||
* ssl The SSL/TLS object.
|
||||
*/
|
||||
static int DeriveHandshakeSecret(WOLFSSL* ssl)
|
||||
int DeriveHandshakeSecret(WOLFSSL* ssl)
|
||||
{
|
||||
byte key[WC_MAX_DIGEST_SIZE];
|
||||
int ret;
|
||||
|
||||
WOLFSSL_MSG("Derive Handshake Secret");
|
||||
|
||||
if (ssl == NULL || ssl->arrays == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
ret = DeriveKeyMsg(ssl, key, -1, ssl->arrays->secret,
|
||||
derivedLabel, DERIVED_LABEL_SZ,
|
||||
NULL, 0, ssl->specs.mac_algorithm);
|
||||
@@ -807,13 +841,14 @@ static int DeriveHandshakeSecret(WOLFSSL* ssl)
|
||||
*
|
||||
* ssl The SSL/TLS object.
|
||||
*/
|
||||
static int DeriveMasterSecret(WOLFSSL* ssl)
|
||||
int DeriveMasterSecret(WOLFSSL* ssl)
|
||||
{
|
||||
byte key[WC_MAX_DIGEST_SIZE];
|
||||
int ret;
|
||||
|
||||
WOLFSSL_MSG("Derive Master Secret");
|
||||
|
||||
if (ssl == NULL || ssl->arrays == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
ret = DeriveKeyMsg(ssl, key, -1, ssl->arrays->preMasterSecret,
|
||||
derivedLabel, DERIVED_LABEL_SZ,
|
||||
NULL, 0, ssl->specs.mac_algorithm);
|
||||
@@ -838,8 +873,7 @@ static const byte resumptionLabel[RESUMPTION_LABEL_SZ+1] = "resumption";
|
||||
* secret The derived secret.
|
||||
* returns 0 on success, otherwise failure.
|
||||
*/
|
||||
static int DeriveResumptionPSK(WOLFSSL* ssl, byte* nonce, byte nonceLen,
|
||||
byte* secret)
|
||||
int DeriveResumptionPSK(WOLFSSL* ssl, byte* nonce, byte nonceLen, byte* secret)
|
||||
{
|
||||
int digestAlg;
|
||||
/* Only one protocol version defined at this time. */
|
||||
@@ -894,6 +928,10 @@ static int BuildTls13HandshakeHmac(WOLFSSL* ssl, byte* key, byte* hash,
|
||||
int hashSz = WC_SHA256_DIGEST_SIZE;
|
||||
int ret = BAD_FUNC_ARG;
|
||||
|
||||
if (ssl == NULL || key == NULL || hash == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
/* Get the hash of the previous handshake messages. */
|
||||
switch (ssl->specs.mac_algorithm) {
|
||||
#ifndef NO_SHA256
|
||||
@@ -965,7 +1003,7 @@ static const byte writeIVLabel[WRITE_IV_LABEL_SZ+1] = "iv";
|
||||
* store ready for provisioning.
|
||||
* returns 0 on success, otherwise failure.
|
||||
*/
|
||||
static int DeriveTls13Keys(WOLFSSL* ssl, int secret, int side, int store)
|
||||
int DeriveTls13Keys(WOLFSSL* ssl, int secret, int side, int store)
|
||||
{
|
||||
int ret = BAD_FUNC_ARG; /* Assume failure */
|
||||
int i = 0;
|
||||
@@ -1321,39 +1359,6 @@ end:
|
||||
#endif /* HAVE_SESSION_TICKET || !NO_PSK */
|
||||
|
||||
|
||||
#if !defined(NO_WOLFSSL_SERVER) && (defined(HAVE_SESSION_TICKET) || \
|
||||
!defined(NO_PSK))
|
||||
/* Add input to all handshake hashes.
|
||||
*
|
||||
* ssl The SSL/TLS object.
|
||||
* input The data to hash.
|
||||
* sz The size of the data to hash.
|
||||
* returns 0 on success, otherwise failure.
|
||||
*/
|
||||
static int HashInputRaw(WOLFSSL* ssl, const byte* input, int sz)
|
||||
{
|
||||
int ret = BAD_FUNC_ARG;
|
||||
|
||||
#ifndef NO_SHA256
|
||||
ret = wc_Sha256Update(&ssl->hsHashes->hashSha256, input, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA384
|
||||
ret = wc_Sha384Update(&ssl->hsHashes->hashSha384, input, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
#ifdef WOLFSSL_TLS13_SHA512
|
||||
ret = wc_Sha512Update(&ssl->hsHashes->hashSha512, input, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Extract the handshake header information.
|
||||
*
|
||||
* ssl The SSL/TLS object.
|
||||
@@ -2402,10 +2407,10 @@ static int RestartHandshakeHash(WOLFSSL* ssl)
|
||||
ret = InitHandshakeHashes(ssl);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
ret = HashOutputRaw(ssl, header, sizeof(header));
|
||||
ret = HashRaw(ssl, header, sizeof(header));
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
return HashOutputRaw(ssl, hash, hashSz);
|
||||
return HashRaw(ssl, hash, hashSz);
|
||||
}
|
||||
|
||||
/* The value in the random field of a ServerHello to indicate
|
||||
@@ -2578,7 +2583,7 @@ static int WritePSKBinders(WOLFSSL* ssl, byte* output, word32 idx)
|
||||
return ret;
|
||||
|
||||
/* Hash binders to complete the hash of the ClientHello. */
|
||||
ret = HashOutputRaw(ssl, output + idx, len);
|
||||
ret = HashRaw(ssl, output + idx, len);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -3197,7 +3202,13 @@ static int DoTls13CertificateRequest(WOLFSSL* ssl, const byte* input,
|
||||
ssl->options.sendVerify = SEND_CERT;
|
||||
}
|
||||
else {
|
||||
#ifndef WOLFSSL_NO_CLIENT_CERT_ERROR
|
||||
ssl->options.sendVerify = SEND_BLANK_CERT;
|
||||
#else
|
||||
WOLFSSL_MSG("Certificate required but none set on client");
|
||||
SendAlert(ssl, alert_fatal, illegal_parameter);
|
||||
return NO_CERT_ERROR;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* This message is always encrypted so add encryption padding. */
|
||||
@@ -3456,7 +3467,7 @@ static int DoPreSharedKeys(WOLFSSL* ssl, const byte* input, word32 helloSz,
|
||||
}
|
||||
|
||||
/* Hash the rest of the ClientHello. */
|
||||
ret = HashInputRaw(ssl, input + helloSz - bindersLen, bindersLen);
|
||||
ret = HashRaw(ssl, input + helloSz - bindersLen, bindersLen);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
@@ -3624,9 +3635,9 @@ static int RestartHandshakeHashWithCookie(WOLFSSL* ssl, Cookie* cookie)
|
||||
AddTls13HandShakeHeader(header, hashSz, 0, 0, message_hash, ssl);
|
||||
if ((ret = InitHandshakeHashes(ssl)) != 0)
|
||||
return ret;
|
||||
if ((ret = HashOutputRaw(ssl, header, sizeof(header))) != 0)
|
||||
if ((ret = HashRaw(ssl, header, sizeof(header))) != 0)
|
||||
return ret;
|
||||
if ((ret = HashOutputRaw(ssl, cookieData + idx, hashSz)) != 0)
|
||||
if ((ret = HashRaw(ssl, cookieData + idx, hashSz)) != 0)
|
||||
return ret;
|
||||
|
||||
/* Reconstruct the HelloRetryMessage for handshake hash. */
|
||||
@@ -3705,9 +3716,9 @@ static int RestartHandshakeHashWithCookie(WOLFSSL* ssl, Cookie* cookie)
|
||||
WOLFSSL_BUFFER(cookieData, cookie->len);
|
||||
#endif
|
||||
|
||||
if ((ret = HashOutputRaw(ssl, hrr, hrrIdx)) != 0)
|
||||
if ((ret = HashRaw(ssl, hrr, hrrIdx)) != 0)
|
||||
return ret;
|
||||
return HashOutputRaw(ssl, cookieData, cookie->len);
|
||||
return HashRaw(ssl, cookieData, cookie->len);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -5849,7 +5860,7 @@ exit_dcv:
|
||||
* sniff Indicates whether we are sniffing packets.
|
||||
* returns 0 on success and otherwise failure.
|
||||
*/
|
||||
static int DoTls13Finished(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
||||
int DoTls13Finished(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
||||
word32 size, word32 totalSz, int sniff)
|
||||
{
|
||||
int ret;
|
||||
@@ -5888,19 +5899,22 @@ static int DoTls13Finished(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
||||
|
||||
secret = ssl->keys.server_write_MAC_secret;
|
||||
}
|
||||
else
|
||||
else {
|
||||
secret = ssl->keys.client_write_MAC_secret;
|
||||
}
|
||||
|
||||
ret = BuildTls13HandshakeHmac(ssl, secret, mac, &finishedSz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
if (size != finishedSz)
|
||||
return BUFFER_ERROR;
|
||||
if (sniff == NO_SNIFF) {
|
||||
ret = BuildTls13HandshakeHmac(ssl, secret, mac, &finishedSz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
if (size != finishedSz)
|
||||
return BUFFER_ERROR;
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_CALLBACKS
|
||||
if (ssl->hsInfoOn) AddPacketName(ssl, "Finished");
|
||||
if (ssl->toInfoOn) AddLateName("Finished", &ssl->timeoutInfo);
|
||||
#endif
|
||||
#ifdef WOLFSSL_CALLBACKS
|
||||
if (ssl->hsInfoOn) AddPacketName(ssl, "Finished");
|
||||
if (ssl->toInfoOn) AddLateName("Finished", &ssl->timeoutInfo);
|
||||
#endif
|
||||
|
||||
if (sniff == NO_SNIFF) {
|
||||
/* Actually check verify data. */
|
||||
@@ -6349,8 +6363,8 @@ static int DoTls13NewSessionTicket(WOLFSSL* ssl, const byte* input,
|
||||
word32 ageAdd;
|
||||
word16 length;
|
||||
word32 now;
|
||||
const byte* nonce;
|
||||
byte nonceLength;
|
||||
const byte* nonce;
|
||||
byte nonceLength;
|
||||
|
||||
WOLFSSL_START(WC_FUNC_NEW_SESSION_TICKET_DO);
|
||||
WOLFSSL_ENTER("DoTls13NewSessionTicket");
|
||||
@@ -6506,14 +6520,14 @@ static int ExpectedResumptionSecret(WOLFSSL* ssl)
|
||||
#ifdef WOLFSSL_EARLY_DATA
|
||||
if (ssl->earlyData != no_early_data) {
|
||||
static byte endOfEarlyData[] = { 0x05, 0x00, 0x00, 0x00 };
|
||||
ret = HashInputRaw(ssl, endOfEarlyData, sizeof(endOfEarlyData));
|
||||
ret = HashRaw(ssl, endOfEarlyData, sizeof(endOfEarlyData));
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
if ((ret = HashInputRaw(ssl, header, sizeof(header))) != 0)
|
||||
if ((ret = HashRaw(ssl, header, sizeof(header))) != 0)
|
||||
return ret;
|
||||
if ((ret = HashInputRaw(ssl, mac, finishedSz)) != 0)
|
||||
if ((ret = HashRaw(ssl, mac, finishedSz)) != 0)
|
||||
return ret;
|
||||
|
||||
if ((ret = DeriveResumptionSecret(ssl, ssl->session.masterSecret)) != 0)
|
||||
|
||||
@@ -0,0 +1,640 @@
|
||||
# wolfSSL Sniffer
|
||||
|
||||
The wolfSSL sniffer can be used to passively sniff SSL traffic including https traffic. Of course the server’s private key is required in order to decode the SSL handshake and allow future decryption of SSL messages. Input to the sniffer should be raw packets beginning with the IP header.
|
||||
|
||||
## Installation
|
||||
|
||||
The wolfSSL sniffer requires the wolfSSL library version 1.8.0 or later. Future releases can be obtained from http://www.wolfssl.com
|
||||
|
||||
To build and install wolfSSL including the wolfSSL sniffer:
|
||||
|
||||
```sh
|
||||
./configure --enable-sniffer
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
|
||||
## Build Options
|
||||
|
||||
The wolfSSL sniffer has several build options to include some extra behavior: SSL Statistics, Session Watching, Store Data Callback, Chain Input, and allowing STARTTLS protocols.
|
||||
|
||||
The SSL Statistics option provides the logging of some additional statistics regarding the sessions being decoded. The statistics tracking uses a mutex to protect access to the tracking storage. To enable this option, use the following configure command line and build as before:
|
||||
|
||||
`./configure --enable-sniffer CPPFLAGS=-DWOLFSSL_SNIFFER_STATS`
|
||||
|
||||
The Session Watching option allows the sniffer to watch any packet provided it without initial setup. It will start to decode all TLS sessions and when the server’s certificate is detected, the certificate is given to a callback function provided by the user which should provide the appropriate private key. To enable this option, use the following configure command line and build as before:
|
||||
|
||||
`./configure --enable-sniffer CPPFLAGS=-DWOLFSSL_SNIFFER_WATCH`
|
||||
|
||||
The Store Data Callback option allows the sniffer to take a callback that is called when storing the application data into a custom buffer rather than into the reallocated data pointer the callback is called in a loop until all data is consumed. To enable this option, use the following configure command line and build as before:
|
||||
|
||||
`./configure --enable-sniffer CPPFLAGS=-DWOLFSSL_SNIFFER_STORE_DATA_CB`
|
||||
|
||||
The Chain Input option allows the sniffer to receive its input as a struct iovec list rather than a pointer to a raw packet. To enable this option, use the following configure command line and build as before:
|
||||
|
||||
`./configure --enable-sniffer CPPFLAGS=-DWOLFSSL_SNIFFER_CHAIN_INPUT`
|
||||
|
||||
The STARTTLS option allows the sniffer to receive and ignore plaintext before receiving the first TLS handshake message. This is useful for protocols like SMTP and POP3 which start out in plaintext and switch to TLS during the connection. To enable this option, use the following configure command line and build as before:
|
||||
|
||||
`./configure --enable-sniffer CPPFLAGS=-DSTARTTLS_ALLOWED`
|
||||
|
||||
All options may be enabled with the following configure command line:
|
||||
|
||||
```sh
|
||||
./configure --enable-sniffer \
|
||||
CPPFLAGS=”-DWOLFSSL_SNIFFER_STATS -DWOLFSSL_SNIFFER_WATCH \
|
||||
-DWOLFSSL_SNIFFER_STORE_DATA_CB -DWOLFSSL_SNIFFER_CHAIN_INPUT \
|
||||
-DSTARTTLS_ALLOWED”
|
||||
```
|
||||
|
||||
To add some other cipher support to the sniffer, you can add options like:
|
||||
|
||||
```sh
|
||||
--enable-arc4
|
||||
--enable-nullcipher
|
||||
--enable-des3
|
||||
```
|
||||
|
||||
By default, wolfSSL restricts RSA key sizes to 1024-bits minimum. To allow the decoding of smaller, less secure RSA keys like 512-bit keys, you will need to add the compiler flag `-DWOLFSSL_MIN_RSA_BITS=512` to CFLAGS or CPPFLAGS, or define it in your user-settings header.
|
||||
|
||||
|
||||
## Synchronous Cryptography Offload Options
|
||||
|
||||
The sniffer can take advantage of some crypto offload hardware if available. If you have an Intel QuickAssist board or a Cavium OCTEON II or III. Currently, only the algorithms AES-CBC, AES-GCM, and DES3-CBC are offloaded to the hardware. These directions assume you already have the QAT or OCTEON-SDK libraries built.
|
||||
|
||||
To build for QAT, use the following configure options:
|
||||
|
||||
```sh
|
||||
./configure --enable-sniffer --enable-cryptocb \
|
||||
--with-intelqa-sync=/path/to/qat
|
||||
```
|
||||
|
||||
To build with OCTEON II support for a standalone host:
|
||||
|
||||
```sh
|
||||
./configure --enable-sniffer --enable-cryptocb \
|
||||
--with-octeon-sync=/path/to/octeon-sdk
|
||||
```
|
||||
|
||||
To build with OCTEON III support for a Linux host:
|
||||
|
||||
```sh
|
||||
./configure --enable-sniffer --enable-cryptocb \
|
||||
--with-octeon-sync=/path/to/octeon-sdk \
|
||||
OCTEON_OBJ=obj-octeon3 OCTEON_HOST=linux
|
||||
```
|
||||
|
||||
|
||||
## Command Line Options
|
||||
|
||||
The wolfSSL sniffer includes a test application `snifftest` in the `sslSniffer/sslSnifferTest/ directory`. The command line application has several options that can be passed in at runtime to change the default behavior of the application. To execute a “live” sniff just run the application without any parameters and then pick an interface to sniff on followed by the port.
|
||||
|
||||
An example startup may look like this:
|
||||
|
||||
```sh
|
||||
$ cd sslSniffer/sslSnifferTest
|
||||
$ ./snifftest
|
||||
|
||||
1. en0 (No description available)
|
||||
2. fw0 (No description available)
|
||||
3. en1 (No description available)
|
||||
4. fw1 (No description available)
|
||||
5. p2p0 (No description available)
|
||||
6. en3 (No description available)
|
||||
7. lo0 (No description available)
|
||||
|
||||
Enter the interface number (1-7): 7
|
||||
server = 127.0.0.1
|
||||
server = ::1
|
||||
server = fe80::1
|
||||
|
||||
Enter the port to scan: 11111
|
||||
```
|
||||
|
||||
The above example sniffs on the localhost interface (lo0) with the default wolfSSL port of 11111 and uses the default wolfSSL server key `../../certs/server-key.pem` for RSA and `../../certs/ecc-key.pem` for ECC.
|
||||
|
||||
Trace output will be written to a file named `tracefile.txt`.
|
||||
|
||||
To decode a previously saved pcap file you will need to enter a few parameters.
|
||||
|
||||
The following table lists the accepted inputs in saved file mode.
|
||||
|
||||
Synopsis:
|
||||
|
||||
`snifftest dumpFile pemKey [server] [port] [password]`
|
||||
|
||||
`snifftest` Options Summary:
|
||||
|
||||
```
|
||||
Option Description Default Value
|
||||
dumpFile A previously saved pcap file NA
|
||||
pemKey The server’s private key in PEM format NA
|
||||
server The server’s IP address (v4 or v6) 127.0.0.1
|
||||
port The server port to sniff 443
|
||||
password Private Key Password if required NA
|
||||
```
|
||||
|
||||
To decode a pcap file named test.pcap with a server key file called myKey.pem that was generated on the localhost with a server at port 443 just use:
|
||||
|
||||
`./snifftest test.pcap myKey.pem`
|
||||
|
||||
If the server was on 10.0.1.2 and on port 12345 you could instead use:
|
||||
|
||||
`./snifftest test.pcap myKey.pem 10.0.1.2 12345`
|
||||
|
||||
If the server was on localhost using IPv6 and on port 12345 you could instead use:
|
||||
|
||||
`./snifftest test.pcap myKey.pem ::1 12345`
|
||||
|
||||
|
||||
## API Usage
|
||||
|
||||
The wolfSSL sniffer can be integrated into any application using the existing sniffer API.
|
||||
|
||||
Use the include `#include <wolfssl/sniffer.h>`.
|
||||
|
||||
### ssl_InitSniffer
|
||||
|
||||
```c
|
||||
void ssl_InitSniffer(void);
|
||||
```
|
||||
|
||||
Initializes the wolfSSL sniffer for use and should be called once per application.
|
||||
|
||||
### ssl_FreeSniffer
|
||||
|
||||
```c
|
||||
void ssl_FreeSniffer(void);
|
||||
```
|
||||
|
||||
Frees all resources consumed by the wolfSSL sniffer and should be called when use of the wolfSSL sniffer is no longer required.
|
||||
|
||||
### ssl_Trace
|
||||
|
||||
```c
|
||||
int ssl_Trace(const char* traceFile, char* error);
|
||||
```
|
||||
|
||||
Enables Tracing when a file is passed in. Disables Tracing if previously on and a NULL value is passed in for the file.
|
||||
|
||||
Returns Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
### ssl_SetPrivateKey
|
||||
|
||||
```c
|
||||
int ssl_SetPrivateKey(const char* serverAddress, int port,
|
||||
const char* keyFile, int keyFormat,
|
||||
const char* password, char* error);
|
||||
```
|
||||
|
||||
Creates a sniffer session based on the `serverAddress` and `port` inputs using the ECC or RSA `keyFile` as the server’s key.
|
||||
|
||||
The `keyFormat` can be either `FILETYPE_PEM` or `FILETYPE_DER`. If the keyFile has password protection then the password parameter can hold the proper value.
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
### ssl_SetPrivateKeyBuffer
|
||||
|
||||
```c
|
||||
int ssl_SetPrivateKeyBuffer(const char* address, int port,
|
||||
const char* keyBuf, int keySz, int typeKey,
|
||||
const char* password, char* error)
|
||||
```
|
||||
|
||||
Creates a sniffer session based on the `serverAddress` and `port` inputs using the ECC or RSA `keyBuf` and `keySz` as the server’s key.
|
||||
|
||||
The `keyFormat` can be either `FILETYPE_PEM` or `FILETYPE_DER`. If the keyFile has password protection then the password parameter can hold the proper value.
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
|
||||
### ssl_SetNamedPrivateKey
|
||||
|
||||
```c
|
||||
int ssl_SetNamedPrivateKey(const char* name,
|
||||
const char* serverAddress, int port,
|
||||
const char* keyFile, int keyFormat,
|
||||
const char* password, char* error);
|
||||
```
|
||||
|
||||
Creates a sniffer session for a server named `name` based on the `serverAddress` and `port` inputs using the ECC or RSA `keyFile` as the server’s key.
|
||||
|
||||
The `keyFormat` can be either `FILETYPE_PEM` or `FILETYPE_DER`. If the keyFile has password protection then the password parameter can hold the proper value.
|
||||
|
||||
This function requires that the SNI extension is enabled in the build (`HAVE_SNI`).
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
### ssl_SetNamedPrivateKeyBuffer
|
||||
|
||||
```c
|
||||
int ssl_SetNamedPrivateKeyBuffer(const char* name,
|
||||
const char* address, int port,
|
||||
const char* keyBuf, int keySz, int typeKey,
|
||||
const char* password, char* error)
|
||||
```
|
||||
|
||||
Creates a sniffer session for a server named `name` based on the `serverAddress` and `port` inputs using the ECC or RSA `keyBuf` and `keySz` as the server’s key.
|
||||
|
||||
The `keyFormat` can be either `FILETYPE_PEM` or `FILETYPE_DER`. If the keyFile has password protection then the password parameter can hold the proper value.
|
||||
|
||||
This function requires that the SNI extension is enabled in the build (`HAVE_SNI`).
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
### ssl_SetNamedEphemeralKey
|
||||
|
||||
```c
|
||||
int ssl_SetNamedEphemeralKey(const char* name,
|
||||
const char* address, int port,
|
||||
const char* keyFile, int typeKey,
|
||||
const char* password, char* error)
|
||||
```
|
||||
|
||||
Creates a sniffer session for a server named `name` based on the `serverAddress` and `port` inputs using ECC or DH static ephemeral key.
|
||||
|
||||
The `keyFormat` can be either `FILETYPE_PEM` or `FILETYPE_DER`. If the keyFile has password protection then the password parameter can hold the proper value.
|
||||
|
||||
This function requires that static ephemeral key support (`WOLFSSL_STATIC_EPHEMERAL`) and the SNI extension (`HAVE_SNI`) are enabled in the build.
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
### ssl_SetEphemeralKey
|
||||
|
||||
```c
|
||||
int ssl_SetEphemeralKey(const char* address, int port,
|
||||
const char* keyFile, int typeKey,
|
||||
const char* password, char* error)
|
||||
```
|
||||
Creates a sniffer session based on the `serverAddress` and `port` inputs using ECC or DH static ephemeral key.
|
||||
|
||||
The `keyFormat` can be either `FILETYPE_PEM` or `FILETYPE_DER`. If the keyFile has password protection then the password parameter can hold the proper value.
|
||||
|
||||
This function requires that static ephemeral key support (`WOLFSSL_STATIC_EPHEMERAL`) and the SNI extension (`HAVE_SNI`) are enabled in the build.
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
### ssl_DecodePacket
|
||||
|
||||
```c
|
||||
int ssl_DecodePacket(const unsigned char** packet, int length,
|
||||
unsigned char* data, char* error);
|
||||
```
|
||||
|
||||
### ssl_DecodePacketWithSessionInfo
|
||||
|
||||
```c
|
||||
int ssl_DecodePacketWithSessionInfo(const unsigned char* packet, int length,
|
||||
unsigned char** data, SSLInfo* sslInfo, char* error);
|
||||
```
|
||||
|
||||
Decodes a raw packet that begins with the IP header and is length bytes long. Any SSL application data will be stored in data which should be at least 16,384 bytes, the maximum SSL record size. Information about the SSL session will be copied into `sslInfo` if it is non-null.
|
||||
|
||||
The `SSLInfo` structure can be found in `sniffer.h`. It has information about the protocol version, cipher suite, server name indication, and key size in bits.
|
||||
|
||||
```c
|
||||
typedef struct SSLInfo
|
||||
{
|
||||
unsigned char isValid; /* indicates if the info in this struct is valid: 0 = no, 1 = yes */
|
||||
unsigned char protocolVersionMajor; /* SSL Version: major */
|
||||
unsigned char protocolVersionMinor; /* SSL Version: minor */
|
||||
unsigned char serverCipherSuite0; /* first byte, normally 0 */
|
||||
unsigned char serverCipherSuite; /* second byte, actual suite */
|
||||
unsigned char serverCipherSuiteName[256]; /* cipher name, e.g., "TLS_RSA_..." */
|
||||
unsigned char serverNameIndication[128];
|
||||
unsigned int keySize;
|
||||
} SSLInfo;
|
||||
```
|
||||
|
||||
Return Values:
|
||||
|
||||
* >0 on success and indicates the number of bytes written to data
|
||||
* 0 indicates no SSL data is ready yet
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
|
||||
### ssl_SetConnectionCb
|
||||
|
||||
```c
|
||||
int ssl_SetConnectionCb(SSLConnCb cb);
|
||||
```
|
||||
|
||||
Sets a callback function that will be called when the full session information is known and will provide a pointer to the session’s information. The callback function has the signature:
|
||||
|
||||
```c
|
||||
typedef void (*SSLConnCb)(const void* session, SSLInfo* info, void* ctx);
|
||||
```
|
||||
|
||||
Where session is the current session. info will be a pointer to the session’s info. The ctx is application specific context data passed to the callback.
|
||||
|
||||
Return Values:
|
||||
|
||||
* >0 on success and indicates the number of bytes written to data
|
||||
* 0 indicates no SSL data is ready yet
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
### ssl_SetConnectionCtx
|
||||
|
||||
```c
|
||||
int ssl_SetConnectionCtx(void* ctx);
|
||||
```
|
||||
|
||||
Stores ctx, a pointer to application specific context data that will be passed to the connection callback function. The wolfSSL sniffer will not know anything about the context data.
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred
|
||||
|
||||
|
||||
## API Usage: SSL Statistics options
|
||||
|
||||
For an example on the use of the sniffer stats option, search the source `snifftest.c` for `WOLFSSL_SNIFFER_STATS`.
|
||||
|
||||
See the header file `sniffer.h` for the structure `SSLStats` for the list of statistics that can be read.
|
||||
|
||||
```c
|
||||
typedef struct SSLStats
|
||||
{
|
||||
unsigned long int sslStandardConns;
|
||||
unsigned long int sslClientAuthConns;
|
||||
unsigned long int sslResumedConns;
|
||||
unsigned long int sslEphemeralMisses;
|
||||
unsigned long int sslResumeMisses;
|
||||
unsigned long int sslCiphersUnsupported;
|
||||
unsigned long int sslKeysUnmatched;
|
||||
unsigned long int sslKeyFails;
|
||||
unsigned long int sslDecodeFails;
|
||||
unsigned long int sslAlerts;
|
||||
unsigned long int sslDecryptedBytes;
|
||||
unsigned long int sslEncryptedBytes;
|
||||
unsigned long int sslEncryptedPackets;
|
||||
unsigned long int sslDecryptedPackets;
|
||||
unsigned long int sslKeyMatches;
|
||||
unsigned long int sslEncryptedConns;
|
||||
|
||||
unsigned long int sslResumptionValid;
|
||||
unsigned long int sslResumptionInserts;
|
||||
} SSLStats;
|
||||
```
|
||||
|
||||
### ssl_ResetStatistics
|
||||
|
||||
```c
|
||||
int ssl_ResetStatistics(void);
|
||||
```
|
||||
|
||||
Zeroes out the SSL sniffer statistics tracking storage.
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred
|
||||
|
||||
### ssl_ReadStatistics
|
||||
|
||||
```c
|
||||
int ssl_ReadStatistics(SSLStats* stats);
|
||||
```
|
||||
|
||||
Copies the SSL sniffer statistics into the provided `SSLStats` record, stats.
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred
|
||||
|
||||
### ssl_ReadResetStatistics
|
||||
|
||||
```c
|
||||
int ssl_ReadResetStatistics(SSLStats* stats);
|
||||
```
|
||||
|
||||
Copies the SSL sniffer statistics into the provided `SSLStats` records, stats, and then zeroes out the SSL sniffer statistics tracking storage in one action.
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred
|
||||
|
||||
|
||||
## API Usage: Session Watching option
|
||||
|
||||
For an example on the use of the session watching option, search the source `snifftest.c` for `WOLFSSL_SNIFFER_WATCH`.
|
||||
|
||||
### ssl_SetWatchKeyCallback
|
||||
|
||||
```c
|
||||
int ssl_SetWatchKeyCallback(SSLWatchCb cb, char* error);
|
||||
int ssl_SetWatchKeyCallback_ex(SSLWatchCb cb, int devId, char* error);
|
||||
```
|
||||
|
||||
Assigns a callback function to the wolfSSL sniffer used to locate and load a private key for a session at the time the sniffer knows the true identity of the server, when receiving its certificate message. The callback function is given to the parameter cb and any error string will be written into error. The function ssl_SetWatchKeyCallback_ex() takes an additional parameter called devId, the device ID of the hardware device handling the cryptography. The callback function has the signature:
|
||||
|
||||
```c
|
||||
typedef int (*SSLWatchCb)(void* vSniffer,
|
||||
const unsigned char* certHash, unsigned int certHashSz,
|
||||
const unsigned char* certChain, unsigned int certChainSz,
|
||||
void* ctx, char* error);
|
||||
```
|
||||
|
||||
The parameter `vSniffer` is a typeless pointer to the current sniffer session and is meant to be passed directly to the function `ssl_SetWatchKey`. `certHash` is a SHA-256 hash of the certificate sent by the server, and its size is `certHashSz`. A pointer to certificate message’s payload is provided in the parameter `certChain`, and the certificate chain’s size in `certChainSz`. This will be a list of pairs of 24-bit certificate sizes and raw DER certificates in network order from the wire. The application space callback context data is provided in parameter ctx and is set by the function `ssl_SetWatchKeyCtx`. Any error string is copied into parameter error. Your callback function can use these values to locate the appropriate private key and load it into the sniffer session with the function `ssl_SetWatchKey`.
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
### ssl_SetWatchKeyCtx
|
||||
|
||||
```c
|
||||
int ssl_SetWatchKeyCtx(void* ctx, char* error);
|
||||
```
|
||||
|
||||
Stores ctx, a pointer to application specific context data that will be passed to the watch key callback function. The wolfSSL sniffer will not know anything about the context data.
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
### ssl_SetWatchKey_file
|
||||
|
||||
```c
|
||||
int ssl_SetWatchKey_file(void* vSniffer, const char* keyFile, int keyType,
|
||||
const char* password, char* error);
|
||||
```
|
||||
|
||||
This function must be called from the watch key callback. Gives the sniffer session, vSniffer, the private key to be used to decrypt the pre-master secret. The key’s file name is given in the parameter keyFile, and that file will be loaded. The keyType is either `FILETYPE_PEM` or `FILETYPE_DER`. If the private key is encrypted, provide the text string password. Any error string is returned in error.
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
### ssl_SetWatchKey_buffer
|
||||
|
||||
```c
|
||||
int ssl_SetWatchKey_buffer(void* vSniffer, const unsigned char* key,
|
||||
unsigned int keySz, int keyType, char* error);
|
||||
```
|
||||
|
||||
This function must be called from the watch key callback. Gives the sniffer session, vSniffer, the private key to be used to decrypt the pre-master secret. The key is passed in by the pointer key, and is of size keySz. The keyType is either `FILETYPE_PEM` or `FILETYPE_DER`. Any error string is returned in error.
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
|
||||
## API Usage: Store Data Callback option
|
||||
|
||||
For an example on the use of the store data callback option, search the source `snifftest.c` for `WOLFSSL_SNIFFER_STORE_DATA_CB`.
|
||||
|
||||
### ssl_SetStoreDataCallback
|
||||
|
||||
```c
|
||||
int ssl_SetStoreDataCallback(SSLStoreDataCb cb);
|
||||
```
|
||||
|
||||
Assigns a callback function to the wolfSSL sniffer used to store data when processing an application data record. The callback function is given to the parameter cb.
|
||||
|
||||
The callback function has the signature:
|
||||
|
||||
```c
|
||||
typedef int (*SSLStoreDataCb)(const unsigned char* decryptBuf,
|
||||
unsigned int decryptBufSz, unsigned int decryptBufOffset,
|
||||
void* ctx);
|
||||
```
|
||||
|
||||
The parameter `decryptBuf` is a pointer to the beginning of the decrypted application data buffer. The value `decryptBufSz` is the number of bytes stored in the `decryptBuf`. `decryptBufOffset` is the offset into the `decryptBuf` where a copy should start. The `ctx` is an application specific parameter passed in the call to `ssl_DecodePacketWithSessionInfoStoreData()`. The callback should return the number of bytes copied out of `decryptBuf`. `decryptBufOffset` is a running sum of the bytes returned by the callback, and the loop stops when all bytes are consumed.
|
||||
|
||||
Return Values:
|
||||
|
||||
* 0 on success
|
||||
* -1 if a problem occurred
|
||||
|
||||
### ssl_DecodePacketWithSessionInfoStoreData
|
||||
|
||||
```c
|
||||
int ssl_DecodePacketWithSessionInfoStoreData(const unsigned char* packet,
|
||||
in1t length, void* ctx, SSLInfo* sslInfo, char* error);
|
||||
```
|
||||
|
||||
Decodes a raw packet that begins with the IP header and is length bytes long. Any SSL application data will be handed to the store data callback function, along with the parameter `ctx`. Information about the SSL session will be copied into `sslInfo` if it is non-null.
|
||||
|
||||
The SSLInfo structure can be found in sniffer.h. It has information about the protocol version, cipher suite, server name indication, and key size in bits.
|
||||
|
||||
Return Values:
|
||||
|
||||
* >0 on success and indicates the number of bytes written by the store data callback
|
||||
* 0 indicates no SSL data is ready yet
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
|
||||
## API Usage: Chain Input option
|
||||
|
||||
For an example on the use of the chain input option, search the source `snifftest.c` for `WOLFSSL_SNIFFER_CHAIN_INPUT`.
|
||||
|
||||
### ssl_DecodePacketWithChain
|
||||
|
||||
```c
|
||||
int ssl_DecodePacketWithChain(void* vChain, unsigned int chainSz,
|
||||
unsigned char** data, char* error);
|
||||
```
|
||||
|
||||
Decodes a raw chain of packet buffers stored in an iovec passed in as the value vChain. The first buffer in the chain begins with the IP header. The chain is chainSz packets long. Any SSL application data will be stored in data, which may be allocated by the sniffer. Information about the SSL session will be copied into sslInfo if it is non-null.
|
||||
|
||||
The SSLInfo structure can be found in sniffer.h. It has information about the protocol version, cipher suite, server name indication, and key size in bits.
|
||||
|
||||
Return Values:
|
||||
|
||||
* >0 on success and indicates the number of bytes written by the store data callback
|
||||
* 0 indicates no SSL data is ready yet
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
### ssl_DecodePacketWithChainSessionInfoStoreData
|
||||
|
||||
```c
|
||||
int ssl_DecodePacketWithChainSessionInfoStoreData(void* vChain,
|
||||
unsigned int chainSz, void* ctx, SSLInfo* sslInfo, char* error);
|
||||
```
|
||||
|
||||
This combines the options of decoding a chain input and storing data using a callback. Decodes a raw chain of packet buffers stored in an iovec passed in as the value vChain. The first buffer in the chain begins with the IP header. The chain is chainSz packets long. Any SSL application data will be handed to the store data callback function, along with the parameter ctx. Information about the SSL session will be copied into sslInfo if it is non-null.
|
||||
|
||||
The SSLInfo structure can be found in sniffer.h. It has information about the protocol version, cipher suite, server name indication, and key size in bits.
|
||||
|
||||
Return Values:
|
||||
|
||||
* >0 on success and indicates the number of bytes written by the store data callback
|
||||
* 0 indicates no SSL data is ready yet
|
||||
* -1 if a problem occurred, the string error will hold a message describing the problem
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
### Performance
|
||||
|
||||
Once your SSL sniffing is working as expected you should be able to get some performance gains by compiling wolfSSL with fastmath enabled. You can do this by adding `--enable-fastmath` to your ./configure options.
|
||||
|
||||
### Start up
|
||||
|
||||
Remember to always start the sniffing application before the server. This is important because if the SSL handshake is missed then future packets from that session will not be decoded. In addition, any future sessions that use the “missed” session to do session resumption, renegotiation, or use session tickets based on that “missed” session will have the same problems.
|
||||
|
||||
### Cipher Suite Limitations
|
||||
|
||||
As a passive sniffer the wolfSSL sniffer will not be able to decode any SSL session that uses DHE (Ephemeral Diffie-Hellman) because it will not have access to the temporary key that the server generates. You may need to disable DHE cipher suites on the server and/or client to prevent these cipher suites from being used.
|
||||
|
||||
### Thread Safety
|
||||
|
||||
Access to the sniffer session table is thread safe. What is not thread safe, is using the same sniffer session from multiple threads. For example, say sniffer session A is created by thread X. If 3 new packets come in for session A and threads X, Y, and Z all try to handle those packets concurrently that's a problem. Ideally, the main thread would associate an ssl sniffer session (client ip/client port <-> server ip/server port) with a particular thread and use that same thread for the lifetime of the session. Short of that, the sniffer session would need a lock which isn't ideal in a multithreaded scenario because once thread X locks the first packet from session A threads Y and Z would be blocked until thread X is done. That defeats the whole purpose doing multithreaded sniffing.
|
||||
|
||||
### Server Name Indication
|
||||
|
||||
Some webservers use virtual domain name mapping where multiple servers using separate SSL keys and certificates are sharing the same IP address and port. The Server Name Indication client hello extension allows the SSL client to specify the name of the server it is connecting to. When running the configure command in section 2.1, add the option --enable-sni.
|
||||
|
||||
### STARTTLS
|
||||
|
||||
Many protocols use ssl as a layer between them and the network layer, and have a dedicated port for the secure connection. Other protocols start out on their classic well known port number in the clear and then offer the “STARTTLS” command which tells the server the client wants to use ssl. The server responds with an affirmation, and the client sends its TLS client hello message and starts negotiation. The sniffer can ignore non-TLS messages on a session until the client starts to negotiate TLS and then proceed as normal.
|
||||
|
||||
|
||||
## Missing Features
|
||||
|
||||
### PSK
|
||||
|
||||
While wolfSSL supports Pre Shared Keys, the current version of the sniffer does not.
|
||||
|
||||
### Client Certificate URLs
|
||||
|
||||
Neither wolfSSL nor the sniffer current supports the TLS extension Client Certificate URLs.
|
||||
|
||||
### Secure Renegotiation
|
||||
|
||||
While wolfSSL supports secure renegotiation, the current version of the sniffer does not. The sniffer does support session resumption.
|
||||
|
||||
|
||||
## Support
|
||||
|
||||
For issues or questions please email support@wolfssl.com.
|
||||
@@ -8,6 +8,7 @@ sslSniffer_sslSnifferTest_snifftest_SOURCES = sslSniffer/sslSnifferTest/snifftes
|
||||
sslSniffer_sslSnifferTest_snifftest_LDADD = src/libwolfssl.la -lpcap $(LIB_STATIC_ADD)
|
||||
sslSniffer_sslSnifferTest_snifftest_DEPENDENCIES = src/libwolfssl.la
|
||||
endif
|
||||
EXTRA_DIST += sslSniffer/README.md
|
||||
EXTRA_DIST += sslSniffer/sslSniffer.vcproj
|
||||
EXTRA_DIST += sslSniffer/sslSniffer.vcxproj
|
||||
EXTRA_DIST += sslSniffer/sslSnifferTest/sslSniffTest.vcproj
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#endif
|
||||
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/types.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
|
||||
#ifdef WOLFSSL_SNIFFER_STORE_DATA_CB
|
||||
#include <wolfssl/wolfcrypt/memory.h>
|
||||
@@ -49,8 +51,8 @@ int main(void)
|
||||
/* do a full build */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* builds on *nix too, for scanf device and port */
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
/* builds on *nix too, for scanf device and port */
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#include <pcap/pcap.h> /* pcap stuff */
|
||||
@@ -96,6 +98,44 @@ enum {
|
||||
#endif
|
||||
|
||||
|
||||
#define DEFAULT_SERVER_EPH_KEY_ECC "../../certs/statickeys/ecc-secp256r1.pem"
|
||||
#define DEFAULT_SERVER_EPH_KEY_DH "../../certs/statickeys/dh-ffdhe2048.pem"
|
||||
#ifndef DEFAULT_SERVER_EPH_KEY
|
||||
#if defined(HAVE_ECC) && !defined(NO_ECC_SECP) && \
|
||||
(!defined(NO_ECC256) || defined(HAVE_ALL_CURVES))
|
||||
#define DEFAULT_SERVER_EPH_KEY DEFAULT_SERVER_EPH_KEY_ECC
|
||||
#elif !defined(NO_DH)
|
||||
#define DEFAULT_SERVER_EPH_KEY DEFAULT_SERVER_EPH_KEY_DH
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define DEFAULT_SERVER_KEY_RSA "../../certs/server-key.pem"
|
||||
#define DEFAULT_SERVER_KEY_ECC "../../certs/ecc-key.pem"
|
||||
#ifndef DEFAULT_SERVER_KEY
|
||||
#ifndef NO_RSA
|
||||
#define DEFAULT_SERVER_KEY DEFAULT_SERVER_KEY_RSA
|
||||
#elif defined(HAVE_ECC)
|
||||
#define DEFAULT_SERVER_KEY DEFAULT_SERVER_KEY_ECC
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef WOLFSSL_SNIFFER_WATCH
|
||||
static const byte rsaHash[] = {
|
||||
0x4e, 0xa8, 0x55, 0x02, 0xe1, 0x84, 0x7e, 0xe1,
|
||||
0xb5, 0x97, 0xd2, 0xf0, 0x92, 0x3a, 0xfd, 0x0d,
|
||||
0x98, 0x26, 0x06, 0x85, 0x8d, 0xa4, 0xc7, 0x35,
|
||||
0xd4, 0x74, 0x8f, 0xd0, 0xe7, 0xa8, 0x27, 0xaa
|
||||
};
|
||||
static const byte eccHash[] = {
|
||||
0x80, 0x3d, 0xff, 0xca, 0x2e, 0x20, 0xd9, 0xdf,
|
||||
0xfe, 0x64, 0x4e, 0x25, 0x6a, 0xee, 0xee, 0x60,
|
||||
0xc1, 0x48, 0x7b, 0xff, 0xa0, 0xfb, 0xeb, 0xac,
|
||||
0xe2, 0xa4, 0xdd, 0xb5, 0x18, 0x38, 0x78, 0x38
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
pcap_t* pcap = NULL;
|
||||
pcap_if_t* alldevs = NULL;
|
||||
|
||||
@@ -113,7 +153,6 @@ static void FreeAll(void)
|
||||
|
||||
|
||||
#ifdef WOLFSSL_SNIFFER_STATS
|
||||
|
||||
static void DumpStats(void)
|
||||
{
|
||||
SSLStats sslStats;
|
||||
@@ -152,8 +191,7 @@ static void DumpStats(void)
|
||||
printf("SSL Stats (sslEncryptedConns):%lu\n",
|
||||
sslStats.sslEncryptedConns);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* WOLFSSL_SNIFFER_STATS */
|
||||
|
||||
|
||||
static void sig_handler(const int sig)
|
||||
@@ -170,64 +208,45 @@ static void sig_handler(const int sig)
|
||||
|
||||
static void err_sys(const char* msg)
|
||||
{
|
||||
fprintf(stderr, "%s\n", msg);
|
||||
fprintf(stderr, "%s\n", msg);
|
||||
if (msg)
|
||||
exit(EXIT_FAILURE);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
#define SNPRINTF _snprintf
|
||||
#define SNPRINTF _snprintf
|
||||
#else
|
||||
#define SNPRINTF snprintf
|
||||
#define SNPRINTF snprintf
|
||||
#endif
|
||||
|
||||
|
||||
static char* iptos(const struct in_addr* addr)
|
||||
{
|
||||
static char output[32];
|
||||
byte *p = (byte*)&addr->s_addr;
|
||||
static char output[32];
|
||||
byte *p = (byte*)&addr->s_addr;
|
||||
|
||||
snprintf(output, sizeof(output), "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
|
||||
snprintf(output, sizeof(output), "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
|
||||
|
||||
return output;
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
static const char* ip6tos(const struct in6_addr* addr)
|
||||
{
|
||||
static char output[42];
|
||||
return inet_ntop(AF_INET6, addr, output, 42);
|
||||
static char output[42];
|
||||
return inet_ntop(AF_INET6, addr, output, 42);
|
||||
}
|
||||
|
||||
|
||||
#if defined(WOLFSSL_SNIFFER_STORE_DATA_CB) || defined(WOLFSSL_SNIFFER_CHAIN_INPUT)
|
||||
|
||||
static inline unsigned int min(unsigned int a, unsigned int b)
|
||||
{
|
||||
return a > b ? b : a;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef WOLFSSL_SNIFFER_WATCH
|
||||
|
||||
const byte rsaHash[] = {
|
||||
0xD1, 0xB6, 0x12, 0xAD, 0xB6, 0x50, 0x7B, 0x59,
|
||||
0x97, 0x83, 0x6B, 0xCB, 0x35, 0xF5, 0xB8, 0x67,
|
||||
0xEB, 0x83, 0x75, 0x40, 0x1B, 0x42, 0x61, 0xF1,
|
||||
0x03, 0x72, 0xDC, 0x09, 0x0D, 0x60, 0x83, 0x15
|
||||
};
|
||||
|
||||
const byte eccHash[] = {
|
||||
0xDA, 0x08, 0x6D, 0xB5, 0x0B, 0xC4, 0x9F, 0x8A,
|
||||
0x9E, 0x61, 0x9E, 0x87, 0x57, 0x5F, 0x00, 0xAA,
|
||||
0x76, 0xE5, 0x1C, 0x9C, 0x74, 0x2A, 0x19, 0xBE,
|
||||
0x22, 0xAE, 0x25, 0x3F, 0xA8, 0xAF, 0x8E, 0x7F
|
||||
};
|
||||
|
||||
|
||||
static int myWatchCb(void* vSniffer,
|
||||
const unsigned char* certHash, unsigned int certHashSz,
|
||||
const unsigned char* certChain, unsigned int certChainSz,
|
||||
@@ -240,23 +259,23 @@ static int myWatchCb(void* vSniffer,
|
||||
(void)ctx;
|
||||
|
||||
if (certHashSz == sizeof(rsaHash) &&
|
||||
memcmp(certHash, rsaHash, certHashSz) == 0)
|
||||
certName = "../../certs/server-key.pem";
|
||||
XMEMCMP(certHash, rsaHash, certHashSz) == 0) {
|
||||
certName = DEFAULT_SERVER_KEY_RSA;
|
||||
}
|
||||
if (certHashSz == sizeof(eccHash) &&
|
||||
memcmp(certHash, eccHash, certHashSz) == 0)
|
||||
certName = "../../certs/ecc-key.pem";
|
||||
XMEMCMP(certHash, eccHash, certHashSz) == 0) {
|
||||
certName = DEFAULT_SERVER_KEY_ECC;
|
||||
}
|
||||
|
||||
if (certName == NULL)
|
||||
return -1;
|
||||
|
||||
return ssl_SetWatchKey_file(vSniffer, certName, FILETYPE_PEM, NULL, error);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* WOLFSSL_SNIFFER_WATCH */
|
||||
|
||||
|
||||
#ifdef WOLFSSL_SNIFFER_STORE_DATA_CB
|
||||
|
||||
static int myStoreDataCb(const unsigned char* decryptBuf,
|
||||
unsigned int decryptBufSz, unsigned int decryptBufOffset, void* ctx)
|
||||
{
|
||||
@@ -283,29 +302,28 @@ static int myStoreDataCb(const unsigned char* decryptBuf,
|
||||
*data = tmpData;
|
||||
}
|
||||
|
||||
memcpy(*data + decryptBufOffset, decryptBuf + decryptBufOffset, qty);
|
||||
XMEMCPY(*data + decryptBufOffset, decryptBuf + decryptBufOffset, qty);
|
||||
|
||||
return qty;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* WOLFSSL_SNIFFER_STORE_DATA_CB */
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int ret = 0;
|
||||
int hadBadPacket = 0;
|
||||
int inum;
|
||||
int port;
|
||||
int inum = 0;
|
||||
int port = 0;
|
||||
int saveFile = 0;
|
||||
int i = 0;
|
||||
int i = 0, defDev = 0;
|
||||
int frame = ETHER_IF_FRAME_LEN;
|
||||
char err[PCAP_ERRBUF_SIZE];
|
||||
char filter[32];
|
||||
const char *server = NULL;
|
||||
struct bpf_program fp;
|
||||
pcap_if_t *d;
|
||||
pcap_addr_t *a;
|
||||
char filter[32];
|
||||
const char *server = NULL;
|
||||
struct bpf_program fp;
|
||||
pcap_if_t *d;
|
||||
pcap_addr_t *a;
|
||||
#ifdef WOLFSSL_SNIFFER_CHAIN_INPUT
|
||||
struct iovec chain[CHAIN_INPUT_COUNT];
|
||||
int chainSz;
|
||||
@@ -315,6 +333,9 @@ int main(int argc, char** argv)
|
||||
|
||||
#ifndef _WIN32
|
||||
ssl_InitSniffer(); /* dll load on Windows */
|
||||
#endif
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
//wolfSSL_Debugging_ON();
|
||||
#endif
|
||||
ssl_Trace("./tracefile.txt", err);
|
||||
ssl_EnableRecovery(1, -1, err);
|
||||
@@ -326,54 +347,58 @@ int main(int argc, char** argv)
|
||||
#endif
|
||||
|
||||
if (argc == 1) {
|
||||
char cmdLineArg[128];
|
||||
/* normal case, user chooses device and port */
|
||||
|
||||
if (pcap_findalldevs(&alldevs, err) == -1)
|
||||
err_sys("Error in pcap_findalldevs");
|
||||
if (pcap_findalldevs(&alldevs, err) == -1)
|
||||
err_sys("Error in pcap_findalldevs");
|
||||
|
||||
for (d = alldevs; d; d=d->next) {
|
||||
printf("%d. %s", ++i, d->name);
|
||||
if (d->description)
|
||||
printf(" (%s)\n", d->description);
|
||||
else
|
||||
printf(" (No description available)\n");
|
||||
}
|
||||
|
||||
if (i == 0)
|
||||
err_sys("No interfaces found! Make sure pcap or WinPcap is"
|
||||
" installed correctly and you have sufficient permissions");
|
||||
|
||||
printf("Enter the interface number (1-%d): ", i);
|
||||
ret = scanf("%d", &inum);
|
||||
if (ret != 1) {
|
||||
printf("scanf port failed\n");
|
||||
for (d = alldevs; d; d=d->next) {
|
||||
printf("%d. %s", ++i, d->name);
|
||||
if (strcmp(d->name, "lo0") == 0) {
|
||||
defDev = i;
|
||||
}
|
||||
if (d->description)
|
||||
printf(" (%s)\n", d->description);
|
||||
else
|
||||
printf(" (No description available)\n");
|
||||
}
|
||||
|
||||
if (inum < 1 || inum > i)
|
||||
err_sys("Interface number out of range");
|
||||
if (i == 0)
|
||||
err_sys("No interfaces found! Make sure pcap or WinPcap is"
|
||||
" installed correctly and you have sufficient permissions");
|
||||
|
||||
/* Jump to the selected adapter */
|
||||
for (d = alldevs, i = 0; i < inum - 1; d = d->next, i++);
|
||||
printf("Enter the interface number (1-%d) [default: %d]: ", i, defDev);
|
||||
XMEMSET(cmdLineArg, 0, sizeof(cmdLineArg));
|
||||
if (XFGETS(cmdLineArg, sizeof(cmdLineArg), stdin))
|
||||
inum = XATOI(cmdLineArg);
|
||||
if (inum == 0)
|
||||
inum = defDev;
|
||||
else if (inum < 1 || inum > i)
|
||||
err_sys("Interface number out of range");
|
||||
|
||||
pcap = pcap_create(d->name, err);
|
||||
/* Jump to the selected adapter */
|
||||
for (d = alldevs, i = 0; i < inum - 1; d = d->next, i++);
|
||||
|
||||
pcap = pcap_create(d->name, err);
|
||||
|
||||
if (pcap == NULL) printf("pcap_create failed %s\n", err);
|
||||
|
||||
/* print out addresses for selected interface */
|
||||
for (a = d->addresses; a; a = a->next) {
|
||||
for (a = d->addresses; a; a = a->next) {
|
||||
if (a->addr->sa_family == AF_INET) {
|
||||
server =
|
||||
server =
|
||||
iptos(&((struct sockaddr_in *)a->addr)->sin_addr);
|
||||
printf("server = %s\n", server);
|
||||
printf("server = %s\n", server);
|
||||
}
|
||||
else if (a->addr->sa_family == AF_INET6) {
|
||||
server =
|
||||
ip6tos(&((struct sockaddr_in6 *)a->addr)->sin6_addr);
|
||||
printf("server = %s\n", server);
|
||||
printf("server = %s\n", server);
|
||||
}
|
||||
}
|
||||
if (server == NULL)
|
||||
err_sys("Unable to get device IPv4 or IPv6 address");
|
||||
}
|
||||
if (server == NULL)
|
||||
err_sys("Unable to get device IPv4 or IPv6 address");
|
||||
|
||||
ret = pcap_set_snaplen(pcap, 65536);
|
||||
if (ret != 0) printf("pcap_set_snaplen failed %s\n", pcap_geterr(pcap));
|
||||
@@ -383,7 +408,7 @@ int main(int argc, char** argv)
|
||||
|
||||
ret = pcap_set_buffer_size(pcap, 1000000);
|
||||
if (ret != 0)
|
||||
printf("pcap_set_buffer_size failed %s\n", pcap_geterr(pcap));
|
||||
printf("pcap_set_buffer_size failed %s\n", pcap_geterr(pcap));
|
||||
|
||||
ret = pcap_set_promisc(pcap, 1);
|
||||
if (ret != 0) printf("pcap_set_promisc failed %s\n", pcap_geterr(pcap));
|
||||
@@ -392,24 +417,27 @@ int main(int argc, char** argv)
|
||||
ret = pcap_activate(pcap);
|
||||
if (ret != 0) printf("pcap_activate failed %s\n", pcap_geterr(pcap));
|
||||
|
||||
printf("Enter the port to scan: ");
|
||||
ret = scanf("%d", &port);
|
||||
if (ret != 1)
|
||||
printf("scanf port failed\n");
|
||||
printf("Enter the port to scan [default: 11111]: ");
|
||||
XMEMSET(cmdLineArg, 0, sizeof(cmdLineArg));
|
||||
if (XFGETS(cmdLineArg, sizeof(cmdLineArg), stdin)) {
|
||||
port = XATOI(cmdLineArg);
|
||||
}
|
||||
if (port <= 0)
|
||||
port = 11111;
|
||||
|
||||
SNPRINTF(filter, sizeof(filter), "tcp and port %d", port);
|
||||
SNPRINTF(filter, sizeof(filter), "tcp and port %d", port);
|
||||
|
||||
ret = pcap_compile(pcap, &fp, filter, 0, 0);
|
||||
ret = pcap_compile(pcap, &fp, filter, 0, 0);
|
||||
if (ret != 0) printf("pcap_compile failed %s\n", pcap_geterr(pcap));
|
||||
|
||||
ret = pcap_setfilter(pcap, &fp);
|
||||
if (ret != 0) printf("pcap_setfilter failed %s\n", pcap_geterr(pcap));
|
||||
|
||||
/* get IPv4 or IPv6 addresses for selected interface */
|
||||
for (a = d->addresses; a; a = a->next) {
|
||||
/* get IPv4 or IPv6 addresses for selected interface */
|
||||
for (a = d->addresses; a; a = a->next) {
|
||||
server = NULL;
|
||||
if (a->addr->sa_family == AF_INET) {
|
||||
server =
|
||||
server =
|
||||
iptos(&((struct sockaddr_in *)a->addr)->sin_addr);
|
||||
}
|
||||
else if (a->addr->sa_family == AF_INET6) {
|
||||
@@ -418,35 +446,41 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
if (server) {
|
||||
#ifndef WOLFSSL_SNIFFER_WATCH
|
||||
ret = ssl_SetPrivateKey(server, port,
|
||||
"../../certs/server-key.pem",
|
||||
FILETYPE_PEM, NULL, err);
|
||||
#ifdef DEFAULT_SERVER_KEY
|
||||
ret = ssl_SetPrivateKey(server, port, DEFAULT_SERVER_KEY,
|
||||
FILETYPE_PEM, NULL, err);
|
||||
if (ret != 0) {
|
||||
printf("Please run directly from sslSniffer/sslSnifferTest"
|
||||
"dir\n");
|
||||
}
|
||||
#endif
|
||||
#if defined(WOLFSSL_STATIC_EPHEMERAL) && defined(DEFAULT_SERVER_EPH_KEY)
|
||||
ret = ssl_SetEphemeralKey(server, port, DEFAULT_SERVER_EPH_KEY,
|
||||
FILETYPE_PEM, NULL, err);
|
||||
if (ret != 0) {
|
||||
printf("Please run directly from sslSniffer/sslSnifferTest"
|
||||
"dir\n");
|
||||
}
|
||||
#endif /* WOLFSSL_STATIC_EPHEMERAL */
|
||||
#ifndef WOLFSSL_SNIFFER_WATCH
|
||||
#ifdef HAVE_SNI
|
||||
{
|
||||
char altName[128];
|
||||
|
||||
printf("Enter alternate SNI: ");
|
||||
ret = scanf("%s", altName);
|
||||
|
||||
if (strnlen(altName, 128) > 0) {
|
||||
ret = ssl_SetNamedPrivateKey(altName,
|
||||
server, port, "../../certs/server-key.pem",
|
||||
printf("Enter alternate SNI: ");
|
||||
XMEMSET(cmdLineArg, 0, sizeof(cmdLineArg));
|
||||
if (XFGETS(cmdLineArg, sizeof(cmdLineArg), stdin)) {
|
||||
if (XSTRLEN(cmdLineArg) > 0) {
|
||||
ret = ssl_SetNamedPrivateKey(cmdLineArg,
|
||||
server, port, DEFAULT_SERVER_KEY,
|
||||
FILETYPE_PEM, NULL, err);
|
||||
if (ret != 0) {
|
||||
printf("Please run directly from "
|
||||
"sslSniffer/sslSnifferTest dir\n");
|
||||
"sslSniffer/sslSnifferTest dir\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif /* HAVE_SNI */
|
||||
#endif /* WOLFSSL_SNIFFER_WATCH */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (argc >= 3) {
|
||||
saveFile = 1;
|
||||
@@ -457,6 +491,8 @@ int main(int argc, char** argv)
|
||||
}
|
||||
else {
|
||||
const char* passwd = NULL;
|
||||
int loadCount = 0;
|
||||
|
||||
/* defaults for server and port */
|
||||
port = 443;
|
||||
server = "127.0.0.1";
|
||||
@@ -465,13 +501,30 @@ int main(int argc, char** argv)
|
||||
server = argv[3];
|
||||
|
||||
if (argc >= 5)
|
||||
port = atoi(argv[4]);
|
||||
port = XATOI(argv[4]);
|
||||
|
||||
if (argc >= 6)
|
||||
passwd = argv[5];
|
||||
|
||||
/* try and load as both static ephemeral and private key */
|
||||
/* only fail if no key is loaded */
|
||||
#ifdef WOLFSSL_STATIC_EPHEMERAL
|
||||
ret = ssl_SetEphemeralKey(server, port, argv[2],
|
||||
FILETYPE_PEM, passwd, err);
|
||||
if (ret == 0)
|
||||
loadCount++;
|
||||
#endif
|
||||
ret = ssl_SetPrivateKey(server, port, argv[2],
|
||||
FILETYPE_PEM, passwd, err);
|
||||
FILETYPE_PEM, passwd, err);
|
||||
if (ret == 0)
|
||||
loadCount++;
|
||||
if (loadCount > 0) {
|
||||
ret = 0;
|
||||
}
|
||||
else {
|
||||
printf("Failed loading private key %d\n", ret);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -498,8 +551,8 @@ int main(int argc, char** argv)
|
||||
byte* data = NULL;
|
||||
|
||||
if (header.caplen > 40) { /* min ip(20) + min tcp(20) */
|
||||
packet += frame;
|
||||
header.caplen -= frame;
|
||||
packet += frame;
|
||||
header.caplen -= frame;
|
||||
}
|
||||
else
|
||||
continue;
|
||||
|
||||
+181
-12
@@ -131,7 +131,7 @@
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(DER_SZ)
|
||||
#define DER_SZ (keySz * 2 + 1)
|
||||
#define DER_SZ(ks) (ks * 2 + 1)
|
||||
#endif
|
||||
#endif
|
||||
#ifndef NO_ASN
|
||||
@@ -7710,7 +7710,7 @@ static int test_wc_Sha224Final (void)
|
||||
static int test_wc_Sha224SetFlags (void)
|
||||
{
|
||||
int flag = 0;
|
||||
#if !defined(NO_SHA224) && \
|
||||
#if defined(WOLFSSL_SHA224) && \
|
||||
(defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB))
|
||||
wc_Sha224 sha224;
|
||||
word32 flags = 0;
|
||||
@@ -7742,7 +7742,7 @@ static int test_wc_Sha224SetFlags (void)
|
||||
static int test_wc_Sha224GetFlags (void)
|
||||
{
|
||||
int flag = 0;
|
||||
#if !defined(NO_SHA224) && \
|
||||
#if defined(WOLFSSL_SHA224) && \
|
||||
(defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB))
|
||||
wc_Sha224 sha224;
|
||||
word32 flags = 0;
|
||||
@@ -7775,7 +7775,7 @@ static int test_wc_Sha224GetFlags (void)
|
||||
static int test_wc_Sha224Free (void)
|
||||
{
|
||||
int flag = 0;
|
||||
#if !defined(NO_SHA224) && \
|
||||
#if defined(WOLFSSL_SHA224) && \
|
||||
(defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB))
|
||||
|
||||
printf(testingFmt, "wc_Sha224Free()");
|
||||
@@ -7794,7 +7794,7 @@ static int test_wc_Sha224Free (void)
|
||||
static int test_wc_Sha224GetHash (void)
|
||||
{
|
||||
int flag = 0;
|
||||
#if !defined(NO_SHA224) && \
|
||||
#if defined(WOLFSSL_SHA224) && \
|
||||
(defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB))
|
||||
wc_Sha224 sha224;
|
||||
byte hash1[WC_SHA224_DIGEST_SIZE];
|
||||
@@ -7841,7 +7841,7 @@ static int test_wc_Sha224GetHash (void)
|
||||
static int test_wc_Sha224Copy (void)
|
||||
{
|
||||
int flag = 0;
|
||||
#if !defined(NO_SHA224) && \
|
||||
#if defined(WOLFSSL_SHA224) && \
|
||||
(defined(WOLFSSL_HASH_FLAGS) || defined(WOLF_CRYPTO_CB))
|
||||
wc_Sha224 sha224;
|
||||
wc_Sha224 temp;
|
||||
@@ -13662,6 +13662,63 @@ static int test_wc_SetKeyUsage (void)
|
||||
return ret;
|
||||
|
||||
} /* END test_wc_SetKeyUsage */
|
||||
#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER)
|
||||
static void sample_mutex_cb (int flag, int type, const char* file, int line)
|
||||
{
|
||||
(void)flag;
|
||||
(void)type;
|
||||
(void)file;
|
||||
(void)line;
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Testing wc_LockMutex_ex
|
||||
*/
|
||||
static int test_wc_LockMutex_ex (void)
|
||||
{
|
||||
int ret = 0;
|
||||
#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER)
|
||||
int flag = CRYPTO_LOCK;
|
||||
int type = 0;
|
||||
const char* file = "./test-LockMutex_ex.txt";
|
||||
int line = 0;
|
||||
|
||||
printf(testingFmt, "wc_LockMutex_ex()");
|
||||
|
||||
/*without SetMutexCb*/
|
||||
ret = wc_LockMutex_ex(flag, type, file, line);
|
||||
if (ret == BAD_STATE_E) {
|
||||
ret = 0;
|
||||
}
|
||||
/*with SetMutexCb*/
|
||||
if (ret == 0) {
|
||||
ret = wc_SetMutexCb(sample_mutex_cb);
|
||||
if (ret == 0) {
|
||||
ret = wc_LockMutex_ex(flag, type, file, line);
|
||||
}
|
||||
}
|
||||
|
||||
printf(resultFmt, ret == 0 ? passed : failed);
|
||||
|
||||
#endif
|
||||
return ret;
|
||||
}/*End test_wc_LockMutex_ex*/
|
||||
/*
|
||||
* Testing wc_SetMutexCb
|
||||
*/
|
||||
static int test_wc_SetMutexCb (void)
|
||||
{
|
||||
int ret = 0;
|
||||
#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER)
|
||||
|
||||
printf(testingFmt, "wc_SetMutexCb()");
|
||||
|
||||
ret = wc_SetMutexCb(sample_mutex_cb);
|
||||
|
||||
printf(resultFmt, ret == 0 ? passed : failed);
|
||||
#endif
|
||||
return ret;
|
||||
}/*End test_wc_SetMutexCb*/
|
||||
|
||||
/*
|
||||
* Testing wc_RsaKeyToDer()
|
||||
@@ -20018,9 +20075,9 @@ static int test_wc_ecc_pointFns (void)
|
||||
ecc_point* cpypt = NULL;
|
||||
int idx = 0;
|
||||
int keySz = KEY32;
|
||||
byte der[DER_SZ];
|
||||
byte der[DER_SZ(KEY32)];
|
||||
word32 derlenChk = 0;
|
||||
word32 derSz = (int)sizeof(der);
|
||||
word32 derSz = DER_SZ(KEY32);
|
||||
|
||||
/* Init stack variables. */
|
||||
XMEMSET(der, 0, derSz);
|
||||
@@ -27361,7 +27418,113 @@ static void test_wolfSSL_ERR_print_errors_cb(void)
|
||||
printf(resultFmt, passed);
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
* Testing WOLFSSL_ERROR_MSG
|
||||
*/
|
||||
static int test_WOLFSSL_ERROR_MSG (void)
|
||||
{
|
||||
int ret = 0;
|
||||
#if defined(DEBUG_WOLFSSL) || defined(OPENSSL_ALL) || defined(WOLFSSL_NGINX) ||\
|
||||
defined(WOLFSSL_HAPROXY) || defined(OPENSSL_EXTRA)
|
||||
const char* msg = "Everyone gets Friday off.";
|
||||
|
||||
printf(testingFmt, "WOLFSSL_ERROR_MSG()");
|
||||
|
||||
WOLFSSL_ERROR_MSG(msg);
|
||||
|
||||
printf(resultFmt, ret == 0 ? passed : failed);
|
||||
|
||||
#endif
|
||||
return ret;
|
||||
}/*End test_WOLFSSL_ERROR_MSG*/
|
||||
/*
|
||||
* Testing wc_ERR_remove_state
|
||||
*/
|
||||
static int test_wc_ERR_remove_state (void)
|
||||
{
|
||||
int ret = 0;
|
||||
#if defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)
|
||||
|
||||
printf(testingFmt, "wc_ERR_remove_state()");
|
||||
|
||||
wc_ERR_remove_state();
|
||||
|
||||
printf(resultFmt, ret == 0 ? passed : failed);
|
||||
|
||||
#endif
|
||||
return ret;
|
||||
}/*End test_wc_ERR_remove_state*/
|
||||
/*
|
||||
* Testing wc_ERR_print_errors_fp
|
||||
*/
|
||||
static int test_wc_ERR_print_errors_fp (void)
|
||||
{
|
||||
int ret = 0;
|
||||
#if (defined(OPENSSL_EXTRA) || defined(DEBUG_WOLFSSL_VERBOSE)) && \
|
||||
(!defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM))
|
||||
long sz;
|
||||
|
||||
printf(testingFmt, "wc_ERR_print_errors_fp()");
|
||||
|
||||
WOLFSSL_ERROR(BAD_FUNC_ARG);
|
||||
XFILE fp = XFOPEN("./tests/test-log-dump-to-file.txt", "ar");
|
||||
wc_ERR_print_errors_fp(fp);
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
AssertTrue(XFSEEK(fp, 0, XSEEK_END) == 0);
|
||||
sz = XFTELL(fp);
|
||||
if (sz == 0) {
|
||||
ret = BAD_FUNC_ARG;
|
||||
}
|
||||
#endif
|
||||
printf(resultFmt, ret == 0 ? passed : failed);
|
||||
XFCLOSE(fp);
|
||||
(void)sz;
|
||||
#endif
|
||||
return ret;
|
||||
}/*End test_wc_ERR_print_errors_fp*/
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
static void Logging_cb(const int logLevel, const char *const logMessage)
|
||||
{
|
||||
(void)logLevel;
|
||||
(void)logMessage;
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Testing wolfSSL_GetLoggingCb
|
||||
*/
|
||||
static int test_wolfSSL_GetLoggingCb (void)
|
||||
{
|
||||
int ret = 0;
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
printf(testingFmt, "wolfSSL_GetLoggingCb()");
|
||||
|
||||
/*Testing without wolfSSL_SetLoggingCb()*/
|
||||
if (ret == 0) {
|
||||
if(wolfSSL_GetLoggingCb() == NULL){ /*Should be true*/
|
||||
ret = 0;
|
||||
}
|
||||
if(wolfSSL_GetLoggingCb() != NULL){ /*Should not be true*/
|
||||
ret = -1;
|
||||
}
|
||||
}
|
||||
/*Testing with wolfSSL_SetLoggingCb()*/
|
||||
if (ret == 0) {
|
||||
ret = wolfSSL_SetLoggingCb(Logging_cb);
|
||||
if (ret == 0){
|
||||
if(wolfSSL_GetLoggingCb() == NULL){ /*Should not be true*/
|
||||
ret = -1;
|
||||
}
|
||||
if (ret == 0) {
|
||||
if(wolfSSL_GetLoggingCb() == Logging_cb){ /*Should be true*/
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
printf(resultFmt, ret == 0 ? passed : failed);
|
||||
#endif
|
||||
return ret;
|
||||
}/*End test_wolfSSL_GetLoggingCb*/
|
||||
static void test_wolfSSL_HMAC(void)
|
||||
{
|
||||
#if defined(OPENSSL_EXTRA) && !defined(NO_SHA256)
|
||||
@@ -33603,7 +33766,7 @@ static int test_wc_InitRngNonce(void)
|
||||
{
|
||||
int ret=0;
|
||||
#if !defined(WC_NO_RNG) && !defined(HAVE_SELFTEST) && \
|
||||
(!defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && HAVE_FIPS_VERSION >= 2))
|
||||
(!defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && HAVE_FIPS_VERSION >= 2))
|
||||
WC_RNG rng;
|
||||
byte nonce[] = "\x0D\x74\xDB\x42\xA9\x10\x77\xDE"
|
||||
"\x45\xAC\x13\x7A\xE1\x48\xAF\x16";
|
||||
@@ -33629,14 +33792,14 @@ static int test_wc_InitRngNonce_ex(void)
|
||||
{
|
||||
int ret=0;
|
||||
#if !defined(WC_NO_RNG) && !defined(HAVE_SELFTEST) && \
|
||||
(!defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && HAVE_FIPS_VERSION >= 2))
|
||||
(!defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && HAVE_FIPS_VERSION >= 2))
|
||||
WC_RNG rng;
|
||||
byte nonce[] = "\x0D\x74\xDB\x42\xA9\x10\x77\xDE"
|
||||
"\x45\xAC\x13\x7A\xE1\x48\xAF\x16";
|
||||
word32 nonceSz = sizeof(nonce);
|
||||
|
||||
printf(testingFmt, "wc_InitRngNonce_ex()");
|
||||
|
||||
|
||||
if (ret == 0){
|
||||
ret = wc_InitRngNonce_ex(&rng, nonce, nonceSz, HEAP_HINT, devId);
|
||||
}
|
||||
@@ -34432,7 +34595,7 @@ static void test_wolfSSL_ASN1_STRING_print(void){
|
||||
|
||||
asnStr = ASN1_STRING_type_new(V_ASN1_OCTET_STRING);
|
||||
ASN1_STRING_set(asnStr,(const void*)unprintableData,
|
||||
sizeof(unprintableData));
|
||||
(int)sizeof(unprintableData));
|
||||
/* test */
|
||||
p_len = wolfSSL_ASN1_STRING_print(bio, asnStr);
|
||||
AssertIntEQ(p_len, 46);
|
||||
@@ -35141,6 +35304,10 @@ void ApiTest(void)
|
||||
test_wolfSSL_ERR_peek_last_error_line();
|
||||
#endif
|
||||
test_wolfSSL_ERR_print_errors_cb();
|
||||
AssertFalse(test_wolfSSL_GetLoggingCb());
|
||||
AssertFalse(test_WOLFSSL_ERROR_MSG());
|
||||
AssertFalse(test_wc_ERR_remove_state());
|
||||
AssertFalse(test_wc_ERR_print_errors_fp());
|
||||
test_wolfSSL_set_options();
|
||||
test_wolfSSL_sk_SSL_CIPHER();
|
||||
test_wolfSSL_X509_STORE_CTX();
|
||||
@@ -35472,6 +35639,8 @@ void ApiTest(void)
|
||||
AssertIntEQ(test_wc_MakeRsaKey(), 0);
|
||||
AssertIntEQ(test_wc_SetKeyUsage (), 0);
|
||||
|
||||
AssertIntEQ(test_wc_SetMutexCb(), 0);
|
||||
AssertIntEQ(test_wc_LockMutex_ex(), 0);
|
||||
|
||||
AssertIntEQ(test_wc_RsaKeyToDer(), 0);
|
||||
AssertIntEQ(test_wc_RsaKeyToPublicDer(), 0);
|
||||
|
||||
@@ -31,6 +31,7 @@ EXTRA_DIST += tests/test.conf \
|
||||
tests/test-psk-no-id.conf \
|
||||
tests/test-psk-no-id-sha2.conf \
|
||||
tests/test-dtls.conf \
|
||||
tests/test-dtls-fails.conf \
|
||||
tests/test-dtls-group.conf \
|
||||
tests/test-dtls-reneg-client.conf \
|
||||
tests/test-dtls-reneg-server.conf \
|
||||
|
||||
+16
-1
@@ -455,6 +455,7 @@ static int execute_test_case(int svr_argc, char** svr_argv,
|
||||
return NOT_BUILT_IN;
|
||||
}
|
||||
printf("trying client command line[%d]: %s\n", tests, commandLine);
|
||||
tests++;
|
||||
|
||||
/* determine based on args if this test is expected to fail */
|
||||
if (XSTRSTR(commandLine, exitWithRetFlag) != NULL) {
|
||||
@@ -881,6 +882,20 @@ int SuiteTest(int argc, char** argv)
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
#ifndef WOLFSSL_NO_DTLS_SIZE_CHECK
|
||||
/* failure tests */
|
||||
args.argc = 3;
|
||||
strcpy(argv0[1], "tests/test-dtls-fails.conf");
|
||||
strcpy(argv0[2], "expFail"); /* tests are expected to fail */
|
||||
printf("starting dtls tests that expect failure\n");
|
||||
test_harness(&args);
|
||||
if (args.return_code != 0) {
|
||||
printf("error from script %d\n", args.return_code);
|
||||
args.return_code = EXIT_FAILURE;
|
||||
goto exit;
|
||||
}
|
||||
strcpy(argv0[2], "");
|
||||
#endif
|
||||
#endif
|
||||
#ifdef WOLFSSL_SCTP
|
||||
/* add dtls-sctp extra suites */
|
||||
@@ -1038,7 +1053,7 @@ int SuiteTest(int argc, char** argv)
|
||||
args.argc = 3;
|
||||
strcpy(argv0[1], "tests/test-dhprime.conf");
|
||||
strcpy(argv0[2], "doDH"); /* add DH prime flag */
|
||||
printf("starting tests that expect failure\n");
|
||||
printf("starting dh prime tests\n");
|
||||
test_harness(&args);
|
||||
if (args.return_code != 0) {
|
||||
printf("error from script %d\n", args.return_code);
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
# DTLS test
|
||||
# server DTLSv1.2 too big test
|
||||
-v 3
|
||||
-l ECDHE-ECDSA-AES128-SHA256
|
||||
-c ./certs/server-ecc.pem
|
||||
-k ./certs/ecc-key.pem
|
||||
-u
|
||||
-B 9000
|
||||
|
||||
# client DTLSv1.2 too big test
|
||||
-v 3
|
||||
-l ECDHE-ECDSA-AES128-SHA256
|
||||
-A ./certs/ca-ecc-cert.pem
|
||||
-u
|
||||
-B 9000
|
||||
|
||||
@@ -18,49 +18,49 @@
|
||||
-v 2
|
||||
-l AES256-SHA256
|
||||
|
||||
# server TLSv1 ECDHE-PSK-AES128-SHA256
|
||||
# server DTLSv1 ECDHE-PSK-AES128-SHA256
|
||||
-s
|
||||
-G
|
||||
-v 1
|
||||
-l ECDHE-PSK-AES128-SHA256
|
||||
|
||||
# client TLSv1 ECDHE-PSK-AES128-SHA256
|
||||
# client DTLSv1 ECDHE-PSK-AES128-SHA256
|
||||
-s
|
||||
-G
|
||||
-v 1
|
||||
-l ECDHE-PSK-AES128-SHA256
|
||||
|
||||
# server TLSv1.1 ECDHE-PSK-AES128-SHA256
|
||||
# server DTLSv1.1 ECDHE-PSK-AES128-SHA256
|
||||
-s
|
||||
-G
|
||||
-v 2
|
||||
-l ECDHE-PSK-AES128-SHA256
|
||||
|
||||
# client TLSv1.1 ECDHE-PSK-AES128-SHA256
|
||||
# client DTLSv1.1 ECDHE-PSK-AES128-SHA256
|
||||
-s
|
||||
-G
|
||||
-v 2
|
||||
-l ECDHE-PSK-AES128-SHA256
|
||||
|
||||
# server TLSv1 ECDHE-PSK-NULL-SHA256
|
||||
# server DTLSv1 ECDHE-PSK-NULL-SHA256
|
||||
-s
|
||||
-G
|
||||
-v 1
|
||||
-l ECDHE-PSK-NULL-SHA256
|
||||
|
||||
# client TLSv1 ECDHE-PSK-NULL-SHA256
|
||||
# client DTLSv1 ECDHE-PSK-NULL-SHA256
|
||||
-s
|
||||
-G
|
||||
-v 1
|
||||
-l ECDHE-PSK-NULL-SHA256
|
||||
|
||||
# server TLSv1.1 ECDHE-PSK-NULL-SHA256
|
||||
# server DTLSv1.1 ECDHE-PSK-NULL-SHA256
|
||||
-s
|
||||
-G
|
||||
-v 2
|
||||
-l ECDHE-PSK-NULL-SHA256
|
||||
|
||||
# client TLSv1.1 ECDHE-PSK-NULL-SHA256
|
||||
# client DTLSv1.1 ECDHE-PSK-NULL-SHA256
|
||||
-s
|
||||
-G
|
||||
-v 2
|
||||
|
||||
+16
-49
@@ -1,36 +1,3 @@
|
||||
# server DTLSv1 DHE-RSA-CHACHA20-POLY1305
|
||||
-G
|
||||
-v 2
|
||||
-l DHE-RSA-CHACHA20-POLY1305
|
||||
|
||||
# client DTLSv1 DHE-RSA-CHACHA20-POLY1305
|
||||
-G
|
||||
-v 2
|
||||
-l DHE-RSA-CHACHA20-POLY1305
|
||||
|
||||
# server DTLSv1 ECDHE-RSA-CHACHA20-POLY1305
|
||||
-G
|
||||
-v 2
|
||||
-l ECDHE-RSA-CHACHA20-POLY1305
|
||||
|
||||
# client DTLSv1 ECDHE-RSA-CHACHA20-POLY1305
|
||||
-G
|
||||
-v 2
|
||||
-l ECDHE-RSA-CHACHA20-POLY1305
|
||||
|
||||
# server DTLSv1 ECDHE-EDCSA-CHACHA20-POLY1305
|
||||
-G
|
||||
-v 2
|
||||
-l ECDHE-ECDSA-CHACHA20-POLY1305
|
||||
-c ./certs/server-ecc.pem
|
||||
-k ./certs/ecc-key.pem
|
||||
|
||||
# client DTLSv1 ECDHE-ECDSA-CHACHA20-POLY1305
|
||||
-G
|
||||
-v 2
|
||||
-l ECDHE-ECDSA-CHACHA20-POLY1305
|
||||
-A ./certs/ca-ecc-cert.pem
|
||||
|
||||
# server DTLSv1.2 DHE-RSA-CHACHA20-POLY1305
|
||||
-G
|
||||
-v 3
|
||||
@@ -64,37 +31,37 @@
|
||||
-l ECDHE-ECDSA-CHACHA20-POLY1305
|
||||
-A ./certs/ca-ecc-cert.pem
|
||||
|
||||
# server TLSv1.2 DHE-PSK-CHACHA20-POLY1305
|
||||
# server DTLSv1.2 DHE-PSK-CHACHA20-POLY1305
|
||||
-G
|
||||
-v 3
|
||||
-s
|
||||
-l DHE-PSK-CHACHA20-POLY1305
|
||||
|
||||
# client TLSv1.2 DHE-PSK-CHACHA20-POLY1305
|
||||
# client DTLSv1.2 DHE-PSK-CHACHA20-POLY1305
|
||||
-G
|
||||
-v 3
|
||||
-s
|
||||
-l DHE-PSK-CHACHA20-POLY1305
|
||||
|
||||
# server TLSv1.2 ECDHE-PSK-CHACHA20-POLY1305
|
||||
# server DTLSv1.2 ECDHE-PSK-CHACHA20-POLY1305
|
||||
-G
|
||||
-v 3
|
||||
-s
|
||||
-l ECDHE-PSK-CHACHA20-POLY1305
|
||||
|
||||
# client TLSv1.2 ECDHE-PSK-CHACHA20-POLY1305
|
||||
# client DTLSv1.2 ECDHE-PSK-CHACHA20-POLY1305
|
||||
-G
|
||||
-v 3
|
||||
-s
|
||||
-l ECDHE-PSK-CHACHA20-POLY1305
|
||||
|
||||
# server TLSv1.2 PSK-CHACHA20-POLY1305
|
||||
# server DTLSv1.2 PSK-CHACHA20-POLY1305
|
||||
-G
|
||||
-v 3
|
||||
-s
|
||||
-l PSK-CHACHA20-POLY1305
|
||||
|
||||
# client TLSv1.2 PSK-CHACHA20-POLY1305
|
||||
# client DTLSv1.2 PSK-CHACHA20-POLY1305
|
||||
-G
|
||||
-v 3
|
||||
-s
|
||||
@@ -333,40 +300,40 @@
|
||||
-v 3
|
||||
-l ECDHE-RSA-AES256-SHA
|
||||
|
||||
# server TLSv1 ECDHE-ECDSA-NULL-SHA
|
||||
# server DTLSv1 ECDHE-ECDSA-NULL-SHA
|
||||
-G
|
||||
-v 1
|
||||
-l ECDHE-ECDSA-NULL-SHA
|
||||
-c ./certs/server-ecc.pem
|
||||
-k ./certs/ecc-key.pem
|
||||
|
||||
# client TLSv1 ECDHE-ECDSA-NULL-SHA
|
||||
# client DTLSv1 ECDHE-ECDSA-NULL-SHA
|
||||
-G
|
||||
-v 1
|
||||
-l ECDHE-ECDSA-NULL-SHA
|
||||
-A ./certs/ca-ecc-cert.pem
|
||||
|
||||
# server TLSv1.1 ECDHE-ECDSA-NULL-SHA
|
||||
# server DTLSv1.1 ECDHE-ECDSA-NULL-SHA
|
||||
-G
|
||||
-v 2
|
||||
-l ECDHE-ECDSA-NULL-SHA
|
||||
-c ./certs/server-ecc.pem
|
||||
-k ./certs/ecc-key.pem
|
||||
|
||||
# client TLSv1 ECDHE-ECDSA-NULL-SHA
|
||||
# client DTLSv1 ECDHE-ECDSA-NULL-SHA
|
||||
-G
|
||||
-v 2
|
||||
-l ECDHE-ECDSA-NULL-SHA
|
||||
-A ./certs/ca-ecc-cert.pem
|
||||
|
||||
# server TLSv1.2 ECDHE-ECDSA-NULL-SHA
|
||||
# server DTLSv1.2 ECDHE-ECDSA-NULL-SHA
|
||||
-G
|
||||
-v 3
|
||||
-l ECDHE-ECDSA-NULL-SHA
|
||||
-c ./certs/server-ecc.pem
|
||||
-k ./certs/ecc-key.pem
|
||||
|
||||
# client TLSv1.2 ECDHE-ECDSA-NULL-SHA
|
||||
# client DTLSv1.2 ECDHE-ECDSA-NULL-SHA
|
||||
-G
|
||||
-v 3
|
||||
-l ECDHE-ECDSA-NULL-SHA
|
||||
@@ -762,25 +729,25 @@
|
||||
-l ECDH-ECDSA-AES256-SHA384
|
||||
-A ./certs/ca-ecc-cert.pem
|
||||
|
||||
# server TLSv1.2 ECDHE-PSK-AES128-SHA256
|
||||
# server DTLSv1.2 ECDHE-PSK-AES128-SHA256
|
||||
-s
|
||||
-G
|
||||
-v 3
|
||||
-l ECDHE-PSK-AES128-SHA256
|
||||
|
||||
# client TLSv1.2 ECDHE-PSK-AES128-SHA256
|
||||
# client DTLSv1.2 ECDHE-PSK-AES128-SHA256
|
||||
-s
|
||||
-G
|
||||
-v 3
|
||||
-l ECDHE-PSK-AES128-SHA256
|
||||
|
||||
# server TLSv1.2 ECDHE-PSK-NULL-SHA256
|
||||
# server DTLSv1.2 ECDHE-PSK-NULL-SHA256
|
||||
-s
|
||||
-G
|
||||
-v 3
|
||||
-l ECDHE-PSK-NULL-SHA256
|
||||
|
||||
# client TLSv1.2 ECDHE-PSK-NULL-SHA256
|
||||
# client DTLSv1.2 ECDHE-PSK-NULL-SHA256
|
||||
-s
|
||||
-G
|
||||
-v 3
|
||||
|
||||
+4
-4
@@ -926,7 +926,7 @@
|
||||
|
||||
#ifdef NEED_AES_TABLES
|
||||
|
||||
static const word32 rcon[] = {
|
||||
static const FLASH_QUALIFIER word32 rcon[] = {
|
||||
0x01000000, 0x02000000, 0x04000000, 0x08000000,
|
||||
0x10000000, 0x20000000, 0x40000000, 0x80000000,
|
||||
0x1B000000, 0x36000000,
|
||||
@@ -934,7 +934,7 @@ static const word32 rcon[] = {
|
||||
};
|
||||
|
||||
#ifndef WOLFSSL_AES_SMALL_TABLES
|
||||
static const word32 Te[4][256] = {
|
||||
static const FLASH_QUALIFIER word32 Te[4][256] = {
|
||||
{
|
||||
0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU,
|
||||
0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U,
|
||||
@@ -1202,7 +1202,7 @@ static const word32 Te[4][256] = {
|
||||
};
|
||||
|
||||
#ifdef HAVE_AES_DECRYPT
|
||||
static const word32 Td[4][256] = {
|
||||
static const FLASH_QUALIFIER word32 Td[4][256] = {
|
||||
{
|
||||
0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U,
|
||||
0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U,
|
||||
@@ -1475,7 +1475,7 @@ static const word32 Td[4][256] = {
|
||||
#ifdef HAVE_AES_DECRYPT
|
||||
#if (defined(HAVE_AES_CBC) && !defined(WOLFSSL_DEVCRYPTO_CBC)) \
|
||||
|| defined(WOLFSSL_AES_DIRECT)
|
||||
static const byte Td4[256] =
|
||||
static const FLASH_QUALIFIER byte Td4[256] =
|
||||
{
|
||||
0x52U, 0x09U, 0x6aU, 0xd5U, 0x30U, 0x36U, 0xa5U, 0x38U,
|
||||
0xbfU, 0x40U, 0xa3U, 0x9eU, 0x81U, 0xf3U, 0xd7U, 0xfbU,
|
||||
|
||||
+82
-31
@@ -1521,9 +1521,9 @@ static word32 SetBitString16Bit(word16 val, byte* output)
|
||||
#ifdef HAVE_ED448
|
||||
static const byte keyEd448Oid[] = {43, 101, 113};
|
||||
#endif /* HAVE_ED448 */
|
||||
#if !defined(NO_DH) && (defined(WOLFSSL_QT) || defined(OPENSSL_ALL))
|
||||
#ifndef NO_DH
|
||||
static const byte keyDhOid[] = {42, 134, 72, 134, 247, 13, 1, 3, 1};
|
||||
#endif /* ! NO_DH ... */
|
||||
#endif /* !NO_DH */
|
||||
|
||||
/* curveType */
|
||||
#ifdef HAVE_ECC
|
||||
@@ -1869,12 +1869,12 @@ const byte* OidFromId(word32 id, word32 type, word32* oidSz)
|
||||
*oidSz = sizeof(keyEd448Oid);
|
||||
break;
|
||||
#endif /* HAVE_ED448 */
|
||||
#if !defined(NO_DH) && (defined(WOLFSSL_QT) || defined(OPENSSL_ALL))
|
||||
#ifndef NO_DH
|
||||
case DHk:
|
||||
oid = keyDhOid;
|
||||
*oidSz = sizeof(keyDhOid);
|
||||
break;
|
||||
#endif /* ! NO_DH && (WOLFSSL_QT || OPENSSL_ALL */
|
||||
#endif /* !NO_DH */
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -4416,17 +4416,20 @@ int wc_RsaPublicKeyDecodeRaw(const byte* n, word32 nSz, const byte* e,
|
||||
#endif /* !NO_RSA */
|
||||
|
||||
#ifndef NO_DH
|
||||
|
||||
/* Supports either:
|
||||
* - DH params G/P (PKCS#3 DH) file or
|
||||
* - DH key file (if WOLFSSL_DH_EXTRA enabled) */
|
||||
/* The wc_DhParamsLoad function also loads DH params, but directly into buffers, not DhKey */
|
||||
int wc_DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, word32 inSz)
|
||||
{
|
||||
int ret = 0;
|
||||
int length;
|
||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||
#if !defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && \
|
||||
(HAVE_FIPS_VERSION>2))
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
#if !defined(HAVE_FIPS) || \
|
||||
(defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2))
|
||||
word32 oid = 0, temp = 0;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
WOLFSSL_ENTER("wc_DhKeyDecode");
|
||||
|
||||
@@ -4435,26 +4438,33 @@ int wc_DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, word32 inSz)
|
||||
|
||||
if (GetSequence(input, inOutIdx, &length, inSz) < 0)
|
||||
return ASN_PARSE_E;
|
||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||
#if !defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && \
|
||||
(HAVE_FIPS_VERSION>2))
|
||||
temp = *inOutIdx;
|
||||
#endif /* !HAVE_FIPS || HAVE_FIPS_VERSION > 2 */
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
#if !defined(HAVE_FIPS) || \
|
||||
(defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2))
|
||||
temp = *inOutIdx;
|
||||
#endif
|
||||
#endif
|
||||
/* Assume input started after 1.2.840.113549.1.3.1 dhKeyAgreement */
|
||||
if (GetInt(&key->p, input, inOutIdx, inSz) < 0 ||
|
||||
GetInt(&key->g, input, inOutIdx, inSz) < 0) {
|
||||
ret = ASN_DH_KEY_E;
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||
#if !defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && \
|
||||
(HAVE_FIPS_VERSION>2))
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
#if !defined(HAVE_FIPS) || \
|
||||
(defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2))
|
||||
/* If ASN_DH_KEY_E: Check if input started at beginning of key */
|
||||
if (ret == ASN_DH_KEY_E) {
|
||||
/* rewind back to after the first sequence */
|
||||
*inOutIdx = temp;
|
||||
|
||||
/* the version (0) */
|
||||
if (GetASNInt(input, inOutIdx, &length, inSz) < 0) {
|
||||
return ASN_PARSE_E;
|
||||
}
|
||||
*inOutIdx += length;
|
||||
|
||||
/* Size of dhKeyAgreement section */
|
||||
if (GetSequence(input, inOutIdx, &length, inSz) < 0)
|
||||
return ASN_PARSE_E;
|
||||
|
||||
@@ -4466,8 +4476,8 @@ int wc_DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, word32 inSz)
|
||||
if (GetSequence(input, inOutIdx, &length, inSz) < 0)
|
||||
return ASN_PARSE_E;
|
||||
|
||||
if (GetInt(&key->p, input, inOutIdx, inSz) < 0 ||
|
||||
GetInt(&key->g, input, inOutIdx, inSz) < 0) {
|
||||
if (GetInt(&key->p, input, inOutIdx, inSz) < 0 ||
|
||||
GetInt(&key->g, input, inOutIdx, inSz) < 0) {
|
||||
return ASN_DH_KEY_E;
|
||||
}
|
||||
}
|
||||
@@ -4487,7 +4497,9 @@ int wc_DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, word32 inSz)
|
||||
/* Found Octet String */
|
||||
if (GetInt(&key->priv, input, inOutIdx, inSz) == 0) {
|
||||
WOLFSSL_MSG("Found Private Key");
|
||||
ret = 0;
|
||||
|
||||
/* Compute public */
|
||||
ret = mp_exptmod(&key->g, &key->priv, &key->p, &key->pub);
|
||||
}
|
||||
} else {
|
||||
/* Don't use length from failed CheckBitString/GetOctetString */
|
||||
@@ -4496,14 +4508,13 @@ int wc_DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key, word32 inSz)
|
||||
}
|
||||
}
|
||||
#endif /* !HAVE_FIPS || HAVE_FIPS_VERSION > 2 */
|
||||
#endif /* WOLFSSL_QT || OPENSSL_ALL */
|
||||
#endif /* WOLFSSL_DH_EXTRA */
|
||||
|
||||
WOLFSSL_MSG("wc_DhKeyDecode Success");
|
||||
WOLFSSL_LEAVE("wc_DhKeyDecode", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int wc_DhParamsLoad(const byte* input, word32 inSz, byte* p, word32* pInOutSz,
|
||||
byte* g, word32* gInOutSz)
|
||||
{
|
||||
@@ -4541,7 +4552,7 @@ int wc_DhParamsLoad(const byte* input, word32 inSz, byte* p, word32* pInOutSz,
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* NO_DH */
|
||||
#endif /* !NO_DH */
|
||||
|
||||
|
||||
#ifndef NO_DSA
|
||||
@@ -6078,6 +6089,32 @@ int ExtractDate(const unsigned char* date, unsigned char format,
|
||||
certTime->tm_year *= 100;
|
||||
}
|
||||
|
||||
#ifdef AVR
|
||||
/* Extract the time from the struct tm and adjust tm_year, tm_mon */
|
||||
/* AVR libc stores these as uint8_t instead of int */
|
||||
/* AVR time_t also offsets from midnight 1 Jan 2000 */
|
||||
int tm_year = certTime->tm_year - 2000;
|
||||
int tm_mon = certTime->tm_mon - 1;
|
||||
int tm_mday = certTime->tm_mday;
|
||||
int tm_hour = certTime->tm_hour;
|
||||
int tm_min = certTime->tm_min;
|
||||
int tm_sec = certTime->tm_sec;
|
||||
|
||||
if (GetTime(&tm_year, date, idx) != 0) return 0;
|
||||
if (GetTime(&tm_mon , date, idx) != 0) return 0;
|
||||
if (GetTime(&tm_mday, date, idx) != 0) return 0;
|
||||
if (GetTime(&tm_hour, date, idx) != 0) return 0;
|
||||
if (GetTime(&tm_min , date, idx) != 0) return 0;
|
||||
if (GetTime(&tm_sec , date, idx) != 0) return 0;
|
||||
|
||||
/* Re-populate certTime with computed values */
|
||||
certTime->tm_year = tm_year;
|
||||
certTime->tm_mon = tm_mon;
|
||||
certTime->tm_mday = tm_mday;
|
||||
certTime->tm_hour = tm_hour;
|
||||
certTime->tm_min = tm_min;
|
||||
certTime->tm_sec = tm_sec;
|
||||
#else
|
||||
/* adjust tm_year, tm_mon */
|
||||
if (GetTime(&certTime->tm_year, date, idx) != 0) return 0;
|
||||
certTime->tm_year -= 1900;
|
||||
@@ -6087,6 +6124,7 @@ int ExtractDate(const unsigned char* date, unsigned char format,
|
||||
if (GetTime(&certTime->tm_hour, date, idx) != 0) return 0;
|
||||
if (GetTime(&certTime->tm_min , date, idx) != 0) return 0;
|
||||
if (GetTime(&certTime->tm_sec , date, idx) != 0) return 0;
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -9895,7 +9933,7 @@ int wc_PemGetHeaderFooter(int type, const char** header, const char** footer)
|
||||
if (footer) *footer = END_PUB_KEY;
|
||||
ret = 0;
|
||||
break;
|
||||
#if !defined(NO_DH) && (defined(WOLFSSL_QT) || defined(OPENSSL_ALL))
|
||||
#ifndef NO_DH
|
||||
case DH_PRIVATEKEY_TYPE:
|
||||
#endif
|
||||
case PKCS8_PRIVATEKEY_TYPE:
|
||||
@@ -10555,9 +10593,22 @@ int PemToDer(const unsigned char* buff, long longSz, int type,
|
||||
#ifndef NO_WOLFSSL_SKIP_TRAILING_PAD
|
||||
#ifndef NO_DES3
|
||||
if (info->cipherType == WC_CIPHER_DES3) {
|
||||
padVal = der->buffer[der->length-1];
|
||||
if (padVal <= DES_BLOCK_SIZE) {
|
||||
der->length -= padVal;
|
||||
/* Assuming there is padding:
|
||||
* (der->length > 0 &&
|
||||
* (der->length % DES_BLOCK_SIZE) != 0)
|
||||
* and assuming the last value signifies the number of
|
||||
* padded bytes IE if last value is 0x08 then there are
|
||||
* 8 bytes of padding:
|
||||
* padVal = der->buffer[der->length-1];
|
||||
* then strip this padding before proceeding:
|
||||
* der->length -= padVal;
|
||||
*/
|
||||
if (der->length > 0 &&
|
||||
(der->length % DES_BLOCK_SIZE) != 0) {
|
||||
padVal = der->buffer[der->length-1];
|
||||
if (padVal <= DES_BLOCK_SIZE) {
|
||||
der->length -= padVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* !NO_DES3 */
|
||||
@@ -15068,7 +15119,7 @@ int StoreDHparams(byte* out, word32* outLen, mp_int* p, mp_int* g)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* !NO_DH && WOLFSSL_QT || OPENSSL_ALL */
|
||||
#endif /* !NO_DH && (WOLFSSL_QT || OPENSSL_ALL) */
|
||||
|
||||
#ifdef HAVE_ECC
|
||||
|
||||
|
||||
@@ -1170,7 +1170,7 @@
|
||||
#ifdef NEED_SOFT_DES
|
||||
|
||||
/* permuted choice table (key) */
|
||||
static const byte pc1[] = {
|
||||
static const FLASH_QUALIFIER byte pc1[] = {
|
||||
57, 49, 41, 33, 25, 17, 9,
|
||||
1, 58, 50, 42, 34, 26, 18,
|
||||
10, 2, 59, 51, 43, 35, 27,
|
||||
@@ -1183,12 +1183,12 @@
|
||||
};
|
||||
|
||||
/* number left rotations of pc1 */
|
||||
static const byte totrot[] = {
|
||||
static const FLASH_QUALIFIER byte totrot[] = {
|
||||
1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28
|
||||
};
|
||||
|
||||
/* permuted choice key (table) */
|
||||
static const byte pc2[] = {
|
||||
static const FLASH_QUALIFIER byte pc2[] = {
|
||||
14, 17, 11, 24, 1, 5,
|
||||
3, 28, 15, 6, 21, 10,
|
||||
23, 19, 12, 4, 26, 8,
|
||||
@@ -1202,11 +1202,11 @@
|
||||
/* End of DES-defined tables */
|
||||
|
||||
/* bit 0 is left-most in byte */
|
||||
static const int bytebit[] = {
|
||||
static const FLASH_QUALIFIER int bytebit[] = {
|
||||
0200,0100,040,020,010,04,02,01
|
||||
};
|
||||
|
||||
static const word32 Spbox[8][64] = {
|
||||
static const FLASH_QUALIFIER word32 Spbox[8][64] = {
|
||||
{ 0x01010400,0x00000000,0x00010000,0x01010404,
|
||||
0x01010004,0x00010404,0x00000004,0x00010000,
|
||||
0x00000400,0x01010400,0x01010404,0x00000400,
|
||||
|
||||
+79
-41
@@ -930,10 +930,10 @@ int wc_InitDhKey_ex(DhKey* key, void* heap, int devId)
|
||||
|
||||
key->heap = heap; /* for XMALLOC/XFREE in future */
|
||||
|
||||
#if !defined(WOLFSSL_QT) && !defined(OPENSSL_ALL)
|
||||
if (mp_init_multi(&key->p, &key->g, &key->q, NULL, NULL, NULL) != MP_OKAY)
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
if (mp_init_multi(&key->p, &key->g, &key->q, &key->pub, &key->priv, NULL) != MP_OKAY)
|
||||
#else
|
||||
if (mp_init_multi(&key->p,&key->g,&key->q,&key->pub,&key->priv,NULL) != MP_OKAY)
|
||||
if (mp_init_multi(&key->p, &key->g, &key->q, NULL, NULL, NULL) != MP_OKAY)
|
||||
#endif
|
||||
return MEMORY_E;
|
||||
|
||||
@@ -960,6 +960,10 @@ int wc_FreeDhKey(DhKey* key)
|
||||
mp_clear(&key->p);
|
||||
mp_clear(&key->g);
|
||||
mp_clear(&key->q);
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
mp_clear(&key->pub);
|
||||
mp_forcezero(&key->priv);
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_DH)
|
||||
wolfAsync_DevCtxFree(&key->asyncDev, WOLFSSL_ASYNC_MARKER_DH);
|
||||
@@ -1148,7 +1152,6 @@ static int GeneratePrivateDh186(DhKey* key, WC_RNG* rng, byte* priv,
|
||||
}
|
||||
|
||||
mp_forcezero(tmpX);
|
||||
mp_clear(tmpX);
|
||||
mp_clear(tmpQ);
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
XFREE(tmpQ, key->heap, DYNAMIC_TYPE_DH);
|
||||
@@ -1798,7 +1801,6 @@ int wc_DhCheckKeyPair(DhKey* key, const byte* pub, word32 pubSz,
|
||||
}
|
||||
|
||||
mp_forcezero(privateKey);
|
||||
mp_clear(privateKey);
|
||||
mp_clear(publicKey);
|
||||
mp_clear(checkKey);
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
@@ -1834,7 +1836,6 @@ int wc_DhGenerateKeyPair(DhKey* key, WC_RNG* rng,
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int wc_DhAgree_Sync(DhKey* key, byte* agree, word32* agreeSz,
|
||||
const byte* priv, word32 privSz, const byte* otherPub, word32 pubSz)
|
||||
{
|
||||
@@ -2065,76 +2066,113 @@ int wc_DhAgree(DhKey* key, byte* agree, word32* agreeSz, const byte* priv,
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
/* Sets private and public key in DhKey if both are available, otherwise sets
|
||||
either private or public key, depending on which is available.
|
||||
Returns WOLFSSL_SUCCESS if at least one of the keys was set. */
|
||||
WOLFSSL_LOCAL int wc_DhSetFullKeys(DhKey* key,const byte* priv_key,word32 privSz,
|
||||
const byte* pub_key, word32 pubSz)
|
||||
either private or public key, depending on which is available. */
|
||||
int wc_DhImportKeyPair(DhKey* key, const byte* priv, word32 privSz,
|
||||
const byte* pub, word32 pubSz)
|
||||
{
|
||||
byte havePriv = 0;
|
||||
byte havePub = 0;
|
||||
mp_int* keyPriv = NULL;
|
||||
mp_int* keyPub = NULL;
|
||||
byte havePriv, havePub;
|
||||
mp_int *keyPriv = NULL, *keyPub = NULL;
|
||||
|
||||
if (key == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
havePriv = ( (priv_key != NULL) && (privSz > 0) );
|
||||
havePub = ( (pub_key != NULL) && (pubSz > 0) );
|
||||
havePriv = ( (priv != NULL) && (privSz > 0) );
|
||||
havePub = ( (pub != NULL) && (pubSz > 0) );
|
||||
|
||||
if (!havePub && !havePriv) {
|
||||
WOLFSSL_MSG("No Public or Private Key to Set");
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
/* Set Private Key */
|
||||
if (havePriv == TRUE) {
|
||||
if (havePriv) {
|
||||
/* may have leading 0 */
|
||||
if (priv_key[0] == 0) {
|
||||
privSz--; priv_key++;
|
||||
if (priv[0] == 0) {
|
||||
privSz--; priv++;
|
||||
}
|
||||
if (mp_init(&key->priv) != MP_OKAY)
|
||||
havePriv = FALSE;
|
||||
havePriv = 0;
|
||||
}
|
||||
|
||||
if (havePriv == TRUE) {
|
||||
if (mp_read_unsigned_bin(&key->priv, priv_key, privSz) != MP_OKAY) {
|
||||
havePriv = FALSE;
|
||||
if (havePriv) {
|
||||
if (mp_read_unsigned_bin(&key->priv, priv, privSz) != MP_OKAY) {
|
||||
mp_clear(&key->priv);
|
||||
havePriv = 0;
|
||||
} else {
|
||||
keyPriv = &key->priv;
|
||||
WOLFSSL_MSG("DH Private Key Set.");
|
||||
WOLFSSL_MSG("DH Private Key Set");
|
||||
}
|
||||
}
|
||||
|
||||
/* Set Public Key */
|
||||
if (havePub == TRUE) {
|
||||
if (havePub) {
|
||||
/* may have leading 0 */
|
||||
if (pub_key[0] == 0) {
|
||||
pubSz--; pub_key++;
|
||||
if (pub[0] == 0) {
|
||||
pubSz--; pub++;
|
||||
}
|
||||
if (mp_init(&key->pub) != MP_OKAY)
|
||||
havePub = FALSE;
|
||||
havePub = 0;
|
||||
}
|
||||
|
||||
if (havePub == TRUE) {
|
||||
if (mp_read_unsigned_bin(&key->pub, pub_key, pubSz) != MP_OKAY) {
|
||||
havePub = FALSE;
|
||||
if (havePub) {
|
||||
if (mp_read_unsigned_bin(&key->pub, pub, pubSz) != MP_OKAY) {
|
||||
mp_clear(&key->pub);
|
||||
havePub = 0;
|
||||
} else {
|
||||
keyPub = &key->pub;
|
||||
WOLFSSL_MSG("DH Public Key Set.");
|
||||
WOLFSSL_MSG("DH Public Key Set");
|
||||
}
|
||||
}
|
||||
/* Free Memory if error occured */
|
||||
if (havePriv == FALSE && keyPriv != NULL)
|
||||
/* Free Memory if error occurred */
|
||||
if (havePriv == 0 && keyPriv != NULL)
|
||||
mp_clear(keyPriv);
|
||||
if (havePub == FALSE && keyPub != NULL)
|
||||
if (havePub == 0 && keyPub != NULL)
|
||||
mp_clear(keyPub);
|
||||
|
||||
/* WOLFSSL_SUCCESS if private or public was set else WOLFSSL_FAILURE */
|
||||
return havePriv || havePub;
|
||||
if (havePriv == 0 && havePub == 0) {
|
||||
return MEMORY_E;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Can be used with WOLFSSL_DH_EXTRA when key is loaded with
|
||||
wc_DhKeyDecode or wc_DhImportKeyPair */
|
||||
int wc_DhExportKeyPair(DhKey* key, byte* priv, word32* pPrivSz,
|
||||
byte* pub, word32* pPubSz)
|
||||
{
|
||||
int ret = 0;
|
||||
word32 pubSz, privSz;
|
||||
|
||||
if (key == NULL || (priv && pPrivSz == NULL) || (pub && pPubSz == NULL)) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
if (priv) {
|
||||
privSz = mp_unsigned_bin_size(&key->priv);
|
||||
if (privSz > *pPrivSz) {
|
||||
return BUFFER_E;
|
||||
}
|
||||
*pPrivSz = privSz;
|
||||
ret |= mp_to_unsigned_bin(&key->priv, priv);
|
||||
}
|
||||
|
||||
if (pub) {
|
||||
pubSz = mp_unsigned_bin_size(&key->pub);
|
||||
if (pubSz > *pPubSz) {
|
||||
return BUFFER_E;
|
||||
}
|
||||
*pPubSz = pubSz;
|
||||
ret |= mp_to_unsigned_bin(&key->pub, pub);
|
||||
}
|
||||
|
||||
if (ret != 0)
|
||||
ret = ASN_DH_KEY_E;
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* WOLFSSL_DH_EXTRA */
|
||||
|
||||
static int _DhSetKey(DhKey* key, const byte* p, word32 pSz, const byte* g,
|
||||
word32 gSz, const byte* q, word32 qSz, int trusted,
|
||||
|
||||
+161
-94
@@ -48,7 +48,7 @@ Possible ECC enable options:
|
||||
* WOLFSSL_CUSTOM_CURVES: Allow non-standard curves. default: off
|
||||
* Includes the curve "a" variable in calculation
|
||||
* ECC_DUMP_OID: Enables dump of OID encoding and sum default: off
|
||||
* ECC_CACHE_CURVE: Enables cache of curve info to improve perofrmance
|
||||
* ECC_CACHE_CURVE: Enables cache of curve info to improve performance
|
||||
default: off
|
||||
* FP_ECC: ECC Fixed Point Cache default: off
|
||||
* USE_ECC_B_PARAM: Enable ECC curve B param default: off
|
||||
@@ -56,6 +56,10 @@ Possible ECC enable options:
|
||||
* WOLFSSL_ECC_CURVE_STATIC: default off (on for windows)
|
||||
For the ECC curve paramaters `ecc_set_type` use fixed
|
||||
array for hex string
|
||||
* WC_ECC_NONBLOCK: Enable non-blocking support for sign/verify.
|
||||
Requires SP with WOLFSSL_SP_NONBLOCK
|
||||
* WC_ECC_NONBLOCK_ONLY Enable the non-blocking function only, no fall-back to
|
||||
normal blocking API's
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -4891,60 +4895,73 @@ int wc_ecc_sign_hash_ex(const byte* in, word32 inlen, WC_RNG* rng,
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_SP_MATH
|
||||
#ifndef WOLFSSL_SP_NO_256
|
||||
if (key->idx != ECC_CUSTOM_IDX && ecc_sets[key->idx].id == ECC_SECP256R1) {
|
||||
#ifndef WOLFSSL_ECDSA_SET_K
|
||||
return sp_ecc_sign_256(in, inlen, rng, &key->k, r, s, NULL, key->heap);
|
||||
#else
|
||||
return sp_ecc_sign_256(in, inlen, rng, &key->k, r, s, key->sign_k,
|
||||
key->heap);
|
||||
#endif
|
||||
if (key->idx == ECC_CUSTOM_IDX ||
|
||||
(ecc_sets[key->idx].id != ECC_SECP256R1 &&
|
||||
ecc_sets[key->idx].id != ECC_SECP384R1)) {
|
||||
return WC_KEY_SIZE_E;
|
||||
}
|
||||
#endif
|
||||
#ifdef WOLFSSL_SP_384
|
||||
if (key->idx != ECC_CUSTOM_IDX && ecc_sets[key->idx].id == ECC_SECP384R1) {
|
||||
#ifndef WOLFSSL_ECDSA_SET_K
|
||||
return sp_ecc_sign_384(in, inlen, rng, &key->k, r, s, NULL, key->heap);
|
||||
#else
|
||||
return sp_ecc_sign_384(in, inlen, rng, &key->k, r, s, key->sign_k,
|
||||
key->heap);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
return WC_KEY_SIZE_E;
|
||||
#else
|
||||
#ifdef WOLFSSL_HAVE_SP_ECC
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ECC)
|
||||
if (key->asyncDev.marker != WOLFSSL_ASYNC_MARKER_ECC)
|
||||
#endif
|
||||
{
|
||||
#ifndef WOLFSSL_SP_NO_256
|
||||
if (key->idx != ECC_CUSTOM_IDX &&
|
||||
ecc_sets[key->idx].id == ECC_SECP256R1) {
|
||||
#ifndef WOLFSSL_ECDSA_SET_K
|
||||
return sp_ecc_sign_256(in, inlen, rng, &key->k, r, s, NULL,
|
||||
key->heap);
|
||||
#else
|
||||
return sp_ecc_sign_256(in, inlen, rng, &key->k, r, s, key->sign_k,
|
||||
key->heap);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#ifdef WOLFSSL_SP_384
|
||||
if (key->idx != ECC_CUSTOM_IDX &&
|
||||
ecc_sets[key->idx].id == ECC_SECP384R1) {
|
||||
#ifndef WOLFSSL_ECDSA_SET_K
|
||||
return sp_ecc_sign_384(in, inlen, rng, &key->k, r, s, NULL,
|
||||
key->heap);
|
||||
#else
|
||||
return sp_ecc_sign_384(in, inlen, rng, &key->k, r, s, key->sign_k,
|
||||
key->heap);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif /* WOLFSSL_HAVE_SP_ECC */
|
||||
|
||||
#if defined(WOLFSSL_SP_MATH) || defined(WOLFSSL_HAVE_SP_ECC)
|
||||
if (key->idx != ECC_CUSTOM_IDX
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ECC)
|
||||
&& key->asyncDev.marker != WOLFSSL_ASYNC_MARKER_ECC
|
||||
#endif
|
||||
) {
|
||||
#ifdef WOLFSSL_ECDSA_SET_K
|
||||
mp_int* sign_k = key->sign_k;
|
||||
#else
|
||||
mp_int* sign_k = NULL;
|
||||
#endif
|
||||
#if defined(WC_ECC_NONBLOCK) && defined(WC_ECC_NONBLOCK_ONLY)
|
||||
/* perform blocking call to non-blocking function */
|
||||
ecc_nb_ctx_t nb_ctx;
|
||||
XMEMSET(&nb_ctx, 0, sizeof(nb_ctx));
|
||||
#endif
|
||||
#ifndef WOLFSSL_SP_NO_256
|
||||
if (ecc_sets[key->idx].id == ECC_SECP256R1) {
|
||||
#ifdef WC_ECC_NONBLOCK
|
||||
if (key->nb_ctx) {
|
||||
return sp_ecc_sign_256_nb(&key->nb_ctx->sp_ctx, in, inlen, rng,
|
||||
&key->k, r, s, sign_k, key->heap);
|
||||
}
|
||||
#ifdef WC_ECC_NONBLOCK_ONLY
|
||||
do { /* perform blocking call to non-blocking function */
|
||||
err = sp_ecc_sign_256_nb(&nb_ctx.sp_ctx, in, inlen, rng,
|
||||
&key->k, r, s, sign_k, key->heap);
|
||||
} while (err == FP_WOULDBLOCK);
|
||||
return err;
|
||||
#endif
|
||||
#endif /* WC_ECC_NONBLOCK */
|
||||
#if !defined(WC_ECC_NONBLOCK) || (defined(WC_ECC_NONBLOCK) && !defined(WC_ECC_NONBLOCK_ONLY))
|
||||
return sp_ecc_sign_256(in, inlen, rng, &key->k, r, s, sign_k,
|
||||
key->heap);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#ifdef WOLFSSL_SP_384
|
||||
if (ecc_sets[key->idx].id == ECC_SECP384R1) {
|
||||
#ifdef WC_ECC_NONBLOCK
|
||||
if (key->nb_ctx) {
|
||||
return sp_ecc_sign_384_nb(&key->nb_ctx->sp_ctx, in, inlen, rng,
|
||||
&key->k, r, s, sign_k, key->heap);
|
||||
}
|
||||
#ifdef WC_ECC_NONBLOCK_ONLY
|
||||
do { /* perform blocking call to non-blocking function */
|
||||
err = sp_ecc_sign_384_nb(&nb_ctx.sp_ctx, in, inlen, rng,
|
||||
&key->k, r, s, sign_k, key->heap);
|
||||
} while (err == FP_WOULDBLOCK);
|
||||
return err;
|
||||
#endif
|
||||
#endif /* WC_ECC_NONBLOCK */
|
||||
#if !defined(WC_ECC_NONBLOCK) || (defined(WC_ECC_NONBLOCK) && !defined(WC_ECC_NONBLOCK_ONLY))
|
||||
return sp_ecc_sign_384(in, inlen, rng, &key->k, r, s, sign_k,
|
||||
key->heap);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ECC) && \
|
||||
defined(WOLFSSL_ASYNC_CRYPT_TEST)
|
||||
@@ -4962,6 +4979,9 @@ int wc_ecc_sign_hash_ex(const byte* in, word32 inlen, WC_RNG* rng,
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef WOLFSSL_SP_MATH
|
||||
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(HAVE_CAVIUM_V)
|
||||
err = wc_ecc_alloc_mpint(key, &key->e);
|
||||
if (err != 0) {
|
||||
@@ -5288,7 +5308,7 @@ int wc_ecc_sign_set_k(const byte* k, word32 klen, ecc_key* key)
|
||||
#endif /* WOLFSSL_ECDSA_SET_K */
|
||||
#endif /* WOLFSSL_ATECC508A && WOLFSSL_CRYPTOCELL*/
|
||||
|
||||
#endif /* HAVE_ECC_SIGN */
|
||||
#endif /* !HAVE_ECC_SIGN */
|
||||
|
||||
#ifdef WOLFSSL_CUSTOM_CURVES
|
||||
void wc_ecc_free_curve(const ecc_set_type* curve, void* heap)
|
||||
@@ -5984,52 +6004,85 @@ int wc_ecc_verify_hash_ex(mp_int *r, mp_int *s, const byte* hash,
|
||||
|
||||
#if defined(WOLFSSL_DSP) && !defined(FREESCALE_LTC_ECC)
|
||||
if (key->handle != -1) {
|
||||
return sp_dsp_ecc_verify_256(key->handle, hash, hashlen, key->pubkey.x, key->pubkey.y,
|
||||
key->pubkey.z, r, s, res, key->heap);
|
||||
return sp_dsp_ecc_verify_256(key->handle, hash, hashlen, key->pubkey.x,
|
||||
key->pubkey.y, key->pubkey.z, r, s, res, key->heap);
|
||||
}
|
||||
if (wolfSSL_GetHandleCbSet() == 1) {
|
||||
return sp_dsp_ecc_verify_256(0, hash, hashlen, key->pubkey.x, key->pubkey.y,
|
||||
key->pubkey.z, r, s, res, key->heap);
|
||||
return sp_dsp_ecc_verify_256(0, hash, hashlen, key->pubkey.x,
|
||||
key->pubkey.y, key->pubkey.z, r, s, res, key->heap);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_SP_MATH) && !defined(FREESCALE_LTC_ECC)
|
||||
#ifndef WOLFSSL_SP_NO_256
|
||||
if (key->idx != ECC_CUSTOM_IDX && ecc_sets[key->idx].id == ECC_SECP256R1) {
|
||||
return sp_ecc_verify_256(hash, hashlen, key->pubkey.x, key->pubkey.y,
|
||||
key->pubkey.z, r, s, res, key->heap);
|
||||
}
|
||||
#endif
|
||||
#ifdef WOLFSSL_SP_384
|
||||
if (key->idx != ECC_CUSTOM_IDX && ecc_sets[key->idx].id == ECC_SECP384R1) {
|
||||
return sp_ecc_verify_384(hash, hashlen, key->pubkey.x, key->pubkey.y,
|
||||
key->pubkey.z, r, s, res, key->heap);
|
||||
}
|
||||
#endif
|
||||
return WC_KEY_SIZE_E;
|
||||
#else
|
||||
#if defined WOLFSSL_HAVE_SP_ECC && !defined(FREESCALE_LTC_ECC)
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ECC)
|
||||
if (key->asyncDev.marker != WOLFSSL_ASYNC_MARKER_ECC)
|
||||
#endif
|
||||
{
|
||||
#ifndef WOLFSSL_SP_NO_256
|
||||
if (key->idx != ECC_CUSTOM_IDX &&
|
||||
ecc_sets[key->idx].id == ECC_SECP256R1) {
|
||||
return sp_ecc_verify_256(hash, hashlen, key->pubkey.x,
|
||||
key->pubkey.y, key->pubkey.z,r, s, res,
|
||||
key->heap);
|
||||
}
|
||||
#endif /* WOLFSSL_SP_NO_256 */
|
||||
#ifdef WOLFSSL_SP_384
|
||||
if (key->idx != ECC_CUSTOM_IDX &&
|
||||
ecc_sets[key->idx].id == ECC_SECP384R1) {
|
||||
return sp_ecc_verify_384(hash, hashlen, key->pubkey.x,
|
||||
key->pubkey.y, key->pubkey.z,r, s, res,
|
||||
key->heap);
|
||||
}
|
||||
#endif /* WOLFSSL_SP_384 */
|
||||
if (key->idx == ECC_CUSTOM_IDX ||
|
||||
(ecc_sets[key->idx].id != ECC_SECP256R1 &&
|
||||
ecc_sets[key->idx].id != ECC_SECP384R1)) {
|
||||
return WC_KEY_SIZE_E;
|
||||
}
|
||||
#endif /* WOLFSSL_HAVE_SP_ECC */
|
||||
#endif
|
||||
|
||||
#if (defined(WOLFSSL_SP_MATH) || defined(WOLFSSL_HAVE_SP_ECC)) && \
|
||||
!defined(FREESCALE_LTC_ECC)
|
||||
if (key->idx != ECC_CUSTOM_IDX
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_ECC)
|
||||
&& key->asyncDev.marker != WOLFSSL_ASYNC_MARKER_ECC
|
||||
#endif
|
||||
) {
|
||||
#if defined(WC_ECC_NONBLOCK) && defined(WC_ECC_NONBLOCK_ONLY)
|
||||
/* perform blocking call to non-blocking function */
|
||||
ecc_nb_ctx_t nb_ctx;
|
||||
XMEMSET(&nb_ctx, 0, sizeof(nb_ctx));
|
||||
#endif
|
||||
#ifndef WOLFSSL_SP_NO_256
|
||||
if (ecc_sets[key->idx].id == ECC_SECP256R1) {
|
||||
#ifdef WC_ECC_NONBLOCK
|
||||
if (key->nb_ctx) {
|
||||
return sp_ecc_verify_256_nb(&key->nb_ctx->sp_ctx, hash, hashlen,
|
||||
key->pubkey.x, key->pubkey.y, key->pubkey.z, r, s, res,
|
||||
key->heap);
|
||||
}
|
||||
#ifdef WC_ECC_NONBLOCK_ONLY
|
||||
do { /* perform blocking call to non-blocking function */
|
||||
err = sp_ecc_verify_256_nb(&nb_ctx->sp_ctx, hash, hashlen,
|
||||
key->pubkey.x, key->pubkey.y, key->pubkey.z, r, s, res,
|
||||
key->heap);
|
||||
} while (err == FP_WOULDBLOCK);
|
||||
return err;
|
||||
#endif
|
||||
#endif /* WC_ECC_NONBLOCK */
|
||||
#if !defined(WC_ECC_NONBLOCK) || (defined(WC_ECC_NONBLOCK) && !defined(WC_ECC_NONBLOCK_ONLY))
|
||||
return sp_ecc_verify_256(hash, hashlen, key->pubkey.x,
|
||||
key->pubkey.y, key->pubkey.z, r, s, res, key->heap);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#ifdef WOLFSSL_SP_384
|
||||
if (ecc_sets[key->idx].id == ECC_SECP384R1) {
|
||||
#ifdef WC_ECC_NONBLOCK
|
||||
if (key->nb_ctx) {
|
||||
return sp_ecc_verify_384_nb(&key->nb_ctx->sp_ctx, hash, hashlen,
|
||||
key->pubkey.x, key->pubkey.y, key->pubkey.z, r, s, res,
|
||||
key->heap);
|
||||
}
|
||||
#ifdef WC_ECC_NONBLOCK_ONLY
|
||||
do { /* perform blocking call to non-blocking function */
|
||||
err = sp_ecc_verify_384_nb(&nb_ctx.sp_ctx, hash, hashlen,
|
||||
key->pubkey.x, key->pubkey.y, key->pubkey.z, r, s, res,
|
||||
key->heap);
|
||||
} while (err == FP_WOULDBLOCK);
|
||||
return err;
|
||||
#endif
|
||||
#endif /* WC_ECC_NONBLOCK */
|
||||
#if !defined(WC_ECC_NONBLOCK) || (defined(WC_ECC_NONBLOCK) && !defined(WC_ECC_NONBLOCK_ONLY))
|
||||
return sp_ecc_verify_384(hash, hashlen, key->pubkey.x,
|
||||
key->pubkey.y, key->pubkey.z, r, s, res, key->heap);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(WOLFSSL_SP_MATH) || defined(FREESCALE_LTC_ECC)
|
||||
|
||||
ALLOC_CURVE_SPECS(ECC_CURVE_FIELD_COUNT);
|
||||
|
||||
@@ -6287,7 +6340,7 @@ int wc_ecc_verify_hash_ex(mp_int *r, mp_int *s, const byte* hash,
|
||||
wc_ecc_curve_free(curve);
|
||||
FREE_CURVE_SPECS();
|
||||
|
||||
#endif /* WOLFSSL_SP_MATH */
|
||||
#endif /* !WOLFSSL_SP_MATH || FREESCALE_LTC_ECC */
|
||||
#endif /* WOLFSSL_ATECC508A */
|
||||
|
||||
(void)keySz;
|
||||
@@ -10816,4 +10869,18 @@ int wc_X963_KDF(enum wc_HashType type, const byte* secret, word32 secretSz,
|
||||
}
|
||||
#endif /* HAVE_X963_KDF */
|
||||
|
||||
#ifdef WC_ECC_NONBLOCK
|
||||
/* Enable ECC support for non-blocking operations */
|
||||
int wc_ecc_set_nonblock(ecc_key *key, ecc_nb_ctx_t* ctx)
|
||||
{
|
||||
if (key) {
|
||||
if (ctx) {
|
||||
XMEMSET(ctx, 0, sizeof(ecc_nb_ctx_t));
|
||||
}
|
||||
key->nb_ctx = ctx;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* WC_ECC_NONBLOCK */
|
||||
|
||||
#endif /* HAVE_ECC */
|
||||
|
||||
@@ -1988,7 +1988,7 @@ int mp_exptmod_fast (mp_int * G, mp_int * X, mp_int * P, mp_int * Y,
|
||||
calls/ifs) */
|
||||
#ifdef BN_FAST_MP_MONTGOMERY_REDUCE_C
|
||||
if (((P->used * 2 + 1) < (int)MP_WARRAY) &&
|
||||
P->used < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
|
||||
P->used < (1L << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
|
||||
redux = fast_mp_montgomery_reduce;
|
||||
} else
|
||||
#endif
|
||||
@@ -2234,7 +2234,7 @@ int mp_exptmod_base_2(mp_int * X, mp_int * P, mp_int * Y)
|
||||
calls/ifs) */
|
||||
#ifdef BN_FAST_MP_MONTGOMERY_REDUCE_C
|
||||
if (((P->used * 2 + 1) < (int)MP_WARRAY) &&
|
||||
P->used < (1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
|
||||
P->used < (1L << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
|
||||
redux = fast_mp_montgomery_reduce;
|
||||
} else
|
||||
#endif
|
||||
@@ -2594,7 +2594,7 @@ int mp_montgomery_reduce (mp_int * x, mp_int * n, mp_digit rho)
|
||||
digs = n->used * 2 + 1;
|
||||
if ((digs < (int)MP_WARRAY) &&
|
||||
n->used <
|
||||
(1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
|
||||
(1L << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
|
||||
return fast_mp_montgomery_reduce (x, n, rho);
|
||||
}
|
||||
|
||||
@@ -3041,7 +3041,7 @@ int mp_mul (mp_int * a, mp_int * b, mp_int * c)
|
||||
|
||||
if ((digs < (int)MP_WARRAY) &&
|
||||
MIN(a->used, b->used) <=
|
||||
(1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
|
||||
(1L << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
|
||||
res = fast_s_mp_mul_digs (a, b, c, digs);
|
||||
} else
|
||||
#endif
|
||||
@@ -3504,7 +3504,7 @@ int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
|
||||
/* can we use the fast multiplier? */
|
||||
if ((digs < (int)MP_WARRAY) &&
|
||||
MIN (a->used, b->used) <
|
||||
(1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
|
||||
(1L << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
|
||||
return fast_s_mp_mul_digs (a, b, c, digs);
|
||||
}
|
||||
|
||||
@@ -4012,7 +4012,7 @@ int s_mp_mul_high_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
|
||||
#ifdef BN_FAST_S_MP_MUL_HIGH_DIGS_C
|
||||
if (((a->used + b->used + 1) < (int)MP_WARRAY)
|
||||
&& MIN (a->used, b->used) <
|
||||
(1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
|
||||
(1L << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
|
||||
return fast_s_mp_mul_high_digs (a, b, c, digs);
|
||||
}
|
||||
#endif
|
||||
@@ -4322,6 +4322,8 @@ int mp_sub_d (mp_int * a, mp_digit b, mp_int * c)
|
||||
mp_digit *tmpa, *tmpc, mu;
|
||||
int res, ix, oldused;
|
||||
|
||||
if (b > MP_MASK) return MP_VAL;
|
||||
|
||||
/* grow c as required */
|
||||
if (c->alloc < a->used + 1) {
|
||||
if ((res = mp_grow(c, a->used + 1)) != MP_OKAY) {
|
||||
@@ -4541,7 +4543,7 @@ int mp_mod_d (mp_int * a, mp_digit b, mp_digit * c)
|
||||
|
||||
#if defined(WOLFSSL_KEY_GEN) || !defined(NO_DH) || !defined(NO_DSA) || !defined(NO_RSA)
|
||||
|
||||
const mp_digit ltm_prime_tab[PRIME_SIZE] = {
|
||||
const FLASH_QUALIFIER mp_digit ltm_prime_tab[PRIME_SIZE] = {
|
||||
0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013,
|
||||
0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035,
|
||||
0x003B, 0x003D, 0x0043, 0x0047, 0x0049, 0x004F, 0x0053, 0x0059,
|
||||
|
||||
@@ -2186,17 +2186,15 @@ static WC_INLINE void wc_Chacha_encrypt_64(const word32* input, const byte* m,
|
||||
"BEQ L_chacha20_arm64_64_done_%= \n\t"
|
||||
"\n"
|
||||
"L_chacha20_arm64_64_lt_8_%=: \n\t"
|
||||
"MOV x4, v0.D[0] \n\t"
|
||||
"LSL x5, %[bytes], #3 \n\t"
|
||||
"MOV x4, v0.D[0] \n\t"
|
||||
"\n"
|
||||
"L_chacha20_arm64_64_loop_lt_8_%=: \n\t"
|
||||
"LDRB w6, [%[m], %[bytes]] \n\t"
|
||||
"ROR x7, x4, x5 \n\t"
|
||||
"EOR w6, w6, w7 \n\t"
|
||||
"STRB w6, [%[c], %[bytes]] \n\t"
|
||||
"SUBS %[bytes], %[bytes], #1 \n\t"
|
||||
"SUB x5, x5, #8 \n\t"
|
||||
"BGE L_chacha20_arm64_64_loop_lt_8_%= \n\t"
|
||||
"LDRB w6, [%[m]], #1 \n\t"
|
||||
"EOR w6, w6, w4 \n\t"
|
||||
"STRB w6, [%[c]], #1 \n\t"
|
||||
"SUBS %[bytes], %[bytes], #1 \n\t"
|
||||
"LSR x4, x4, #8 \n\t"
|
||||
"BGT L_chacha20_arm64_64_loop_lt_8_%= \n\t"
|
||||
"\n"
|
||||
"L_chacha20_arm64_64_done_%=: \n\t"
|
||||
: [input] "+r" (input), [m] "+r" (m), [c] "+r" (c), [bytes] "+r" (bytes64)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,17 +19,17 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
/* Generated using (from wolfssl):
|
||||
* cd ../scripts
|
||||
* ruby ./x25519/x25519.rb arm64 ../wolfssl/wolfcrypt/src/port/arm/armv8-curve25519.c
|
||||
*/
|
||||
#ifdef WOLFSSL_ARMASM
|
||||
#ifdef __aarch64__
|
||||
#include <stdint.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/fe_operations.h>
|
||||
|
||||
void fe_init()
|
||||
@@ -771,123 +771,235 @@ void fe_invert(fe r, const fe a)
|
||||
"str %x[r], [x29, #144]\n\t"
|
||||
"str %x[a], [x29, #152]\n\t"
|
||||
"add x0, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #48\n\t"
|
||||
"add x1, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x1, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"ldr x1, [x29, #152]\n\t"
|
||||
"add x2, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #16\n\t"
|
||||
"add x1, x29, #16\n\t"
|
||||
"add x2, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #48\n\t"
|
||||
"add x1, x29, #48\n\t"
|
||||
"add x2, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x20, #4\n\t"
|
||||
"add x1, x29, #0x50\n\t"
|
||||
"\n"
|
||||
"L_fe_invert1_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x20, x20, #1\n\t"
|
||||
"cmp x20, #0\n\t"
|
||||
"bne L_fe_invert1_%=\n\t"
|
||||
"add x0, x29, #48\n\t"
|
||||
"add x2, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x50\n\t"
|
||||
"add x1, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x20, #9\n\t"
|
||||
"add x1, x29, #0x50\n\t"
|
||||
"\n"
|
||||
"L_fe_invert2_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x20, x20, #1\n\t"
|
||||
"cmp x20, #0\n\t"
|
||||
"bne L_fe_invert2_%=\n\t"
|
||||
"add x2, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x70\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x20, #19\n\t"
|
||||
"add x1, x29, #0x70\n\t"
|
||||
"\n"
|
||||
"L_fe_invert3_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x20, x20, #1\n\t"
|
||||
"cmp x20, #0\n\t"
|
||||
"bne L_fe_invert3_%=\n\t"
|
||||
"add x0, x29, #0x50\n\t"
|
||||
"add x2, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x20, #10\n\t"
|
||||
"add x1, x29, #0x50\n\t"
|
||||
"\n"
|
||||
"L_fe_invert4_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x20, x20, #1\n\t"
|
||||
"cmp x20, #0\n\t"
|
||||
"bne L_fe_invert4_%=\n\t"
|
||||
"add x0, x29, #48\n\t"
|
||||
"add x2, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x50\n\t"
|
||||
"add x1, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x20, #49\n\t"
|
||||
"add x1, x29, #0x50\n\t"
|
||||
"\n"
|
||||
"L_fe_invert5_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x20, x20, #1\n\t"
|
||||
"cmp x20, #0\n\t"
|
||||
"bne L_fe_invert5_%=\n\t"
|
||||
"add x2, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x70\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x20, #0x63\n\t"
|
||||
"add x1, x29, #0x70\n\t"
|
||||
"\n"
|
||||
"L_fe_invert6_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x20, x20, #1\n\t"
|
||||
"cmp x20, #0\n\t"
|
||||
"bne L_fe_invert6_%=\n\t"
|
||||
"add x0, x29, #0x50\n\t"
|
||||
"add x2, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x20, #50\n\t"
|
||||
"add x1, x29, #0x50\n\t"
|
||||
"\n"
|
||||
"L_fe_invert7_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x20, x20, #1\n\t"
|
||||
"cmp x20, #0\n\t"
|
||||
"bne L_fe_invert7_%=\n\t"
|
||||
"add x0, x29, #48\n\t"
|
||||
"add x2, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x20, #5\n\t"
|
||||
"add x1, x29, #48\n\t"
|
||||
"\n"
|
||||
"L_fe_invert8_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x20, x20, #1\n\t"
|
||||
"cmp x20, #0\n\t"
|
||||
"bne L_fe_invert8_%=\n\t"
|
||||
"ldr x0, [x29, #144]\n\t"
|
||||
"add x2, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"ldp x29, x30, [sp], #0xa0\n\t"
|
||||
: [r] "+r" (r), [a] "+r" (a)
|
||||
:
|
||||
@@ -2210,123 +2322,235 @@ int curve25519(byte* r, byte* n, byte* a)
|
||||
/* Invert */
|
||||
"add x0, x29, #48\n\t"
|
||||
"add x1, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x50\n\t"
|
||||
"add x1, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x1, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x1, x29, #16\n\t"
|
||||
"add x2, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #48\n\t"
|
||||
"add x1, x29, #48\n\t"
|
||||
"add x2, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x70\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x50\n\t"
|
||||
"add x1, x29, #0x50\n\t"
|
||||
"add x2, x29, #0x70\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x70\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x24, #4\n\t"
|
||||
"add x1, x29, #0x70\n\t"
|
||||
"\n"
|
||||
"L_curve25519_inv_1_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x24, x24, #1\n\t"
|
||||
"cmp x24, #0\n\t"
|
||||
"bne L_curve25519_inv_1_%=\n\t"
|
||||
"add x0, x29, #0x50\n\t"
|
||||
"add x2, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x70\n\t"
|
||||
"add x1, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x24, #9\n\t"
|
||||
"add x1, x29, #0x70\n\t"
|
||||
"\n"
|
||||
"L_curve25519_inv_2_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x24, x24, #1\n\t"
|
||||
"cmp x24, #0\n\t"
|
||||
"bne L_curve25519_inv_2_%=\n\t"
|
||||
"add x2, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x90\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x24, #19\n\t"
|
||||
"add x1, x29, #0x90\n\t"
|
||||
"\n"
|
||||
"L_curve25519_inv_3_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x24, x24, #1\n\t"
|
||||
"cmp x24, #0\n\t"
|
||||
"bne L_curve25519_inv_3_%=\n\t"
|
||||
"add x0, x29, #0x70\n\t"
|
||||
"add x2, x29, #0x70\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x24, #10\n\t"
|
||||
"add x1, x29, #0x70\n\t"
|
||||
"\n"
|
||||
"L_curve25519_inv_4_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x24, x24, #1\n\t"
|
||||
"cmp x24, #0\n\t"
|
||||
"bne L_curve25519_inv_4_%=\n\t"
|
||||
"add x0, x29, #0x50\n\t"
|
||||
"add x2, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x70\n\t"
|
||||
"add x1, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x24, #49\n\t"
|
||||
"add x1, x29, #0x70\n\t"
|
||||
"\n"
|
||||
"L_curve25519_inv_5_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x24, x24, #1\n\t"
|
||||
"cmp x24, #0\n\t"
|
||||
"bne L_curve25519_inv_5_%=\n\t"
|
||||
"add x2, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x90\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x24, #0x63\n\t"
|
||||
"add x1, x29, #0x90\n\t"
|
||||
"\n"
|
||||
"L_curve25519_inv_6_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x24, x24, #1\n\t"
|
||||
"cmp x24, #0\n\t"
|
||||
"bne L_curve25519_inv_6_%=\n\t"
|
||||
"add x0, x29, #0x70\n\t"
|
||||
"add x2, x29, #0x70\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x24, #50\n\t"
|
||||
"add x1, x29, #0x70\n\t"
|
||||
"\n"
|
||||
"L_curve25519_inv_7_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x24, x24, #1\n\t"
|
||||
"cmp x24, #0\n\t"
|
||||
"bne L_curve25519_inv_7_%=\n\t"
|
||||
"add x0, x29, #0x50\n\t"
|
||||
"add x2, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x24, #5\n\t"
|
||||
"add x1, x29, #0x50\n\t"
|
||||
"\n"
|
||||
"L_curve25519_inv_8_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x24, x24, #1\n\t"
|
||||
"cmp x24, #0\n\t"
|
||||
"bne L_curve25519_inv_8_%=\n\t"
|
||||
"add x0, x29, #16\n\t"
|
||||
"add x2, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"ldr %x[r], [x29, #176]\n\t"
|
||||
/* Multiply */
|
||||
"ldp x6, x7, [%x[r]]\n\t"
|
||||
@@ -2486,122 +2710,234 @@ void fe_pow22523(fe r, const fe a)
|
||||
"str %x[r], [x29, #112]\n\t"
|
||||
"str %x[a], [x29, #120]\n\t"
|
||||
"add x0, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #48\n\t"
|
||||
"add x1, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x1, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"ldr x1, [x29, #120]\n\t"
|
||||
"add x2, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #16\n\t"
|
||||
"add x1, x29, #16\n\t"
|
||||
"add x2, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x1, x29, #48\n\t"
|
||||
"add x2, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #48\n\t"
|
||||
"add x1, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x21, #4\n\t"
|
||||
"add x1, x29, #48\n\t"
|
||||
"\n"
|
||||
"L_fe_pow22523_1_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x21, x21, #1\n\t"
|
||||
"cmp x21, #0\n\t"
|
||||
"bne L_fe_pow22523_1_%=\n\t"
|
||||
"add x0, x29, #16\n\t"
|
||||
"add x2, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #48\n\t"
|
||||
"add x1, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x21, #9\n\t"
|
||||
"add x1, x29, #48\n\t"
|
||||
"\n"
|
||||
"L_fe_pow22523_2_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x21, x21, #1\n\t"
|
||||
"cmp x21, #0\n\t"
|
||||
"bne L_fe_pow22523_2_%=\n\t"
|
||||
"add x2, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x21, #19\n\t"
|
||||
"add x1, x29, #0x50\n\t"
|
||||
"\n"
|
||||
"L_fe_pow22523_3_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x21, x21, #1\n\t"
|
||||
"cmp x21, #0\n\t"
|
||||
"bne L_fe_pow22523_3_%=\n\t"
|
||||
"add x0, x29, #48\n\t"
|
||||
"add x2, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x21, #10\n\t"
|
||||
"add x1, x29, #48\n\t"
|
||||
"\n"
|
||||
"L_fe_pow22523_4_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x21, x21, #1\n\t"
|
||||
"cmp x21, #0\n\t"
|
||||
"bne L_fe_pow22523_4_%=\n\t"
|
||||
"add x0, x29, #16\n\t"
|
||||
"add x2, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #48\n\t"
|
||||
"add x1, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x21, #49\n\t"
|
||||
"add x1, x29, #48\n\t"
|
||||
"\n"
|
||||
"L_fe_pow22523_5_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x21, x21, #1\n\t"
|
||||
"cmp x21, #0\n\t"
|
||||
"bne L_fe_pow22523_5_%=\n\t"
|
||||
"add x2, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"add x0, x29, #0x50\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x21, #0x63\n\t"
|
||||
"add x1, x29, #0x50\n\t"
|
||||
"\n"
|
||||
"L_fe_pow22523_6_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x21, x21, #1\n\t"
|
||||
"cmp x21, #0\n\t"
|
||||
"bne L_fe_pow22523_6_%=\n\t"
|
||||
"add x0, x29, #48\n\t"
|
||||
"add x2, x29, #48\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x21, #50\n\t"
|
||||
"add x1, x29, #48\n\t"
|
||||
"\n"
|
||||
"L_fe_pow22523_7_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x21, x21, #1\n\t"
|
||||
"cmp x21, #0\n\t"
|
||||
"bne L_fe_pow22523_7_%=\n\t"
|
||||
"add x0, x29, #16\n\t"
|
||||
"add x2, x29, #16\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"mov x21, #2\n\t"
|
||||
"add x1, x29, #16\n\t"
|
||||
"\n"
|
||||
"L_fe_pow22523_8_%=: \n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_sq\n\t"
|
||||
#else
|
||||
"bl _fe_sq\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"sub x21, x21, #1\n\t"
|
||||
"cmp x21, #0\n\t"
|
||||
"bne L_fe_pow22523_8_%=\n\t"
|
||||
"ldr x0, [x29, #112]\n\t"
|
||||
"ldr x2, [x29, #120]\n\t"
|
||||
#ifndef __APPLE__
|
||||
"bl fe_mul\n\t"
|
||||
#else
|
||||
"bl _fe_mul\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"ldp x29, x30, [sp], #0x80\n\t"
|
||||
: [r] "+r" (r), [a] "+r" (a)
|
||||
:
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
* and Daniel J. Bernstein
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __aarch64__
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@@ -34,6 +31,8 @@
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
#ifdef WOLFSSL_ARMASM
|
||||
#ifdef __aarch64__
|
||||
|
||||
#ifdef HAVE_POLY1305
|
||||
#include <wolfssl/wolfcrypt/poly1305.h>
|
||||
#include <wolfssl/wolfcrypt/error-crypt.h>
|
||||
@@ -208,11 +207,11 @@ void poly1305_blocks(Poly1305* ctx, const unsigned char *m,
|
||||
"MOV v28.D[0], x9 \n\t"
|
||||
"AND x22, x22, #0x3ffffff \n\t"
|
||||
/* Zero accumulator registers */
|
||||
"MOVI v15.2D, #0x0 \n\t"
|
||||
"MOVI v16.2D, #0x0 \n\t"
|
||||
"MOVI v17.2D, #0x0 \n\t"
|
||||
"MOVI v18.2D, #0x0 \n\t"
|
||||
"MOVI v19.2D, #0x0 \n\t"
|
||||
"MOVI v15.16B, #0x0 \n\t"
|
||||
"MOVI v16.16B, #0x0 \n\t"
|
||||
"MOVI v17.16B, #0x0 \n\t"
|
||||
"MOVI v18.16B, #0x0 \n\t"
|
||||
"MOVI v19.16B, #0x0 \n\t"
|
||||
/* Set hibit */
|
||||
"CMP %[finished], #0 \n\t"
|
||||
"CSET x9, EQ \n\t"
|
||||
@@ -1162,5 +1161,5 @@ int wc_Poly1305Final(Poly1305* ctx, byte* mac)
|
||||
}
|
||||
|
||||
#endif /* HAVE_POLY1305 */
|
||||
#endif /* WOLFSSL_ARMASM */
|
||||
#endif /* __aarch64__ */
|
||||
#endif /* WOLFSSL_ARMASM */
|
||||
|
||||
@@ -19,17 +19,30 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
/* Generated using (from wolfssl):
|
||||
* cd ../scripts
|
||||
* ruby ./sha2/sha512.rb arm64 ../wolfssl/wolfcrypt/src/port/arm/armv8-sha512-asm.S
|
||||
*/
|
||||
#ifdef WOLFSSL_ARMASM
|
||||
#ifdef __aarch64__
|
||||
#ifndef __APPLE__
|
||||
.text
|
||||
.section .rodata
|
||||
.type L_SHA512_transform_neon_len_k, %object
|
||||
.section .rodata
|
||||
.size L_SHA512_transform_neon_len_k, 640
|
||||
#else
|
||||
.section __DATA,__data
|
||||
#endif /* __APPLE__ */
|
||||
#ifndef __APPLE__
|
||||
.align 3
|
||||
#else
|
||||
.p2align 3
|
||||
#endif /* __APPLE__ */
|
||||
L_SHA512_transform_neon_len_k:
|
||||
.xword 0x428a2f98d728ae22
|
||||
.xword 0x7137449123ef65cd
|
||||
@@ -111,18 +124,33 @@ L_SHA512_transform_neon_len_k:
|
||||
.xword 0x597f299cfc657e2a
|
||||
.xword 0x5fcb6fab3ad6faec
|
||||
.xword 0x6c44198c4a475817
|
||||
#ifndef __APPLE__
|
||||
.text
|
||||
.section .rodata
|
||||
.type L_SHA512_transform_neon_len_ror8, %object
|
||||
.section .rodata
|
||||
.size L_SHA512_transform_neon_len_ror8, 16
|
||||
#else
|
||||
.section __DATA,__data
|
||||
#endif /* __APPLE__ */
|
||||
#ifndef __APPLE__
|
||||
.align 4
|
||||
#else
|
||||
.p2align 4
|
||||
#endif /* __APPLE__ */
|
||||
L_SHA512_transform_neon_len_ror8:
|
||||
.xword 0x7060504030201, 0x80f0e0d0c0b0a09
|
||||
.text
|
||||
.align 2
|
||||
.globl Transform_Sha512_Len
|
||||
.type Transform_Sha512_Len, %function
|
||||
#ifndef __APPLE__
|
||||
.text
|
||||
.globl Transform_Sha512_Len
|
||||
.type Transform_Sha512_Len,@function
|
||||
.align 2
|
||||
Transform_Sha512_Len:
|
||||
#else
|
||||
.section __TEXT,__text
|
||||
.globl _Transform_Sha512_Len
|
||||
.p2align 2
|
||||
_Transform_Sha512_Len:
|
||||
#endif /* __APPLE__ */
|
||||
stp x29, x30, [sp, #-128]!
|
||||
add x29, sp, #0
|
||||
str x17, [x29, #16]
|
||||
@@ -133,8 +161,18 @@ Transform_Sha512_Len:
|
||||
stp x26, x27, [x29, #80]
|
||||
stp d8, d9, [x29, #96]
|
||||
stp d10, d11, [x29, #112]
|
||||
#ifndef __APPLE__
|
||||
adr x3, L_SHA512_transform_neon_len_k
|
||||
#else
|
||||
adrp x3, L_SHA512_transform_neon_len_k@PAGE
|
||||
add x3, x3, :lo12:L_SHA512_transform_neon_len_k@PAGEOFF
|
||||
#endif /* __APPLE__ */
|
||||
#ifndef __APPLE__
|
||||
adr x27, L_SHA512_transform_neon_len_ror8
|
||||
#else
|
||||
adrp x27, L_SHA512_transform_neon_len_ror8@PAGE
|
||||
add x27, x27, :lo12:L_SHA512_transform_neon_len_ror8@PAGEOFF
|
||||
#endif /* __APPLE__ */
|
||||
ld1 {v11.16b}, [x27]
|
||||
# Load digest into working vars
|
||||
ldp x4, x5, [x0]
|
||||
@@ -1026,7 +1064,12 @@ L_sha512_len_neon_start:
|
||||
add x6, x6, x21
|
||||
add x5, x5, x20
|
||||
add x4, x4, x19
|
||||
#ifndef __APPLE__
|
||||
adr x3, L_SHA512_transform_neon_len_k
|
||||
#else
|
||||
adrp x3, L_SHA512_transform_neon_len_k@PAGE
|
||||
add x3, x3, :lo12:L_SHA512_transform_neon_len_k@PAGEOFF
|
||||
#endif /* __APPLE__ */
|
||||
subs w2, w2, #0x80
|
||||
bne L_sha512_len_neon_begin
|
||||
stp x4, x5, [x0]
|
||||
@@ -1043,7 +1086,9 @@ L_sha512_len_neon_start:
|
||||
ldp d10, d11, [x29, #112]
|
||||
ldp x29, x30, [sp], #0x80
|
||||
ret
|
||||
#ifndef __APPLE__
|
||||
.size Transform_Sha512_Len,.-Transform_Sha512_Len
|
||||
#endif /* __APPLE__ */
|
||||
#endif /* __aarch64__ */
|
||||
#endif /* WOLFSSL_ARMASM */
|
||||
|
||||
|
||||
@@ -19,17 +19,17 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
/* Generated using (from wolfssl):
|
||||
* cd ../scripts
|
||||
* ruby ./sha2/sha512.rb arm64 ../wolfssl/wolfcrypt/src/port/arm/armv8-sha512-asm.c
|
||||
*/
|
||||
#ifdef WOLFSSL_ARMASM
|
||||
#ifdef __aarch64__
|
||||
#include <stdint.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/wolfcrypt/sha512.h>
|
||||
|
||||
static const uint64_t L_SHA512_transform_neon_len_k[] = {
|
||||
@@ -125,8 +125,18 @@ void Transform_Sha512_Len(wc_Sha512* sha512, const byte* data, word32 len)
|
||||
__asm__ __volatile__ (
|
||||
"stp x29, x30, [sp, #-16]!\n\t"
|
||||
"add x29, sp, #0\n\t"
|
||||
#ifndef __APPLE__
|
||||
"adr x3, %[L_SHA512_transform_neon_len_k]\n\t"
|
||||
#else
|
||||
"adrp x3, %[L_SHA512_transform_neon_len_k]@PAGE\n\t"
|
||||
"add x3, x3, %[L_SHA512_transform_neon_len_k]@PAGEOFF\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
#ifndef __APPLE__
|
||||
"adr x27, %[L_SHA512_transform_neon_len_ror8]\n\t"
|
||||
#else
|
||||
"adrp x27, %[L_SHA512_transform_neon_len_ror8]@PAGE\n\t"
|
||||
"add x27, x27, %[L_SHA512_transform_neon_len_ror8]@PAGEOFF\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"ld1 {v11.16b}, [x27]\n\t"
|
||||
/* Load digest into working vars */
|
||||
"ldp x4, x5, [%x[sha512]]\n\t"
|
||||
@@ -1020,7 +1030,12 @@ void Transform_Sha512_Len(wc_Sha512* sha512, const byte* data, word32 len)
|
||||
"add x6, x6, x21\n\t"
|
||||
"add x5, x5, x20\n\t"
|
||||
"add x4, x4, x19\n\t"
|
||||
#ifndef __APPLE__
|
||||
"adr x3, %[L_SHA512_transform_neon_len_k]\n\t"
|
||||
#else
|
||||
"adrp x3, %[L_SHA512_transform_neon_len_k]@PAGE\n\t"
|
||||
"add x3, x3, %[L_SHA512_transform_neon_len_k]@PAGEOFF\n\t"
|
||||
#endif /* __APPLE__ */
|
||||
"subs %w[len], %w[len], #0x80\n\t"
|
||||
"bne L_sha512_len_neon_begin_%=\n\t"
|
||||
"stp x4, x5, [%x[sha512]]\n\t"
|
||||
|
||||
@@ -336,6 +336,7 @@ int atmel_get_enc_key_default(byte* enckey, word16 keysize)
|
||||
/**
|
||||
* \brief Write enc key before.
|
||||
*/
|
||||
#if defined(WOLFSSL_ATECC_ECDH_ENC) || defined(WOLFSSL_ATECC_ECDH_IOENC)
|
||||
static int atmel_init_enc_key(void)
|
||||
{
|
||||
int ret;
|
||||
@@ -370,6 +371,7 @@ static int atmel_init_enc_key(void)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
int atmel_get_rev_info(word32* revision)
|
||||
{
|
||||
@@ -516,6 +518,7 @@ int atmel_init(void)
|
||||
device_init_default();
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_ATECC_ECDH_ENC) || defined(WOLFSSL_ATECC_ECDH_IOENC)
|
||||
/* Init the I2C pipe encryption key. */
|
||||
/* Value is generated/stored during pair for the ATECC508A and stored
|
||||
on micro flash */
|
||||
@@ -524,6 +527,7 @@ int atmel_init(void)
|
||||
WOLFSSL_MSG("Failed to initialize transport key");
|
||||
return WC_HW_E;
|
||||
}
|
||||
#endif
|
||||
|
||||
mAtcaInitDone = 1;
|
||||
}
|
||||
|
||||
+64
-10
@@ -1107,20 +1107,20 @@ exit_rng_ht:
|
||||
}
|
||||
|
||||
|
||||
const byte seedA[] = {
|
||||
const FLASH_QUALIFIER byte seedA_data[] = {
|
||||
0x63, 0x36, 0x33, 0x77, 0xe4, 0x1e, 0x86, 0x46, 0x8d, 0xeb, 0x0a, 0xb4,
|
||||
0xa8, 0xed, 0x68, 0x3f, 0x6a, 0x13, 0x4e, 0x47, 0xe0, 0x14, 0xc7, 0x00,
|
||||
0x45, 0x4e, 0x81, 0xe9, 0x53, 0x58, 0xa5, 0x69, 0x80, 0x8a, 0xa3, 0x8f,
|
||||
0x2a, 0x72, 0xa6, 0x23, 0x59, 0x91, 0x5a, 0x9f, 0x8a, 0x04, 0xca, 0x68
|
||||
};
|
||||
|
||||
const byte reseedSeedA[] = {
|
||||
const FLASH_QUALIFIER byte reseedSeedA_data[] = {
|
||||
0xe6, 0x2b, 0x8a, 0x8e, 0xe8, 0xf1, 0x41, 0xb6, 0x98, 0x05, 0x66, 0xe3,
|
||||
0xbf, 0xe3, 0xc0, 0x49, 0x03, 0xda, 0xd4, 0xac, 0x2c, 0xdf, 0x9f, 0x22,
|
||||
0x80, 0x01, 0x0a, 0x67, 0x39, 0xbc, 0x83, 0xd3
|
||||
};
|
||||
|
||||
const byte outputA[] = {
|
||||
const FLASH_QUALIFIER byte outputA_data[] = {
|
||||
0x04, 0xee, 0xc6, 0x3b, 0xb2, 0x31, 0xdf, 0x2c, 0x63, 0x0a, 0x1a, 0xfb,
|
||||
0xe7, 0x24, 0x94, 0x9d, 0x00, 0x5a, 0x58, 0x78, 0x51, 0xe1, 0xaa, 0x79,
|
||||
0x5e, 0x47, 0x73, 0x47, 0xc8, 0xb0, 0x56, 0x62, 0x1c, 0x18, 0xbd, 0xdc,
|
||||
@@ -1134,7 +1134,7 @@ const byte outputA[] = {
|
||||
0xa1, 0x80, 0x18, 0x3a, 0x07, 0xdf, 0xae, 0x17
|
||||
};
|
||||
|
||||
const byte seedB[] = {
|
||||
const FLASH_QUALIFIER byte seedB_data[] = {
|
||||
0xa6, 0x5a, 0xd0, 0xf3, 0x45, 0xdb, 0x4e, 0x0e, 0xff, 0xe8, 0x75, 0xc3,
|
||||
0xa2, 0xe7, 0x1f, 0x42, 0xc7, 0x12, 0x9d, 0x62, 0x0f, 0xf5, 0xc1, 0x19,
|
||||
0xa9, 0xef, 0x55, 0xf0, 0x51, 0x85, 0xe0, 0xfb, /* nonce next */
|
||||
@@ -1142,7 +1142,7 @@ const byte seedB[] = {
|
||||
0xdb, 0xcb, 0xcc, 0x2e
|
||||
};
|
||||
|
||||
const byte outputB[] = {
|
||||
const FLASH_QUALIFIER byte outputB_data[] = {
|
||||
0xd3, 0xe1, 0x60, 0xc3, 0x5b, 0x99, 0xf3, 0x40, 0xb2, 0x62, 0x82, 0x64,
|
||||
0xd1, 0x75, 0x10, 0x60, 0xe0, 0x04, 0x5d, 0xa3, 0x83, 0xff, 0x57, 0xa5,
|
||||
0x7d, 0x73, 0xa6, 0x73, 0xd2, 0xb8, 0xd8, 0x0d, 0xaa, 0xf6, 0xa6, 0xc3,
|
||||
@@ -1175,17 +1175,65 @@ static int wc_RNG_HealthTestLocal(int reseed)
|
||||
#endif
|
||||
|
||||
if (reseed) {
|
||||
ret = wc_RNG_HealthTest(1, seedA, sizeof(seedA),
|
||||
reseedSeedA, sizeof(reseedSeedA),
|
||||
#ifdef WOLFSSL_USE_FLASHMEM
|
||||
byte* seedA = (byte*)XMALLOC(sizeof(seedA_data), NULL,
|
||||
DYNAMIC_TYPE_TMP_BUFFER);
|
||||
byte* reseedSeedA = (byte*)XMALLOC(sizeof(reseedSeedA_data), NULL,
|
||||
DYNAMIC_TYPE_TMP_BUFFER);
|
||||
byte* outputA = (byte*)XMALLOC(sizeof(outputA_data), NULL,
|
||||
DYNAMIC_TYPE_TMP_BUFFER);
|
||||
|
||||
if (!seedA || !reseedSeedA || !outputA) {
|
||||
XFREE(seedA, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
XFREE(reseedSeedA, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
XFREE(outputA, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
ret = MEMORY_E;
|
||||
}
|
||||
else {
|
||||
XMEMCPY_P(seedA, seedA_data, sizeof(seedA_data));
|
||||
XMEMCPY_P(reseedSeedA, reseedSeedA_data, sizeof(reseedSeedA_data));
|
||||
XMEMCPY_P(outputA, outputA_data, sizeof(outputA_data));
|
||||
#else
|
||||
const byte* seedA = seedA_data;
|
||||
const byte* reseedSeedA = reseedSeedA_data;
|
||||
const byte* outputA = outputA_data;
|
||||
#endif
|
||||
ret = wc_RNG_HealthTest(1, seedA, sizeof(seedA_data),
|
||||
reseedSeedA, sizeof(reseedSeedA_data),
|
||||
check, RNG_HEALTH_TEST_CHECK_SIZE);
|
||||
if (ret == 0) {
|
||||
if (ConstantCompare(check, outputA,
|
||||
RNG_HEALTH_TEST_CHECK_SIZE) != 0)
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_USE_FLASHMEM
|
||||
XFREE(seedA, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
XFREE(reseedSeedA, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
XFREE(outputA, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
ret = wc_RNG_HealthTest(0, seedB, sizeof(seedB),
|
||||
#ifdef WOLFSSL_USE_FLASHMEM
|
||||
byte* seedB = (byte*)XMALLOC(sizeof(seedB_data), NULL,
|
||||
DYNAMIC_TYPE_TMP_BUFFER);
|
||||
byte* outputB = (byte*)XMALLOC(sizeof(outputB_data), NULL,
|
||||
DYNAMIC_TYPE_TMP_BUFFER);
|
||||
|
||||
if (!seedB || !outputB) {
|
||||
XFREE(seedB, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
XFREE(outputB, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
ret = MEMORY_E;
|
||||
}
|
||||
else {
|
||||
XMEMCPY_P(seedB, seedB_data, sizeof(seedB_data));
|
||||
XMEMCPY_P(outputB, outputB_data, sizeof(outputB_data));
|
||||
#else
|
||||
const byte* seedB = seedB_data;
|
||||
const byte* outputB = outputB_data;
|
||||
#endif
|
||||
ret = wc_RNG_HealthTest(0, seedB, sizeof(seedB_data),
|
||||
NULL, 0,
|
||||
check, RNG_HEALTH_TEST_CHECK_SIZE);
|
||||
if (ret == 0) {
|
||||
@@ -1200,16 +1248,22 @@ static int wc_RNG_HealthTestLocal(int reseed)
|
||||
* byte 32, feed them into the health test separately. */
|
||||
if (ret == 0) {
|
||||
ret = wc_RNG_HealthTest_ex(0,
|
||||
seedB + 32, sizeof(seedB) - 32,
|
||||
seedB + 32, sizeof(seedB_data) - 32,
|
||||
seedB, 32,
|
||||
NULL, 0,
|
||||
check, RNG_HEALTH_TEST_CHECK_SIZE,
|
||||
NULL, INVALID_DEVID);
|
||||
if (ret == 0) {
|
||||
if (ConstantCompare(check, outputB, sizeof(outputB)) != 0)
|
||||
if (ConstantCompare(check, outputB, sizeof(outputB_data)) != 0)
|
||||
ret = -1;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_USE_FLASHMEM
|
||||
XFREE(seedB, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
XFREE(outputB, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
|
||||
@@ -709,7 +709,7 @@ static int InitSha256(wc_Sha256* sha256)
|
||||
|
||||
#ifdef NEED_SOFT_SHA256
|
||||
|
||||
static const ALIGN32 word32 K[64] = {
|
||||
static const FLASH_QUALIFIER ALIGN32 word32 K[64] = {
|
||||
0x428A2F98L, 0x71374491L, 0xB5C0FBCFL, 0xE9B5DBA5L, 0x3956C25BL,
|
||||
0x59F111F1L, 0x923F82A4L, 0xAB1C5ED5L, 0xD807AA98L, 0x12835B01L,
|
||||
0x243185BEL, 0x550C7DC3L, 0x72BE5D74L, 0x80DEB1FEL, 0x9BDC06A7L,
|
||||
|
||||
+1448
-48
File diff suppressed because it is too large
Load Diff
+1448
-48
File diff suppressed because it is too large
Load Diff
+1448
-48
File diff suppressed because it is too large
Load Diff
+1691
-63
File diff suppressed because it is too large
Load Diff
+1691
-63
File diff suppressed because it is too large
Load Diff
+1448
-48
File diff suppressed because it is too large
Load Diff
@@ -38,8 +38,10 @@
|
||||
* WOLFSSL_HAVE_SP_RSA: Enable SP RSA support
|
||||
* WOLFSSL_HAVE_SP_DH: Enable SP DH support
|
||||
* WOLFSSL_HAVE_SP_ECC: Enable SP ECC support
|
||||
* WOLFSSL_SP_MATH: Use only single precision math and algorithms it supports (no fastmath tfm.c or normal integer.c)
|
||||
* WOLFSSL_SP_SMALL: Use smaller version of code and avoid large stack variables
|
||||
* WOLFSSL_SP_MATH: Use only single precision math and algorithms
|
||||
* it supports (no fastmath tfm.c or normal integer.c)
|
||||
* WOLFSSL_SP_SMALL: Use smaller version of code and avoid large
|
||||
* stack variables
|
||||
* WOLFSSL_SP_NO_MALLOC: Always use stack, no heap XMALLOC/XFREE allowed
|
||||
* WOLFSSL_SP_NO_2048: Disable RSA/DH 2048-bit support
|
||||
* WOLFSSL_SP_NO_3072: Disable RSA/DH 3072-bit support
|
||||
@@ -52,8 +54,12 @@
|
||||
* WOLFSSL_SP_ARM32_ASM Enable Aarch32 assembly speedups
|
||||
* WOLFSSL_SP_ARM64_ASM Enable Aarch64 assembly speedups
|
||||
* WOLFSSL_SP_ARM_CORTEX_M_ASM Enable Cortex-M assembly speedups
|
||||
* WOLFSSL_SP_ARM_THUMB_ASM Enable ARM Thumb assembly speedups (used with -mthumb)
|
||||
* WOLFSSL_SP_ARM_THUMB_ASM Enable ARM Thumb assembly speedups
|
||||
* (used with -mthumb)
|
||||
* SP_WORD_SIZE Force 32 or 64 bit mode
|
||||
* WOLFSSL_SP_NONBLOCK Enables "non blocking" mode for SP math, which
|
||||
* will return FP_WOULDBLOCK for long operations and function must be
|
||||
* called again until complete.
|
||||
*/
|
||||
|
||||
#ifdef WOLFSSL_SP_MATH
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+6
-6
@@ -3311,9 +3311,9 @@ int fp_is_bit_set (fp_int *a, fp_digit b)
|
||||
fp_digit i;
|
||||
|
||||
if (b > FP_MAX_BITS)
|
||||
return 0;
|
||||
else
|
||||
i = b/DIGIT_BIT;
|
||||
return FP_VAL;
|
||||
|
||||
i = b/DIGIT_BIT;
|
||||
|
||||
if ((fp_digit)a->used < i)
|
||||
return 0;
|
||||
@@ -3327,9 +3327,9 @@ int fp_set_bit (fp_int * a, fp_digit b)
|
||||
fp_digit i;
|
||||
|
||||
if (b > FP_MAX_BITS)
|
||||
return 0;
|
||||
else
|
||||
i = b/DIGIT_BIT;
|
||||
return FP_VAL;
|
||||
|
||||
i = b/DIGIT_BIT;
|
||||
|
||||
/* set the used count of where the bit will go if required */
|
||||
if (a->used < (int)(i+1))
|
||||
|
||||
+56
-3
@@ -331,8 +331,60 @@ int wolfCrypt_Cleanup(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if !defined(NO_FILESYSTEM) && !defined(NO_WOLFSSL_DIR) && \
|
||||
!defined(WOLFSSL_NUCLEUS) && !defined(WOLFSSL_NUCLEUS_1_2)
|
||||
#ifndef NO_FILESYSTEM
|
||||
|
||||
/* Helpful function to load file into allocated buffer */
|
||||
int wc_FileLoad(const char* fname, unsigned char** buf, size_t* bufLen,
|
||||
void* heap)
|
||||
{
|
||||
int ret;
|
||||
size_t fileSz;
|
||||
XFILE f;
|
||||
|
||||
if (fname == NULL || buf == NULL || bufLen == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
/* set defaults */
|
||||
*buf = NULL;
|
||||
*bufLen = 0;
|
||||
|
||||
/* open file (read-only binary) */
|
||||
f = XFOPEN(fname, "rb");
|
||||
if (!f) {
|
||||
WOLFSSL_MSG("wc_LoadFile file load error");
|
||||
return BAD_PATH_ERROR;
|
||||
}
|
||||
|
||||
XFSEEK(f, 0, SEEK_END);
|
||||
fileSz = XFTELL(f);
|
||||
XREWIND(f);
|
||||
if (fileSz > 0) {
|
||||
*bufLen = fileSz;
|
||||
*buf = (byte*)XMALLOC(*bufLen, heap, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
if (*buf == NULL) {
|
||||
WOLFSSL_MSG("wc_LoadFile memory error");
|
||||
ret = MEMORY_E;
|
||||
}
|
||||
else {
|
||||
size_t readLen = XFREAD(*buf, 1, *bufLen, f);
|
||||
|
||||
/* check response code */
|
||||
ret = (readLen == *bufLen) ? 0 : -1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ret = BUFFER_E;
|
||||
}
|
||||
XFCLOSE(f);
|
||||
|
||||
(void)heap;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if !defined(NO_WOLFSSL_DIR) && \
|
||||
!defined(WOLFSSL_NUCLEUS) && !defined(WOLFSSL_NUCLEUS_1_2)
|
||||
|
||||
/* File Handling Helpers */
|
||||
/* returns 0 if file found, WC_READDIR_NOFILE if no files or negative error */
|
||||
@@ -631,7 +683,8 @@ void wc_ReadDirClose(ReadDirCtx* ctx)
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* !NO_FILESYSTEM && !NO_WOLFSSL_DIR */
|
||||
#endif /* !NO_WOLFSSL_DIR */
|
||||
#endif /* !NO_FILESYSTEM */
|
||||
|
||||
#if !defined(NO_FILESYSTEM) && defined(WOLFSSL_ZEPHYR)
|
||||
XFILE z_fs_open(const char* filename, const char* perm)
|
||||
|
||||
+489
-5
@@ -10385,7 +10385,10 @@ byte GetEntropy(ENTROPY_CMD cmd, byte* out)
|
||||
!defined(USE_CERT_BUFFERS_3072) && !defined(USE_CERT_BUFFERS_4096) && \
|
||||
!defined(NO_ASN)
|
||||
#ifndef NO_DH
|
||||
static const char* dhKey = CERT_ROOT "dh2048.der";
|
||||
static const char* dhParamsFile = CERT_ROOT "dh2048.der";
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
static const char* dhKeyFile = CERT_ROOT "statickeys/dh-ffdhe2048.der";
|
||||
#endif
|
||||
#endif
|
||||
#ifndef NO_DSA
|
||||
static const char* dsaKey = CERT_ROOT "dsa2048.der";
|
||||
@@ -14144,7 +14147,6 @@ static int dh_fips_generate_test(WC_RNG *rng)
|
||||
if (ret != 0) {
|
||||
ERROR_OUT(-7796, exit_gen_test);
|
||||
}
|
||||
|
||||
#endif /* WOLFSSL_KEY_GEN */
|
||||
#endif /* HAVE_SELFTEST */
|
||||
|
||||
@@ -14428,7 +14430,7 @@ int dh_test(void)
|
||||
#elif defined(NO_ASN)
|
||||
/* don't use file, no DER parsing */
|
||||
#elif !defined(NO_FILESYSTEM)
|
||||
XFILE file = XFOPEN(dhKey, "rb");
|
||||
XFILE file = XFOPEN(dhParamsFile, "rb");
|
||||
if (!file)
|
||||
return -7900;
|
||||
|
||||
@@ -14545,6 +14547,36 @@ int dh_test(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Test DH key import / export */
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
#if !defined(NO_ASN) && !defined(NO_FILESYSTEM)
|
||||
file = XFOPEN(dhKeyFile, "rb");
|
||||
if (!file)
|
||||
return -7950;
|
||||
bytes = (word32)XFREAD(tmp, 1, sizeof(tmp), file);
|
||||
XFCLOSE(file);
|
||||
|
||||
idx = 0;
|
||||
ret = wc_DhKeyDecode(tmp, &idx, &key, bytes);
|
||||
if (ret != 0) {
|
||||
return -7951;
|
||||
}
|
||||
#endif
|
||||
|
||||
privSz = sizeof(priv);
|
||||
pubSz = sizeof(pub);
|
||||
ret = wc_DhExportKeyPair(&key, priv, &privSz, pub, &pubSz);
|
||||
if (ret != 0) {
|
||||
return -7952;
|
||||
}
|
||||
ret = wc_DhImportKeyPair(&key2, priv, privSz, pub, pubSz);
|
||||
if (ret != 0) {
|
||||
return -7953;
|
||||
}
|
||||
#endif /* WOLFSSL_DH_EXTRA */
|
||||
|
||||
ret = dh_generate_test(&rng);
|
||||
if (ret == 0)
|
||||
ret = dh_fips_generate_test(&rng);
|
||||
@@ -20051,6 +20083,446 @@ exit:
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ECC Non-blocking tests for Sign and Verify */
|
||||
/* Requires SP math and supports P384 or P256 */
|
||||
/* ./configure --enable-ecc=nonblock --enable-sp=yes,nonblock CFLAGS="-DWOLFSSL_PUBLIC_MP" */
|
||||
#if defined(WC_ECC_NONBLOCK) && defined(WOLFSSL_PUBLIC_MP) && \
|
||||
defined(HAVE_ECC_SIGN) && defined(HAVE_ECC_VERIFY)
|
||||
/* Test Data - Random */
|
||||
static const uint8_t kMsg[] = {
|
||||
0x69, 0xbc, 0x9f, 0xce, 0x68, 0x17, 0xc2, 0x10, 0xea, 0xfc, 0x10, 0x65, 0x67, 0x52, 0xed, 0x78,
|
||||
0x6e, 0xb8, 0x83, 0x9c, 0x9a, 0xb4, 0x56, 0x0d, 0xc1, 0x0d, 0x1f, 0x78, 0x6e, 0x75, 0xd7, 0xbe,
|
||||
0x92, 0x6b, 0x12, 0xf6, 0x76, 0x60, 0x8e, 0xb1, 0xf4, 0x19, 0x0c, 0x81, 0xe7, 0x54, 0x5e, 0xbc,
|
||||
0xe0, 0xae, 0xc2, 0x7d, 0x1b, 0xc4, 0x6e, 0xec, 0xb1, 0x99, 0x6c, 0xbf, 0x0e, 0x38, 0xa8, 0x01,
|
||||
0xa6, 0x9a, 0x48, 0x12, 0xe4, 0xc9, 0x3b, 0xf0, 0x63, 0x46, 0x15, 0xb4, 0x61, 0xa8, 0x1a, 0x60,
|
||||
0x71, 0x87, 0x98, 0xd7, 0x6f, 0x98, 0x7b, 0x2d, 0xb9, 0x19, 0x1b, 0x21, 0x9c, 0x70, 0x58, 0xe8,
|
||||
0x0d, 0x0f, 0xe9, 0x2d, 0x9a, 0x9a, 0xf1, 0x55, 0xa0, 0x4c, 0xd3, 0x07, 0xbd, 0x97, 0x48, 0xec,
|
||||
0x88, 0x0a, 0xaf, 0xb3, 0x80, 0x78, 0xa4, 0x59, 0x43, 0x57, 0xd3, 0xa7, 0x01, 0x66, 0x0e, 0xfc
|
||||
};
|
||||
|
||||
/* ECC Private Key "d" */
|
||||
static const uint8_t kPrivKey[] = {
|
||||
#ifdef HAVE_ECC384
|
||||
/* SECP384R1 */
|
||||
/* d */
|
||||
0xa4, 0xe5, 0x06, 0xe8, 0x06, 0x16, 0x3e, 0xab,
|
||||
0x89, 0xf8, 0x60, 0x43, 0xc0, 0x60, 0x25, 0xdb,
|
||||
0xba, 0x7b, 0xfe, 0x19, 0x35, 0x08, 0x55, 0x65,
|
||||
0x76, 0xe2, 0xdc, 0xe0, 0x01, 0x8b, 0x6b, 0x68,
|
||||
0xdf, 0xcf, 0x6f, 0x80, 0x12, 0xce, 0x79, 0x37,
|
||||
0xeb, 0x2b, 0x9c, 0x7b, 0xc4, 0x68, 0x1c, 0x74
|
||||
#else
|
||||
/* SECP256R1 */
|
||||
/* d */
|
||||
0x1e, 0xe7, 0x70, 0x07, 0xd3, 0x30, 0x94, 0x39,
|
||||
0x28, 0x90, 0xdf, 0x23, 0x88, 0x2c, 0x4a, 0x34,
|
||||
0x15, 0xdb, 0x4c, 0x43, 0xcd, 0xfa, 0xe5, 0x1f,
|
||||
0x3d, 0x4c, 0x37, 0xfe, 0x59, 0x3b, 0x96, 0xd8
|
||||
#endif
|
||||
};
|
||||
|
||||
/* ECC public key Qx/Qy */
|
||||
static const uint8_t kPubKey[] = {
|
||||
#ifdef HAVE_ECC384
|
||||
/* SECP384R1 */
|
||||
/* Qx */
|
||||
0xea, 0xcf, 0x93, 0x4f, 0x2c, 0x09, 0xbb, 0x39,
|
||||
0x14, 0x0f, 0x56, 0x64, 0xc3, 0x40, 0xb4, 0xdf,
|
||||
0x0e, 0x63, 0xae, 0xe5, 0x71, 0x4b, 0x00, 0xcc,
|
||||
0x04, 0x97, 0xff, 0xe1, 0xe9, 0x38, 0x96, 0xbb,
|
||||
0x5f, 0x91, 0xb2, 0x6a, 0xcc, 0xb5, 0x39, 0x5f,
|
||||
0x8f, 0x70, 0x59, 0xf1, 0x01, 0xf6, 0x5a, 0x2b,
|
||||
/* Qy */
|
||||
0x01, 0x6c, 0x68, 0x0b, 0xcf, 0x55, 0x25, 0xaf,
|
||||
0x6d, 0x98, 0x48, 0x0a, 0xa8, 0x74, 0xc9, 0xa9,
|
||||
0x17, 0xa0, 0x0c, 0xc3, 0xfb, 0xd3, 0x23, 0x68,
|
||||
0xfe, 0x04, 0x3c, 0x63, 0x50, 0x88, 0x3b, 0xb9,
|
||||
0x4f, 0x7c, 0x67, 0x34, 0xf7, 0x3b, 0xa9, 0x73,
|
||||
0xe7, 0x1b, 0xc3, 0x51, 0x5e, 0x22, 0x18, 0xec
|
||||
#else
|
||||
/* SECP256R1 */
|
||||
/* Qx */
|
||||
0x96, 0x93, 0x1c, 0x53, 0x0b, 0x43, 0x6c, 0x42,
|
||||
0x0c, 0x52, 0x90, 0xe4, 0xa7, 0xec, 0x98, 0xb1,
|
||||
0xaf, 0xd4, 0x14, 0x49, 0xd8, 0xc1, 0x42, 0x82,
|
||||
0x04, 0x78, 0xd1, 0x90, 0xae, 0xa0, 0x6c, 0x07,
|
||||
/* Qy */
|
||||
0xf2, 0x3a, 0xb5, 0x10, 0x32, 0x8d, 0xce, 0x9e,
|
||||
0x76, 0xa0, 0xd2, 0x8c, 0xf3, 0xfc, 0xa9, 0x94,
|
||||
0x43, 0x24, 0xe6, 0x82, 0x00, 0x40, 0xc6, 0xdb,
|
||||
0x1c, 0x2f, 0xcd, 0x38, 0x4b, 0x60, 0xdd, 0x61
|
||||
#endif
|
||||
};
|
||||
|
||||
/* ECC Curve */
|
||||
#ifdef HAVE_ECC384
|
||||
/* SECP384R1 */
|
||||
#define ECC_CURVE_SZ 48
|
||||
#define ECC_CURVE_ID ECC_SECP384R1
|
||||
#else
|
||||
/* SECP256R1 */
|
||||
#define ECC_CURVE_SZ 32
|
||||
#define ECC_CURVE_ID ECC_SECP256R1
|
||||
#endif
|
||||
|
||||
/* Hash Algorithm */
|
||||
#if defined(HAVE_ECC384) && defined(WOLFSSL_SHA3)
|
||||
#define HASH_DIGEST_SZ WC_SHA3_384_DIGEST_SIZE
|
||||
#define HASH_SHA_VER 3
|
||||
#define CRYPTO_HASH_FN crypto_sha3_384
|
||||
#elif defined(HAVE_ECC384) && defined(WOLFSSL_SHA384)
|
||||
#define HASH_DIGEST_SZ WC_SHA384_DIGEST_SIZE
|
||||
#define HASH_SHA_VER 2
|
||||
#define CRYPTO_HASH_FN crypto_sha2_384
|
||||
#elif !defined(NO_SHA256)
|
||||
#define HASH_DIGEST_SZ WC_SHA256_DIGEST_SIZE
|
||||
#define HASH_SHA_VER 2
|
||||
#define CRYPTO_HASH_FN crypto_sha2_256
|
||||
#else
|
||||
#error test configuration not supported
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_ECC384) && defined(WOLFSSL_SHA3)
|
||||
/* helper to perform hashing block by block */
|
||||
static int crypto_sha3_384(const uint8_t *buf, uint32_t len, uint8_t *hash,
|
||||
uint32_t hashSz, uint32_t blkSz)
|
||||
{
|
||||
int ret;
|
||||
uint32_t i = 0, chunk;
|
||||
wc_Sha3 sha3;
|
||||
|
||||
/* validate arguments */
|
||||
if ((buf == NULL && len > 0) || hash == NULL ||
|
||||
hashSz < WC_SHA3_384_DIGEST_SIZE || blkSz == 0)
|
||||
{
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
/* Init Sha3_384 structure */
|
||||
ret = wc_InitSha3_384(&sha3, NULL, INVALID_DEVID);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
while (i < len) {
|
||||
chunk = blkSz;
|
||||
if ((chunk + i) > len)
|
||||
chunk = len - i;
|
||||
/* Perform chunked update */
|
||||
ret = wc_Sha3_384_Update(&sha3, (buf + i), chunk);
|
||||
if (ret != 0) {
|
||||
break;
|
||||
}
|
||||
i += chunk;
|
||||
}
|
||||
if (ret == 0) {
|
||||
/* Get final digest result */
|
||||
ret = wc_Sha3_384_Final(&sha3, hash);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#elif defined(HAVE_ECC384) && defined(WOLFSSL_SHA384)
|
||||
/* helper to perform hashing block by block */
|
||||
static int crypto_sha2_384(const uint8_t *buf, uint32_t len, uint8_t *hash,
|
||||
uint32_t hashSz, uint32_t blkSz)
|
||||
{
|
||||
int ret;
|
||||
uint32_t i = 0, chunk;
|
||||
wc_Sha384 sha384;
|
||||
|
||||
/* validate arguments */
|
||||
if ((buf == NULL && len > 0) || hash == NULL ||
|
||||
hashSz < WC_SHA384_DIGEST_SIZE || blkSz == 0)
|
||||
{
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
/* Init Sha384 structure */
|
||||
ret = wc_InitSha384(&sha384);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
while (i < len) {
|
||||
chunk = blkSz;
|
||||
if ((chunk + i) > len)
|
||||
chunk = len - i;
|
||||
/* Perform chunked update */
|
||||
ret = wc_Sha384Update(&sha384, (buf + i), chunk);
|
||||
if (ret != 0) {
|
||||
break;
|
||||
}
|
||||
i += chunk;
|
||||
}
|
||||
if (ret == 0) {
|
||||
/* Get final digest result */
|
||||
ret = wc_Sha384Final(&sha384, hash);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#elif !defined(NO_SHA256)
|
||||
/* helper to perform hashing block by block */
|
||||
static int crypto_sha2_256(const uint8_t *buf, uint32_t len, uint8_t *hash,
|
||||
uint32_t hashSz, uint32_t blkSz)
|
||||
{
|
||||
int ret;
|
||||
uint32_t i = 0, chunk;
|
||||
wc_Sha256 sha256;
|
||||
|
||||
/* validate arguments */
|
||||
if ((buf == NULL && len > 0) || hash == NULL ||
|
||||
hashSz < WC_SHA256_DIGEST_SIZE || blkSz == 0)
|
||||
{
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
/* Init Sha256 structure */
|
||||
ret = wc_InitSha256(&sha256);
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
while (i < len) {
|
||||
chunk = blkSz;
|
||||
if ((chunk + i) > len)
|
||||
chunk = len - i;
|
||||
/* Perform chunked update */
|
||||
ret = wc_Sha256Update(&sha256, (buf + i), chunk);
|
||||
if (ret != 0) {
|
||||
break;
|
||||
}
|
||||
i += chunk;
|
||||
}
|
||||
if (ret == 0) {
|
||||
/* Get final digest result */
|
||||
ret = wc_Sha256Final(&sha256, hash);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* perform verify of signature and hash using public key */
|
||||
/* key is public Qx + public Qy */
|
||||
/* sig is r + s */
|
||||
static int crypto_ecc_verify(const uint8_t *key, uint32_t keySz,
|
||||
const uint8_t *hash, uint32_t hashSz, const uint8_t *sig, uint32_t sigSz,
|
||||
uint32_t curveSz, int curveId)
|
||||
{
|
||||
int ret, verify_res = 0, count = 0;
|
||||
mp_int r, s;
|
||||
ecc_key ecc;
|
||||
ecc_nb_ctx_t nb_ctx;
|
||||
|
||||
/* validate arguments */
|
||||
if (key == NULL || hash == NULL || sig == NULL || curveSz == 0 ||
|
||||
hashSz == 0 || keySz < (curveSz*2) || sigSz < (curveSz*2))
|
||||
{
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
/* Setup the ECC key */
|
||||
ret = wc_ecc_init(&ecc);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = wc_ecc_set_nonblock(&ecc, &nb_ctx);
|
||||
if (ret != MP_OKAY) {
|
||||
wc_ecc_free(&ecc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Setup the signature r/s variables */
|
||||
ret = mp_init(&r);
|
||||
if (ret != MP_OKAY) {
|
||||
wc_ecc_free(&ecc);
|
||||
return ret;
|
||||
}
|
||||
ret = mp_init(&s);
|
||||
if (ret != MP_OKAY) {
|
||||
mp_clear(&r);
|
||||
wc_ecc_free(&ecc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Import public key x/y */
|
||||
ret = wc_ecc_import_unsigned(
|
||||
&ecc,
|
||||
(byte*)key, /* Public "x" Coordinate */
|
||||
(byte*)(key + curveSz), /* Public "y" Coordinate */
|
||||
NULL, /* Private "d" (optional) */
|
||||
curveId /* ECC Curve Id */
|
||||
);
|
||||
/* Make sure it was a public key imported */
|
||||
if (ret == 0 && ecc.type != ECC_PUBLICKEY) {
|
||||
ret = ECC_BAD_ARG_E;
|
||||
}
|
||||
|
||||
/* Import signature r/s */
|
||||
if (ret == 0) {
|
||||
ret = mp_read_unsigned_bin(&r, sig, curveSz);
|
||||
}
|
||||
if (ret == 0) {
|
||||
ret = mp_read_unsigned_bin(&s, sig + curveSz, curveSz);
|
||||
}
|
||||
|
||||
/* Verify ECC Signature */
|
||||
if (ret == 0) {
|
||||
do {
|
||||
ret = wc_ecc_verify_hash_ex(
|
||||
&r, &s, /* r/s as mp_int */
|
||||
hash, hashSz, /* computed hash digest */
|
||||
&verify_res, /* verification result 1=success */
|
||||
&ecc
|
||||
);
|
||||
count++;
|
||||
|
||||
/* TODO: Real-time work can be called here */
|
||||
} while (ret == FP_WOULDBLOCK);
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
printf("ECC non-block verify: %d times\n", count);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* check verify result */
|
||||
if (ret == 0 && verify_res == 0) {
|
||||
ret = SIG_VERIFY_E;
|
||||
}
|
||||
|
||||
mp_clear(&r);
|
||||
mp_clear(&s);
|
||||
wc_ecc_free(&ecc);
|
||||
|
||||
(void)count;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* perform signature operation against hash using private key */
|
||||
static int crypto_ecc_sign(const uint8_t *key, uint32_t keySz,
|
||||
const uint8_t *hash, uint32_t hashSz, uint8_t *sig, uint32_t* sigSz,
|
||||
uint32_t curveSz, int curveId, WC_RNG* rng)
|
||||
{
|
||||
int ret, count = 0;
|
||||
mp_int r, s;
|
||||
ecc_key ecc;
|
||||
ecc_nb_ctx_t nb_ctx;
|
||||
|
||||
/* validate arguments */
|
||||
if (key == NULL || hash == NULL || sig == NULL || sigSz == NULL ||
|
||||
curveSz == 0 || hashSz == 0 || keySz < curveSz || *sigSz < (curveSz*2))
|
||||
{
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
/* Initialize signature result */
|
||||
memset(sig, 0, curveSz*2);
|
||||
|
||||
/* Setup the ECC key */
|
||||
ret = wc_ecc_init(&ecc);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = wc_ecc_set_nonblock(&ecc, &nb_ctx);
|
||||
if (ret != MP_OKAY) {
|
||||
wc_ecc_free(&ecc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Setup the signature r/s variables */
|
||||
ret = mp_init(&r);
|
||||
if (ret != MP_OKAY) {
|
||||
wc_ecc_free(&ecc);
|
||||
return ret;
|
||||
}
|
||||
ret = mp_init(&s);
|
||||
if (ret != MP_OKAY) {
|
||||
mp_clear(&r);
|
||||
wc_ecc_free(&ecc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Import private key "k" */
|
||||
ret = wc_ecc_import_private_key_ex(
|
||||
key, keySz, /* private key "d" */
|
||||
NULL, 0, /* public (optional) */
|
||||
&ecc,
|
||||
curveId /* ECC Curve Id */
|
||||
);
|
||||
|
||||
if (ret == 0) {
|
||||
do {
|
||||
/* Verify ECC Signature */
|
||||
ret = wc_ecc_sign_hash_ex(
|
||||
hash, hashSz, /* computed hash digest */
|
||||
rng, &ecc, /* random and key context */
|
||||
&r, &s /* r/s as mp_int */
|
||||
);
|
||||
count++;
|
||||
|
||||
/* TODO: Real-time work can be called here */
|
||||
} while (ret == FP_WOULDBLOCK);
|
||||
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
printf("ECC non-block sign: %d times\n", count);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
/* export r/s */
|
||||
mp_to_unsigned_bin(&r, sig);
|
||||
mp_to_unsigned_bin(&s, sig + curveSz);
|
||||
}
|
||||
|
||||
mp_clear(&r);
|
||||
mp_clear(&s);
|
||||
wc_ecc_free(&ecc);
|
||||
|
||||
(void)count;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ecc_test_nonblock(WC_RNG* rng)
|
||||
{
|
||||
int ret;
|
||||
uint8_t hash[HASH_DIGEST_SZ];
|
||||
uint8_t sig[ECC_CURVE_SZ*2];
|
||||
uint32_t sigSz = sizeof(sig);
|
||||
|
||||
ret = CRYPTO_HASH_FN(
|
||||
kMsg, sizeof(kMsg), /* input message */
|
||||
hash, sizeof(hash), /* hash digest result */
|
||||
32 /* configurable block / chunk size */
|
||||
);
|
||||
if (ret == 0) {
|
||||
/* Sign hash using private key */
|
||||
/* Note: result of an ECC sign varies for each call even with same
|
||||
private key and hash. This is because a new random public key is
|
||||
used for each operation. */
|
||||
ret = crypto_ecc_sign(
|
||||
kPrivKey, sizeof(kPrivKey), /* private key */
|
||||
hash, sizeof(hash), /* computed hash digest */
|
||||
sig, &sigSz, /* signature r/s */
|
||||
ECC_CURVE_SZ, /* curve size in bytes */
|
||||
ECC_CURVE_ID, /* curve id */
|
||||
rng
|
||||
);
|
||||
}
|
||||
|
||||
if (ret == 0) {
|
||||
/* Verify generated signature is valid */
|
||||
ret = crypto_ecc_verify(
|
||||
kPubKey, sizeof(kPubKey), /* public key point x/y */
|
||||
hash, sizeof(hash), /* computed hash digest */
|
||||
sig, sigSz, /* signature r/s */
|
||||
ECC_CURVE_SZ, /* curve size in bytes */
|
||||
ECC_CURVE_ID /* curve id */
|
||||
);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif /* WC_ECC_NONBLOCK && WOLFSSL_PUBLIC_MP && HAVE_ECC_SIGN && HAVE_ECC_VERIFY */
|
||||
|
||||
int ecc_test(void)
|
||||
{
|
||||
int ret;
|
||||
@@ -20193,6 +20665,14 @@ int ecc_test(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(WC_ECC_NONBLOCK) && defined(WOLFSSL_PUBLIC_MP) && \
|
||||
defined(HAVE_ECC_SIGN) && defined(HAVE_ECC_VERIFY)
|
||||
ret = ecc_test_nonblock(&rng);
|
||||
if (ret != 0) {
|
||||
printf("ecc_test_nonblock failed!: %d\n", ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
done:
|
||||
wc_FreeRng(&rng);
|
||||
|
||||
@@ -28013,12 +28493,15 @@ int mutex_test(void)
|
||||
XFREE(mm, NULL, DYNAMIC_TYPE_MUTEX);
|
||||
#endif
|
||||
|
||||
/* Can optionally enable advanced pthread tests using "ENABLE_PTHREAD_LOCKFREE_TESTS" */
|
||||
#ifdef WOLFSSL_PTHREADS
|
||||
if (wc_InitMutex(&m) != 0)
|
||||
return -12701;
|
||||
if (wc_LockMutex(&m) != 0)
|
||||
return -12702;
|
||||
#if !defined(WOLFSSL_SOLARIS)
|
||||
#if !defined(WOLFSSL_SOLARIS) && defined(ENABLE_PTHREAD_LOCKFREE_TESTS)
|
||||
/* trying to free a locked mutex is not portable behavior with pthread */
|
||||
/* Attempting to destroy a locked mutex results in undefined behavior */
|
||||
if (wc_FreeMutex(&m) != BAD_MUTEX_E)
|
||||
return -12703;
|
||||
#endif
|
||||
@@ -28026,7 +28509,8 @@ int mutex_test(void)
|
||||
return -12704;
|
||||
if (wc_FreeMutex(&m) != 0)
|
||||
return -12705;
|
||||
#if !defined(WOLFSSL_NO_MUTEXLOCK_AFTER_FREE)
|
||||
#if !defined(WOLFSSL_SOLARIS) && defined(ENABLE_PTHREAD_LOCKFREE_TESTS)
|
||||
/* Trying to use a pthread after free'ing is not portable behavior */
|
||||
if (wc_LockMutex(&m) != BAD_MUTEX_E)
|
||||
return -12706;
|
||||
if (wc_UnLockMutex(&m) != BAD_MUTEX_E)
|
||||
|
||||
@@ -167,6 +167,8 @@ enum wolfSSL_ErrorCodes {
|
||||
CLIENT_CERT_CB_ERROR = -436, /* Client cert callback error */
|
||||
SSL_SHUTDOWN_ALREADY_DONE_E = -437, /* Shutdown called redundantly */
|
||||
TLS13_SECRET_CB_E = -438, /* TLS1.3 secret Cb fcn failure */
|
||||
DTLS_SIZE_ERROR = -439, /* Trying to send too much data */
|
||||
NO_CERT_ERROR = -440, /* TLS1.3 - no cert set error */
|
||||
|
||||
/* add strings to wolfSSL_ERR_reason_error_string in internal.c !!!!! */
|
||||
|
||||
|
||||
+35
-9
@@ -1657,6 +1657,10 @@ WOLFSSL_LOCAL int InitSSL_Side(WOLFSSL* ssl, word16 side);
|
||||
/* for sniffer */
|
||||
WOLFSSL_LOCAL int DoFinished(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
||||
word32 size, word32 totalSz, int sniff);
|
||||
#ifdef WOLFSSL_TLS13
|
||||
WOLFSSL_LOCAL int DoTls13Finished(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
||||
word32 size, word32 totalSz, int sniff);
|
||||
#endif
|
||||
WOLFSSL_LOCAL int DoApplicationData(WOLFSSL* ssl, byte* input, word32* inOutIdx);
|
||||
/* TLS v1.3 needs these */
|
||||
WOLFSSL_LOCAL int HandleTlsResumption(WOLFSSL* ssl, int bogusID,
|
||||
@@ -1692,10 +1696,11 @@ WOLFSSL_LOCAL int CheckAltNames(DecodedCert* dCert, char* domain);
|
||||
WOLFSSL_LOCAL int CheckIPAddr(DecodedCert* dCert, const char* ipasc);
|
||||
#endif
|
||||
WOLFSSL_LOCAL int CreateTicket(WOLFSSL* ssl);
|
||||
WOLFSSL_LOCAL int HashOutputRaw(WOLFSSL* ssl, const byte* output, int sz);
|
||||
WOLFSSL_LOCAL int HashRaw(WOLFSSL* ssl, const byte* output, int sz);
|
||||
WOLFSSL_LOCAL int HashOutput(WOLFSSL* ssl, const byte* output, int sz,
|
||||
int ivSz);
|
||||
WOLFSSL_LOCAL int HashInput(WOLFSSL* ssl, const byte* input, int sz);
|
||||
|
||||
#if defined(OPENSSL_ALL) || defined(HAVE_STUNNEL) || defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)
|
||||
WOLFSSL_LOCAL int SNI_Callback(WOLFSSL* ssl);
|
||||
#endif
|
||||
@@ -2150,13 +2155,14 @@ typedef enum {
|
||||
TLSX_SUPPORTED_GROUPS = 0x000a, /* a.k.a. Supported Curves */
|
||||
TLSX_EC_POINT_FORMATS = 0x000b,
|
||||
#if !defined(WOLFSSL_NO_SIGALG)
|
||||
TLSX_SIGNATURE_ALGORITHMS = 0x000d,
|
||||
TLSX_SIGNATURE_ALGORITHMS = 0x000d, /* HELLO_EXT_SIG_ALGO */
|
||||
#endif
|
||||
TLSX_APPLICATION_LAYER_PROTOCOL = 0x0010, /* a.k.a. ALPN */
|
||||
TLSX_STATUS_REQUEST_V2 = 0x0011, /* a.k.a. OCSP stapling v2 */
|
||||
#if defined(HAVE_ENCRYPT_THEN_MAC) && !defined(WOLFSSL_AEAD_ONLY)
|
||||
TLSX_ENCRYPT_THEN_MAC = 0x0016, /* RFC 7366 */
|
||||
#endif
|
||||
TLSX_EXTENDED_MASTER_SECRET = 0x0017, /* HELLO_EXT_EXTMS */
|
||||
TLSX_QUANTUM_SAFE_HYBRID = 0x0018, /* a.k.a. QSH */
|
||||
TLSX_SESSION_TICKET = 0x0023,
|
||||
#ifdef WOLFSSL_TLS13
|
||||
@@ -2579,6 +2585,13 @@ enum DeriveKeyType {
|
||||
update_traffic_key
|
||||
};
|
||||
|
||||
WOLFSSL_LOCAL int DeriveEarlySecret(WOLFSSL* ssl);
|
||||
WOLFSSL_LOCAL int DeriveHandshakeSecret(WOLFSSL* ssl);
|
||||
WOLFSSL_LOCAL int DeriveTls13Keys(WOLFSSL* ssl, int secret, int side, int store);
|
||||
WOLFSSL_LOCAL int DeriveMasterSecret(WOLFSSL* ssl);
|
||||
WOLFSSL_LOCAL int DeriveResumptionPSK(WOLFSSL* ssl, byte* nonce, byte nonceLen, byte* secret);
|
||||
WOLFSSL_LOCAL int DeriveResumptionSecret(WOLFSSL* ssl, byte* key);
|
||||
|
||||
/* The key update request values for KeyUpdate message. */
|
||||
enum KeyUpdateRequest {
|
||||
update_not_requested,
|
||||
@@ -2595,6 +2608,14 @@ enum SetCBIO {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_STATIC_EPHEMERAL
|
||||
typedef struct {
|
||||
int keyAlgo;
|
||||
DerBuffer* key;
|
||||
} StaticKeyExchangeInfo_t;
|
||||
#endif
|
||||
|
||||
|
||||
/* wolfSSL context type */
|
||||
struct WOLFSSL_CTX {
|
||||
WOLFSSL_METHOD* method;
|
||||
@@ -2868,16 +2889,19 @@ struct WOLFSSL_CTX {
|
||||
#endif /* NO_RSA */
|
||||
#endif /* HAVE_PK_CALLBACKS */
|
||||
#ifdef HAVE_WOLF_EVENT
|
||||
WOLF_EVENT_QUEUE event_queue;
|
||||
WOLF_EVENT_QUEUE event_queue;
|
||||
#endif /* HAVE_WOLF_EVENT */
|
||||
#ifdef HAVE_EXT_CACHE
|
||||
WOLFSSL_SESSION*(*get_sess_cb)(WOLFSSL*, unsigned char*, int, int*);
|
||||
int (*new_sess_cb)(WOLFSSL*, WOLFSSL_SESSION*);
|
||||
void (*rem_sess_cb)(WOLFSSL_CTX*, WOLFSSL_SESSION*);
|
||||
WOLFSSL_SESSION*(*get_sess_cb)(WOLFSSL*, unsigned char*, int, int*);
|
||||
int (*new_sess_cb)(WOLFSSL*, WOLFSSL_SESSION*);
|
||||
void (*rem_sess_cb)(WOLFSSL_CTX*, WOLFSSL_SESSION*);
|
||||
#endif
|
||||
#if defined(OPENSSL_EXTRA) && defined(WOLFCRYPT_HAVE_SRP) && !defined(NO_SHA256)
|
||||
Srp* srp; /* TLS Secure Remote Password Protocol*/
|
||||
byte* srp_password;
|
||||
Srp* srp; /* TLS Secure Remote Password Protocol*/
|
||||
byte* srp_password;
|
||||
#endif
|
||||
#ifdef WOLFSSL_STATIC_EPHEMERAL
|
||||
StaticKeyExchangeInfo_t staticKE;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -2942,7 +2966,6 @@ enum KeyExchangeAlgorithm {
|
||||
ecc_static_diffie_hellman_kea /* for verify suite only */
|
||||
};
|
||||
|
||||
|
||||
/* Supported Authentication Schemes */
|
||||
enum SignatureAlgorithm {
|
||||
anonymous_sa_algo = 0,
|
||||
@@ -4220,6 +4243,9 @@ struct WOLFSSL {
|
||||
WOLFSSL_STACK* supportedCiphers; /* Used in wolfSSL_get_ciphers_compat */
|
||||
WOLFSSL_STACK* peerCertChain; /* Used in wolfSSL_get_peer_cert_chain */
|
||||
#endif
|
||||
#ifdef WOLFSSL_STATIC_EPHEMERAL
|
||||
StaticKeyExchangeInfo_t staticKE;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
+30
-6
@@ -49,18 +49,19 @@ SSL_SNIFFER_API int ssl_SetPrivateKey(const char* address, int port,
|
||||
const char* keyFile, int typeK,
|
||||
const char* password, char* error);
|
||||
|
||||
WOLFSSL_API
|
||||
SSL_SNIFFER_API int ssl_SetNamedPrivateKey(const char* name,
|
||||
const char* address, int port,
|
||||
const char* keyFile, int typeK,
|
||||
const char* password, char* error);
|
||||
|
||||
WOLFSSL_API
|
||||
SSL_SNIFFER_API int ssl_SetPrivateKeyBuffer(const char* address, int port,
|
||||
const char* keyBuf, int keySz,
|
||||
int typeK, const char* password,
|
||||
char* error);
|
||||
|
||||
|
||||
WOLFSSL_API
|
||||
SSL_SNIFFER_API int ssl_SetNamedPrivateKey(const char* name,
|
||||
const char* address, int port,
|
||||
const char* keyFile, int typeK,
|
||||
const char* password, char* error);
|
||||
|
||||
WOLFSSL_API
|
||||
SSL_SNIFFER_API int ssl_SetNamedPrivateKeyBuffer(const char* name,
|
||||
const char* address, int port,
|
||||
@@ -68,6 +69,29 @@ SSL_SNIFFER_API int ssl_SetNamedPrivateKeyBuffer(const char* name,
|
||||
int typeK, const char* password,
|
||||
char* error);
|
||||
|
||||
WOLFSSL_API
|
||||
SSL_SNIFFER_API int ssl_SetEphemeralKey(const char* address, int port,
|
||||
const char* keyFile, int typeKey,
|
||||
const char* password, char* error);
|
||||
|
||||
WOLFSSL_API
|
||||
SSL_SNIFFER_API int ssl_SetEphemeralKeyBuffer(const char* address, int port,
|
||||
const char* keyBuf, int keySz, int typeKey,
|
||||
const char* password, char* error);
|
||||
|
||||
|
||||
WOLFSSL_API
|
||||
SSL_SNIFFER_API int ssl_SetNamedEphemeralKey(const char* name,
|
||||
const char* address, int port,
|
||||
const char* keyFile, int typeKey,
|
||||
const char* password, char* error);
|
||||
|
||||
WOLFSSL_API
|
||||
SSL_SNIFFER_API int ssl_SetNamedEphemeralKeyBuffer(const char* name,
|
||||
const char* address, int port,
|
||||
const char* keyBuf, int keySz, int typeKey,
|
||||
const char* password, char* error);
|
||||
|
||||
WOLFSSL_API
|
||||
SSL_SNIFFER_API int ssl_DecodePacket(const unsigned char* packet, int length,
|
||||
unsigned char** data, char* error);
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
#define NO_DATA_DEST_STR 91
|
||||
#define STORE_DATA_FAIL_STR 92
|
||||
#define CHAIN_INPUT_STR 93
|
||||
#define GOT_ENC_EXT_STR 94
|
||||
/* !!!! also add to msgTable in sniffer.c and .rc file !!!! */
|
||||
|
||||
|
||||
|
||||
+13
-4
@@ -2541,7 +2541,7 @@ struct DhKey;
|
||||
typedef int (*CallbackDhAgree)(WOLFSSL* ssl, struct DhKey* key,
|
||||
const unsigned char* priv, unsigned int privSz,
|
||||
const unsigned char* otherPubKeyDer, unsigned int otherPubKeySz,
|
||||
unsigned char* out, unsigned int* outlen,
|
||||
unsigned char* out, word32* outlen,
|
||||
void* ctx);
|
||||
WOLFSSL_API void wolfSSL_CTX_SetDhAgreeCb(WOLFSSL_CTX*, CallbackDhAgree);
|
||||
WOLFSSL_API void wolfSSL_SetDhAgreeCtx(WOLFSSL* ssl, void *ctx);
|
||||
@@ -2639,7 +2639,7 @@ WOLFSSL_API void* wolfSSL_GetX448SharedSecretCtx(WOLFSSL* ssl);
|
||||
#ifndef NO_RSA
|
||||
typedef int (*CallbackRsaSign)(WOLFSSL* ssl,
|
||||
const unsigned char* in, unsigned int inSz,
|
||||
unsigned char* out, unsigned int* outSz,
|
||||
unsigned char* out, word32* outSz,
|
||||
const unsigned char* keyDer, unsigned int keySz,
|
||||
void* ctx);
|
||||
WOLFSSL_API void wolfSSL_CTX_SetRsaSignCb(WOLFSSL_CTX*, CallbackRsaSign);
|
||||
@@ -2684,7 +2684,7 @@ WOLFSSL_API void* wolfSSL_GetRsaPssVerifyCtx(WOLFSSL* ssl);
|
||||
/* RSA Public Encrypt cb */
|
||||
typedef int (*CallbackRsaEnc)(WOLFSSL* ssl,
|
||||
const unsigned char* in, unsigned int inSz,
|
||||
unsigned char* out, unsigned int* outSz,
|
||||
unsigned char* out, word32* outSz,
|
||||
const unsigned char* keyDer, unsigned int keySz,
|
||||
void* ctx);
|
||||
WOLFSSL_API void wolfSSL_CTX_SetRsaEncCb(WOLFSSL_CTX*, CallbackRsaEnc);
|
||||
@@ -3898,7 +3898,7 @@ WOLFSSL_API WOLFSSL_EVP_PKEY* wolfSSL_d2i_AutoPrivateKey(
|
||||
WOLFSSL_API unsigned long wolfSSL_X509_subject_name_hash(const WOLFSSL_X509* x509);
|
||||
|
||||
|
||||
#endif /* OPENSSL_EXTRA */
|
||||
#endif /* OPENSSL_EXTRA || OPENSSL_EXTRA_X509_SMALL */
|
||||
|
||||
#ifdef HAVE_PK_CALLBACKS
|
||||
WOLFSSL_API int wolfSSL_IsPrivatePkSet(WOLFSSL* ssl);
|
||||
@@ -3910,6 +3910,15 @@ WOLFSSL_API int wolfSSL_CTX_AllowEncryptThenMac(WOLFSSL_CTX *, int);
|
||||
WOLFSSL_API int wolfSSL_AllowEncryptThenMac(WOLFSSL *s, int);
|
||||
#endif
|
||||
|
||||
/* This feature is used to set a fixed ephemeral key and is for testing only */
|
||||
/* Currently allows ECDHE and DHE only */
|
||||
#ifdef WOLFSSL_STATIC_EPHEMERAL
|
||||
WOLFSSL_API int wolfSSL_CTX_set_ephemeral_key(WOLFSSL_CTX* ctx, int keyAlgo,
|
||||
const char* key, unsigned int keySz, int format);
|
||||
WOLFSSL_API int wolfSSL_set_ephemeral_key(WOLFSSL* ssl, int keyAlgo,
|
||||
const char* key, unsigned int keySz, int format);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
+24
-9
@@ -55,6 +55,7 @@
|
||||
#endif
|
||||
#define SOCKET_T SOCKET
|
||||
#define SNPRINTF _snprintf
|
||||
#define XSLEEP_MS(t) Sleep(t)
|
||||
#elif defined(WOLFSSL_MDK_ARM) || defined(WOLFSSL_KEIL_TCP_NET)
|
||||
#include <string.h>
|
||||
#include "rl_net.h"
|
||||
@@ -69,9 +70,9 @@
|
||||
return(ret) ;
|
||||
}
|
||||
#if defined(HAVE_KEIL_RTX)
|
||||
#define sleep(t) os_dly_wait(t/1000+1);
|
||||
#define XSLEEP_MS(t) os_dly_wait(t)
|
||||
#elif defined(WOLFSSL_CMSIS_RTOS) || defined(WOLFSSL_CMSIS_RTOSv2)
|
||||
#define sleep(t) osDelay(t/1000+1);
|
||||
#define XSLEEP_MS(t) osDelay(t)
|
||||
#endif
|
||||
#elif defined(WOLFSSL_TIRTOS)
|
||||
#include <string.h>
|
||||
@@ -88,6 +89,7 @@
|
||||
char **h_addr_list; /* list of addresses from name server */
|
||||
};
|
||||
#define SOCKET_T int
|
||||
#define XSLEEP_MS(t) Task_sleep(t/1000)
|
||||
#elif defined(WOLFSSL_VXWORKS)
|
||||
#include <hostLib.h>
|
||||
#include <sockLib.h>
|
||||
@@ -148,8 +150,19 @@
|
||||
#include <signal.h> /* ignore SIGPIPE */
|
||||
#endif
|
||||
#define SNPRINTF snprintf
|
||||
|
||||
#define XSELECT_WAIT(x,y) do { \
|
||||
struct timeval tv = {(x),(y)}; \
|
||||
select(0, NULL, NULL, NULL, &tv); \
|
||||
} while (0)
|
||||
#define XSLEEP_US(u) XSELECT_WAIT(0,u)
|
||||
#define XSLEEP_MS(m) XSELECT_WAIT(0,(m)*1000)
|
||||
#endif /* USE_WINDOWS_API */
|
||||
|
||||
#ifndef XSLEEP_MS
|
||||
#define XSLEEP_MS(t) sleep(t/1000)
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
#include <wolfssl/wolfcrypt/async.h>
|
||||
#endif
|
||||
@@ -1684,7 +1697,7 @@ enum {
|
||||
VERIFY_USE_PREVERFIY,
|
||||
VERIFY_OVERRIDE_DATE_ERR,
|
||||
};
|
||||
static int myVerifyAction = VERIFY_OVERRIDE_ERROR;
|
||||
static THREAD_LS_T int myVerifyAction = VERIFY_OVERRIDE_ERROR;
|
||||
|
||||
/* The verify callback is called for every certificate only when
|
||||
* --enable-opensslextra is defined because it sets WOLFSSL_ALWAYS_VERIFY_CB and
|
||||
@@ -3601,15 +3614,16 @@ static WC_INLINE const char* mymktemp(char *tempfn, int len, int num)
|
||||
int enc, byte* ticket, int inLen, int* outLen,
|
||||
void* userCtx)
|
||||
{
|
||||
(void)ssl;
|
||||
(void)userCtx;
|
||||
|
||||
int ret;
|
||||
word16 sLen = XHTONS(inLen);
|
||||
byte aad[WOLFSSL_TICKET_NAME_SZ + WOLFSSL_TICKET_IV_SZ + 2];
|
||||
int aadSz = WOLFSSL_TICKET_NAME_SZ + WOLFSSL_TICKET_IV_SZ + 2;
|
||||
byte* tmp = aad;
|
||||
|
||||
(void)ssl;
|
||||
(void)userCtx;
|
||||
|
||||
/* encrypt */
|
||||
if (enc) {
|
||||
XMEMCPY(key_name, myKey_ctx.name, WOLFSSL_TICKET_NAME_SZ);
|
||||
|
||||
@@ -3630,8 +3644,9 @@ static WC_INLINE const char* mymktemp(char *tempfn, int len, int num)
|
||||
mac);
|
||||
if (ret != 0) return WOLFSSL_TICKET_RET_REJECT;
|
||||
*outLen = inLen; /* no padding in this mode */
|
||||
} else {
|
||||
/* decrypt */
|
||||
}
|
||||
/* decrypt */
|
||||
else {
|
||||
|
||||
/* see if we know this key */
|
||||
if (XMEMCMP(key_name, myKey_ctx.name, WOLFSSL_TICKET_NAME_SZ) != 0){
|
||||
@@ -3658,7 +3673,7 @@ static WC_INLINE const char* mymktemp(char *tempfn, int len, int num)
|
||||
return WOLFSSL_TICKET_RET_OK;
|
||||
}
|
||||
|
||||
#endif /* HAVE_SESSION_TICKET && CHACHA20 && POLY1305 */
|
||||
#endif /* HAVE_SESSION_TICKET && HAVE_CHACHA && HAVE_POLY1305 */
|
||||
|
||||
static WC_INLINE word16 GetRandomPort(void)
|
||||
{
|
||||
|
||||
+22
-10
@@ -45,11 +45,19 @@
|
||||
#ifdef WOLFSSL_ASYNC_CRYPT
|
||||
#include <wolfssl/wolfcrypt/async.h>
|
||||
#endif
|
||||
|
||||
/* Optional support extended DH public / private keys */
|
||||
#if !defined(WOLFSSL_DH_EXTRA) && (defined(WOLFSSL_QT) || \
|
||||
defined(OPENSSL_ALL) || defined(WOLFSSL_OPENSSH) || \
|
||||
defined(WOLFSSL_STATIC_EPHEMERAL))
|
||||
#define WOLFSSL_DH_EXTRA
|
||||
#endif
|
||||
|
||||
typedef struct DhParams {
|
||||
#ifdef HAVE_FFDHE_Q
|
||||
#ifdef HAVE_FFDHE_Q
|
||||
const byte* q;
|
||||
word32 q_len;
|
||||
#endif /* HAVE_FFDHE_Q */
|
||||
#endif /* HAVE_FFDHE_Q */
|
||||
const byte* p;
|
||||
word32 p_len;
|
||||
const byte* g;
|
||||
@@ -58,8 +66,8 @@ typedef struct DhParams {
|
||||
|
||||
/* Diffie-Hellman Key */
|
||||
struct DhKey {
|
||||
mp_int p, g, q; /* group parameters */
|
||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL) || defined(WOLFSSL_OPENSSH)
|
||||
mp_int p, g, q; /* group parameters */
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
mp_int pub;
|
||||
mp_int priv;
|
||||
#endif
|
||||
@@ -101,15 +109,20 @@ WOLFSSL_API int wc_DhAgree(DhKey* key, byte* agree, word32* agreeSz,
|
||||
word32 pubSz);
|
||||
|
||||
WOLFSSL_API int wc_DhKeyDecode(const byte* input, word32* inOutIdx, DhKey* key,
|
||||
word32);
|
||||
word32); /* wc_DhKeyDecode is in asn.c */
|
||||
|
||||
WOLFSSL_API int wc_DhSetKey(DhKey* key, const byte* p, word32 pSz, const byte* g,
|
||||
word32 gSz);
|
||||
WOLFSSL_API int wc_DhSetKey_ex(DhKey* key, const byte* p, word32 pSz,
|
||||
const byte* g, word32 gSz, const byte* q, word32 qSz);
|
||||
#if defined(WOLFSSL_QT) || defined(OPENSSL_ALL)
|
||||
WOLFSSL_LOCAL int wc_DhSetFullKeys(DhKey* key,const byte* priv_key,word32 privSz,
|
||||
const byte* pub_key, word32 pubSz);
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_DH_EXTRA
|
||||
WOLFSSL_API int wc_DhImportKeyPair(DhKey* key, const byte* priv, word32 privSz,
|
||||
const byte* pub, word32 pubSz);
|
||||
WOLFSSL_API int wc_DhExportKeyPair(DhKey* key, byte* priv, word32* pPrivSz,
|
||||
byte* pub, word32* pPubSz);
|
||||
#endif /* WOLFSSL_DH_EXTRA */
|
||||
|
||||
WOLFSSL_API int wc_DhSetCheckKey(DhKey* key, const byte* p, word32 pSz,
|
||||
const byte* g, word32 gSz, const byte* q, word32 qSz,
|
||||
int trusted, WC_RNG* rng);
|
||||
@@ -136,4 +149,3 @@ WOLFSSL_API int wc_DhExportParamsRaw(DhKey* dh, byte* p, word32* pSz,
|
||||
|
||||
#endif /* NO_DH */
|
||||
#endif /* WOLF_CRYPT_DH_H */
|
||||
|
||||
|
||||
@@ -58,6 +58,11 @@
|
||||
#include <wolfssl/wolfcrypt/port/arm/cryptoCell.h>
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_HAVE_SP_ECC
|
||||
#include <wolfssl/wolfcrypt/sp_int.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -353,6 +358,19 @@ enum {
|
||||
#endif
|
||||
};
|
||||
|
||||
/* ECC non-blocking */
|
||||
#ifdef WC_ECC_NONBLOCK
|
||||
typedef struct ecc_nb_ctx {
|
||||
#if defined(WOLFSSL_HAVE_SP_ECC) && defined(WOLFSSL_SP_NONBLOCK)
|
||||
sp_ecc_ctx_t sp_ctx;
|
||||
#else
|
||||
/* build configuration not supported */
|
||||
#error ECC non-blocking only supports SP (--enable-sp=nonblock)
|
||||
#endif
|
||||
} ecc_nb_ctx_t;
|
||||
#endif /* WC_ECC_NONBLOCK */
|
||||
|
||||
|
||||
/* An ECC Key */
|
||||
struct ecc_key {
|
||||
int type; /* Public or Private */
|
||||
@@ -413,6 +431,9 @@ struct ecc_key {
|
||||
#ifdef WOLFSSL_DSP
|
||||
remote_handle64 handle;
|
||||
#endif
|
||||
#ifdef WC_ECC_NONBLOCK
|
||||
ecc_nb_ctx_t* nb_ctx;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -757,6 +778,10 @@ int sp_dsp_ecc_verify_256(remote_handle64 handle, const byte* hash, word32 hashL
|
||||
mp_int* pY, mp_int* pZ, mp_int* r, mp_int* sm, int* res, void* heap);
|
||||
#endif
|
||||
|
||||
#ifdef WC_ECC_NONBLOCK
|
||||
WOLFSSL_API int wc_ecc_set_nonblock(ecc_key *key, ecc_nb_ctx_t* ctx);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
@@ -388,7 +388,9 @@
|
||||
|
||||
#ifdef WOLFSSL_ATECC508A
|
||||
/* backwards compatibility */
|
||||
#ifndef WOLFSSL_ATECC_NO_ECDH_ENC
|
||||
#define WOLFSSL_ATECC_ECDH_ENC
|
||||
#endif
|
||||
#ifdef WOLFSSL_ATECC508A_DEBUG
|
||||
#define WOLFSSL_ATECC_DEBUG
|
||||
#endif
|
||||
@@ -919,6 +921,19 @@ extern void uITRON4_free(void *p) ;
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
/* To support storing some of the large constant tables in flash memory rather than SRAM.
|
||||
Useful for processors that have limited SRAM, such as the AVR family of microtrollers. */
|
||||
#ifdef WOLFSSL_USE_FLASHMEM
|
||||
/* This is supported on the avr-gcc compiler, for more information see:
|
||||
https://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html */
|
||||
#define FLASH_QUALIFIER __flash
|
||||
|
||||
/* Copy data out of flash memory and into SRAM */
|
||||
#define XMEMCPY_P(pdest, psrc, size) memcpy_P((pdest), (psrc), (size))
|
||||
#else
|
||||
#define FLASH_QUALIFIER
|
||||
#endif
|
||||
|
||||
#ifdef FREESCALE_MQX_5_0
|
||||
/* use normal Freescale MQX port, but with minor changes for 5.0 */
|
||||
#define FREESCALE_MQX
|
||||
@@ -1450,7 +1465,6 @@ extern void uITRON4_free(void *p) ;
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_SOLARIS
|
||||
#define WOLFSSL_NO_MUTEXLOCK_AFTER_FREE
|
||||
/* Avoid naming clash with fp_zero from math.h > ieefp.h */
|
||||
#define WOLFSSL_DH_CONST
|
||||
#endif
|
||||
|
||||
+12
-1
@@ -141,7 +141,18 @@ int sp_ecc_proj_dbl_point_384(mp_int* pX, mp_int* pY, mp_int* pZ,
|
||||
int sp_ecc_map_384(mp_int* pX, mp_int* pY, mp_int* pZ);
|
||||
int sp_ecc_uncompress_384(mp_int* xm, int odd, mp_int* ym);
|
||||
|
||||
#endif /*ifdef WOLFSSL_HAVE_SP_ECC */
|
||||
#ifdef WOLFSSL_SP_NONBLOCK
|
||||
int sp_ecc_sign_256_nb(sp_ecc_ctx_t* ctx, const byte* hash, word32 hashLen, WC_RNG* rng, mp_int* priv,
|
||||
mp_int* rm, mp_int* sm, mp_int* km, void* heap);
|
||||
int sp_ecc_verify_256_nb(sp_ecc_ctx_t* ctx, const byte* hash, word32 hashLen, mp_int* pX, mp_int* pY,
|
||||
mp_int* pZ, mp_int* r, mp_int* sm, int* res, void* heap);
|
||||
int sp_ecc_sign_384_nb(sp_ecc_ctx_t* ctx, const byte* hash, word32 hashLen, WC_RNG* rng, mp_int* priv,
|
||||
mp_int* rm, mp_int* sm, mp_int* km, void* heap);
|
||||
int sp_ecc_verify_384_nb(sp_ecc_ctx_t* ctx, const byte* hash, word32 hashLen, mp_int* pX, mp_int* pY,
|
||||
mp_int* pZ, mp_int* r, mp_int* sm, int* res, void* heap);
|
||||
#endif /* WOLFSSL_SP_NONBLOCK */
|
||||
|
||||
#endif /* WOLFSSL_HAVE_SP_ECC */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -109,6 +109,17 @@
|
||||
|
||||
#define SP_MASK (sp_digit)(-1)
|
||||
|
||||
|
||||
#if defined(WOLFSSL_HAVE_SP_ECC) && defined(WOLFSSL_SP_NONBLOCK)
|
||||
typedef struct sp_ecc_ctx {
|
||||
#ifdef WOLFSSL_SP_384
|
||||
byte data[48*80]; /* stack data */
|
||||
#else
|
||||
byte data[32*80]; /* stack data */
|
||||
#endif
|
||||
} sp_ecc_ctx_t;
|
||||
#endif
|
||||
|
||||
#ifdef WOLFSSL_SP_MATH
|
||||
#include <wolfssl/wolfcrypt/random.h>
|
||||
|
||||
@@ -216,7 +227,6 @@ MP_API void sp_rshb(sp_int* a, int n, sp_int* r);
|
||||
MP_API int sp_mul_d(sp_int* a, sp_int_digit n, sp_int* r);
|
||||
|
||||
|
||||
#define MP_OKAY 0
|
||||
#define MP_NO 0
|
||||
#define MP_YES 1
|
||||
|
||||
@@ -226,8 +236,10 @@ MP_API int sp_mul_d(sp_int* a, sp_int_digit n, sp_int* r);
|
||||
#define MP_EQ 0
|
||||
#define MP_LT -1
|
||||
|
||||
#define MP_OKAY 0
|
||||
#define MP_MEM -2
|
||||
#define MP_VAL -3
|
||||
#define FP_WOULDBLOCK -4
|
||||
|
||||
#define DIGIT_BIT SP_WORD_SIZE
|
||||
#define MP_MASK SP_MASK
|
||||
|
||||
@@ -342,9 +342,9 @@
|
||||
#else
|
||||
/* just use plain C stdlib stuff if desired */
|
||||
#include <stdlib.h>
|
||||
#define XMALLOC(s, h, t) malloc((s))
|
||||
#define XMALLOC(s, h, t) malloc((size_t)(s))
|
||||
#define XFREE(p, h, t) {void* xp = (p); if((xp)) free((xp));}
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (size_t)(n))
|
||||
#endif
|
||||
#elif !defined(MICRIUM_MALLOC) && !defined(EBSNET) \
|
||||
&& !defined(WOLFSSL_SAFERTOS) && !defined(FREESCALE_MQX) \
|
||||
|
||||
@@ -455,6 +455,9 @@ WOLFSSL_API int wolfCrypt_Cleanup(void);
|
||||
#define MAX_PATH 256
|
||||
#endif
|
||||
|
||||
WOLFSSL_LOCAL int wc_FileLoad(const char* fname, unsigned char** buf,
|
||||
size_t* bufLen, void* heap);
|
||||
|
||||
#if !defined(NO_WOLFSSL_DIR) && !defined(WOLFSSL_NUCLEUS) && \
|
||||
!defined(WOLFSSL_NUCLEUS_1_2)
|
||||
typedef struct ReadDirCtx {
|
||||
|
||||
Reference in New Issue
Block a user