default_conf.ftl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. [#ftl]
  2. /**
  3. ******************************************************************************
  4. * File Name : ${name}
  5. * Description : This file provides code for the configuration
  6. * of the ${name} instances.
  7. ******************************************************************************
  8. [@common.optinclude name=mxTmpFolder+"/license.tmp"/][#--include License text --]
  9. ******************************************************************************
  10. */
  11. [#assign s = name]
  12. [#assign toto = s?replace(".","_")]
  13. [#assign toto = toto?replace("/","")]
  14. [#assign toto = toto?replace("-","_")]
  15. [#assign inclusion_protection = toto?upper_case]
  16. /* Define to prevent recursive inclusion -------------------------------------*/
  17. #ifndef __${inclusion_protection}__
  18. #define __${inclusion_protection}__
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. /* Includes ------------------------------------------------------------------*/
  23. [#if includes??]
  24. [#list includes as include]
  25. #include "${include}"
  26. [/#list]
  27. [/#if]
  28. [#-- SWIPdatas is a list of SWIPconfigModel --]
  29. [#list SWIPdatas as SWIP]
  30. [#-- Global variables --]
  31. [#if SWIP.variables??]
  32. [#list SWIP.variables as variable]
  33. extern ${variable.value} ${variable.name};
  34. [/#list]
  35. [/#if]
  36. [#-- Global variables --]
  37. [#assign instName = SWIP.ipName]
  38. [#assign fileName = SWIP.fileName]
  39. [#assign version = SWIP.version]
  40. /**
  41. MiddleWare name : ${instName}
  42. MiddleWare fileName : ${fileName}
  43. MiddleWare version : ${version}
  44. */
  45. [#if SWIP.defines??]
  46. [#list SWIP.defines as definition]
  47. /*---------- [#if definition.comments??]${definition.comments}[/#if] -----------*/
  48. #define ${definition.name} #t#t ${definition.value}
  49. [#if definition.description??]${definition.description} [/#if]
  50. [/#list]
  51. [/#if]
  52. [/#list]
  53. /* ------------------------------------------------------------------------- */
  54. /* Hardware platform */
  55. /* ------------------------------------------------------------------------- */
  56. /* Setup default (No crypto hardware acceleration or TLS UART test).
  57. * Use undef in platform section to enable it.
  58. */
  59. #define NO_STM32_HASH
  60. #define NO_STM32_CRYPTO
  61. #define NO_TLS_UART_TEST
  62. #if defined(STM32WB55xx)
  63. #define WOLFSSL_STM32WB
  64. #define WOLFSSL_STM32_PKA
  65. #undef NO_STM32_CRYPTO
  66. #define HAL_CONSOLE_UART huart1
  67. #elif defined(STM32WL55xx)
  68. #define WOLFSSL_STM32WL
  69. #define WOLFSSL_STM32_PKA
  70. #undef NO_STM32_CRYPTO
  71. #define HAL_CONSOLE_UART huart2
  72. #elif defined(STM32F407xx)
  73. #define WOLFSSL_STM32F4
  74. #define HAL_CONSOLE_UART huart2
  75. #elif defined(STM32F437xx)
  76. #define WOLFSSL_STM32F4
  77. #undef NO_STM32_HASH
  78. #undef NO_STM32_CRYPTO
  79. #define STM32_HAL_V2
  80. #define HAL_CONSOLE_UART huart4
  81. #elif defined(STM32F777xx)
  82. #define WOLFSSL_STM32F7
  83. #undef NO_STM32_HASH
  84. #undef NO_STM32_CRYPTO
  85. #define STM32_HAL_V2
  86. #define HAL_CONSOLE_UART huart2
  87. #elif defined(STM32F756xx)
  88. #define WOLFSSL_STM32F7
  89. #undef NO_STM32_HASH
  90. #undef NO_STM32_CRYPTO
  91. #define STM32_HAL_V2
  92. #define HAL_CONSOLE_UART huart3
  93. #elif defined(STM32H753xx)
  94. #define WOLFSSL_STM32H7
  95. #undef NO_STM32_HASH
  96. #undef NO_STM32_CRYPTO
  97. #define HAL_CONSOLE_UART huart3
  98. #elif defined(STM32H723xx) || defined(STM32H725xx)
  99. #define WOLFSSL_STM32H7
  100. #define HAL_CONSOLE_UART huart3
  101. #elif defined(STM32L4A6xx)
  102. #define WOLFSSL_STM32L4
  103. #undef NO_STM32_HASH
  104. #undef NO_STM32_CRYPTO
  105. #define HAL_CONSOLE_UART hlpuart1
  106. #elif defined(STM32L475xx)
  107. #define WOLFSSL_STM32L4
  108. #define HAL_CONSOLE_UART huart1
  109. #elif defined(STM32L562xx)
  110. #define WOLFSSL_STM32L5
  111. #define WOLFSSL_STM32_PKA
  112. #undef NO_STM32_HASH
  113. #undef NO_STM32_CRYPTO
  114. #define HAL_CONSOLE_UART huart1
  115. #elif defined(STM32L552xx)
  116. #define WOLFSSL_STM32L5
  117. #undef NO_STM32_HASH
  118. #define HAL_CONSOLE_UART hlpuart1
  119. #elif defined(STM32F207xx)
  120. #define WOLFSSL_STM32F2
  121. #define HAL_CONSOLE_UART huart3
  122. #elif defined(STM32F217xx)
  123. #define WOLFSSL_STM32F2
  124. #define HAL_CONSOLE_UART huart2
  125. #elif defined(STM32F107xC)
  126. #define WOLFSSL_STM32F1
  127. #define HAL_CONSOLE_UART huart4
  128. #define NO_STM32_RNG
  129. #elif defined(STM32F401xE)
  130. #define WOLFSSL_STM32F4
  131. #define HAL_CONSOLE_UART huart2
  132. #define NO_STM32_RNG
  133. #define WOLFSSL_GENSEED_FORTEST /* no HW RNG is available use test seed */
  134. #elif defined(STM32G071xx)
  135. #define WOLFSSL_STM32G0
  136. #define HAL_CONSOLE_UART huart2
  137. #define NO_STM32_RNG
  138. #define WOLFSSL_GENSEED_FORTEST /* no HW RNG is available use test seed */
  139. #elif defined(STM32U575xx) || defined(STM32U585xx)
  140. #define HAL_CONSOLE_UART huart1
  141. #define WOLFSSL_STM32U5
  142. #define STM32_HAL_V2
  143. #ifdef STM32U585xx
  144. #undef NO_STM32_HASH
  145. #undef NO_STM32_CRYPTO
  146. #define WOLFSSL_STM32_PKA
  147. #endif
  148. #elif defined(STM32H563xx)
  149. #define WOLFSSL_STM32H5
  150. #define HAL_CONSOLE_UART huart3
  151. #define STM32_HAL_V2
  152. #undef NO_STM32_HASH
  153. #else
  154. #warning Please define a hardware platform!
  155. /* This means there is not a pre-defined platform for your board/CPU */
  156. /* You need to define a CPU type, HW crypto and debug UART */
  157. /* CPU Type: WOLFSSL_STM32F1, WOLFSSL_STM32F2, WOLFSSL_STM32F4,
  158. WOLFSSL_STM32F7, WOLFSSL_STM32H7, WOLFSSL_STM32L4, WOLFSSL_STM32L5,
  159. WOLFSSL_STM32G0, WOLFSSL_STM32WB and WOLFSSL_STM32U5 */
  160. #define WOLFSSL_STM32F4
  161. /* Debug UART used for printf */
  162. /* The UART interface number varies for each board/CPU */
  163. /* Typically this is the UART attached to the ST-Link USB CDC UART port */
  164. #define HAL_CONSOLE_UART huart4
  165. /* Hardware Crypto - uncomment as available on hardware */
  166. //#define WOLFSSL_STM32_PKA
  167. //#define NO_STM32_RNG
  168. //#undef NO_STM32_HASH
  169. //#undef NO_STM32_CRYPTO
  170. /* if no HW RNG is available use test seed */
  171. //#define WOLFSSL_GENSEED_FORTEST
  172. //#define STM32_HAL_V2
  173. #endif
  174. /* ------------------------------------------------------------------------- */
  175. /* Platform */
  176. /* ------------------------------------------------------------------------- */
  177. #define SIZEOF_LONG_LONG 8
  178. #define WOLFSSL_GENERAL_ALIGNMENT 4
  179. #define WOLFSSL_STM32_CUBEMX
  180. #define WOLFSSL_SMALL_STACK
  181. #define WOLFSSL_USER_IO
  182. #define WOLFSSL_NO_SOCK
  183. #define WOLFSSL_IGNORE_FILE_WARN
  184. /* ------------------------------------------------------------------------- */
  185. /* Operating System */
  186. /* ------------------------------------------------------------------------- */
  187. #if defined(WOLF_CONF_RTOS) && WOLF_CONF_RTOS == 2
  188. #define FREERTOS
  189. #else
  190. #define SINGLE_THREADED
  191. #endif
  192. /* ------------------------------------------------------------------------- */
  193. /* Math Configuration */
  194. /* ------------------------------------------------------------------------- */
  195. /* 1=Fast (stack) (tfm.c)
  196. * 2=Normal (heap) (integer.c)
  197. * 3-5=Single Precision: only common curves/key sizes:
  198. * (ECC 256/384/521 and RSA/DH 2048/3072/4096)
  199. * 3=Single Precision C (sp_c32.c)
  200. * 4=Single Precision ASM Cortex-M3+ (sp_cortexm.c)
  201. * 5=Single Precision ASM Cortex-M0 (sp_armthumb.c)
  202. * 6=Wolf multi-precision C small (sp_int.c)
  203. * 7=Wolf multi-precision C big (sp_int.c)
  204. */
  205. #if defined(WOLF_CONF_MATH) && WOLF_CONF_MATH == 1
  206. /* fast (stack) math - tfm.c */
  207. #define USE_FAST_MATH
  208. #define TFM_TIMING_RESISTANT
  209. #if !defined(NO_RSA) || !defined(NO_DH)
  210. /* Maximum math bits (Max DH/RSA key bits * 2) */
  211. #undef FP_MAX_BITS
  212. #define FP_MAX_BITS 4096
  213. #endif
  214. /* Optimizations (TFM_ARM, TFM_ASM or none) */
  215. //#define TFM_NO_ASM
  216. //#define TFM_ASM
  217. #elif defined(WOLF_CONF_MATH) && WOLF_CONF_MATH == 2
  218. /* heap math - integer.c */
  219. #define USE_INTEGER_HEAP_MATH
  220. #elif defined(WOLF_CONF_MATH) && (WOLF_CONF_MATH >= 3)
  221. /* single precision only */
  222. #define WOLFSSL_SP
  223. #if WOLF_CONF_MATH != 7
  224. #define WOLFSSL_SP_SMALL /* use smaller version of code */
  225. #endif
  226. #if defined(WOLF_CONF_RSA) && WOLF_CONF_RSA == 1
  227. #define WOLFSSL_HAVE_SP_RSA
  228. //#define WOLFSSL_SP_NO_2048
  229. //#define WOLFSSL_SP_NO_3072
  230. //#define WOLFSSL_SP_4096
  231. #endif
  232. #if defined(WOLF_CONF_DH) && WOLF_CONF_DH == 1
  233. #define WOLFSSL_HAVE_SP_DH
  234. #endif
  235. #if defined(WOLF_CONF_ECC) && WOLF_CONF_ECC == 1
  236. #define WOLFSSL_HAVE_SP_ECC
  237. //#define WOLFSSL_SP_NO_256
  238. //#define WOLFSSL_SP_384
  239. //#define WOLFSSL_SP_521
  240. #endif
  241. #if WOLF_CONF_MATH == 6 || WOLF_CONF_MATH == 7
  242. #define WOLFSSL_SP_MATH_ALL /* use sp_int.c multi precision math */
  243. //#define WOLFSSL_SP_ARM_THUMB /* enable ARM Thumb ASM speedups */
  244. #else
  245. #define WOLFSSL_SP_MATH /* disable non-standard curves / key sizes */
  246. #endif
  247. #define SP_WORD_SIZE 32 /* force 32-bit mode */
  248. /* Enable to put all math on stack (no heap) */
  249. //#define WOLFSSL_SP_NO_MALLOC
  250. #if WOLF_CONF_MATH == 4 || WOLF_CONF_MATH == 5
  251. #define WOLFSSL_SP_ASM /* required if using the ASM versions */
  252. #if WOLF_CONF_MATH == 4
  253. /* ARM Cortex-M3+ */
  254. #define WOLFSSL_SP_ARM_CORTEX_M_ASM
  255. #endif
  256. #if WOLF_CONF_MATH == 5
  257. /* Generic ARM Thumb (Cortex-M0) Assembly */
  258. #define WOLFSSL_SP_ARM_THUMB_ASM
  259. #endif
  260. #endif
  261. #endif
  262. /* ------------------------------------------------------------------------- */
  263. /* Enable Features */
  264. /* ------------------------------------------------------------------------- */
  265. /* Required for TLS */
  266. #define HAVE_TLS_EXTENSIONS
  267. #define HAVE_SUPPORTED_CURVES
  268. #define HAVE_ENCRYPT_THEN_MAC
  269. #define HAVE_EXTENDED_MASTER
  270. #define WOLFSSL_ASN_TEMPLATE
  271. #define HAVE_SNI
  272. #if defined(WOLF_CONF_TLS13) && WOLF_CONF_TLS13 == 1
  273. #define WOLFSSL_TLS13
  274. #define HAVE_HKDF
  275. #endif
  276. #if defined(WOLF_CONF_DTLS) && WOLF_CONF_DTLS == 1
  277. #define WOLFSSL_DTLS
  278. #endif
  279. #if defined(WOLF_CONF_PSK) && WOLF_CONF_PSK == 0
  280. #define NO_PSK
  281. #endif
  282. #if defined(WOLF_CONF_PWDBASED) && WOLF_CONF_PWDBASED == 0
  283. #define NO_PWDBASED
  284. #endif
  285. #if defined(WOLF_CONF_KEEP_PEER_CERT) && WOLF_CONF_KEEP_PEER_CERT == 1
  286. #define KEEP_PEER_CERT
  287. #endif
  288. #if defined(WOLF_CONF_BASE64_ENCODE) && WOLF_CONF_BASE64_ENCODE == 1
  289. #define WOLFSSL_BASE64_ENCODE
  290. #endif
  291. #if defined(WOLF_CONF_OPENSSL_EXTRA) && WOLF_CONF_OPENSSL_EXTRA >= 1
  292. #define OPENSSL_EXTRA
  293. #if !defined(INT_MAX)
  294. #include <limits.h>
  295. #endif
  296. #endif
  297. #if defined(WOLF_CONF_OPENSSL_EXTRA) && WOLF_CONF_OPENSSL_EXTRA >= 2
  298. #define OPENSSL_ALL
  299. #endif
  300. /* TLS Session Cache */
  301. #if 0
  302. #define SMALL_SESSION_CACHE
  303. #else
  304. #define NO_SESSION_CACHE
  305. #endif
  306. /* Post Quantum
  307. * Note: PQM4 is compatible with STM32. The project can be found at:
  308. * https://github.com/mupq/pqm4
  309. */
  310. #if defined(WOLF_CONF_PQM4) && WOLF_CONF_PQM4 == 1
  311. #define HAVE_PQM4
  312. #endif
  313. /* ------------------------------------------------------------------------- */
  314. /* Crypto */
  315. /* ------------------------------------------------------------------------- */
  316. /* RSA */
  317. #undef NO_RSA
  318. #if defined(WOLF_CONF_RSA) && WOLF_CONF_RSA == 1
  319. /* half as much memory but twice as slow */
  320. #undef RSA_LOW_MEM
  321. //#define RSA_LOW_MEM
  322. /* Enables blinding mode, to prevent timing attacks */
  323. #undef WC_RSA_BLINDING
  324. #define WC_RSA_BLINDING
  325. /* RSA PSS Support (required for TLS v1.3) */
  326. #ifdef WOLFSSL_TLS13
  327. #define WC_RSA_PSS
  328. #endif
  329. #else
  330. #define NO_RSA
  331. #endif
  332. /* ECC */
  333. #undef HAVE_ECC
  334. #if defined(WOLF_CONF_ECC) && WOLF_CONF_ECC == 1
  335. #define HAVE_ECC
  336. /* Manually define enabled curves */
  337. #define ECC_USER_CURVES
  338. //#define HAVE_ECC192
  339. //#define HAVE_ECC224
  340. #undef NO_ECC256
  341. //#define HAVE_ECC384
  342. //#define HAVE_ECC521
  343. /* Fixed point cache (speeds repeated operations against same private key) */
  344. #undef FP_ECC
  345. //#define FP_ECC
  346. #ifdef FP_ECC
  347. /* Bits / Entries */
  348. #undef FP_ENTRIES
  349. #define FP_ENTRIES 2
  350. #undef FP_LUT
  351. #define FP_LUT 4
  352. #endif
  353. /* Optional ECC calculation method */
  354. /* Note: doubles heap usage, but slightly faster */
  355. #undef ECC_SHAMIR
  356. #define ECC_SHAMIR
  357. /* Reduces heap usage, but slower */
  358. #define ECC_TIMING_RESISTANT
  359. /* Compressed ECC key support */
  360. //#define HAVE_COMP_KEY
  361. #ifdef USE_FAST_MATH
  362. #if defined(NO_RSA) && defined(NO_DH)
  363. /* Custom fastmath size if not using RSA/DH */
  364. /* MAX = ROUND32(ECC BITS) * 2 */
  365. #define FP_MAX_BITS (256 * 2)
  366. #else
  367. #define ALT_ECC_SIZE
  368. #endif
  369. /* Enable TFM optimizations for ECC */
  370. //#define TFM_ECC192
  371. //#define TFM_ECC224
  372. //#define TFM_ECC256
  373. //#define TFM_ECC384
  374. //#define TFM_ECC521
  375. #endif
  376. #endif
  377. /* DH */
  378. #undef NO_DH
  379. #if defined(WOLF_CONF_DH) && WOLF_CONF_DH == 1
  380. #define HAVE_DH /* freeRTOS settings.h requires this */
  381. #define HAVE_FFDHE_2048
  382. #define HAVE_DH_DEFAULT_PARAMS
  383. #else
  384. #define NO_DH
  385. #endif
  386. /* AES */
  387. #if defined(WOLF_CONF_AESGCM) && WOLF_CONF_AESGCM == 1
  388. #define HAVE_AESGCM
  389. /* GCM Method: GCM_SMALL, GCM_WORD32, GCM_TABLE or GCM_TABLE_4BIT */
  390. /* GCM_TABLE is about 4K larger and 3x faster for GHASH */
  391. #define GCM_SMALL
  392. #define HAVE_AES_DECRYPT
  393. #endif
  394. #if defined(WOLF_CONF_AESCBC) && WOLF_CONF_AESCBC == 1
  395. #define HAVE_AES_CBC
  396. #define HAVE_AES_DECRYPT
  397. #endif
  398. /* Other possible AES modes */
  399. //#define WOLFSSL_AES_CFB /* Used by TPM parameter encryption */
  400. //#define WOLFSSL_AES_COUNTER
  401. //#define HAVE_AESCCM
  402. //#define WOLFSSL_AES_XTS
  403. //#define WOLFSSL_AES_DIRECT
  404. //#define HAVE_AES_ECB
  405. //#define HAVE_AES_KEYWRAP
  406. //#define AES_MAX_KEY_SIZE 256
  407. /* ChaCha20 / Poly1305 */
  408. #undef HAVE_CHACHA
  409. #undef HAVE_POLY1305
  410. #if defined(WOLF_CONF_CHAPOLY) && WOLF_CONF_CHAPOLY == 1
  411. #define HAVE_CHACHA
  412. #define HAVE_POLY1305
  413. /* Needed for Poly1305 */
  414. #undef HAVE_ONE_TIME_AUTH
  415. #define HAVE_ONE_TIME_AUTH
  416. #endif
  417. /* Ed25519 / Curve25519 */
  418. #undef HAVE_CURVE25519
  419. #undef HAVE_ED25519
  420. #if defined(WOLF_CONF_EDCURVE25519) && WOLF_CONF_EDCURVE25519 == 1
  421. #define HAVE_CURVE25519
  422. #define HAVE_ED25519
  423. /* Optionally use small math (less flash usage, but much slower) */
  424. #define CURVED25519_SMALL
  425. #endif
  426. /* ------------------------------------------------------------------------- */
  427. /* Hashing */
  428. /* ------------------------------------------------------------------------- */
  429. /* Sha1 */
  430. #undef NO_SHA
  431. #if defined(WOLF_CONF_SHA1) && WOLF_CONF_SHA1 == 1
  432. /* 1k smaller, but 25% slower */
  433. //#define USE_SLOW_SHA
  434. #else
  435. #define NO_SHA
  436. #endif
  437. /* Sha2-256 */
  438. #undef NO_SHA256
  439. #if defined(WOLF_CONF_SHA2_256) && WOLF_CONF_SHA2_256 == 1
  440. /* not unrolled - ~2k smaller and ~25% slower */
  441. //#define USE_SLOW_SHA256
  442. //#define WOLFSSL_SHAKE256
  443. /* Sha2-224 */
  444. #if defined(WOLF_CONF_SHA2_224) && WOLF_CONF_SHA2_224 == 1
  445. #define WOLFSSL_SHA224
  446. #endif
  447. #else
  448. #define NO_SHA256
  449. #endif
  450. /* Sha2-512 */
  451. #undef WOLFSSL_SHA512
  452. #if defined(WOLF_CONF_SHA2_512) && WOLF_CONF_SHA2_512 == 1
  453. /* over twice as small, but 50% slower */
  454. //#define USE_SLOW_SHA512
  455. #define WOLFSSL_SHA512
  456. #define HAVE_SHA512 /* freeRTOS settings.h requires this */
  457. #endif
  458. /* Sha2-384 */
  459. #undef WOLFSSL_SHA384
  460. #if defined(WOLF_CONF_SHA2_384) && WOLF_CONF_SHA2_384 == 1
  461. #define WOLFSSL_SHA384
  462. #endif
  463. /* Sha3 */
  464. #undef WOLFSSL_SHA3
  465. #if defined(WOLF_CONF_SHA3) && WOLF_CONF_SHA3 == 1
  466. #define WOLFSSL_SHA3
  467. #endif
  468. /* MD5 */
  469. #if defined(WOLF_CONF_MD5) && WOLF_CONF_MD5 == 1
  470. /* enabled */
  471. #else
  472. #define NO_MD5
  473. #endif
  474. /* ------------------------------------------------------------------------- */
  475. /* Benchmark / Test */
  476. /* ------------------------------------------------------------------------- */
  477. /* Use reduced benchmark / test sizes */
  478. #define BENCH_EMBEDDED
  479. #define USE_CERT_BUFFERS_2048
  480. #define USE_CERT_BUFFERS_256
  481. /* ------------------------------------------------------------------------- */
  482. /* Debugging */
  483. /* ------------------------------------------------------------------------- */
  484. #if defined(WOLF_CONF_DEBUG) && WOLF_CONF_DEBUG == 1
  485. #define DEBUG_WOLFSSL
  486. /* Use this to measure / print heap usage */
  487. #if 0
  488. #define USE_WOLFSSL_MEMORY
  489. #define WOLFSSL_TRACK_MEMORY
  490. #define WOLFSSL_DEBUG_MEMORY
  491. #define WOLFSSL_DEBUG_MEMORY_PRINT
  492. #endif
  493. #else
  494. //#define NO_WOLFSSL_MEMORY
  495. //#define NO_ERROR_STRINGS
  496. #endif
  497. /* ------------------------------------------------------------------------- */
  498. /* Port */
  499. /* ------------------------------------------------------------------------- */
  500. /* Override Current Time */
  501. /* Allows custom "custom_time()" function to be used for benchmark */
  502. #define WOLFSSL_USER_CURRTIME
  503. /* ------------------------------------------------------------------------- */
  504. /* RNG */
  505. /* ------------------------------------------------------------------------- */
  506. #define NO_OLD_RNGNAME /* conflicts with STM RNG macro */
  507. #if !defined(WOLF_CONF_RNG) || WOLF_CONF_RNG == 1
  508. /* default is enabled */
  509. #define HAVE_HASHDRBG
  510. #else /* WOLF_CONF_RNG == 0 */
  511. #define WC_NO_HASHDRBG
  512. #define WC_NO_RNG
  513. #endif
  514. /* ------------------------------------------------------------------------- */
  515. /* Disable Features */
  516. /* ------------------------------------------------------------------------- */
  517. #if defined(WOLF_CONF_TLS12) && WOLF_CONF_TLS12 == 0
  518. #define WOLFSSL_NO_TLS12
  519. #endif
  520. #if defined(WOLF_CONF_WOLFCRYPT_ONLY) && WOLF_CONF_WOLFCRYPT_ONLY == 1
  521. #define WOLFCRYPT_ONLY
  522. #endif
  523. //#define NO_WOLFSSL_SERVER
  524. //#define NO_WOLFSSL_CLIENT
  525. #if defined(WOLF_CONF_TEST) && WOLF_CONF_TEST == 0
  526. #define NO_CRYPT_TEST
  527. #define NO_CRYPT_BENCHMARK
  528. #endif
  529. #define NO_FILESYSTEM
  530. #define NO_WRITEV
  531. #define NO_MAIN_DRIVER
  532. #define NO_DEV_RANDOM
  533. #define NO_OLD_TLS
  534. #define WOLFSSL_NO_CLIENT_AUTH /* disable client auth for Ed25519/Ed448 */
  535. #define NO_DSA
  536. #define NO_RC4
  537. #define NO_MD4
  538. #define NO_DES3
  539. #define WOLFSSL_NO_SHAKE128
  540. #define WOLFSSL_NO_SHAKE256
  541. /* In-lining of misc.c functions */
  542. /* If defined, must include wolfcrypt/src/misc.c in build */
  543. /* Slower, but about 1k smaller */
  544. //#define NO_INLINE
  545. /* Base16 / Base64 encoding */
  546. //#define NO_CODING
  547. /* bypass certificate date checking, due to lack of properly configured RTC source */
  548. #ifndef HAL_RTC_MODULE_ENABLED
  549. #define NO_ASN_TIME
  550. #endif
  551. #ifdef __cplusplus
  552. }
  553. #endif
  554. #endif /* ${inclusion_protection}_H */
  555. /**
  556. * @}
  557. */
  558. /*****END OF FILE****/