user_settings.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /* user_settings.h
  2. *
  3. * Copyright (C) 2006-2023 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL.
  6. *
  7. * wolfSSL is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * wolfSSL is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  20. */
  21. #undef WOLFSSL_ESPIDF
  22. #undef WOLFSSL_ESPWROOM32
  23. #undef WOLFSSL_ESPWROOM32SE
  24. #undef WOLFSSL_ESPWROOM32
  25. #undef WOLFSSL_ESP8266
  26. #define WOLFSSL_ESPIDF
  27. /*
  28. * choose ONE of these Espressif chips to define:
  29. *
  30. * WOLFSSL_ESPWROOM32
  31. * WOLFSSL_ESPWROOM32SE
  32. * WOLFSSL_ESP8266
  33. */
  34. #define WOLFSSL_ESPWROOM32
  35. /* #define DEBUG_WOLFSSL_VERBOSE */
  36. #define BENCH_EMBEDDED
  37. #define USE_CERT_BUFFERS_2048
  38. /* TLS 1.3 */
  39. #define WOLFSSL_TLS13
  40. #define HAVE_TLS_EXTENSIONS
  41. #define WC_RSA_PSS
  42. #define HAVE_HKDF
  43. #define HAVE_AEAD
  44. #define HAVE_SUPPORTED_CURVES
  45. /* when you want to use SINGLE THREAD */
  46. /* #define SINGLE_THREADED */
  47. #define NO_FILESYSTEM
  48. #define HAVE_AESGCM
  49. /* when you want to use SHA384 */
  50. /* #define WOLFSSL_SHA384 */
  51. #define WOLFSSL_SHA512
  52. #define HAVE_ECC
  53. #define HAVE_CURVE25519
  54. #define CURVE25519_SMALL
  55. #define HAVE_ED25519
  56. /* when you want to use pkcs7 */
  57. /* #define HAVE_PKCS7 */
  58. #if defined(HAVE_PKCS7)
  59. #define HAVE_AES_KEYWRAP
  60. #define HAVE_X963_KDF
  61. #define WOLFSSL_AES_DIRECT
  62. #endif
  63. /* when you want to use aes counter mode */
  64. /* #define WOLFSSL_AES_DIRECT */
  65. /* #define WOLFSSL_AES_COUNTER */
  66. /* esp32-wroom-32se specific definition */
  67. #if defined(WOLFSSL_ESPWROOM32SE)
  68. #define WOLFSSL_ATECC508A
  69. #define HAVE_PK_CALLBACKS
  70. /* when you want to use a custom slot allocation for ATECC608A */
  71. /* unless your configuration is unusual, you can use default */
  72. /* implementation. */
  73. /* #define CUSTOM_SLOT_ALLOCATION */
  74. #endif
  75. /* rsa primitive specific definition */
  76. #if defined(WOLFSSL_ESPWROOM32) || defined(WOLFSSL_ESPWROOM32SE)
  77. /* Define USE_FAST_MATH and SMALL_STACK */
  78. #define ESP32_USE_RSA_PRIMITIVE
  79. /* threshold for performance adjustment for hw primitive use */
  80. /* X bits of G^X mod P greater than */
  81. #define EPS_RSA_EXPT_XBTIS 36
  82. /* X and Y of X * Y mod P greater than */
  83. #define ESP_RSA_MULM_BITS 2000
  84. #endif
  85. /* debug options */
  86. /* #define DEBUG_WOLFSSL */
  87. /* #define WOLFSSL_ESP32WROOM32_CRYPT_DEBUG */
  88. /* #define WOLFSSL_ATECC508A_DEBUG */
  89. /* date/time */
  90. /* if it cannot adjust time in the device, */
  91. /* enable macro below */
  92. /* #define NO_ASN_TIME */
  93. /* #define XTIME time */
  94. /* when you want not to use HW acceleration */
  95. /* #define NO_ESP32WROOM32_CRYPT */
  96. /* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_HASH*/
  97. /* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_AES */
  98. /* #define NO_WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI */
  99. /* adjust wait-timeout count if you see timeout in rsa hw acceleration */
  100. #define ESP_RSA_TIMEOUT_CNT 0x249F00