config-BARE-METAL.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. /* config-BEREFOOT.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. /**** wolfSSL for KEIL-RL Configuration ****/
  22. #define __CORTEX_M3__
  23. #define WOLFSSL_MDK_ARM
  24. #define NO_WRITEV
  25. #define NO_WOLFSSL_DIR
  26. //#define NO_MAIN_DRIVER
  27. #define WOLFSSL_DER_LOAD
  28. #define HAVE_NULL_CIPHER
  29. #define SINGLE_THREADED
  30. #define NO_FILESYSTEM
  31. #define NO_TLS
  32. #define WOLFSSL_USER_IO
  33. #define NO_ECHOSERVER
  34. #define NO_ECHOCLIENT
  35. #define NO_SIMPLE_SERVER
  36. #define NO_SIMPLE_CLIENT
  37. // <<< Use Configuration Wizard in Context Menu >>>
  38. // <h> Build Target: KEIL-BAREFOOT
  39. // <h> Single Threaded, No File System, No TCP-net
  40. // </h>
  41. // <e>Command Shell
  42. #define MDK_CONF_SHELL 1
  43. #if MDK_CONF_SHELL == 1
  44. #define WOLFSSL_MDK_SHELL
  45. #endif
  46. // </e>
  47. // <h>wolfSSL Apps
  48. // <h>Crypt/Cipher
  49. // <o>Cert Storage <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes)
  50. #define MDK_CONF_CERT_BUFF 1
  51. #if MDK_CONF_CERT_BUFF == 1
  52. #define USE_CERT_BUFFERS_1024
  53. #elif MDK_CONF_CERT_BUFF == 2
  54. #define USE_CERT_BUFFERS_2048
  55. #endif
  56. // <e>Crypt/Cipher Test Suite
  57. #define MDK_CONF_CTaoCryptTest 1
  58. #if MDK_CONF_CTaoCryptTest == 0
  59. #define NO_CRYPT_TEST
  60. #endif
  61. // </e>
  62. // <e>Crypt/Cipher Benchmark
  63. #define MDK_CONF_CTaoCryptBenchmark 1
  64. #if MDK_CONF_CTaoCryptBenchmark == 0
  65. #define NO_CRYPT_BENCHMARK
  66. #define BENCH_EMBEDDED
  67. #endif
  68. // </e>
  69. // </h>
  70. // <h>STM32 Hardware Crypt
  71. // <e>STM32F2 Hardware RNG
  72. #define MDK_CONF_STM32F2_RNG 0
  73. #if MDK_CONF_STM32F2_RNG == 1
  74. #define STM32F2_RNG
  75. #else
  76. #define NO_DEV_RANDOM
  77. #endif
  78. // </e>
  79. // <e>STM32F2 Hardware Crypt
  80. #define MDK_CONF_STM32F2_CRYPTO 0
  81. #if MDK_CONF_STM32F2_CRYPTO == 1
  82. #define STM32F2_CRYPTO
  83. #endif
  84. // </e>
  85. // </h>
  86. // <h>wolfCrypt Library
  87. // <h>MD5, SHA, SHA-256, AES, RC4, ASN, RSA
  88. // </h>
  89. // <e>MD2
  90. #define MDK_CONF_MD2 0
  91. #if MDK_CONF_MD2 == 1
  92. #define WOLFSSL_MD2
  93. #endif
  94. // </e>
  95. // <e>MD4
  96. #define MDK_CONF_MD4 1
  97. #if MDK_CONF_MD4 == 0
  98. #define NO_MD4
  99. #endif
  100. // </e>
  101. // <e>SHA-384
  102. // <i>This has to be with SHA512
  103. #define MDK_CONF_SHA384 0
  104. #if MDK_CONF_SHA384 == 1
  105. #define WOLFSSL_SHA384
  106. #endif
  107. // </e>
  108. // <e>SHA-512
  109. #define MDK_CONF_SHA512 0
  110. #if MDK_CONF_SHA512 == 1
  111. #define WOLFSSL_SHA512
  112. #endif
  113. // </e>
  114. // <e>RIPEMD
  115. #define MDK_CONF_RIPEMD 0
  116. #if MDK_CONF_RIPEMD == 1
  117. #define WOLFSSL_RIPEMD
  118. #endif
  119. // </e>
  120. // <e>HMAC
  121. #define MDK_CONF_HMAC 1
  122. #if MDK_CONF_HMAC == 0
  123. #define NO_HMAC
  124. #endif
  125. // </e>
  126. // <e>AEAD
  127. #define MDK_CONF_AEAD 0
  128. #if MDK_CONF_AEAD == 1
  129. #define HAVE_AEAD
  130. #endif
  131. // </e>
  132. // <e>DES3
  133. #define MDK_CONF_DES3 1
  134. #if MDK_CONF_DES3 == 0
  135. #define NO_DES3
  136. #endif
  137. // </e>
  138. // <e>CAMELLIA
  139. #define MDK_CONF_CAMELLIA 0
  140. #if MDK_CONF_CAMELLIA == 1
  141. #define HAVE_CAMELLIA
  142. #endif
  143. // </e>
  144. // <e>DH
  145. // <i>need this for WOLFSSL_SERVER, OPENSSL_EXTRA
  146. #define MDK_CONF_DH 1
  147. #if MDK_CONF_DH == 0
  148. #define NO_DH
  149. #endif
  150. // </e>
  151. // <e>DSA
  152. #define MDK_CONF_DSA 0
  153. #if MDK_CONF_DSA == 0
  154. #define NO_DSA
  155. #endif
  156. // </e>
  157. // <e>PWDBASED
  158. #define MDK_CONF_PWDBASED 1
  159. #if MDK_CONF_PWDBASED == 0
  160. #define NO_PWDBASED
  161. #endif
  162. // </e>
  163. // <e>ECC
  164. #define MDK_CONF_ECC 0
  165. #if MDK_CONF_ECC == 1
  166. #define HAVE_ECC
  167. #endif
  168. // </e>
  169. // <e>PSK
  170. #define MDK_CONF_PSK 1
  171. #if MDK_CONF_PSK == 0
  172. #define NO_PSK
  173. #endif
  174. // </e>
  175. // <e>AESCCM (Turn off Hardware Crypt)
  176. #define MDK_CONF_AESCCM 0
  177. #if MDK_CONF_AESCCM == 1
  178. #define HAVE_AESCCM
  179. #endif
  180. // </e>
  181. // <e>AESGCM (Turn off Hardware Crypt)
  182. #define MDK_CONF_AESGCM 0
  183. #if MDK_CONF_AESGCM == 1
  184. #define HAVE_AESGCM
  185. #define BUILD_AESGCM
  186. #endif
  187. // </e>
  188. // </h>
  189. // <h>Math / Memory
  190. // <o> Math Library
  191. // <0=>SP Math All (sp_int.c)
  192. // <1=>Fast Math (tfm.c)
  193. // <2=>Heap Math (integer.c)
  194. // <3=>SP Math (RSA/DH 2048/3072/4096 and ECC 256/384/521 only)
  195. // <4=>SP Math +ASM (faster)
  196. #define MDK_CONF_MATH 0
  197. #if MDK_CONF_MATH == 0
  198. #define WOLFSSL_SP_MATH_ALL /* use SP math for all key sizes and curves */
  199. #elif MDK_CONF_MATH == 1
  200. #define USE_FAST_MATH
  201. #elif MDK_CONF_MATH == 2
  202. #define USE_INTEGER_HEAP_MATH
  203. #elif MDK_CONF_MATH == 3 || MDK_CONF_MATH == 4
  204. #define WOLFSSL_SP_MATH /* only SP math - disables integer.c/tfm.c */
  205. #define WOLFSSL_HAVE_SP_RSA
  206. #define WOLFSSL_HAVE_SP_DH
  207. #define WOLFSSL_HAVE_SP_ECC
  208. //#define WOLFSSL_SP_NO_2048
  209. //#define WOLFSSL_SP_NO_3072
  210. #define WOLFSSL_SP_4096
  211. //#define WOLFSSL_SP_NO_256
  212. //#define WOLFSSL_SP_384
  213. //#define WOLFSSL_SP_521
  214. #define WOLFSSL_SP_SMALL /* use smaller version of code */
  215. //#define WOLFSSL_SP_NO_MALLOC /* do not use heap */
  216. //#define WOLFSSL_SP_DIV_32 /* do not use 64-bit divides */
  217. #if MDK_CONF_MATH == 4
  218. /* SP Assembly Speedups - specific to chip type */
  219. #define WOLFSSL_SP_ASM
  220. //#define WOLFSSL_SP_ARM32_ASM
  221. //#define WOLFSSL_SP_ARM64_ASM
  222. //#define WOLFSSL_SP_ARM_THUMB_ASM
  223. //#define WOLFSSL_SP_ARM_CORTEX_M_ASM
  224. #endif
  225. #endif
  226. // <e>Small Stack
  227. #define MDK_CONF_SmallStack 1
  228. #if MDK_CONF_SmallStack == 0
  229. #define NO_WOLFSSL_SMALL_STACK
  230. //#define WOLFSSL_SP_NO_MALLOC
  231. #else
  232. #define WOLFSSL_SMALL_STACK
  233. #endif
  234. // </e>
  235. // </h>
  236. // <h>Others
  237. // <e>Inline
  238. #define MDK_CONF_INLINE 0
  239. #if MDK_CONF_INLINE == 0
  240. #define NO_INLINE
  241. #endif
  242. // </e>
  243. // <h>Debug
  244. // <e>Debug Message
  245. #define MDK_CONF_DebugMessage 0
  246. #if MDK_CONF_DebugMessage == 1
  247. #define DEBUG_WOLFSSL
  248. #endif
  249. // </e>
  250. // <e>Check malloc
  251. #define MDK_CONF_CheckMalloc 1
  252. #if MDK_CONF_CheckMalloc == 1
  253. #define WOLFSSL_MALLOC_CHECK
  254. #endif
  255. // </e>
  256. // </h>
  257. // <e>ErrNo.h
  258. #define MDK_CONF_ErrNo 0
  259. #if MDK_CONF_ErrNo == 1
  260. #define HAVE_ERRNO
  261. #endif
  262. // </e>
  263. // <e>zlib (need "zlib.h")
  264. #define MDK_CONF_LIBZ 0
  265. #if MDK_CONF_LIBZ == 1
  266. #define HAVE_LIBZ
  267. #endif
  268. // </e>
  269. // <e>CAVIUM (need CAVIUM headers)
  270. #define MDK_CONF_CAVIUM 0
  271. #if MDK_CONF_CAVIUM == 1
  272. #define HAVE_CAVIUM
  273. #endif
  274. // </e>
  275. // <e>Error Strings
  276. #define MDK_CONF_ErrorStrings 1
  277. #if MDK_CONF_ErrorStrings == 0
  278. #define NO_ERROR_STRINGS
  279. #endif
  280. // </e>
  281. // </h>
  282. //</h>
  283. // <<< end of configuration section >>>