nrf_dtls_config.h 110 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345
  1. /**
  2. * \file nrf_dtls_config.h
  3. *
  4. * \brief Configuration options (set of defines)
  5. *
  6. * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
  7. * Copyright (C) 2015 Nordic Semiconductor ASA, All Rights Reserved
  8. * SPDX-License-Identifier: Apache-2.0
  9. *
  10. * Licensed under the Apache License, Version 2.0 (the "License"); you may
  11. * not use this file except in compliance with the License.
  12. * You may obtain a copy of the License at
  13. *
  14. * http://www.apache.org/licenses/LICENSE-2.0
  15. *
  16. * Unless required by applicable law or agreed to in writing, software
  17. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  18. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  19. * See the License for the specific language governing permissions and
  20. * limitations under the License.
  21. *
  22. * This file is part of mbed TLS (https://tls.mbed.org)
  23. */
  24. #ifndef MBEDTLS_CONFIG_H
  25. #define MBEDTLS_CONFIG_H
  26. #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
  27. #define _CRT_SECURE_NO_DEPRECATE 1
  28. #endif
  29. /**
  30. * \name SECTION: System support
  31. *
  32. * This section sets system specific settings.
  33. * \{
  34. */
  35. /**
  36. * \def MBEDTLS_HAVE_ASM
  37. *
  38. * The compiler has support for asm().
  39. *
  40. * Requires support for asm() in compiler.
  41. *
  42. * Used in:
  43. * library/aria.c
  44. * library/timing.c
  45. * include/mbedtls/bn_mul.h
  46. *
  47. * Required by:
  48. * MBEDTLS_AESNI_C
  49. * MBEDTLS_PADLOCK_C
  50. *
  51. * Comment to disable the use of assembly code.
  52. */
  53. //#define MBEDTLS_HAVE_ASM
  54. /**
  55. * \def MBEDTLS_NO_UDBL_DIVISION
  56. *
  57. * The platform lacks support for double-width integer division (64-bit
  58. * division on a 32-bit platform, 128-bit division on a 64-bit platform).
  59. *
  60. * Used in:
  61. * include/mbedtls/bignum.h
  62. * library/bignum.c
  63. *
  64. * The bignum code uses double-width division to speed up some operations.
  65. * Double-width division is often implemented in software that needs to
  66. * be linked with the program. The presence of a double-width integer
  67. * type is usually detected automatically through preprocessor macros,
  68. * but the automatic detection cannot know whether the code needs to
  69. * and can be linked with an implementation of division for that type.
  70. * By default division is assumed to be usable if the type is present.
  71. * Uncomment this option to prevent the use of double-width division.
  72. *
  73. * Note that division for the native integer type is always required.
  74. * Furthermore, a 64-bit type is always required even on a 32-bit
  75. * platform, but it need not support multiplication or division. In some
  76. * cases it is also desirable to disable some double-width operations. For
  77. * example, if double-width division is implemented in software, disabling
  78. * it can reduce code size in some embedded targets.
  79. */
  80. //#define MBEDTLS_NO_UDBL_DIVISION
  81. /**
  82. * \def MBEDTLS_NO_64BIT_MULTIPLICATION
  83. *
  84. * The platform lacks support for 32x32 -> 64-bit multiplication.
  85. *
  86. * Used in:
  87. * library/poly1305.c
  88. *
  89. * Some parts of the library may use multiplication of two unsigned 32-bit
  90. * operands with a 64-bit result in order to speed up computations. On some
  91. * platforms, this is not available in hardware and has to be implemented in
  92. * software, usually in a library provided by the toolchain.
  93. *
  94. * Sometimes it is not desirable to have to link to that library. This option
  95. * removes the dependency of that library on platforms that lack a hardware
  96. * 64-bit multiplier by embedding a software implementation in Mbed TLS.
  97. *
  98. * Note that depending on the compiler, this may decrease performance compared
  99. * to using the library function provided by the toolchain.
  100. */
  101. //#define MBEDTLS_NO_64BIT_MULTIPLICATION
  102. /**
  103. * \def MBEDTLS_HAVE_SSE2
  104. *
  105. * CPU supports SSE2 instruction set.
  106. *
  107. * Uncomment if the CPU supports SSE2 (IA-32 specific).
  108. */
  109. //#define MBEDTLS_HAVE_SSE2
  110. /**
  111. * \def MBEDTLS_HAVE_TIME
  112. *
  113. * System has time.h and time().
  114. * The time does not need to be correct, only time differences are used,
  115. * by contrast with MBEDTLS_HAVE_TIME_DATE
  116. *
  117. * Defining MBEDTLS_HAVE_TIME allows you to specify MBEDTLS_PLATFORM_TIME_ALT,
  118. * MBEDTLS_PLATFORM_TIME_MACRO, MBEDTLS_PLATFORM_TIME_TYPE_MACRO and
  119. * MBEDTLS_PLATFORM_STD_TIME.
  120. *
  121. * Comment if your system does not support time functions
  122. */
  123. //#define MBEDTLS_HAVE_TIME
  124. /**
  125. * \def MBEDTLS_HAVE_TIME_DATE
  126. *
  127. * System has time.h, time(), and an implementation for
  128. * mbedtls_platform_gmtime_r() (see below).
  129. * The time needs to be correct (not necessarily very accurate, but at least
  130. * the date should be correct). This is used to verify the validity period of
  131. * X.509 certificates.
  132. *
  133. * Comment if your system does not have a correct clock.
  134. *
  135. * \note mbedtls_platform_gmtime_r() is an abstraction in platform_util.h that
  136. * behaves similarly to the gmtime_r() function from the C standard. Refer to
  137. * the documentation for mbedtls_platform_gmtime_r() for more information.
  138. *
  139. * \note It is possible to configure an implementation for
  140. * mbedtls_platform_gmtime_r() at compile-time by using the macro
  141. * MBEDTLS_PLATFORM_GMTIME_R_ALT.
  142. */
  143. //#define MBEDTLS_HAVE_TIME_DATE
  144. /**
  145. * \def MBEDTLS_PLATFORM_MEMORY
  146. *
  147. * Enable the memory allocation layer.
  148. *
  149. * By default mbed TLS uses the system-provided calloc() and free().
  150. * This allows different allocators (self-implemented or provided) to be
  151. * provided to the platform abstraction layer.
  152. *
  153. * Enabling MBEDTLS_PLATFORM_MEMORY without the
  154. * MBEDTLS_PLATFORM_{FREE,CALLOC}_MACROs will provide
  155. * "mbedtls_platform_set_calloc_free()" allowing you to set an alternative calloc() and
  156. * free() function pointer at runtime.
  157. *
  158. * Enabling MBEDTLS_PLATFORM_MEMORY and specifying
  159. * MBEDTLS_PLATFORM_{CALLOC,FREE}_MACROs will allow you to specify the
  160. * alternate function at compile time.
  161. *
  162. * Requires: MBEDTLS_PLATFORM_C
  163. *
  164. * Enable this layer to allow use of alternative memory allocators.
  165. */
  166. #define MBEDTLS_PLATFORM_MEMORY
  167. /**
  168. * \def MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
  169. *
  170. * Do not assign standard functions in the platform layer (e.g. calloc() to
  171. * MBEDTLS_PLATFORM_STD_CALLOC and printf() to MBEDTLS_PLATFORM_STD_PRINTF)
  172. *
  173. * This makes sure there are no linking errors on platforms that do not support
  174. * these functions. You will HAVE to provide alternatives, either at runtime
  175. * via the platform_set_xxx() functions or at compile time by setting
  176. * the MBEDTLS_PLATFORM_STD_XXX defines, or enabling a
  177. * MBEDTLS_PLATFORM_XXX_MACRO.
  178. *
  179. * Requires: MBEDTLS_PLATFORM_C
  180. *
  181. * Uncomment to prevent default assignment of standard functions in the
  182. * platform layer.
  183. */
  184. #define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
  185. /**
  186. * \def MBEDTLS_PLATFORM_EXIT_ALT
  187. *
  188. * MBEDTLS_PLATFORM_XXX_ALT: Uncomment a macro to let mbed TLS support the
  189. * function in the platform abstraction layer.
  190. *
  191. * Example: In case you uncomment MBEDTLS_PLATFORM_PRINTF_ALT, mbed TLS will
  192. * provide a function "mbedtls_platform_set_printf()" that allows you to set an
  193. * alternative printf function pointer.
  194. *
  195. * All these define require MBEDTLS_PLATFORM_C to be defined!
  196. *
  197. * \note MBEDTLS_PLATFORM_SNPRINTF_ALT is required on Windows;
  198. * it will be enabled automatically by check_config.h
  199. *
  200. * \warning MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as
  201. * MBEDTLS_PLATFORM_XXX_MACRO!
  202. *
  203. * Requires: MBEDTLS_PLATFORM_TIME_ALT requires MBEDTLS_HAVE_TIME
  204. *
  205. * Uncomment a macro to enable alternate implementation of specific base
  206. * platform function
  207. */
  208. //#define MBEDTLS_PLATFORM_EXIT_ALT
  209. //#define MBEDTLS_PLATFORM_TIME_ALT
  210. //#define MBEDTLS_PLATFORM_FPRINTF_ALT
  211. //#define MBEDTLS_PLATFORM_PRINTF_ALT
  212. //#define MBEDTLS_PLATFORM_SNPRINTF_ALT
  213. //#define MBEDTLS_PLATFORM_NV_SEED_ALT
  214. //#define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT
  215. /**
  216. * \def MBEDTLS_DEPRECATED_WARNING
  217. *
  218. * Mark deprecated functions so that they generate a warning if used.
  219. * Functions deprecated in one version will usually be removed in the next
  220. * version. You can enable this to help you prepare the transition to a new
  221. * major version by making sure your code is not using these functions.
  222. *
  223. * This only works with GCC and Clang. With other compilers, you may want to
  224. * use MBEDTLS_DEPRECATED_REMOVED
  225. *
  226. * Uncomment to get warnings on using deprecated functions.
  227. */
  228. //#define MBEDTLS_DEPRECATED_WARNING
  229. /**
  230. * \def MBEDTLS_DEPRECATED_REMOVED
  231. *
  232. * Remove deprecated functions so that they generate an error if used.
  233. * Functions deprecated in one version will usually be removed in the next
  234. * version. You can enable this to help you prepare the transition to a new
  235. * major version by making sure your code is not using these functions.
  236. *
  237. * Uncomment to get errors on using deprecated functions.
  238. */
  239. //#define MBEDTLS_DEPRECATED_REMOVED
  240. /**
  241. * \def MBEDTLS_CHECK_PARAMS
  242. *
  243. * This configuration option controls whether the library validates more of
  244. * the parameters passed to it.
  245. *
  246. * When this flag is not defined, the library only attempts to validate an
  247. * input parameter if: (1) they may come from the outside world (such as the
  248. * network, the filesystem, etc.) or (2) not validating them could result in
  249. * internal memory errors such as overflowing a buffer controlled by the
  250. * library. On the other hand, it doesn't attempt to validate parameters whose
  251. * values are fully controlled by the application (such as pointers).
  252. *
  253. * When this flag is defined, the library additionally attempts to validate
  254. * parameters that are fully controlled by the application, and should always
  255. * be valid if the application code is fully correct and trusted.
  256. *
  257. * For example, when a function accepts as input a pointer to a buffer that may
  258. * contain untrusted data, and its documentation mentions that this pointer
  259. * must not be NULL:
  260. * - The pointer is checked to be non-NULL only if this option is enabled.
  261. * - The content of the buffer is always validated.
  262. *
  263. * When this flag is defined, if a library function receives a parameter that
  264. * is invalid:
  265. * 1. The function will invoke the macro MBEDTLS_PARAM_FAILED().
  266. * 2. If MBEDTLS_PARAM_FAILED() did not terminate the program, the function
  267. * will immediately return. If the function returns an Mbed TLS error code,
  268. * the error code in this case is MBEDTLS_ERR_xxx_BAD_INPUT_DATA.
  269. *
  270. * When defining this flag, you also need to arrange a definition for
  271. * MBEDTLS_PARAM_FAILED(). You can do this by any of the following methods:
  272. * - By default, the library defines MBEDTLS_PARAM_FAILED() to call a
  273. * function mbedtls_param_failed(), but the library does not define this
  274. * function. If you do not make any other arrangements, you must provide
  275. * the function mbedtls_param_failed() in your application.
  276. * See `platform_util.h` for its prototype.
  277. * - If you enable the macro #MBEDTLS_CHECK_PARAMS_ASSERT, then the
  278. * library defines #MBEDTLS_PARAM_FAILED(\c cond) to be `assert(cond)`.
  279. * You can still supply an alternative definition of
  280. * MBEDTLS_PARAM_FAILED(), which may call `assert`.
  281. * - If you define a macro MBEDTLS_PARAM_FAILED() before including `config.h`
  282. * or you uncomment the definition of MBEDTLS_PARAM_FAILED() in `config.h`,
  283. * the library will call the macro that you defined and will not supply
  284. * its own version. Note that if MBEDTLS_PARAM_FAILED() calls `assert`,
  285. * you need to enable #MBEDTLS_CHECK_PARAMS_ASSERT so that library source
  286. * files include `<assert.h>`.
  287. *
  288. * Uncomment to enable validation of application-controlled parameters.
  289. */
  290. //#define MBEDTLS_CHECK_PARAMS
  291. /**
  292. * \def MBEDTLS_CHECK_PARAMS_ASSERT
  293. *
  294. * Allow MBEDTLS_PARAM_FAILED() to call `assert`, and make it default to
  295. * `assert`. This macro is only used if #MBEDTLS_CHECK_PARAMS is defined.
  296. *
  297. * If this macro is not defined, then MBEDTLS_PARAM_FAILED() defaults to
  298. * calling a function mbedtls_param_failed(). See the documentation of
  299. * #MBEDTLS_CHECK_PARAMS for details.
  300. *
  301. * Uncomment to allow MBEDTLS_PARAM_FAILED() to call `assert`.
  302. */
  303. //#define MBEDTLS_CHECK_PARAMS_ASSERT
  304. /* \} name SECTION: System support */
  305. /**
  306. * \name SECTION: mbed TLS feature support
  307. *
  308. * This section sets support for features that are or are not needed
  309. * within the modules that are enabled.
  310. * \{
  311. */
  312. /**
  313. * \def MBEDTLS_TIMING_ALT
  314. *
  315. * Uncomment to provide your own alternate implementation for mbedtls_timing_hardclock(),
  316. * mbedtls_timing_get_timer(), mbedtls_set_alarm(), mbedtls_set/get_delay()
  317. *
  318. * Only works if you have MBEDTLS_TIMING_C enabled.
  319. *
  320. * You will need to provide a header "timing_alt.h" and an implementation at
  321. * compile time.
  322. */
  323. //#define MBEDTLS_TIMING_ALT
  324. /**
  325. * \def MBEDTLS_AES_ALT
  326. *
  327. * MBEDTLS__MODULE_NAME__ALT: Uncomment a macro to let mbed TLS use your
  328. * alternate core implementation of a symmetric crypto, an arithmetic or hash
  329. * module (e.g. platform specific assembly optimized implementations). Keep
  330. * in mind that the function prototypes should remain the same.
  331. *
  332. * This replaces the whole module. If you only want to replace one of the
  333. * functions, use one of the MBEDTLS__FUNCTION_NAME__ALT flags.
  334. *
  335. * Example: In case you uncomment MBEDTLS_AES_ALT, mbed TLS will no longer
  336. * provide the "struct mbedtls_aes_context" definition and omit the base
  337. * function declarations and implementations. "aes_alt.h" will be included from
  338. * "aes.h" to include the new function definitions.
  339. *
  340. * Uncomment a macro to enable alternate implementation of the corresponding
  341. * module.
  342. *
  343. * \warning MD2, MD4, MD5, ARC4, DES and SHA-1 are considered weak and their
  344. * use constitutes a security risk. If possible, we recommend
  345. * avoiding dependencies on them, and considering stronger message
  346. * digests and ciphers instead.
  347. *
  348. */
  349. //#define MBEDTLS_AES_ALT
  350. //#define MBEDTLS_ARC4_ALT
  351. //#define MBEDTLS_ARIA_ALT
  352. //#define MBEDTLS_BLOWFISH_ALT
  353. //#define MBEDTLS_CAMELLIA_ALT
  354. //#define MBEDTLS_CCM_ALT
  355. //#define MBEDTLS_CHACHA20_ALT
  356. //#define MBEDTLS_CHACHAPOLY_ALT
  357. //#define MBEDTLS_CMAC_ALT
  358. //#define MBEDTLS_DES_ALT
  359. //#define MBEDTLS_DHM_ALT
  360. //#define MBEDTLS_ECJPAKE_ALT
  361. //#define MBEDTLS_GCM_ALT
  362. //#define MBEDTLS_NIST_KW_ALT
  363. //#define MBEDTLS_MD2_ALT
  364. //#define MBEDTLS_MD4_ALT
  365. //#define MBEDTLS_MD5_ALT
  366. //#define MBEDTLS_RIPEMD160_ALT
  367. //#define MBEDTLS_RSA_ALT
  368. //#define MBEDTLS_SHA1_ALT
  369. //#define MBEDTLS_SHA256_ALT
  370. //#define MBEDTLS_SHA512_ALT
  371. //#define MBEDTLS_XTEA_ALT
  372. /*
  373. * When replacing the elliptic curve module, please consider, that it is
  374. * implemented with two .c files:
  375. * - ecp.c
  376. * - ecp_curves.c
  377. * You can replace them very much like all the other MBEDTLS__MODULE_NAME__ALT
  378. * macros as described above. The only difference is that you have to make sure
  379. * that you provide functionality for both .c files.
  380. */
  381. //#define MBEDTLS_ECP_ALT
  382. /**
  383. * \def MBEDTLS_MD2_PROCESS_ALT
  384. *
  385. * MBEDTLS__FUNCTION_NAME__ALT: Uncomment a macro to let mbed TLS use you
  386. * alternate core implementation of symmetric crypto or hash function. Keep in
  387. * mind that function prototypes should remain the same.
  388. *
  389. * This replaces only one function. The header file from mbed TLS is still
  390. * used, in contrast to the MBEDTLS__MODULE_NAME__ALT flags.
  391. *
  392. * Example: In case you uncomment MBEDTLS_SHA256_PROCESS_ALT, mbed TLS will
  393. * no longer provide the mbedtls_sha1_process() function, but it will still provide
  394. * the other function (using your mbedtls_sha1_process() function) and the definition
  395. * of mbedtls_sha1_context, so your implementation of mbedtls_sha1_process must be compatible
  396. * with this definition.
  397. *
  398. * \note Because of a signature change, the core AES encryption and decryption routines are
  399. * currently named mbedtls_aes_internal_encrypt and mbedtls_aes_internal_decrypt,
  400. * respectively. When setting up alternative implementations, these functions should
  401. * be overridden, but the wrapper functions mbedtls_aes_decrypt and mbedtls_aes_encrypt
  402. * must stay untouched.
  403. *
  404. * \note If you use the AES_xxx_ALT macros, then is is recommended to also set
  405. * MBEDTLS_AES_ROM_TABLES in order to help the linker garbage-collect the AES
  406. * tables.
  407. *
  408. * Uncomment a macro to enable alternate implementation of the corresponding
  409. * function.
  410. *
  411. * \warning MD2, MD4, MD5, DES and SHA-1 are considered weak and their use
  412. * constitutes a security risk. If possible, we recommend avoiding
  413. * dependencies on them, and considering stronger message digests
  414. * and ciphers instead.
  415. *
  416. * \warning If both MBEDTLS_ECDSA_SIGN_ALT and MBEDTLS_ECDSA_DETERMINISTIC are
  417. * enabled, then the deterministic ECDH signature functions pass the
  418. * the static HMAC-DRBG as RNG to mbedtls_ecdsa_sign(). Therefore
  419. * alternative implementations should use the RNG only for generating
  420. * the ephemeral key and nothing else. If this is not possible, then
  421. * MBEDTLS_ECDSA_DETERMINISTIC should be disabled and an alternative
  422. * implementation should be provided for mbedtls_ecdsa_sign_det_ext()
  423. * (and for mbedtls_ecdsa_sign_det() too if backward compatibility is
  424. * desirable).
  425. *
  426. */
  427. //#define MBEDTLS_MD2_PROCESS_ALT
  428. //#define MBEDTLS_MD4_PROCESS_ALT
  429. //#define MBEDTLS_MD5_PROCESS_ALT
  430. //#define MBEDTLS_RIPEMD160_PROCESS_ALT
  431. //#define MBEDTLS_SHA1_PROCESS_ALT
  432. //#define MBEDTLS_SHA256_PROCESS_ALT
  433. //#define MBEDTLS_SHA512_PROCESS_ALT
  434. //#define MBEDTLS_DES_SETKEY_ALT
  435. //#define MBEDTLS_DES_CRYPT_ECB_ALT
  436. //#define MBEDTLS_DES3_CRYPT_ECB_ALT
  437. //#define MBEDTLS_AES_SETKEY_ENC_ALT
  438. //#define MBEDTLS_AES_SETKEY_DEC_ALT
  439. //#define MBEDTLS_AES_ENCRYPT_ALT
  440. //#define MBEDTLS_AES_DECRYPT_ALT
  441. //#define MBEDTLS_ECDH_GEN_PUBLIC_ALT
  442. //#define MBEDTLS_ECDH_COMPUTE_SHARED_ALT
  443. //#define MBEDTLS_ECDSA_VERIFY_ALT
  444. //#define MBEDTLS_ECDSA_SIGN_ALT
  445. //#define MBEDTLS_ECDSA_GENKEY_ALT
  446. /**
  447. * \def MBEDTLS_ECP_INTERNAL_ALT
  448. *
  449. * Expose a part of the internal interface of the Elliptic Curve Point module.
  450. *
  451. * MBEDTLS_ECP__FUNCTION_NAME__ALT: Uncomment a macro to let mbed TLS use your
  452. * alternative core implementation of elliptic curve arithmetic. Keep in mind
  453. * that function prototypes should remain the same.
  454. *
  455. * This partially replaces one function. The header file from mbed TLS is still
  456. * used, in contrast to the MBEDTLS_ECP_ALT flag. The original implementation
  457. * is still present and it is used for group structures not supported by the
  458. * alternative.
  459. *
  460. * Any of these options become available by defining MBEDTLS_ECP_INTERNAL_ALT
  461. * and implementing the following functions:
  462. * unsigned char mbedtls_internal_ecp_grp_capable(
  463. * const mbedtls_ecp_group *grp )
  464. * int mbedtls_internal_ecp_init( const mbedtls_ecp_group *grp )
  465. * void mbedtls_internal_ecp_free( const mbedtls_ecp_group *grp )
  466. * The mbedtls_internal_ecp_grp_capable function should return 1 if the
  467. * replacement functions implement arithmetic for the given group and 0
  468. * otherwise.
  469. * The functions mbedtls_internal_ecp_init and mbedtls_internal_ecp_free are
  470. * called before and after each point operation and provide an opportunity to
  471. * implement optimized set up and tear down instructions.
  472. *
  473. * Example: In case you uncomment MBEDTLS_ECP_INTERNAL_ALT and
  474. * MBEDTLS_ECP_DOUBLE_JAC_ALT, mbed TLS will still provide the ecp_double_jac
  475. * function, but will use your mbedtls_internal_ecp_double_jac if the group is
  476. * supported (your mbedtls_internal_ecp_grp_capable function returns 1 when
  477. * receives it as an argument). If the group is not supported then the original
  478. * implementation is used. The other functions and the definition of
  479. * mbedtls_ecp_group and mbedtls_ecp_point will not change, so your
  480. * implementation of mbedtls_internal_ecp_double_jac and
  481. * mbedtls_internal_ecp_grp_capable must be compatible with this definition.
  482. *
  483. * Uncomment a macro to enable alternate implementation of the corresponding
  484. * function.
  485. */
  486. /* Required for all the functions in this section */
  487. //#define MBEDTLS_ECP_INTERNAL_ALT
  488. /* Support for Weierstrass curves with Jacobi representation */
  489. //#define MBEDTLS_ECP_RANDOMIZE_JAC_ALT
  490. //#define MBEDTLS_ECP_ADD_MIXED_ALT
  491. //#define MBEDTLS_ECP_DOUBLE_JAC_ALT
  492. //#define MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT
  493. //#define MBEDTLS_ECP_NORMALIZE_JAC_ALT
  494. /* Support for curves with Montgomery arithmetic */
  495. //#define MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT
  496. //#define MBEDTLS_ECP_RANDOMIZE_MXZ_ALT
  497. //#define MBEDTLS_ECP_NORMALIZE_MXZ_ALT
  498. /**
  499. * \def MBEDTLS_TEST_NULL_ENTROPY
  500. *
  501. * Enables testing and use of mbed TLS without any configured entropy sources.
  502. * This permits use of the library on platforms before an entropy source has
  503. * been integrated (see for example the MBEDTLS_ENTROPY_HARDWARE_ALT or the
  504. * MBEDTLS_ENTROPY_NV_SEED switches).
  505. *
  506. * WARNING! This switch MUST be disabled in production builds, and is suitable
  507. * only for development.
  508. * Enabling the switch negates any security provided by the library.
  509. *
  510. * Requires MBEDTLS_ENTROPY_C, MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
  511. *
  512. */
  513. //#define MBEDTLS_TEST_NULL_ENTROPY
  514. /**
  515. * \def MBEDTLS_ENTROPY_HARDWARE_ALT
  516. *
  517. * Uncomment this macro to let mbed TLS use your own implementation of a
  518. * hardware entropy collector.
  519. *
  520. * Your function must be called \c mbedtls_hardware_poll(), have the same
  521. * prototype as declared in entropy_poll.h, and accept NULL as first argument.
  522. *
  523. * Uncomment to use your own hardware entropy collector.
  524. */
  525. //#define MBEDTLS_ENTROPY_HARDWARE_ALT
  526. /**
  527. * \def MBEDTLS_AES_ROM_TABLES
  528. *
  529. * Use precomputed AES tables stored in ROM.
  530. *
  531. * Uncomment this macro to use precomputed AES tables stored in ROM.
  532. * Comment this macro to generate AES tables in RAM at runtime.
  533. *
  534. * Tradeoff: Using precomputed ROM tables reduces RAM usage by ~8kb
  535. * (or ~2kb if \c MBEDTLS_AES_FEWER_TABLES is used) and reduces the
  536. * initialization time before the first AES operation can be performed.
  537. * It comes at the cost of additional ~8kb ROM use (resp. ~2kb if \c
  538. * MBEDTLS_AES_FEWER_TABLES below is used), and potentially degraded
  539. * performance if ROM access is slower than RAM access.
  540. *
  541. * This option is independent of \c MBEDTLS_AES_FEWER_TABLES.
  542. *
  543. */
  544. #define MBEDTLS_AES_ROM_TABLES
  545. /**
  546. * \def MBEDTLS_AES_FEWER_TABLES
  547. *
  548. * Use less ROM/RAM for AES tables.
  549. *
  550. * Uncommenting this macro omits 75% of the AES tables from
  551. * ROM / RAM (depending on the value of \c MBEDTLS_AES_ROM_TABLES)
  552. * by computing their values on the fly during operations
  553. * (the tables are entry-wise rotations of one another).
  554. *
  555. * Tradeoff: Uncommenting this reduces the RAM / ROM footprint
  556. * by ~6kb but at the cost of more arithmetic operations during
  557. * runtime. Specifically, one has to compare 4 accesses within
  558. * different tables to 4 accesses with additional arithmetic
  559. * operations within the same table. The performance gain/loss
  560. * depends on the system and memory details.
  561. *
  562. * This option is independent of \c MBEDTLS_AES_ROM_TABLES.
  563. *
  564. */
  565. //#define MBEDTLS_AES_FEWER_TABLES
  566. /**
  567. * \def MBEDTLS_CAMELLIA_SMALL_MEMORY
  568. *
  569. * Use less ROM for the Camellia implementation (saves about 768 bytes).
  570. *
  571. * Uncomment this macro to use less memory for Camellia.
  572. */
  573. //#define MBEDTLS_CAMELLIA_SMALL_MEMORY
  574. /**
  575. * \def MBEDTLS_CIPHER_MODE_CBC
  576. *
  577. * Enable Cipher Block Chaining mode (CBC) for symmetric ciphers.
  578. */
  579. //#define MBEDTLS_CIPHER_MODE_CBC
  580. /**
  581. * \def MBEDTLS_CIPHER_MODE_CFB
  582. *
  583. * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
  584. */
  585. //#define MBEDTLS_CIPHER_MODE_CFB
  586. /**
  587. * \def MBEDTLS_CIPHER_MODE_CTR
  588. *
  589. * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
  590. */
  591. #define MBEDTLS_CIPHER_MODE_CTR
  592. /**
  593. * \def MBEDTLS_CIPHER_MODE_OFB
  594. *
  595. * Enable Output Feedback mode (OFB) for symmetric ciphers.
  596. */
  597. //#define MBEDTLS_CIPHER_MODE_OFB
  598. /**
  599. * \def MBEDTLS_CIPHER_MODE_XTS
  600. *
  601. * Enable Xor-encrypt-xor with ciphertext stealing mode (XTS) for AES.
  602. */
  603. //#define MBEDTLS_CIPHER_MODE_XTS
  604. /**
  605. * \def MBEDTLS_CIPHER_NULL_CIPHER
  606. *
  607. * Enable NULL cipher.
  608. * Warning: Only do so when you know what you are doing. This allows for
  609. * encryption or channels without any security!
  610. *
  611. * Requires MBEDTLS_ENABLE_WEAK_CIPHERSUITES as well to enable
  612. * the following ciphersuites:
  613. * MBEDTLS_TLS_ECDH_ECDSA_WITH_NULL_SHA
  614. * MBEDTLS_TLS_ECDH_RSA_WITH_NULL_SHA
  615. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_NULL_SHA
  616. * MBEDTLS_TLS_ECDHE_RSA_WITH_NULL_SHA
  617. * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA384
  618. * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA256
  619. * MBEDTLS_TLS_ECDHE_PSK_WITH_NULL_SHA
  620. * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA384
  621. * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA256
  622. * MBEDTLS_TLS_DHE_PSK_WITH_NULL_SHA
  623. * MBEDTLS_TLS_RSA_WITH_NULL_SHA256
  624. * MBEDTLS_TLS_RSA_WITH_NULL_SHA
  625. * MBEDTLS_TLS_RSA_WITH_NULL_MD5
  626. * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA384
  627. * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA256
  628. * MBEDTLS_TLS_RSA_PSK_WITH_NULL_SHA
  629. * MBEDTLS_TLS_PSK_WITH_NULL_SHA384
  630. * MBEDTLS_TLS_PSK_WITH_NULL_SHA256
  631. * MBEDTLS_TLS_PSK_WITH_NULL_SHA
  632. *
  633. * Uncomment this macro to enable the NULL cipher and ciphersuites
  634. */
  635. //#define MBEDTLS_CIPHER_NULL_CIPHER
  636. /**
  637. * \def MBEDTLS_CIPHER_PADDING_PKCS7
  638. *
  639. * MBEDTLS_CIPHER_PADDING_XXX: Uncomment or comment macros to add support for
  640. * specific padding modes in the cipher layer with cipher modes that support
  641. * padding (e.g. CBC)
  642. *
  643. * If you disable all padding modes, only full blocks can be used with CBC.
  644. *
  645. * Enable padding modes in the cipher layer.
  646. */
  647. #define MBEDTLS_CIPHER_PADDING_PKCS7
  648. #define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
  649. #define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
  650. #define MBEDTLS_CIPHER_PADDING_ZEROS
  651. /** \def MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
  652. *
  653. * Uncomment this macro to use a 128-bit key in the CTR_DRBG module.
  654. * By default, CTR_DRBG uses a 256-bit key.
  655. */
  656. #define MBEDTLS_CTR_DRBG_USE_128_BIT_KEY
  657. /**
  658. * \def MBEDTLS_ENABLE_WEAK_CIPHERSUITES
  659. *
  660. * Enable weak ciphersuites in SSL / TLS.
  661. * Warning: Only do so when you know what you are doing. This allows for
  662. * channels with virtually no security at all!
  663. *
  664. * This enables the following ciphersuites:
  665. * MBEDTLS_TLS_RSA_WITH_DES_CBC_SHA
  666. * MBEDTLS_TLS_DHE_RSA_WITH_DES_CBC_SHA
  667. *
  668. * Uncomment this macro to enable weak ciphersuites
  669. *
  670. * \warning DES is considered a weak cipher and its use constitutes a
  671. * security risk. We recommend considering stronger ciphers instead.
  672. */
  673. //#define MBEDTLS_ENABLE_WEAK_CIPHERSUITES
  674. /**
  675. * \def MBEDTLS_REMOVE_ARC4_CIPHERSUITES
  676. *
  677. * Remove RC4 ciphersuites by default in SSL / TLS.
  678. * This flag removes the ciphersuites based on RC4 from the default list as
  679. * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible to
  680. * enable (some of) them with mbedtls_ssl_conf_ciphersuites() by including them
  681. * explicitly.
  682. *
  683. * Uncomment this macro to remove RC4 ciphersuites by default.
  684. */
  685. #define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
  686. /**
  687. * \def MBEDTLS_REMOVE_3DES_CIPHERSUITES
  688. *
  689. * Remove 3DES ciphersuites by default in SSL / TLS.
  690. * This flag removes the ciphersuites based on 3DES from the default list as
  691. * returned by mbedtls_ssl_list_ciphersuites(). However, it is still possible
  692. * to enable (some of) them with mbedtls_ssl_conf_ciphersuites() by including
  693. * them explicitly.
  694. *
  695. * A man-in-the-browser attacker can recover authentication tokens sent through
  696. * a TLS connection using a 3DES based cipher suite (see "On the Practical
  697. * (In-)Security of 64-bit Block Ciphers" by Karthikeyan Bhargavan and Gaëtan
  698. * Leurent, see https://sweet32.info/SWEET32_CCS16.pdf). If this attack falls
  699. * in your threat model or you are unsure, then you should keep this option
  700. * enabled to remove 3DES based cipher suites.
  701. *
  702. * Comment this macro to keep 3DES in the default ciphersuite list.
  703. */
  704. #define MBEDTLS_REMOVE_3DES_CIPHERSUITES
  705. /**
  706. * \def MBEDTLS_ECP_DP_SECP192R1_ENABLED
  707. *
  708. * MBEDTLS_ECP_XXXX_ENABLED: Enables specific curves within the Elliptic Curve
  709. * module. By default all supported curves are enabled.
  710. *
  711. * Comment macros to disable the curve and functions for it
  712. */
  713. //#define MBEDTLS_ECP_DP_SECP192R1_ENABLED
  714. //#define MBEDTLS_ECP_DP_SECP224R1_ENABLED
  715. #define MBEDTLS_ECP_DP_SECP256R1_ENABLED
  716. //#define MBEDTLS_ECP_DP_SECP384R1_ENABLED
  717. //#define MBEDTLS_ECP_DP_SECP521R1_ENABLED
  718. //#define MBEDTLS_ECP_DP_SECP192K1_ENABLED
  719. //#define MBEDTLS_ECP_DP_SECP224K1_ENABLED
  720. //#define MBEDTLS_ECP_DP_SECP256K1_ENABLED
  721. //#define MBEDTLS_ECP_DP_BP256R1_ENABLED
  722. //#define MBEDTLS_ECP_DP_BP384R1_ENABLED
  723. //#define MBEDTLS_ECP_DP_BP512R1_ENABLED
  724. //#define MBEDTLS_ECP_DP_CURVE25519_ENABLED
  725. //#define MBEDTLS_ECP_DP_CURVE448_ENABLED
  726. /**
  727. * \def MBEDTLS_ECP_NIST_OPTIM
  728. *
  729. * Enable specific 'modulo p' routines for each NIST prime.
  730. * Depending on the prime and architecture, makes operations 4 to 8 times
  731. * faster on the corresponding curve.
  732. *
  733. * Comment this macro to disable NIST curves optimisation.
  734. */
  735. #define MBEDTLS_ECP_NIST_OPTIM
  736. /**
  737. * \def MBEDTLS_ECP_RESTARTABLE
  738. *
  739. * Enable "non-blocking" ECC operations that can return early and be resumed.
  740. *
  741. * This allows various functions to pause by returning
  742. * #MBEDTLS_ERR_ECP_IN_PROGRESS (or, for functions in the SSL module,
  743. * #MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS) and then be called later again in
  744. * order to further progress and eventually complete their operation. This is
  745. * controlled through mbedtls_ecp_set_max_ops() which limits the maximum
  746. * number of ECC operations a function may perform before pausing; see
  747. * mbedtls_ecp_set_max_ops() for more information.
  748. *
  749. * This is useful in non-threaded environments if you want to avoid blocking
  750. * for too long on ECC (and, hence, X.509 or SSL/TLS) operations.
  751. *
  752. * Uncomment this macro to enable restartable ECC computations.
  753. *
  754. * \note This option only works with the default software implementation of
  755. * elliptic curve functionality. It is incompatible with
  756. * MBEDTLS_ECP_ALT, MBEDTLS_ECDH_XXX_ALT and MBEDTLS_ECDSA_XXX_ALT.
  757. */
  758. //#define MBEDTLS_ECP_RESTARTABLE
  759. /**
  760. * \def MBEDTLS_ECDSA_DETERMINISTIC
  761. *
  762. * Enable deterministic ECDSA (RFC 6979).
  763. * Standard ECDSA is "fragile" in the sense that lack of entropy when signing
  764. * may result in a compromise of the long-term signing key. This is avoided by
  765. * the deterministic variant.
  766. *
  767. * Requires: MBEDTLS_HMAC_DRBG_C
  768. *
  769. * Comment this macro to disable deterministic ECDSA.
  770. */
  771. //#define MBEDTLS_ECDSA_DETERMINISTIC
  772. /**
  773. * \def MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
  774. *
  775. * Enable the PSK based ciphersuite modes in SSL / TLS.
  776. *
  777. * This enables the following ciphersuites (if other requisites are
  778. * enabled as well):
  779. * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
  780. * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
  781. * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
  782. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
  783. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
  784. * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
  785. * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
  786. * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
  787. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
  788. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
  789. * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
  790. * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
  791. */
  792. #define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
  793. /**
  794. * \def MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
  795. *
  796. * Enable the DHE-PSK based ciphersuite modes in SSL / TLS.
  797. *
  798. * Requires: MBEDTLS_DHM_C
  799. *
  800. * This enables the following ciphersuites (if other requisites are
  801. * enabled as well):
  802. * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
  803. * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
  804. * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
  805. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
  806. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
  807. * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
  808. * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
  809. * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
  810. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
  811. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
  812. * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
  813. * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
  814. *
  815. * \warning Using DHE constitutes a security risk as it
  816. * is not possible to validate custom DH parameters.
  817. * If possible, it is recommended users should consider
  818. * preferring other methods of key exchange.
  819. * See dhm.h for more details.
  820. *
  821. */
  822. //#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
  823. /**
  824. * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
  825. *
  826. * Enable the ECDHE-PSK based ciphersuite modes in SSL / TLS.
  827. *
  828. * Requires: MBEDTLS_ECDH_C
  829. *
  830. * This enables the following ciphersuites (if other requisites are
  831. * enabled as well):
  832. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
  833. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
  834. * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
  835. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
  836. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
  837. * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
  838. * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
  839. * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
  840. */
  841. //#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
  842. /**
  843. * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
  844. *
  845. * Enable the RSA-PSK based ciphersuite modes in SSL / TLS.
  846. *
  847. * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
  848. * MBEDTLS_X509_CRT_PARSE_C
  849. *
  850. * This enables the following ciphersuites (if other requisites are
  851. * enabled as well):
  852. * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
  853. * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
  854. * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
  855. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
  856. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
  857. * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
  858. * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
  859. * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
  860. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
  861. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
  862. * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
  863. * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
  864. */
  865. //#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
  866. /**
  867. * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
  868. *
  869. * Enable the RSA-only based ciphersuite modes in SSL / TLS.
  870. *
  871. * Requires: MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
  872. * MBEDTLS_X509_CRT_PARSE_C
  873. *
  874. * This enables the following ciphersuites (if other requisites are
  875. * enabled as well):
  876. * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
  877. * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
  878. * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
  879. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
  880. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
  881. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
  882. * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
  883. * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
  884. * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
  885. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
  886. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
  887. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
  888. * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
  889. * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
  890. * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
  891. */
  892. //#define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
  893. /**
  894. * \def MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
  895. *
  896. * Enable the DHE-RSA based ciphersuite modes in SSL / TLS.
  897. *
  898. * Requires: MBEDTLS_DHM_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
  899. * MBEDTLS_X509_CRT_PARSE_C
  900. *
  901. * This enables the following ciphersuites (if other requisites are
  902. * enabled as well):
  903. * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
  904. * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
  905. * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
  906. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
  907. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
  908. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
  909. * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
  910. * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
  911. * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
  912. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
  913. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
  914. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
  915. * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
  916. *
  917. * \warning Using DHE constitutes a security risk as it
  918. * is not possible to validate custom DH parameters.
  919. * If possible, it is recommended users should consider
  920. * preferring other methods of key exchange.
  921. * See dhm.h for more details.
  922. *
  923. */
  924. //#define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
  925. /**
  926. * \def MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
  927. *
  928. * Enable the ECDHE-RSA based ciphersuite modes in SSL / TLS.
  929. *
  930. * Requires: MBEDTLS_ECDH_C, MBEDTLS_RSA_C, MBEDTLS_PKCS1_V15,
  931. * MBEDTLS_X509_CRT_PARSE_C
  932. *
  933. * This enables the following ciphersuites (if other requisites are
  934. * enabled as well):
  935. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  936. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
  937. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
  938. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
  939. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
  940. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  941. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  942. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  943. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
  944. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
  945. * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
  946. * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
  947. */
  948. //#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
  949. /**
  950. * \def MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
  951. *
  952. * Enable the ECDHE-ECDSA based ciphersuite modes in SSL / TLS.
  953. *
  954. * Requires: MBEDTLS_ECDH_C, MBEDTLS_ECDSA_C, MBEDTLS_X509_CRT_PARSE_C,
  955. *
  956. * This enables the following ciphersuites (if other requisites are
  957. * enabled as well):
  958. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  959. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
  960. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  961. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
  962. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
  963. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  964. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  965. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  966. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
  967. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
  968. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
  969. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
  970. */
  971. //#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
  972. /**
  973. * \def MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
  974. *
  975. * Enable the ECDH-ECDSA based ciphersuite modes in SSL / TLS.
  976. *
  977. * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
  978. *
  979. * This enables the following ciphersuites (if other requisites are
  980. * enabled as well):
  981. * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
  982. * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
  983. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
  984. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
  985. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
  986. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
  987. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
  988. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
  989. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
  990. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
  991. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
  992. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
  993. */
  994. //#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
  995. /**
  996. * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
  997. *
  998. * Enable the ECDH-RSA based ciphersuite modes in SSL / TLS.
  999. *
  1000. * Requires: MBEDTLS_ECDH_C, MBEDTLS_X509_CRT_PARSE_C
  1001. *
  1002. * This enables the following ciphersuites (if other requisites are
  1003. * enabled as well):
  1004. * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
  1005. * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
  1006. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
  1007. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
  1008. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
  1009. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
  1010. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
  1011. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
  1012. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
  1013. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
  1014. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
  1015. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
  1016. */
  1017. //#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
  1018. /**
  1019. * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
  1020. *
  1021. * Enable the ECJPAKE based ciphersuite modes in SSL / TLS.
  1022. *
  1023. * \warning This is currently experimental. EC J-PAKE support is based on the
  1024. * Thread v1.0.0 specification; incompatible changes to the specification
  1025. * might still happen. For this reason, this is disabled by default.
  1026. *
  1027. * Requires: MBEDTLS_ECJPAKE_C
  1028. * MBEDTLS_SHA256_C
  1029. * MBEDTLS_ECP_DP_SECP256R1_ENABLED
  1030. *
  1031. * This enables the following ciphersuites (if other requisites are
  1032. * enabled as well):
  1033. * MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8
  1034. */
  1035. //#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
  1036. /**
  1037. * \def MBEDTLS_PK_PARSE_EC_EXTENDED
  1038. *
  1039. * Enhance support for reading EC keys using variants of SEC1 not allowed by
  1040. * RFC 5915 and RFC 5480.
  1041. *
  1042. * Currently this means parsing the SpecifiedECDomain choice of EC
  1043. * parameters (only known groups are supported, not arbitrary domains, to
  1044. * avoid validation issues).
  1045. *
  1046. * Disable if you only need to support RFC 5915 + 5480 key formats.
  1047. */
  1048. //#define MBEDTLS_PK_PARSE_EC_EXTENDED
  1049. /**
  1050. * \def MBEDTLS_ERROR_STRERROR_DUMMY
  1051. *
  1052. * Enable a dummy error function to make use of mbedtls_strerror() in
  1053. * third party libraries easier when MBEDTLS_ERROR_C is disabled
  1054. * (no effect when MBEDTLS_ERROR_C is enabled).
  1055. *
  1056. * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're
  1057. * not using mbedtls_strerror() or error_strerror() in your application.
  1058. *
  1059. * Disable if you run into name conflicts and want to really remove the
  1060. * mbedtls_strerror()
  1061. */
  1062. #define MBEDTLS_ERROR_STRERROR_DUMMY
  1063. /**
  1064. * \def MBEDTLS_GENPRIME
  1065. *
  1066. * Enable the prime-number generation code.
  1067. *
  1068. * Requires: MBEDTLS_BIGNUM_C
  1069. */
  1070. #define MBEDTLS_GENPRIME
  1071. /**
  1072. * \def MBEDTLS_FS_IO
  1073. *
  1074. * Enable functions that use the filesystem.
  1075. */
  1076. //#define MBEDTLS_FS_IO
  1077. /**
  1078. * \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
  1079. *
  1080. * Do not add default entropy sources. These are the platform specific,
  1081. * mbedtls_timing_hardclock and HAVEGE based poll functions.
  1082. *
  1083. * This is useful to have more control over the added entropy sources in an
  1084. * application.
  1085. *
  1086. * Uncomment this macro to prevent loading of default entropy functions.
  1087. */
  1088. #define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
  1089. /**
  1090. * \def MBEDTLS_NO_PLATFORM_ENTROPY
  1091. *
  1092. * Do not use built-in platform entropy functions.
  1093. * This is useful if your platform does not support
  1094. * standards like the /dev/urandom or Windows CryptoAPI.
  1095. *
  1096. * Uncomment this macro to disable the built-in platform entropy functions.
  1097. */
  1098. #define MBEDTLS_NO_PLATFORM_ENTROPY
  1099. /**
  1100. * \def MBEDTLS_ENTROPY_FORCE_SHA256
  1101. *
  1102. * Force the entropy accumulator to use a SHA-256 accumulator instead of the
  1103. * default SHA-512 based one (if both are available).
  1104. *
  1105. * Requires: MBEDTLS_SHA256_C
  1106. *
  1107. * On 32-bit systems SHA-256 can be much faster than SHA-512. Use this option
  1108. * if you have performance concerns.
  1109. *
  1110. * This option is only useful if both MBEDTLS_SHA256_C and
  1111. * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
  1112. */
  1113. #define MBEDTLS_ENTROPY_FORCE_SHA256
  1114. /**
  1115. * \def MBEDTLS_ENTROPY_NV_SEED
  1116. *
  1117. * Enable the non-volatile (NV) seed file-based entropy source.
  1118. * (Also enables the NV seed read/write functions in the platform layer)
  1119. *
  1120. * This is crucial (if not required) on systems that do not have a
  1121. * cryptographic entropy source (in hardware or kernel) available.
  1122. *
  1123. * Requires: MBEDTLS_ENTROPY_C, MBEDTLS_PLATFORM_C
  1124. *
  1125. * \note The read/write functions that are used by the entropy source are
  1126. * determined in the platform layer, and can be modified at runtime and/or
  1127. * compile-time depending on the flags (MBEDTLS_PLATFORM_NV_SEED_*) used.
  1128. *
  1129. * \note If you use the default implementation functions that read a seedfile
  1130. * with regular fopen(), please make sure you make a seedfile with the
  1131. * proper name (defined in MBEDTLS_PLATFORM_STD_NV_SEED_FILE) and at
  1132. * least MBEDTLS_ENTROPY_BLOCK_SIZE bytes in size that can be read from
  1133. * and written to or you will get an entropy source error! The default
  1134. * implementation will only use the first MBEDTLS_ENTROPY_BLOCK_SIZE
  1135. * bytes from the file.
  1136. *
  1137. * \note The entropy collector will write to the seed file before entropy is
  1138. * given to an external source, to update it.
  1139. */
  1140. //#define MBEDTLS_ENTROPY_NV_SEED
  1141. /**
  1142. * \def MBEDTLS_MEMORY_DEBUG
  1143. *
  1144. * Enable debugging of buffer allocator memory issues. Automatically prints
  1145. * (to stderr) all (fatal) messages on memory allocation issues. Enables
  1146. * function for 'debug output' of allocated memory.
  1147. *
  1148. * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
  1149. *
  1150. * Uncomment this macro to let the buffer allocator print out error messages.
  1151. */
  1152. //#define MBEDTLS_MEMORY_DEBUG
  1153. /**
  1154. * \def MBEDTLS_MEMORY_BACKTRACE
  1155. *
  1156. * Include backtrace information with each allocated block.
  1157. *
  1158. * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C
  1159. * GLIBC-compatible backtrace() an backtrace_symbols() support
  1160. *
  1161. * Uncomment this macro to include backtrace information
  1162. */
  1163. //#define MBEDTLS_MEMORY_BACKTRACE
  1164. /**
  1165. * \def MBEDTLS_PK_RSA_ALT_SUPPORT
  1166. *
  1167. * Support external private RSA keys (eg from a HSM) in the PK layer.
  1168. *
  1169. * Comment this macro to disable support for external private RSA keys.
  1170. */
  1171. //#define MBEDTLS_PK_RSA_ALT_SUPPORT
  1172. /**
  1173. * \def MBEDTLS_PKCS1_V15
  1174. *
  1175. * Enable support for PKCS#1 v1.5 encoding.
  1176. *
  1177. * Requires: MBEDTLS_RSA_C
  1178. *
  1179. * This enables support for PKCS#1 v1.5 operations.
  1180. */
  1181. //#define MBEDTLS_PKCS1_V15
  1182. /**
  1183. * \def MBEDTLS_PKCS1_V21
  1184. *
  1185. * Enable support for PKCS#1 v2.1 encoding.
  1186. *
  1187. * Requires: MBEDTLS_MD_C, MBEDTLS_RSA_C
  1188. *
  1189. * This enables support for RSAES-OAEP and RSASSA-PSS operations.
  1190. */
  1191. //#define MBEDTLS_PKCS1_V21
  1192. /**
  1193. * \def MBEDTLS_RSA_NO_CRT
  1194. *
  1195. * Do not use the Chinese Remainder Theorem
  1196. * for the RSA private operation.
  1197. *
  1198. * Uncomment this macro to disable the use of CRT in RSA.
  1199. *
  1200. */
  1201. //#define MBEDTLS_RSA_NO_CRT
  1202. /**
  1203. * \def MBEDTLS_SELF_TEST
  1204. *
  1205. * Enable the checkup functions (*_self_test).
  1206. */
  1207. //#define MBEDTLS_SELF_TEST
  1208. /**
  1209. * \def MBEDTLS_SHA256_SMALLER
  1210. *
  1211. * Enable an implementation of SHA-256 that has lower ROM footprint but also
  1212. * lower performance.
  1213. *
  1214. * The default implementation is meant to be a reasonnable compromise between
  1215. * performance and size. This version optimizes more aggressively for size at
  1216. * the expense of performance. Eg on Cortex-M4 it reduces the size of
  1217. * mbedtls_sha256_process() from ~2KB to ~0.5KB for a performance hit of about
  1218. * 30%.
  1219. *
  1220. * Uncomment to enable the smaller implementation of SHA256.
  1221. */
  1222. //#define MBEDTLS_SHA256_SMALLER
  1223. /**
  1224. * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
  1225. *
  1226. * Enable sending of alert messages in case of encountered errors as per RFC.
  1227. * If you choose not to send the alert messages, mbed TLS can still communicate
  1228. * with other servers, only debugging of failures is harder.
  1229. *
  1230. * The advantage of not sending alert messages, is that no information is given
  1231. * about reasons for failures thus preventing adversaries of gaining intel.
  1232. *
  1233. * Enable sending of all alert messages
  1234. */
  1235. #define MBEDTLS_SSL_ALL_ALERT_MESSAGES
  1236. /**
  1237. * \def MBEDTLS_SSL_ASYNC_PRIVATE
  1238. *
  1239. * Enable asynchronous external private key operations in SSL. This allows
  1240. * you to configure an SSL connection to call an external cryptographic
  1241. * module to perform private key operations instead of performing the
  1242. * operation inside the library.
  1243. *
  1244. */
  1245. //#define MBEDTLS_SSL_ASYNC_PRIVATE
  1246. /**
  1247. * \def MBEDTLS_SSL_DEBUG_ALL
  1248. *
  1249. * Enable the debug messages in SSL module for all issues.
  1250. * Debug messages have been disabled in some places to prevent timing
  1251. * attacks due to (unbalanced) debugging function calls.
  1252. *
  1253. * If you need all error reporting you should enable this during debugging,
  1254. * but remove this for production servers that should log as well.
  1255. *
  1256. * Uncomment this macro to report all debug messages on errors introducing
  1257. * a timing side-channel.
  1258. *
  1259. */
  1260. //#define MBEDTLS_SSL_DEBUG_ALL
  1261. /** \def MBEDTLS_SSL_ENCRYPT_THEN_MAC
  1262. *
  1263. * Enable support for Encrypt-then-MAC, RFC 7366.
  1264. *
  1265. * This allows peers that both support it to use a more robust protection for
  1266. * ciphersuites using CBC, providing deep resistance against timing attacks
  1267. * on the padding or underlying cipher.
  1268. *
  1269. * This only affects CBC ciphersuites, and is useless if none is defined.
  1270. *
  1271. * Requires: MBEDTLS_SSL_PROTO_TLS1 or
  1272. * MBEDTLS_SSL_PROTO_TLS1_1 or
  1273. * MBEDTLS_SSL_PROTO_TLS1_2
  1274. *
  1275. * Comment this macro to disable support for Encrypt-then-MAC
  1276. */
  1277. #define MBEDTLS_SSL_ENCRYPT_THEN_MAC
  1278. /** \def MBEDTLS_SSL_EXTENDED_MASTER_SECRET
  1279. *
  1280. * Enable support for Extended Master Secret, aka Session Hash
  1281. * (draft-ietf-tls-session-hash-02).
  1282. *
  1283. * This was introduced as "the proper fix" to the Triple Handshake familiy of
  1284. * attacks, but it is recommended to always use it (even if you disable
  1285. * renegotiation), since it actually fixes a more fundamental issue in the
  1286. * original SSL/TLS design, and has implications beyond Triple Handshake.
  1287. *
  1288. * Requires: MBEDTLS_SSL_PROTO_TLS1 or
  1289. * MBEDTLS_SSL_PROTO_TLS1_1 or
  1290. * MBEDTLS_SSL_PROTO_TLS1_2
  1291. *
  1292. * Comment this macro to disable support for Extended Master Secret.
  1293. */
  1294. #define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
  1295. /**
  1296. * \def MBEDTLS_SSL_FALLBACK_SCSV
  1297. *
  1298. * Enable support for FALLBACK_SCSV (draft-ietf-tls-downgrade-scsv-00).
  1299. *
  1300. * For servers, it is recommended to always enable this, unless you support
  1301. * only one version of TLS, or know for sure that none of your clients
  1302. * implements a fallback strategy.
  1303. *
  1304. * For clients, you only need this if you're using a fallback strategy, which
  1305. * is not recommended in the first place, unless you absolutely need it to
  1306. * interoperate with buggy (version-intolerant) servers.
  1307. *
  1308. * Comment this macro to disable support for FALLBACK_SCSV
  1309. */
  1310. //#define MBEDTLS_SSL_FALLBACK_SCSV
  1311. /**
  1312. * \def MBEDTLS_SSL_HW_RECORD_ACCEL
  1313. *
  1314. * Enable hooking functions in SSL module for hardware acceleration of
  1315. * individual records.
  1316. *
  1317. * Uncomment this macro to enable hooking functions.
  1318. */
  1319. //#define MBEDTLS_SSL_HW_RECORD_ACCEL
  1320. /**
  1321. * \def MBEDTLS_SSL_CBC_RECORD_SPLITTING
  1322. *
  1323. * Enable 1/n-1 record splitting for CBC mode in SSLv3 and TLS 1.0.
  1324. *
  1325. * This is a countermeasure to the BEAST attack, which also minimizes the risk
  1326. * of interoperability issues compared to sending 0-length records.
  1327. *
  1328. * Comment this macro to disable 1/n-1 record splitting.
  1329. */
  1330. //#define MBEDTLS_SSL_CBC_RECORD_SPLITTING
  1331. /**
  1332. * \def MBEDTLS_SSL_RENEGOTIATION
  1333. *
  1334. * Enable support for TLS renegotiation.
  1335. *
  1336. * The two main uses of renegotiation are (1) refresh keys on long-lived
  1337. * connections and (2) client authentication after the initial handshake.
  1338. * If you don't need renegotiation, it's probably better to disable it, since
  1339. * it has been associated with security issues in the past and is easy to
  1340. * misuse/misunderstand.
  1341. *
  1342. * Comment this to disable support for renegotiation.
  1343. *
  1344. * \note Even if this option is disabled, both client and server are aware
  1345. * of the Renegotiation Indication Extension (RFC 5746) used to
  1346. * prevent the SSL renegotiation attack (see RFC 5746 Sect. 1).
  1347. * (See \c mbedtls_ssl_conf_legacy_renegotiation for the
  1348. * configuration of this extension).
  1349. *
  1350. */
  1351. #define MBEDTLS_SSL_RENEGOTIATION
  1352. /**
  1353. * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
  1354. *
  1355. * Enable support for receiving and parsing SSLv2 Client Hello messages for the
  1356. * SSL Server module (MBEDTLS_SSL_SRV_C).
  1357. *
  1358. * Uncomment this macro to enable support for SSLv2 Client Hello messages.
  1359. */
  1360. //#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
  1361. /**
  1362. * \def MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
  1363. *
  1364. * Pick the ciphersuite according to the client's preferences rather than ours
  1365. * in the SSL Server module (MBEDTLS_SSL_SRV_C).
  1366. *
  1367. * Uncomment this macro to respect client's ciphersuite order
  1368. */
  1369. //#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
  1370. /**
  1371. * \def MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
  1372. *
  1373. * Enable support for RFC 6066 max_fragment_length extension in SSL.
  1374. *
  1375. * Comment this macro to disable support for the max_fragment_length extension
  1376. */
  1377. #define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
  1378. /**
  1379. * \def MBEDTLS_SSL_PROTO_SSL3
  1380. *
  1381. * Enable support for SSL 3.0.
  1382. *
  1383. * Requires: MBEDTLS_MD5_C
  1384. * MBEDTLS_SHA1_C
  1385. *
  1386. * Comment this macro to disable support for SSL 3.0
  1387. */
  1388. //#define MBEDTLS_SSL_PROTO_SSL3
  1389. /**
  1390. * \def MBEDTLS_SSL_PROTO_TLS1
  1391. *
  1392. * Enable support for TLS 1.0.
  1393. *
  1394. * Requires: MBEDTLS_MD5_C
  1395. * MBEDTLS_SHA1_C
  1396. *
  1397. * Comment this macro to disable support for TLS 1.0
  1398. */
  1399. //#define MBEDTLS_SSL_PROTO_TLS1
  1400. /**
  1401. * \def MBEDTLS_SSL_PROTO_TLS1_1
  1402. *
  1403. * Enable support for TLS 1.1 (and DTLS 1.0 if DTLS is enabled).
  1404. *
  1405. * Requires: MBEDTLS_MD5_C
  1406. * MBEDTLS_SHA1_C
  1407. *
  1408. * Comment this macro to disable support for TLS 1.1 / DTLS 1.0
  1409. */
  1410. //#define MBEDTLS_SSL_PROTO_TLS1_1
  1411. /**
  1412. * \def MBEDTLS_SSL_PROTO_TLS1_2
  1413. *
  1414. * Enable support for TLS 1.2 (and DTLS 1.2 if DTLS is enabled).
  1415. *
  1416. * Requires: MBEDTLS_SHA1_C or MBEDTLS_SHA256_C or MBEDTLS_SHA512_C
  1417. * (Depends on ciphersuites)
  1418. *
  1419. * Comment this macro to disable support for TLS 1.2 / DTLS 1.2
  1420. */
  1421. #define MBEDTLS_SSL_PROTO_TLS1_2
  1422. /**
  1423. * \def MBEDTLS_SSL_PROTO_DTLS
  1424. *
  1425. * Enable support for DTLS (all available versions).
  1426. *
  1427. * Enable this and MBEDTLS_SSL_PROTO_TLS1_1 to enable DTLS 1.0,
  1428. * and/or this and MBEDTLS_SSL_PROTO_TLS1_2 to enable DTLS 1.2.
  1429. *
  1430. * Requires: MBEDTLS_SSL_PROTO_TLS1_1
  1431. * or MBEDTLS_SSL_PROTO_TLS1_2
  1432. *
  1433. * Comment this macro to disable support for DTLS
  1434. */
  1435. #define MBEDTLS_SSL_PROTO_DTLS
  1436. /**
  1437. * \def MBEDTLS_SSL_ALPN
  1438. *
  1439. * Enable support for RFC 7301 Application Layer Protocol Negotiation.
  1440. *
  1441. * Comment this macro to disable support for ALPN.
  1442. */
  1443. //#define MBEDTLS_SSL_ALPN
  1444. /**
  1445. * \def MBEDTLS_SSL_DTLS_ANTI_REPLAY
  1446. *
  1447. * Enable support for the anti-replay mechanism in DTLS.
  1448. *
  1449. * Requires: MBEDTLS_SSL_TLS_C
  1450. * MBEDTLS_SSL_PROTO_DTLS
  1451. *
  1452. * \warning Disabling this is often a security risk!
  1453. * See mbedtls_ssl_conf_dtls_anti_replay() for details.
  1454. *
  1455. * Comment this to disable anti-replay in DTLS.
  1456. */
  1457. #define MBEDTLS_SSL_DTLS_ANTI_REPLAY
  1458. /**
  1459. * \def MBEDTLS_SSL_DTLS_HELLO_VERIFY
  1460. *
  1461. * Enable support for HelloVerifyRequest on DTLS servers.
  1462. *
  1463. * This feature is highly recommended to prevent DTLS servers being used as
  1464. * amplifiers in DoS attacks against other hosts. It should always be enabled
  1465. * unless you know for sure amplification cannot be a problem in the
  1466. * environment in which your server operates.
  1467. *
  1468. * \warning Disabling this can ba a security risk! (see above)
  1469. *
  1470. * Requires: MBEDTLS_SSL_PROTO_DTLS
  1471. *
  1472. * Comment this to disable support for HelloVerifyRequest.
  1473. */
  1474. #define MBEDTLS_SSL_DTLS_HELLO_VERIFY
  1475. /**
  1476. * \def MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
  1477. *
  1478. * Enable server-side support for clients that reconnect from the same port.
  1479. *
  1480. * Some clients unexpectedly close the connection and try to reconnect using the
  1481. * same source port. This needs special support from the server to handle the
  1482. * new connection securely, as described in section 4.2.8 of RFC 6347. This
  1483. * flag enables that support.
  1484. *
  1485. * Requires: MBEDTLS_SSL_DTLS_HELLO_VERIFY
  1486. *
  1487. * Comment this to disable support for clients reusing the source port.
  1488. */
  1489. //#define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
  1490. /**
  1491. * \def MBEDTLS_SSL_DTLS_BADMAC_LIMIT
  1492. *
  1493. * Enable support for a limit of records with bad MAC.
  1494. *
  1495. * See mbedtls_ssl_conf_dtls_badmac_limit().
  1496. *
  1497. * Requires: MBEDTLS_SSL_PROTO_DTLS
  1498. */
  1499. #define MBEDTLS_SSL_DTLS_BADMAC_LIMIT
  1500. /**
  1501. * \def MBEDTLS_SSL_SESSION_TICKETS
  1502. *
  1503. * Enable support for RFC 5077 session tickets in SSL.
  1504. * Client-side, provides full support for session tickets (maintenance of a
  1505. * session store remains the responsibility of the application, though).
  1506. * Server-side, you also need to provide callbacks for writing and parsing
  1507. * tickets, including authenticated encryption and key management. Example
  1508. * callbacks are provided by MBEDTLS_SSL_TICKET_C.
  1509. *
  1510. * Comment this macro to disable support for SSL session tickets
  1511. */
  1512. #define MBEDTLS_SSL_SESSION_TICKETS
  1513. /**
  1514. * \def MBEDTLS_SSL_EXPORT_KEYS
  1515. *
  1516. * Enable support for exporting key block and master secret.
  1517. * This is required for certain users of TLS, e.g. EAP-TLS.
  1518. *
  1519. * Comment this macro to disable support for key export
  1520. */
  1521. //#define MBEDTLS_SSL_EXPORT_KEYS
  1522. /**
  1523. * \def MBEDTLS_SSL_SERVER_NAME_INDICATION
  1524. *
  1525. * Enable support for RFC 6066 server name indication (SNI) in SSL.
  1526. *
  1527. * Requires: MBEDTLS_X509_CRT_PARSE_C
  1528. *
  1529. * Comment this macro to disable support for server name indication in SSL
  1530. */
  1531. //#define MBEDTLS_SSL_SERVER_NAME_INDICATION
  1532. /**
  1533. * \def MBEDTLS_SSL_TRUNCATED_HMAC
  1534. *
  1535. * Enable support for RFC 6066 truncated HMAC in SSL.
  1536. *
  1537. * Comment this macro to disable support for truncated HMAC in SSL
  1538. */
  1539. //#define MBEDTLS_SSL_TRUNCATED_HMAC
  1540. /**
  1541. * \def MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT
  1542. *
  1543. * Fallback to old (pre-2.7), non-conforming implementation of the truncated
  1544. * HMAC extension which also truncates the HMAC key. Note that this option is
  1545. * only meant for a transitory upgrade period and is likely to be removed in
  1546. * a future version of the library.
  1547. *
  1548. * \warning The old implementation is non-compliant and has a security weakness
  1549. * (2^80 brute force attack on the HMAC key used for a single,
  1550. * uninterrupted connection). This should only be enabled temporarily
  1551. * when (1) the use of truncated HMAC is essential in order to save
  1552. * bandwidth, and (2) the peer is an Mbed TLS stack that doesn't use
  1553. * the fixed implementation yet (pre-2.7).
  1554. *
  1555. * \deprecated This option is deprecated and will likely be removed in a
  1556. * future version of Mbed TLS.
  1557. *
  1558. * Uncomment to fallback to old, non-compliant truncated HMAC implementation.
  1559. *
  1560. * Requires: MBEDTLS_SSL_TRUNCATED_HMAC
  1561. */
  1562. //#define MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT
  1563. /**
  1564. * \def MBEDTLS_THREADING_ALT
  1565. *
  1566. * Provide your own alternate threading implementation.
  1567. *
  1568. * Requires: MBEDTLS_THREADING_C
  1569. *
  1570. * Uncomment this to allow your own alternate threading implementation.
  1571. */
  1572. //#define MBEDTLS_THREADING_ALT
  1573. /**
  1574. * \def MBEDTLS_THREADING_PTHREAD
  1575. *
  1576. * Enable the pthread wrapper layer for the threading layer.
  1577. *
  1578. * Requires: MBEDTLS_THREADING_C
  1579. *
  1580. * Uncomment this to enable pthread mutexes.
  1581. */
  1582. //#define MBEDTLS_THREADING_PTHREAD
  1583. /**
  1584. * \def MBEDTLS_VERSION_FEATURES
  1585. *
  1586. * Allow run-time checking of compile-time enabled features. Thus allowing users
  1587. * to check at run-time if the library is for instance compiled with threading
  1588. * support via mbedtls_version_check_feature().
  1589. *
  1590. * Requires: MBEDTLS_VERSION_C
  1591. *
  1592. * Comment this to disable run-time checking and save ROM space
  1593. */
  1594. #define MBEDTLS_VERSION_FEATURES
  1595. /**
  1596. * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
  1597. *
  1598. * If set, the X509 parser will not break-off when parsing an X509 certificate
  1599. * and encountering an extension in a v1 or v2 certificate.
  1600. *
  1601. * Uncomment to prevent an error.
  1602. */
  1603. //#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
  1604. /**
  1605. * \def MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
  1606. *
  1607. * If set, the X509 parser will not break-off when parsing an X509 certificate
  1608. * and encountering an unknown critical extension.
  1609. *
  1610. * \warning Depending on your PKI use, enabling this can be a security risk!
  1611. *
  1612. * Uncomment to prevent an error.
  1613. */
  1614. //#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
  1615. /**
  1616. * \def MBEDTLS_X509_CHECK_KEY_USAGE
  1617. *
  1618. * Enable verification of the keyUsage extension (CA and leaf certificates).
  1619. *
  1620. * Disabling this avoids problems with mis-issued and/or misused
  1621. * (intermediate) CA and leaf certificates.
  1622. *
  1623. * \warning Depending on your PKI use, disabling this can be a security risk!
  1624. *
  1625. * Comment to skip keyUsage checking for both CA and leaf certificates.
  1626. */
  1627. //#define MBEDTLS_X509_CHECK_KEY_USAGE
  1628. /**
  1629. * \def MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
  1630. *
  1631. * Enable verification of the extendedKeyUsage extension (leaf certificates).
  1632. *
  1633. * Disabling this avoids problems with mis-issued and/or misused certificates.
  1634. *
  1635. * \warning Depending on your PKI use, disabling this can be a security risk!
  1636. *
  1637. * Comment to skip extendedKeyUsage checking for certificates.
  1638. */
  1639. //#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
  1640. /**
  1641. * \def MBEDTLS_X509_RSASSA_PSS_SUPPORT
  1642. *
  1643. * Enable parsing and verification of X.509 certificates, CRLs and CSRS
  1644. * signed with RSASSA-PSS (aka PKCS#1 v2.1).
  1645. *
  1646. * Comment this macro to disallow using RSASSA-PSS in certificates.
  1647. */
  1648. //#define MBEDTLS_X509_RSASSA_PSS_SUPPORT
  1649. /**
  1650. * \def MBEDTLS_ZLIB_SUPPORT
  1651. *
  1652. * If set, the SSL/TLS module uses ZLIB to support compression and
  1653. * decompression of packet data.
  1654. *
  1655. * \warning TLS-level compression MAY REDUCE SECURITY! See for example the
  1656. * CRIME attack. Before enabling this option, you should examine with care if
  1657. * CRIME or similar exploits may be applicable to your use case.
  1658. *
  1659. * \note Currently compression can't be used with DTLS.
  1660. *
  1661. * \deprecated This feature is deprecated and will be removed
  1662. * in the next major revision of the library.
  1663. *
  1664. * Used in: library/ssl_tls.c
  1665. * library/ssl_cli.c
  1666. * library/ssl_srv.c
  1667. *
  1668. * This feature requires zlib library and headers to be present.
  1669. *
  1670. * Uncomment to enable use of ZLIB
  1671. */
  1672. //#define MBEDTLS_ZLIB_SUPPORT
  1673. /* \} name SECTION: mbed TLS feature support */
  1674. /**
  1675. * \name SECTION: mbed TLS modules
  1676. *
  1677. * This section enables or disables entire modules in mbed TLS
  1678. * \{
  1679. */
  1680. /**
  1681. * \def MBEDTLS_AESNI_C
  1682. *
  1683. * Enable AES-NI support on x86-64.
  1684. *
  1685. * Module: library/aesni.c
  1686. * Caller: library/aes.c
  1687. *
  1688. * Requires: MBEDTLS_HAVE_ASM
  1689. *
  1690. * This modules adds support for the AES-NI instructions on x86-64
  1691. */
  1692. //#define MBEDTLS_AESNI_C
  1693. /**
  1694. * \def MBEDTLS_AES_C
  1695. *
  1696. * Enable the AES block cipher.
  1697. *
  1698. * Module: library/aes.c
  1699. * Caller: library/cipher.c
  1700. * library/pem.c
  1701. * library/ctr_drbg.c
  1702. *
  1703. * This module enables the following ciphersuites (if other requisites are
  1704. * enabled as well):
  1705. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA
  1706. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
  1707. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA
  1708. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
  1709. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256
  1710. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
  1711. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256
  1712. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
  1713. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256
  1714. * MBEDTLS_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
  1715. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256
  1716. * MBEDTLS_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
  1717. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  1718. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  1719. * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
  1720. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
  1721. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
  1722. * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
  1723. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  1724. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
  1725. * MBEDTLS_TLS_DHE_RSA_WITH_AES_256_CBC_SHA
  1726. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  1727. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  1728. * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
  1729. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  1730. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  1731. * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
  1732. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  1733. * MBEDTLS_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  1734. * MBEDTLS_TLS_DHE_RSA_WITH_AES_128_CBC_SHA
  1735. * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384
  1736. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384
  1737. * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384
  1738. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA
  1739. * MBEDTLS_TLS_DHE_PSK_WITH_AES_256_CBC_SHA
  1740. * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256
  1741. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256
  1742. * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256
  1743. * MBEDTLS_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA
  1744. * MBEDTLS_TLS_DHE_PSK_WITH_AES_128_CBC_SHA
  1745. * MBEDTLS_TLS_RSA_WITH_AES_256_GCM_SHA384
  1746. * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA256
  1747. * MBEDTLS_TLS_RSA_WITH_AES_256_CBC_SHA
  1748. * MBEDTLS_TLS_RSA_WITH_AES_128_GCM_SHA256
  1749. * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA256
  1750. * MBEDTLS_TLS_RSA_WITH_AES_128_CBC_SHA
  1751. * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384
  1752. * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384
  1753. * MBEDTLS_TLS_RSA_PSK_WITH_AES_256_CBC_SHA
  1754. * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256
  1755. * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256
  1756. * MBEDTLS_TLS_RSA_PSK_WITH_AES_128_CBC_SHA
  1757. * MBEDTLS_TLS_PSK_WITH_AES_256_GCM_SHA384
  1758. * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA384
  1759. * MBEDTLS_TLS_PSK_WITH_AES_256_CBC_SHA
  1760. * MBEDTLS_TLS_PSK_WITH_AES_128_GCM_SHA256
  1761. * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA256
  1762. * MBEDTLS_TLS_PSK_WITH_AES_128_CBC_SHA
  1763. *
  1764. * PEM_PARSE uses AES for decrypting encrypted keys.
  1765. */
  1766. #define MBEDTLS_AES_C
  1767. /**
  1768. * \def MBEDTLS_ARC4_C
  1769. *
  1770. * Enable the ARCFOUR stream cipher.
  1771. *
  1772. * Module: library/arc4.c
  1773. * Caller: library/cipher.c
  1774. *
  1775. * This module enables the following ciphersuites (if other requisites are
  1776. * enabled as well):
  1777. * MBEDTLS_TLS_ECDH_ECDSA_WITH_RC4_128_SHA
  1778. * MBEDTLS_TLS_ECDH_RSA_WITH_RC4_128_SHA
  1779. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA
  1780. * MBEDTLS_TLS_ECDHE_RSA_WITH_RC4_128_SHA
  1781. * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
  1782. * MBEDTLS_TLS_DHE_PSK_WITH_RC4_128_SHA
  1783. * MBEDTLS_TLS_RSA_WITH_RC4_128_SHA
  1784. * MBEDTLS_TLS_RSA_WITH_RC4_128_MD5
  1785. * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
  1786. * MBEDTLS_TLS_PSK_WITH_RC4_128_SHA
  1787. *
  1788. * \warning ARC4 is considered a weak cipher and its use constitutes a
  1789. * security risk. If possible, we recommend avoidng dependencies on
  1790. * it, and considering stronger ciphers instead.
  1791. *
  1792. */
  1793. //#define MBEDTLS_ARC4_C
  1794. /**
  1795. * \def MBEDTLS_ASN1_PARSE_C
  1796. *
  1797. * Enable the generic ASN1 parser.
  1798. *
  1799. * Module: library/asn1.c
  1800. * Caller: library/x509.c
  1801. * library/dhm.c
  1802. * library/pkcs12.c
  1803. * library/pkcs5.c
  1804. * library/pkparse.c
  1805. */
  1806. //#define MBEDTLS_ASN1_PARSE_C
  1807. /**
  1808. * \def MBEDTLS_ASN1_WRITE_C
  1809. *
  1810. * Enable the generic ASN1 writer.
  1811. *
  1812. * Module: library/asn1write.c
  1813. * Caller: library/ecdsa.c
  1814. * library/pkwrite.c
  1815. * library/x509_create.c
  1816. * library/x509write_crt.c
  1817. * library/x509write_csr.c
  1818. */
  1819. //#define MBEDTLS_ASN1_WRITE_C
  1820. /**
  1821. * \def MBEDTLS_BASE64_C
  1822. *
  1823. * Enable the Base64 module.
  1824. *
  1825. * Module: library/base64.c
  1826. * Caller: library/pem.c
  1827. *
  1828. * This module is required for PEM support (required by X.509).
  1829. */
  1830. //#define MBEDTLS_BASE64_C
  1831. /**
  1832. * \def MBEDTLS_BIGNUM_C
  1833. *
  1834. * Enable the multi-precision integer library.
  1835. *
  1836. * Module: library/bignum.c
  1837. * Caller: library/dhm.c
  1838. * library/ecp.c
  1839. * library/ecdsa.c
  1840. * library/rsa.c
  1841. * library/rsa_internal.c
  1842. * library/ssl_tls.c
  1843. *
  1844. * This module is required for RSA, DHM and ECC (ECDH, ECDSA) support.
  1845. */
  1846. #define MBEDTLS_BIGNUM_C
  1847. /**
  1848. * \def MBEDTLS_BLOWFISH_C
  1849. *
  1850. * Enable the Blowfish block cipher.
  1851. *
  1852. * Module: library/blowfish.c
  1853. */
  1854. //#define MBEDTLS_BLOWFISH_C
  1855. /**
  1856. * \def MBEDTLS_CAMELLIA_C
  1857. *
  1858. * Enable the Camellia block cipher.
  1859. *
  1860. * Module: library/camellia.c
  1861. * Caller: library/cipher.c
  1862. *
  1863. * This module enables the following ciphersuites (if other requisites are
  1864. * enabled as well):
  1865. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
  1866. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
  1867. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256
  1868. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384
  1869. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
  1870. * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
  1871. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
  1872. * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
  1873. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
  1874. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
  1875. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384
  1876. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384
  1877. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384
  1878. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
  1879. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
  1880. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
  1881. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
  1882. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256
  1883. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256
  1884. * MBEDTLS_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
  1885. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
  1886. * MBEDTLS_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
  1887. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384
  1888. * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
  1889. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384
  1890. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256
  1891. * MBEDTLS_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
  1892. * MBEDTLS_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256
  1893. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384
  1894. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
  1895. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
  1896. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256
  1897. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
  1898. * MBEDTLS_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
  1899. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384
  1900. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384
  1901. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256
  1902. * MBEDTLS_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256
  1903. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384
  1904. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384
  1905. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
  1906. * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
  1907. */
  1908. //#define MBEDTLS_CAMELLIA_C
  1909. /**
  1910. * \def MBEDTLS_ARIA_C
  1911. *
  1912. * Enable the ARIA block cipher.
  1913. *
  1914. * Module: library/aria.c
  1915. * Caller: library/cipher.c
  1916. *
  1917. * This module enables the following ciphersuites (if other requisites are
  1918. * enabled as well):
  1919. *
  1920. * MBEDTLS_TLS_RSA_WITH_ARIA_128_CBC_SHA256
  1921. * MBEDTLS_TLS_RSA_WITH_ARIA_256_CBC_SHA384
  1922. * MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256
  1923. * MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384
  1924. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256
  1925. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384
  1926. * MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256
  1927. * MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384
  1928. * MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256
  1929. * MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384
  1930. * MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256
  1931. * MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384
  1932. * MBEDTLS_TLS_RSA_WITH_ARIA_128_GCM_SHA256
  1933. * MBEDTLS_TLS_RSA_WITH_ARIA_256_GCM_SHA384
  1934. * MBEDTLS_TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256
  1935. * MBEDTLS_TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384
  1936. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256
  1937. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384
  1938. * MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256
  1939. * MBEDTLS_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384
  1940. * MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256
  1941. * MBEDTLS_TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384
  1942. * MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256
  1943. * MBEDTLS_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384
  1944. * MBEDTLS_TLS_PSK_WITH_ARIA_128_CBC_SHA256
  1945. * MBEDTLS_TLS_PSK_WITH_ARIA_256_CBC_SHA384
  1946. * MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256
  1947. * MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384
  1948. * MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256
  1949. * MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384
  1950. * MBEDTLS_TLS_PSK_WITH_ARIA_128_GCM_SHA256
  1951. * MBEDTLS_TLS_PSK_WITH_ARIA_256_GCM_SHA384
  1952. * MBEDTLS_TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256
  1953. * MBEDTLS_TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384
  1954. * MBEDTLS_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256
  1955. * MBEDTLS_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384
  1956. * MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256
  1957. * MBEDTLS_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384
  1958. */
  1959. //#define MBEDTLS_ARIA_C
  1960. /**
  1961. * \def MBEDTLS_CCM_C
  1962. *
  1963. * Enable the Counter with CBC-MAC (CCM) mode for 128-bit block cipher.
  1964. *
  1965. * Module: library/ccm.c
  1966. *
  1967. * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
  1968. *
  1969. * This module enables the AES-CCM ciphersuites, if other requisites are
  1970. * enabled as well.
  1971. */
  1972. #define MBEDTLS_CCM_C
  1973. /**
  1974. * \def MBEDTLS_CERTS_C
  1975. *
  1976. * Enable the test certificates.
  1977. *
  1978. * Module: library/certs.c
  1979. * Caller:
  1980. *
  1981. * This module is used for testing (ssl_client/server).
  1982. */
  1983. //#define MBEDTLS_CERTS_C
  1984. /**
  1985. * \def MBEDTLS_CHACHA20_C
  1986. *
  1987. * Enable the ChaCha20 stream cipher.
  1988. *
  1989. * Module: library/chacha20.c
  1990. */
  1991. #define MBEDTLS_CHACHA20_C
  1992. /**
  1993. * \def MBEDTLS_CHACHAPOLY_C
  1994. *
  1995. * Enable the ChaCha20-Poly1305 AEAD algorithm.
  1996. *
  1997. * Module: library/chachapoly.c
  1998. *
  1999. * This module requires: MBEDTLS_CHACHA20_C, MBEDTLS_POLY1305_C
  2000. */
  2001. #define MBEDTLS_CHACHAPOLY_C
  2002. /**
  2003. * \def MBEDTLS_CIPHER_C
  2004. *
  2005. * Enable the generic cipher layer.
  2006. *
  2007. * Module: library/cipher.c
  2008. * Caller: library/ssl_tls.c
  2009. *
  2010. * Uncomment to enable generic cipher wrappers.
  2011. */
  2012. #define MBEDTLS_CIPHER_C
  2013. /**
  2014. * \def MBEDTLS_CMAC_C
  2015. *
  2016. * Enable the CMAC (Cipher-based Message Authentication Code) mode for block
  2017. * ciphers.
  2018. *
  2019. * Module: library/cmac.c
  2020. *
  2021. * Requires: MBEDTLS_AES_C or MBEDTLS_DES_C
  2022. *
  2023. */
  2024. //#define MBEDTLS_CMAC_C
  2025. /**
  2026. * \def MBEDTLS_CTR_DRBG_C
  2027. *
  2028. * Enable the CTR_DRBG AES-based random generator.
  2029. * The CTR_DRBG generator uses AES-256 by default.
  2030. * To use AES-128 instead, enable \c MBEDTLS_CTR_DRBG_USE_128_BIT_KEY above.
  2031. *
  2032. * \note To achieve a 256-bit security strength with CTR_DRBG,
  2033. * you must use AES-256 *and* use sufficient entropy.
  2034. * See ctr_drbg.h for more details.
  2035. *
  2036. * Module: library/ctr_drbg.c
  2037. * Caller:
  2038. *
  2039. * Requires: MBEDTLS_AES_C
  2040. *
  2041. * This module provides the CTR_DRBG AES random number generator.
  2042. */
  2043. #define MBEDTLS_CTR_DRBG_C
  2044. /**
  2045. * \def MBEDTLS_DEBUG_C
  2046. *
  2047. * Enable the debug functions.
  2048. *
  2049. * Module: library/debug.c
  2050. * Caller: library/ssl_cli.c
  2051. * library/ssl_srv.c
  2052. * library/ssl_tls.c
  2053. *
  2054. * This module provides debugging functions.
  2055. */
  2056. //#define MBEDTLS_DEBUG_C
  2057. /**
  2058. * \def MBEDTLS_DES_C
  2059. *
  2060. * Enable the DES block cipher.
  2061. *
  2062. * Module: library/des.c
  2063. * Caller: library/pem.c
  2064. * library/cipher.c
  2065. *
  2066. * This module enables the following ciphersuites (if other requisites are
  2067. * enabled as well):
  2068. * MBEDTLS_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA
  2069. * MBEDTLS_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA
  2070. * MBEDTLS_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
  2071. * MBEDTLS_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA
  2072. * MBEDTLS_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
  2073. * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
  2074. * MBEDTLS_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA
  2075. * MBEDTLS_TLS_RSA_WITH_3DES_EDE_CBC_SHA
  2076. * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
  2077. * MBEDTLS_TLS_PSK_WITH_3DES_EDE_CBC_SHA
  2078. *
  2079. * PEM_PARSE uses DES/3DES for decrypting encrypted keys.
  2080. *
  2081. * \warning DES is considered a weak cipher and its use constitutes a
  2082. * security risk. We recommend considering stronger ciphers instead.
  2083. */
  2084. //#define MBEDTLS_DES_C
  2085. /**
  2086. * \def MBEDTLS_DHM_C
  2087. *
  2088. * Enable the Diffie-Hellman-Merkle module.
  2089. *
  2090. * Module: library/dhm.c
  2091. * Caller: library/ssl_cli.c
  2092. * library/ssl_srv.c
  2093. *
  2094. * This module is used by the following key exchanges:
  2095. * DHE-RSA, DHE-PSK
  2096. *
  2097. * \warning Using DHE constitutes a security risk as it
  2098. * is not possible to validate custom DH parameters.
  2099. * If possible, it is recommended users should consider
  2100. * preferring other methods of key exchange.
  2101. * See dhm.h for more details.
  2102. *
  2103. */
  2104. //#define MBEDTLS_DHM_C
  2105. /**
  2106. * \def MBEDTLS_ECDH_C
  2107. *
  2108. * Enable the elliptic curve Diffie-Hellman library.
  2109. *
  2110. * Module: library/ecdh.c
  2111. * Caller: library/ssl_cli.c
  2112. * library/ssl_srv.c
  2113. *
  2114. * This module is used by the following key exchanges:
  2115. * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK
  2116. *
  2117. * Requires: MBEDTLS_ECP_C
  2118. */
  2119. //#define MBEDTLS_ECDH_C
  2120. /**
  2121. * \def MBEDTLS_ECDSA_C
  2122. *
  2123. * Enable the elliptic curve DSA library.
  2124. *
  2125. * Module: library/ecdsa.c
  2126. * Caller:
  2127. *
  2128. * This module is used by the following key exchanges:
  2129. * ECDHE-ECDSA
  2130. *
  2131. * Requires: MBEDTLS_ECP_C, MBEDTLS_ASN1_WRITE_C, MBEDTLS_ASN1_PARSE_C
  2132. */
  2133. //#define MBEDTLS_ECDSA_C
  2134. /**
  2135. * \def MBEDTLS_ECJPAKE_C
  2136. *
  2137. * Enable the elliptic curve J-PAKE library.
  2138. *
  2139. * \warning This is currently experimental. EC J-PAKE support is based on the
  2140. * Thread v1.0.0 specification; incompatible changes to the specification
  2141. * might still happen. For this reason, this is disabled by default.
  2142. *
  2143. * Module: library/ecjpake.c
  2144. * Caller:
  2145. *
  2146. * This module is used by the following key exchanges:
  2147. * ECJPAKE
  2148. *
  2149. * Requires: MBEDTLS_ECP_C, MBEDTLS_MD_C
  2150. */
  2151. //#define MBEDTLS_ECJPAKE_C
  2152. /**
  2153. * \def MBEDTLS_ECP_C
  2154. *
  2155. * Enable the elliptic curve over GF(p) library.
  2156. *
  2157. * Module: library/ecp.c
  2158. * Caller: library/ecdh.c
  2159. * library/ecdsa.c
  2160. * library/ecjpake.c
  2161. *
  2162. * Requires: MBEDTLS_BIGNUM_C and at least one MBEDTLS_ECP_DP_XXX_ENABLED
  2163. */
  2164. //#define MBEDTLS_ECP_C
  2165. /**
  2166. * \def MBEDTLS_ENTROPY_C
  2167. *
  2168. * Enable the platform-specific entropy code.
  2169. *
  2170. * Module: library/entropy.c
  2171. * Caller:
  2172. *
  2173. * Requires: MBEDTLS_SHA512_C or MBEDTLS_SHA256_C
  2174. *
  2175. * This module provides a generic entropy pool
  2176. */
  2177. #define MBEDTLS_ENTROPY_C
  2178. /**
  2179. * \def MBEDTLS_ERROR_C
  2180. *
  2181. * Enable error code to error string conversion.
  2182. *
  2183. * Module: library/error.c
  2184. * Caller:
  2185. *
  2186. * This module enables mbedtls_strerror().
  2187. */
  2188. //#define MBEDTLS_ERROR_C
  2189. /**
  2190. * \def MBEDTLS_GCM_C
  2191. *
  2192. * Enable the Galois/Counter Mode (GCM) for AES.
  2193. *
  2194. * Module: library/gcm.c
  2195. *
  2196. * Requires: MBEDTLS_AES_C or MBEDTLS_CAMELLIA_C
  2197. *
  2198. * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other
  2199. * requisites are enabled as well.
  2200. */
  2201. #define MBEDTLS_GCM_C
  2202. /**
  2203. * \def MBEDTLS_HAVEGE_C
  2204. *
  2205. * Enable the HAVEGE random generator.
  2206. *
  2207. * Warning: the HAVEGE random generator is not suitable for virtualized
  2208. * environments
  2209. *
  2210. * Warning: the HAVEGE random generator is dependent on timing and specific
  2211. * processor traits. It is therefore not advised to use HAVEGE as
  2212. * your applications primary random generator or primary entropy pool
  2213. * input. As a secondary input to your entropy pool, it IS able add
  2214. * the (limited) extra entropy it provides.
  2215. *
  2216. * Module: library/havege.c
  2217. * Caller:
  2218. *
  2219. * Requires: MBEDTLS_TIMING_C
  2220. *
  2221. * Uncomment to enable the HAVEGE random generator.
  2222. */
  2223. //#define MBEDTLS_HAVEGE_C
  2224. /**
  2225. * \def MBEDTLS_HKDF_C
  2226. *
  2227. * Enable the HKDF algorithm (RFC 5869).
  2228. *
  2229. * Module: library/hkdf.c
  2230. * Caller:
  2231. *
  2232. * Requires: MBEDTLS_MD_C
  2233. *
  2234. * This module adds support for the Hashed Message Authentication Code
  2235. * (HMAC)-based key derivation function (HKDF).
  2236. */
  2237. #define MBEDTLS_HKDF_C
  2238. /**
  2239. * \def MBEDTLS_HMAC_DRBG_C
  2240. *
  2241. * Enable the HMAC_DRBG random generator.
  2242. *
  2243. * Module: library/hmac_drbg.c
  2244. * Caller:
  2245. *
  2246. * Requires: MBEDTLS_MD_C
  2247. *
  2248. * Uncomment to enable the HMAC_DRBG random number geerator.
  2249. */
  2250. //#define MBEDTLS_HMAC_DRBG_C
  2251. /**
  2252. * \def MBEDTLS_NIST_KW_C
  2253. *
  2254. * Enable the Key Wrapping mode for 128-bit block ciphers,
  2255. * as defined in NIST SP 800-38F. Only KW and KWP modes
  2256. * are supported. At the moment, only AES is approved by NIST.
  2257. *
  2258. * Module: library/nist_kw.c
  2259. *
  2260. * Requires: MBEDTLS_AES_C and MBEDTLS_CIPHER_C
  2261. */
  2262. //#define MBEDTLS_NIST_KW_C
  2263. /**
  2264. * \def MBEDTLS_MD_C
  2265. *
  2266. * Enable the generic message digest layer.
  2267. *
  2268. * Module: library/md.c
  2269. * Caller:
  2270. *
  2271. * Uncomment to enable generic message digest wrappers.
  2272. */
  2273. #define MBEDTLS_MD_C
  2274. /**
  2275. * \def MBEDTLS_MD2_C
  2276. *
  2277. * Enable the MD2 hash algorithm.
  2278. *
  2279. * Module: library/md2.c
  2280. * Caller:
  2281. *
  2282. * Uncomment to enable support for (rare) MD2-signed X.509 certs.
  2283. *
  2284. * \warning MD2 is considered a weak message digest and its use constitutes a
  2285. * security risk. If possible, we recommend avoiding dependencies on
  2286. * it, and considering stronger message digests instead.
  2287. *
  2288. */
  2289. //#define MBEDTLS_MD2_C
  2290. /**
  2291. * \def MBEDTLS_MD4_C
  2292. *
  2293. * Enable the MD4 hash algorithm.
  2294. *
  2295. * Module: library/md4.c
  2296. * Caller:
  2297. *
  2298. * Uncomment to enable support for (rare) MD4-signed X.509 certs.
  2299. *
  2300. * \warning MD4 is considered a weak message digest and its use constitutes a
  2301. * security risk. If possible, we recommend avoiding dependencies on
  2302. * it, and considering stronger message digests instead.
  2303. *
  2304. */
  2305. //#define MBEDTLS_MD4_C
  2306. /**
  2307. * \def MBEDTLS_MD5_C
  2308. *
  2309. * Enable the MD5 hash algorithm.
  2310. *
  2311. * Module: library/md5.c
  2312. * Caller: library/md.c
  2313. * library/pem.c
  2314. * library/ssl_tls.c
  2315. *
  2316. * This module is required for SSL/TLS up to version 1.1, and for TLS 1.2
  2317. * depending on the handshake parameters. Further, it is used for checking
  2318. * MD5-signed certificates, and for PBKDF1 when decrypting PEM-encoded
  2319. * encrypted keys.
  2320. *
  2321. * \warning MD5 is considered a weak message digest and its use constitutes a
  2322. * security risk. If possible, we recommend avoiding dependencies on
  2323. * it, and considering stronger message digests instead.
  2324. *
  2325. */
  2326. #define MBEDTLS_MD5_C
  2327. /**
  2328. * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C
  2329. *
  2330. * Enable the buffer allocator implementation that makes use of a (stack)
  2331. * based buffer to 'allocate' dynamic memory. (replaces calloc() and free()
  2332. * calls)
  2333. *
  2334. * Module: library/memory_buffer_alloc.c
  2335. *
  2336. * Requires: MBEDTLS_PLATFORM_C
  2337. * MBEDTLS_PLATFORM_MEMORY (to use it within mbed TLS)
  2338. *
  2339. * Enable this module to enable the buffer memory allocator.
  2340. */
  2341. //#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
  2342. /**
  2343. * \def MBEDTLS_NET_C
  2344. *
  2345. * Enable the TCP and UDP over IPv6/IPv4 networking routines.
  2346. *
  2347. * \note This module only works on POSIX/Unix (including Linux, BSD and OS X)
  2348. * and Windows. For other platforms, you'll want to disable it, and write your
  2349. * own networking callbacks to be passed to \c mbedtls_ssl_set_bio().
  2350. *
  2351. * \note See also our Knowledge Base article about porting to a new
  2352. * environment:
  2353. * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
  2354. *
  2355. * Module: library/net_sockets.c
  2356. *
  2357. * This module provides networking routines.
  2358. */
  2359. //#define MBEDTLS_NET_C
  2360. /**
  2361. * \def MBEDTLS_OID_C
  2362. *
  2363. * Enable the OID database.
  2364. *
  2365. * Module: library/oid.c
  2366. * Caller: library/asn1write.c
  2367. * library/pkcs5.c
  2368. * library/pkparse.c
  2369. * library/pkwrite.c
  2370. * library/rsa.c
  2371. * library/x509.c
  2372. * library/x509_create.c
  2373. * library/x509_crl.c
  2374. * library/x509_crt.c
  2375. * library/x509_csr.c
  2376. * library/x509write_crt.c
  2377. * library/x509write_csr.c
  2378. *
  2379. * This modules translates between OIDs and internal values.
  2380. */
  2381. #define MBEDTLS_OID_C
  2382. /**
  2383. * \def MBEDTLS_PADLOCK_C
  2384. *
  2385. * Enable VIA Padlock support on x86.
  2386. *
  2387. * Module: library/padlock.c
  2388. * Caller: library/aes.c
  2389. *
  2390. * Requires: MBEDTLS_HAVE_ASM
  2391. *
  2392. * This modules adds support for the VIA PadLock on x86.
  2393. */
  2394. //#define MBEDTLS_PADLOCK_C
  2395. /**
  2396. * \def MBEDTLS_PEM_PARSE_C
  2397. *
  2398. * Enable PEM decoding / parsing.
  2399. *
  2400. * Module: library/pem.c
  2401. * Caller: library/dhm.c
  2402. * library/pkparse.c
  2403. * library/x509_crl.c
  2404. * library/x509_crt.c
  2405. * library/x509_csr.c
  2406. *
  2407. * Requires: MBEDTLS_BASE64_C
  2408. *
  2409. * This modules adds support for decoding / parsing PEM files.
  2410. */
  2411. //#define MBEDTLS_PEM_PARSE_C
  2412. /**
  2413. * \def MBEDTLS_PEM_WRITE_C
  2414. *
  2415. * Enable PEM encoding / writing.
  2416. *
  2417. * Module: library/pem.c
  2418. * Caller: library/pkwrite.c
  2419. * library/x509write_crt.c
  2420. * library/x509write_csr.c
  2421. *
  2422. * Requires: MBEDTLS_BASE64_C
  2423. *
  2424. * This modules adds support for encoding / writing PEM files.
  2425. */
  2426. //#define MBEDTLS_PEM_WRITE_C
  2427. /**
  2428. * \def MBEDTLS_PK_C
  2429. *
  2430. * Enable the generic public (asymetric) key layer.
  2431. *
  2432. * Module: library/pk.c
  2433. * Caller: library/ssl_tls.c
  2434. * library/ssl_cli.c
  2435. * library/ssl_srv.c
  2436. *
  2437. * Requires: MBEDTLS_RSA_C or MBEDTLS_ECP_C
  2438. *
  2439. * Uncomment to enable generic public key wrappers.
  2440. */
  2441. //#define MBEDTLS_PK_C
  2442. /**
  2443. * \def MBEDTLS_PK_PARSE_C
  2444. *
  2445. * Enable the generic public (asymetric) key parser.
  2446. *
  2447. * Module: library/pkparse.c
  2448. * Caller: library/x509_crt.c
  2449. * library/x509_csr.c
  2450. *
  2451. * Requires: MBEDTLS_PK_C
  2452. *
  2453. * Uncomment to enable generic public key parse functions.
  2454. */
  2455. //#define MBEDTLS_PK_PARSE_C
  2456. /**
  2457. * \def MBEDTLS_PK_WRITE_C
  2458. *
  2459. * Enable the generic public (asymetric) key writer.
  2460. *
  2461. * Module: library/pkwrite.c
  2462. * Caller: library/x509write.c
  2463. *
  2464. * Requires: MBEDTLS_PK_C
  2465. *
  2466. * Uncomment to enable generic public key write functions.
  2467. */
  2468. //#define MBEDTLS_PK_WRITE_C
  2469. /**
  2470. * \def MBEDTLS_PKCS5_C
  2471. *
  2472. * Enable PKCS#5 functions.
  2473. *
  2474. * Module: library/pkcs5.c
  2475. *
  2476. * Requires: MBEDTLS_MD_C
  2477. *
  2478. * This module adds support for the PKCS#5 functions.
  2479. */
  2480. //#define MBEDTLS_PKCS5_C
  2481. /**
  2482. * \def MBEDTLS_PKCS11_C
  2483. *
  2484. * Enable wrapper for PKCS#11 smartcard support.
  2485. *
  2486. * Module: library/pkcs11.c
  2487. * Caller: library/pk.c
  2488. *
  2489. * Requires: MBEDTLS_PK_C
  2490. *
  2491. * This module enables SSL/TLS PKCS #11 smartcard support.
  2492. * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
  2493. */
  2494. //#define MBEDTLS_PKCS11_C
  2495. /**
  2496. * \def MBEDTLS_PKCS12_C
  2497. *
  2498. * Enable PKCS#12 PBE functions.
  2499. * Adds algorithms for parsing PKCS#8 encrypted private keys
  2500. *
  2501. * Module: library/pkcs12.c
  2502. * Caller: library/pkparse.c
  2503. *
  2504. * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_CIPHER_C, MBEDTLS_MD_C
  2505. * Can use: MBEDTLS_ARC4_C
  2506. *
  2507. * This module enables PKCS#12 functions.
  2508. */
  2509. //#define MBEDTLS_PKCS12_C
  2510. /**
  2511. * \def MBEDTLS_PLATFORM_C
  2512. *
  2513. * Enable the platform abstraction layer that allows you to re-assign
  2514. * functions like calloc(), free(), snprintf(), printf(), fprintf(), exit().
  2515. *
  2516. * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT
  2517. * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
  2518. * above to be specified at runtime or compile time respectively.
  2519. *
  2520. * \note This abstraction layer must be enabled on Windows (including MSYS2)
  2521. * as other module rely on it for a fixed snprintf implementation.
  2522. *
  2523. * Module: library/platform.c
  2524. * Caller: Most other .c files
  2525. *
  2526. * This module enables abstraction of common (libc) functions.
  2527. */
  2528. #define MBEDTLS_PLATFORM_C
  2529. /**
  2530. * \def MBEDTLS_POLY1305_C
  2531. *
  2532. * Enable the Poly1305 MAC algorithm.
  2533. *
  2534. * Module: library/poly1305.c
  2535. * Caller: library/chachapoly.c
  2536. */
  2537. #define MBEDTLS_POLY1305_C
  2538. /**
  2539. * \def MBEDTLS_RIPEMD160_C
  2540. *
  2541. * Enable the RIPEMD-160 hash algorithm.
  2542. *
  2543. * Module: library/ripemd160.c
  2544. * Caller: library/md.c
  2545. *
  2546. */
  2547. //#define MBEDTLS_RIPEMD160_C
  2548. /**
  2549. * \def MBEDTLS_RSA_C
  2550. *
  2551. * Enable the RSA public-key cryptosystem.
  2552. *
  2553. * Module: library/rsa.c
  2554. * library/rsa_internal.c
  2555. * Caller: library/ssl_cli.c
  2556. * library/ssl_srv.c
  2557. * library/ssl_tls.c
  2558. * library/x509.c
  2559. *
  2560. * This module is used by the following key exchanges:
  2561. * RSA, DHE-RSA, ECDHE-RSA, RSA-PSK
  2562. *
  2563. * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C
  2564. */
  2565. //#define MBEDTLS_RSA_C
  2566. /**
  2567. * \def MBEDTLS_SHA1_C
  2568. *
  2569. * Enable the SHA1 cryptographic hash algorithm.
  2570. *
  2571. * Module: library/sha1.c
  2572. * Caller: library/md.c
  2573. * library/ssl_cli.c
  2574. * library/ssl_srv.c
  2575. * library/ssl_tls.c
  2576. * library/x509write_crt.c
  2577. *
  2578. * This module is required for SSL/TLS up to version 1.1, for TLS 1.2
  2579. * depending on the handshake parameters, and for SHA1-signed certificates.
  2580. *
  2581. * \warning SHA-1 is considered a weak message digest and its use constitutes
  2582. * a security risk. If possible, we recommend avoiding dependencies
  2583. * on it, and considering stronger message digests instead.
  2584. *
  2585. */
  2586. //#define MBEDTLS_SHA1_C
  2587. /**
  2588. * \def MBEDTLS_SHA256_C
  2589. *
  2590. * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
  2591. *
  2592. * Module: library/sha256.c
  2593. * Caller: library/entropy.c
  2594. * library/md.c
  2595. * library/ssl_cli.c
  2596. * library/ssl_srv.c
  2597. * library/ssl_tls.c
  2598. *
  2599. * This module adds support for SHA-224 and SHA-256.
  2600. * This module is required for the SSL/TLS 1.2 PRF function.
  2601. */
  2602. #define MBEDTLS_SHA256_C
  2603. /**
  2604. * \def MBEDTLS_SHA512_C
  2605. *
  2606. * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
  2607. *
  2608. * Module: library/sha512.c
  2609. * Caller: library/entropy.c
  2610. * library/md.c
  2611. * library/ssl_cli.c
  2612. * library/ssl_srv.c
  2613. *
  2614. * This module adds support for SHA-384 and SHA-512.
  2615. */
  2616. //#define MBEDTLS_SHA512_C
  2617. /**
  2618. * \def MBEDTLS_SSL_CACHE_C
  2619. *
  2620. * Enable simple SSL cache implementation.
  2621. *
  2622. * Module: library/ssl_cache.c
  2623. * Caller:
  2624. *
  2625. * Requires: MBEDTLS_SSL_CACHE_C
  2626. */
  2627. //#define MBEDTLS_SSL_CACHE_C
  2628. /**
  2629. * \def MBEDTLS_SSL_COOKIE_C
  2630. *
  2631. * Enable basic implementation of DTLS cookies for hello verification.
  2632. *
  2633. * Module: library/ssl_cookie.c
  2634. * Caller:
  2635. */
  2636. #define MBEDTLS_SSL_COOKIE_C
  2637. /**
  2638. * \def MBEDTLS_SSL_TICKET_C
  2639. *
  2640. * Enable an implementation of TLS server-side callbacks for session tickets.
  2641. *
  2642. * Module: library/ssl_ticket.c
  2643. * Caller:
  2644. *
  2645. * Requires: MBEDTLS_CIPHER_C
  2646. */
  2647. //#define MBEDTLS_SSL_TICKET_C
  2648. /**
  2649. * \def MBEDTLS_SSL_CLI_C
  2650. *
  2651. * Enable the SSL/TLS client code.
  2652. *
  2653. * Module: library/ssl_cli.c
  2654. * Caller:
  2655. *
  2656. * Requires: MBEDTLS_SSL_TLS_C
  2657. *
  2658. * This module is required for SSL/TLS client support.
  2659. */
  2660. #define MBEDTLS_SSL_CLI_C
  2661. /**
  2662. * \def MBEDTLS_SSL_SRV_C
  2663. *
  2664. * Enable the SSL/TLS server code.
  2665. *
  2666. * Module: library/ssl_srv.c
  2667. * Caller:
  2668. *
  2669. * Requires: MBEDTLS_SSL_TLS_C
  2670. *
  2671. * This module is required for SSL/TLS server support.
  2672. */
  2673. #define MBEDTLS_SSL_SRV_C
  2674. /**
  2675. * \def MBEDTLS_SSL_TLS_C
  2676. *
  2677. * Enable the generic SSL/TLS code.
  2678. *
  2679. * Module: library/ssl_tls.c
  2680. * Caller: library/ssl_cli.c
  2681. * library/ssl_srv.c
  2682. *
  2683. * Requires: MBEDTLS_CIPHER_C, MBEDTLS_MD_C
  2684. * and at least one of the MBEDTLS_SSL_PROTO_XXX defines
  2685. *
  2686. * This module is required for SSL/TLS.
  2687. */
  2688. #define MBEDTLS_SSL_TLS_C
  2689. /**
  2690. * \def MBEDTLS_THREADING_C
  2691. *
  2692. * Enable the threading abstraction layer.
  2693. * By default mbed TLS assumes it is used in a non-threaded environment or that
  2694. * contexts are not shared between threads. If you do intend to use contexts
  2695. * between threads, you will need to enable this layer to prevent race
  2696. * conditions. See also our Knowledge Base article about threading:
  2697. * https://tls.mbed.org/kb/development/thread-safety-and-multi-threading
  2698. *
  2699. * Module: library/threading.c
  2700. *
  2701. * This allows different threading implementations (self-implemented or
  2702. * provided).
  2703. *
  2704. * You will have to enable either MBEDTLS_THREADING_ALT or
  2705. * MBEDTLS_THREADING_PTHREAD.
  2706. *
  2707. * Enable this layer to allow use of mutexes within mbed TLS
  2708. */
  2709. //#define MBEDTLS_THREADING_C
  2710. /**
  2711. * \def MBEDTLS_TIMING_C
  2712. *
  2713. * Enable the semi-portable timing interface.
  2714. *
  2715. * \note The provided implementation only works on POSIX/Unix (including Linux,
  2716. * BSD and OS X) and Windows. On other platforms, you can either disable that
  2717. * module and provide your own implementations of the callbacks needed by
  2718. * \c mbedtls_ssl_set_timer_cb() for DTLS, or leave it enabled and provide
  2719. * your own implementation of the whole module by setting
  2720. * \c MBEDTLS_TIMING_ALT in the current file.
  2721. *
  2722. * \note See also our Knowledge Base article about porting to a new
  2723. * environment:
  2724. * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
  2725. *
  2726. * Module: library/timing.c
  2727. * Caller: library/havege.c
  2728. *
  2729. * This module is used by the HAVEGE random number generator.
  2730. */
  2731. //#define MBEDTLS_TIMING_C
  2732. /**
  2733. * \def MBEDTLS_VERSION_C
  2734. *
  2735. * Enable run-time version information.
  2736. *
  2737. * Module: library/version.c
  2738. *
  2739. * This module provides run-time version information.
  2740. */
  2741. #define MBEDTLS_VERSION_C
  2742. /**
  2743. * \def MBEDTLS_X509_USE_C
  2744. *
  2745. * Enable X.509 core for using certificates.
  2746. *
  2747. * Module: library/x509.c
  2748. * Caller: library/x509_crl.c
  2749. * library/x509_crt.c
  2750. * library/x509_csr.c
  2751. *
  2752. * Requires: MBEDTLS_ASN1_PARSE_C, MBEDTLS_BIGNUM_C, MBEDTLS_OID_C,
  2753. * MBEDTLS_PK_PARSE_C
  2754. *
  2755. * This module is required for the X.509 parsing modules.
  2756. */
  2757. //#define MBEDTLS_X509_USE_C
  2758. /**
  2759. * \def MBEDTLS_X509_CRT_PARSE_C
  2760. *
  2761. * Enable X.509 certificate parsing.
  2762. *
  2763. * Module: library/x509_crt.c
  2764. * Caller: library/ssl_cli.c
  2765. * library/ssl_srv.c
  2766. * library/ssl_tls.c
  2767. *
  2768. * Requires: MBEDTLS_X509_USE_C
  2769. *
  2770. * This module is required for X.509 certificate parsing.
  2771. */
  2772. //#define MBEDTLS_X509_CRT_PARSE_C
  2773. /**
  2774. * \def MBEDTLS_X509_CRL_PARSE_C
  2775. *
  2776. * Enable X.509 CRL parsing.
  2777. *
  2778. * Module: library/x509_crl.c
  2779. * Caller: library/x509_crt.c
  2780. *
  2781. * Requires: MBEDTLS_X509_USE_C
  2782. *
  2783. * This module is required for X.509 CRL parsing.
  2784. */
  2785. //#define MBEDTLS_X509_CRL_PARSE_C
  2786. /**
  2787. * \def MBEDTLS_X509_CSR_PARSE_C
  2788. *
  2789. * Enable X.509 Certificate Signing Request (CSR) parsing.
  2790. *
  2791. * Module: library/x509_csr.c
  2792. * Caller: library/x509_crt_write.c
  2793. *
  2794. * Requires: MBEDTLS_X509_USE_C
  2795. *
  2796. * This module is used for reading X.509 certificate request.
  2797. */
  2798. //#define MBEDTLS_X509_CSR_PARSE_C
  2799. /**
  2800. * \def MBEDTLS_X509_CREATE_C
  2801. *
  2802. * Enable X.509 core for creating certificates.
  2803. *
  2804. * Module: library/x509_create.c
  2805. *
  2806. * Requires: MBEDTLS_BIGNUM_C, MBEDTLS_OID_C, MBEDTLS_PK_WRITE_C
  2807. *
  2808. * This module is the basis for creating X.509 certificates and CSRs.
  2809. */
  2810. //#define MBEDTLS_X509_CREATE_C
  2811. /**
  2812. * \def MBEDTLS_X509_CRT_WRITE_C
  2813. *
  2814. * Enable creating X.509 certificates.
  2815. *
  2816. * Module: library/x509_crt_write.c
  2817. *
  2818. * Requires: MBEDTLS_X509_CREATE_C
  2819. *
  2820. * This module is required for X.509 certificate creation.
  2821. */
  2822. //#define MBEDTLS_X509_CRT_WRITE_C
  2823. /**
  2824. * \def MBEDTLS_X509_CSR_WRITE_C
  2825. *
  2826. * Enable creating X.509 Certificate Signing Requests (CSR).
  2827. *
  2828. * Module: library/x509_csr_write.c
  2829. *
  2830. * Requires: MBEDTLS_X509_CREATE_C
  2831. *
  2832. * This module is required for X.509 certificate request writing.
  2833. */
  2834. //#define MBEDTLS_X509_CSR_WRITE_C
  2835. /**
  2836. * \def MBEDTLS_XTEA_C
  2837. *
  2838. * Enable the XTEA block cipher.
  2839. *
  2840. * Module: library/xtea.c
  2841. * Caller:
  2842. */
  2843. //#define MBEDTLS_XTEA_C
  2844. /* \} name SECTION: mbed TLS modules */
  2845. /**
  2846. * \name SECTION: Module configuration options
  2847. *
  2848. * This section allows for the setting of module specific sizes and
  2849. * configuration options. The default values are already present in the
  2850. * relevant header files and should suffice for the regular use cases.
  2851. *
  2852. * Our advice is to enable options and change their values here
  2853. * only if you have a good reason and know the consequences.
  2854. *
  2855. * Please check the respective header file for documentation on these
  2856. * parameters (to prevent duplicate documentation).
  2857. * \{
  2858. */
  2859. /* MPI / BIGNUM options */
  2860. //#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
  2861. //#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
  2862. /* CTR_DRBG options */
  2863. //#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
  2864. /*! Maximal reseed counter - indicates maximal number of
  2865. requests allowed between reseeds; according to NIST 800-90
  2866. it is (2^48 - 1), our restriction is : (int - 0xFFFF - 0xF).*/
  2867. #define MBEDTLS_CTR_DRBG_RESEED_INTERVAL 0xFFF0 /**< Interval before reseed is performed by default */
  2868. //#define MBEDTLS_CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
  2869. //#define MBEDTLS_CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
  2870. //#define MBEDTLS_CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
  2871. /* HMAC_DRBG options */
  2872. //#define MBEDTLS_HMAC_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
  2873. //#define MBEDTLS_HMAC_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
  2874. //#define MBEDTLS_HMAC_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
  2875. //#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
  2876. /* ECP options */
  2877. //#define MBEDTLS_ECP_MAX_BITS 521 /**< Maximum bit size of groups */
  2878. //#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
  2879. //#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
  2880. /* Entropy options */
  2881. //#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
  2882. //#define MBEDTLS_ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
  2883. //#define MBEDTLS_ENTROPY_MIN_HARDWARE 32 /**< Default minimum number of bytes required for the hardware entropy source mbedtls_hardware_poll() before entropy is released */
  2884. /* Memory buffer allocator options */
  2885. //#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */
  2886. /* Platform options */
  2887. //#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. */
  2888. //#define MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use, can be undefined */
  2889. //#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */
  2890. //#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */
  2891. //#define MBEDTLS_PLATFORM_STD_TIME time /**< Default time to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
  2892. //#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
  2893. //#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
  2894. /* Note: your snprintf must correctly zero-terminate the buffer! */
  2895. //#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
  2896. //#define MBEDTLS_PLATFORM_STD_EXIT_SUCCESS 0 /**< Default exit value to use, can be undefined */
  2897. //#define MBEDTLS_PLATFORM_STD_EXIT_FAILURE 1 /**< Default exit value to use, can be undefined */
  2898. //#define MBEDTLS_PLATFORM_STD_NV_SEED_READ mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
  2899. //#define MBEDTLS_PLATFORM_STD_NV_SEED_WRITE mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */
  2900. //#define MBEDTLS_PLATFORM_STD_NV_SEED_FILE "seedfile" /**< Seed file to read/write with default implementation */
  2901. /* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */
  2902. /* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */
  2903. //#define MBEDTLS_PLATFORM_CALLOC_MACRO calloc /**< Default allocator macro to use, can be undefined */
  2904. //#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */
  2905. //#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */
  2906. //#define MBEDTLS_PLATFORM_TIME_MACRO time /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
  2907. //#define MBEDTLS_PLATFORM_TIME_TYPE_MACRO time_t /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
  2908. //#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
  2909. //#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
  2910. /* Note: your snprintf must correctly zero-terminate the buffer! */
  2911. //#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
  2912. //#define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
  2913. //#define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */
  2914. /**
  2915. * \brief This macro is invoked by the library when an invalid parameter
  2916. * is detected that is only checked with #MBEDTLS_CHECK_PARAMS
  2917. * (see the documentation of that option for context).
  2918. *
  2919. * When you leave this undefined here, the library provides
  2920. * a default definition. If the macro #MBEDTLS_CHECK_PARAMS_ASSERT
  2921. * is defined, the default definition is `assert(cond)`,
  2922. * otherwise the default definition calls a function
  2923. * mbedtls_param_failed(). This function is declared in
  2924. * `platform_util.h` for the benefit of the library, but
  2925. * you need to define in your application.
  2926. *
  2927. * When you define this here, this replaces the default
  2928. * definition in platform_util.h (which no longer declares the
  2929. * function mbedtls_param_failed()) and it is your responsibility
  2930. * to make sure this macro expands to something suitable (in
  2931. * particular, that all the necessary declarations are visible
  2932. * from within the library - you can ensure that by providing
  2933. * them in this file next to the macro definition).
  2934. * If you define this macro to call `assert`, also define
  2935. * #MBEDTLS_CHECK_PARAMS_ASSERT so that library source files
  2936. * include `<assert.h>`.
  2937. *
  2938. * Note that you may define this macro to expand to nothing, in
  2939. * which case you don't have to worry about declarations or
  2940. * definitions. However, you will then be notified about invalid
  2941. * parameters only in non-void functions, and void function will
  2942. * just silently return early on invalid parameters, which
  2943. * partially negates the benefits of enabling
  2944. * #MBEDTLS_CHECK_PARAMS in the first place, so is discouraged.
  2945. *
  2946. * \param cond The expression that should evaluate to true, but doesn't.
  2947. */
  2948. //#define MBEDTLS_PARAM_FAILED( cond ) assert( cond )
  2949. /* SSL Cache options */
  2950. //#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
  2951. //#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
  2952. /* SSL options */
  2953. /** \def MBEDTLS_SSL_MAX_CONTENT_LEN
  2954. *
  2955. * Maximum length (in bytes) of incoming and outgoing plaintext fragments.
  2956. *
  2957. * This determines the size of both the incoming and outgoing TLS I/O buffers
  2958. * in such a way that both are capable of holding the specified amount of
  2959. * plaintext data, regardless of the protection mechanism used.
  2960. *
  2961. * To configure incoming and outgoing I/O buffers separately, use
  2962. * #MBEDTLS_SSL_IN_CONTENT_LEN and #MBEDTLS_SSL_OUT_CONTENT_LEN,
  2963. * which overwrite the value set by this option.
  2964. *
  2965. * \note When using a value less than the default of 16KB on the client, it is
  2966. * recommended to use the Maximum Fragment Length (MFL) extension to
  2967. * inform the server about this limitation. On the server, there
  2968. * is no supported, standardized way of informing the client about
  2969. * restriction on the maximum size of incoming messages, and unless
  2970. * the limitation has been communicated by other means, it is recommended
  2971. * to only change the outgoing buffer size #MBEDTLS_SSL_OUT_CONTENT_LEN
  2972. * while keeping the default value of 16KB for the incoming buffer.
  2973. *
  2974. * Uncomment to set the maximum plaintext size of both
  2975. * incoming and outgoing I/O buffers.
  2976. */
  2977. #define MBEDTLS_SSL_MAX_CONTENT_LEN 1024
  2978. /** \def MBEDTLS_SSL_IN_CONTENT_LEN
  2979. *
  2980. * Maximum length (in bytes) of incoming plaintext fragments.
  2981. *
  2982. * This determines the size of the incoming TLS I/O buffer in such a way
  2983. * that it is capable of holding the specified amount of plaintext data,
  2984. * regardless of the protection mechanism used.
  2985. *
  2986. * If this option is undefined, it inherits its value from
  2987. * #MBEDTLS_SSL_MAX_CONTENT_LEN.
  2988. *
  2989. * \note When using a value less than the default of 16KB on the client, it is
  2990. * recommended to use the Maximum Fragment Length (MFL) extension to
  2991. * inform the server about this limitation. On the server, there
  2992. * is no supported, standardized way of informing the client about
  2993. * restriction on the maximum size of incoming messages, and unless
  2994. * the limitation has been communicated by other means, it is recommended
  2995. * to only change the outgoing buffer size #MBEDTLS_SSL_OUT_CONTENT_LEN
  2996. * while keeping the default value of 16KB for the incoming buffer.
  2997. *
  2998. * Uncomment to set the maximum plaintext size of the incoming I/O buffer
  2999. * independently of the outgoing I/O buffer.
  3000. */
  3001. //#define MBEDTLS_SSL_IN_CONTENT_LEN 16384
  3002. /** \def MBEDTLS_SSL_OUT_CONTENT_LEN
  3003. *
  3004. * Maximum length (in bytes) of outgoing plaintext fragments.
  3005. *
  3006. * This determines the size of the outgoing TLS I/O buffer in such a way
  3007. * that it is capable of holding the specified amount of plaintext data,
  3008. * regardless of the protection mechanism used.
  3009. *
  3010. * If this option undefined, it inherits its value from
  3011. * #MBEDTLS_SSL_MAX_CONTENT_LEN.
  3012. *
  3013. * It is possible to save RAM by setting a smaller outward buffer, while keeping
  3014. * the default inward 16384 byte buffer to conform to the TLS specification.
  3015. *
  3016. * The minimum required outward buffer size is determined by the handshake
  3017. * protocol's usage. Handshaking will fail if the outward buffer is too small.
  3018. * The specific size requirement depends on the configured ciphers and any
  3019. * certificate data which is sent during the handshake.
  3020. *
  3021. * Uncomment to set the maximum plaintext size of the outgoing I/O buffer
  3022. * independently of the incoming I/O buffer.
  3023. */
  3024. //#define MBEDTLS_SSL_OUT_CONTENT_LEN 16384
  3025. /** \def MBEDTLS_SSL_DTLS_MAX_BUFFERING
  3026. *
  3027. * Maximum number of heap-allocated bytes for the purpose of
  3028. * DTLS handshake message reassembly and future message buffering.
  3029. *
  3030. * This should be at least 9/8 * MBEDTLSSL_IN_CONTENT_LEN
  3031. * to account for a reassembled handshake message of maximum size,
  3032. * together with its reassembly bitmap.
  3033. *
  3034. * A value of 2 * MBEDTLS_SSL_IN_CONTENT_LEN (32768 by default)
  3035. * should be sufficient for all practical situations as it allows
  3036. * to reassembly a large handshake message (such as a certificate)
  3037. * while buffering multiple smaller handshake messages.
  3038. *
  3039. */
  3040. //#define MBEDTLS_SSL_DTLS_MAX_BUFFERING 32768
  3041. //#define MBEDTLS_SSL_DEFAULT_TICKET_LIFETIME 86400 /**< Lifetime of session tickets (if enabled) */
  3042. #define MBEDTLS_PSK_MAX_LEN 16 /**< Max size of TLS pre-shared keys, in bytes (default 256 bits) */
  3043. //#define MBEDTLS_SSL_COOKIE_TIMEOUT 60 /**< Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued */
  3044. /**
  3045. * Complete list of ciphersuites to use, in order of preference.
  3046. *
  3047. * \warning No dependency checking is done on that field! This option can only
  3048. * be used to restrict the set of available ciphersuites. It is your
  3049. * responsibility to make sure the needed modules are active.
  3050. *
  3051. * Use this to save a few hundred bytes of ROM (default ordering of all
  3052. * available ciphersuites) and a few to a few hundred bytes of RAM.
  3053. *
  3054. * The value below is only an example, not the default.
  3055. */
  3056. //#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  3057. /* X509 options */
  3058. //#define MBEDTLS_X509_MAX_INTERMEDIATE_CA 8 /**< Maximum number of intermediate CAs in a verification chain. */
  3059. //#define MBEDTLS_X509_MAX_FILE_PATH_LEN 512 /**< Maximum length of a path/filename string in bytes including the null terminator character ('\0'). */
  3060. /**
  3061. * Allow SHA-1 in the default TLS configuration for certificate signing.
  3062. * Without this build-time option, SHA-1 support must be activated explicitly
  3063. * through mbedtls_ssl_conf_cert_profile. Turning on this option is not
  3064. * recommended because of it is possible to generate SHA-1 collisions, however
  3065. * this may be safe for legacy infrastructure where additional controls apply.
  3066. *
  3067. * \warning SHA-1 is considered a weak message digest and its use constitutes
  3068. * a security risk. If possible, we recommend avoiding dependencies
  3069. * on it, and considering stronger message digests instead.
  3070. *
  3071. */
  3072. // #define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_CERTIFICATES
  3073. /**
  3074. * Allow SHA-1 in the default TLS configuration for TLS 1.2 handshake
  3075. * signature and ciphersuite selection. Without this build-time option, SHA-1
  3076. * support must be activated explicitly through mbedtls_ssl_conf_sig_hashes.
  3077. * The use of SHA-1 in TLS <= 1.1 and in HMAC-SHA-1 is always allowed by
  3078. * default. At the time of writing, there is no practical attack on the use
  3079. * of SHA-1 in handshake signatures, hence this option is turned on by default
  3080. * to preserve compatibility with existing peers, but the general
  3081. * warning applies nonetheless:
  3082. *
  3083. * \warning SHA-1 is considered a weak message digest and its use constitutes
  3084. * a security risk. If possible, we recommend avoiding dependencies
  3085. * on it, and considering stronger message digests instead.
  3086. *
  3087. */
  3088. #define MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE
  3089. /**
  3090. * Uncomment the macro to let mbed TLS use your alternate implementation of
  3091. * mbedtls_platform_zeroize(). This replaces the default implementation in
  3092. * platform_util.c.
  3093. *
  3094. * mbedtls_platform_zeroize() is a widely used function across the library to
  3095. * zero a block of memory. The implementation is expected to be secure in the
  3096. * sense that it has been written to prevent the compiler from removing calls
  3097. * to mbedtls_platform_zeroize() as part of redundant code elimination
  3098. * optimizations. However, it is difficult to guarantee that calls to
  3099. * mbedtls_platform_zeroize() will not be optimized by the compiler as older
  3100. * versions of the C language standards do not provide a secure implementation
  3101. * of memset(). Therefore, MBEDTLS_PLATFORM_ZEROIZE_ALT enables users to
  3102. * configure their own implementation of mbedtls_platform_zeroize(), for
  3103. * example by using directives specific to their compiler, features from newer
  3104. * C standards (e.g using memset_s() in C11) or calling a secure memset() from
  3105. * their system (e.g explicit_bzero() in BSD).
  3106. */
  3107. //#define MBEDTLS_PLATFORM_ZEROIZE_ALT
  3108. /**
  3109. * Uncomment the macro to let Mbed TLS use your alternate implementation of
  3110. * mbedtls_platform_gmtime_r(). This replaces the default implementation in
  3111. * platform_util.c.
  3112. *
  3113. * gmtime() is not a thread-safe function as defined in the C standard. The
  3114. * library will try to use safer implementations of this function, such as
  3115. * gmtime_r() when available. However, if Mbed TLS cannot identify the target
  3116. * system, the implementation of mbedtls_platform_gmtime_r() will default to
  3117. * using the standard gmtime(). In this case, calls from the library to
  3118. * gmtime() will be guarded by the global mutex mbedtls_threading_gmtime_mutex
  3119. * if MBEDTLS_THREADING_C is enabled. We recommend that calls from outside the
  3120. * library are also guarded with this mutex to avoid race conditions. However,
  3121. * if the macro MBEDTLS_PLATFORM_GMTIME_R_ALT is defined, Mbed TLS will
  3122. * unconditionally use the implementation for mbedtls_platform_gmtime_r()
  3123. * supplied at compile time.
  3124. */
  3125. //#define MBEDTLS_PLATFORM_GMTIME_R_ALT
  3126. /* \} name SECTION: Customisation configuration options */
  3127. /* Target and application specific configurations
  3128. *
  3129. * Allow user to override any previous default.
  3130. *
  3131. */
  3132. #if defined(MBEDTLS_USER_CONFIG_FILE)
  3133. #include MBEDTLS_USER_CONFIG_FILE
  3134. #endif
  3135. // Adding include to stdio.h to prevent warning (not finding snprintf)
  3136. #include <stdio.h>
  3137. #include "mbedtls/check_config.h"
  3138. #endif /* MBEDTLS_CONFIG_H */