config-psa-crypto.h 109 KB

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