123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790 |
-
- #define WOLFSSL_USER_SETTINGS_ID "PlatformIO user_settings.h v5.7.0-test.rev02"
- #if defined(ESP_IDF_VERSION_MAJOR) || defined(WOLFSSL_ESPIDF) || \
- defined(ESP_PLATFORM) || defined(WOLFSSL_ESP32)
- #include "sdkconfig.h"
-
- #define NO_ESP_SDK_WIFI
- #endif
- #if 0
-
- #define WOLFSSL_EXPERIMENTAL_SETTINGS
- #define WOLFSSL_HAVE_KYBER
- #define WOLFSSL_WC_KYBER
- #define WOLFSSL_SHA3
- #endif
- #define BENCH_EMBEDDED
- #define WOLFSSL_BENCHMARK_FIXED_UNITS_KB
- #define HAVE_VERSION_EXTENDED_INFO
- #undef WOLFSSL_IGNORE_FILE_WARN
- #define WOLFSSL_IGNORE_FILE_WARN
- #define SINGLE_THREADED
- #define NO_SESSION_CACHE
- #define WOLFSSL_SMALL_STACK
- #define DEBUG_WOLFSSL_MALLOC
- #define USE_CERT_BUFFERS_256
- #define USE_CERT_BUFFERS_2048
- #define RSA_LOW_MEM
- #define TEST_ESPIDF_ALL_WOLFSSL
- #ifdef TEST_ESPIDF_ALL_WOLFSSL
- #define WOLFSSL_MD2
- #define HAVE_BLAKE2
- #define HAVE_BLAKE2B
- #define HAVE_BLAKE2S
- #define WC_RC2
- #define WOLFSSL_ALLOW_RC4
- #define HAVE_POLY1305
- #define WOLFSSL_AES_128
- #define WOLFSSL_AES_OFB
- #define WOLFSSL_AES_CFB
- #define WOLFSSL_AES_XTS
- #define WOLFSSL_WOLFSSH
- #define HAVE_AESGCM
- #define WOLFSSL_AES_COUNTER
- #define HAVE_FFDHE
- #define HAVE_FFDHE_2048
- #if defined(CONFIG_IDF_TARGET_ESP8266)
-
- #define WOLFCRYPT_HAVE_SRP
-
- #define FP_MAX_BITS MIN_FFDHE_FP_MAX_BITS
- #elif defined(CONFIG_IDF_TARGET_ESP32) || \
- defined(CONFIG_IDF_TARGET_ESP32S2) || \
- defined(CONFIG_IDF_TARGET_ESP32S3)
-
- #define WOLFCRYPT_HAVE_SRP
- #define FP_MAX_BITS (8192 * 2)
- #elif defined(CONFIG_IDF_TARGET_ESP32C3) || \
- defined(CONFIG_IDF_TARGET_ESP32H2)
-
- #define WOLFCRYPT_HAVE_SRP
- #define FP_MAX_BITS (8192 * 2)
- #else
-
- #define WOLFCRYPT_HAVE_SRP
- #define FP_MAX_BITS (8192 * 2)
- #endif
- #define HAVE_DH
-
-
-
- #define HAVE_DSA
-
- #define HAVE_HPKE
-
- #if defined(CONFIG_IDF_TARGET_ESP32C2) || \
- defined(CONFIG_IDF_TARGET_ESP8684) || \
- defined(CONFIG_IDF_TARGET_ESP32H2) || \
- defined(CONFIG_IDF_TARGET_ESP8266)
- #if defined(CONFIG_IDF_TARGET_ESP8266)
- #undef HAVE_ECC
- #undef HAVE_ECC_CDH
- #undef HAVE_CURVE25519
-
- #ifdef HAVE_CHACHA
- #error "HAVE_CHACHA not supported on ESP8266"
- #endif
- #ifdef HAVE_XCHACHA
- #error "HAVE_XCHACHA not supported on ESP8266"
- #endif
- #else
- #define HAVE_XCHACHA
- #define HAVE_CHACHA
-
- #endif
-
-
-
- #ifndef HAVE_ECC
- #define ECC_SHAMIR
- #endif
- #else
- #define WOLFSSL_AES_EAX
- #define ECC_SHAMIR
- #endif
-
-
-
- #define WOLFSSL_AES_SIV
- #define WOLFSSL_CMAC
- #define WOLFSSL_CERT_PIV
-
-
- #define SCRYPT_TEST_ALL
- #define HAVE_X963_KDF
- #endif
- #define BENCH_EMBEDDED
- #define WOLFSSL_TLS13
- #define HAVE_TLS_EXTENSIONS
- #define WC_RSA_PSS
- #define HAVE_HKDF
- #define HAVE_AEAD
- #define HAVE_SUPPORTED_CURVES
- #define WOLFSSL_BENCHMARK_FIXED_UNITS_KB
- #define NO_FILESYSTEM
- #if defined(WOLFSSL_CLIENT_EXAMPLE)
- #define NO_WOLFSSL_SERVER
- #elif defined(WOLFSSL_SERVER_EXAMPLE)
- #define NO_WOLFSSL_CLIENT
- #else
-
- #define NO_WOLFSSL_SERVER_CLIENT_MISSING
-
- #endif
- #define NO_OLD_TLS
- #define HAVE_AESGCM
- #define WOLFSSL_SHA224
- #define WOLFSSL_SHA384
- #define WOLFSSL_SHA512
- #define WOLFSSL_SHA3
-
- #define HAVE_ED25519
- #if defined(CONFIG_IDF_TARGET_ESP8266) || \
- defined(CONFIG_IDF_TARGET_ESP32C2)
-
- #else
- #define HAVE_ECC
- #define HAVE_CURVE25519
- #define CURVE25519_SMALL
- #endif
- #define HAVE_ED25519
- #define OPENSSL_EXTRA
- #define HAVE_PKCS7
- #if defined(HAVE_PKCS7)
-
- #define NO_PBKDF2
- #define HAVE_AES_KEYWRAP
- #define HAVE_X963_KDF
- #define WOLFSSL_AES_DIRECT
- #endif
- #if defined(WOLFSSL_ESPWROOM32SE)
- #define WOLFSSL_ATECC508A
- #define HAVE_PK_CALLBACKS
-
-
-
-
- #endif
- #define ESP_RSA_TIMEOUT_CNT 0x349F00
- #define HASH_SIZE_LIMIT
- #define USE_FAST_MATH
- #define WOLFSSL_SMALL_STACK
- #define HAVE_VERSION_EXTENDED_INFO
- #define HAVE_SESSION_TICKET
- #define WOLFSSL_KEY_GEN
- #define WOLFSSL_CERT_REQ
- #define WOLFSSL_CERT_GEN
- #define WOLFSSL_CERT_EXT
- #define WOLFSSL_SYS_CA_CERTS
- #define WOLFSSL_CERT_TEXT
- #define WOLFSSL_ASN_TEMPLATE
- #if defined(CONFIG_IDF_TARGET_ESP32)
-
-
-
-
-
-
-
-
-
-
-
- #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA224
- #undef ESP_RSA_MULM_BITS
- #define ESP_RSA_MULM_BITS 16
-
- #elif defined(CONFIG_IDF_TARGET_ESP32S2)
-
-
-
-
-
-
-
-
-
-
- #elif defined(CONFIG_IDF_TARGET_ESP32S3)
-
-
-
-
-
-
-
-
-
-
- #elif defined(CONFIG_IDF_TARGET_ESP32C2) || \
- defined(CONFIG_IDF_TARGET_ESP8684)
-
-
-
-
-
- #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA384
- #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA512
-
- #define NO_WOLFSSL_ESP32_CRYPT_AES
- #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
- #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MP_MUL
- #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_MULMOD
- #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI_EXPTMOD
-
- #elif defined(CONFIG_IDF_TARGET_ESP32C3)
-
-
-
-
- #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA384
- #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA512
-
-
-
-
-
-
- #elif defined(CONFIG_IDF_TARGET_ESP32C6)
-
-
-
-
- #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA384
- #define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA512
-
-
-
-
-
-
- #elif defined(CONFIG_IDF_TARGET_ESP32H2)
-
- #define NO_ESP32_CRYPT
- #define NO_WOLFSSL_ESP32_CRYPT_HASH
- #define NO_WOLFSSL_ESP32_CRYPT_AES
- #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
-
- #elif defined(CONFIG_IDF_TARGET_ESP8266)
- #define WOLFSSL_ESP8266
-
-
- #define NO_ESP32_CRYPT
- #define NO_WOLFSSL_ESP32_CRYPT_HASH
- #define NO_WOLFSSL_ESP32_CRYPT_AES
- #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
-
- #elif defined(CONFIG_IDF_TARGET_ESP8684)
-
- #define NO_ESP32_CRYPT
- #define NO_WOLFSSL_ESP32_CRYPT_HASH
- #define NO_WOLFSSL_ESP32_CRYPT_AES
- #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
-
- #else
-
- #define NO_ESP32_CRYPT
- #define NO_WOLFSSL_ESP32_CRYPT_HASH
- #define NO_WOLFSSL_ESP32_CRYPT_AES
- #define NO_WOLFSSL_ESP32_CRYPT_RSA_PRI
- #endif
- #if defined(WOLFSSL_ESP32) || defined(WOLFSSL_ESPWROOM32SE)
-
- #ifndef NO_RSA
- #define ESP32_USE_RSA_PRIMITIVE
- #if defined(CONFIG_IDF_TARGET_ESP32)
- #ifdef CONFIG_ESP_MAIN_TASK_STACK_SIZE
- #if CONFIG_ESP_MAIN_TASK_STACK_SIZE < 10500
- #warning "RSA may be difficult with less than 10KB Stack "/
- #endif
- #endif
-
-
-
- #undef ESP_RSA_EXPT_XBITS
- #define ESP_RSA_EXPT_XBITS 32
-
- #undef ESP_RSA_MULM_BITS
- #define ESP_RSA_MULM_BITS 16
- #endif
- #endif
- #endif
- #define WOLFSSL_ESPIDF_ERROR_PAUSE
- #define WOLFSSL_HW_METRICS
- #define ALT_ECC_SIZE
- #define WOLFSSL_PUBLIC_MP
- #if defined(WOLFSSL_SM2) || defined(WOLFSSL_SM3) || defined(WOLFSSL_SM4)
- #define CTX_CA_CERT root_sm2
- #define CTX_CA_CERT_SIZE sizeof_root_sm2
- #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_PEM
- #define CTX_SERVER_CERT server_sm2
- #define CTX_SERVER_CERT_SIZE sizeof_server_sm2
- #define CTX_SERVER_CERT_TYPE WOLFSSL_FILETYPE_PEM
- #define CTX_SERVER_KEY server_sm2_priv
- #define CTX_SERVER_KEY_SIZE sizeof_server_sm2_priv
- #define CTX_SERVER_KEY_TYPE WOLFSSL_FILETYPE_PEM
- #undef WOLFSSL_BASE16
- #define WOLFSSL_BASE16
- #else
- #if defined(USE_CERT_BUFFERS_2048)
- #ifdef USE_CERT_BUFFERS_1024
- #error "USE_CERT_BUFFERS_1024 is already defined. Pick one."
- #endif
- #include <wolfssl/certs_test.h>
- #define CTX_CA_CERT ca_cert_der_2048
- #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_2048
- #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1
- #define CTX_SERVER_CERT server_cert_der_2048
- #define CTX_SERVER_CERT_SIZE sizeof_server_cert_der_2048
- #define CTX_SERVER_CERT_TYPE WOLFSSL_FILETYPE_ASN1
- #define CTX_SERVER_KEY server_key_der_2048
- #define CTX_SERVER_KEY_SIZE sizeof_server_key_der_2048
- #define CTX_SERVER_KEY_TYPE WOLFSSL_FILETYPE_ASN1
- #define CTX_CLIENT_CERT client_cert_der_2048
- #define CTX_CLIENT_CERT_SIZE sizeof_client_cert_der_2048
- #define CTX_CLIENT_CERT_TYPE WOLFSSL_FILETYPE_ASN1
- #define CTX_CLIENT_KEY client_key_der_2048
- #define CTX_CLIENT_KEY_SIZE sizeof_client_key_der_2048
- #define CTX_CLIENT_KEY_TYPE WOLFSSL_FILETYPE_ASN1
- #elif defined(USE_CERT_BUFFERS_1024)
- #ifdef USE_CERT_BUFFERS_2048
- #error "USE_CERT_BUFFERS_2048 is already defined. Pick one."
- #endif
- #define CTX_CA_CERT ca_cert_der_1024
- #define CTX_CA_CERT_SIZE sizeof_ca_cert_der_1024
- #define CTX_CA_CERT_TYPE WOLFSSL_FILETYPE_ASN1
- #define CTX_CLIENT_CERT client_cert_der_1024
- #define CTX_CLIENT_CERT_SIZE sizeof_client_cert_der_1024
- #define CTX_CLIENT_CERT_TYPE WOLFSSL_FILETYPE_ASN1
- #define CTX_CLIENT_KEY client_key_der_1024
- #define CTX_CLIENT_KEY_SIZE sizeof_client_key_der_1024
- #define CTX_CLIENT_KEY_TYPE WOLFSSL_FILETYPE_ASN1
- #define CTX_SERVER_CERT server_cert_der_1024
- #define CTX_SERVER_CERT_SIZE sizeof_server_cert_der_1024
- #define CTX_SERVER_CERT_TYPE WOLFSSL_FILETYPE_ASN1
- #define CTX_SERVER_KEY server_key_der_1024
- #define CTX_SERVER_KEY_SIZE sizeof_server_key_der_1024
- #define CTX_SERVER_KEY_TYPE WOLFSSL_FILETYPE_ASN1
- #else
-
- #error "Must define USE_CERT_BUFFERS_2048 or USE_CERT_BUFFERS_1024"
- #endif
- #endif
- #if defined(CONFIG_ESP_MAIN_TASK_STACK_SIZE)
- #if defined(WOLFCRYPT_HAVE_SRP)
- #if defined(FP_MAX_BITS)
- #if FP_MAX_BITS < (8192 * 2)
- #define ESP_SRP_MINIMUM_STACK_8K (24 * 1024)
- #else
- #define ESP_SRP_MINIMUM_STACK_8K (28 * 1024)
- #endif
- #else
- #error "Please define FP_MAX_BITS when using WOLFCRYPT_HAVE_SRP."
- #endif
- #if (CONFIG_ESP_MAIN_TASK_STACK_SIZE < ESP_SRP_MINIMUM_STACK)
- #warning "WOLFCRYPT_HAVE_SRP enabled with small stack size"
- #endif
- #endif
- #else
- #warning "CONFIG_ESP_MAIN_TASK_STACK_SIZE not defined!"
- #endif
|