mirror of https://github.com/wolfSSL/wolfssl.git
removed multiple user_settings.h
parent
9d2294b967
commit
e8bf2bbb02
|
@ -24,7 +24,7 @@ Including the following examples:
|
|||
Uncomment out #define WOLFSSL_ESPWROOM32 in /path/to/wolfssl/wolfssl/wolfcrypt/settings.h
|
||||
|
||||
## Configuration
|
||||
1. The *user_settings.h* for each example can be found in /path/to/examples/protocols/wolfssl_xxx/main/include/user_settings.h
|
||||
1. The *user_settings.h* can be found in /path/to/esp-idf/components/wolfssl/include/user_settings.h
|
||||
|
||||
## Build examples
|
||||
1. See README in each example folder
|
||||
|
|
|
@ -2,3 +2,5 @@ CONFIG_BENCH_ARGV="-lng 0"
|
|||
CONFIG_MAIN_TASK_STACK_SIZE=5000
|
||||
CONFIG_FREERTOS_HZ=1000
|
||||
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
|
||||
170 CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
/* wolfSSL */
|
||||
#include <wolfssl/options.h>
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
|
||||
/* TLS 1.3 */
|
||||
#define WOLFSSL_TLS13
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define WC_RSA_PSS
|
||||
#define HAVE_HKDF
|
||||
#define HAVE_FFDHE_2048
|
||||
#define HAVE_AEAD
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
|
||||
/* when you want to use SINGLE THREAD */
|
||||
/* #define SINGLE_THREADED */
|
||||
#define NO_FILESYSTEM
|
||||
|
||||
#define HAVE_AESGCM
|
||||
/* when you want to use SHA384 */
|
||||
/* #define WOLFSSL_SHA384 */
|
||||
#define WOLFSSL_SHA512
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define CURVE25519_SMALL
|
||||
#define HAVE_ED25519
|
||||
|
||||
/* debug options */
|
||||
/* #define DEBUG_WOLFSSL */
|
||||
/* #define WOLFSSL_ESP32WROOM32_CRYPT_DEBUG */
|
||||
|
||||
/* date/time */
|
||||
/* if it cannot adjust time in the device, */
|
||||
/* enable macro below */
|
||||
/* #define NO_ASN_TIME */
|
||||
/* #define XTIME time */
|
||||
|
||||
/* when you want not to use HW acceleration */
|
||||
/* #define NO_ESP32WROOM32_CRYPT */
|
||||
/* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH*/
|
||||
/* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_AES */
|
|
@ -1,60 +0,0 @@
|
|||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
|
||||
/* TLS 1.3 */
|
||||
#define WOLFSSL_TLS13
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define WC_RSA_PSS
|
||||
#define HAVE_HKDF
|
||||
#define HAVE_FFDHE_2048
|
||||
#define HAVE_AEAD
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
|
||||
/* when you want to use SINGLE THREAD */
|
||||
/* #define SINGLE_THREADED */
|
||||
#define NO_FILESYSTEM
|
||||
|
||||
#define HAVE_AESGCM
|
||||
/* when you want to use SHA384 */
|
||||
/* #define WOLFSSL_SHA384 */
|
||||
#define WOLFSSL_SHA512
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define CURVE25519_SMALL
|
||||
#define HAVE_ED25519
|
||||
|
||||
/* debug options */
|
||||
/* #define DEBUG_WOLFSSL */
|
||||
/* #define WOLFSSL_ESP32WROOM32_CRYPT_DEBUG */
|
||||
|
||||
/* date/time */
|
||||
/* if it cannot adjust time in the device, */
|
||||
/* enable macro below */
|
||||
/* #define NO_ASN_TIME */
|
||||
/* #define XTIME time */
|
||||
|
||||
/* when you want not to use HW acceleration */
|
||||
/* #define NO_ESP32WROOM32_CRYPT */
|
||||
/* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH*/
|
||||
/* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_AES */
|
|
@ -31,7 +31,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
/* wolfSSL */
|
||||
#include <wolfssl/options.h>
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
#include <wolfssl/ssl.h>
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
|
||||
/* TLS 1.3 */
|
||||
#define WOLFSSL_TLS13
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define WC_RSA_PSS
|
||||
#define HAVE_HKDF
|
||||
#define HAVE_FFDHE_2048
|
||||
#define HAVE_AEAD
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
|
||||
/* when you want to use SINGLE THREAD */
|
||||
/* #define SINGLE_THREADED */
|
||||
#define NO_FILESYSTEM
|
||||
|
||||
#define HAVE_AESGCM
|
||||
/* when you want to use SHA384 */
|
||||
/* #define WOLFSSL_SHA384 */
|
||||
#define WOLFSSL_SHA512
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define CURVE25519_SMALL
|
||||
#define HAVE_ED25519
|
||||
|
||||
/* debug options */
|
||||
/* #define DEBUG_WOLFSSL */
|
||||
/* #define WOLFSSL_ESP32WROOM32_CRYPT_DEBUG */
|
||||
|
||||
/* date/time */
|
||||
/* if it cannot adjust time in the device, */
|
||||
/* enable macro below */
|
||||
/* #define NO_ASN_TIME */
|
||||
/* #define XTIME time */
|
||||
|
||||
/* when you want not to use HW acceleration */
|
||||
/* #define NO_ESP32WROOM32_CRYPT */
|
||||
/* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH*/
|
||||
/* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_AES */
|
|
@ -2,12 +2,14 @@
|
|||
# Component Makefile
|
||||
#
|
||||
|
||||
COMPONENT_ADD_INCLUDEDIRS := .
|
||||
COMPONENT_ADD_INCLUDEDIRS := . ./include
|
||||
COMPONENT_ADD_INCLUDEDIRS += ../freertos/include/freertos/
|
||||
|
||||
COMPONENT_SRCDIRS := src wolfcrypt/src
|
||||
COMPONENT_SRCDIRS += wolfcrypt/src/port/Espressif
|
||||
|
||||
CFLAGS +=-DWOLFSSL_USER_SETTINGS
|
||||
|
||||
COMPONENT_OBJEXCLUDE := wolfcrypt/src/aes_asm.o
|
||||
COMPONENT_OBJEXCLUDE += wolfcrypt/src/evp.o
|
||||
COMPONENT_OBJEXCLUDE += wolfcrypt/src/misc.o
|
||||
|
|
|
@ -39,6 +39,7 @@ ${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/src
|
|||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/wolfcrypt
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/wolfssl
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/test
|
||||
${MKDCMD} ${WOLFSSLLIB_TRG_DIR}/include
|
||||
|
||||
popd > /dev/null # $WOLFSSL_ESPIDFDIR
|
||||
pushd ${BASEDIR} > /dev/null # WOLFSSL TOP DIR
|
||||
|
@ -52,6 +53,9 @@ ${CPDCMD} -r ./wolfcrypt/benchmark ${WOLFSSLLIB_TRG_DIR}/wolfcrypt/
|
|||
|
||||
${CPDCMD} -r ./wolfssl/*.h ${WOLFSSLLIB_TRG_DIR}/wolfssl/
|
||||
${CPDCMD} -r ./wolfssl/wolfcrypt ${WOLFSSLLIB_TRG_DIR}/wolfssl/
|
||||
# user_settings.h
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/user_settings.h ${WOLFSSLLIB_TRG_DIR}/include/
|
||||
|
||||
# unit test app
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/test/* ${WOLFSSLLIB_TRG_DIR}/test/
|
||||
|
||||
|
@ -66,23 +70,19 @@ pushd ${BASEDIR} > /dev/null # WOLFSSL TOP DIR
|
|||
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/include
|
||||
|
||||
${CPDCMD} -r ./wolfcrypt/benchmark/benchmark.c ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_benchmark/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_benchmark/main/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_benchmark/main/include/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_benchmark/main/include/
|
||||
|
||||
# Crypt Test program
|
||||
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/
|
||||
${MKDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/include
|
||||
|
||||
${CPDCMD} -r ./wolfcrypt/test/test.c ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_test/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_test/main/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/
|
||||
${CPDCMD} -r ${WOLFSSL_ESPIDFDIR}/examples/wolfssl_test/main/include/* ${WOLFSSLEXP_TRG_DIR}/wolfssl_test/main/include/
|
||||
|
||||
# TLS Client program
|
||||
${RMDCMD} ${WOLFSSLEXP_TRG_DIR}/wolfssl_client/
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
# wolfSSL unit tests
|
||||
# wolfSSL unit-test app
|
||||
|
||||
The test contains of wolfSSL unit-test app on Unity.
|
||||
|
||||
When you want to run the app
|
||||
1. Copy *test.c* file at /path/to/esp-idf/components/wolfssl/wolfcrypt/test/ folder to the wolfssl/test folder
|
||||
2. Copy *user_settings.h* to /esp-idf/components/wolfssl/
|
||||
3. Add *CFLAGS += -DWOLFSSL_USER_SETTINGS* into components.mk at wolfssl/
|
||||
OR, copy *component_wolfssl.mk.use* into wolfssl/ folder
|
||||
4. Go to /esp-idf/tools/unit-test-app/ folder
|
||||
5. "make menuconfig" to configure unit test app.
|
||||
6. "make TEST_COMPONENTS=wolfssl" to build wolfssl unit test app.
|
||||
2. Go to /esp-idf/tools/unit-test-app/ folder
|
||||
3. "make menuconfig" to configure unit test app.
|
||||
4. "make TEST_COMPONENTS=wolfssl" to build wolfssl unit test app.
|
||||
|
||||
NOTE:
|
||||
You should remove *user_settings.h* file at wolfssl/ folder after finishing run
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
#
|
||||
# Component Makefile
|
||||
#
|
||||
|
||||
COMPONENT_ADD_INCLUDEDIRS := .
|
||||
COMPONENT_ADD_INCLUDEDIRS += ../freertos/include/freertos/
|
||||
|
||||
COMPONENT_SRCDIRS := src wolfcrypt/src
|
||||
COMPONENT_SRCDIRS += wolfcrypt/src/port/Espressif
|
||||
|
||||
CFLAGS +=-DWOLFSSL_USER_SETTINGS
|
||||
|
||||
COMPONENT_OBJEXCLUDE := wolfcrypt/src/aes_asm.o
|
||||
COMPONENT_OBJEXCLUDE += wolfcrypt/src/evp.o
|
||||
COMPONENT_OBJEXCLUDE += wolfcrypt/src/misc.o
|
||||
COMPONENT_OBJEXCLUDE += src/bio.o
|
|
@ -1,59 +0,0 @@
|
|||
/* user_settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2018 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
#define USE_CERT_BUFFERS_2048
|
||||
|
||||
/* TLS 1.3 */
|
||||
#define WOLFSSL_TLS13
|
||||
#define HAVE_TLS_EXTENSIONS
|
||||
#define WC_RSA_PSS
|
||||
#define HAVE_HKDF
|
||||
#define HAVE_FFDHE_2048
|
||||
#define HAVE_AEAD
|
||||
#define HAVE_SUPPORTED_CURVES
|
||||
|
||||
// #define SINGLE_THREADED/* or define RTOS option */
|
||||
#define NO_FILESYSTEM
|
||||
|
||||
#define HAVE_AESGCM
|
||||
/* when you want to use SHA384 */
|
||||
#define WOLFSSL_SHA384
|
||||
#define WOLFSSL_SHA512
|
||||
#define HAVE_ECC
|
||||
#define HAVE_CURVE25519
|
||||
#define CURVE25519_SMALL
|
||||
#define HAVE_ED25519
|
||||
|
||||
/* debug options */
|
||||
/* #define DEBUG_WOLFSSL */
|
||||
/* #define WOLFSSL_ESP32WROOM32_CRYPT_DEBUG */
|
||||
|
||||
/* date/time */
|
||||
/* if it cannot adjust time in the device, */
|
||||
/* enable macro below */
|
||||
/* #define NO_ASN_TIME */
|
||||
/* #define XTIME time */
|
||||
|
||||
/* when you want not to use HW acceleration */
|
||||
/* #define NO_ESP32WROOM32_CRYPT */
|
||||
/* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH*/
|
||||
/* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_AES */
|
Loading…
Reference in New Issue