config.h 73 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511
  1. /**
  2. * \file config.h
  3. *
  4. * \brief Configuration options (set of defines)
  5. *
  6. * This set of compile-time options may be used to enable
  7. * or disable features selectively, and reduce the global
  8. * memory footprint.
  9. *
  10. * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
  11. * SPDX-License-Identifier: Apache-2.0
  12. *
  13. * Licensed under the Apache License, Version 2.0 (the "License"); you may
  14. * not use this file except in compliance with the License.
  15. * You may obtain a copy of the License at
  16. *
  17. * http://www.apache.org/licenses/LICENSE-2.0
  18. *
  19. * Unless required by applicable law or agreed to in writing, software
  20. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  21. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22. * See the License for the specific language governing permissions and
  23. * limitations under the License.
  24. *
  25. * This file is part of mbed TLS (https://tls.mbed.org)
  26. */
  27. #ifndef MBEDTLS_CONFIG_H
  28. #define MBEDTLS_CONFIG_H
  29. #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
  30. #define _CRT_SECURE_NO_DEPRECATE 1
  31. #endif
  32. /**
  33. * \name SECTION: System support
  34. *
  35. * This section sets system specific settings.
  36. * \{
  37. */
  38. /**
  39. * \def MBEDTLS_HAVE_ASM
  40. *
  41. * The compiler has support for asm().
  42. *
  43. * Requires support for asm() in compiler.
  44. *
  45. * Used in:
  46. * library/timing.c
  47. * library/padlock.c
  48. * include/mbedtls/bn_mul.h
  49. *
  50. * Comment to disable the use of assembly code.
  51. */
  52. #define MBEDTLS_HAVE_ASM
  53. /**
  54. * \def MBEDTLS_HAVE_SSE2
  55. *
  56. * CPU supports SSE2 instruction set.
  57. *
  58. * Uncomment if the CPU supports SSE2 (IA-32 specific).
  59. */
  60. //#define MBEDTLS_HAVE_SSE2
  61. /**
  62. * \def MBEDTLS_HAVE_TIME
  63. *
  64. * System has time.h and time().
  65. * The time does not need to be correct, only time differences are used,
  66. * by contrast with MBEDTLS_HAVE_TIME_DATE
  67. *
  68. * Comment if your system does not support time functions
  69. */
  70. #define MBEDTLS_HAVE_TIME
  71. /**
  72. * \def MBEDTLS_HAVE_TIME_DATE
  73. *
  74. * System has time.h and time(), gmtime() and the clock is correct.
  75. * The time needs to be correct (not necesarily very accurate, but at least
  76. * the date should be correct). This is used to verify the validity period of
  77. * X.509 certificates.
  78. *
  79. * Comment if your system does not have a correct clock.
  80. */
  81. #define MBEDTLS_HAVE_TIME_DATE
  82. /**
  83. * \def MBEDTLS_PLATFORM_MEMORY
  84. *
  85. * Enable the memory allocation layer.
  86. *
  87. * By default mbed TLS uses the system-provided calloc() and free().
  88. * This allows different allocators (self-implemented or provided) to be
  89. * provided to the platform abstraction layer.
  90. *
  91. * Enabling MBEDTLS_PLATFORM_MEMORY without the
  92. * MBEDTLS_PLATFORM_{FREE,CALLOC}_MACROs will provide
  93. * "mbedtls_platform_set_calloc_free()" allowing you to set an alternative calloc() and
  94. * free() function pointer at runtime.
  95. *
  96. * Enabling MBEDTLS_PLATFORM_MEMORY and specifying
  97. * MBEDTLS_PLATFORM_{CALLOC,FREE}_MACROs will allow you to specify the
  98. * alternate function at compile time.
  99. *
  100. * Requires: MBEDTLS_PLATFORM_C
  101. *
  102. * Enable this layer to allow use of alternative memory allocators.
  103. */
  104. //#define MBEDTLS_PLATFORM_MEMORY
  105. /**
  106. * \def MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
  107. *
  108. * Do not assign standard functions in the platform layer (e.g. calloc() to
  109. * MBEDTLS_PLATFORM_STD_CALLOC and printf() to MBEDTLS_PLATFORM_STD_PRINTF)
  110. *
  111. * This makes sure there are no linking errors on platforms that do not support
  112. * these functions. You will HAVE to provide alternatives, either at runtime
  113. * via the platform_set_xxx() functions or at compile time by setting
  114. * the MBEDTLS_PLATFORM_STD_XXX defines, or enabling a
  115. * MBEDTLS_PLATFORM_XXX_MACRO.
  116. *
  117. * Requires: MBEDTLS_PLATFORM_C
  118. *
  119. * Uncomment to prevent default assignment of standard functions in the
  120. * platform layer.
  121. */
  122. //#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
  123. /**
  124. * \def MBEDTLS_PLATFORM_EXIT_ALT
  125. *
  126. * MBEDTLS_PLATFORM_XXX_ALT: Uncomment a macro to let mbed TLS support the
  127. * function in the platform abstraction layer.
  128. *
  129. * Example: In case you uncomment MBEDTLS_PLATFORM_PRINTF_ALT, mbed TLS will
  130. * provide a function "mbedtls_platform_set_printf()" that allows you to set an
  131. * alternative printf function pointer.
  132. *
  133. * All these define require MBEDTLS_PLATFORM_C to be defined!
  134. *
  135. * \note MBEDTLS_PLATFORM_SNPRINTF_ALT is required on Windows;
  136. * it will be enabled automatically by check_config.h
  137. *
  138. * \warning MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as
  139. * MBEDTLS_PLATFORM_XXX_MACRO!
  140. *
  141. * Uncomment a macro to enable alternate implementation of specific base
  142. * platform function
  143. */
  144. //#define MBEDTLS_PLATFORM_EXIT_ALT
  145. //#define MBEDTLS_PLATFORM_FPRINTF_ALT
  146. //#define MBEDTLS_PLATFORM_PRINTF_ALT
  147. //#define MBEDTLS_PLATFORM_SNPRINTF_ALT
  148. /**
  149. * \def MBEDTLS_DEPRECATED_WARNING
  150. *
  151. * Mark deprecated functions so that they generate a warning if used.
  152. * Functions deprecated in one version will usually be removed in the next
  153. * version. You can enable this to help you prepare the transition to a new
  154. * major version by making sure your code is not using these functions.
  155. *
  156. * This only works with GCC and Clang. With other compilers, you may want to
  157. * use MBEDTLS_DEPRECATED_REMOVED
  158. *
  159. * Uncomment to get warnings on using deprecated functions.
  160. */
  161. //#define MBEDTLS_DEPRECATED_WARNING
  162. /**
  163. * \def MBEDTLS_DEPRECATED_REMOVED
  164. *
  165. * Remove deprecated functions so that they generate an error if used.
  166. * Functions deprecated in one version will usually be removed in the next
  167. * version. You can enable this to help you prepare the transition to a new
  168. * major version by making sure your code is not using these functions.
  169. *
  170. * Uncomment to get errors on using deprecated functions.
  171. */
  172. //#define MBEDTLS_DEPRECATED_REMOVED
  173. /* \} name SECTION: System support */
  174. /**
  175. * \name SECTION: mbed TLS feature support
  176. *
  177. * This section sets support for features that are or are not needed
  178. * within the modules that are enabled.
  179. * \{
  180. */
  181. /**
  182. * \def MBEDTLS_TIMING_ALT
  183. *
  184. * Uncomment to provide your own alternate implementation for mbedtls_timing_hardclock(),
  185. * mbedtls_timing_get_timer(), mbedtls_set_alarm(), mbedtls_set/get_delay()
  186. *
  187. * Only works if you have MBEDTLS_TIMING_C enabled.
  188. *
  189. * You will need to provide a header "timing_alt.h" and an implementation at
  190. * compile time.
  191. */
  192. //#define MBEDTLS_TIMING_ALT
  193. /**
  194. * \def MBEDTLS_AES_ALT
  195. *
  196. * MBEDTLS__MODULE_NAME__ALT: Uncomment a macro to let mbed TLS use your
  197. * alternate core implementation of a symmetric crypto or hash module (e.g.
  198. * platform specific assembly optimized implementations). Keep in mind that
  199. * the function prototypes should remain the same.
  200. *
  201. * This replaces the whole module. If you only want to replace one of the
  202. * functions, use one of the MBEDTLS__FUNCTION_NAME__ALT flags.
  203. *
  204. * Example: In case you uncomment MBEDTLS_AES_ALT, mbed TLS will no longer
  205. * provide the "struct mbedtls_aes_context" definition and omit the base function
  206. * declarations and implementations. "aes_alt.h" will be included from
  207. * "aes.h" to include the new function definitions.
  208. *
  209. * Uncomment a macro to enable alternate implementation of the corresponding
  210. * module.
  211. */
  212. //#define MBEDTLS_AES_ALT
  213. //#define MBEDTLS_ARC4_ALT
  214. //#define MBEDTLS_BLOWFISH_ALT
  215. //#define MBEDTLS_CAMELLIA_ALT
  216. //#define MBEDTLS_DES_ALT
  217. //#define MBEDTLS_XTEA_ALT
  218. //#define MBEDTLS_MD2_ALT
  219. //#define MBEDTLS_MD4_ALT
  220. //#define MBEDTLS_MD5_ALT
  221. //#define MBEDTLS_RIPEMD160_ALT
  222. //#define MBEDTLS_SHA1_ALT
  223. //#define MBEDTLS_SHA256_ALT
  224. //#define MBEDTLS_SHA512_ALT
  225. /**
  226. * \def MBEDTLS_MD2_PROCESS_ALT
  227. *
  228. * MBEDTLS__FUNCTION_NAME__ALT: Uncomment a macro to let mbed TLS use you
  229. * alternate core implementation of symmetric crypto or hash function. Keep in
  230. * mind that function prototypes should remain the same.
  231. *
  232. * This replaces only one function. The header file from mbed TLS is still
  233. * used, in contrast to the MBEDTLS__MODULE_NAME__ALT flags.
  234. *
  235. * Example: In case you uncomment MBEDTLS_SHA256_PROCESS_ALT, mbed TLS will
  236. * no longer provide the mbedtls_sha1_process() function, but it will still provide
  237. * the other function (using your mbedtls_sha1_process() function) and the definition
  238. * of mbedtls_sha1_context, so your implementation of mbedtls_sha1_process must be compatible
  239. * with this definition.
  240. *
  241. * Note: if you use the AES_xxx_ALT macros, then is is recommended to also set
  242. * MBEDTLS_AES_ROM_TABLES in order to help the linker garbage-collect the AES
  243. * tables.
  244. *
  245. * Uncomment a macro to enable alternate implementation of the corresponding
  246. * function.
  247. */
  248. //#define MBEDTLS_MD2_PROCESS_ALT
  249. //#define MBEDTLS_MD4_PROCESS_ALT
  250. //#define MBEDTLS_MD5_PROCESS_ALT
  251. //#define MBEDTLS_RIPEMD160_PROCESS_ALT
  252. //#define MBEDTLS_SHA1_PROCESS_ALT
  253. //#define MBEDTLS_SHA256_PROCESS_ALT
  254. //#define MBEDTLS_SHA512_PROCESS_ALT
  255. //#define MBEDTLS_DES_SETKEY_ALT
  256. //#define MBEDTLS_DES_CRYPT_ECB_ALT
  257. //#define MBEDTLS_DES3_CRYPT_ECB_ALT
  258. //#define MBEDTLS_AES_SETKEY_ENC_ALT
  259. //#define MBEDTLS_AES_SETKEY_DEC_ALT
  260. //#define MBEDTLS_AES_ENCRYPT_ALT
  261. //#define MBEDTLS_AES_DECRYPT_ALT
  262. /**
  263. * \def MBEDTLS_ENTROPY_HARDWARE_ALT
  264. *
  265. * Uncomment this macro to let mbed TLS use your own implementation of a
  266. * hardware entropy collector.
  267. *
  268. * Your function must be called \c mbedtls_hardware_poll(), have the same
  269. * prototype as declared in entropy_poll.h, and accept NULL as first argument.
  270. *
  271. * Uncomment to use your own hardware entropy collector.
  272. */
  273. //#define MBEDTLS_ENTROPY_HARDWARE_ALT
  274. /**
  275. * \def MBEDTLS_AES_ROM_TABLES
  276. *
  277. * Store the AES tables in ROM.
  278. *
  279. * Uncomment this macro to store the AES tables in ROM.
  280. */
  281. //#define MBEDTLS_AES_ROM_TABLES
  282. /**
  283. * \def MBEDTLS_CAMELLIA_SMALL_MEMORY
  284. *
  285. * Use less ROM for the Camellia implementation (saves about 768 bytes).
  286. *
  287. * Uncomment this macro to use less memory for Camellia.
  288. */
  289. //#define MBEDTLS_CAMELLIA_SMALL_MEMORY
  290. /**
  291. * \def MBEDTLS_CIPHER_MODE_CBC
  292. *
  293. * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
  294. */
  295. #define MBEDTLS_CIPHER_MODE_CBC
  296. /**
  297. * \def MBEDTLS_CIPHER_MODE_CFB
  298. *
  299. * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
  300. */
  301. #define MBEDTLS_CIPHER_MODE_CFB
  302. /**
  303. * \def MBEDTLS_CIPHER_MODE_CTR
  304. *
  305. * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
  306. */
  307. #define MBEDTLS_CIPHER_MODE_CTR
  308. /**
  309. * \def MBEDTLS_CIPHER_NULL_CIPHER
  310. *
  311. * Enable NULL cipher.
  312. * Warning: Only do so when you know what you are doing. This allows for
  313. * encryption or channels without any security!
  314. *
  315. * Requires MBEDTLS_ENABLE_WEAK_CIPHERSUITES as well to enable
  316. * the following ciphersuites:
  317. * MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA
  318. * MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA
  319. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA
  320. * MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA
  321. * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384
  322. * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256
  323. * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA
  324. * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384
  325. * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256
  326. * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA
  327. * MBEDTLS_TLS_RSA_WITH_NULL_SHA256
  328. * MBEDTLS_TLS_RSA_WITH_NULL_SHA
  329. * MBEDTLS_TLS_RSA_WITH_NULL_MD5
  330. * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384
  331. * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256
  332. * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA
  333. * MBEDTLS_TLS_PSK_WITH_NULL_SHA384
  334. * MBEDTLS_TLS_PSK_WITH_NULL_SHA256
  335. * MBEDTLS_TLS_PSK_WITH_NULL_SHA
  336. *
  337. * Uncomment this macro to enable the NULL cipher and ciphersuites
  338. */
  339. //#define MBEDTLS_CIPHER_NULL_CIPHER
  340. /**
  341. * \def MBEDTLS_CIPHER_PADDING_PKCS7
  342. *
  343. * MBEDTLS_CIPHER_PADDING_XXX: Uncomment or comment macros to add support for
  344. * specific padding modes in the cipher layer with cipher modes that support
  345. * padding (e.g. CBC)
  346. *
  347. * If you disable all padding modes, only full blocks can be used with CBC.
  348. *
  349. * Enable padding modes in the cipher layer.
  350. */
  351. #define MBEDTLS_CIPHER_PADDING_PKCS7
  352. #define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
  353. #define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
  354. #define MBEDTLS_CIPHER_PADDING_ZEROS
  355. /**
  356. * \def MBEDTLS_ENABLE_WEAK_CIPHERSUITES
  357. *
  358. * Enable weak ciphersuites in SSL / TLS.
  359. * Warning: Only do so when you know what you are doing. This allows for
  360. * channels with virtually no security at all!
  361. *
  362. * This enables the following ciphersuites:
  363. * MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA
  364. * MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA
  365. *
  366. * Uncomment this macro to enable weak ciphersuites
  367. */
  368. //#define MBEDTLS_ENABLE_WEAK_CIPHERSUITES
  369. /**
  370. * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES
  371. *
  372. * Remove RC4 ciphersuites by default in SSL / TLS.
  373. * This flag removes the ciphersuites based on RC4 from the default list as
  374. * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible to
  375. * enable (some of) them with mbedtls_ssl_conf_ciphersuites() by including them
  376. * explicitly.
  377. *
  378. * Uncomment this macro to remove RC4 ciphersuites by default.
  379. */
  380. #define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
  381. /**
  382. * \def MBEDTLS_ECP_DP_SECP192R1_ENABLED
  383. *
  384. * MBEDTLS_ECP_XXXX_ENABLED: Enables specific curves within the Elliptic Curve
  385. * module. By default all supported curves are enabled.
  386. *
  387. * Comment macros to disable the curve and functions for it
  388. */
  389. #define MBEDTLS_ECP_DP_SECP192R1_ENABLED
  390. #define MBEDTLS_ECP_DP_SECP224R1_ENABLED
  391. #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
  392. #define MBEDTLS_ECP_DP_SECP384R1_ENABLED
  393. #define MBEDTLS_ECP_DP_SECP521R1_ENABLED
  394. #define MBEDTLS_ECP_DP_SECP192K1_ENABLED
  395. #define MBEDTLS_ECP_DP_SECP224K1_ENABLED
  396. #define MBEDTLS_ECP_DP_SECP256K1_ENABLED
  397. #define MBEDTLS_ECP_DP_BP256R1_ENABLED
  398. #define MBEDTLS_ECP_DP_BP384R1_ENABLED
  399. #define MBEDTLS_ECP_DP_BP512R1_ENABLED
  400. #define MBEDTLS_ECP_DP_CURVE25519_ENABLED
  401. /**
  402. * \def MBEDTLS_ECP_NIST_OPTIM
  403. *
  404. * Enable specific 'modulo p' routines for each NIST prime.
  405. * Depending on the prime and architecture, makes operations 4 to 8 times
  406. * faster on the corresponding curve.
  407. *
  408. * Comment this macro to disable NIST curves optimisation.
  409. */
  410. #define MBEDTLS_ECP_NIST_OPTIM
  411. /**
  412. * \def MBEDTLS_ECDSA_DETERMINISTIC
  413. *
  414. * Enable deterministic ECDSA (RFC 6979).
  415. * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
  416. * may result in a compromise of the long-term signing key. This is avoided by
  417. * the deterministic variant.
  418. *
  419. * Requires: MBEDTLS_HMAC_DRBG_C
  420. *
  421. * Comment this macro to disable deterministic ECDSA.
  422. */
  423. #define MBEDTLS_ECDSA_DETERMINISTIC
  424. /**
  425. * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
  426. *
  427. * Enable the PSK based ciphersuite modes in SSL / TLS.
  428. *
  429. * This enables the following ciphersuites (if other requisites are
  430. * enabled as well):
  431. * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
  432. * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
  433. * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
  434. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
  435. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
  436. * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
  437. * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
  438. * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
  439. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
  440. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
  441. * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
  442. * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
  443. */
  444. #define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
  445. /**
  446. * \def MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
  447. *
  448. * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
  449. *
  450. * Requires: MBEDTLS_DHM_C
  451. *
  452. * This enables the following ciphersuites (if other requisites are
  453. * enabled as well):
  454. * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
  455. * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
  456. * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
  457. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
  458. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
  459. * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
  460. * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
  461. * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
  462. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
  463. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
  464. * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
  465. * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
  466. */
  467. #define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
  468. /**
  469. * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
  470. *
  471. * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
  472. *
  473. * Requires: MBEDTLS_ECDH_C
  474. *
  475. * This enables the following ciphersuites (if other requisites are
  476. * enabled as well):
  477. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
  478. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
  479. * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
  480. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
  481. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
  482. * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
  483. * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
  484. * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
  485. */
  486. #define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
  487. /**
  488. * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
  489. *
  490. * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
  491. *
  492. * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
  493. * MBEDTLS_X509_CRT_PARSE_C
  494. *
  495. * This enables the following ciphersuites (if other requisites are
  496. * enabled as well):
  497. * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
  498. * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
  499. * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
  500. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
  501. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
  502. * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
  503. * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
  504. * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
  505. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
  506. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
  507. * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
  508. * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
  509. */
  510. #define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
  511. /**
  512. * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
  513. *
  514. * Enable the RSA-only based ciphersuite modes in SSL / TLS.
  515. *
  516. * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
  517. * MBEDTLS_X509_CRT_PARSE_C
  518. *
  519. * This enables the following ciphersuites (if other requisites are
  520. * enabled as well):
  521. * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
  522. * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
  523. * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
  524. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
  525. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
  526. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
  527. * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
  528. * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
  529. * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
  530. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
  531. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
  532. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
  533. * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
  534. * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
  535. * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
  536. */
  537. #define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
  538. /**
  539. * \def MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
  540. *
  541. * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
  542. *
  543. * Requires: MBEDTLS_DHM_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
  544. * MBEDTLS_X509_CRT_PARSE_C
  545. *
  546. * This enables the following ciphersuites (if other requisites are
  547. * enabled as well):
  548. * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
  549. * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
  550. * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
  551. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
  552. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
  553. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
  554. * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
  555. * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
  556. * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
  557. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
  558. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
  559. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
  560. * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
  561. */
  562. #define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
  563. /**
  564. * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
  565. *
  566. * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
  567. *
  568. * Requires: MBEDTLS_ECDH_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
  569. * MBEDTLS_X509_CRT_PARSE_C
  570. *
  571. * This enables the following ciphersuites (if other requisites are
  572. * enabled as well):
  573. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  574. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
  575. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
  576. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
  577. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
  578. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  579. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  580. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  581. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
  582. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
  583. * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
  584. * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
  585. */
  586. #define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
  587. /**
  588. * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
  589. *
  590. * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
  591. *
  592. * Requires: MBEDTLS_ECDH_C, MBEDTLS_ECDSA_C, MBEDTLS_X509_CRT_PARSE_C,
  593. *
  594. * This enables the following ciphersuites (if other requisites are
  595. * enabled as well):
  596. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  597. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
  598. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  599. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
  600. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
  601. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  602. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  603. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  604. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
  605. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
  606. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
  607. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
  608. */
  609. #define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
  610. /**
  611. * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
  612. *
  613. * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
  614. *
  615. * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
  616. *
  617. * This enables the following ciphersuites (if other requisites are
  618. * enabled as well):
  619. * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
  620. * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
  621. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
  622. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
  623. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
  624. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
  625. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
  626. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
  627. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
  628. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
  629. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
  630. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
  631. */
  632. #define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
  633. /**
  634. * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
  635. *
  636. * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
  637. *
  638. * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
  639. *
  640. * This enables the following ciphersuites (if other requisites are
  641. * enabled as well):
  642. * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
  643. * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
  644. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
  645. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
  646. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
  647. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
  648. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
  649. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
  650. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
  651. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
  652. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
  653. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
  654. */
  655. #define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
  656. /**
  657. * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
  658. *
  659. * Enable the ECJPAKE based ciphersuite modes in SSL / TLS.
  660. *
  661. * \warning This is currently experimental. EC J-PAKE support is based on the
  662. * Thread v1.0.0 specification; incompatible changes to the specification
  663. * might still happen. For this reason, this is disabled by default.
  664. *
  665. * Requires: MBEDTLS_ECJPAKE_C
  666. * MBEDTLS_SHA256_C
  667. * MBEDTLS_ECP_DP_SECP256R1_ENABLED
  668. *
  669. * This enables the following ciphersuites (if other requisites are
  670. * enabled as well):
  671. * MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8
  672. */
  673. //#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
  674. /**
  675. * \def MBEDTLS_PK_PARSE_EC_EXTENDED
  676. *
  677. * Enhance support for reading EC keys using variants of SEC1 not allowed by
  678. * RFC 5915 and RFC 5480.
  679. *
  680. * Currently this means parsing the SpecifiedECDomain choice of EC
  681. * parameters (only known groups are supported, not arbitrary domains, to
  682. * avoid validation issues).
  683. *
  684. * Disable if you only need to support RFC 5915 + 5480 key formats.
  685. */
  686. #define MBEDTLS_PK_PARSE_EC_EXTENDED
  687. /**
  688. * \def MBEDTLS_ERROR_STRERROR_DUMMY
  689. *
  690. * Enable a dummy error function to make use of mbedtls_strerror() in
  691. * third party libraries easier when MBEDTLS_ERROR_C is disabled
  692. * (no effect when MBEDTLS_ERROR_C is enabled).
  693. *
  694. * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're
  695. * not using mbedtls_strerror() or error_strerror() in your application.
  696. *
  697. * Disable if you run into name conflicts and want to really remove the
  698. * mbedtls_strerror()
  699. */
  700. #define MBEDTLS_ERROR_STRERROR_DUMMY
  701. /**
  702. * \def MBEDTLS_GENPRIME
  703. *
  704. * Enable the prime-number generation code.
  705. *
  706. * Requires: MBEDTLS_BIGNUM_C
  707. */
  708. #define MBEDTLS_GENPRIME
  709. /**
  710. * \def MBEDTLS_FS_IO
  711. *
  712. * Enable functions that use the filesystem.
  713. */
  714. #define MBEDTLS_FS_IO
  715. /**
  716. * \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
  717. *
  718. * Do not add default entropy sources. These are the platform specific,
  719. * mbedtls_timing_hardclock and HAVEGE based poll functions.
  720. *
  721. * This is useful to have more control over the added entropy sources in an
  722. * application.
  723. *
  724. * Uncomment this macro to prevent loading of default entropy functions.
  725. */
  726. //#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
  727. /**
  728. * \def MBEDTLS_NO_PLATFORM_ENTROPY
  729. *
  730. * Do not use built-in platform entropy functions.
  731. * This is useful if your platform does not support
  732. * standards like the /dev/urandom or Windows CryptoAPI.
  733. *
  734. * Uncomment this macro to disable the built-in platform entropy functions.
  735. */
  736. //#define MBEDTLS_NO_PLATFORM_ENTROPY
  737. /**
  738. * \def MBEDTLS_ENTROPY_FORCE_SHA256
  739. *
  740. * Force the entropy accumulator to use a SHA-256 accumulator instead of the
  741. * default SHA-512 based one (if both are available).
  742. *
  743. * Requires: MBEDTLS_SHA256_C
  744. *
  745. * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
  746. * if you have performance concerns.
  747. *
  748. * This option is only useful if both MBEDTLS_SHA256_C and
  749. * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
  750. */
  751. //#define MBEDTLS_ENTROPY_FORCE_SHA256
  752. /**
  753. * \def MBEDTLS_MEMORY_DEBUG
  754. *
  755. * Enable debugging of buffer allocator memory issues. Automatically prints
  756. * (to stderr) all (fatal) messages on memory allocation issues. Enables
  757. * function for 'debug output' of allocated memory.
  758. *
  759. * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
  760. *
  761. * Uncomment this macro to let the buffer allocator print out error messages.
  762. */
  763. //#define MBEDTLS_MEMORY_DEBUG
  764. /**
  765. * \def MBEDTLS_MEMORY_BACKTRACE
  766. *
  767. * Include backtrace information with each allocated block.
  768. *
  769. * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
  770. * GLIBC-compatible backtrace() an backtrace_symbols() support
  771. *
  772. * Uncomment this macro to include backtrace information
  773. */
  774. //#define MBEDTLS_MEMORY_BACKTRACE
  775. /**
  776. * \def MBEDTLS_PK_RSA_ALT_SUPPORT
  777. *
  778. * Support external private RSA keys (eg from a HSM) in the PK layer.
  779. *
  780. * Comment this macro to disable support for external private RSA keys.
  781. */
  782. #define MBEDTLS_PK_RSA_ALT_SUPPORT
  783. /**
  784. * \def MBEDTLS_PKCS1_V15
  785. *
  786. * Enable support for PKCS#1 v1.5 encoding.
  787. *
  788. * Requires: MBEDTLS_RSA_C
  789. *
  790. * This enables support for PKCS#1 v1.5 operations.
  791. */
  792. #define MBEDTLS_PKCS1_V15
  793. /**
  794. * \def MBEDTLS_PKCS1_V21
  795. *
  796. * Enable support for PKCS#1 v2.1 encoding.
  797. *
  798. * Requires: MBEDTLS_MD_C, MBEDTLS_RSA_C
  799. *
  800. * This enables support for RSAES-OAEP and RSASSA-PSS operations.
  801. */
  802. #define MBEDTLS_PKCS1_V21
  803. /**
  804. * \def MBEDTLS_RSA_NO_CRT
  805. *
  806. * Do not use the Chinese Remainder Theorem for the RSA private operation.
  807. *
  808. * Uncomment this macro to disable the use of CRT in RSA.
  809. *
  810. */
  811. //#define MBEDTLS_RSA_NO_CRT
  812. /**
  813. * \def MBEDTLS_SELF_TEST
  814. *
  815. * Enable the checkup functions (*_self_test).
  816. */
  817. #define MBEDTLS_SELF_TEST
  818. /**
  819. * \def MBEDTLS_SHA256_SMALLER
  820. *
  821. * Enable an implementation of SHA-256 that has lower ROM footprint but also
  822. * lower performance.
  823. *
  824. * The default implementation is meant to be a reasonnable compromise between
  825. * performance and size. This version optimizes more aggressively for size at
  826. * the expense of performance. Eg on Cortex-M4 it reduces the size of
  827. * mbedtls_sha256_process() from ~2KB to ~0.5KB for a performance hit of about
  828. * 30%.
  829. *
  830. * Uncomment to enable the smaller implementation of SHA256.
  831. */
  832. //#define MBEDTLS_SHA256_SMALLER
  833. /**
  834. * \def MBEDTLS_SSL_AEAD_RANDOM_IV
  835. *
  836. * Generate a random IV rather than using the record sequence number as a
  837. * nonce for ciphersuites using and AEAD algorithm (GCM or CCM).
  838. *
  839. * Using the sequence number is generally recommended.
  840. *
  841. * Uncomment this macro to always use random IVs with AEAD ciphersuites.
  842. */
  843. //#define MBEDTLS_SSL_AEAD_RANDOM_IV
  844. /**
  845. * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
  846. *
  847. * Enable sending of alert messages in case of encountered errors as per RFC.
  848. * If you choose not to send the alert messages, mbed TLS can still communicate
  849. * with other servers, only debugging of failures is harder.
  850. *
  851. * The advantage of not sending alert messages, is that no information is given
  852. * about reasons for failures thus preventing adversaries of gaining intel.
  853. *
  854. * Enable sending of all alert messages
  855. */
  856. #define MBEDTLS_SSL_ALL_ALERT_MESSAGES
  857. /**
  858. * \def MBEDTLS_SSL_DEBUG_ALL
  859. *
  860. * Enable the debug messages in SSL module for all issues.
  861. * Debug messages have been disabled in some places to prevent timing
  862. * attacks due to (unbalanced) debugging function calls.
  863. *
  864. * If you need all error reporting you should enable this during debugging,
  865. * but remove this for production servers that should log as well.
  866. *
  867. * Uncomment this macro to report all debug messages on errors introducing
  868. * a timing side-channel.
  869. *
  870. */
  871. //#define MBEDTLS_SSL_DEBUG_ALL
  872. /** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
  873. *
  874. * Enable support for Encrypt-then-MAC, RFC 7366.
  875. *
  876. * This allows peers that both support it to use a more robust protection for
  877. * ciphersuites using CBC, providing deep resistance against timing attacks
  878. * on the padding or underlying cipher.
  879. *
  880. * This only affects CBC ciphersuites, and is useless if none is defined.
  881. *
  882. * Requires: MBEDTLS_SSL_PROTO_TLS1 or
  883. * MBEDTLS_SSL_PROTO_TLS1_1 or
  884. * MBEDTLS_SSL_PROTO_TLS1_2
  885. *
  886. * Comment this macro to disable support for Encrypt-then-MAC
  887. */
  888. #define MBEDTLS_SSL_ENCRYPT_THEN_MAC
  889. /** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET
  890. *
  891. * Enable support for Extended Master Secret, aka Session Hash
  892. * (draft-ietf-tls-session-hash-02).
  893. *
  894. * This was introduced as "the proper fix" to the Triple Handshake familiy of
  895. * attacks, but it is recommended to always use it (even if you disable
  896. * renegotiation), since it actually fixes a more fundamental issue in the
  897. * original SSL/TLS design, and has implications beyond Triple Handshake.
  898. *
  899. * Requires: MBEDTLS_SSL_PROTO_TLS1 or
  900. * MBEDTLS_SSL_PROTO_TLS1_1 or
  901. * MBEDTLS_SSL_PROTO_TLS1_2
  902. *
  903. * Comment this macro to disable support for Extended Master Secret.
  904. */
  905. #define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
  906. /**
  907. * \def MBEDTLS_SSL_FALLBACK_SCSV
  908. *
  909. * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00).
  910. *
  911. * For servers, it is recommended to always enable this, unless you support
  912. * only one version of TLS, or know for sure that none of your clients
  913. * implements a fallback strategy.
  914. *
  915. * For clients, you only need this if you're using a fallback strategy, which
  916. * is not recommended in the first place, unless you absolutely need it to
  917. * interoperate with buggy (version-intolerant) servers.
  918. *
  919. * Comment this macro to disable support for FALLBACK_SCSV
  920. */
  921. #define MBEDTLS_SSL_FALLBACK_SCSV
  922. /**
  923. * \def MBEDTLS_SSL_HW_RECORD_ACCEL
  924. *
  925. * Enable hooking functions in SSL module for hardware acceleration of
  926. * individual records.
  927. *
  928. * Uncomment this macro to enable hooking functions.
  929. */
  930. //#define MBEDTLS_SSL_HW_RECORD_ACCEL
  931. /**
  932. * \def MBEDTLS_SSL_CBC_RECORD_SPLITTING
  933. *
  934. * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0.
  935. *
  936. * This is a countermeasure to the BEAST attack, which also minimizes the risk
  937. * of interoperability issues compared to sending 0-length records.
  938. *
  939. * Comment this macro to disable 1/n-1 record splitting.
  940. */
  941. #define MBEDTLS_SSL_CBC_RECORD_SPLITTING
  942. /**
  943. * \def MBEDTLS_SSL_RENEGOTIATION
  944. *
  945. * Disable support for TLS renegotiation.
  946. *
  947. * The two main uses of renegotiation are (1) refresh keys on long-lived
  948. * connections and (2) client authentication after the initial handshake.
  949. * If you don't need renegotiation, it's probably better to disable it, since
  950. * it has been associated with security issues in the past and is easy to
  951. * misuse/misunderstand.
  952. *
  953. * Comment this to disable support for renegotiation.
  954. */
  955. #define MBEDTLS_SSL_RENEGOTIATION
  956. /**
  957. * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
  958. *
  959. * Enable support for receiving and parsing SSLv2 Client Hello messages for the
  960. * SSL Server module (MBEDTLS_SSL_SRV_C).
  961. *
  962. * Uncomment this macro to enable support for SSLv2 Client Hello messages.
  963. */
  964. //#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
  965. /**
  966. * \def MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
  967. *
  968. * Pick the ciphersuite according to the client's preferences rather than ours
  969. * in the SSL Server module (MBEDTLS_SSL_SRV_C).
  970. *
  971. * Uncomment this macro to respect client's ciphersuite order
  972. */
  973. //#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
  974. /**
  975. * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
  976. *
  977. * Enable support for RFC 6066 max_fragment_length extension in SSL.
  978. *
  979. * Comment this macro to disable support for the max_fragment_length extension
  980. */
  981. #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
  982. /**
  983. * \def MBEDTLS_SSL_PROTO_SSL3
  984. *
  985. * Enable support for SSL 3.0.
  986. *
  987. * Requires: MBEDTLS_MD5_C
  988. * MBEDTLS_SHA1_C
  989. *
  990. * Comment this macro to disable support for SSL 3.0
  991. */
  992. #define MBEDTLS_SSL_PROTO_SSL3
  993. /**
  994. * \def MBEDTLS_SSL_PROTO_TLS1
  995. *
  996. * Enable support for TLS 1.0.
  997. *
  998. * Requires: MBEDTLS_MD5_C
  999. * MBEDTLS_SHA1_C
  1000. *
  1001. * Comment this macro to disable support for TLS 1.0
  1002. */
  1003. #define MBEDTLS_SSL_PROTO_TLS1
  1004. /**
  1005. * \def MBEDTLS_SSL_PROTO_TLS1_1
  1006. *
  1007. * Enable support for TLS 1.1 (and DTLS 1.0 if DTLS is enabled).
  1008. *
  1009. * Requires: MBEDTLS_MD5_C
  1010. * MBEDTLS_SHA1_C
  1011. *
  1012. * Comment this macro to disable support for TLS 1.1 / DTLS 1.0
  1013. */
  1014. #define MBEDTLS_SSL_PROTO_TLS1_1
  1015. /**
  1016. * \def MBEDTLS_SSL_PROTO_TLS1_2
  1017. *
  1018. * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled).
  1019. *
  1020. * Requires: MBEDTLS_SHA1_C or MBEDTLS_SHA256_C or MBEDTLS_SHA512_C
  1021. * (Depends on ciphersuites)
  1022. *
  1023. * Comment this macro to disable support for TLS 1.2 / DTLS 1.2
  1024. */
  1025. #define MBEDTLS_SSL_PROTO_TLS1_2
  1026. /**
  1027. * \def MBEDTLS_SSL_PROTO_DTLS
  1028. *
  1029. * Enable support for DTLS (all available versions).
  1030. *
  1031. * Enable this and MBEDTLS_SSL_PROTO_TLS1_1 to enable DTLS 1.0,
  1032. * and/or this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2.
  1033. *
  1034. * Requires: MBEDTLS_SSL_PROTO_TLS1_1
  1035. * or MBEDTLS_SSL_PROTO_TLS1_2
  1036. *
  1037. * Comment this macro to disable support for DTLS
  1038. */
  1039. #define MBEDTLS_SSL_PROTO_DTLS
  1040. /**
  1041. * \def MBEDTLS_SSL_ALPN
  1042. *
  1043. * Enable support for RFC 7301 Application Layer Protocol Negotiation.
  1044. *
  1045. * Comment this macro to disable support for ALPN.
  1046. */
  1047. #define MBEDTLS_SSL_ALPN
  1048. /**
  1049. * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY
  1050. *
  1051. * Enable support for the anti-replay mechanism in DTLS.
  1052. *
  1053. * Requires: MBEDTLS_SSL_TLS_C
  1054. * MBEDTLS_SSL_PROTO_DTLS
  1055. *
  1056. * \warning Disabling this is often a security risk!
  1057. * See mbedtls_ssl_conf_dtls_anti_replay() for details.
  1058. *
  1059. * Comment this to disable anti-replay in DTLS.
  1060. */
  1061. #define MBEDTLS_SSL_DTLS_ANTI_REPLAY
  1062. /**
  1063. * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY
  1064. *
  1065. * Enable support for HelloVerifyRequest on DTLS servers.
  1066. *
  1067. * This feature is highly recommended to prevent DTLS servers being used as
  1068. * amplifiers in DoS attacks against other hosts. It should always be enabled
  1069. * unless you know for sure amplification cannot be a problem in the
  1070. * environment in which your server operates.
  1071. *
  1072. * \warning Disabling this can ba a security risk! (see above)
  1073. *
  1074. * Requires: MBEDTLS_SSL_PROTO_DTLS
  1075. *
  1076. * Comment this to disable support for HelloVerifyRequest.
  1077. */
  1078. #define MBEDTLS_SSL_DTLS_HELLO_VERIFY
  1079. /**
  1080. * \def MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
  1081. *
  1082. * Enable server-side support for clients that reconnect from the same port.
  1083. *
  1084. * Some clients unexpectedly close the connection and try to reconnect using the
  1085. * same source port. This needs special support from the server to handle the
  1086. * new connection securely, as described in section 4.2.8 of RFC 6347. This
  1087. * flag enables that support.
  1088. *
  1089. * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY
  1090. *
  1091. * Comment this to disable support for clients reusing the source port.
  1092. */
  1093. #define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
  1094. /**
  1095. * \def MBEDTLS_SSL_DTLS_BADMAC_LIMIT
  1096. *
  1097. * Enable support for a limit of records with bad MAC.
  1098. *
  1099. * See mbedtls_ssl_conf_dtls_badmac_limit().
  1100. *
  1101. * Requires: MBEDTLS_SSL_PROTO_DTLS
  1102. */
  1103. #define MBEDTLS_SSL_DTLS_BADMAC_LIMIT
  1104. /**
  1105. * \def MBEDTLS_SSL_SESSION_TICKETS
  1106. *
  1107. * Enable support for RFC 5077 session tickets in SSL.
  1108. * Client-side, provides full support for session tickets (maintainance of a
  1109. * session store remains the responsibility of the application, though).
  1110. * Server-side, you also need to provide callbacks for writing and parsing
  1111. * tickets, including authenticated encryption and key management. Example
  1112. * callbacks are provided by MBEDTLS_SSL_TICKET_C.
  1113. *
  1114. * Comment this macro to disable support for SSL session tickets
  1115. */
  1116. #define MBEDTLS_SSL_SESSION_TICKETS
  1117. /**
  1118. * \def MBEDTLS_SSL_EXPORT_KEYS
  1119. *
  1120. * Enable support for exporting key block and master secret.
  1121. * This is required for certain users of TLS, e.g. EAP-TLS.
  1122. *
  1123. * Comment this macro to disable support for key export
  1124. */
  1125. #define MBEDTLS_SSL_EXPORT_KEYS
  1126. /**
  1127. * \def MBEDTLS_SSL_SERVER_NAME_INDICATION
  1128. *
  1129. * Enable support for RFC 6066 server name indication (SNI) in SSL.
  1130. *
  1131. * Requires: MBEDTLS_X509_CRT_PARSE_C
  1132. *
  1133. * Comment this macro to disable support for server name indication in SSL
  1134. */
  1135. #define MBEDTLS_SSL_SERVER_NAME_INDICATION
  1136. /**
  1137. * \def MBEDTLS_SSL_TRUNCATED_HMAC
  1138. *
  1139. * Enable support for RFC 6066 truncated HMAC in SSL.
  1140. *
  1141. * Comment this macro to disable support for truncated HMAC in SSL
  1142. */
  1143. #define MBEDTLS_SSL_TRUNCATED_HMAC
  1144. /**
  1145. * \def MBEDTLS_THREADING_ALT
  1146. *
  1147. * Provide your own alternate threading implementation.
  1148. *
  1149. * Requires: MBEDTLS_THREADING_C
  1150. *
  1151. * Uncomment this to allow your own alternate threading implementation.
  1152. */
  1153. //#define MBEDTLS_THREADING_ALT
  1154. /**
  1155. * \def MBEDTLS_THREADING_PTHREAD
  1156. *
  1157. * Enable the pthread wrapper layer for the threading layer.
  1158. *
  1159. * Requires: MBEDTLS_THREADING_C
  1160. *
  1161. * Uncomment this to enable pthread mutexes.
  1162. */
  1163. //#define MBEDTLS_THREADING_PTHREAD
  1164. /**
  1165. * \def MBEDTLS_VERSION_FEATURES
  1166. *
  1167. * Allow run-time checking of compile-time enabled features. Thus allowing users
  1168. * to check at run-time if the library is for instance compiled with threading
  1169. * support via mbedtls_version_check_feature().
  1170. *
  1171. * Requires: MBEDTLS_VERSION_C
  1172. *
  1173. * Comment this to disable run-time checking and save ROM space
  1174. */
  1175. #define MBEDTLS_VERSION_FEATURES
  1176. /**
  1177. * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
  1178. *
  1179. * If set, the X509 parser will not break-off when parsing an X509 certificate
  1180. * and encountering an extension in a v1 or v2 certificate.
  1181. *
  1182. * Uncomment to prevent an error.
  1183. */
  1184. //#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
  1185. /**
  1186. * \def MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
  1187. *
  1188. * If set, the X509 parser will not break-off when parsing an X509 certificate
  1189. * and encountering an unknown critical extension.
  1190. *
  1191. * \warning Depending on your PKI use, enabling this can be a security risk!
  1192. *
  1193. * Uncomment to prevent an error.
  1194. */
  1195. //#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
  1196. /**
  1197. * \def MBEDTLS_X509_CHECK_KEY_USAGE
  1198. *
  1199. * Enable verification of the keyUsage extension (CA and leaf certificates).
  1200. *
  1201. * Disabling this avoids problems with mis-issued and/or misused
  1202. * (intermediate) CA and leaf certificates.
  1203. *
  1204. * \warning Depending on your PKI use, disabling this can be a security risk!
  1205. *
  1206. * Comment to skip keyUsage checking for both CA and leaf certificates.
  1207. */
  1208. #define MBEDTLS_X509_CHECK_KEY_USAGE
  1209. /**
  1210. * \def MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
  1211. *
  1212. * Enable verification of the extendedKeyUsage extension (leaf certificates).
  1213. *
  1214. * Disabling this avoids problems with mis-issued and/or misused certificates.
  1215. *
  1216. * \warning Depending on your PKI use, disabling this can be a security risk!
  1217. *
  1218. * Comment to skip extendedKeyUsage checking for certificates.
  1219. */
  1220. #define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
  1221. /**
  1222. * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT
  1223. *
  1224. * Enable parsing and verification of X.509 certificates, CRLs and CSRS
  1225. * signed with RSASSA-PSS (aka PKCS#1 v2.1).
  1226. *
  1227. * Comment this macro to disallow using RSASSA-PSS in certificates.
  1228. */
  1229. #define MBEDTLS_X509_RSASSA_PSS_SUPPORT
  1230. /**
  1231. * \def MBEDTLS_ZLIB_SUPPORT
  1232. *
  1233. * If set, the SSL/TLS module uses ZLIB to support compression and
  1234. * decompression of packet data.
  1235. *
  1236. * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
  1237. * CRIME attack. Before enabling this option, you should examine with care if
  1238. * CRIME or similar exploits may be a applicable to your use case.
  1239. *
  1240. * \note Currently compression can't be used with DTLS.
  1241. *
  1242. * Used in: library/ssl_tls.c
  1243. * library/ssl_cli.c
  1244. * library/ssl_srv.c
  1245. *
  1246. * This feature requires zlib library and headers to be present.
  1247. *
  1248. * Uncomment to enable use of ZLIB
  1249. */
  1250. //#define MBEDTLS_ZLIB_SUPPORT
  1251. /* \} name SECTION: mbed TLS feature support */
  1252. /**
  1253. * \name SECTION: mbed TLS modules
  1254. *
  1255. * This section enables or disables entire modules in mbed TLS
  1256. * \{
  1257. */
  1258. /**
  1259. * \def MBEDTLS_AESNI_C
  1260. *
  1261. * Enable AES-NI support on x86-64.
  1262. *
  1263. * Module: library/aesni.c
  1264. * Caller: library/aes.c
  1265. *
  1266. * Requires: MBEDTLS_HAVE_ASM
  1267. *
  1268. * This modules adds support for the AES-NI instructions on x86-64
  1269. */
  1270. #define MBEDTLS_AESNI_C
  1271. /**
  1272. * \def MBEDTLS_AES_C
  1273. *
  1274. * Enable the AES block cipher.
  1275. *
  1276. * Module: library/aes.c
  1277. * Caller: library/ssl_tls.c
  1278. * library/pem.c
  1279. * library/ctr_drbg.c
  1280. *
  1281. * This module enables the following ciphersuites (if other requisites are
  1282. * enabled as well):
  1283. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
  1284. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
  1285. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
  1286. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
  1287. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
  1288. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
  1289. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
  1290. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
  1291. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
  1292. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
  1293. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
  1294. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
  1295. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  1296. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  1297. * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
  1298. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
  1299. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
  1300. * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
  1301. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  1302. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
  1303. * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
  1304. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  1305. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  1306. * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
  1307. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  1308. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  1309. * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
  1310. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  1311. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  1312. * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
  1313. * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
  1314. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
  1315. * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
  1316. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
  1317. * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
  1318. * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
  1319. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
  1320. * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
  1321. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
  1322. * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
  1323. * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
  1324. * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
  1325. * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
  1326. * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
  1327. * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
  1328. * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
  1329. * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
  1330. * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
  1331. * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
  1332. * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
  1333. * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
  1334. * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
  1335. * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
  1336. * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
  1337. * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
  1338. * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
  1339. * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
  1340. * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
  1341. *
  1342. * PEM_PARSE uses AES for decrypting encrypted keys.
  1343. */
  1344. #define MBEDTLS_AES_C
  1345. /**
  1346. * \def MBEDTLS_ARC4_C
  1347. *
  1348. * Enable the ARCFOUR stream cipher.
  1349. *
  1350. * Module: library/arc4.c
  1351. * Caller: library/ssl_tls.c
  1352. *
  1353. * This module enables the following ciphersuites (if other requisites are
  1354. * enabled as well):
  1355. * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
  1356. * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
  1357. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
  1358. * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
  1359. * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
  1360. * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
  1361. * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
  1362. * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
  1363. * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
  1364. * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
  1365. */
  1366. #define MBEDTLS_ARC4_C
  1367. /**
  1368. * \def MBEDTLS_ASN1_PARSE_C
  1369. *
  1370. * Enable the generic ASN1 parser.
  1371. *
  1372. * Module: library/asn1.c
  1373. * Caller: library/x509.c
  1374. * library/dhm.c
  1375. * library/pkcs12.c
  1376. * library/pkcs5.c
  1377. * library/pkparse.c
  1378. */
  1379. #define MBEDTLS_ASN1_PARSE_C
  1380. /**
  1381. * \def MBEDTLS_ASN1_WRITE_C
  1382. *
  1383. * Enable the generic ASN1 writer.
  1384. *
  1385. * Module: library/asn1write.c
  1386. * Caller: library/ecdsa.c
  1387. * library/pkwrite.c
  1388. * library/x509_create.c
  1389. * library/x509write_crt.c
  1390. * library/mbedtls_x509write_csr.c
  1391. */
  1392. #define MBEDTLS_ASN1_WRITE_C
  1393. /**
  1394. * \def MBEDTLS_BASE64_C
  1395. *
  1396. * Enable the Base64 module.
  1397. *
  1398. * Module: library/base64.c
  1399. * Caller: library/pem.c
  1400. *
  1401. * This module is required for PEM support (required by X.509).
  1402. */
  1403. #define MBEDTLS_BASE64_C
  1404. /**
  1405. * \def MBEDTLS_BIGNUM_C
  1406. *
  1407. * Enable the multi-precision integer library.
  1408. *
  1409. * Module: library/bignum.c
  1410. * Caller: library/dhm.c
  1411. * library/ecp.c
  1412. * library/ecdsa.c
  1413. * library/rsa.c
  1414. * library/ssl_tls.c
  1415. *
  1416. * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
  1417. */
  1418. #define MBEDTLS_BIGNUM_C
  1419. /**
  1420. * \def MBEDTLS_BLOWFISH_C
  1421. *
  1422. * Enable the Blowfish block cipher.
  1423. *
  1424. * Module: library/blowfish.c
  1425. */
  1426. #define MBEDTLS_BLOWFISH_C
  1427. /**
  1428. * \def MBEDTLS_CAMELLIA_C
  1429. *
  1430. * Enable the Camellia block cipher.
  1431. *
  1432. * Module: library/camellia.c
  1433. * Caller: library/ssl_tls.c
  1434. *
  1435. * This module enables the following ciphersuites (if other requisites are
  1436. * enabled as well):
  1437. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
  1438. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
  1439. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
  1440. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
  1441. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
  1442. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
  1443. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
  1444. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
  1445. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
  1446. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
  1447. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
  1448. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
  1449. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
  1450. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
  1451. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
  1452. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
  1453. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
  1454. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
  1455. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
  1456. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
  1457. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
  1458. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
  1459. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
  1460. * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
  1461. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
  1462. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
  1463. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
  1464. * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
  1465. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
  1466. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
  1467. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
  1468. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
  1469. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
  1470. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
  1471. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
  1472. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
  1473. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
  1474. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
  1475. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
  1476. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
  1477. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
  1478. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
  1479. */
  1480. #define MBEDTLS_CAMELLIA_C
  1481. /**
  1482. * \def MBEDTLS_CCM_C
  1483. *
  1484. * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
  1485. *
  1486. * Module: library/ccm.c
  1487. *
  1488. * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
  1489. *
  1490. * This module enables the AES-CCM ciphersuites, if other requisites are
  1491. * enabled as well.
  1492. */
  1493. #define MBEDTLS_CCM_C
  1494. /**
  1495. * \def MBEDTLS_CERTS_C
  1496. *
  1497. * Enable the test certificates.
  1498. *
  1499. * Module: library/certs.c
  1500. * Caller:
  1501. *
  1502. * This module is used for testing (ssl_client/server).
  1503. */
  1504. #define MBEDTLS_CERTS_C
  1505. /**
  1506. * \def MBEDTLS_CIPHER_C
  1507. *
  1508. * Enable the generic cipher layer.
  1509. *
  1510. * Module: library/cipher.c
  1511. * Caller: library/ssl_tls.c
  1512. *
  1513. * Uncomment to enable generic cipher wrappers.
  1514. */
  1515. #define MBEDTLS_CIPHER_C
  1516. /**
  1517. * \def MBEDTLS_CTR_DRBG_C
  1518. *
  1519. * Enable the CTR_DRBG AES-256-based random generator.
  1520. *
  1521. * Module: library/ctr_drbg.c
  1522. * Caller:
  1523. *
  1524. * Requires: MBEDTLS_AES_C
  1525. *
  1526. * This module provides the CTR_DRBG AES-256 random number generator.
  1527. */
  1528. #define MBEDTLS_CTR_DRBG_C
  1529. /**
  1530. * \def MBEDTLS_DEBUG_C
  1531. *
  1532. * Enable the debug functions.
  1533. *
  1534. * Module: library/debug.c
  1535. * Caller: library/ssl_cli.c
  1536. * library/ssl_srv.c
  1537. * library/ssl_tls.c
  1538. *
  1539. * This module provides debugging functions.
  1540. */
  1541. #define MBEDTLS_DEBUG_C
  1542. /**
  1543. * \def MBEDTLS_DES_C
  1544. *
  1545. * Enable the DES block cipher.
  1546. *
  1547. * Module: library/des.c
  1548. * Caller: library/pem.c
  1549. * library/ssl_tls.c
  1550. *
  1551. * This module enables the following ciphersuites (if other requisites are
  1552. * enabled as well):
  1553. * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
  1554. * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
  1555. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
  1556. * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
  1557. * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
  1558. * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
  1559. * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
  1560. * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
  1561. * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
  1562. * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
  1563. *
  1564. * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
  1565. */
  1566. #define MBEDTLS_DES_C
  1567. /**
  1568. * \def MBEDTLS_DHM_C
  1569. *
  1570. * Enable the Diffie-Hellman-Merkle module.
  1571. *
  1572. * Module: library/dhm.c
  1573. * Caller: library/ssl_cli.c
  1574. * library/ssl_srv.c
  1575. *
  1576. * This module is used by the following key exchanges:
  1577. * DHE-RSA, DHE-PSK
  1578. */
  1579. #define MBEDTLS_DHM_C
  1580. /**
  1581. * \def MBEDTLS_ECDH_C
  1582. *
  1583. * Enable the elliptic curve Diffie-Hellman library.
  1584. *
  1585. * Module: library/ecdh.c
  1586. * Caller: library/ssl_cli.c
  1587. * library/ssl_srv.c
  1588. *
  1589. * This module is used by the following key exchanges:
  1590. * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
  1591. *
  1592. * Requires: MBEDTLS_ECP_C
  1593. */
  1594. #define MBEDTLS_ECDH_C
  1595. /**
  1596. * \def MBEDTLS_ECDSA_C
  1597. *
  1598. * Enable the elliptic curve DSA library.
  1599. *
  1600. * Module: library/ecdsa.c
  1601. * Caller:
  1602. *
  1603. * This module is used by the following key exchanges:
  1604. * ECDHE-ECDSA
  1605. *
  1606. * Requires: MBEDTLS_ECP_C, MBEDTLS_ASN1_WRITE_C, MBEDTLS_ASN1_PARSE_C
  1607. */
  1608. #define MBEDTLS_ECDSA_C
  1609. /**
  1610. * \def MBEDTLS_ECJPAKE_C
  1611. *
  1612. * Enable the elliptic curve J-PAKE library.
  1613. *
  1614. * \warning This is currently experimental. EC J-PAKE support is based on the
  1615. * Thread v1.0.0 specification; incompatible changes to the specification
  1616. * might still happen. For this reason, this is disabled by default.
  1617. *
  1618. * Module: library/ecjpake.c
  1619. * Caller:
  1620. *
  1621. * This module is used by the following key exchanges:
  1622. * ECJPAKE
  1623. *
  1624. * Requires: MBEDTLS_ECP_C, MBEDTLS_MD_C
  1625. */
  1626. //#define MBEDTLS_ECJPAKE_C
  1627. /**
  1628. * \def MBEDTLS_ECP_C
  1629. *
  1630. * Enable the elliptic curve over GF(p) library.
  1631. *
  1632. * Module: library/ecp.c
  1633. * Caller: library/ecdh.c
  1634. * library/ecdsa.c
  1635. * library/ecjpake.c
  1636. *
  1637. * Requires: MBEDTLS_BIGNUM_C and at least one MBEDTLS_ECP_DP_XXX_ENABLED
  1638. */
  1639. #define MBEDTLS_ECP_C
  1640. /**
  1641. * \def MBEDTLS_ENTROPY_C
  1642. *
  1643. * Enable the platform-specific entropy code.
  1644. *
  1645. * Module: library/entropy.c
  1646. * Caller:
  1647. *
  1648. * Requires: MBEDTLS_SHA512_C or MBEDTLS_SHA256_C
  1649. *
  1650. * This module provides a generic entropy pool
  1651. */
  1652. #define MBEDTLS_ENTROPY_C
  1653. /**
  1654. * \def MBEDTLS_ERROR_C
  1655. *
  1656. * Enable error code to error string conversion.
  1657. *
  1658. * Module: library/error.c
  1659. * Caller:
  1660. *
  1661. * This module enables mbedtls_strerror().
  1662. */
  1663. #define MBEDTLS_ERROR_C
  1664. /**
  1665. * \def MBEDTLS_GCM_C
  1666. *
  1667. * Enable the Galois/Counter Mode (GCM) for AES.
  1668. *
  1669. * Module: library/gcm.c
  1670. *
  1671. * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
  1672. *
  1673. * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
  1674. * requisites are enabled as well.
  1675. */
  1676. #define MBEDTLS_GCM_C
  1677. /**
  1678. * \def MBEDTLS_HAVEGE_C
  1679. *
  1680. * Enable the HAVEGE random generator.
  1681. *
  1682. * Warning: the HAVEGE random generator is not suitable for virtualized
  1683. * environments
  1684. *
  1685. * Warning: the HAVEGE random generator is dependent on timing and specific
  1686. * processor traits. It is therefore not advised to use HAVEGE as
  1687. * your applications primary random generator or primary entropy pool
  1688. * input. As a secondary input to your entropy pool, it IS able add
  1689. * the (limited) extra entropy it provides.
  1690. *
  1691. * Module: library/havege.c
  1692. * Caller:
  1693. *
  1694. * Requires: MBEDTLS_TIMING_C
  1695. *
  1696. * Uncomment to enable the HAVEGE random generator.
  1697. */
  1698. //#define MBEDTLS_HAVEGE_C
  1699. /**
  1700. * \def MBEDTLS_HMAC_DRBG_C
  1701. *
  1702. * Enable the HMAC_DRBG random generator.
  1703. *
  1704. * Module: library/hmac_drbg.c
  1705. * Caller:
  1706. *
  1707. * Requires: MBEDTLS_MD_C
  1708. *
  1709. * Uncomment to enable the HMAC_DRBG random number geerator.
  1710. */
  1711. #define MBEDTLS_HMAC_DRBG_C
  1712. /**
  1713. * \def MBEDTLS_MD_C
  1714. *
  1715. * Enable the generic message digest layer.
  1716. *
  1717. * Module: library/mbedtls_md.c
  1718. * Caller:
  1719. *
  1720. * Uncomment to enable generic message digest wrappers.
  1721. */
  1722. #define MBEDTLS_MD_C
  1723. /**
  1724. * \def MBEDTLS_MD2_C
  1725. *
  1726. * Enable the MD2 hash algorithm.
  1727. *
  1728. * Module: library/mbedtls_md2.c
  1729. * Caller:
  1730. *
  1731. * Uncomment to enable support for (rare) MD2-signed X.509 certs.
  1732. */
  1733. //#define MBEDTLS_MD2_C
  1734. /**
  1735. * \def MBEDTLS_MD4_C
  1736. *
  1737. * Enable the MD4 hash algorithm.
  1738. *
  1739. * Module: library/mbedtls_md4.c
  1740. * Caller:
  1741. *
  1742. * Uncomment to enable support for (rare) MD4-signed X.509 certs.
  1743. */
  1744. //#define MBEDTLS_MD4_C
  1745. /**
  1746. * \def MBEDTLS_MD5_C
  1747. *
  1748. * Enable the MD5 hash algorithm.
  1749. *
  1750. * Module: library/mbedtls_md5.c
  1751. * Caller: library/mbedtls_md.c
  1752. * library/pem.c
  1753. * library/ssl_tls.c
  1754. *
  1755. * This module is required for SSL/TLS and X.509.
  1756. * PEM_PARSE uses MD5 for decrypting encrypted keys.
  1757. */
  1758. #define MBEDTLS_MD5_C
  1759. /**
  1760. * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C
  1761. *
  1762. * Enable the buffer allocator implementation that makes use of a (stack)
  1763. * based buffer to 'allocate' dynamic memory. (replaces calloc() and free()
  1764. * calls)
  1765. *
  1766. * Module: library/memory_buffer_alloc.c
  1767. *
  1768. * Requires: MBEDTLS_PLATFORM_C
  1769. * MBEDTLS_PLATFORM_MEMORY (to use it within mbed TLS)
  1770. *
  1771. * Enable this module to enable the buffer memory allocator.
  1772. */
  1773. //#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
  1774. /**
  1775. * \def MBEDTLS_NET_C
  1776. *
  1777. * Enable the TCP/IP networking routines.
  1778. *
  1779. * Module: library/net.c
  1780. *
  1781. * This module provides TCP/IP networking routines.
  1782. */
  1783. #define MBEDTLS_NET_C
  1784. /**
  1785. * \def MBEDTLS_OID_C
  1786. *
  1787. * Enable the OID database.
  1788. *
  1789. * Module: library/oid.c
  1790. * Caller: library/asn1write.c
  1791. * library/pkcs5.c
  1792. * library/pkparse.c
  1793. * library/pkwrite.c
  1794. * library/rsa.c
  1795. * library/x509.c
  1796. * library/x509_create.c
  1797. * library/mbedtls_x509_crl.c
  1798. * library/mbedtls_x509_crt.c
  1799. * library/mbedtls_x509_csr.c
  1800. * library/x509write_crt.c
  1801. * library/mbedtls_x509write_csr.c
  1802. *
  1803. * This modules translates between OIDs and internal values.
  1804. */
  1805. #define MBEDTLS_OID_C
  1806. /**
  1807. * \def MBEDTLS_PADLOCK_C
  1808. *
  1809. * Enable VIA Padlock support on x86.
  1810. *
  1811. * Module: library/padlock.c
  1812. * Caller: library/aes.c
  1813. *
  1814. * Requires: MBEDTLS_HAVE_ASM
  1815. *
  1816. * This modules adds support for the VIA PadLock on x86.
  1817. */
  1818. #define MBEDTLS_PADLOCK_C
  1819. /**
  1820. * \def MBEDTLS_PEM_PARSE_C
  1821. *
  1822. * Enable PEM decoding / parsing.
  1823. *
  1824. * Module: library/pem.c
  1825. * Caller: library/dhm.c
  1826. * library/pkparse.c
  1827. * library/mbedtls_x509_crl.c
  1828. * library/mbedtls_x509_crt.c
  1829. * library/mbedtls_x509_csr.c
  1830. *
  1831. * Requires: MBEDTLS_BASE64_C
  1832. *
  1833. * This modules adds support for decoding / parsing PEM files.
  1834. */
  1835. #define MBEDTLS_PEM_PARSE_C
  1836. /**
  1837. * \def MBEDTLS_PEM_WRITE_C
  1838. *
  1839. * Enable PEM encoding / writing.
  1840. *
  1841. * Module: library/pem.c
  1842. * Caller: library/pkwrite.c
  1843. * library/x509write_crt.c
  1844. * library/mbedtls_x509write_csr.c
  1845. *
  1846. * Requires: MBEDTLS_BASE64_C
  1847. *
  1848. * This modules adds support for encoding / writing PEM files.
  1849. */
  1850. #define MBEDTLS_PEM_WRITE_C
  1851. /**
  1852. * \def MBEDTLS_PK_C
  1853. *
  1854. * Enable the generic public (asymetric) key layer.
  1855. *
  1856. * Module: library/pk.c
  1857. * Caller: library/ssl_tls.c
  1858. * library/ssl_cli.c
  1859. * library/ssl_srv.c
  1860. *
  1861. * Requires: MBEDTLS_RSA_C or MBEDTLS_ECP_C
  1862. *
  1863. * Uncomment to enable generic public key wrappers.
  1864. */
  1865. #define MBEDTLS_PK_C
  1866. /**
  1867. * \def MBEDTLS_PK_PARSE_C
  1868. *
  1869. * Enable the generic public (asymetric) key parser.
  1870. *
  1871. * Module: library/pkparse.c
  1872. * Caller: library/mbedtls_x509_crt.c
  1873. * library/mbedtls_x509_csr.c
  1874. *
  1875. * Requires: MBEDTLS_PK_C
  1876. *
  1877. * Uncomment to enable generic public key parse functions.
  1878. */
  1879. #define MBEDTLS_PK_PARSE_C
  1880. /**
  1881. * \def MBEDTLS_PK_WRITE_C
  1882. *
  1883. * Enable the generic public (asymetric) key writer.
  1884. *
  1885. * Module: library/pkwrite.c
  1886. * Caller: library/x509write.c
  1887. *
  1888. * Requires: MBEDTLS_PK_C
  1889. *
  1890. * Uncomment to enable generic public key write functions.
  1891. */
  1892. #define MBEDTLS_PK_WRITE_C
  1893. /**
  1894. * \def MBEDTLS_PKCS5_C
  1895. *
  1896. * Enable PKCS#5 functions.
  1897. *
  1898. * Module: library/pkcs5.c
  1899. *
  1900. * Requires: MBEDTLS_MD_C
  1901. *
  1902. * This module adds support for the PKCS#5 functions.
  1903. */
  1904. #define MBEDTLS_PKCS5_C
  1905. /**
  1906. * \def MBEDTLS_PKCS11_C
  1907. *
  1908. * Enable wrapper for PKCS#11 smartcard support.
  1909. *
  1910. * Module: library/pkcs11.c
  1911. * Caller: library/pk.c
  1912. *
  1913. * Requires: MBEDTLS_PK_C
  1914. *
  1915. * This module enables SSL/TLS PKCS #11 smartcard support.
  1916. * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
  1917. */
  1918. //#define MBEDTLS_PKCS11_C
  1919. /**
  1920. * \def MBEDTLS_PKCS12_C
  1921. *
  1922. * Enable PKCS#12 PBE functions.
  1923. * Adds algorithms for parsing PKCS#8 encrypted private keys
  1924. *
  1925. * Module: library/pkcs12.c
  1926. * Caller: library/pkparse.c
  1927. *
  1928. * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C, MBEDTLS_MD_C
  1929. * Can use: MBEDTLS_ARC4_C
  1930. *
  1931. * This module enables PKCS#12 functions.
  1932. */
  1933. #define MBEDTLS_PKCS12_C
  1934. /**
  1935. * \def MBEDTLS_PLATFORM_C
  1936. *
  1937. * Enable the platform abstraction layer that allows you to re-assign
  1938. * functions like calloc(), free(), snprintf(), printf(), fprintf(), exit().
  1939. *
  1940. * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT
  1941. * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
  1942. * above to be specified at runtime or compile time respectively.
  1943. *
  1944. * \note This abstraction layer must be enabled on Windows (including MSYS2)
  1945. * as other module rely on it for a fixed snprintf implementation.
  1946. *
  1947. * Module: library/platform.c
  1948. * Caller: Most other .c files
  1949. *
  1950. * This module enables abstraction of common (libc) functions.
  1951. */
  1952. #define MBEDTLS_PLATFORM_C
  1953. /**
  1954. * \def MBEDTLS_RIPEMD160_C
  1955. *
  1956. * Enable the RIPEMD-160 hash algorithm.
  1957. *
  1958. * Module: library/mbedtls_ripemd160.c
  1959. * Caller: library/mbedtls_md.c
  1960. *
  1961. */
  1962. #define MBEDTLS_RIPEMD160_C
  1963. /**
  1964. * \def MBEDTLS_RSA_C
  1965. *
  1966. * Enable the RSA public-key cryptosystem.
  1967. *
  1968. * Module: library/rsa.c
  1969. * Caller: library/ssl_cli.c
  1970. * library/ssl_srv.c
  1971. * library/ssl_tls.c
  1972. * library/x509.c
  1973. *
  1974. * This module is used by the following key exchanges:
  1975. * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
  1976. *
  1977. * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C
  1978. */
  1979. #define MBEDTLS_RSA_C
  1980. /**
  1981. * \def MBEDTLS_SHA1_C
  1982. *
  1983. * Enable the SHA1 cryptographic hash algorithm.
  1984. *
  1985. * Module: library/mbedtls_sha1.c
  1986. * Caller: library/mbedtls_md.c
  1987. * library/ssl_cli.c
  1988. * library/ssl_srv.c
  1989. * library/ssl_tls.c
  1990. * library/x509write_crt.c
  1991. *
  1992. * This module is required for SSL/TLS and SHA1-signed certificates.
  1993. */
  1994. #define MBEDTLS_SHA1_C
  1995. /**
  1996. * \def MBEDTLS_SHA256_C
  1997. *
  1998. * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
  1999. *
  2000. * Module: library/mbedtls_sha256.c
  2001. * Caller: library/entropy.c
  2002. * library/mbedtls_md.c
  2003. * library/ssl_cli.c
  2004. * library/ssl_srv.c
  2005. * library/ssl_tls.c
  2006. *
  2007. * This module adds support for SHA-224 and SHA-256.
  2008. * This module is required for the SSL/TLS 1.2 PRF function.
  2009. */
  2010. #define MBEDTLS_SHA256_C
  2011. /**
  2012. * \def MBEDTLS_SHA512_C
  2013. *
  2014. * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
  2015. *
  2016. * Module: library/mbedtls_sha512.c
  2017. * Caller: library/entropy.c
  2018. * library/mbedtls_md.c
  2019. * library/ssl_cli.c
  2020. * library/ssl_srv.c
  2021. *
  2022. * This module adds support for SHA-384 and SHA-512.
  2023. */
  2024. #define MBEDTLS_SHA512_C
  2025. /**
  2026. * \def MBEDTLS_SSL_CACHE_C
  2027. *
  2028. * Enable simple SSL cache implementation.
  2029. *
  2030. * Module: library/ssl_cache.c
  2031. * Caller:
  2032. *
  2033. * Requires: MBEDTLS_SSL_CACHE_C
  2034. */
  2035. #define MBEDTLS_SSL_CACHE_C
  2036. /**
  2037. * \def MBEDTLS_SSL_COOKIE_C
  2038. *
  2039. * Enable basic implementation of DTLS cookies for hello verification.
  2040. *
  2041. * Module: library/ssl_cookie.c
  2042. * Caller:
  2043. */
  2044. #define MBEDTLS_SSL_COOKIE_C
  2045. /**
  2046. * \def MBEDTLS_SSL_TICKET_C
  2047. *
  2048. * Enable an implementation of TLS server-side callbacks for session tickets.
  2049. *
  2050. * Module: library/ssl_ticket.c
  2051. * Caller:
  2052. *
  2053. * Requires: MBEDTLS_CIPHER_C
  2054. */
  2055. #define MBEDTLS_SSL_TICKET_C
  2056. /**
  2057. * \def MBEDTLS_SSL_CLI_C
  2058. *
  2059. * Enable the SSL/TLS client code.
  2060. *
  2061. * Module: library/ssl_cli.c
  2062. * Caller:
  2063. *
  2064. * Requires: MBEDTLS_SSL_TLS_C
  2065. *
  2066. * This module is required for SSL/TLS client support.
  2067. */
  2068. #define MBEDTLS_SSL_CLI_C
  2069. /**
  2070. * \def MBEDTLS_SSL_SRV_C
  2071. *
  2072. * Enable the SSL/TLS server code.
  2073. *
  2074. * Module: library/ssl_srv.c
  2075. * Caller:
  2076. *
  2077. * Requires: MBEDTLS_SSL_TLS_C
  2078. *
  2079. * This module is required for SSL/TLS server support.
  2080. */
  2081. #define MBEDTLS_SSL_SRV_C
  2082. /**
  2083. * \def MBEDTLS_SSL_TLS_C
  2084. *
  2085. * Enable the generic SSL/TLS code.
  2086. *
  2087. * Module: library/ssl_tls.c
  2088. * Caller: library/ssl_cli.c
  2089. * library/ssl_srv.c
  2090. *
  2091. * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C
  2092. * and at least one of the MBEDTLS_SSL_PROTO_XXX defines
  2093. *
  2094. * This module is required for SSL/TLS.
  2095. */
  2096. #define MBEDTLS_SSL_TLS_C
  2097. /**
  2098. * \def MBEDTLS_THREADING_C
  2099. *
  2100. * Enable the threading abstraction layer.
  2101. * By default mbed TLS assumes it is used in a non-threaded environment or that
  2102. * contexts are not shared between threads. If you do intend to use contexts
  2103. * between threads, you will need to enable this layer to prevent race
  2104. * conditions.
  2105. *
  2106. * Module: library/threading.c
  2107. *
  2108. * This allows different threading implementations (self-implemented or
  2109. * provided).
  2110. *
  2111. * You will have to enable either MBEDTLS_THREADING_ALT or
  2112. * MBEDTLS_THREADING_PTHREAD.
  2113. *
  2114. * Enable this layer to allow use of mutexes within mbed TLS
  2115. */
  2116. //#define MBEDTLS_THREADING_C
  2117. /**
  2118. * \def MBEDTLS_TIMING_C
  2119. *
  2120. * Enable the portable timing interface.
  2121. *
  2122. * Module: library/timing.c
  2123. * Caller: library/havege.c
  2124. *
  2125. * This module is used by the HAVEGE random number generator.
  2126. */
  2127. #define MBEDTLS_TIMING_C
  2128. /**
  2129. * \def MBEDTLS_VERSION_C
  2130. *
  2131. * Enable run-time version information.
  2132. *
  2133. * Module: library/version.c
  2134. *
  2135. * This module provides run-time version information.
  2136. */
  2137. #define MBEDTLS_VERSION_C
  2138. /**
  2139. * \def MBEDTLS_X509_USE_C
  2140. *
  2141. * Enable X.509 core for using certificates.
  2142. *
  2143. * Module: library/x509.c
  2144. * Caller: library/mbedtls_x509_crl.c
  2145. * library/mbedtls_x509_crt.c
  2146. * library/mbedtls_x509_csr.c
  2147. *
  2148. * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C,
  2149. * MBEDTLS_PK_PARSE_C
  2150. *
  2151. * This module is required for the X.509 parsing modules.
  2152. */
  2153. #define MBEDTLS_X509_USE_C
  2154. /**
  2155. * \def MBEDTLS_X509_CRT_PARSE_C
  2156. *
  2157. * Enable X.509 certificate parsing.
  2158. *
  2159. * Module: library/mbedtls_x509_crt.c
  2160. * Caller: library/ssl_cli.c
  2161. * library/ssl_srv.c
  2162. * library/ssl_tls.c
  2163. *
  2164. * Requires: MBEDTLS_X509_USE_C
  2165. *
  2166. * This module is required for X.509 certificate parsing.
  2167. */
  2168. #define MBEDTLS_X509_CRT_PARSE_C
  2169. /**
  2170. * \def MBEDTLS_X509_CRL_PARSE_C
  2171. *
  2172. * Enable X.509 CRL parsing.
  2173. *
  2174. * Module: library/mbedtls_x509_crl.c
  2175. * Caller: library/mbedtls_x509_crt.c
  2176. *
  2177. * Requires: MBEDTLS_X509_USE_C
  2178. *
  2179. * This module is required for X.509 CRL parsing.
  2180. */
  2181. #define MBEDTLS_X509_CRL_PARSE_C
  2182. /**
  2183. * \def MBEDTLS_X509_CSR_PARSE_C
  2184. *
  2185. * Enable X.509 Certificate Signing Request (CSR) parsing.
  2186. *
  2187. * Module: library/mbedtls_x509_csr.c
  2188. * Caller: library/x509_crt_write.c
  2189. *
  2190. * Requires: MBEDTLS_X509_USE_C
  2191. *
  2192. * This module is used for reading X.509 certificate request.
  2193. */
  2194. #define MBEDTLS_X509_CSR_PARSE_C
  2195. /**
  2196. * \def MBEDTLS_X509_CREATE_C
  2197. *
  2198. * Enable X.509 core for creating certificates.
  2199. *
  2200. * Module: library/x509_create.c
  2201. *
  2202. * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_WRITE_C
  2203. *
  2204. * This module is the basis for creating X.509 certificates and CSRs.
  2205. */
  2206. #define MBEDTLS_X509_CREATE_C
  2207. /**
  2208. * \def MBEDTLS_X509_CRT_WRITE_C
  2209. *
  2210. * Enable creating X.509 certificates.
  2211. *
  2212. * Module: library/x509_crt_write.c
  2213. *
  2214. * Requires: MBEDTLS_X509_CREATE_C
  2215. *
  2216. * This module is required for X.509 certificate creation.
  2217. */
  2218. #define MBEDTLS_X509_CRT_WRITE_C
  2219. /**
  2220. * \def MBEDTLS_X509_CSR_WRITE_C
  2221. *
  2222. * Enable creating X.509 Certificate Signing Requests (CSR).
  2223. *
  2224. * Module: library/x509_csr_write.c
  2225. *
  2226. * Requires: MBEDTLS_X509_CREATE_C
  2227. *
  2228. * This module is required for X.509 certificate request writing.
  2229. */
  2230. #define MBEDTLS_X509_CSR_WRITE_C
  2231. /**
  2232. * \def MBEDTLS_XTEA_C
  2233. *
  2234. * Enable the XTEA block cipher.
  2235. *
  2236. * Module: library/xtea.c
  2237. * Caller:
  2238. */
  2239. #define MBEDTLS_XTEA_C
  2240. /* \} name SECTION: mbed TLS modules */
  2241. /**
  2242. * \name SECTION: Module configuration options
  2243. *
  2244. * This section allows for the setting of module specific sizes and
  2245. * configuration options. The default values are already present in the
  2246. * relevant header files and should suffice for the regular use cases.
  2247. *
  2248. * Our advice is to enable options and change their values here
  2249. * only if you have a good reason and know the consequences.
  2250. *
  2251. * Please check the respective header file for documentation on these
  2252. * parameters (to prevent duplicate documentation).
  2253. * \{
  2254. */
  2255. /* MPI / BIGNUM options */
  2256. //#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
  2257. //#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
  2258. /* CTR_DRBG options */
  2259. //#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
  2260. //#define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
  2261. //#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
  2262. //#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
  2263. //#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
  2264. /* HMAC_DRBG options */
  2265. //#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
  2266. //#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
  2267. //#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
  2268. //#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
  2269. /* ECP options */
  2270. //#define MBEDTLS_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
  2271. //#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
  2272. //#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
  2273. /* Entropy options */
  2274. //#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
  2275. //#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
  2276. /* Memory buffer allocator options */
  2277. //#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
  2278. /* Platform options */
  2279. //#define MBEDTLS_PLATFORM_STD_MEM_HDR <stdlib.h> /**< Header to include if MBEDTLS_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */
  2280. //#define MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use, can be undefined */
  2281. //#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
  2282. //#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
  2283. //#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
  2284. //#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
  2285. /* Note: your snprintf must correclty zero-terminate the buffer! */
  2286. //#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
  2287. /* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */
  2288. /* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */
  2289. //#define MBEDTLS_PLATFORM_CALLOC_MACRO calloc /**< Default allocator macro to use, can be undefined */
  2290. //#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
  2291. //#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
  2292. //#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
  2293. //#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
  2294. /* Note: your snprintf must correclty zero-terminate the buffer! */
  2295. //#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
  2296. /* SSL Cache options */
  2297. //#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
  2298. //#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
  2299. /* SSL options */
  2300. //#define MBEDTLS_SSL_MAX_CONTENT_LEN 16384 /**< Maxium fragment length in bytes, determines the size of each of the two internal I/O buffers */
  2301. //#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
  2302. //#define MBEDTLS_PSK_MAX_LEN 32 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
  2303. //#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */
  2304. /**
  2305. * Complete list of ciphersuites to use, in order of preference.
  2306. *
  2307. * \warning No dependency checking is done on that field! This option can only
  2308. * be used to restrict the set of available ciphersuites. It is your
  2309. * responsibility to make sure the needed modules are active.
  2310. *
  2311. * Use this to save a few hundred bytes of ROM (default ordering of all
  2312. * available ciphersuites) and a few to a few hundred bytes of RAM.
  2313. *
  2314. * The value below is only an example, not the default.
  2315. */
  2316. //#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  2317. /* X509 options */
  2318. //#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
  2319. /* \} name SECTION: Module configuration options */
  2320. #if defined(TARGET_LIKE_MBED)
  2321. #include "mbedtls/target_config.h"
  2322. #endif
  2323. /*
  2324. * Allow user to override any previous default.
  2325. *
  2326. * Use two macro names for that, as:
  2327. * - with yotta the prefix YOTTA_CFG_ is forced
  2328. * - without yotta is looks weird to have a YOTTA prefix.
  2329. */
  2330. #if defined(YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE)
  2331. #include YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE
  2332. #elif defined(MBEDTLS_USER_CONFIG_FILE)
  2333. #include MBEDTLS_USER_CONFIG_FILE
  2334. #endif
  2335. #include "check_config.h"
  2336. #endif /* MBEDTLS_CONFIG_H */