config.h 109 KB

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