Skip to content

Commit 394a25b

Browse files
authored
Merge branch 'wolfSSL:master' into tropic01-dev
2 parents 519b314 + 675ff71 commit 394a25b

42 files changed

Lines changed: 2188 additions & 631 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pq-all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
matrix:
1919
config: [
2020
# Add new configs here
21-
'--enable-intelasm --enable-sp-asm --enable-mlkem=yes,kyber,ml-kem CPPFLAGS=-DWOLFSSL_ML_KEM_USE_OLD_IDS'
21+
'--enable-intelasm --enable-sp-asm --enable-mlkem=yes,kyber,ml-kem CPPFLAGS="-DWOLFSSL_ML_KEM_USE_OLD_IDS"',
2222
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
2323
'--enable-smallstack --enable-smallstackcache --enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE"',
2424
'--enable-intelasm --enable-sp-asm --enable-all --enable-testcert --enable-acert --enable-dtls13 --enable-dtls-mtu --enable-dtls-frag-ch --enable-dtlscid --enable-quic --with-sys-crypto-policy --enable-experimental --enable-kyber=yes,original --enable-lms --enable-xmss --enable-dilithium --enable-dual-alg-certs --disable-qt CPPFLAGS="-pedantic -Wdeclaration-after-statement -DWOLFCRYPT_TEST_LINT -DNO_WOLFSSL_CIPHER_SUITE_TEST -DTEST_LIBWOLFSSL_SOURCES_INCLUSION_SEQUENCE" CC=c++'

.wolfssl_known_macro_extras

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI
9696
CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
9797
CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI_MP_MUL
9898
CONFIG_ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
99+
CONFIG_ESP_WOLFSSL_NO_STACK_SIZE_BUILD_WARNING
99100
CONFIG_FREERTOS_HZ
100101
CONFIG_FREERTOS_UNICORE
101102
CONFIG_IDF_TARGET
@@ -286,6 +287,7 @@ IOTSAFE_NO_GETDATA
286287
IOTSAFE_SIG_8BIT_LENGTH
287288
KCAPI_USE_XMALLOC
288289
K_SERIES
290+
LIBWOLFSSL_CMAKE_OUTPUT
289291
LIBWOLFSSL_VERSION_GIT_BRANCH
290292
LIBWOLFSSL_VERSION_GIT_HASH
291293
LIBWOLFSSL_VERSION_GIT_HASH_DATE
@@ -415,6 +417,7 @@ NO_WOLFSSL_SHA256_INTERLEAVE
415417
NO_WOLFSSL_SHA512_INTERLEAVE
416418
NO_WOLFSSL_SKIP_TRAILING_PAD
417419
NO_WOLFSSL_SMALL_STACK_STATIC
420+
NO_WOLFSSL_USE_ASM_CERT
418421
NO_WOLFSSL_XILINX_TAG_MALLOC
419422
NRF52
420423
NRF52_SERIES
@@ -456,6 +459,7 @@ SHOW_CERTS
456459
SHOW_GEN
457460
SHOW_SIZES
458461
SHOW_SSID_AND_PASSWORD
462+
SHOW_WOLFSSL_BUNDLE_ERROR
459463
SIM_SCGC3_RNGA_MASK
460464
SIM_SCGC5_PORTC_MASK
461465
SIM_SCGC5_PORTD_MASK
@@ -518,6 +522,8 @@ TI_DUMMY_BUILD
518522
TLS13_RSA_PSS_SIGN_CB_NO_PREHASH
519523
TSIP_RSAES_1024
520524
TSIP_RSAES_2048
525+
TSIP_RSASSA_1024
526+
TSIP_RSASSA_2048
521527
UNICODE
522528
USER_CA_CB
523529
USER_CUSTOM_SNIFFX

IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/CMakeLists.txt

Lines changed: 275 additions & 78 deletions
Large diffs are not rendered by default.

IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/Kconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,28 @@ menu "wolfSSL"
274274
bool "Do not use the default certificate bundle"
275275
endchoice
276276

277+
config WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE
278+
depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
279+
default n
280+
bool "Use alternate certificate bundle"
281+
help
282+
Typically only used for PlatformIO which cannot generate a certificate bundle at build time.
283+
Enable this option to specify a fixed wolfSSL certificate file path and file name.
284+
285+
config WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE_PATH_AND_NAME
286+
depends on WOLFSSL_ALTERNATE_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
287+
string "Default certificate bundle alternate path and name"
288+
default "./certs/x509_crt_bundle_wolfssl"
289+
help
290+
Name of the default certificate bundle directory. Typically used only with PlatformIO.
291+
Reminder PlatformIO cannot generate a bundle from cmake python script call. Relative
292+
paths are with respect to root of this project.
293+
277294
config WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE
278295
depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
279296
default n
280297
bool "Add custom certificates to the default bundle"
298+
281299
config WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE_PATH
282300
depends on WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
283301
string "Custom certificate bundle path"
@@ -430,6 +448,12 @@ menu "wolfSSL"
430448
help
431449
Enable debugging messages for wolfSSL. See user_settings.h for additional debug options.
432450

451+
config ESP_WOLFSSL_NO_STACK_SIZE_BUILD_WARNING
452+
bool "Suppress build-time warnings for main stack size"
453+
default n
454+
help
455+
Useful only when wolfSSL is running in main task. See FreeRTOS stack size for custom tasks.
456+
433457
config ESP_WOLFSSL_TEST_LOOP
434458
bool "Run test apps in a loop until failure"
435459
default y

IDE/Espressif/ESP-IDF/examples/template/components/wolfssl/include/user_settings.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,13 +853,18 @@
853853
#ifndef NO_RSA
854854
#define ESP32_USE_RSA_PRIMITIVE
855855

856-
#if defined(CONFIG_IDF_TARGET_ESP32)
857-
#ifdef CONFIG_ESP_MAIN_TASK_STACK_SIZE
856+
#ifdef CONFIG_ESP_MAIN_TASK_STACK_SIZE
857+
/* See idf.py menuconfig for stack warning settings */
858+
#if !defined(CONFIG_ESP_WOLFSSL_NO_STACK_SIZE_BUILD_WARNING)
858859
#if CONFIG_ESP_MAIN_TASK_STACK_SIZE < 10500
859-
#warning "RSA may be difficult with less than 10KB Stack "/
860+
#warning "RSA may be difficult with less than 10KB Stack"
860861
#endif
862+
#else
863+
/* Implement your own stack warning here */
861864
#endif
865+
#endif
862866

867+
#if defined(CONFIG_IDF_TARGET_ESP32)
863868
/* NOTE HW unreliable for small values! */
864869
/* threshold for performance adjustment for HW primitive use */
865870
/* X bits of G^X mod P greater than */

0 commit comments

Comments
 (0)