Kconfig 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. # Kconfig template
  2. #
  3. # Copyright (C) 2006-2024 wolfSSL Inc. All rights reserved.
  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. # Kconfig File Version 5.7.2.001 for esp-idf integration
  22. # Kconfig Format Rules
  23. #
  24. # See:
  25. # https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/kconfig.html
  26. #
  27. # Format rules for Kconfig files are as follows:
  28. #
  29. # Option names in any menus should have consistent prefixes. The prefix
  30. # currently should have at least 3 characters.
  31. #
  32. # The unit of indentation should be 4 spaces. All sub-items belonging to a
  33. # parent item are indented by one level deeper. For example, menu is indented
  34. # by 0 spaces, config menu by 4 spaces, help in config by 8 spaces, and the
  35. # text under help by 12 spaces.
  36. #
  37. # No trailing spaces are allowed at the end of the lines.
  38. #
  39. # The maximum length of options is NOT 50 characters as documented.
  40. # kconfcheck will complain that options should be 40 at most.
  41. #
  42. # Fix option lengths first. Superfluous errors on other lines may occur.
  43. #
  44. # The maximum length of lines is 120 characters.
  45. #
  46. # python -m kconfcheck <path_to_kconfig_file>
  47. #
  48. # ---------------------------------------------------------------------------------------------------------------------
  49. # Begin main wolfSSL configuration menu
  50. # ---------------------------------------------------------------------------------------------------------------------
  51. # See ESP-IDF esp-tls component for config TLS_STACK_WOLFSSL
  52. menu "wolfSSL"
  53. menu "Hardening"
  54. config ESP_WOLFSSL_WC_NO_HARDEN
  55. bool "Disable wolfSSL hardening"
  56. default n
  57. help
  58. Sets WC_NO_HARDEN
  59. config ESP_WOLFSSL_TFM_TIMING_RESISTANT
  60. bool "Enable TFM Timing Resistant Code"
  61. default n
  62. help
  63. Sets TFM_TIMING_RESISTANT.
  64. endmenu # Hardening
  65. config ESP_WOLFSSL_ENABLE_BENCHMARK
  66. bool "Enable wolfSSL Benchmark Library"
  67. default n
  68. help
  69. Enables wolfcrypt/benchmark/benchmark.c code for benchmark metrics. Disables NO_CRYPT_BENCHMARK.
  70. menu "Benchmark Debug"
  71. config ESP_DEBUG_WOLFSSL_BENCHMARK_TIMING
  72. bool "Enable benchmark timing debug"
  73. depends on ESP_WOLFSSL_ENABLE_BENCHMARK
  74. default n
  75. help
  76. Enable wolfssl debug for benchmark metric timing (CPU Cycles, RTOS ticks, etc).
  77. config ESP_WOLFSSL_BENCHMARK_TIMER_DEBUG
  78. bool "Enable benchmark timer debug"
  79. depends on ESP_WOLFSSL_ENABLE_BENCHMARK
  80. default n
  81. help
  82. Turn on timer debugging (used when CPU cycles not available)
  83. endmenu # Benchmark Debug
  84. # -----------------------------------------------------------------------------------------------------------------
  85. # wolfCrypt Test
  86. # -----------------------------------------------------------------------------------------------------------------
  87. config ESP_WOLFSSL_ENABLE_TEST
  88. bool "Enable wolfCrypt Test Library"
  89. default n
  90. help
  91. Enables wolfcrypt/test/test.c code for testing. Disables NO_CRYPT_TEST.
  92. menu "wolfCrypt tests"
  93. config WOLFSSL_HAVE_WOLFCRYPT_TEST_OPTIONS
  94. bool "Enable wolfCrypt Test Options"
  95. depends on ESP_WOLFSSL_ENABLE_TEST
  96. default n
  97. help
  98. Enables HAVE_WOLFCRYPT_TEST_OPTIONS
  99. config TEST_ESPIDF_ALL_WOLFSSL
  100. bool "Enable all features to use in tests"
  101. depends on ESP_WOLFSSL_ENABLE_TEST
  102. default n
  103. help
  104. Enables TEST_ESPIDF_ALL_WOLFSSL
  105. endmenu # wolfCrypt tests
  106. # -----------------------------------------------------------------------------------------------------------------
  107. # Apple HomeKit Options
  108. # -----------------------------------------------------------------------------------------------------------------
  109. menu "Apple HomeKit"
  110. config WOLFSSL_APPLE_HOMEKIT
  111. bool "Enable Apple HomeKit options"
  112. default n
  113. help
  114. Enables FP_MAX_BITS (8192 * 2), SRP, ChaCha, Poly1305, Base64 encoding needed for Apple HomeKit.
  115. endmenu # Apple HomeKit
  116. # -----------------------------------------------------------------------------------------------------------------
  117. config ESP_WOLFSSL_DISABLE_MY_ECC
  118. bool "Disable ECC in my project"
  119. default "n"
  120. help
  121. ECC is enabled by default. Select this option to disable.
  122. config ESP_WOLFSSL_ENABLE_MY_USE_RSA
  123. bool "Enable RSA in my project"
  124. default "n"
  125. help
  126. RSA is disabled by default. Select this option to enable.
  127. config ESP_WOLFSSL_BENCHMARK
  128. bool "Enable wolfSSL Benchmark"
  129. default n
  130. help
  131. Enables user settings relevant to benchmark code
  132. config ESP_TLS_USING_WOLFSSL_SPECIFIED
  133. bool "Use the specified wolfssl for ESP-TLS"
  134. default Y
  135. help
  136. Includes wolfSSL from specified directory (not using esp-wolfssl).
  137. config ESP_WOLFSSL_NO_USE_FAST_MATH
  138. bool "Disable FAST_MATH library and all ESP32 Hardware Acceleration"
  139. select ESP_WOLFSSL_NO_HW
  140. select ESP_WOLFSSL_NO_HW_AES
  141. select ESP_WOLFSSL_NO_HW_HASH
  142. select ESP_WOLFSSL_NO_HW_RSA_PRI
  143. select ESP_WOLFSSL_NO_HW_RSA_PRI_MP_MUL
  144. select ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
  145. select ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
  146. default n
  147. help
  148. When disabling all hardware acceleration for smaller memory footprint,
  149. disabling TFM fast math provides faster wolfSSL software algorithms in an
  150. even smaller flash memory footprint.
  151. menu "Protocol Config"
  152. config WOLFSSL_HAVE_ALPN
  153. bool "Enable ALPN (Application Layer Protocol Negotiation) in wolfSSL"
  154. default y
  155. config WOLFSSL_ALLOW_TLS13
  156. bool "Allow TLS 1.3"
  157. default y
  158. help
  159. Allow TLS to fallback to TLS1.2. Memory footprint will likely be larger for TLS1.2.
  160. When disabled HTTPS and MQTT over TLS connections will fail if TLS1.3 not accepted.
  161. config WOLFSSL_ALLOW_TLS12
  162. bool "Allow TLS 1.2"
  163. default n
  164. help
  165. Allow TLS to fallback to TLS1.2. Memory footprint will likely be larger for TLS1.2.
  166. When disabled HTTPS and MQTT over TLS connections will fail if TLS1.3 not accepted.
  167. config WOLFSSL_HAVE_TLS_EXTENSIONS
  168. bool "Enable TLS Extensions"
  169. default y
  170. help
  171. Sets HAVE_TLS_EXTENSIONS which is needed for TLS 1.3, SNI, ALPN, and more.
  172. config WOLFSSL_ALT_CERT_CHAINS
  173. bool "Enable Alternate Certificate Chains"
  174. default n
  175. help
  176. The option relaxes the default strict wolfSSL certificate chain processing. This
  177. will typically need to be enabled when loading only a CA file. Typically solves
  178. the -188 ASN_NO_SIGNER_E error. Use with caution.
  179. config WOLFSSL_HAVE_OCSP
  180. bool "Enable OCSP (Online Certificate Status Protocol) in wolfSSL"
  181. default n
  182. help
  183. Sets HAVE_OCSP
  184. endmenu # Protocol Config
  185. # -----------------------------------------------------------------------------------------------------------------
  186. # -----------------------------------------------------------------------------------------------------------------
  187. config TLS_STACK_WOLFSSL
  188. # Invisible option that locks TLS_STACK_WOLFSSL to ESP_TLS_USING_WOLFSSL
  189. bool
  190. default n
  191. select FREERTOS_ENABLE_BACKWARD_COMPATIBILITY
  192. help
  193. Includes wolfSSL in ESP-TLS so that it can be compiled with wolfSSL as its SSL/TLS library.
  194. Enabled when wolfSSL is selected in ESP_TLS_LIBRARY_CHOOSE.
  195. menu "wolfSSL ESP-TLS"
  196. depends on ESP_TLS_USING_WOLFSSL
  197. menu "Certificate Bundle"
  198. depends on ESP_TLS_USING_WOLFSSL
  199. config WOLFSSL_CERTIFICATE_BUNDLE
  200. bool "Enable trusted root certificate bundle"
  201. default y if ESP_TLS_USING_WOLFSSL
  202. default n
  203. depends on ESP_TLS_USING_WOLFSSL
  204. help
  205. Enable support for large number of default root certificates
  206. When enabled this option allows user to store default as well
  207. as customer specific root certificates in compressed format rather
  208. than storing full certificate. For the root certificates the public key and the subject name
  209. will be stored.
  210. config WOLFSSL_NO_ASN_STRICT
  211. bool "Relax Certificate ASN Strict Checks"
  212. default n
  213. depends on ESP_TLS_USING_WOLFSSL
  214. help
  215. Allows sub-optimal certificate ASN checks. Unless using a bundle with known issues,
  216. it is recommended to NOT enable this.
  217. config WOLFSSL_ASN_ALLOW_0_SERIAL
  218. bool "Allow cert missing an ASN Serial Number"
  219. default y
  220. depends on ESP_TLS_USING_WOLFSSL
  221. help
  222. Although not recommended, there may be certificates in the bundle that are missing
  223. a serial number. This option allows the missing value without having to fully
  224. disable strict ASN checking with WOLFSSL_NO_ASN_STRICT.
  225. choice WOLFSSL_DEFAULT_CERTIFICATE_BUNDLE
  226. bool "Default certificate bundle options"
  227. depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
  228. default WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_FULL
  229. config WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_FULL
  230. bool "Use the full default certificate bundle"
  231. config WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_CMN
  232. bool "Use only the most common certificates from the default bundles"
  233. help
  234. Use only the most common certificates from the default bundles, reducing the size with 50%,
  235. while still having around 99% coverage.
  236. config WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_NONE
  237. bool "Do not use the default certificate bundle"
  238. endchoice
  239. config WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE
  240. depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
  241. default n
  242. bool "Add custom certificates to the default bundle"
  243. config WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE_PATH
  244. depends on WOLFSSL_CUSTOM_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
  245. string "Custom certificate bundle path"
  246. help
  247. Name of the custom certificate directory or file. This path is evaluated
  248. relative to the project root directory.
  249. config WOLFSSL_CERTIFICATE_BUNDLE_DEPRECATED_LIST
  250. bool "Add deprecated root certificates"
  251. depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL && !WOLFSSL_CERTIFICATE_BUNDLE_DEFAULT_NONE
  252. help
  253. Include the deprecated list of root certificates in the bundle.
  254. This list gets updated when a certificate is removed from the Mozilla's
  255. NSS root certificate store. This config can be enabled if you would like
  256. to ensure that none of the certificates that were deployed in the product
  257. are affected because of the update to bundle. In turn, enabling this
  258. config keeps expired, retracted certificates in the bundle and it may
  259. pose a security risk.
  260. - Deprecated cert list may grow based based on sync with upstream bundle
  261. - Deprecated certs would be be removed in ESP-IDF (next) major release
  262. config WOLFSSL_CERTIFICATE_BUNDLE_MAX_CERTS
  263. int "Maximum no of certificates allowed in certificate bundle"
  264. default 200
  265. depends on WOLFSSL_CERTIFICATE_BUNDLE && ESP_TLS_USING_WOLFSSL
  266. endmenu
  267. endmenu # wolfSSL ESP-TLS
  268. # -----------------------------------------------------------------------------------------------------------------
  269. # -----------------------------------------------------------------------------------------------------------------
  270. config ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
  271. bool "Modify default hardware acceleration settings"
  272. default n
  273. help
  274. When disabling all hardware acceleration for smaller memory footprint,
  275. disabling TFM fast math provides faster wolfSSL software algorithms in an
  276. even smaller flash memory footprint.
  277. Typically used for debugging, analysis, or optimizations. The default
  278. hardware acceleration features can be each manually adjusted.
  279. menu "wolfSSL Hardware Acceleration"
  280. config ESP_WOLFSSL_NO_ESP32_CRYPT
  281. bool "Disable all ESP32 Hardware Acceleration"
  282. depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
  283. default n
  284. select ESP_WOLFSSL_NO_HW_AES
  285. select ESP_WOLFSSL_NO_HW_HASH
  286. select ESP_WOLFSSL_NO_HW_RSA_PRI
  287. select ESP_WOLFSSL_NO_HW_RSA_PRI_MP_MUL
  288. select ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
  289. select ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
  290. help
  291. Hardware acceleration enabled by default. When selected defines: NO_ESP32_CRYPT.
  292. Consider disabling FASTMATH (other libraries are faster in software and smaller)
  293. config ESP_WOLFSSL_NO_HW_AES
  294. bool "Disable all ESP32 AES Hardware Acceleration"
  295. depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
  296. default n
  297. help
  298. Hardware acceleration enabled by default.When selected defines: NO_HW_AES
  299. config ESP_WOLFSSL_NO_HW_HASH
  300. bool "Disable all ESP32 SHA Hash Hardware Acceleration"
  301. depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
  302. default n
  303. help
  304. Hardware acceleration enabled by default. When selected defines: NO_HW_HASH
  305. config ESP_WOLFSSL_NO_HW_RSA_PRI
  306. bool "Disable all ESP32 RSA Hardware Acceleration"
  307. depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
  308. default n
  309. select ESP_WOLFSSL_NO_HW_PRI_MP_MUL
  310. select ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
  311. select ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
  312. help
  313. Hardware acceleration enabled by default. When selected defines: NO_HW_RSA_PRI
  314. config ESP_WOLFSSL_NO_HW_RSA_PRI_MP_MUL
  315. bool "Disable all ESP32 Multiplication Hardware Acceleration"
  316. depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
  317. default n
  318. help
  319. Hardware acceleration enabled by default. When selected defines: NO_HW_RSA_PRI_MP_MUL
  320. config ESP_WOLFSSL_NO_HW_RSA_PRI_MULMOD
  321. bool "Disable all ESP32 Modular Multiplication Hardware Acceleration"
  322. depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
  323. default n
  324. help
  325. Hardware acceleration enabled by default. When selected defines: NO_HW_RSA_PRI_MULMOD
  326. config ESP_WOLFSSL_NO_HW_RSA_PRI_EXPTMOD
  327. bool "Disable all ESP32 RSA Exponential Math Hardware Acceleration"
  328. depends on ESP_WOLFSSL_ALT_HARDWARE_ACCELERATION
  329. default n
  330. help
  331. Hardware acceleration enabled by default.
  332. Select this option to force disable: NO_HW_RSA_PRI_EXPTMOD
  333. config ESP_WOLFSSL_DEBUG_ESP_HW_MULTI_RSAMAX_BITS
  334. bool "Enable debugging of RSA Multiplication operand length"
  335. default n
  336. help
  337. Prints an esp log warning to the default console UART when one of the
  338. multiplication operands exceeds the maximum size supported by hardware,
  339. requiring fallback to software. This can be helpful to pick key sizes
  340. when performance is critical. See also metrics for counting instances.
  341. config ESP_WOLFSSL_DEBUG_ESP_HW_MOD_RSAMAX_BITS
  342. bool "Enable debugging of RSA Modular operand length"
  343. default n
  344. help
  345. Prints an esp log warning to the default console UART when one of the
  346. modular math operands exceeds the maximum size supported by hardware,
  347. requiring fallback to software. This can be helpful to pick key sizes
  348. when performance is critical. See also metrics for counting instances.
  349. endmenu # wolfSSL Hardware Acceleration
  350. # -----------------------------------------------------------------------------------------------------------------
  351. # -----------------------------------------------------------------------------------------------------------------
  352. menu "wolfSSL Experimental Options"
  353. config ESP_WOLFSSL_EXPERIMENTAL_SETTINGS
  354. bool "Enable wolfSSL Experimental Settings"
  355. default n
  356. help
  357. Enables experimental settings for wolfSSL. See documentation.
  358. config ESP_WOLFSSL_ENABLE_KYBER
  359. bool "Enable wolfSSL Kyber"
  360. default n
  361. help
  362. Enable debugging messages for wolfSSL. See user_settings.h for additional debug options.
  363. endmenu # wolfSSL Experimental Options
  364. # -----------------------------------------------------------------------------------------------------------------
  365. # -----------------------------------------------------------------------------------------------------------------
  366. menu "wolfSSL Debug Options"
  367. config ESP_WOLFSSL_DEBUG_WOLFSSL
  368. bool "Enable wolfSSL Debugging"
  369. default n
  370. help
  371. Enable debugging messages for wolfSSL. See user_settings.h for additional debug options.
  372. config ESP_WOLFSSL_TEST_LOOP
  373. bool "Run test apps in a loop until failure"
  374. default y
  375. help
  376. Enable a loop wrapper for benchmark, http_client, and wolfssl test apps.
  377. endmenu # wolfSSL Debug Options
  378. # -----------------------------------------------------------------------------------------------------------------
  379. # -----------------------------------------------------------------------------------------------------------------
  380. menu "wolfSSL Customization"
  381. config CUSTOM_SETTING_WOLFSSL_ROOT
  382. string "Enter a path for wolfSSL source code"
  383. default "~/workspace/wolfssl"
  384. help
  385. This option lets you specify a directory for the wolfSSL source code (typically a git clone).
  386. Enter the path using forward slashes (e.g., C:/myfolder/mysubfolder) or double backslashes
  387. (e.g., C:\\myfolder\\mysubfolder).
  388. endmenu # wolfSSL Customization
  389. # -----------------------------------------------------------------------------------------------------------------
  390. # -----------------------------------------------------------------------------------------------------------------
  391. menu "Component Config"
  392. config IGNORE_ESP_IDF_WOLFSSL_COMPONENT
  393. bool "Ignore the ESP-IDF component of wolfSSL (if present)"
  394. default n
  395. help
  396. Ignores wolfSSL present in the esp-idf/components directory. Requires wolfssl as a local component.
  397. config IGNORE_LOCAL_WOLFSSL_COMPONENT
  398. bool "Ignore the local component of wolfSSL (if present)"
  399. default n
  400. help
  401. Ignores wolfSSL present in the local project components directory.
  402. Requires wolfssl as a ESP-IDF component.
  403. endmenu # Component Config
  404. # -----------------------------------------------------------------------------------------------------------------
  405. # -----------------------------------------------------------------------------------------------------------------
  406. menu "Utility Config"
  407. config USE_WOLFSSL_ESP_SDK_TIME
  408. bool "Enable wolfSSL time helper functions"
  409. default n
  410. help
  411. Enables use of various time and date setting functions found in the esp-sdk-lib.h file.
  412. config USE_WOLFSSL_ESP_SDK_WIFI
  413. bool "Enable wolfSSL WiFi helper functions"
  414. default n
  415. help
  416. Enables use of various time and date setting functions found in the esp-sdk-lib.h file.
  417. endmenu # Utility Config
  418. endmenu # wolfSSL
  419. # ---------------------------------------------------------------------------------------------------------------------
  420. # ---------------------------------------------------------------------------------------------------------------------
  421. menu "wolfSSH"
  422. config ESP_ENABLE_WOLFSSH
  423. bool "Enable wolfSSH options"
  424. default n
  425. help
  426. Enables WOLFSSH_TERM, WOLFSSL_KEY_GEN, WOLFSSL_PTHREADS, WOLFSSH_TEST_SERVER, WOLFSSH_TEST_THREADING
  427. config ESP_WOLFSSL_DEBUG_WOLFSSH
  428. bool "Enable wolfSSH debugging"
  429. default n
  430. help
  431. Enable wolfSSH debugging macro. See user_settings.h
  432. endmenu # wolfSSH
  433. # ---------------------------------------------------------------------------------------------------------------------
  434. # ---------------------------------------------------------------------------------------------------------------------
  435. menu "wolfMQTT"
  436. config ESP_ENABLE_WOLFMQTT
  437. bool "Enable wolfMQTT options"
  438. default n
  439. help
  440. Enables WOLFMQTT
  441. config ESP_WOLFSSL_DEBUG_WOLFMQTT
  442. bool "Enable wolfMQTT debugging"
  443. default n
  444. help
  445. Enable wolfMQTT debugging macro. See user_settings.h
  446. endmenu # wolfMQTT
  447. # ---------------------------------------------------------------------------------------------------------------------